Quantcast
Channel: Active questions tagged keymapping - Stack Overflow
Viewing all articles
Browse latest Browse all 74

Auto Hot Key stopped working after modifying a script

$
0
0

I need to remap certain keys so that CapsLock +"ijkl" would result in arrow keys without actually toggling CapsLock on.Standard practice.

ChatGPT gave me the following code which worked as expected:

CapsLock::     KeyWait, CapsLock  ; Wait until CapsLock is released    return#If GetKeyState("CapsLock", "T")  ; Check if CapsLock is toggled oni::    Send, {Up}    return#If

Then I added more key mappings:

CapsLock::     KeyWait, CapsLock  ; Wait until CapsLock is released    return#If GetKeyState("CapsLock", "T")  ; Check if CapsLock is toggled oni::    Send, {Up}    returnj::    Send, {Left}    returnk::    Send, {Down}    returnl::    Send, {Right}    return#If

And now script runs and only prevents CapsLock from toggling on (seen from LED inactivity on keyboard).

Going back to initial code didn't change anything (still only blocking CapsLock)I tried to launch script with double-click, to launch as administrator, to run with UI access

I did reboot the PC just in case :)

Since the initial code worked fine the first time I guess the problem isn't related to syntax but to some system settings.


Viewing all articles
Browse latest Browse all 74

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>