Using Scan Code instead of key name breaks hotkeys

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Archie2022
Posts: 25
Joined: 06 May 2022, 03:16

Using Scan Code instead of key name breaks hotkeys

Post by Archie2022 » 30 Jun 2022, 08:49

So I have some hotkeys using Caplock , I had this problem with two keyboard layout that when it is not in English it is not working so I tried scan codes

the code to make Capslocks + h ,j , k, l to emulate directions like vim

Code: Select all

; CapsLock & h
SC03A & SC023:: send, {Left}
return
; CapsLock & j
SC03A & SC024:: send, {Down}
return
; CapsLock & k
SC03A & SC025:: send, {Up}
return
; CapsLock & h
SC03A & SC026:: send, {Right}
return
Now this works but my Capslock led doesn't turn on and off every time I use a combination involving Capslock (unlike before) and every key used to work with Capslock stops working. Any idea why this is happening?

User avatar
mikeyww
Posts: 27044
Joined: 09 Sep 2014, 18:38

Re: Using Scan Code instead of key name breaks hotkeys

Post by mikeyww » 30 Jun 2022, 08:53

Hotkeys block their native functions by default. See documentation for tilde, dollar prefix, & custom combinations. You can add code to set the CapsLockState if needed.

Post Reply

Return to “Ask for Help (v1)”