I would like every key to be equivalent to "Shift + " when caps lock is turn on. Currently caps lock only capitalizes letters, not other keys.

So if I press: '/", then it should be " rather than '
1/!, then it should be ! rather than 1

This may be out of scope, but does AHK work for remapping keys in other programs?

In other words, where does AHK sit in the execution from the actual hardware to the OS to the application receiving the keypress event?

Anyway to trace this flow?

  • 1
    This seems like a flawed idea. You can uppercase letters without knowing a keyboard layout. 'a' => 'A'. But you need to know the keyboard layout to know what's "above" a number. If anything. There are keyboards where you need the Shift key to type numbers. – MSalters Nov 2 at 13:45
  • You are probably right. I just thought it would be nice to have "modes" so (for example) the default is < and > instead of , and . (If i know I will be writing something with alot of < >) I guess code snippets probably cover these edge cases better than this idea. – AncientElevator9 Nov 2 at 13:51
#NoEnv
#UseHook

; Add the keys you want to be shifted while Capslock is on in this array this way:
Keys := ["1","2","3",",",".","-"] ; ...
for each, key in Keys
    Hotkey, %key%, Shift_Key, On 
return

Shift_Key:
If GetKeyState("Capslock","T")
    SendInput, +%A_ThisHotkey%
else
    SendInput, %A_ThisHotkey%
return

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.