Wednesday, August 26, 2015

Keyboard remapping


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.


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:


enter image description here


No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...