Anonymous edits have been disabled on the wiki. If you want to contribute please login or create an account.

Difference between revisions of "Glossary:Remapping"

From PCGamingWiki, the wiki about fixing PC games
m (Nicereddy moved page Remapping to Glossary:Remapping without leaving a redirect)
(→‎Keyboard Remapping: put AutoHotkey method first since it doesn't change the whole system)
Line 12: Line 12:
  
 
Most available programs make use of the in-built Scancode Map as part of the Windows registry. This has the advantage of being more permanent, requiring a restart to modify but functioning on a wider variety of applications. However, this means they are unable to program settings for specific applications.
 
Most available programs make use of the in-built Scancode Map as part of the Windows registry. This has the advantage of being more permanent, requiring a restart to modify but functioning on a wider variety of applications. However, this means they are unable to program settings for specific applications.
 +
 +
=== [http://www.autohotkey.com AutoHotkey] ===
 +
AutoHotkey is an auto-scripting software for keyboards and mice, and is perhaps the most advanced remapping software, providing the ability to perform a number of other functions such as remapping mouse buttons. Because it remaps the keys itself, the program must be running for the new function to work. This perhaps makes it more useful when the user is wishing to rebind for a specific application, as it can be closed to return the keyboard to the standard layout.
 +
 +
Because AutoHotkey doesn't make use of the registry Scancode Map, changes to mapped settings do not require a system reboot. This also means it is able to have limited functionality on older versions of Windows such as 95, 98 and Me.
 +
 +
In order to remap keys using AutoHotkey, the user must create a notepad file containing the correct remapping syntax, save it as <code>FILENAMEHERE.ahk</code> and launch the file. Detailed instructions on how to remap using AutoHotkey are available on the website,<ref>http://www.autohotkey.com/docs/misc/Remap.htm</ref> however, the following are some example remaps:
 +
 +
{| class="wikitable" style="width:90%;"
 +
|-
 +
!scope="col" | Remap Syntax
 +
!scope="col" | Effect
 +
|- align="left"
 +
|Capslock::Ctrl
 +
|Makes Capslock become a Control key. To retain the ability to turn Capslock on and off, also add the remapping +Capslock::Capslock (this toggles Capslock on and off when you hold down the shift key and press Capslock).
 +
|- align="left"
 +
|XButton2::^LButton
 +
|Makes the fifth mouse button (XButton2) produce Control-LeftClick.
 +
|- align="left"
 +
|RAlt::AppsKey
 +
|Makes the right Alt key become the Apps key (which is the key that opens the context menu).
 +
|- align="left"
 +
|RCtrl::RWin
 +
|Makes the right Control key become the right Windows key.
 +
|- align="left"
 +
|Ctrl::Alt
 +
|Makes both Control keys behave like an Alt key.
 +
|- align="left"
 +
|^x::^c
 +
|Makes Control-X produce Control-C. It also makes Control-Alt-X produce Control-Alt-C, etc.
 +
|- align="left"
 +
|RWin::Return
 +
|Disables the right Windows key by having it function like the Enter key.
 +
|- align="left"
 +
|RCtrl::LCtrl
 +
|Makes the right Control key become the left Control key
 +
|-
 +
|}
  
 
=== Editing the Registry Manually ===
 
=== Editing the Registry Manually ===
Line 35: Line 73:
 
; 04. Null Terminator -- be sure to change the count at the top to reflect this number.
 
; 04. Null Terminator -- be sure to change the count at the top to reflect this number.
 
00,00,00,00</pre>
 
00,00,00,00</pre>
* Customise the above by replacing the numbers with the appropriate last two digits of the scancode for the key you wish to remap and the key you wish to remap to (you may need to use a program such as [[#AutoHotKey|AutoHotKey]] to discover this if you don't already know it). However, all the E0's are different: an E0 is present when AutoHotkey's scan code has a first digit of 1. By contrast, 00 is present when the first digit is 0 (doesn't apply in this particular example).
+
* Customise the above by replacing the numbers with the appropriate last two digits of the scancode for the key you wish to remap and the key you wish to remap to (you may need to use a program such as [[#AutoHotkey|AutoHotkey]] to discover this if you don't already know it). However, all the E0's are different: an E0 is present when AutoHotkey's scan code has a first digit of 1. By contrast, 00 is present when the first digit is 0 (doesn't apply in this particular example).
 
* Save the file as <code>Remap.reg</code>.
 
* Save the file as <code>Remap.reg</code>.
 
* Launch the file to make the appropriate changes to your registry.
 
* Launch the file to make the appropriate changes to your registry.
Line 61: Line 99:
 
==== [http://www.randyrants.com/sharpkeys/ SharpKeys] ====
 
==== [http://www.randyrants.com/sharpkeys/ SharpKeys] ====
 
SharpKeys is similar to KeyTweak in that it requires an installation and is unable to map keys to mouse buttons, however, it does not provide a graphical interace, instead supplying the user with a list of available keys to remap. It is updated relatively frequently, however, as it makes use of the registry, changes will only take effect after a full computer reboot.
 
SharpKeys is similar to KeyTweak in that it requires an installation and is unable to map keys to mouse buttons, however, it does not provide a graphical interace, instead supplying the user with a list of available keys to remap. It is updated relatively frequently, however, as it makes use of the registry, changes will only take effect after a full computer reboot.
=== [http://www.autohotkey.com/ AutoHotKey] ===
 
AutoHotKey is an auto-scripting software for keyboards and mice, and is perhaps the most advanced remapping software, providing the ability to perform a number of other functions such as remapping mouse buttons. Because it remaps the keys itself, the program must be running for the new function to work. This perhaps makes it more useful when the user is wishing to rebind for a specific application, as it can be closed to return the keyboard to the standard layout.
 
 
Because AutoHotKey doesn't make use of the registry Scancode Map, changes to mapped settings do not require a system reboot. This also means it is able to have limited functionality on older versions of Windows such as 95, 98 and Me.
 
 
In order to remap keys using AutoHotKey, the user must create a notepad file containing the correct remapping syntax, save it as <code>FILENAMEHERE.ahk</code> and launch the file. Detailed instructions on how to remap using AutoHotKey are available on the website,<ref>http://www.autohotkey.com/docs/misc/Remap.htm</ref> however, the following are some example remaps:
 
 
{| class="wikitable" style="width:90%;"
 
|-
 
!scope="col" | Remap Syntax
 
!scope="col" | Effect
 
|- align="left"
 
|Capslock::Ctrl
 
|Makes Capslock become a Control key. To retain the ability to turn Capslock on and off, also add the remapping +Capslock::Capslock (this toggles Capslock on and off when you hold down the shift key and press Capslock).
 
|- align="left"
 
|XButton2::^LButton
 
|Makes the fifth mouse button (XButton2) produce Control-LeftClick.
 
|- align="left"
 
|RAlt::AppsKey
 
|Makes the right Alt key become the Apps key (which is the key that opens the context menu).
 
|- align="left"
 
|RCtrl::RWin
 
|Makes the right Control key become the right Windows key.
 
|- align="left"
 
|Ctrl::Alt
 
|Makes both Control keys behave like an Alt key.
 
|- align="left"
 
|^x::^c
 
|Makes Control-X produce Control-C. It also makes Control-Alt-X produce Control-Alt-C, etc.
 
|- align="left"
 
|RWin::Return
 
|Disables the right Windows key by having it function like the Enter key.
 
|- align="left"
 
|RCtrl::LCtrl
 
|Makes the right Control key become the left Control key
 
|-
 
|}
 
  
 
== Mouse Remapping ==
 
== Mouse Remapping ==

Revision as of 21:04, 21 March 2014

Remapping, also known as rebinding is the practice of changing the function of or disabling a specific key on the keyboard or mouse to match that of another. This may be useful in the following scenarios:

  • A specific key or button no longer functions correctly
  • The user is accustomed to a different keyboard or mouse layout
  • Improving comfort on compact keyboards and mice
  • To speed up specific actions
  • To disable keys to prevent accidental activation

Many games allow the user to select which keys and buttons perform which functions, however, it can spoil the experience if a game doesn't allow the user to do this. There are a number of solutions for keyboards and mice to resolve this issue, however.

Keyboard Remapping

Since Windows XP, keys can be remapped by editing the registry "Scancode Map". However, this can be a daunting task for even an experienced PC user and there are a number of free tools which present the data graphically and can quickly make the necessary changes for the user.

Most available programs make use of the in-built Scancode Map as part of the Windows registry. This has the advantage of being more permanent, requiring a restart to modify but functioning on a wider variety of applications. However, this means they are unable to program settings for specific applications.

AutoHotkey

AutoHotkey is an auto-scripting software for keyboards and mice, and is perhaps the most advanced remapping software, providing the ability to perform a number of other functions such as remapping mouse buttons. Because it remaps the keys itself, the program must be running for the new function to work. This perhaps makes it more useful when the user is wishing to rebind for a specific application, as it can be closed to return the keyboard to the standard layout.

Because AutoHotkey doesn't make use of the registry Scancode Map, changes to mapped settings do not require a system reboot. This also means it is able to have limited functionality on older versions of Windows such as 95, 98 and Me.

In order to remap keys using AutoHotkey, the user must create a notepad file containing the correct remapping syntax, save it as FILENAMEHERE.ahk and launch the file. Detailed instructions on how to remap using AutoHotkey are available on the website,[1] however, the following are some example remaps:

Remap Syntax Effect
Capslock::Ctrl Makes Capslock become a Control key. To retain the ability to turn Capslock on and off, also add the remapping +Capslock::Capslock (this toggles Capslock on and off when you hold down the shift key and press Capslock).
XButton2::^LButton Makes the fifth mouse button (XButton2) produce Control-LeftClick.
RAlt::AppsKey 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.
^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 function like the Enter key.
RCtrl::LCtrl Makes the right Control key become the left Control key

Editing the Registry Manually

Requiring no external software, this is perhaps the most efficient way of remapping keys; however, it is not recommended for users who are unfamiliar with the Windows registry and its workings. The following is a basic guide on how to remap using the registry:[2]

  • Create a notepad document on the desktop.
  • Enter the following:
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,\
; ---------------------------------------------------------------------------
; BE SURE TO UPDATE THE COUNT BELOW TO REFLECT THE TOTAL NUMBER OF REMAPS + 1 (and write it as hexadecimal, not decimal)
; (1 extra for the null terminator):
; ---------------------------------------------------------------------------
04,00,00,00,\
; 01. Delete sent in place of Insert:
53,E0,52,E0,\
; 02. Home sent in place of Delete:
47,E0,53,E0,\
; 03. Insert sent in place of Home:
52,E0,47,E0,\
; 04. Null Terminator -- be sure to change the count at the top to reflect this number.
00,00,00,00
  • Customise the above by replacing the numbers with the appropriate last two digits of the scancode for the key you wish to remap and the key you wish to remap to (you may need to use a program such as AutoHotkey to discover this if you don't already know it). However, all the E0's are different: an E0 is present when AutoHotkey's scan code has a first digit of 1. By contrast, 00 is present when the first digit is 0 (doesn't apply in this particular example).
  • Save the file as Remap.reg.
  • Launch the file to make the appropriate changes to your registry.
  • Reboot the computer for the changes to take effect.

To return to the original layout, the user can clear or delete the "Scancode Map" item in the above registry location, and then reboot.

Registry Editing Utilities

The following utilities only support versions of Windows from XP onwards.

The KeyTweak user interface demonstrating a remap from Right Ctrl to Left Ctrl.

KeyTweak

One of the most popular tools in use, KeyTweak allows the relatively quick modification of keyboard key functions by displaying them graphically. To remap a key, the user must select the key whose function they wish to change on the displayed keyboard, then select the key they wish to map its function to using the drop down menu. Once this is selected, clicking "Remap Key" will begin the process of remapping, which must then be completed by restarting the system.

Keytweak can also be used to disable keys by selecting the disable key option. This may be useful to prevent accidental key pressing when the user is not accustomed to a new or compact keyboard layout. The creator has also provided a detailed user guide to provide further information on the software and how to use it. It is available here.

MapKeyboard

MapKeyboard is perhaps the fastest utility as it doesn't require installation (merely requiring the user to have Microsoft .Net Framework 2.0 installed), and is a mere 28KB in size.[3] Its user interface is one of the simplest, displaying the keys graphically like KeyTweak and allowing the user to remap or disable keys in the same way, requiring a reboot due to changes to the registry.

However, MapKeyboard also has the advantage of being able to remap keys to mouse buttons, a task which KeyTweak cannot perform.

MapKeyboard is a little 28KB free software that lets you alter any key to a different function or also disable it. The freeware does not need an install. The only requirement is that you should have Microsoft .Net Framework 2.0 installed on your machine. MapKeyboard is very easy to use. Select the key you want to remap and using the Remap selected key to drop down, select the new key. Using the application, you can also map your mouse buttons. You can also disable any key you want. Click on Save Layout and with a restart, you have your remapped keyboard. This layout is preserved until you decide to revert to the default. Also, you don’t need to launch the program to use the new layout as the changes are saved in the registry. Always remember to revert the layout to the default before removing the program.

The SharpKeys user interface demonstrating a remap from Right Ctrl to Left Ctrl.

SharpKeys

SharpKeys is similar to KeyTweak in that it requires an installation and is unable to map keys to mouse buttons, however, it does not provide a graphical interace, instead supplying the user with a list of available keys to remap. It is updated relatively frequently, however, as it makes use of the registry, changes will only take effect after a full computer reboot.

Mouse Remapping

Many proprietary mice, including those manufactured by Microsoft and Logitech ship with software which allows the user to rebind the buttons to serve specific functions. However, for those users who do not have access to such software, there are alternatives.

Rebinding mouse buttons using the Microsoft Mouse application.

Microsoft IntelliPoint

For users with Microsoft manufactured plug-in mice, there is the Microsoft IntelliPoint which is included with the mouse purchase on a disc. Once installed, searching "Microsoft Mouse" in the search bar grants access to the application which can quickly rebind mouse buttons to functions other than the standard set. IntelliPoint is also able to program application specific bindings, which is useful when playing games.

Logitech SetPoint and Logitech Gaming Software

Logitech provides software for use with its proprietary mice; Logitech Gaming Software for G-series mice, and Logitech SetPoint for all other models. The SetPoint options for rebinding buttons are more limited than IntelliPoint.

X-Mouse Button Control

For those users who do not possess a Logitech or Microsoft mouse, X-Mouse Button Control is a useful tool to use to rebind mouse buttons. Like IntelliPoint, it offers the ability to introduce window or application specific mouse bindings, as well as advanced settings such as the ability to map buttons to Copy/Paste functionalities.


References