Detect When A Shortcut Is Hit Twice

We figured out how to emulate Impulsetracker’s home+home and end+end functionality where pressing either key twice brings you to row one of the current track, then row one of track one, and the opposite in the case of end.

This was done by checking of the current row is one or last and altering the behavior.

I want to implement the alt+D block loop selection where hitting alt+D once selects the current block loop from_the_cursor and each consecutive press of alt+D selects double the previous.

If the pattern length us 64, and the block loops size is set to 1/8, alt+d selects 8, hitting it again selects 16, then 32; etc.

Any ideas on how this type of multiple press could be detected? I was thinking a small popup which grabs focus and detects the next keys pressed, but it ought not be that complicated.

Also, can a selection be created with the current api? We can tell if something is selected, but not make it part of a selection block. :confused:

Also on my mind, since school is over for the semester, is Insert Paste! :)

Wouldn’t it just be a If Block Loop is On Then Block Size Equals New Block Size, Else Turn Block Loop On kind of thing?