103

In case anyone needed this done via PowerShell: $hexified = "00,00,00,00,00,00,00,00,02,00,00,00,1d,00,3a,00,00,00,00,00".Split(',') | % { "0x$_"}; $kbLayout = 'HKLM:\System\CurrentControlSet\Control\Keyboard Layout'; New-ItemProperty -Path $kbLayout -Name "Scancode Map" -PropertyType Binary -Value ([byte[]]$hexified); Run it as Administrator and reboot.


98

Did you remember to re-boot? Seems to work fine for me, just like in 7 and 8. Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout] "Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,1d,00,3a,00,00,00,00,00


25

Open the menu Open System Tools → System Settings Select Keyboard Layouts Select Options Select Caps Lock key behavior Select Make Caps Lock an additional ESC Close all of the windows and have yourself a nice cuppa, you are done!


24

You can use SharpKeys to map any key to any other key in Windows 7, 8, or 10. It's much easier and cleaner to do than to modify the registry yourself. Hope this helps.


19

I use the following to send CTRL for the CAPS LOCK key, send ALT for the CTRL key, and send CAPS LOCK for the ALT key. CTRL is to the left of "A" where God intended it, ALT is below SHIFT, and the utterly useless CAPS LOCK key is safely tucked away where I have to break my wrist to hit it. Windows Registry Editor Version 5.00 ; The hex data is in five ...


9

You can use Microsoft's Keyboard Layout Creator. This will even allow you to add extra functionality to your keyboard, such as changing a key into a dead key (e.g. ~), add extra mappings (e.g. altgr+c ->รง), etc. In order to edit the special keystrokes, like ctrl+FOO, you might need to edit the .klc file manually. You can find instructions by @Senseful in ...


8

Solution 1: AutoHotkey Remapping AutoHotkey can be used for Remapping Keys and Buttons. However, consider AutoHotkey's limitation below. The script Capslock::q would make the Caps Lock behave like Q. Limitation: AutoHotkey's remapping feature described below is generally not as pure and effective as remapping directly via the Windows registry. For ...


7

The best tool for the job is Microsoft's own remapkey.exe, available as part of the Windows Resource Kit. (That link is for Windows 2003; I've used it successfully over the years on many versions of Windows, including Windows 7; have not tested Windows 8). remapkey.exe will write the mapping directly into the registry, I believe, and does not require a ...


7

You are looking for the Remote Control Daemon located in: /System/Library/CoreServices/rcd.app It can be disabled with the command sudo chmod a-x /System/Library/CoreServices/rcd.app/Contents/MacOS/rcd killall -9 rcd (If you just kill it, launchd will restart it again). To re-enable it, sudo chmod a+x /System/Library/CoreServices/rcd.app/Contents/MacOS/...


7

I'm not sure what you're trying to do. <s-k>, also known as K, opens the man page for the keyword under the cursor. I assume you want to create a mapping to open the vim help page for the keyword under the cursor. This can be done by this (i'll use <c-k> to not override K): noremap <c-k> :execute "tab h " . expand("<cword>")<cr>...


6

Put this in your ~/.Xmodmap file: remove Lock = Caps_Lock remove Control = Escape keysym Escape = Caps_Lock keysym Caps_Lock = Escape add Lock = Caps_Lock add Control = Escape and then run xmodmap ~/.Xmodmap to make the changes effective immediately. Otherwise the next time you log in the changes will be effective.


6

This may have appeared on the previously mentioned vim wikia page after Rich's solution above. ; Author: fwompner gmail com #InstallKeybdHook SetCapsLockState, alwaysoff Capslock:: Send {LControl Down} KeyWait, CapsLock Send {LControl Up} if ( A_PriorKey = "CapsLock" ) { Send {Esc} } return This is not my work, but I've started using it and it works ...


6

SharpKeys will allow you to do this.


6

This is the script to swap CTRL and CAPS LOCK keys: Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout] "Scancode Map"=hex:00,00,00,00,00,00,00,00,03,00,00,00,1d,00,3a,00,3a,00,1d,00,00,00,00,00


5

