nimaid / LPHK

A Novation Launchpad Macro Scripting System.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Shift key automatic keyup when another key is tapped

kartikay-bagla opened this issue · comments

Script:

PRESS win
PRESS shift
TAP right
RELEASE shift
RELEASE win

Expected behavior from JS Key tracker (https://unixpapa.com/js/testkey.html):

keydown  keyCode=91  ([)   which=91  ([)   charCode=0        
keydown  keyCode=16        which=16        charCode=0        
keyup    keyCode=39  (')   which=39  (')   charCode=0        
keyup    keyCode=16        which=16        charCode=0        
keyup    keyCode=91  ([)   which=91  ([)   charCode=0        

91 is win, 16 is shift and 39 is right arrow

Actual behavior:

keydown  keyCode=91  ([)   which=91  ([)   charCode=0        
keydown  keyCode=16        which=16        charCode=0        
keyup    keyCode=16        which=16        charCode=0        
keyup    keyCode=39  (')   which=39  (')   charCode=0        
keydown  keyCode=16        which=16        charCode=0        
keyup    keyCode=16        which=16        charCode=0        
keyup    keyCode=91  ([)   which=91  ([)   charCode=0  

Notice the 2 extra lines at line 3 and 5. I've tried variants of PRESS, TAP, ASYNC to no avail.

Edit: I'm using the Launchpad Pro (but other shortcuts seem to work fine, for example this script works fine:

PRESS ctrl
PRESS shift
TAP n
RELEASE shift
RELEASE ctrl

DELAY 0.5

PRESS ctrl
TAP k
TAP o
RELEASE ctrl

try this script

PRESS win
PRESS shift
PRESS right
WAIT_UNPRESSED
RELEASE_ALL

Getting this, which still isn't what I want.

keydown  keyCode=91  ([)   which=91  ([)   charCode=0        
keydown  keyCode=16        which=16        charCode=0        
keyup    keyCode=16        which=16        charCode=0        
keydown  keyCode=16        which=16        charCode=0        
keyup    keyCode=16        which=16        charCode=0        
keyup    keyCode=91  ([)   which=91  ([)   charCode=0        
keyup    keyCode=39  (')   which=39  (')   charCode=0        

Did you try a different keyboard tester (such as noh board which is a native application)

So this shortcut is supposed to move a window from one screen to another, Win + Shift + Right, but since we get a keyup from shift, the Win + Right shortcut is executed instead of the actual. So it's not a keyboard tester issue. But I'll test it with Noh board as well and get back to you.

I think that your best bet is to combine LPHK with AHK to get the effect you want in this case

I moved on to do this only. Thanks!