Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Simple guide to remap / rebind keyboard keys with scancodes in regedit

NotificationsYou must be signed in to change notification settings

Lamer87/Keyboard_ScanCodes_for_remapping

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 

Repository files navigation

This is a simple guide for remapping (rebinding) keyboard keys

whitout using a tool, just the system registry (in hexadecimal).

v1.5 - For ISO, ANSI, ABNT and JIS layouts.

  • 💾 You can download the package (readme, example and remover)here 💾
    (or just click on "Code" then "Download ZIP").

    • The EXAMPLE file (Rebind.reg) it's meant to be edited by you.
      This file is ALREADY modified and will add the necessary "hex" value to the registry,
      so before applying it you have to EDIT IT properly.

    • If you want to get rid of the remapping, use the file "remover.reg",
      it can be even used to create just the empty hex value.

    • Every time you apply the values, you must AT LEAST logout and login (or restart), for the changes to take effect.


  • 📜 How to manually create the value in the registry:

    • 1- Open "C:\Windows\regedit.exe"
    • 2- Go to "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout" (not \Keyboard LayoutS)
    • 3- Create a new "binary value" here, named "Scancode Map" (without quotes).
  • ✔️ What goes inside the binary value is described below in the regedit file format,so you don't have to manually enter values via regedit.exe, but just edit Rebind.reg with notepad, then exec it.


⚠️ Example:

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,3A,00,5D,E0,00,00,00,00

What means an entire regedit code:

00,00,00,00,00,00,00,00,02,00,00,00,3A,00,5D,E0,00,00,00,00
1st 8 bits2nd 8 bits3rd 8 bits4th 8 bits5th 8 bits
VersionFlagNumber of rebinds +1!Rebind n1Final bits (null)

Each PAIR of zeroes is separated by a comma (,) except for the last pair which ends without.

Version: always 8 zeroes.

Flag: always 8 zeroes.

Rebind n1:
3A,00, = 1st part: it's the keycode of the remapping.
5D,E0, = 2nd part: keycode of the button you actually press.

Number of rebinds:
only the first 2 bits count as a number (examples: 02 if 2, 05 if 5, 13 if 13),
the value must be made up of the number of rebinds (that are 8 bits for each one),
plus one for the final 8 bits.
For example, if we want to rebind 4 keys, the value number of rebinds will be 05,00,00,00,
if the rebinds are 12 the value will be 13,00,00,00,

Final bits: always 8 zeroes.

What means a single scancode like "5D,EO":

5D: this first couple it's the scancode of the key.
E0: this second couple can be 00 or E0; some keys have the same first couple, changing only this.

📜 This is just an explanation of a reg with 3 rebinds (do not use in a reg file!):

hex:00,00,00,00,00,00,00,00,04,00,00,00,3A,00,5D,E0,3E,00,46,00,3F,00,45,E0,00,00,00,00   |  version  |   flag    |reb. number| 1st rebind| 2nd rebind| 3rd rebind| null bits |                                       | these 4 lines count for the number of rebinds |

📜 Same as above with a vertical view (do not use in a reg file!)

hex:00,00,00,00,  =  version00,00,00,00,  =  flag04,00,00,00,  =  number of rebinds +13A,00,5D,E0,  =  rebind n1   --\3E,00,46,00,  =  rebind n2      \ these 4 lines count towards the3F,00,45,E0,  =  rebind n3      / total number of rebinds (even final bits)00,00,00,00   =  final bits  --/


📌 Key ScanCode table:

the secondary code is always "00" when there are only 2 digits in "Code",

otherwise it's specified !