Expanding answer of @mrded for macOS Sierra. I used Karabiner-Elements to remap caps_lock to f19. To this end I placed the following file karabiner.json to ~/.karabiner.d/configuration: { "profiles": [ { "name": "Default profile", "selected": true, "simple_modifications": { "caps_lock": "f19" ...


5

You can use preserve for that: add to you type-definition (e.g. THREE_LEVEL) the line preserve[LevelThree+Shift] = Shift; This tells xkb to preserve the shift modifier when figuring out the appropriate level from your modifier combination in the case of LevelThree + Shift. The shift modifier is passed on for use by the toolkit or the application (see also ...


5

These are normal-mode commands; with :nnoremap, you avoid that the mapping targets are again remapped; this enables the swapping (and is generally a good practice to use). Put the following into your ~/.vimrc to make it permanent: :nnoremap ; , :nnoremap , ;


5

This is easily accomplished with AutoHotKey. AutoHotkey is a free, open-source macro-creation and automation software utility that allows users to automate repetitive tasks in Microsoft Windows. Any application user interface can be modified by AutoHotkey (for example, overriding the default Windows control key commands with their Emacs equivalents). It ...


5

There is now a solution directly from Microsoft for mapping caps lock to the control key called PowerToys. PowerToys does not involve using a third party tool or modifying the registry by hand (which has the potential for causing serious problems if done incorrectly). The tool in PowerToys that handles this is installed by default and called Keyboard ...


5

Use SharpKeys to see if the Power key generates a scan-code on your keyboard. If it does, then SharpKeys can remap the key in the registry which will work for all programs. See for tutorial the article Map Any Key to Any Key on Windows 10, 8, 7, or Vista. In the case that the Power key doesn't generate a scan-code under Windows, then it cannot be mapped, ...


4

Here is a registry entry that maps the caps lock to escape on windows 7. Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout] "Scancode Map"=hex:00,00,00,00,00,00,00,00,03,00,00,00,3a,00,46,00,01,00,3a,00,00,00,00,00 Save the above to a file with a .reg extension (like mapCapLocks.reg) and import/...


4

I use the following AutoHotkey script for this, adapted from one I found on the Vim Tips Wiki. The implementation is a bit hacky, but it "works for me." (And unlike the other answers on this page as of 2016-09-19, it fully solves the issue without any caveats that I am aware of.) The original coder noted: The script also tries to detect and avoid "false ...


4

This is often impossible, because the Fn key is hardware and when pressed together with another key it sends a media key code or sometimes does something hardware based while sending no code at all. Your best bet is to adjust the BIOS (extremely hard, if not impossible) or the keyboard (some rewiring hack might be feasible), because Fn simply isn't in the ...


4

I used to use AutoHotKey to do this. I'd have a link in the startup directory to run a very basic ahk script: Capslock::Ctrl The thing is, Autohotkey isn't run as Administrator so it won't affect privileged windows, unless you use the task scheduler instead of the startup directory to run the script at login with higher privileges. The second problem is ...


4

The inexhaustible sysinternals toolbox also provides a little program just for switching capslock with control -- ctrl2cap.exe.


4

Setpoint is very bad on custom keys, and in addition it has the bad habit of swallowing up some of these keys, such as the multimedia keys, so they are unavailable to other programs. I suggest to avoid Setpoint and to use instead AutoHotkey. Your first step is to find out the scan-codes of the special keys. Since we are using AutoHotkey, create a .ahk file,...


3

I'm also using an Apple keyboard with Windows 7 and I think it might be useful to share the setup I'm using to map OS X shortcuts. The below AutoHotKey script has the following features: Command key sends control, alt key sends alt, control key sends Windows key Important OS X shortcuts work, including command-tab and command/alt arrows to move around text ...


3

Use Xmouse Button Control It'll let you re-map any button on any mouse with pretty much any custom action, including running scripts etc.


3

I have Genius KB-G235 USB keyboard (HID) and WinXP SP3. Neither of applications in previous answers didnt work for me. (Because working with PS/2 codes or not (fully) with XP). I tried HotkeyP (freeware) http://petr.lastovicka.sweb.cz/others.html and this works! Just add action for key and its done. (After assign new action isn't default action executed.)


3

This is specifically for sublime text, but for anyone searching for a way to remap alt and the arrow keys to behave like on a mac might stumble across this answer like I have. In sublime, open Preferences > Key Bindings - User and add the following between the square brackets. { "keys": ["alt+left"], "command": "move_to", "args": {"to": "bol", "extend": ...


Only top voted, non community-wiki answers of a minimum length are eligible