Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I need to re-map certain combinations on keyboard, say

Win-a

to

Ctrl-a

The problem is when keyboard is in Cyrillic mode, it sends different key codes to the OS. I tried specifying a re-mapping command in AutoHotkey with a cyrillic character, although AutoHotkey displays an error message saying the command is incorrect.

Is there a way to specify certain key code, say

#{123}::^a

where {123} is a keycode for cyrillic "a"?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

In the Autohotkey help file or online documentaion, go to the Key List page (List of Keys, Mouse Buttons, and Joystick Controls), then scroll down to the Special Keys section at the bottom. This section may help with your problem.

The first few steps tell you use a script that is using the keyboard hook, then the bring up the AutoHotkey icon's Key History page. An easy way to do that is as follows:

Put the following script into an ahk file and run it with AutoHotkey.

#InstallKeybdHook
KeyHistory

When you run this script, the AutoHotkey Key History page will appear. You can press the key you want to test, then press F5 to refresh the Key History page.

Then you can follow the next steps from that section to find and use the key code:

Somewhere near the bottom [of the Key History] are the key-down and key-up events for your key. [...] make a note of the 3-digit hexadecimal value in the second column of the list (e.g. 159). To define this key as a hotkey, follow this example:

SC159:: ; Replace 159 with your key's value.
MsgBox, %A_ThisHotKey% was pressed.
return
share|improve this answer
    
Thanks for your answer, Bavi_H. I did as you suggested and the code is 01E. But When I add this: #SC01E::^a to my AHK config, it goes not seem to affect AHK in any way. –  Art May 8 '12 at 1:47
    
You can use SC01E as the source and the target. Does #SC01E::^SC01E do what you want? –  Bavi_H May 8 '12 at 2:31
    
I will be damned! It actually does! But this doesn't make any sense! Thanks a lot! –  Art May 8 '12 at 2:48

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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