CodeKey (+ shift)ITA layout (ISO)Other
1st Row:———————————————————————————
01Esc
3BF1
3CF2
3DF3
3EF4
3FF5
40F6
41F7
42F8
43F9
44F10
57F11
58F12
2nd Row:———————————————————————————
29` ~\ |
021 !
032 @"
043 #£
054 $
065 %
076 ^&
087 &/
098 *(
0A9 ()
0B0 )=
0C- _' ?
0D= +ì ^
7D\ | (JIS note²)
0EBackspace
3rd Row:———————————————————————————
0FTab
10Q
11W
12E
13R
14T
15Y
16U
17I
18O
19P
1A[ {è é [
1B] }+ * ]
2B\ | (ANSI)4th row "ù §" (ISO)
1CEnter (ISO)Invio
4th Row:———————————————————————————
3ACapsLockBloc Maiusc
1EA
1FS
20D
21F
22G
23H
24J
25K
26L
27; :ò ç @
28' "à ° #
2B3th row "\ |" (ANSI)ù § (ISO)
1CEnter (All layouts)Invio
5th Row:———————————————————————————
2ALeftShiftMaiusc sx
56\ | (ISO)< >
2CZ
2DX
2EC
2FV
30B
31N
32M
33, ;
34. :
35/ ?- _
73/ _ (ABNT; JIS note²)
36RightShiftMaiusc dx
6th Row:———————————————————————————
1DLeftCtrl
5B-E0LeftWin
38LeftAlt
7Bjap (JIS note²)
39Space
79jap (JIS note²)
70jap (JIS note²)
38-E0RightAlt
5C-E0RightWin
5D-E0Menu
1D-E0RightCtrl
Middle:———————————————————————————
37-E0PrintScreenStamp
46ScrollLockBloc scorr
45-E1-1DPause[see note¹❗]Pausa[vedi note¹❗]
52-E0Insert
53-E0DeleteCanc
47-E0HomeInizio
4F-E0EndFine
49-E0PageUp
51-E0PageDown
48-E0Up
50-E0Down
4B-E0Left
4D-E0Right
KeyPad:———————————————————————————
45NumLock
35-E0/
37*
4A-
4E+
7E. (ABNT)
1C-E0Enter
53. / Del
520 / Ins
4F1 / End
502 / Down
513 / PgDn
4B4 / Left
4C5
4D6 / Right
477 / Home
488 / Up
499 / PgUp

CLICK HERE to show other keys that need to be tested. They may not work properly, especially in games.

CodeFunction
64F13 / PrintScreen
65F14 / ScrollLock
66F15 / Pause
67F16
68F17
69F18
6AF19
6BF20
6CF21
6DF22
6EF23
6FF24
5E-E0Power
5F-E0Sleep
63-E0Wake
21-E0Calculator
6C-E0Mail
6D-E0Media Select
11-E0Messenger
6B-E0My Computer
22-E0Play/Pause
24-E0Stop
19-E0Next track
10-E0Prev track
30-E0Volume up
2E-E0Volume down
20-E0Mute

  • Note 1: "Pause" button can't be used/remapped because it's a multiple bits hex (need a tool like AutoHotKey).
  • Note 2: other keys (like JIS) may not work if you haven't set the correct language (japanase) to Windows.


📌 Graph of a complete layout (all together)

Secondary code: only 2 digits = "00", instead "E0" is specified.
Orange = layout variations.

Source:kbdlayout.info


🕹️ Tools

  • ⌨️SHOW SCANCODES: a good tool to show scancodes of your keyboard isKeyboard Key Info,
    it shows what keycode are you pressing on the keyboard (1st part only).
    Example: "ScanCode=0x4F" where the keycode 1st part is "4F" but you don't know if the second part is 00 or E0,
    so just take a look at the table when needed.

  • ⌨️EASY REMAPPING: another good tool isSharpKeys tool,
    uses thesame method as this guide (regedit hex) but with a graphical interface.
    Remember! do NOT use the "Pause" button: the tool recognizes it but then it doesn't work either way
    (when "Pause" is used to press another key, or when another key is used to press "Pause").


💡 If you want to contribute, you can report any error inIssues or new keys inDiscussions.

Changelog (click to show):

  • v1.0 first guide/list.
  • v1.1 added JIS layout key codes.
  • v1.2 added other functions key codes.
  • v1.3 Corrected button "Pause"; can't be used or remapped without a tool like AutoHotKey.
  • v1.4 added other functions key codes.
  • v1.5 added ABNT layout key codes.


About

Simple guide to remap / rebind keyboard keys with scancodes in regedit

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp