Remapping Keys and Buttons. Introduction. Limitation: Auto. Hotkey's remapping feature described below is generally not as pure and effective as remapping directly via the Windows registry. How to remap the keyboard layout in Windows XP, Windows Vista,and Windows 7 is described. Software and Registry methods to change Caps Lock and other keys are discussed. If you’d like to reassign Caps Lock to something else without messing around in the registry, follow our guide to turning your Caps Lock key into a Search key. For the advantages and disadvantages of each approach, see registry remapping. Remapping the Keyboard and Mouse. The syntax for the built- in remapping feature is Origin. Key: :Destination. Key. For example, a script consisting only of the following line would make the "a" key behave like the "b" key: a: :b. The above example does not alter the "b" key itself. The "b" key would continue to send the "b" keystroke unless you remap it to something else as shown in the following example: a: :b. The examples above use lowercase, which is recommended for most purposes because it also remaps the corresponding uppercase letters (that is, it will send uppercase when Capslock is "on" or the Shift key is held down). By contrast, specifying an uppercase letter on the right side forces uppercase. For example, the following line would produce an uppercase B when you type either "a" or "A" (as long as Capslock is off): a: :BMouse remapping: To remap the mouse instead of the keyboard, use the same approach. For example: MButton: :Shift. Makes the middle button behave like the Shift key. XButton. 1: :LButton. Makes the fourth mouse button behave like the left mouse button. RAlt: :RButton. Makes the right Alt key behave like the right mouse button. Other useful remappings: Capslock: :Ctrl. Makes Capslock become a Control key. To retain the ability to turn Capslock on and off, add the remapping +Capslock: :Capslock first. Mouse remapping: To remap the mouse instead of the keyboard, use the same approach. For example: MButton::Shift: Makes the middle button behave like the Shift key.This method of disabling the Caps Lock key works with all modern Windows variants: Windows 2000, XP, Vista, 7, 8/8.1. It will not work with Windows 95/98/Me. As any Unix geek will quickly tell you, one of the greatest frustrations of serious geeks with the PC keyboard is the placement of the CTRL key and the. How to Disable Caps Lock Key in Windows 7. Downloadable Registry Hack to Disable or Remap the Caps Lock Key. (Vista) keeps typing in all caps and can’t be. Map caps lock to escape in Windows. 1,618 pages on this wiki. Use the Caps Lock key as Ctrl. KeyTweak is a free keyboard remapper for Windows NT/2000/XP/Vista. This toggles Capslock on and off when you hold down the Shift key and press Capslock. Because both remappings allow additional modifier keys to be held down, the more specific +Capslock: :Capslock remapping must be placed first for it to work. XButton. 2: :^LButton. Makes the fifth mouse button (XButton. Control- Left. Click. RAlt: :Apps. Key. Makes the right Alt key become the Apps key (which is the key that opens the context menu). RCtrl: :RWin. Makes the right Control key become the right Windows key. Ctrl: :Alt. Makes both Control keys behave like an Alt key. However, see alt- tab issues.^x: :^c. Makes Control- X produce Control- C. It also makes Control- Alt- X produce Control- Alt- C, etc. RWin: :Return. Disables the right Windows key by having it simply return. You can try out any of these examples by copying them into a new text file such as "Remap. See the Key List for a complete list of key and mouse button names. Remarks. The directives #If. Win. Active/Exist can be used to make selected remappings active only in the windows you specify. For example: #If. Win. Active ahk_class Notepad. Makes the 'a' key send a 'b' key, but only in Notepad. If. Win. Active ; This puts subsequent remappings and hotkeys in effect for all windows. Remapping a key or button is "complete" in the following respects: Holding down a modifier such as Control or Shift while typing the origin key will put that modifier into effect for the destination key. For example, b: :a would produce Control- A if you press Control- B. Capslock generally affects remapped keys in the same way as normal keys. The destination key or button is held down for as long as you continue to hold down the origin key. However, some games do not support remapping; in such cases, the keyboard and mouse will behave as though not remapped. Remapped keys will auto- repeat while being held down (except keys remapped to become mouse buttons). Although a remapped key can trigger normal hotkeys, by default it cannot trigger mouse hotkeys or hook hotkeys (use List. Hotkeys to discover which hotkeys are "hook"). For example, if the remapping a: :b is in effect, pressing Ctrl- Alt- A would trigger the ^! If ^! b is a hook hotkey, you can define ^! Ctrl- Alt- A to perform the same action as Ctrl- Alt- B. For example: a: :b. Tool. Tip You pressed %A_This. Hotkey%. return. Alternatively, in v. Input. Level can be used to override the default behaviour. For example: #Input. Level 1. Tool. Tip You pressed %A_This. Hotkey%. return. If Send. Mode is used in the auto- execute section (top part of the script), it affects all remappings. However, since remapping uses Send {Blind} and since the Send. Play mode does not fully support {Blind}, some remappings might not function properly in Send. Play mode (especially Control, Shift, Alt, and Win). To work around this, avoid Send. Play in auto- execute section when you have remappings; then use the command Send. Play vs. Send in other places throughout the script. Alternatively, you could translate your remappings into hotkeys (as described below) that explicitly call Send. Event vs. Send. When a script is launched, each remapping is translated into a pair of hotkeys. For example, a script containing a: :b actually contains the following two hotkeys instead: *a: . Set. Key. Delay - 1 ; If the destination key is a mouse button, Set. Mouse. Delay is used instead. Send {Blind}{b Down. Temp} ; Down. Temp is like Down except that other Send commands in the script won't assume "b" should stay down during their Send. Set. Key. Delay - 1 ; See note below for why press- duration is not specified with either of these Set. Key. Delays. Send {Blind}{b Up}. However, the above hotkeys vary under the following circumstances: When the source key is LCtrl and the destination key is an Alt key, the line Send {Blind}{LAlt Down. Temp} is replaced by Send {Blind}{LCtrl Up}{LAlt Down. Temp}. The same is true if the source is RCtrl, except that {RCtrl up} is used. When a keyboard key is being remapped to become a mouse button (e. RCtrl: :RButton), the hotkeys above use Set. Mouse. Delay in place of Set. Key. Delay. In addition, the first hotkey above is replaced by the following, which prevents the keyboard's auto- repeat feature from generating repeated mouse clicks. Set. Mouse. Delay - 1. Get. Key. State("RButton") ; i. Send {Blind}{RButton Down. Temp}. return. Note that Set. Key. Delay's second parameter (press duration) is omitted in the hotkeys above. This is because press- duration does not apply to down- only or up- only events such as {b down} and {b up}. However, it does apply to changes in the state of the Shift/Ctrl/Alt/Win keys, which affects remappings such as a: :B or a: :^b. Consequently, any press- duration a script puts into effect via its auto- execute section will apply to all such remappings. Although a pair of keys cannot be directly remapped to single key (e. Since remappings are translated into hotkeys as described above, the Suspend command affects them. Similarly, the Hotkey command can disable or modify a remapping. For example, the following two commands would disable the remapping a: :b. Hotkey, *a, off. Hotkey, *a up, off. Alt- tab issues: If you remap a key or mouse button to become an Alt key, that key will probably not be able to alt- tab properly. A possible work- around is to add the hotkey *Tab: :Send {Blind}{Tab} - - but be aware that it will likely interfere with using the real Alt key to alt- tab. Therefore, it should be used only when you alt- tab solely by means of remapped keys and/or alt- tab hotkeys. In addition to the keys and mouse buttons on the Key List page, the source key may also be a virtual key (VKnn) or scan code (SCnnn) as described on the special keys page. The same is true for the destination key except that it may optionally specify a scan code after the virtual key. For example, sc. 01e: :vk. To disable a key rather than remapping it, make it a hotkey that simply returns. For example, F1: :return would disable the F1 key. The following keys are not supported by the built- in remapping method: The mouse wheel (Wheel. Up/Down/Left/Right). Pause and Break as destination keys (since they match the names of commands). Curly braces {} as destination keys. Instead use the VK/SC method; e. A and y: :+sc. 01. B. A percent sign (%) as a destination key. Instead use the VK/SC method."Return" as a destination key. Instead use "Enter". Moving the Mouse Cursor via the Keyboard. The keyboard can be used to move the mouse cursor as demonstrated by the fully- featured Keyboard- To- Mouse script. Since that script offers smooth cursor movement, acceleration, and other features, it is the recommended approach if you plan to do a lot of mousing with the keyboard. By contrast, the following example is a simpler demonstration: *#up: :Mouse. Move, 0, - 1. 0, 0, R ; Win+Up. Arrow hotkey => Move cursor upward. Down: :Mouse. Move, 0, 1. R ; Win+Down. Arrow => Move cursor downward. Left: :Mouse. Move, - 1. R ; Win+Left. Arrow => Move cursor to the left. Right: :Mouse. Move, 1. R ; Win+Right. Arrow => Move cursor to the right. RCtrl: : ; Left. Win + Right. Control => Left- click (hold down Control/Shift to Control- Click or Shift- Click). Send. Event {Blind}{LButton down}. Key. Wait RCtrl ; Prevents keyboard auto- repeat from repeating the mouse click. Send. Event {Blind}{LButton up}. Apps. Key: : ; Left. Win + Apps. Key => Right- click. Send. Event {Blind}{RButton down}. Key. Wait Apps. Key ; Prevents keyboard auto- repeat from repeating the mouse click. Send. Event {Blind}{RButton up}. Remapping via the Registry's "Scancode Map"Advantages: Registry remapping is generally more pure and effective than Auto. Hotkey's remapping. For example, it works in a broader variety of games, it has no known alt- tab issues, and it is capable of firing Auto. Hotkey's hook hotkeys (whereas Auto. Hotkey's remapping requires a workaround). If you choose to make the registry entries manually (explained below), absolutely no external software is needed to remap your keyboard. Even if you use Key. Tweak to make the registry entries for you, Key. Tweak does not need to stay running all the time (unlike Auto. Hotkey). Disadvantages: Registry remapping is relatively permanent: a reboot is required to undo the changes or put new ones into effect. Its effect is global: it cannot create remappings specific to a particular user, application, or locale. Remap Caps Lock. The Caps Lock key on most PC keyboards is in the position where the Control key is on many other keyboards, and vice versa. This can make it difficult for programmers to use the "wrong" kind of keyboard. This page describes how to Remap. Caps. Lock on different keys in different Operating. Systems. One really stupid thing about Pee. Cee keyboards is that manufacturers even realized that putting caps- lock on home row was a bad idea because people kept hitting it with the 'a' key. Did they move it? No, that would be too sensible. They carved a little piece of it off to leave a bigger gap. So now if I re- map a standard PC- 1. Many people (the majority, clearly) feel that the placement of CTRL below the SHIFT key is a better location for it. However, the backspace key is way out of the way - - it would be better if the CAPSLOCK and backspace keys were swapped. If you have loadkeys (as you would under Linux), this should do the trick. To reset to the defaults (you may have to switch to another tty and back to undo ctrl- lock). For KDE 4, you can use the GUI. Go to System Settings - > Input Devices. On the left, select Keyboard. Select the third tab "Advanced". Select "Configure keyboard options". Expand the option "Caps Lock key behavior" and check "Make Caps. Lock an additional ESC". Under Redhat 8. 0, just enable the following line in /etc/X1. XF8. 6Config. Option "Xkb. Options" "ctrl: swapcaps". Replace "swapcaps" with "nocaps" to turn both keys into "Control.". With X, there are at least 2 different ways to remap the keys. One is using xmodmap. For example, man xmodmap shows how to swap the left control key and the Caps. Lock key. ! Swap Caps_Lock and Control_L. Lock = Caps_Lock. Control = Control_L. Control_L = Caps_Lock. Caps_Lock = Control_L. Lock = Caps_Lock. Control = Control_L. Many people don't want a Caps. Lock key at all. They can change the Caps. Lock key to a Control. Key? by using the following lines in xmodmap. Control_R. add Control = Control_R. Maybe you have to change the keycode 0x. You can find the keycodes with xev. I Furthermore, this only works if you don't have a right control key. I hope somebody has a solution which does not have this restriction. This solution might be the easiest one. If you do not have a problem owning a dead key in your keyboard you might disable Caps. Lock at all. "remove lock = Caps_Lock" (or just: "clear lock"). A better solution might be this sequence, which is keycode independent and does not remove. Lock = Caps_Lock. Control = Control_L. Caps_Lock = Control_L. Lock = Caps_Lock. Control = Control_L. Now, you can use another solution which uses xkb. For that, you will have to find the sybols directory on your unix system. There, you add a file which might be called 'ctrl' containing the following. CAPS> { symbols[Group. Control_L ] }. modifier_map Control { < CAPS> , < LCTL> }. This eliminates the caps lock key if included in a keymap. We can do this by changing the file en_US. RALT> { [ Mode_switch, Multi_key ] }. Mod. 3 { Mode_switch }. You can then add the keyboard using a line like. X1. 1R6/lib/X1. 1/xkb/xkbcomp - w 1 - R/usr/X1. R6/lib/X1. 1/xkb - xkm - m en_US keymap/xfree. Now, unfortunately there are probably errors in the text above. Please correct and make it working for other systems than Red. Hat Linux. From Why. Not. Use. Emacs. Add the following to your Xmodmap (on many linuxes the default Xmodmap is located at /etc/X1. Xmodmap). add control = Caps_Lock. You can activate this in a already- running X using. X1. 1/Xmodmap # or whatever the name of your modmap file is. This will turn your caps lock into a control key. You won't have a caps lock key anymore, so make sure caps lock is off when you do this. Kevin. Stone? If you get stuck and find yourself without a control key use xev to find the keycode of your control and caps lock keys. Then use the following to restore the default config. Lock = Caps_Lock. Control = Control_L. Control_L. keycode < keycodeofcapslock> = Caps_Lock. Lock = Caps_Lock. Control = Control_L. Additional shortcut key. It is also possible to make the Caps_Lock a handy additional shourcut modifier, ie.. Lock = Caps_Lock. Caps_Lock = Meta_L. Now one can define shortcuts like +A. Mac OS X (1. 0. 3 and below): http: //www. Mac OS X (1. 0. 4 and above). Apple now allows switching the mapping of any modifier keys in the Keyboard section of the Keyboard & Mouse preference panel. Simply go there and click the Modifier Keys button to change the mapping (Apple specifically mentions this feature is for developers who use Control often; score another one for us programmers!). If you want to remap Caps Lock to something other than Control, Option, Command, or nothing, then use the free program PCKeyboard. Hack: http: //pqrs. Use the companion program Key. Remap. 4Mac. Book to remap keys other than Caps Lock, including remapping them to Caps Lock: http: //pqrs. Linux, on an Apple i. Book: http: //lists. MS Windows. There are shareware/freeware apps that allow you to fiddle with the keymappings. One that comes with source code is Ctrl. Cap from Sys. Internals (now only at the waybackmachine). Windows 7 / Vista / XP / 2. Portable EXE to Remap Caps Lock key Without Rebooting (free source): http: //www. Remap- Caps- Lock- Without- Reboot. Windows NT / Windows 2. Utilities/Ctrl. 2cap. Another good general purpose remapping utility for NT/2. XP is Key. Tweak. This is a good free tool for NT/2. K/XP/2. K3 http: //www. Uses the . NET framework - RDoom. Remap_Caps. Lock_or_other_keys_without_reboot_in_Windows (all solutions require reboot?). Windows 9. 5,9. 8,ME: http: //www. Almost a year ago, I e- mailed Microsoft support and asked them how to do this in 2k. They sent me a Microsoft utility that can remap the keyboard, twiddling registry bits in the background, which seems a cleaner solution than ctrl. Unfortunately, I can't remember the name of the app, and I no longer have the e- mail. Robert. Church. Was it this one? No, that one works in Win 9. NT/2. 00. 0. Was it remapkey. I TOO used that simple util with registry bits .. I recall.. now I am searching all over, in vain. Supposedly, the Remap. Key utility is now included with the Windows 2. Resource Kit, and works with NT/2. XP. Now on MSDN, Microsoft Keyboard Layout Creator: http: //www. This program doesn't appear to allow you to assign either Caps Lock nor Control. Win. 2k/XP: The following Microsoft web page describes how to add a registry entry to remap the keyboard's scan codes. This method is simple and works well. Make a file named (for example) Caps. Lock. Is. Ctrl. reg with these three lines. HKEY_LOCAL_MACHINE\SYSTEM\Current. Control. Set\Control\Keyboard Layout]. Scancode Map"=hex: 0. Double click it from Windows explorer, reboot. That nasty Caps. Lock is gone! To put it on the Left- Ctrl key use Swap. Ctrl. And. Caps. Lock. HKEY_LOCAL_MACHINE\SYSTEM\Current. Control. Set\Control\Keyboard Layout]. Scancode Map"=hex: 0. Once you get sick of fiddling around with arcane configuration files in various operating systems (or using utilities that do the same), you can always buy a keyboard with control where caps usually is: http: //www. I bought a Happy. Hacking. Keyboard? I'm not happy with it. There's a bunch of empty space in the bottom corners which could have been used to expand the painfully- small Alt keys. I also have weird mapping problems if I boot windows, since it has a different interpretation of the Alt/Meta keys than X. I much prefer a regular keyboard with nicely shaped keys (esp. Think. Pad) and a mercilessly customized xmodmap. Luke. Gorrie. See also: Caps. Lock. Off. The cubicle police and their lackeys would forbid this and crack your knuckles for being a Compulsive. Customizer. Keep in mind, it's infuriating to use some else's keyboard when the keys labels aren't accurate. Don't remap if other people will be typing on your keyboard. This last remark is disquieting. Are you perchance suggesting that some people find caps lock actually useful. DO THEY NEVER GET A SORE THROAT OF ALL THE SHOUTING? Believe it or not, some people use their keyboards for purposes other than newsgroups and e- mail. I use Caps Lock a lot more than I use Control. I have to type things like "CORBA", "DCOM", ". NET", "MAX_INT", "#ifdef DEBUG", etc. The only time I use Control is when I have to use Emacs or when I need to kill a process in Unix. Believe it or not, that's why people switch it. Programmers use control very frequently, especially when using the Emacs. Editor. I don't think I ever use Caps Lock. If I need to type an ALLUPPERCASE word, I hold Shift with my left pinky. Q, A, and Z (or double- quote, A and colon on a Dvorak. Keyboard) are easy enough to type with the ring- finger. I think I may have picked up the habit from an editor I used to use which let you remap the keys (and I remapped it to Dvorak), but Caps Lock always affected the same keys (and so didn't work for S, W, V and Z, and had an unwanted effect on ["'< ,>.: ;]). Others use emacs exclusively, which renders CAPS_LOCK obsolete, due to the upcase- word. M- u and C- x C- u, respectively). The best keyboard ever made, hands down, is the IBM Model M Keyboard (IBM part no. However, it too suffers from the Caps Lock/Control swap design deficiency of the standard 1. Or, you could order an Omnikey Customizer board from http: //www. Model M specifications, and this particular model (sometimes referred to as "Linux 1. Control where it belongs - and as a bonus, also moves Escape to a location where it's far more accessible for touch typists. At $6. 9 it's not cheap, but that's the same price as the Happy Hacking Keyboard Lite.. HHK doesn't have the tactile response of a Model M. Heh, I'm a model M fan too. I managed to dig up one of the original IBM PC/AT 8. But get the enter key wrong..) And it just so happens the keycaps are intercangeable, and of the exact size needed to fit on a Model M! So I have a Model M with the control correctly labled and in the right place, and doesn't even have the "bite" taken out of it.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
September 2016
Categories |