I am trying to write a script that uses the home row keys jKL; and FDSA as SHIFT, CTRL, ALT and WIN respectively when held down. similar on how people do it on these 40% QMK keyboards.
I wrote the following script to make J act as shift while held down but type a normal j when it is just tapped (i.e. normal typing)
Code: Select all
j::
Send {Text}j
KeyWait, j, t0.1
if errorlevel = 1
Send, {Backspace}
Send, {Shift Down}
KeyWait, j
Send, {Shift Up}
Return
Also the send j anyway and then send backspace seems pretty janky to me :p but when i tried to put the send j after the keywait (in a if errorlevel = 0) it would type a j upon releasing the key and that messes with my typing.
I am pretty new to ahk so besides answers for my question, any tips on how you would write something like this better are greatly appreciated. thx!