I have Sony Vaio laptop. I want to remap Left Control and Escape keys to Backslash () and Back-tick (`) keys respectively. I have already tried SharpKeys and KeyTweak software but none of them worked for me. Now I am trying to do this using Microsoft Keyboard Layout Creator but I don't know how to change Control and Escape keys using Keyboard Layout Creator.
What I know is VK addresses of Backslash and Back-tick keys that are VK_OEM_102 and VK_OEM_03 respectively.
NEED HELP.
-
I've played with MSKLC; it doesn't allow changing Ctrl, Alt, Shift, Enter, Esc, etc.– Jeff ZeitlinCommented Nov 22, 2017 at 20:18
-
@Jeff Zeitlin Is there any other way to change these keys?– Luqman SaleemCommented Nov 22, 2017 at 20:34
-
I'm sure there is; there have been utilities for eons that do things like convert CAPSLOCK into a Ctrl key for those who grew up with real terminals, but I'm not aware of any generalised keyboard remappers that do - which doesn't mean that there aren't any.– Jeff ZeitlinCommented Nov 22, 2017 at 20:39
-
Try this, let me know if it works: autohotkey.com/docs/misc/Remap.htm– wysiwygCommented Nov 22, 2017 at 20:41
-
@wysiwyg it worked. Thank you so much. Is there any way by which I don't have to keep this script running?– Luqman SaleemCommented Nov 22, 2017 at 21:30
1 Answer
You can write a simple AutoHotKey script to intercept and remap your key-presses on the fly. For your listed remaps, the script below should do the trick. You will first have to install AutoHotKey: https://autohotkey.com/download/
Create a new .ahk file with the following code:
LCtrl::`
Esc::\
Save it and run it, and you should now see the remaps working.
When the script is running, it will show a taskbar icon. You can hide it by adding #NoTrayIcon
to your script. See HERE for more info.
You can compile the script as an EXE file if you wish. This will enable you to use it on any computer even if AHK is not installed:
-
Thanks for this; I'd briefly looked into AHK some time ago on another project, but didn't dig in enough to see that it could remap the modifier keys. Commented Nov 23, 2017 at 9:13
-
@Jeff Zeitlin glad you found it useful. AHK is quite powerful.– wysiwygCommented Nov 23, 2017 at 14:29