Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Minecraft:Key codes: Difference between revisions

From SAS Gaming Wiki
SyncBot (talk | contribs)
Sync: updated from Minecraft
SyncBot (talk | contribs)
Sync: updated from Minecraft
 
(29 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{for|other uses|Key}}
{{for|other uses|Key}}
{{missing information|Bedrock Edition keycodes for both keyboard and controller}}
This is a list of '''key codes''' used by ''[[Minecraft:Minecraft]]'', which are used in the [[Minecraft:options.txt]] file.
This is a list of '''key codes''' used by ''[[Minecraft:Minecraft]]'', which are used in configuration files such as the options.txt file in the [[Minecraft:.minecraft|Minecraft directory]].{{info needed|and where else? if that's the only place, remove "such as"}}


== ''Java Edition'' ==
== ''Java Edition'' ==
{{For|the codes used prior to [[Minecraft:the Flattening]]|Java Edition pre-flattening data values#Key codes}}
{{For|the codes used prior to [[Minecraft:the Flattening]]|Java Edition pre-flattening data values#Key codes}}
Only keys which can be directly detected by the operating system are able to be bound to game controls - keys such as F Lock<ref>{{bug|MC-265854}}</ref> or Fn typically are not recognizable themselves as keys, and Minecraft and all other computer programs will be oblivious to them in isolation.
Only mouse buttons can have controls be bound to them in the options menu. Mouse movement, vertical scrolling and horizontal scrolling are hardcoded, and their default actions cannot be assigned to other keys or buttons, nor can scrolling or moving the mouse be made to do anything else.
''Java Edition'' does not provide official support for controllers.


=== Keyboard codes ===
=== Keyboard codes ===
{{for|keys which controls can be bound to, but do not display a proper name|Java Edition untranslated keys}}
Keyboard buttons are handled as a signed 32-bit integer, meaning that through editing options.txt, values from {{code|key.keyboard.-2147483648}} to {{code|key.keyboard.2147483647}} can be specified without being rejected by the game as invalid. Any keys corresponding to a valid [[Minecraft:SDL3 scancodes|SDL key code]] will be automatically converted to one of the named keys below.
{| class="wikitable" width="80%" style="margin-left: auto; margin-right: auto; border: none;" data-description="Key codes"
 
! width="33%" | Value !! width="33%" | In-game name !! width="34%" | Description
The displayed names of several keys will change depending on the currently active system keyboard layout. The values displayed in this table assume a standard en-US QWERTY layout. Some keys also have operating system dependent names, which are assigned different rows sharing an ID.
 
If SDL does not define a specific key as a valid input, it will be set to "Not Bound" if attempting to bind a control to it.{{until|java 26.4}}
 
If a key is pressed that SDL does not assign a key code to, the game will act as though no key is pressed.{{upcoming|java 26.4}} This is a bug which Mojang have decided not to fix.<ref>{{bug|MC-312500}}</ref>
 
{| class="wikitable sortable" data-description="Keyboard key and multimedia button IDs" style="margin-left:auto; margin-right:auto; text-align: center"
! ID
! Displayed name
! colspan="2" | Physical key or button
! Translation key{{note|name=internal-name|If the internal name of the key code from SDL is a single character, Minecraft will display that character regardless of whether there exists a translation key.}}
|-
! {{code|key.keyboard.unknown}}
| {{btn|Not Bound}}
| colspan="2" | Unassigned, or unrecognized<ref>{{bug|MC-310108}}</ref>{{until|java 26.4}}
| {{code|key.keyboard.unknown}}
|-
! {{code|key.keyboard.0}}
| {{btn|0}}
| colspan="2" | {{key|0}}
| {{note|name=single-character|No translation key exists and the internal name from SDL is displayed instead.}}
|-
! {{code|key.keyboard.1}}
| {{btn|1}}
| colspan="2" | {{key|1}}
| {{note|name=single-character}}
|-
! {{code|key.keyboard.2}}
| {{btn|2}}
| colspan="2" | {{key|2}}
| {{note|name=single-character}}
|-
! {{code|key.keyboard.3}}
| {{btn|3}}
| colspan="2" | {{key|3}}
| {{note|name=single-character}}
|-
! {{code|key.keyboard.4}}
| {{btn|4}}
| colspan="2" | {{key|4}}
| {{note|name=single-character}}
|-
! {{code|key.keyboard.5}}
| {{btn|5}}
| colspan="2" | {{key|5}}
| {{note|name=single-character}}
|-
! {{code|key.keyboard.6}}
| {{btn|6}}
| colspan="2" | {{key|6}}
| {{note|name=single-character}}
|-
! {{code|key.keyboard.7}}
| {{btn|7}}
| colspan="2" | {{key|7}}
| {{note|name=single-character}}
|-
! {{code|key.keyboard.8}}
| {{btn|8}}
| colspan="2" | {{key|8}}
| {{note|name=single-character}}
|-
! {{code|key.keyboard.9}}
| {{btn|9}}
| colspan="2" | {{key|9}}
| {{note|name=single-character}}
|-
! {{code|key.keyboard.a}}
| {{btn|A}}
| colspan="2" | {{key|A}}
| {{note|name=single-character}}
|-
! {{code|key.keyboard.b}}
| {{btn|B}}
| colspan="2" | {{key|B}}
| {{note|name=single-character}}
|-
! {{code|key.keyboard.c}}
| {{btn|C}}
| colspan="2" | {{key|C}}
| {{note|name=single-character}}
|-
! {{code|key.keyboard.d}}
| {{btn|D}}
| colspan="2" | {{key|D}}
| {{note|name=single-character}}
|-
! {{code|key.keyboard.e}}
| {{btn|E}}
| colspan="2" | {{key|E}}
| {{note|name=single-character}}
|-
! {{code|key.keyboard.f}}
| {{btn|F}}
| colspan="2" | {{key|F}}
| {{note|name=single-character}}
|-
! {{code|key.keyboard.g}}
| {{btn|G}}
| colspan="2" | {{key|G}}
| {{note|name=single-character}}
|-
! {{code|key.keyboard.h}}
| {{btn|H}}
| colspan="2" | {{key|H}}
| {{note|name=single-character}}
|-
! {{code|key.keyboard.i}}
| {{btn|I}}
| colspan="2" | {{key|I}}
| {{note|name=single-character}}
|-
! {{code|key.keyboard.j}}
| {{btn|J}}
| colspan="2" | {{key|J}}
| {{note|name=single-character}}
|-
! {{code|key.keyboard.k}}
| {{btn|K}}
| colspan="2" | {{key|K}}
| {{note|name=single-character}}
|-
! {{code|key.keyboard.l}}
| {{btn|L}}
| colspan="2" | {{key|L}}
| {{note|name=single-character}}
|-
! {{code|key.keyboard.m}}
| {{btn|M}}
| colspan="2" | {{key|M}}
| {{note|name=single-character}}
|-
! {{code|key.keyboard.n}}
| {{btn|N}}
| colspan="2" | {{key|N}}
| {{note|name=single-character}}
|-
! {{code|key.keyboard.o}}
| {{btn|O}}
| colspan="2" | {{key|O}}
| {{note|name=single-character}}
|-
! {{code|key.keyboard.p}}
| {{btn|P}}
| colspan="2" | {{key|P}}
| {{note|name=single-character}}
|-
! {{code|key.keyboard.q}}
| {{btn|Q}}
| colspan="2" | {{key|Q}}
| {{note|name=single-character}}
|-
! {{code|key.keyboard.r}}
| {{btn|R}}
| colspan="2" | {{key|R}}
| {{note|name=single-character}}
|-
! {{code|key.keyboard.s}}
| {{btn|S}}
| colspan="2" | {{key|S}}
| {{note|name=single-character}}
|-
! {{code|key.keyboard.t}}
| {{btn|T}}
| colspan="2" | {{key|T}}
| {{note|name=single-character}}
|-
! {{code|key.keyboard.u}}
| {{btn|U}}
| colspan="2" | {{key|U}}
| {{note|name=single-character}}
|-
! {{code|key.keyboard.v}}
| {{btn|V}}
| colspan="2" | {{key|V}}
| {{note|name=single-character}}
|-
! {{code|key.keyboard.w}}
| {{btn|W}}
| colspan="2" | {{key|W}}
| {{note|name=single-character}}
|-
! {{code|key.keyboard.x}}
| {{btn|X}}
| colspan="2" | {{key|X}}
| {{note|name=single-character}}
|-
! {{code|key.keyboard.y}}
| {{btn|Y}}
| colspan="2" | {{key|Y}}
| {{note|name=single-character}}
|-
! {{code|key.keyboard.z}}
| {{btn|Z}}
| colspan="2" | {{key|Z}}
| {{note|name=single-character}}
|-
! {{code|key.keyboard.space}}
| {{btn|Space}}
| colspan="2" | {{key|Space}}
| {{code|key.keyboard.space}}
|-
! {{code|key.keyboard.tab}}
| {{btn|Tab}}
| colspan="2" | {{key|Tab}}
| {{code|key.keyboard.tab}}
|-
! {{code|key.keyboard.apostrophe}}
| {{btn|'}}
| colspan="2" | {{key|'}}
| {{code|key.keyboard.apostrophe}}{{note|name=unused-translation|This translation key is typically unused, but may be used with certain keyboard layouts or operating systems.}}
|-
! {{code|key.keyboard.backslash}}
| {{btn|\}}
| colspan="2" | {{key|\}} (ANSI)
| {{code|key.keyboard.backslash}}{{note|name=unused-translation}}
|-
! {{code|key.keyboard.comma}}
| {{btn|,}}
| colspan="2" | {{key|,}}
| {{code|key.keyboard.comma}}{{note|name=unused-translation}}
|-
! {{code|key.keyboard.equal}}
| {{btn|{{=}}}}
| colspan="2" | {{key|{{=}}}}
| {{code|key.keyboard.equal}}{{note|name=unused-translation}}
|-
! {{code|key.keyboard.grave.accent}}
| {{btn|`}}
| colspan="2" | {{key|`}}
| {{code|key.keyboard.grave.accent}}{{note|name=unused-translation}}
|-
|-
|key.keyboard.unknown || Not bound || Key is not bound
! {{code|key.keyboard.left.bracket}}
| {{btn|[}}
| colspan="2" | {{key|[}}
| {{code|key.keyboard.left.bracket}}{{note|name=unused-translation}}
|-
|-
|key.keyboard.0 || colspan="2" | 0
! {{code|key.keyboard.minus}}
| {{btn|-}}
| colspan="2" | {{key|-}}
| {{code|key.keyboard.minus}}{{note|name=unused-translation}}
|-
|-
|key.keyboard.1 || colspan="2" | 1
! {{code|key.keyboard.period}}
| {{btn|.}}
| colspan="2" | {{key|.}}
| {{code|key.keyboard.period}}{{note|name=unused-translation}}
|-
|-
|key.keyboard.2 || colspan="2" | 2
! {{code|key.keyboard.right.bracket}}
| {{btn|]}}
| colspan="2" | {{key|]}}
| {{code|key.keyboard.right.bracket}}{{note|name=unused-translation}}
|-
|-
|key.keyboard.3 || colspan="2" | 3
! {{code|key.keyboard.semicolon}}
| {{btn|<nowiki>;</nowiki>}}
| colspan="2" | {{key|;}}
| {{code|key.keyboard.semicolon}}{{note|name=unused-translation}}
|-
|-
|key.keyboard.4 || colspan="2" | 4
! {{code|key.keyboard.slash}}
| {{btn|/}}
| colspan="2" | {{key|/}}
| {{code|key.keyboard.slash}}{{note|name=unused-translation}}
|-
|-
|key.keyboard.5 || colspan="2" | 5
! {{code|key.keyboard.world.1}}
| {{btn|\}}
| colspan="2" | {{key|\}} (ISO)
| {{code|key.keyboard.world.1}}{{note|name=world-key-translation|This translation key could be used with certain keyboard layouts or operating systems.}}
|-
|-
|key.keyboard.6 || colspan="2" | 6
! {{code|key.keyboard.f1}}
| {{btn|F1}}
| colspan="2" | {{key|F1}}
| {{code|key.keyboard.f1}}
|-
|-
|key.keyboard.7 || colspan="2" | 7
! {{code|key.keyboard.f2}}
| {{btn|F2}}
| colspan="2" | {{key|F2}}
| {{code|key.keyboard.f2}}
|-
|-
|key.keyboard.8 || colspan="2" | 8
! {{code|key.keyboard.f3}}
| {{btn|F3}}
| colspan="2" | {{key|F3}}
| {{code|key.keyboard.f3}}
|-
|-
|key.keyboard.9 || colspan="2" | 9
! {{code|key.keyboard.f4}}
| {{btn|F4}}
| colspan="2" | {{key|F4}}
| {{code|key.keyboard.f4}}
|-
|-
|key.keyboard.a || colspan="2" | A
! {{code|key.keyboard.f5}}
| {{btn|F5}}
| colspan="2" | {{key|F5}}
| {{code|key.keyboard.f5}}
|-
|-
|key.keyboard.b || colspan="2" | B
! {{code|key.keyboard.f6}}
| {{btn|F6}}
| colspan="2" | {{key|F6}}
| {{code|key.keyboard.f6}}
|-
|-
|key.keyboard.c || colspan="2" | C
! {{code|key.keyboard.f7}}
| {{btn|F7}}
| colspan="2" | {{key|F7}}
| {{code|key.keyboard.f7}}
|-
|-
|key.keyboard.d || colspan="2" | D
! {{code|key.keyboard.f8}}
| {{btn|F8}}
| colspan="2" | {{key|F8}}
| {{code|key.keyboard.f8}}
|-
|-
|key.keyboard.e || colspan="2" | E
! {{code|key.keyboard.f9}}
| {{btn|F9}}
| colspan="2" | {{key|F9}}
| {{code|key.keyboard.f9}}
|-
|-
|key.keyboard.f || colspan="2" | F
! {{code|key.keyboard.f10}}
| {{btn|F10}}
| colspan="2" | {{key|F10}}
| {{code|key.keyboard.f10}}
|-
|-
|key.keyboard.g || colspan="2" | G
! {{code|key.keyboard.f11}}
| {{btn|F11}}
| colspan="2" | {{key|F11}}
| {{code|key.keyboard.f11}}
|-
|-
|key.keyboard.h || colspan="2" | H
! {{code|key.keyboard.f12}}
| {{btn|F12}}
| colspan="2" | {{key|F12}}
| {{code|key.keyboard.f12}}
|-
|-
|key.keyboard.i || colspan="2" | I
! {{code|key.keyboard.f13}}
| {{btn|F13}}
| colspan="2" | {{key|F13}}{{note|The "Settings" key also maps to this on Linux, for some reason: {{bug|MC-310119}}}}
| {{code|key.keyboard.f13}}
|-
|-
|key.keyboard.j || colspan="2" | J
! {{code|key.keyboard.f14}}
| {{btn|F14}}
| colspan="2" | {{key|F14}}
| {{code|key.keyboard.f14}}
|-
|-
|key.keyboard.k || colspan="2" | K
! {{code|key.keyboard.f15}}
| {{btn|F15}}
| colspan="2" | {{key|F15}}
| {{code|key.keyboard.f15}}
|-
|-
|key.keyboard.l || colspan="2" | L
! {{code|key.keyboard.f16}}
| {{btn|F16}}
| colspan="2" | {{key|F16}}
| {{code|key.keyboard.f16}}
|-
|-
|key.keyboard.m || colspan="2" | M
! {{code|key.keyboard.f17}}
| {{btn|F17}}
| colspan="2" | {{key|F17}}
| {{code|key.keyboard.f17}}
|-
|-
|key.keyboard.n || colspan="2" | N
! {{code|key.keyboard.f18}}
| {{btn|F18}}
| colspan="2" | {{key|F18}}
| {{code|key.keyboard.f18}}
|-
|-
|key.keyboard.o || colspan="2" | O
! {{code|key.keyboard.f19}}
| {{btn|F19}}
| colspan="2" | {{key|F19}}
| {{code|key.keyboard.f19}}
|-
|-
|key.keyboard.p || colspan="2" | P
! {{code|key.keyboard.f20}}
| {{btn|F20}}
| colspan="2" | {{key|F20}}
| {{code|key.keyboard.f20}}
|-
|-
|key.keyboard.q || colspan="2" | Q
! {{code|key.keyboard.f21}}
| {{btn|F21}}
| colspan="2" | {{key|F21}}
| {{code|key.keyboard.f21}}
|-
|-
|key.keyboard.r || colspan="2" | R
! {{code|key.keyboard.f22}}
| {{btn|F22}}
| colspan="2" | {{key|F22}}
| {{code|key.keyboard.f22}}
|-
|-
|key.keyboard.s || colspan="2" | S
! {{code|key.keyboard.f23}}
| {{btn|F23}}
| colspan="2" | {{key|F23}}
| {{code|key.keyboard.f23}}
|-
|-
|key.keyboard.t || colspan="2" | T
! {{code|key.keyboard.f24}}
| {{btn|F24}}
| colspan="2" | {{key|F24}}
| {{code|key.keyboard.f24}}
|-
|-
|key.keyboard.u || colspan="2" | U
! {{code|key.keyboard.keypad.0}}
| {{btn|Keypad 0}}
| colspan="2" | {{key|Numpad 0}}
| {{code|key.keyboard.keypad.0}}
|-
|-
|key.keyboard.v || colspan="2" | V
! {{code|key.keyboard.keypad.1}}
| {{btn|Keypad 1}}
| colspan="2" | {{key|Numpad 1}}
| {{code|key.keyboard.keypad.1}}
|-
|-
|key.keyboard.w || colspan="2" | W
! {{code|key.keyboard.keypad.2}}
| {{btn|Keypad 2}}
| colspan="2" | {{key|Numpad 2}}
| {{code|key.keyboard.keypad.2}}
|-
|-
|key.keyboard.x || colspan="2" | X
! {{code|key.keyboard.keypad.3}}
| {{btn|Keypad 3}}
| colspan="2" | {{key|Numpad 3}}
| {{code|key.keyboard.keypad.3}}
|-
|-
|key.keyboard.y || colspan="2" | Y
! {{code|key.keyboard.keypad.4}}
| {{btn|Keypad 4}}
| colspan="2" | {{key|Numpad 4}}
| {{code|key.keyboard.keypad.4}}
|-
|-
|key.keyboard.z || colspan="2" | Z
! {{code|key.keyboard.keypad.5}}
| {{btn|Keypad 5}}
| colspan="2" | {{key|Numpad 5}}
| {{code|key.keyboard.keypad.5}}
|-
|-
|key.keyboard.f1 || colspan="2" | F1
! {{code|key.keyboard.keypad.6}}
| {{btn|Keypad 6}}
| colspan="2" | {{key|Numpad 6}}
| {{code|key.keyboard.keypad.6}}
|-
|-
|key.keyboard.f2 || colspan="2" | F2
! {{code|key.keyboard.keypad.7}}
| {{btn|Keypad 7}}
| colspan="2" | {{key|Numpad 7}}
| {{code|key.keyboard.keypad.7}}
|-
|-
|key.keyboard.f3 || colspan="2" | F3
! {{code|key.keyboard.keypad.8}}
| {{btn|Keypad 8}}
| colspan="2" | {{key|Numpad 8}}
| {{code|key.keyboard.keypad.8}}
|-
|-
|key.keyboard.f4 || colspan="2" | F4
! {{code|key.keyboard.keypad.9}}
| {{btn|Keypad 9}}
| colspan="2" | {{key|Numpad 9}}
| {{code|key.keyboard.keypad.9}}
|-
|-
|key.keyboard.f5 || colspan="2" | F5
! {{code|key.keyboard.keypad.add}}
| {{btn|Keypad +}}
| colspan="2" | {{key|Numpad <nowiki>+</nowiki>}}
| {{code|key.keyboard.keypad.add}}
|-
|-
|key.keyboard.f6 || colspan="2" | F6
! {{code|key.keyboard.keypad.subtract}}
| {{btn|Keypad -}}
| colspan="2" | {{key|Numpad -}}
| {{code|key.keyboard.keypad.subtract}}
|-
|-
|key.keyboard.f7 || colspan="2" | F7
! {{code|key.keyboard.keypad.multiply}}
| {{btn|Keypad *}}
| colspan="2" | {{key|Numpad *}}
| {{code|key.keyboard.keypad.multiply}}
|-
|-
|key.keyboard.f8 || colspan="2" | F8
! {{code|key.keyboard.keypad.divide}}
| {{btn|Keypad /}}
| colspan="2" | {{key|Numpad /}}
| {{code|key.keyboard.keypad.divide}}
|-
|-
|key.keyboard.f9 || colspan="2" | F9
! {{code|key.keyboard.keypad.equal}}
| {{btn|Keypad {{=}}}}
| colspan="2" | {{key|Numpad {{=}}}}
| {{code|key.keyboard.keypad.equal}}
|-
|-
|key.keyboard.f10 || colspan="2" | F10
! {{code|key.keyboard.keypad.plus.minus}}
| {{btn|Keypad ±}}{{verify}}
| colspan="2" | {{key|Numpad ±}}
| {{code|key.keyboard.keypad.plus.minus}}
|-
|-
|key.keyboard.f11 || colspan="2" | F11
! {{code|key.keyboard.keypad.left.parenthesis}}
| {{btn|Keypad (}}{{verify}}
| colspan="2" | {{key|Numpad (}}
| {{code|key.keyboard.keypad.left.parenthesis}}
|-
|-
|key.keyboard.f12 || colspan="2" | F12
! {{code|key.keyboard.keypad.right.parenthesis}}
| {{btn|Keypad )}}{{verify}}
| colspan="2" | {{key|Numpad )}}
| {{code|key.keyboard.keypad.right.parenthesis}}
|-
|-
|key.keyboard.f13 || colspan="2" | F13
! {{code|key.keyboard.keypad.period}}
| {{btn|Keypad .}}
| colspan="2" | {{key|Numpad .}}
| {{code|key.keyboard.keypad.period}}
|-
|-
|key.keyboard.f14 || colspan="2" | F14
! {{code|key.keyboard.keypad.comma}}
| {{btn|Keypad ,}}
| colspan="2" | {{key|Numpad ,}}{{note|name=XFree86-disparity}}
| {{code|key.keyboard.keypad.comma}}
|-
|-
|key.keyboard.f15 || colspan="2" | F15
! {{code|key.keyboard.keypad.enter}}
| {{btn|Keypad Enter}}
| colspan="2" | {{key|Numpad Enter}}
| {{code|key.keyboard.keypad.enter}}
|-
|-
|key.keyboard.f16 || colspan="2" | F16
! {{code|key.keyboard.menu}}
| {{btn|Menu}}
| colspan="2" | {{key|Compose}}{{verify|windows?}}
| {{code|key.keyboard.menu}}
|-
|-
|key.keyboard.f17 || colspan="2" | F17
! {{code|key.keyboard.application}}
| {{btn|Application}}
| colspan="2" | {{key|Menu}}
| {{code|key.keyboard.application}}
|-
|-
|key.keyboard.f18 || colspan="2" | F18
! {{code|key.keyboard.num.lock}}
| {{btn|Num Lock}}
| colspan="2" | {{key|Num Lock}}
| {{code|key.keyboard.num.lock}}
|-
|-
|key.keyboard.f19 || colspan="2" | F19
! {{code|key.keyboard.caps.lock}}
| {{btn|Caps Lock}}
| colspan="2" | {{key|Caps Lock}}
| {{code|key.keyboard.caps.lock}}
|-
|-
|key.keyboard.f20 || colspan="2" | F20
! {{code|key.keyboard.scroll.lock}}
| {{btn|Scroll Lock}}
| colspan="2" | {{key|Scroll Lock}}
| {{code|key.keyboard.scroll.lock}}
|-
|-
|key.keyboard.f21 || colspan="2" | F21
! {{code|key.keyboard.delete}}
| {{btn|Delete}}
| colspan="2" | {{key|Delete}}
| {{code|key.keyboard.delete}}
|-
|-
|key.keyboard.f22 || colspan="2" | F22
! {{code|key.keyboard.insert}}
| {{btn|Insert}}
| colspan="2" | {{key|Insert}}
| {{code|key.keyboard.insert}}
|-
|-
|key.keyboard.f23 || colspan="2" | F23
! {{code|key.keyboard.home}}
| {{btn|Home}}
| colspan="2" | {{key|Home}}
| {{code|key.keyboard.home}}
|-
|-
|key.keyboard.f24 || colspan="2" | F24
! {{code|key.keyboard.end}}
| {{btn|End}}
| colspan="2" | {{key|End}}
| {{code|key.keyboard.end}}
|-
|-
|key.keyboard.f25{{until|je 26.3}} || colspan="2" | F25
! {{code|key.keyboard.print.screen}}
| {{btn|Print Screen}}
| colspan="2" | {{key|Print Screen}}
| {{code|key.keyboard.print.screen}}
|-
|-
|key.keyboard.num.lock || colspan="2" | Num Lock
! {{code|key.keyboard.sys.req}}
| {{btn|SysRq}}{{note|Mojang have chosen to keep this name, despite it being abbreviated in direct contrast to almost all other keys: {{bug|MC-311713}}}}
| colspan="2" | {{key|System Request}}{{note|Linux only - only works on some systems right now, see https://github.com/libsdl-org/SDL/pull/16252}}
| {{code|key.keyboard.sys.req}}
|-
|-
|key.keyboard.keypad.0 || colspan="2" | Keypad 0
! {{code|key.keyboard.pause}}
| {{btn|Pause}}
| colspan="2" | {{key|Pause}}
| {{code|key.keyboard.pause}}
|-
|-
|key.keyboard.keypad.1 || colspan="2" | Keypad 1
! {{code|key.keyboard.page.up}}
| {{btn|Page Up}}
| colspan="2" | {{key|Page Up}}
| {{code|key.keyboard.page.up}}
|-
|-
|key.keyboard.keypad.2 || colspan="2" | Keypad 2
! {{code|key.keyboard.page.down}}
| {{btn|Page Down}}
| colspan="2" | {{key|Page Down}}
| {{code|key.keyboard.page.down}}
|-
|-
|key.keyboard.keypad.3 || colspan="2" | Keypad 3
! {{code|key.keyboard.up}}
| {{btn|Up Arrow}}
| colspan="2" | {{key|Up}}
| {{code|key.keyboard.up}}
|-
|-
|key.keyboard.keypad.4 || colspan="2" | Keypad 4
! {{code|key.keyboard.left}}
| {{btn|Left Arrow}}
| colspan="2" | {{key|Left}}
| {{code|key.keyboard.left}}
|-
|-
|key.keyboard.keypad.5 || colspan="2" | Keypad 5
! {{code|key.keyboard.right}}
| {{btn|Right Arrow}}
| colspan="2" | {{key|Right}}
| {{code|key.keyboard.right}}
|-
|-
|key.keyboard.keypad.6 || colspan="2" | Keypad 6
! {{code|key.keyboard.down}}
| {{btn|Down Arrow}}
| colspan="2" | {{key|Down}}
| {{code|key.keyboard.down}}
|-
|-
|key.keyboard.keypad.7 || colspan="2" | Keypad 7
! {{code|key.keyboard.escape}}
| {{btn|Escape}}
| colspan="2" | Cannot be assigned{{note|Trying to bind anything to the Escape key causes it to become Not Bound instead. This can only be set by modifying options.txt.}}
| {{code|key.keyboard.escape}}
|-
|-
|key.keyboard.keypad.8 || colspan="2" | Keypad 8
! {{code|key.keyboard.enter}}
| {{btn|Enter}}
| colspan="2" | {{key|Return}}
| {{code|key.keyboard.enter}}
|-
|-
|key.keyboard.keypad.9 || colspan="2" | Keypad 9
! {{code|key.keyboard.backspace}}
| {{btn|Backspace}}
| colspan="2" | {{key|Backspace}}
| {{code|key.keyboard.backspace}}
|-
|-
|key.keyboard.keypad.add || colspan="2" | Keypad +
! {{code|key.keyboard.left.shift}}
| {{btn|Left Shift}}
| colspan="2" | {{key|Left Shift}}
| {{code|key.keyboard.left.shift}}
|-
|-
|key.keyboard.keypad.period{{upcoming|je 26.3}} || colspan="2" | Keypad .
! {{code|key.keyboard.right.shift}}
| {{btn|Right Shift}}
| colspan="2" | {{key|Right Shift}}
| {{code|key.keyboard.right.shift}}
|-
|-
|key.keyboard.keypad.decimal || colspan="2" | Keypad Decimal
! {{code|key.keyboard.left.control}}
| {{btn|Left Control}}
| colspan="2" | {{key|Left Control}}
| {{code|key.keyboard.left.control}}
|-
|-
|key.keyboard.keypad.enter || colspan="2" | Keypad Enter
! {{code|key.keyboard.right.control}}
| {{btn|Right Control}}
| colspan="2" | {{key|Right Control}}
| {{code|key.keyboard.right.control}}
|-
|-
|key.keyboard.keypad.equal || colspan="2" | Keypad =
! rowspan="2" | {{code|key.keyboard.left.alt}}
| {{btn|Left Alt}}
| Windows<br>Linux
| {{key|Left Alt}}
| {{code|key.keyboard.left.alt}}
|-
|-
|key.keyboard.keypad.comma{{upcoming|je 26.3}} || colspan="2" | Keypad ,
| {{btn|Left Option}}
| macOS
| {{key|Left Option}}
| {{code|key.keyboard.left.option}}
|-
|-
|key.keyboard.keypad.multiply || colspan="2" | Keypad *
! rowspan="2" | {{code|key.keyboard.right.alt}}
| {{btn|Right Alt}}<ref>{{bug|MC-266253}}</ref>
| Windows<br>Linux
| {{key|Right Alt}}
| {{code|key.keyboard.right.alt}}
|-
|-
|key.keyboard.keypad.divide || colspan="2" | Keypad /
| {{btn|Right Option}}
| macOS
| {{key|Right Option}}
| {{code|key.keyboard.right.option}}
|-
|-
|key.keyboard.keypad.subtract || colspan="2" | Keypad -
! rowspan="3" | {{code|key.keyboard.left.win}}
| {{btn|Left Windows}}
| Windows
| {{key|Left Windows}}
| {{code|key.keyboard.left.windows}}
|-
|-
|key.keyboard.keypad.plus.minus{{upcoming|je 26.3}} || colspan="2" | Keypad ±
| {{btn|Left Command}}
| macOS
| {{key|Left Command}}
| {{code|key.keyboard.left.command}}
|-
|-
|key.keyboard.keypad.left.parenthesis{{upcoming|je 26.3}} || colspan="2" | Keypad (
| {{btn|Left Meta}}
| Linux
| {{key|Left Meta}}
| {{code|key.keyboard.left.meta}}
|-
|-
|key.keyboard.keypad.right.parenthesis{{upcoming|je 26.3}} || colspan="2" | Keypad )
! rowspan="3" | {{code|key.keyboard.right.win}}
| {{btn|Right Windows}}
| Windows
| {{key|Right Windows}}
| {{code|key.keyboard.right.windows}}
|-
|-
|key.keyboard.down || colspan="2" | Down Arrow
| {{btn|Right Command}}
| macOS
| {{key|Right Command}}
| {{code|key.keyboard.right.command}}
|-
|-
|key.keyboard.left || colspan="2" | Left Arrow
| {{btn|Right Meta}}
| Linux
| {{key|Right Meta}}
| {{code|key.keyboard.right.meta}}
|-
|-
|key.keyboard.right || colspan="2" | Right Arrow
! rowspan="2" | {{code|key.keyboard.lang1}}<ref name="genericintl">Mojang have chosen to keep the generic, non-descriptive USB HID titles for these keys, matching their internal SDL3 IDs rather than the actual real-life key names: {{bug|MC-311175}}</ref>
| rowspan="2" | {{btn|Language 1}}<ref name="genericintl"/>
| Windows/Linux
| {{key|Hangeul}}
| rowspan="2" | {{code|key.keyboard.lang1}}<ref name="genericintl"/>
|-
|-
|key.keyboard.up || colspan="2" | Up Arrow
| macOS
| {{key|Kana}}
|-
|-
|key.keyboard.apostrophe || colspan="2" | '
! rowspan="2" | {{code|key.keyboard.lang2}}<ref name="genericintl"/>
| rowspan="2" | {{btn|Language 2}}<ref name="genericintl"/>
| Windows/Linux
| {{key|Hanja}}
| rowspan="2" | {{code|key.keyboard.lang2}}<ref name="genericintl"/>
|-
|-
|key.keyboard.backslash || colspan="2" | \
| macOS
| {{key|Eisu}}
|-
|-
|key.keyboard.comma || colspan="2" | ,
! {{code|key.keyboard.lang3}}<ref name="genericintl"/>
| {{btn|Language 3}}<ref name="genericintl"/>
| colspan="2" | {{key|Katakana}}
| {{code|key.keyboard.lang3}}<ref name="genericintl"/>
|-
|-
|key.keyboard.equal || colspan="2" | =
! {{code|key.keyboard.lang4}}<ref name="genericintl"/>
| {{btn|Language 4}}<ref name="genericintl"/>
| colspan="2" | {{key|Hiragana}}
| {{code|key.keyboard.lang4}}<ref name="genericintl"/>
|-
|-
|key.keyboard.grave.accent || colspan="2" | `
! {{code|key.keyboard.lang5}}<ref name="genericintl"/>
| {{btn|Language 5}}<ref name="genericintl"/>
| colspan="2" | {{key|Zenkaku/Hankaku}}{{note|name=XFree86-disparity|Does not bind to the correct key on some Linux systems: https://github.com/libsdl-org/SDL/pull/16239}}
| {{code|key.keyboard.lang5}}<ref name="genericintl"/>
|-
|-
|key.keyboard.left.bracket || colspan="2" | [
! {{code|key.keyboard.international1}}<ref name="genericintl"/>
| {{btn|International 1}}<ref name="genericintl"/>
| colspan="2" | {{key|ろ}} (JIS) / {{key|/}} (ABNT)
| {{code|key.keyboard.international1}}<ref name="genericintl"/>
|-
|-
|key.keyboard.minus || colspan="2" | -
! {{code|key.keyboard.international2}}<ref name="genericintl"/>
| {{btn|International 2}}<ref name="genericintl"/>
| colspan="2" | {{key|Katakana/Hiragana}}
| {{code|key.keyboard.international2}}<ref name="genericintl"/>
|-
|-
|key.keyboard.period || colspan="2" | .
! {{code|key.keyboard.international3}}<ref name="genericintl"/>
| {{btn|International 3}}<ref name="genericintl"/>
| colspan="2" | {{key|¥}}
| {{code|key.keyboard.international3}}<ref name="genericintl"/>
|-
|-
|key.keyboard.right.bracket || colspan="2" | ]
! {{code|key.keyboard.international4}}<ref name="genericintl"/>
| {{btn|International 4}}<ref name="genericintl"/>
| colspan="2" | {{key|Henkan}}
| {{code|key.keyboard.international4}}<ref name="genericintl"/>
|-
|-
|key.keyboard.semicolon || colspan="2" | ;
! {{code|key.keyboard.international5}}<ref name="genericintl"/>
| {{btn|International 5}}<ref name="genericintl"/>
| colspan="2" | {{key|Muhenkan}}
| {{code|key.keyboard.international5}}<ref name="genericintl"/>
|-
|-
|key.keyboard.slash || colspan="2" | /
! {{code|key.keyboard.international6}}<ref name="generic9800">{{bug|MC-311184}}</ref>
| {{btn|International 6}}<ref name="generic9800"/>
| colspan="2" | {{key|Numpad ,}} (PC-9800){{note|Windows only; it is assumed that KEY_KPJPCOMMA is meant to represent this on Linux, but is incorrectly bound to International 5 - see https://github.com/libsdl-org/SDL/pull/16168}}
| {{code|key.keyboard.international6}}<ref name="generic9800"/>
|-
|-
|key.keyboard.space || colspan="2" | Space
! {{code|key.keyboard.mute}}
| {{btn|Mute}}
| colspan="2" | {{key|Mute}}
| {{code|key.keyboard.mute}}
|-
|-
|key.keyboard.tab || colspan="2" | Tab
! {{code|key.keyboard.volume.down}}
| {{btn|Volume Down}}
| colspan="2" | {{key|Volume Down}}
| {{code|key.keyboard.volume.down}}
|-
|-
|key.keyboard.left.alt || colspan="2" | Windows/Linux: Left Alt<br>macOS: Left Option{{upcoming|je 26.3}}
! {{code|key.keyboard.volume.up}}
| {{btn|Volume Up}}
| colspan="2" | {{key|Volume Up}}
| {{code|key.keyboard.volume.up}}
|-
|-
|key.keyboard.left.control || colspan="2" | Left Control
! {{code|key.keyboard.media.play.pause}}
| {{btn|Play/Pause}}
| colspan="2" | {{key|Media Play Pause}}
| {{code|key.keyboard.media.play.pause}}
|-
|-
|key.keyboard.left.shift || colspan="2" | Left Shift
! {{code|key.keyboard.media.play}}
| {{btn|Media Play}}
| colspan="2" | {{key|Media Play}}
| {{code|key.keyboard.media.play}}
|-
|-
|key.keyboard.left.win || colspan="2" | Windows: Left Win<br>Linux: Left Meta{{upcoming|je 26.3}}<br>macOS: Left Command{{upcoming|je 26.3}}
! {{code|key.keyboard.media.pause}}
| {{btn|Media Pause}}
| colspan="2" | {{key|Media Pause}}
| {{code|key.keyboard.media.pause}}
|-
|-
|key.keyboard.right.alt || colspan="2" | Windows/Linux: Right Alt<br>macOS: Right Option{{upcoming|je 26.3}}
! {{code|key.keyboard.media.record}}
| {{btn|Record}}
| colspan="2" | {{key|Media Record}}
| {{code|key.keyboard.media.record}}
|-
|-
|key.keyboard.right.control || colspan="2" | Right Control
! {{code|key.keyboard.media.fast.forward}}
| {{btn|Fast Forward}}
| colspan="2" | {{key|Media Fast Forward}}
| {{code|key.keyboard.media.fast.forward}}
|-
|-
|key.keyboard.right.shift || colspan="2" | Right Shift
! {{code|key.keyboard.media.rewind}}
| {{btn|Rewind}}
| colspan="2" | {{key|Media Rewind}}
| {{code|key.keyboard.media.rewind}}
|-
|-
|key.keyboard.right.win || colspan="2" | Windows: Right Win<br>Linux: Right Meta{{upcoming|je 26.3}}<br>macOS: Right Command{{upcoming|je 26.3}}
! {{code|key.keyboard.media.next.track}}
| {{btn|Next Track}}
| colspan="2" | {{key|Media Next Track}}
| {{code|key.keyboard.media.next.track}}
|-
|-
|key.keyboard.enter || colspan="2" | Enter
! {{code|key.keyboard.media.previous.track}}
| {{btn|Previous Track}}
| colspan="2" | {{key|Media Previous Track}}
| {{code|key.keyboard.media.previous.track}}
|-
|-
|key.keyboard.escape || colspan="2" | Escape
! {{code|key.keyboard.media.stop}}
| {{btn|Media Stop}}
| colspan="2" | {{key|Media Stop}}
| {{code|key.keyboard.media.stop}}
|-
|-
|key.keyboard.backspace || colspan="2" | Backspace
! {{code|key.keyboard.media.eject}}
| {{btn|Eject}}
| colspan="2" | {{key|Media Eject}}
| {{code|key.keyboard.media.eject}}
|-
|-
|key.keyboard.delete || colspan="2" | Delete
! {{code|key.keyboard.media.select}}
| {{btn|Media Select}}
| colspan="2" | {{key|Media Select}}
| {{code|key.keyboard.media.select}}
|-
|-
|key.keyboard.end || colspan="2" | End
! {{code|key.keyboard.stop}}
| {{btn|Stop}}
| colspan="2" | {{key|Stop}}{{note|name=XFree86-disparity}}
| {{code|key.keyboard.stop}}
|-
|-
|key.keyboard.home || colspan="2" | Home
! {{code|key.keyboard.cancel}}
| {{btn|Cancel}}
| colspan="2" | {{key|Cancel}}
| {{code|key.keyboard.cancel}}
|-
|-
|key.keyboard.insert || colspan="2" | Insert
! {{code|key.keyboard.cut}}
| {{btn|Cut}}
| colspan="2" | {{key|Cut}}
| {{code|key.keyboard.cut}}
|-
|-
|key.keyboard.page.down || colspan="2" | Page Down
! {{code|key.keyboard.copy}}
| {{btn|Copy}}
| colspan="2" | {{key|Copy}}
| {{code|key.keyboard.copy}}
|-
|-
|key.keyboard.page.up || colspan="2" | Page Up
! {{code|key.keyboard.paste}}
| {{btn|Paste}}
| colspan="2" | {{key|Paste}}
| {{code|key.keyboard.paste}}
|-
|-
|key.keyboard.caps.lock || colspan="2" | Caps Lock
! {{code|key.keyboard.undo}}
| {{btn|Undo}}
| colspan="2" | {{key|Undo}}
| {{code|key.keyboard.undo}}
|-
|-
|key.keyboard.pause || colspan="2" | Pause
! {{code|key.keyboard.again}}
| {{btn|Again}}
| colspan="2" | {{key|Redo}}<ref>{{bug|MC-310863}}</ref>
| {{code|key.keyboard.again}}
|-
|-
|key.keyboard.scroll.lock || colspan="2" | Scroll Lock
! {{code|key.keyboard.ac.new}}
| {{btn|AC New}}
| colspan="2" | {{key|Application New}}
| {{code|key.keyboard.ac.new}}
|-
|-
|key.keyboard.application{{upcoming|je 26.3}} || colspan="2" | Menu
! {{code|key.keyboard.ac.open}}
| {{btn|AC Open}}
| colspan="2" | {{key|Application Open}}
| {{code|key.keyboard.ac.open}}
|-
|-
|key.keyboard.menu || colspan="2" | Menu
! {{code|key.keyboard.ac.save}}
| {{btn|AC Save}}
| colspan="2" | {{key|Application Save}}
| {{code|key.keyboard.ac.save}}
|-
|-
|key.keyboard.print.screen || colspan="2" | Print Screen
! {{code|key.keyboard.help}}
| {{btn|Help}}
| colspan="2" | {{key|Help}}
| {{code|key.keyboard.help}}
|-
|-
|key.keyboard.world.1 || World 1 || {{info needed}}
! {{code|key.keyboard.find}}
| {{btn|Find}}
| colspan="2" | {{key|Find}}
| {{code|key.keyboard.find}}
|-
|-
|key.keyboard.world.2 || World 2 || {{info needed}}
! {{code|key.keyboard.ac.close}}
| {{btn|AC Close}}
| colspan="2" | {{key|Application Close}}
| {{code|key.keyboard.ac.close}}
|-
|-
|key.keyboard.mute{{upcoming|je 26.3}} || colspan="2" | Mute
! {{code|key.keyboard.ac.exit}}
| {{btn|AC Exit}}
| colspan="2" | {{key|Application Exit}}{{note|name=XFree86-disparity}}
| {{code|key.keyboard.ac.exit}}
|-
|-
|key.keyboard.volume.up{{upcoming|je 26.3}} || colspan="2" | Volume Up
! {{code|key.keyboard.ac.stop}}
| {{btn|AC Stop}}
| colspan="2" | {{key|Application Stop}}
| {{code|key.keyboard.ac.stop}}
|-
|-
|key.keyboard.volume.down{{upcoming|je 26.3}} || colspan="2" | Volume Down
! {{code|key.keyboard.ac.properties}}
| {{btn|AC Properties}}
| colspan="2" | {{key|Application Properties}}{{note|name=XFree86-disparity}}
| {{code|key.keyboard.ac.properties}}
|-
|-
|key.keyboard.media.play.pause{{upcoming|je 26.3}} || colspan="2" | Play/Pause
! {{code|key.keyboard.ac.search}}
| {{btn|AC Search}}
| colspan="2" | {{key|Application Search}}
| {{code|key.keyboard.ac.search}}
|-
|-
|key.keyboard.stop{{upcoming|je 26.3}} || colspan="2" | Stop
! {{code|key.keyboard.ac.home}}
| {{btn|AC Home}}
| colspan="2" | {{key|Application Home}}
| {{code|key.keyboard.ac.home}}
|-
|-
|key.keyboard.again{{upcoming|je 26.3}} || colspan="2" | Again
! {{code|key.keyboard.ac.back}}
| {{btn|AC Back}}
| colspan="2" | {{key|Application Back}}
| {{code|key.keyboard.ac.back}}
|-
|-
|key.keyboard.undo{{upcoming|je 26.3}} || colspan="2" | Undo
! {{code|key.keyboard.ac.forward}}
| {{btn|AC Forward}}
| colspan="2" | {{key|Application Forward}}
| {{code|key.keyboard.ac.forward}}
|-
|-
|key.keyboard.cut{{upcoming|je 26.3}} || colspan="2" | Cut
! {{code|key.keyboard.ac.refresh}}
| {{btn|AC Refresh}}
| colspan="2" | {{key|Application Refresh}}
| {{code|key.keyboard.ac.refresh}}
|-
|-
|key.keyboard.copy{{upcoming|je 26.3}} || colspan="2" | Copy
! {{code|key.keyboard.ac.bookmarks}}
| {{btn|AC Favorites}}
| colspan="2" | {{key|Application Bookmarks}}
| {{code|key.keyboard.ac.bookmarks}}
|-
|-
|key.keyboard.paste{{upcoming|je 26.3}} || colspan="2" | Paste
! {{code|key.keyboard.power}}
| {{btn|Power}}
| colspan="2" | {{key|Power}}
| {{code|key.keyboard.power}}
|-
|-
|key.keyboard.find{{upcoming|je 26.3}} || colspan="2" | Find
! {{code|key.keyboard.sleep}}
| {{btn|Sleep}}
| colspan="2" | {{key|Sleep}}
| {{code|key.keyboard.sleep}}
|-
|-
|key.keyboard.help{{upcoming|je 26.3}} || colspan="2" | Help
! {{code|key.keyboard.wake}}
| {{btn|Wake}}
| colspan="2" | {{key|Wake}}{{note|name=XFree86-disparity}}
| {{code|key.keyboard.wake}}
|-
|-
|key.keyboard.new{{upcoming|je 26.3}} || colspan="2" | New
! {{code|key.keyboard.alternate.erase}}
| {{btn|Alternate Erase}}
| colspan="2" | {{note|name=XFree86-disparity}}
| {{code|key.keyboard.alternate.erase}}
|-
|-
|key.keyboard.save{{upcoming|je 26.3}} || colspan="2" | Save
! {{code|key.keyboard.channel.down}}
| {{btn|Channel Down}}
| colspan="2" | {{note|name=channelproblem|Linux only, but not assignable as the game fails to recognize key presses above ID 247: {{bug|MC-311578}}}}
| {{code|key.keyboard.channel.down}}
|-
|-
|scancode.###{{until|java 26.3}} || scancode.### || Untranslated
! {{code|key.keyboard.channel.up}}
| {{btn|Channel Up}}
| colspan="2" | {{note|name=channelproblem}}
| {{code|key.keyboard.channel.up}}
|-
|-
|key.keyboard.###{{upcoming|java 26.3}} || key.keyboard.### || Untranslated
! {{code|key.keyboard.clear}}
| {{btn|Clear}}
| colspan="2" | {{note|name=247plus|Linux only, but not assignable as the game fails to recognize key presses above ID 247: {{bug|MC-311584}}}}
| {{code|key.keyboard.clear}}
|-
! {{code|key.keyboard.mode}}
| {{btn|Mode}}
| colspan="2" | {{note|name=247plus}}{{note|Accidentally assignable in Linux - see {{bug|MC-310984}}}}
| {{code|key.keyboard.mode}}
|-
! {{code|key.keyboard.select}}
| {{btn|Select}}
| colspan="2" | {{note|name=247plus}}
| {{code|key.keyboard.select}}
|-
! {{code|key.keyboard.{{note|name="keynumberid"|Three digit number representing SDL3 key ID}}}}
| {{btn|key.keyboard.}}{{note|name="keynumberid"}}
| colspan="2" | Undefined key IDs
| {{code|key.keyboard.{{note|name="keynumberid"}}}}
|}
 
==== Unused ====
Minecraft includes IDs and translation strings for all named SDL3 key IDs, even those which are not present in the key binding files for any supported operating system, and therefore cannot be accessed.
 
These can be set via modifying {{code|[[Minecraft:options.txt]]}} manually, but will not be triggerable due to the lack of an associated key.
 
Keys such as Escape may warrant inclusion here. It may also be worth creating a table for accidentally-unassignable keys.
{| class="wikitable sortable" data-description="IDs of unused keys" style="margin-left:auto; margin-right:auto; text-align: center"
! ID{{note|The translation string is assumed to match unless stated otherwise.}}
! Displayed name
! Notes
|-
! {{code|key.keyboard.ac.print}}
| {{btn|AC Print}}
|
|-
! {{code|key.keyboard.call}}
| {{btn|Call}}
| This is a mobile phone button.<ref name="SDLmasterlist">https://wiki.libsdl.org/SDL3/SDL_Scancode</ref>
|-
! {{code|key.keyboard.clear.again}}
| {{btn|Clear Again}}
|
|-
! {{code|key.keyboard.crsel}}
| {{btn|CrSel}}
|
|-
! {{code|key.keyboard.currency.subunit}}
| {{btn|Currency Subunit}}
|
|-
! {{code|key.keyboard.currency.unit}}
| {{btn|Currency Unit}}
|
|-
! {{code|key.keyboard.decimal.separator}}
| {{btn|Decimal Separator}}
|
|-
! {{code|key.keyboard.end.call}}
| {{btn|End Call}}
| This is a mobile phone button.<ref name="SDLmasterlist"/>
|-
! {{code|key.keyboard.enter2}}
| {{btn|Enter 2}}
|
|-
! {{code|key.keyboard.execute}}
| {{btn|Execute}}
|
|-
! {{code|key.keyboard.exsel}}
| {{btn|ExSel}}
|
|-
! {{code|key.keyboard.international7}}
| {{btn|International 7}}
|
|-
! {{code|key.keyboard.international8}}
| {{btn|International 8}}
|
|-
! {{code|key.keyboard.international9}}
| {{btn|International 9}}
|
|-
! {{code|key.keyboard.keypad.00}}
| {{btn|Keypad 00}}
|
|-
! {{code|key.keyboard.keypad.000}}
| {{btn|Keypad 000}}
|
|-
! {{code|key.keyboard.keypad.a}}
| {{btn|Keypad A}}
|
|-
! {{code|key.keyboard.keypad.ampersand}}
| {{btn|Keypad &}}
|
|-
! {{code|key.keyboard.keypad.at}}
| {{btn|Keypad @}}
|
|-
! {{code|key.keyboard.keypad.b}}
| {{btn|Keypad B}}
|
|-
! {{code|key.keyboard.keypad.backspace}}
| {{btn|Keypad Backspace}}
|
|-
! {{code|key.keyboard.keypad.binary}}
| {{btn|Keypad Binary}}
|
|-
! {{code|key.keyboard.keypad.c}}
| {{btn|Keypad C}}
|
|-
! {{code|key.keyboard.keypad.clear}}
| {{btn|Keypad Clear}}
|
|-
! {{code|key.keyboard.keypad.clear.entry}}
| {{btn|Keypad Clear Entry}}
|
|-
! {{code|key.keyboard.keypad.colon}}
| {{btn|Keypad :}}
|
|-
! {{code|key.keyboard.keypad.d}}
| {{btn|Keypad D}}
|
|-
! {{code|key.keyboard.keypad.decimal}}
| {{btn|Keypad Decimal}}
|
|-
! {{code|key.keyboard.keypad.double.ampersand}}
| {{btn|Keypad &&}}
|
|-
! {{code|key.keyboard.keypad.double.vertical.bar}}
| {{btn|Keypad <nowiki>||</nowiki>}}
|
|-
! {{code|key.keyboard.keypad.e}}
| {{btn|Keypad E}}
|
|-
! {{code|key.keyboard.keypad.equals.as400}}
| {{btn|Keypad {{=}} (AS400)}}
|
|-
! {{code|key.keyboard.keypad.exclamation}}
| {{btn|Keypad !}}
|
|-
! {{code|key.keyboard.keypad.f}}
| {{btn|Keypad F}}
|
|-
! {{code|key.keyboard.keypad.greater}}
| {{btn|Keypad >}}
|
|-
! {{code|key.keyboard.keypad.hash}}
| {{btn|Keypad #}}
|
|-
! {{code|key.keyboard.keypad.hexadecimal}}
| {{btn|Keypad Hexadecimal}}
|
|-
! {{code|key.keyboard.keypad.left.brace}}
| {{btn|Keypad {}}
|
|-
! {{code|key.keyboard.keypad.less}}
| {{btn|Keypad <}}
|
|-
! {{code|key.keyboard.keypad.memory.add}}
| {{btn|Keypad M+}}
|
|-
! {{code|key.keyboard.keypad.memory.clear}}
| {{btn|Keypad MC}}
|
|-
! {{code|key.keyboard.keypad.memory.divide}}
| {{btn|Keypad M/}}
|
|-
! {{code|key.keyboard.keypad.memory.multiply}}
| {{btn|Keypad M*}}
|
|-
! {{code|key.keyboard.keypad.memory.recall}}
| {{btn|Keypad MR}}
|
|-
! {{code|key.keyboard.keypad.memory.store}}
| {{btn|Keypad MS}}
|
|-
! {{code|key.keyboard.keypad.memory.subtract}}
| {{btn|Keypad M-}}
|
|-
! {{code|key.keyboard.keypad.octal}}
| {{btn|Keypad Octal}}
|
|-
! {{code|key.keyboard.keypad.percent}}
| {{btn|Keypad %}}
|
|-
! {{code|key.keyboard.keypad.power}}
| {{btn|Keypad ^}}
|
|-
! {{code|key.keyboard.keypad.right.brace}}
| {{btn|Keypad <nowiki>}</nowiki>}}
|
|-
! {{code|key.keyboard.keypad.space}}
| {{btn|Keypad Space}}
|
|-
! {{code|key.keyboard.keypad.tab}}
| {{btn|Keypad Tab}}
|
|-
! {{code|key.keyboard.keypad.vertical.bar}}
| {{btn|Keypad <nowiki>|</nowiki>}}
|
|-
! {{code|key.keyboard.keypad.xor}}
| {{btn|Keypad XOR}}
|
|-
! {{code|key.keyboard.lang6}}
| {{btn|Language 6}}
|
|-
! {{code|key.keyboard.lang7}}
| {{btn|Language 7}}
|
|-
! {{code|key.keyboard.lang8}}
| {{btn|Language 8}}
|
|-
! {{code|key.keyboard.lang9}}
| {{btn|Language 9}}
|
|-
! {{code|key.keyboard.oper}}
| {{btn|Oper}}
|
|-
! {{code|key.keyboard.out}}
| {{btn|Out}}
|
|-
! {{code|key.keyboard.prior}}
| {{btn|Prior}}
|
|-
! {{code|key.keyboard.separator}}
| {{btn|Separator}}
|
|-
! {{code|key.keyboard.soft.left}}
| {{btn|Soft Left}}
| This is a mobile phone button.<ref name="SDLmasterlist"/>
|-
! {{code|key.keyboard.soft.right}}
| {{btn|Soft Right}}
| This is a mobile phone button.<ref name="SDLmasterlist"/>
|-
! {{code|key.keyboard.thousands.separator}}
| {{btn|Thousands Separator}}
|
|-
! {{code|key.keyboard.world.2}}
| {{btn|<nowiki>#</nowiki>}}
| Represents "Non-US Hash", which in practice is always pointed to the same code as the ANSI backslash.
|}
|}


=== Mouse codes ===
=== Mouse codes ===
Only mouse buttons can have controls be bound to them in the options menu. Mouse movement, vertical scrolling and horizontal scrolling are hardcoded, and their default actions cannot be assigned to other keys or buttons, nor can scrolling or moving the mouse be made to do anything else.
Mouse buttons are handled as a signed 32-bit integer, meaning that through editing options.txt, values from {{code|key.mouse.-2147483648}} to {{code|key.mouse.2147483647}} can be specified without being rejected by the game as invalid.<ref>{{bug|MC-268286}}</ref> However, the USB HID specification only permits mouse buttons from 1 to 65535,<ref>https://www.usb.org/sites/default/files/documents/hut1_12v2.pdf</ref> meaning that all negative values and the vast majority of the positive values can never actually be assigned to in-game actions without file editing.


Mouse buttons are handled as a signed 32-bit integer, meaning that through editing options.txt, values from {{code|key.mouse.-2147483648}} to {{code|key.mouse.2147483647}} can be specified without being rejected by the game as invalid.<ref>{{bug|MC-268286}}</ref> However, the USB HID specification only permits mouse buttons from 1 to 65535,<ref>https://www.usb.org/sites/default/files/documents/hut1_12v2.pdf</ref> meaning that all negative values and the vast majority of the positive values can never actually be assigned to in-game actions without file editing.
On Linux, mouse buttons up to 48 can be specified (evdev key press events 272 to 319) - it is not known if any supported operating systems support a 49th or higher mouse button as input. The maximum mouse button on macOS is 32,<ref>according to what karabiner-elements allows: https://discord.com/channels/647810384031645728/648555495564509184/1528136787434930358</ref> and the maximum mouse button on Windows is 5.


Only the first eight mouse buttons can have controls assigned to them.{{until|java 26.3}}
For the first three mouse buttons, the translation keys match the key IDs; all other buttons follow a generic template.


On Linux, mouse buttons up to 48{{upcoming|java 26.3}} can be specified (evdev key press events 272 to 319) - it is not known if any supported operating systems support a 49th or higher mouse button as input. The maximum mouse button on macOS is 32, and the maximum mouse button on Windows is 5.
{| class="wikitable" data-description="Mouse button IDs" style="margin-left:auto; margin-right:auto; text-align:center"
{| class="wikitable" data-description="Mouse button IDs" style="margin-left:auto; margin-right:auto"
! rowspan="2" | ID
! rowspan="2" | ID
! rowspan="2" | Display name
! rowspan="2" | Displayed name
! rowspan="2" | Description
! rowspan="2" | Description
! colspan="3" | Usable on
! colspan="3" | Usable on
Line 317: Line 1,273:
|-
|-
! {{code|key.mouse.left}}{{note|{{code|key.mouse.1}} is automatically converted to this{{info needed|I assume upon reading options.txt when the game is started? or at another time?}}}}
! {{code|key.mouse.left}}{{note|{{code|key.mouse.1}} is automatically converted to this{{info needed|I assume upon reading options.txt when the game is started? or at another time?}}}}
| Left Button
| {{btn|Left Button}}
| Primary mouse button
| {{mouse|left}}
! {{tc|Yes}}
! {{tc|Yes}}
! {{tc|Yes}}
! {{tc|Yes}}
Line 324: Line 1,280:
|-
|-
! {{code|key.mouse.right}}{{note|{{code|key.mouse.3}} is automatically converted to this}}
! {{code|key.mouse.right}}{{note|{{code|key.mouse.3}} is automatically converted to this}}
| Right Button
| {{btn|Right Button}}
| Secondary mouse button
| {{mouse|right}}
! {{tc|Yes}}
! {{tc|Yes}}
! {{tc|Yes}}
! {{tc|Yes}}
Line 331: Line 1,287:
|-
|-
! {{code|key.mouse.middle}}{{note|{{code|key.mouse.2}} is automatically converted to this}}
! {{code|key.mouse.middle}}{{note|{{code|key.mouse.2}} is automatically converted to this}}
| Middle Button
| {{btn|Middle Button}}
| Tertiary mouse button, often the scroll wheel when pressed
| {{mouse|middle}}
! {{tc|Yes}}
! {{tc|Yes}}
! {{tc|Yes}}
! {{tc|Yes}}
Line 338: Line 1,294:
|-
|-
! {{code|key.mouse.4}}
! {{code|key.mouse.4}}
| Button 4
| {{btn|Button 4}}
| Fourth mouse button, aka "Back" or XBUTTON1
| {{mouse|fourth}}
! {{tc|Yes}}
! {{tc|Yes}}
! {{tc|Yes}}
! {{tc|Yes}}
Line 345: Line 1,301:
|-
|-
! {{code|key.mouse.5}}
! {{code|key.mouse.5}}
| Button 5
| {{btn|Button 5}}
| Fifth mouse button, aka "Forward" or XBUTTON2
| {{mouse|fifth}}
! {{tc|Yes}}
! {{tc|Yes}}
! {{tc|Yes}}
! {{tc|Yes}}
Line 352: Line 1,308:
|-
|-
! {{code|key.mouse.6}}
! {{code|key.mouse.6}}
| Button 6
| {{btn|Button 6}}
| Sixth mouse button
| {{mouse|sixth}}
! {{tc|No}}
! {{tc|No}}
! {{tc|Yes}}
! {{tc|Yes}}
Line 359: Line 1,315:
|-
|-
! {{code|key.mouse.7}}
! {{code|key.mouse.7}}
| Button 7
| {{btn|Button 7}}
| Seventh mouse button
| {{mouse|seventh}}
! {{tc|No}}
! {{tc|No}}
! {{tc|Yes}}
! {{tc|Yes}}
Line 366: Line 1,322:
|-
|-
! {{code|key.mouse.8}}
! {{code|key.mouse.8}}
| Button 8
| {{btn|Button 8}}
| Eighth mouse button
| {{mouse|eighth}}
! {{tc|No}}
! {{tc|No}}
! {{tc|Yes}}
! {{tc|Yes}}
Line 373: Line 1,329:
|-
|-
! {{code|key.mouse.9}}
! {{code|key.mouse.9}}
| Button 9
| {{btn|Button 9}}
| Ninth mouse button
| {{mouse|ninth}}
! {{tc|No}}
! {{tc|No}}
! {{tc|Yes}}{{upcoming|java 26.3}}
! {{tc|Yes}}
! {{tc|Yes}}{{upcoming|java 26.3}}
! {{tc|Yes}}
|-
|-
! {{code|key.mouse.10}}
! {{code|key.mouse.10}}
| Button 10
| {{btn|Button 10}}
| Tenth mouse button
| {{mouse|tenth}}
! {{tc|No}}
! {{tc|No}}
! {{tc|Yes}}{{upcoming|java 26.3}}
! {{tc|Yes}}
! {{tc|Yes}}{{upcoming|java 26.3}}
! {{tc|Yes}}
|-
|-
! {{code|key.mouse.11}}
! {{code|key.mouse.11}}
| Button 11
| {{btn|Button 11}}
| Eleventh mouse button
| {{mouse|eleventh}}
! {{tc|No}}
! {{tc|No}}
! {{tc|Yes}}{{upcoming|java 26.3}}
! {{tc|Yes}}
! {{tc|Yes}}{{upcoming|java 26.3}}
! {{tc|Yes}}
|-
|-
! {{code|key.mouse.12}}
! {{code|key.mouse.12}}
| Button 12
| {{btn|Button 12}}
| Twelfth mouse button
| {{mouse|twelfth}}
! {{tc|No}}
! {{tc|No}}
! {{tc|Yes}}{{upcoming|java 26.3}}
! {{tc|Yes}}
! {{tc|Yes}}{{upcoming|java 26.3}}
! {{tc|Yes}}
|-
|-
! {{code|key.mouse.13}}
! {{code|key.mouse.13}}
| Button 13
| {{btn|Button 13}}
| Thirteenth mouse button
| {{mouse|thirteenth}}
! {{tc|No}}
! {{tc|No}}
! {{tc|Yes}}{{upcoming|java 26.3}}
! {{tc|Yes}}
! {{tc|Yes}}{{upcoming|java 26.3}}
! {{tc|Yes}}
|-
|-
! {{code|key.mouse.14}}
! {{code|key.mouse.14}}
| Button 14
| {{btn|Button 14}}
| Fourteenth mouse button
| {{mouse|fourteenth}}
! {{tc|No}}
! {{tc|No}}
! {{tc|Yes}}{{upcoming|java 26.3}}
! {{tc|Yes}}
! {{tc|Yes}}{{upcoming|java 26.3}}
! {{tc|Yes}}
|-
|-
! {{code|key.mouse.15}}
! {{code|key.mouse.15}}
| Button 15
| {{btn|Button 15}}
| Fifteenth mouse button
| {{mouse|fifteenth}}
! {{tc|No}}
! {{tc|No}}
! {{tc|Yes}}{{upcoming|java 26.3}}
! {{tc|Yes}}
! {{tc|Yes}}{{upcoming|java 26.3}}
! {{tc|Yes}}
|-
|-
! {{code|key.mouse.16}}
! {{code|key.mouse.16}}
| Button 16
| {{btn|Button 16}}
| Sixteenth mouse button
| {{mouse|sixteenth}}
! {{tc|No}}
! {{tc|No}}
! {{tc|Yes}}{{upcoming|java 26.3}}
! {{tc|Yes}}
! {{tc|Yes}}{{upcoming|java 26.3}}
! {{tc|Yes}}
|-
|-
! {{code|key.mouse.17}}
! {{code|key.mouse.17}}
| Button 17
| {{btn|Button 17}}
| Seventeenth mouse button
| {{mouse|seventeenth}}
! {{tc|No}}
! {{tc|No}}
! {{tc|Yes}}{{upcoming|java 26.3}}
! {{tc|Yes}}
! {{tc|Yes}}{{upcoming|java 26.3}}
! {{tc|Yes}}
|-
|-
! {{code|key.mouse.18}}
! {{code|key.mouse.18}}
| Button 18
| {{btn|Button 18}}
| Eighteenth mouse button
| {{mouse|eighteenth}}
! {{tc|No}}
! {{tc|No}}
! {{tc|Yes}}{{upcoming|java 26.3}}
! {{tc|Yes}}
! {{tc|Yes}}{{upcoming|java 26.3}}
! {{tc|Yes}}
|-
|-
! {{code|key.mouse.19}}
! {{code|key.mouse.19}}
| Button 19
| {{btn|Button 19}}
| Nineteenth mouse button
| {{mouse|nineteenth}}
! {{tc|No}}
! {{tc|No}}
! {{tc|Yes}}{{upcoming|java 26.3}}
! {{tc|Yes}}
! {{tc|Yes}}{{upcoming|java 26.3}}
! {{tc|Yes}}
|-
|-
! {{code|key.mouse.20}}
! {{code|key.mouse.20}}
| Button 20
| {{btn|Button 20}}
| Twentieth mouse button
| {{mouse|twentieth}}
! {{tc|No}}
! {{tc|No}}
! {{tc|Yes}}{{upcoming|java 26.3}}
! {{tc|Yes}}
! {{tc|Yes}}{{upcoming|java 26.3}}
! {{tc|Yes}}
|-
|-
! {{code|key.mouse.21}}
! {{code|key.mouse.21}}
| Button 21
| {{btn|Button 21}}
| Twenty-first mouse button
| {{mouse|twenty-first}}
! {{tc|No}}
! {{tc|No}}
! {{tc|Yes}}{{upcoming|java 26.3}}
! {{tc|Yes}}
! {{tc|Yes}}{{upcoming|java 26.3}}
! {{tc|Yes}}
|-
|-
! {{code|key.mouse.22}}
! {{code|key.mouse.22}}
| Button 22
| {{btn|Button 22}}
| Twenty-second mouse button
| {{mouse|twenty-second}}
! {{tc|No}}
! {{tc|No}}
! {{tc|Yes}}{{upcoming|java 26.3}}
! {{tc|Yes}}
! {{tc|Yes}}{{upcoming|java 26.3}}
! {{tc|Yes}}
|-
|-
! {{code|key.mouse.23}}
! {{code|key.mouse.23}}
| Button 23
| {{btn|Button 23}}
| Twenty-third mouse button
| {{mouse|twenty-third}}
! {{tc|No}}
! {{tc|No}}
! {{tc|Yes}}{{upcoming|java 26.3}}
! {{tc|Yes}}
! {{tc|Yes}}{{upcoming|java 26.3}}
! {{tc|Yes}}
|-
|-
! {{code|key.mouse.24}}
! {{code|key.mouse.24}}
| Button 24
| {{btn|Button 24}}
| Twenty-fourth mouse button
| {{mouse|twenty-fourth}}
! {{tc|No}}
! {{tc|No}}
! {{tc|Yes}}{{upcoming|java 26.3}}
! {{tc|Yes}}
! {{tc|Yes}}{{upcoming|java 26.3}}
! {{tc|Yes}}
|-
|-
! {{code|key.mouse.25}}
! {{code|key.mouse.25}}
| Button 25
| {{btn|Button 25}}
| Twenty-fifth mouse button
| {{mouse|twenty-fifth}}
! {{tc|No}}
! {{tc|No}}
! {{tc|Yes}}{{upcoming|java 26.3}}
! {{tc|Yes}}
! {{tc|Yes}}{{upcoming|java 26.3}}
! {{tc|Yes}}
|-
|-
! {{code|key.mouse.26}}
! {{code|key.mouse.26}}
| Button 26
| {{btn|Button 26}}
| Twenty-sixth mouse button
| {{mouse|twenty-sixth}}
! {{tc|No}}
! {{tc|No}}
! {{tc|Yes}}{{upcoming|java 26.3}}
! {{tc|Yes}}
! {{tc|Yes}}{{upcoming|java 26.3}}
! {{tc|Yes}}
|-
|-
! {{code|key.mouse.27}}
! {{code|key.mouse.27}}
| Button 27
| {{btn|Button 27}}
| Twenty-seventh mouse button
| {{mouse|twenty-seventh}}
! {{tc|No}}
! {{tc|No}}
! {{tc|Yes}}{{upcoming|java 26.3}}
! {{tc|Yes}}
! {{tc|Yes}}{{upcoming|java 26.3}}
! {{tc|Yes}}
|-
|-
! {{code|key.mouse.28}}
! {{code|key.mouse.28}}
| Button 28
| {{btn|Button 28}}
| Twenty-eighth mouse button
| {{mouse|twenty-eighth}}
! {{tc|No}}
! {{tc|No}}
! {{tc|Yes}}{{upcoming|java 26.3}}
! {{tc|Yes}}
! {{tc|Yes}}{{upcoming|java 26.3}}
! {{tc|Yes}}
|-
|-
! {{code|key.mouse.29}}
! {{code|key.mouse.29}}
| Button 29
| {{btn|Button 29}}
| Twenty-ninth mouse button
| {{mouse|twenty-ninth}}
! {{tc|No}}
! {{tc|No}}
! {{tc|Yes}}{{upcoming|java 26.3}}
! {{tc|Yes}}
! {{tc|Yes}}{{upcoming|java 26.3}}
! {{tc|Yes}}
|-
|-
! {{code|key.mouse.30}}
! {{code|key.mouse.30}}
| Button 30
| {{btn|Button 30}}
| Thirtieth mouse button
| {{mouse|thirtieth}}
! {{tc|No}}
! {{tc|No}}
! {{tc|Yes}}{{upcoming|java 26.3}}
! {{tc|Yes}}
! {{tc|Yes}}{{upcoming|java 26.3}}
! {{tc|Yes}}
|-
|-
! {{code|key.mouse.31}}
! {{code|key.mouse.31}}
| Button 31
| {{btn|Button 31}}
| Thirty-first mouse button
| {{mouse|thirty-first}}
! {{tc|No}}
! {{tc|No}}
! {{tc|Yes}}{{upcoming|java 26.3}}
! {{tc|Yes}}
! {{tc|Yes}}{{upcoming|java 26.3}}
! {{tc|Yes}}
|-
|-
! {{code|key.mouse.32}}
! {{code|key.mouse.32}}
| Button 32
| {{btn|Button 32}}
| Thirty-second mouse button
| {{mouse|thirty-second}}
! {{tc|No}}
! {{tc|No}}
! {{tc|Yes}}{{upcoming|java 26.3}}
! {{tc|Yes}}
! {{tc|Yes}}{{upcoming|java 26.3}}
! {{tc|Yes}}
|-
|-
! {{code|key.mouse.33}}
! {{code|key.mouse.33}}
| Button 33
| {{btn|Button 33}}
| Thirty-third mouse button
| {{mouse|thirty-third}}
! {{tc|No}}
! {{tc|No}}
! {{tc|No}}
! {{tc|No}}
! {{tc|Yes}}{{upcoming|java 26.3}}
! {{tc|Yes}}
|-
|-
! {{code|key.mouse.34}}
! {{code|key.mouse.34}}
| Button 34
| {{btn|Button 34}}
| Thirty-fourth mouse button
| {{mouse|thirty-fourth}}
! {{tc|No}}
! {{tc|No}}
! {{tc|No}}
! {{tc|No}}
! {{tc|Yes}}{{upcoming|java 26.3}}
! {{tc|Yes}}
|-
|-
! {{code|key.mouse.35}}
! {{code|key.mouse.35}}
| Button 35
| {{btn|Button 35}}
| Thirty-fifth mouse button
| {{mouse|thirty-fifth}}
! {{tc|No}}
! {{tc|No}}
! {{tc|No}}
! {{tc|No}}
! {{tc|Yes}}{{upcoming|java 26.3}}
! {{tc|Yes}}
|-
|-
! {{code|key.mouse.36}}
! {{code|key.mouse.36}}
| Button 36
| {{btn|Button 36}}
| Thirty-sixth mouse button
| {{mouse|thirty-sixth}}
! {{tc|No}}
! {{tc|No}}
! {{tc|No}}
! {{tc|No}}
! {{tc|Yes}}{{upcoming|java 26.3}}
! {{tc|Yes}}
|-
|-
! {{code|key.mouse.37}}
! {{code|key.mouse.37}}
| Button 37
| {{btn|Button 37}}
| Thirty-seventh mouse button
| {{mouse|thirty-seventh}}
! {{tc|No}}
! {{tc|No}}
! {{tc|No}}
! {{tc|No}}
! {{tc|Yes}}{{upcoming|java 26.3}}
! {{tc|Yes}}
|-
|-
! {{code|key.mouse.38}}
! {{code|key.mouse.38}}
| Button 38
| {{btn|Button 38}}
| Thirty-eighth mouse button
| {{mouse|thirty-eighth}}
! {{tc|No}}
! {{tc|No}}
! {{tc|No}}
! {{tc|No}}
! {{tc|Yes}}{{upcoming|java 26.3}}
! {{tc|Yes}}
|-
|-
! {{code|key.mouse.39}}
! {{code|key.mouse.39}}
| Button 39
| {{btn|Button 39}}
| Thirty-ninth mouse button
| {{mouse|thirty-ninth}}
! {{tc|No}}
! {{tc|No}}
! {{tc|No}}
! {{tc|No}}
! {{tc|Yes}}{{upcoming|java 26.3}}
! {{tc|Yes}}
|-
|-
! {{code|key.mouse.40}}
! {{code|key.mouse.40}}
| Button 40
| {{btn|Button 40}}
| Fortieth mouse button
| {{mouse|fortieth}}
! {{tc|No}}
! {{tc|No}}
! {{tc|No}}
! {{tc|No}}
! {{tc|Yes}}{{upcoming|java 26.3}}
! {{tc|Yes}}
|-
|-
! {{code|key.mouse.41}}
! {{code|key.mouse.41}}
| Button 41
| {{btn|Button 41}}
| Forty-first mouse button
| {{mouse|forty-first}}
! {{tc|No}}
! {{tc|No}}
! {{tc|No}}
! {{tc|No}}
! {{tc|Yes}}{{upcoming|java 26.3}}
! {{tc|Yes}}
|-
|-
! {{code|key.mouse.42}}
! {{code|key.mouse.42}}
| Button 42
| {{btn|Button 42}}
| Forty-second mouse button
| {{mouse|forty-second}}
! {{tc|No}}
! {{tc|No}}
! {{tc|No}}
! {{tc|No}}
! {{tc|Yes}}{{upcoming|java 26.3}}
! {{tc|Yes}}
|-
|-
! {{code|key.mouse.43}}
! {{code|key.mouse.43}}
| Button 43
| {{btn|Button 43}}
| Forty-third mouse button
| {{mouse|forty-third}}
! {{tc|No}}
! {{tc|No}}
! {{tc|No}}
! {{tc|No}}
! {{tc|Yes}}{{upcoming|java 26.3}}
! {{tc|Yes}}
|-
|-
! {{code|key.mouse.44}}
! {{code|key.mouse.44}}
| Button 44
| {{btn|Button 44}}
| Forty-fourth mouse button
| {{mouse|forty-fourth}}
! {{tc|No}}
! {{tc|No}}
! {{tc|No}}
! {{tc|No}}
! {{tc|Yes}}{{upcoming|java 26.3}}
! {{tc|Yes}}
|-
|-
! {{code|key.mouse.45}}
! {{code|key.mouse.45}}
| Button 45
| {{btn|Button 45}}
| Forty-fifth mouse button
| {{mouse|forty-fifth}}
! {{tc|No}}
! {{tc|No}}
! {{tc|No}}
! {{tc|No}}
! {{tc|Yes}}{{upcoming|java 26.3}}
! {{tc|Yes}}
|-
|-
! {{code|key.mouse.46}}
! {{code|key.mouse.46}}
| Button 46
| {{btn|Button 46}}
| Forty-sixth mouse button
| {{mouse|forty-sixth}}
! {{tc|No}}
! {{tc|No}}
! {{tc|No}}
! {{tc|No}}
! {{tc|Yes}}{{upcoming|java 26.3}}
! {{tc|Yes}}
|-
|-
! {{code|key.mouse.47}}
! {{code|key.mouse.47}}
| Button 47
| {{btn|Button 47}}
| Forty-seventh mouse button
| {{mouse|forty-seventh}}
! {{tc|No}}
! {{tc|No}}
! {{tc|No}}
! {{tc|No}}
! {{tc|Yes}}{{upcoming|java 26.3}}
! {{tc|Yes}}
|-
|-
! {{code|key.mouse.48}}
! {{code|key.mouse.48}}
| Button 48
| {{btn|Button 48}}
| Forty-eighth mouse button
| {{mouse|forty-eighth}}
! {{tc|No}}
! {{tc|No}}
! {{tc|No}}
! {{tc|No}}
! {{tc|Yes}}{{upcoming|java 26.3}}
! {{tc|Yes}}
|}
|}


== ''Bedrock Edition'' ==
== ''Bedrock Edition'' ==
{| class="wikitable"
=== Keyboard codes ===
! Key Code|| Key
{{info needed section|In the lang files there are translation strings for each translatable keycode that is a shortened version (e.g. PgUp instead of PAGE UP). Figure out if these ever appear in the game and, if they do, add a column for them.}}
{{cleanup|section=1|for differing operating systems (e.g. things involving the command key), implement something similar to what is seen with the Java Edition keyboard table above: make the key ID span multiple rows (rowspan 2), and have sub-rows per operating system}}
In {{BE}}, keys are stored as the decimal representation of their [https://learn.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes Windows virtual key code]. This also includes platforms other than Windows, where keys are loosely mapped to these key codes.
 
On Android, the majority of non-basic keys are not recognized, and the Menu key is mapped to unknown (255).
 
Some numbers are skipped because they are reserved or not assigned. By modifying <samp>options.txt</samp>, you can force the game to show these numbers (prefixed with "Button"), but they are unobtainable by pressing a key. The virtual key code specification also provides numbers for buttons on the mouse. However, mouse buttons are not stored as those numbers.
 
Multiple keys can be bound to the same action by separating their key codes with a comma in <samp>options.txt</samp>. There is not a way to do this in-game. For example, the default value in <samp>options.txt</samp> for opening the chat is {{cd|84,13}}, representing both {{key|T}} and {{key|Return}}.
{| class="wikitable" data-description="Keyboard button IDs" style="margin-left:auto; margin-right:auto; text-align:center"
! ID
! Displayed name
! Physical key or button
! Translation key
|-
|-
| 0 || That key has no keycode
! {{code|0}}
| {{btn|Unassigned|be=1}}
| Not Bound
| {{info needed}}
|-
|-
| 3 || break
! {{code|3}}
| {{btn|Button3|be=1}}{{note|Displayed the same as the middle mouse button.}}<ref>{{bug|MCPE-242522}}</ref>
| {{key|Break}}{{note|requires Ctrl to be held before rebinding}}
|
|-
|-
| 8 || backspace / delete
! {{code|8}}
| {{btn|BACK|be=1}}
| {{key|Backspace}}
| {{code|keyboard.keyName.backspace}}
|-
|-
| 9 || tab
! {{code|9}}
| {{btn|TAB|be=1}}
| {{key|Tab}}
| {{code|keyboard.keyName.tab}}
|-
|-
| 12 || clear
! {{code|12}}
| {{btn|Button12|be=1}}
| {{key|Clear}}
|
|-
|-
| 13 || enter
! {{code|13}}
| {{btn|RETURN|be=1}}
| {{key|Return}} / {{key|Numpad Enter}}
| {{code|keyboard.keyName.return}}
|-
|-
| 16 || shift
! {{code|16}}
| {{btn|SHIFT|be=1}}
| {{key|Left Shift}} / {{key|Right Shift}}
| {{code|keyboard.keyName.lshift}}
|-
|-
| 17 || w
! {{code|17}}
| {{btn|CONTROL|be=1}}
| {{key|Left Control}} / {{key|Right Control}}
| {{code|keyboard.keyName.control}}
|-
|-
| 18 || alt
! {{code|18}}
| {{btn|ALTERNATIVE|be=1}}
| {{key|Left Alt}} / {{key|Right Alt}}
| {{code|keyboard.keyName.alt}}
|-
|-
| 19 || pause/break
! {{code|19}}
| {{btn|PAUSE|be=1}}
| {{key|Pause}}
| {{code|keyboard.keyName.pause}}
|-
|-
| 20 || caps lock
! {{code|20}}
| {{btn|CAPITAL|be=1}}
| {{key|Caps Lock}}
| {{code|keyboard.keyName.capsLock}}
|-
|-
| 21 || hangul
! {{code|21}}
| {{btn|Button21|be=1}}
| {{key|Kana}}{{verify}} / {{key|Hangeul}}
|
|-
|-
| 25 || hanja
! {{code|22}}
| {{btn|Button22|be=1}}
| {{key|IME on}}
|
|-
|-
| 27 || escape
! {{code|23}}
| {{btn|Button23|be=1}}
| {{key|IME Junja}}
|
|-
|-
| 28 || conversion
! {{code|24}}
| {{btn|Button24|be=1}}
| {{key|IME final mode}}
|
|-
|-
| 29 || non-conversion
! {{code|25}}
| {{btn|Button25|be=1}}
| {{key|Hanja}} / {{key|Eisu}}{{verify}}
|
|-
|-
| 32 || spacebar
! {{code|26}}
| {{btn|Button26|be=1}}
| {{key|IME off}}
|
|-
|-
| 33 || page up
! {{code|27}}
| {{btn|ESCAPE|be=1}}
| Cannot be assigned{{note|Trying to bind anything to the Escape key causes it to become Unassigned instead. This can only be set by modifying options.txt.}}
| {{code|keyboard.keyName.escape}}
|-
|-
| 34 || page down
! {{code|28}}
| {{btn|Button28|be=1}}
| {{key|Henkan}}
|
|-
|-
| 35 || end
! {{code|29}}
| {{btn|Button29|be=1}}
| {{key|Muhenkan}}
|
|-
|-
| 36 || home
! {{code|30}}
| {{btn|Button30|be=1}}
| {{key|IME accept}}
|
|-
|-
| 37 || left arrow
! {{code|31}}
| {{btn|Button31|be=1}}
| {{key|IME mode change request}}
|
|-
|-
| 38 || up arrow
! {{code|32}}
| {{btn|SPACE|be=1}}
| {{key|Space}}
| {{code|keyboard.keyName.space}}
|-
|-
| 39 || right arrow
! {{code|33}}
| {{btn|PAGE UP|be=1}}
| {{key|Page Up}}
| {{code|keyboard.keyName.pgUp}}
|-
|-
| 40 || down arrow
! {{code|34}}
| {{btn|PAGE DOWN|be=1}}
| {{key|Page Down}}
| {{code|keyboard.keyName.pgDown}}
|-
|-
| 41 || select
! {{code|35}}
| {{btn|END|be=1}}
| {{key|End}}
| {{code|keyboard.keyName.end}}
|-
|-
| 42 || print
! {{code|36}}
| {{btn|HOME|be=1}}
| {{key|Home}}
| {{code|keyboard.keyName.home}}
|-
|-
| 43 || execute
! {{code|37}}
| {{btn|LEFT|be=1}}
| {{key|Left}}
| {{code|keyboard.keyName.left}}
|-
|-
| 44 || Print Screen
! {{code|38}}
| {{btn|UP|be=1}}
| {{key|Up}}
| {{code|keyboard.keyName.up}}
|-
|-
| 45 || insert
! {{code|39}}
| {{btn|RIGHT|be=1}}
| {{key|Right}}
| {{code|keyboard.keyName.right}}
|-
|-
| 46 || delete
! {{code|40}}
| {{btn|DOWN|be=1}}
| {{key|Down}}
| {{code|keyboard.keyName.down}}
|-
|-
| 47 || help
! {{code|41}}
| {{btn|Button41|be=1}}
| {{key|Select}}
|
|-
|-
| 48 || 0
! {{code|42}}
| {{btn|Button42|be=1}}
| {{key|Print}}
|
|-
|-
| 49 || 1
! {{code|43}}
| {{btn|Button43|be=1}}
| {{key|Execute}}
|
|-
|-
| 50 || 2
! {{code|44}}
| {{btn|Button44|be=1}}
| {{key|Print Screen}}
|
|-
|-
| 51 || 3
! {{code|45}}
| {{btn|INSERT|be=1}}
| {{key|Insert}}
| {{code|keyboard.keyName.insert}}
|-
|-
| 52 || 4
! {{code|46}}
| {{btn|DELETE|be=1}}
| {{key|Delete}}
| {{code|keyboard.keyName.delete}}
|-
|-
| 53 || 5
! {{code|47}}
| {{btn|Button47|be=1}}
| {{key|Help}}
|
|-
|-
| 54 || 6
! {{code|48}}
| {{btn|0|be=1}}
| {{key|0}}
| {{code|keyboard.keyName.0}}
|-
|-
| 55 || 7
! {{code|49}}
| {{btn|1|be=1}}
| {{key|1}}
| {{code|keyboard.keyName.1}}
|-
|-
| 56 || 8
! {{code|50}}
| {{btn|2|be=1}}
| {{key|2}}
| {{code|keyboard.keyName.2}}
|-
|-
| 57 || 9
! {{code|51}}
| {{btn|3|be=1}}
| {{key|3}}
| {{code|keyboard.keyName.3}}
|-
|-
| 58 || :
! {{code|52}}
| {{btn|4|be=1}}
| {{key|4}}
| {{code|keyboard.keyName.4}}
|-
|-
| 59 || semicolon (firefox), equals
! {{code|53}}
| {{btn|5|be=1}}
| {{key|5}}
| {{code|keyboard.keyName.5}}
|-
|-
| 60 || <
! {{code|54}}
| {{btn|6|be=1}}
| {{key|6}}
| {{code|keyboard.keyName.6}}
|-
|-
| 61 || equals (firefox)
! {{code|55}}
| {{btn|7|be=1}}
| {{key|7}}
| {{code|keyboard.keyName.7}}
|-
|-
| 63 || ß
! {{code|56}}
| {{btn|8|be=1}}
| {{key|8}}
| {{code|keyboard.keyName.8}}
|-
|-
| 64 || @ (firefox)
! {{code|57}}
| {{btn|9|be=1}}
| {{key|9}}
| {{code|keyboard.keyName.9}}
|-
|-
| 65 || a
! {{code|65}}
| {{btn|A|be=1}}
| {{key|A}}
| {{code|keyboard.keyName.a}}
|-
|-
| 66 || b
! {{code|66}}
| {{btn|B|be=1}}
| {{key|B}}
| {{code|keyboard.keyName.b}}
|-
|-
| 67 || c
! {{code|67}}
| {{btn|C|be=1}}
| {{key|C}}
| {{code|keyboard.keyName.c}}
|-
|-
| 68 || d
! {{code|68}}
| {{btn|D|be=1}}
| {{key|D}}
| {{code|keyboard.keyName.d}}
|-
|-
| 69 || e
! {{code|69}}
| {{btn|E|be=1}}
| {{key|E}}
| {{code|keyboard.keyName.e}}
|-
|-
| 70 || f
! {{code|70}}
| {{btn|F|be=1}}
| {{key|F}}
| {{code|keyboard.keyName.f}}
|-
|-
| 71 || g
! {{code|71}}
| {{btn|G|be=1}}
| {{key|G}}
| {{code|keyboard.keyName.g}}
|-
|-
| 72 || h
! {{code|72}}
| {{btn|H|be=1}}
| {{key|H}}
| {{code|keyboard.keyName.h}}
|-
|-
| 73 || i
! {{code|73}}
| {{btn|I|be=1}}
| {{key|I}}
| {{code|keyboard.keyName.i}}
|-
|-
| 74 || j
! {{code|74}}
| {{btn|J|be=1}}
| {{key|J}}
| {{code|keyboard.keyName.j}}
|-
|-
| 75 || k
! {{code|75}}
| {{btn|K|be=1}}
| {{key|K}}
| {{code|keyboard.keyName.k}}
|-
|-
| 76 || l
! {{code|76}}
| {{btn|L|be=1}}
| {{key|L}}
| {{code|keyboard.keyName.l}}
|-
|-
| 77 || m
! {{code|77}}
| {{btn|M|be=1}}
| {{key|M}}
| {{code|keyboard.keyName.m}}
|-
|-
| 78 || n
! {{code|78}}
| {{btn|N|be=1}}
| {{key|N}}
| {{code|keyboard.keyName.n}}
|-
|-
| 79 || o
! {{code|79}}
| {{btn|O|be=1}}
| {{key|O}}
| {{code|keyboard.keyName.o}}
|-
|-
| 80 || p
! {{code|80}}
| {{btn|P|be=1}}
| {{key|P}}
| {{code|keyboard.keyName.p}}
|-
|-
| 81 || q
! {{code|81}}
| {{btn|Q|be=1}}
| {{key|Q}}
| {{code|keyboard.keyName.q}}
|-
|-
| 82 || r
! {{code|82}}
| {{btn|R|be=1}}
| {{key|R}}
| {{code|keyboard.keyName.r}}
|-
|-
| 83 || s
! {{code|83}}
| {{btn|S|be=1}}
| {{key|S}}
| {{code|keyboard.keyName.s}}
|-
|-
| 84 || t
! {{code|84}}
| {{btn|T|be=1}}
| {{key|T}}
| {{code|keyboard.keyName.t}}
|-
|-
| 85 || u
! {{code|85}}
| {{btn|U|be=1}}
| {{key|U}}
| {{code|keyboard.keyName.u}}
|-
|-
| 86 || v
! {{code|86}}
| {{btn|V|be=1}}
| {{key|V}}
| {{code|keyboard.keyName.v}}
|-
|-
| 87 || w
! {{code|87}}
| {{btn|W|be=1}}
| {{key|W}}
| {{code|keyboard.keyName.w}}
|-
|-
| 88 || x
! {{code|88}}
| {{btn|X|be=1}}
| {{key|X}}
| {{code|keyboard.keyName.x}}
|-
|-
| 89 || y
! {{code|89}}
| {{btn|Y|be=1}}
| {{key|Y}}
| {{code|keyboard.keyName.y}}
|-
|-
| 90 || z
! {{code|90}}
| {{btn|Z|be=1}}
| {{key|Z}}
| {{code|keyboard.keyName.z}}
|-
|-
| 91 || Windows Key / Left ⌘ / Chromebook Search key
! {{code|91}}
| {{btn|Button91|be=1}}
| {{key|Left Windows}} / {{key|Left Command}} / {{key|Chromebook Search}}
|
|-
|-
| 92 || right window key
! {{code|92}}
| {{btn|Button92|be=1}}
| {{key|Right Windows}} / {{key|Right Command}}
|
|-
|-
| 93 || Windows Menu / Right ⌘
! {{code|93}}
| {{btn|Button93|be=1}}
| {{key|Menu}}
|
|-
|-
| 95 || sleep
! {{code|95}}
| {{btn|Button95|be=1}}
| {{key|Sleep}}
|
|-
|-
| 96 || numpad 0
! {{code|96}}
| {{btn|NUMPAD0|be=1}}
| {{key|Numpad 0}}
| {{code|keyboard.keyName.numpad0}}
|-
|-
| 97 || numpad 1
! {{code|97}}
| {{btn|NUMPAD1|be=1}}
| {{key|Numpad 1}}
| {{code|keyboard.keyName.numpad1}}
|-
|-
| 98 || numpad 2
! {{code|98}}
| {{btn|NUMPAD2|be=1}}
| {{key|Numpad 2}}
| {{code|keyboard.keyName.numpad2}}
|-
|-
| 99 || numpad 3
! {{code|99}}
| {{btn|NUMPAD3|be=1}}
| {{key|Numpad 3}}
| {{code|keyboard.keyName.numpad3}}
|-
|-
| 100 || numpad 4
! {{code|100}}
| {{btn|NUMPAD4|be=1}}
| {{key|Numpad 4}}
| {{code|keyboard.keyName.numpad4}}
|-
|-
| 101 || numpad 5
! {{code|101}}
| {{btn|NUMPAD5|be=1}}
| {{key|Numpad 5}}
| {{code|keyboard.keyName.numpad5}}
|-
|-
| 102 || numpad 6
! {{code|102}}
| {{btn|NUMPAD6|be=1}}
| {{key|Numpad 6}}
| {{code|keyboard.keyName.numpad6}}
|-
|-
| 103 || numpad 7
! {{code|103}}
| {{btn|NUMPAD7|be=1}}
| {{key|Numpad 7}}
| {{code|keyboard.keyName.numpad7}}
|-
|-
| 104 || numpad 8
! {{code|104}}
| {{btn|NUMPAD8|be=1}}
| {{key|Numpad 8}}
| {{code|keyboard.keyName.numpad8}}
|-
|-
| 105 || numpad 9
! {{code|105}}
| {{btn|NUMPAD9|be=1}}
| {{key|Numpad 9}}
| {{code|keyboard.keyName.numpad9}}
|-
|-
| 106 || multiply
! {{code|106}}
| {{btn|MULTIPLY|be=1}}
| {{key|Numpad *}}
| {{code|keyboard.keyName.multiply}}
|-
|-
| 107 || add
! {{code|107}}
| {{btn|ADD|be=1}}
| {{key|Numpad <nowiki>+</nowiki>}}
| {{code|keyboard.keyName.add}}
|-
|-
| 108 || numpad period (firefox)
! {{code|108}}
| {{btn|Button108|be=1}}
| {{key|Separator}}
|
|-
|-
| 109 || subtract
! {{code|109}}
| {{btn|SUBTRACT|be=1}}
| {{key|Numpad -}}
| {{code|keyboard.keyName.subtract}}
|-
|-
| 110 || decimal point
! {{code|110}}
| {{btn|DECIMAL|be=1}}
| {{key|Numpad .}}
| {{code|keyboard.keyName.decimal}}
|-
|-
| 111 || divide
! {{code|111}}
| {{btn|DIVIDE|be=1}}
| {{key|Numpad /}}
| {{code|keyboard.keyName.divide}}
|-
|-
| 112 || f1
! {{code|112}}
| {{btn|F1|be=1}}
| {{key|F1}}
| {{code|keyboard.keyName.f1}}
|-
|-
| 113 || f2
! {{code|113}}
| {{btn|F2|be=1}}
| {{key|F2}}
| {{code|keyboard.keyName.f2}}
|-
|-
| 114 || f3
! {{code|114}}
| {{btn|F3|be=1}}
| {{key|F3}}
| {{code|keyboard.keyName.f3}}
|-
|-
| 115 || f4
! {{code|115}}
| {{btn|F4|be=1}}
| {{key|F4}}
| {{code|keyboard.keyName.f4}}
|-
|-
| 116 || f5
! {{code|116}}
| {{btn|F5|be=1}}
| {{key|F5}}
| {{code|keyboard.keyName.f5}}
|-
|-
| 117 || f6
! {{code|117}}
| {{btn|F6|be=1}}
| {{key|F6}}
| {{code|keyboard.keyName.f6}}
|-
|-
| 118 || f7
! {{code|118}}
| {{btn|F7|be=1}}
| {{key|F7}}
| {{code|keyboard.keyName.f7}}
|-
|-
| 119 || f8
! {{code|119}}
| {{btn|F8|be=1}}
| {{key|F8}}
| {{code|keyboard.keyName.f8}}
|-
|-
| 120 || f9
! {{code|120}}
| {{btn|F9|be=1}}
| {{key|F9}}
| {{code|keyboard.keyName.f9}}
|-
|-
| 121 || f10
! {{code|121}}
| {{btn|F10|be=1}}
| {{key|F10}}
| {{code|keyboard.keyName.f10}}
|-
|-
| 122 || f11
! {{code|122}}
| {{btn|F11|be=1}}
| {{key|F11}}
| {{code|keyboard.keyName.f11}}
|-
|-
| 123 || f12
! {{code|123}}
| {{btn|F12|be=1}}
| {{key|F12}}
| {{code|keyboard.keyName.f12}}
|-
|-
| 124 || f13
! {{code|124}}
| {{btn|F13|be=1}}
| {{key|F13}}
| {{code|keyboard.keyName.f13}}
|-
|-
| 125 || f14
! {{code|125}}
| {{btn|Button125|be=1}}
| {{key|F14}}
|
|-
|-
| 126 || f15
! {{code|126}}
| {{btn|Button126|be=1}}
| {{key|F15}}
|
|-
|-
| 127 || f16
! {{code|127}}
| {{btn|Button127|be=1}}
| {{key|F16}}
|
|-
|-
| 128 || f17
! {{code|128}}
| {{btn|Button128|be=1}}
| {{key|F17}}
|
|-
|-
| 129 || f18
! {{code|129}}
| {{btn|Button129|be=1}}
| {{key|F18}}
|
|-
|-
| 130 || f19
! {{code|130}}
| {{btn|Button130|be=1}}
| {{key|F19}}
|
|-
|-
| 131 || f20
! {{code|131}}
| {{btn|Button131|be=1}}
| {{key|F20}}
|
|-
|-
| 132 || f21
! {{code|132}}
| {{btn|Button132|be=1}}
| {{key|F21}}
|
|-
|-
| 133 || f22
! {{code|133}}
| {{btn|Button133|be=1}}
| {{key|F22}}
|
|-
|-
| 134 || f23
! {{code|134}}
| {{btn|Button134|be=1}}
| {{key|F23}}
|
|-
|-
| 135 || f24
! {{code|135}}
| {{btn|Button135|be=1}}
| {{key|F24}}
|
|-
|-
| 136 || f25
! {{code|144}}
| {{btn|NUMLOCK|be=1}}
| {{key|Num Lock}}
| {{code|keyboard.keyName.numLock}}
|-
|-
| 137 || f26
! {{code|145}}
| {{btn|SCROLL|be=1}}
| {{key|Scroll Lock}}
| {{code|keyboard.keyName.scroll}}
|-
|-
| 138 || f27
! {{code|146}}
| {{btn|Button146|be=1}}
| OEM-Specific{{note|name=oem-specific|The manufacturer of your keyboard can map a physical key to this key code.}}
|
|-
|-
| 139 || f28
! {{code|147}}
| {{btn|Button147|be=1}}
| OEM-Specific{{note|name=oem-specific}}
|
|-
|-
| 140 || f29
! {{code|148}}
| {{btn|Button148|be=1}}
| OEM-Specific{{note|name=oem-specific}}
|
|-
|-
| 141 || f30
! {{code|149}}
| {{btn|Button149|be=1}}
| OEM-Specific{{note|name=oem-specific}}
|
|-
|-
| 142 || f31
! {{code|150}}
| {{btn|Button150|be=1}}
| OEM-Specific{{note|name=oem-specific}}
|
|-
|-
| 143 || f32
! {{code|166}}
| {{btn|Button166|be=1}}
| {{key|Application Back}}
|
|-
|-
| 144 || num lock
! {{code|167}}
| {{btn|Button167|be=1}}
| {{key|Application Forward}}
|
|-
|-
| 145 || scroll lock
! {{code|168}}
| {{btn|Button168|be=1}}
| {{key|Application Refresh}}
|
|-
|-
| 151 || airplane mode
! {{code|169}}
| {{btn|Button169|be=1}}
| {{key|Application Stop}}
|
|-
|-
| 160 || ^
! {{code|170}}
| {{btn|Button170|be=1}}
| {{key|Application Search}}
|
|-
|-
| 161 || !
! {{code|171}}
| {{btn|Button171|be=1}}
| {{key|Application Bookmarks}}
|
|-
|-
| 162 || ؛ (arabic semicolon)
! {{code|172}}
| {{btn|Button172|be=1}}
| {{key|Application Home}}
|
|-
|-
| 163 || #
! {{code|173}}
| {{btn|Button173|be=1}}
| {{key|Mute}}
|
|-
|-
| 164 || $
! {{code|174}}
| {{btn|Button174|be=1}}
| {{key|Volume Down}}
|
|-
|-
| 165 || ù
! {{code|175}}
| {{btn|Button175|be=1}}
| {{key|Volume Up}}
|
|-
|-
| 166 || page backward
! {{code|176}}
| {{btn|Button176|be=1}}
| {{key|Media Next Track}}
|
|-
|-
| 167 || page forward
! {{code|177}}
| {{btn|Button177|be=1}}
| {{key|Media Previous Track}}
|
|-
|-
| 168 || refresh
! {{code|178}}
| {{btn|Button178|be=1}}
| {{key|Media Stop}}
|
|-
|-
| 169 || closing paren (AZERTY)
! {{code|179}}
| {{btn|Button179|be=1}}
| {{key|Media Play Pause}}
|
|-
|-
| 170 || *
! {{code|180}}
| {{btn|Button180|be=1}}
| {{key|Start Mail}}
|
|-
|-
| 171 || ~ + * key
! {{code|181}}
| {{btn|Button181|be=1}}
| {{key|Media Select}}
|
|-
|-
| 172 || home key
! {{code|182}}
| {{btn|Button182|be=1}}
| {{key|Start Application 1}}
|
|-
|-
| 173 || minus (firefox), mute/unmute
! {{code|183}}
| {{btn|Button183|be=1}}
| {{key|Start Application 2}}
|
|-
|-
| 174 || decrease volume level
! {{code|186}}
| {{btn|SEMICOLON|be=1}}
| {{key|;}}
| {{code|keyboard.keyName.semicolon}}
|-
|-
| 175 || increase volume level
! {{code|187}}
| {{btn|EQUALS|be=1}}
| {{key|{{=}}}}
| {{code|keyboard.keyName.equals}}
|-
|-
| 176 || next
! {{code|188}}
| {{btn|COMMA|be=1}}
| {{key|,}}
| {{code|keyboard.keyName.comma}}
|-
|-
| 177 || previous
! {{code|189}}
| {{btn|MINUS|be=1}}
| {{key|-}}
| {{code|keyboard.keyName.minus}}
|-
|-
| 178 || stop
! {{code|190}}
| {{btn|PERIOD|be=1}}
| {{key|.}}
| {{code|keyboard.keyName.period}}
|-
|-
| 179 || play/pause
! {{code|191}}
| {{btn|SLASH|be=1}}
| {{key|/}}
| {{code|keyboard.keyName.slash}}
|-
|-
| 180 || e-mail
! {{code|192}}
| {{btn|GRAVE|be=1}}
| {{key|`}}
| {{code|keyboard.keyName.grave}}
|--
! {{code|194}}
| {{btn|Button193|be=1}}
| {{more info|It's the International 1 key, but I don't know what that is specifically.}}
|
|-
|-
| 181 || mute/unmute (firefox)
! {{code|194}}
| {{btn|Button194|be=1}}
| {{key|Numpad ,}}
|
|-
|-
| 182 || decrease volume level (firefox)
! {{code|219}}
| {{btn|LBRACKET|be=1}}
| {{key|[}}
| {{code|keyboard.keyName.lbracket}}
|-
|-
| 183 || increase volume level (firefox)
! {{code|220}}
| {{btn|BACKSLASH|be=1}}
| {{key|\}}{{info needed|ANSI (North America layout), ISO (Europe layout), or both?}}
| {{code|keyboard.keyName.backslash}}
|-
|-
| 186 || semi-colon / ñ
! {{code|221}}
| {{btn|RBRACKET|be=1}}
| {{key|]}}
| {{code|keyboard.keyName.rbracket}}
|-
|-
| 187 || equal sign
! {{code|222}}
| {{btn|APOSTROPHE|be=1}}
| {{key|'}}
| {{code|keyboard.keyName.apostrophe}}
|-
|-
| 188 || comma
! {{code|223}}
| {{btn|Button223|be=1}}
| OEM-Specific{{note|name=oem-specific}}
|
|-
|-
| 189 || dash
! {{code|225}}
| {{btn|Button225|be=1}}
| OEM-Specific{{note|name=oem-specific}}
|
|-
|-
| 190 || period
! {{code|226}}
| {{btn|Button226|be=1}}
| OEM-Specific{{note|name=oem-specific}}
|
|-
|-
| 191 || forward slash / ç
! {{code|227}}
| {{btn|Button227|be=1}}
| OEM-Specific{{note|name=oem-specific}}
|
|-
|-
| 192 || grave accent / ñ / æ / ö
! {{code|228}}
| {{btn|Button228|be=1}}
| OEM-Specific{{note|name=oem-specific}}
|
|-
|-
| 193 || ?, / or °
! {{code|229}}
| {{btn|Button229|be=1}}
| {{key|IME process}}
|
|-
|-
| 194 || numpad period (chrome)
! {{code|230}}
| {{btn|Button230|be=1}}
| OEM-Specific{{note|name=oem-specific}}
|
|-
|-
| 219 || open bracket
! {{code|231}}
| {{btn|Button231|be=1}}
| {{info needed}}
|
|-
|-
| 220 || back slash
! {{code|233}}
| {{btn|Button233|be=1}}
| OEM-Specific{{note|name=oem-specific}}
|
|-
|-
| 221 || close bracket / å
! {{code|234}}
| {{btn|Button234|be=1}}
| OEM-Specific{{note|name=oem-specific}}
|
|-
|-
| 222 || single quote / ø / ä
! {{code|235}}
| {{btn|Button235|be=1}}
| OEM-Specific{{note|name=oem-specific}}
|
|-
|-
| 223 || `
! {{code|236}}
| {{btn|Button236|be=1}}
| OEM-Specific{{note|name=oem-specific}}
|
|-
|-
| 224 || left or right ⌘ key (firefox)
! {{code|237}}
| {{btn|Button237|be=1}}
| OEM-Specific{{note|name=oem-specific}}
|
|-
|-
| 225 || altgr
! {{code|238}}
| {{btn|Button238|be=1}}
| OEM-Specific{{note|name=oem-specific}}
|
|-
|-
| 226 || < /git >, left back slash
! {{code|239}}
| {{btn|Button239|be=1}}
| OEM-Specific{{note|name=oem-specific}}
|
|-
|-
| 230 || GNOME Compose Key
! {{code|240}}
| {{btn|Button240|be=1}}
| OEM-Specific{{note|name=oem-specific}}
|
|-
|-
| 231 || ç
! {{code|241}}
| {{btn|Button241|be=1}}
| OEM-Specific{{note|name=oem-specific}}
|
|-
|-
| 233 || XF86Forward
! {{code|242}}
| {{btn|Button242|be=1}}
| OEM-Specific{{note|name=oem-specific}}
|
|-
|-
| 234 || XF86Back
! {{code|243}}
| {{btn|Button243|be=1}}
| OEM-Specific{{note|name=oem-specific}}
|
|-
|-
| 235 || non-conversion
! {{code|244}}
| {{btn|Button244|be=1}}
| OEM-Specific{{note|name=oem-specific}}
|
|-
|-
| 240 || alphanumeric
! {{code|245}}
| {{btn|Button245|be=1}}
| OEM-Specific{{note|name=oem-specific}}
|
|-
|-
| 242 || hiragana/katakana
! {{code|246}}
| {{btn|Button246|be=1}}
| {{key|Attn}}
|
|-
|-
| 243 || half-width/full-width
! {{code|247}}
| {{btn|Button247|be=1}}
| {{key|CrSel}}
|
|-
|-
| 244 || kanji
! {{code|248}}
| {{btn|Button248|be=1}}
| {{key|ExSel}}
|
|-
|-
| 251 || unlock trackpad (Chrome/Edge)
! {{code|249}}
| {{btn|Button249|be=1}}
| {{key|Erase EOF}}
|
|-
|-
| 255 || toggle touchpad
! {{code|250}}
| {{btn|Button250|be=1}}
| {{key|Play}}
|
|-
|-
| -99 || Mouse Left
! {{code|251}}
| {{btn|Button251|be=1}}
| {{key|Zoom}}
|
|-
|-
| -98 || Mouse Right
! {{code|253}}
| {{btn|Button253|be=1}}
| {{key|PA1}}
|
|-
|-
| -97 || Mouse Middle
! {{code|254}}
| {{btn|Button254|be=1}}
| {{key|Clear}}
|
|-
|-
| -94 || Mouse Button 6
! {{code|255}}
| {{btn|Button255|be=1}}
| All unknown keys
|
|}
 
=== Mouse codes ===
 
{{info needed section|How many mouse buttons does Bedrock support? There are no official Linux versions, but perhaps ChromeOS (unlikely, due to the build being near identical to Android) or iOS could support more than Windows's five}}
 
Mouse buttons are represented by negative numbers.
 
On Android, only 3 buttons are recognized, despite the OS supporting up to 5 buttons.
 
{| class="wikitable" data-description="Keyboard button IDs" style="margin-left:auto; margin-right:auto"
! ID
! Displayed name
! Description
|-
! {{code|-99}}
| {{btn|Button1|be=1}}
| {{mouse|left}}
|-
|-
| -95 || Mouse Button 5
! {{code|-98}}
| {{btn|Button2|be=1}}
| {{mouse|right}}
|-
! {{code|-97}}
| {{btn|Button3|be=1}}
| {{mouse|middle}}
|-
! {{code|-95}}
| {{btn|Button5|be=1}}
| {{mouse|fourth}}
|-
! {{code|-94}}
| {{btn|Button6|be=1}}
| {{mouse|fifth}}
|}
 
=== Controller codes ===
{{info needed section|verify key code ids for nintendo switch and play station}}
{| class="wikitable" data-description="Keyboard button IDs" style="margin-left:auto; margin-right:auto"
! rowspan="3" | ID
! colspan="4" | Display
! rowspan="3" | Description
|-
! rowspan="2" | {{OS|win|chrome|and|ios|ipad|fire|xbox|xb1|xsx}}
! rowspan="2" | {{OS|ns2/ns}}
! colspan="2" | {{OS|ps}}
|-
! {{OS|ps4}}
! {{OS|ps5}}
|-
! {{code|0}}
| colspan="4" |
| Not Bound
|-
! {{code|1}}
| style="text-align: center" | {{Ore UI Cont|XB-A}}
| style="text-align: center" | {{Ore UI Cont|NS-A}}
| style="text-align: center" | {{Ore UI Cont|PS4-Cross}}
| style="text-align: center" | {{Ore UI Cont|PS5-Cross}}
| A
|-
! {{code|2}}
| style="text-align: center" | {{Ore UI Cont|XB-B}}
| style="text-align: center" | {{Ore UI Cont|NS-B}}
| style="text-align: center" | {{Ore UI Cont|PS4-Circle}}
| style="text-align: center" | {{Ore UI Cont|PS5-Circle}}
| B
|-
! {{code|3}}
| style="text-align: center" | {{Ore UI Cont|XB-X}}
| style="text-align: center" | {{Ore UI Cont|NS-Y}}
| style="text-align: center" | {{Ore UI Cont|PS4-Square}}
| style="text-align: center" | {{Ore UI Cont|PS5-Square}}
| X
|-
! {{code|4}}
| style="text-align: center" | {{Ore UI Cont|XB-Y}}
| style="text-align: center" | {{Ore UI Cont|NS-X}}
| style="text-align: center" | {{Ore UI Cont|PS4-Triangle}}
| style="text-align: center" | {{Ore UI Cont|PS5-Triangle}}
| Y
|-
! {{code|5}}
| style="text-align: center" | {{Ore UI Cont|NS/XB-D-Pad-Up}}
| style="text-align: center" | {{Ore UI Cont|NS-Up}}/{{Ore UI Cont|NS/XB-D-Pad-Up}}
| style="text-align: center" colspan="2" | {{Ore UI Cont|PS-D-Pad-Up}}
| D-Pad Up
|-
! {{code|6}}
| style="text-align: center" | {{Ore UI Cont|NS/XB-D-Pad-Down}}
| style="text-align: center" | {{Ore UI Cont|NS-Down}}/{{Ore UI Cont|NS/XB-D-Pad-Down}}
| style="text-align: center" colspan="2" | {{Ore UI Cont|PS-D-Pad-Down}}
| D-Pad Down
|-
! {{code|7}}
| style="text-align: center" | {{Ore UI Cont|NS/XB-D-Pad-Left}}
| style="text-align: center" | {{Ore UI Cont|NS-Left}}/{{Ore UI Cont|NS/XB-D-Pad-Left}}
| style="text-align: center" colspan="2" | {{Ore UI Cont|PS-D-Pad-Left}}
| D-Pad Left
|-
! {{code|8}}
| style="text-align: center" | {{Ore UI Cont|NS/XB-D-Pad-Right}}
| style="text-align: center" | {{Ore UI Cont|NS-Right}}/{{Ore UI Cont|NS/XB-D-Pad-Right}}
| style="text-align: center" colspan="2" | {{Ore UI Cont|PS-D-Pad-Right}}
| D-Pad Right
|-
! {{code|9}}
| style="text-align: center" | {{Ore UI Cont|XB-Left-Stick-Click}}
| style="text-align: center" | {{Ore UI Cont|NS-Left-Stick-Click}}
| style="text-align: center" colspan="2" | {{Ore UI Cont|PS-Left-Stick-Click}}
| Left Stick Click
|-
! {{code|10}}
| style="text-align: center" | {{Ore UI Cont|XB-Right-Stick-Click}}
| style="text-align: center" | {{Ore UI Cont|NS-Right-Stick-Click}}
| style="text-align: center" colspan="2" | {{Ore UI Cont|PS-Right-Stick-Click}}
| Right Stick Click
|-
! {{code|11}}
| style="text-align: center" | {{Ore UI Cont|XB-Left-Bumper}}
| style="text-align: center" | {{Ore UI Cont|NS-Left-Bumper}}
| style="text-align: center" colspan="2" | {{Ore UI Cont|PS-Left-Bumper}}
| Left Bumper
|-
! {{code|12}}
| style="text-align: center" | {{Ore UI Cont|XB-Right-Bumper}}
| style="text-align: center" | {{Ore UI Cont|NS-Right-Bumper}}
| style="text-align: center" colspan="2" | {{Ore UI Cont|PS-Right-Bumper}}
| Right Bumper
|-
! {{code|13}}
| style="text-align: center" | {{Ore UI Cont|XB-Select}}
| style="text-align: center" | {{Ore UI Cont|NS-Select}}
| style="text-align: center" | {{Ore UI Cont|PS4-Touch-Pad}}
| style="text-align: center" | {{Ore UI Cont|PS5-Touch-Pad}}
| Select
|-
! {{code|14}}
| style="text-align: center" | {{Ore UI Cont|XB-Menu}}
| style="text-align: center" | {{Ore UI Cont|NS-Menu}}
| style="text-align: center" | {{Ore UI Cont|PS4-Menu}}
| style="text-align: center" | {{Ore UI Cont|PS5-Menu}}
| Menu
|-
! {{code|16}}
| style="text-align: center" | {{Ore UI Cont|PS/XB-Left-Stick-Arrow-Down}}
| style="text-align: center" | {{Ore UI Cont|NS-Left-Stick-Arrow-Down}}
| style="text-align: center" colspan="2" | {{Ore UI Cont|PS/XB-Left-Stick-Arrow-Down}}
| Left Stick Down
|-
! {{code|17}}
| style="text-align: center" | {{Ore UI Cont|PS/XB-Left-Stick-Arrow-Right}}
| style="text-align: center" | {{Ore UI Cont|NS-Left-Stick-Arrow-Right}}
| style="text-align: center" colspan="2" | {{Ore UI Cont|PS/XB-Left-Stick-Arrow-Right}}
| Left Stick Right
|-
! {{code|18}}
| style="text-align: center" | {{Ore UI Cont|PS/XB-Left-Stick-Arrow-Left}}
| style="text-align: center" | {{Ore UI Cont|NS-Left-Stick-Arrow-Left}}
| style="text-align: center" colspan="2" | {{Ore UI Cont|PS/XB-Left-Stick-Arrow-Left}}
| Left Stick Left
|-
! {{code|19}}
| style="text-align: center" | {{Ore UI Cont|PS/XB-Left-Stick-Arrow-Up}}
| style="text-align: center" | {{Ore UI Cont|NS-Left-Stick-Arrow-Up}}
| style="text-align: center" colspan="2" | {{Ore UI Cont|PS/XB-Left-Stick-Arrow-Up}}
| Left Stick Up
|-
! {{code|-100}}
| style="text-align: center" | {{Ore UI Cont|XB-Left-Trigger}}
| style="text-align: center" | {{Ore UI Cont|NS-Left-Trigger}}
| style="text-align: center" colspan="2" | {{Ore UI Cont|PS-Left-Trigger}}
| Left Trigger
|-
! {{code|-99}}
| style="text-align: center" | {{Ore UI Cont|XB-Right-Trigger}}
| style="text-align: center" | {{Ore UI Cont|NS-Right-Trigger}}
| style="text-align: center" colspan="2" | {{Ore UI Cont|PS-Right-Trigger}}
| Right Trigger
|}
|}


Line 1,035: Line 2,741:
{{HistoryTable
{{HistoryTable
|{{HistoryLine|java classic}}
|{{HistoryLine|java classic}}
|{{HistoryLine||0.0.23a|Added key codes.}}
|{{HistoryLine||0.0.23a|Controls can now be customized. Only keyboard buttons are recognized as valid for rebinding.}}
|{{HistoryLine|java beta}}
|{{HistoryLine|java beta}}
|{{HistoryLine||1.8|dev=Pre-release|Controls can now be bound to mouse buttons; these are handled using negative numbers.}}
|{{HistoryLine||1.8|dev=Pre-release|Controls can now be bound to mouse buttons; these are handled using negative numbers.}}
Line 1,042: Line 2,748:
|{{HistoryLine||1.13|dev=17w43a|With the updating of LWJGL from 2 to 3 key codes have been entirely redone. For the old values, see [[Minecraft:Java Edition pre-flattening data values#Key codes]], and for what each of them was converted to, see [[Minecraft:Java Edition Flattening#Key codes]].
|{{HistoryLine||1.13|dev=17w43a|With the updating of LWJGL from 2 to 3 key codes have been entirely redone. For the old values, see [[Minecraft:Java Edition pre-flattening data values#Key codes]], and for what each of them was converted to, see [[Minecraft:Java Edition Flattening#Key codes]].
|The display names of key codes now describes the actual key (e.g. BACKSLASH changed to \).
|The display names of key codes now describes the actual key (e.g. BACKSLASH changed to \).
|The first three mouse buttons are now displayed as "Left Button", "Right Button" and "Middle Button".}}
|The first three mouse buttons are now displayed as "Left Button", "Right Button" and "Middle Button".
|{{HistoryLine|java upcoming}}
|Controls that are not bound to anything now display "Not bound".
|The game now uses GLFW.
|Added translation keys for most key codes, which are only displayed for keys GLFW doesn't return a name for.
|Keys with no assigned ID are called {{code|scancode.###}}
|Accepted values are -2147483648 to 2147483647,{{verify}} though obviously only a tiny subset are attainable.}}
|{{HistoryLine|||dev=17w45a|Keyboard key codes and their translation keys are now prefixed with {{code|key.keyboard.}}.
|{{code|key.keyboard.-1}} is now used for controls that are not bound to anything.}}
|{{HistoryLine|||dev=17w49a|{{code|key.keyboard.unknown}} is now used for controls that are not bound to anything.}}
|{{HistoryLine|||dev=pre4|Keypad keys, excluding the enter key, are no longer prefixed with "Num " - many now look identical to other keys despite being different.
|Letter keys are now displayed in lowercase.
|Controls that are not bound to anything now leave the button blank.}}
|{{HistoryLine||1.19|dev=22w16a|Controls that are not bound to anything now display "Not bound".}}
|{{HistoryLine||1.20|dev=pre2|Letter keys are now displayed in uppercase again.}}
|{{HistoryLine|||dev=pre3|Controls that are not bound to anything now display "Not Bound".}}
|{{HistoryLine||26.3|dev=snap4|Valid but undefined key codes have been changed from {{code|scancode.###}} to {{code|key.keyboard.###}}.
|{{HistoryLine||26.3|dev=snap4|Valid but undefined key codes have been changed from {{code|scancode.###}} to {{code|key.keyboard.###}}.
|Removed {{code|key.keyboard.f25}}.}}
|Removed {{code|key.keyboard.f25}}. Its translation string is purposefully retained in the game files for an unknown reason.<ref>{{bug|MC-311176}}</ref>
|{{HistoryLine|||dev=?|The keypad plus-or-minus, keypad opening bracket and keypad closing bracket buttons now display as ±, ( and ) in-game. However, it is unknown what their specific key codes are at this point. Notably, they are not prefixed with "Keypad ", unlike other keypad keys.<ref>{{bug|MC-310109}}, {{bug|MC-310110}}</ref>}}
|Keypad keys are now prefixed with "Keypad ".
|Keys are only displayed as the internal name that SDL provides if that name is one character long and uses the translation key otherwise.
|Certain keys, such as keypad plus-or-minus, keypad opening bracket and keypad closing bracket, now display the character they represent, despite not being defined key codes in the game.<ref>{{bug|MC-310109}}, {{bug|MC-310110}}</ref>
|The game now uses SDL3.
|The international backslash key is now recognized as {{code|key.keyboard.world.1}} on Windows, rather than {{code|key.keyboard.world.2}}.
|{{code|key.keyboard.keypad.decimal}} can no longer be assigned.
|{{code|key.keyboard.menu}} is now assigned with {{key|Compose}} instead of {{key|Menu}}.}}
|{{HistoryLine|||dev=snap7|Several new translatable key codes have been added:
|{{HistoryLine|||dev=snap7|Several new translatable key codes have been added:
*{{code|key.keyboard.keypad.period}}
{{collapse|content=
*{{code|key.keyboard.keypad.comma}}
* {{code|key.keyboard.99}} → {{code|key.keyboard.keypad.period}}
*{{code|key.keyboard.keypad.plus.minus}}
* {{code|key.keyboard.101}} → {{code|key.keyboard.application}}
*{{code|key.keyboard.keypad.left.parenthesis}}
* {{code|key.keyboard.117}} → {{code|key.keyboard.help}}
*{{code|key.keyboard.keypad.right.parenthesis}}
* {{code|key.keyboard.120}} → {{code|key.keyboard.stop}}
*{{code|key.keyboard.keypad.application}}
* {{code|key.keyboard.121}} → {{code|key.keyboard.again}}
*{{code|key.keyboard.keypad.mute}}
* {{code|key.keyboard.122}} → {{code|key.keyboard.undo}}
*{{code|key.keyboard.keypad.volume.up}}
* {{code|key.keyboard.123}} → {{code|key.keyboard.cut}}
*{{code|key.keyboard.keypad.volume.down}}
* {{code|key.keyboard.124}} → {{code|key.keyboard.copy}}
*{{code|key.keyboard.keypad.media.play.pause}}
* {{code|key.keyboard.125}} → {{code|key.keyboard.paste}}
*{{code|key.keyboard.keypad.stop}}
* {{code|key.keyboard.126}} → {{code|key.keyboard.find}}
*{{code|key.keyboard.keypad.again}}
* {{code|key.keyboard.127}} → {{code|key.keyboard.mute}}
*{{code|key.keyboard.keypad.undo}}
* {{code|key.keyboard.128}} → {{code|key.keyboard.volume.up}}
*{{code|key.keyboard.keypad.cut}}
* {{code|key.keyboard.129}} → {{code|key.keyboard.volume.down}}
*{{code|key.keyboard.keypad.copy}}
* {{code|key.keyboard.133}} → {{code|key.keyboard.keypad.comma}}
*{{code|key.keyboard.keypad.paste}}
* {{code|key.keyboard.182}} → {{code|key.keyboard.keypad.left.parenthesis}}
*{{code|key.keyboard.keypad.find}}
* {{code|key.keyboard.183}} → {{code|key.keyboard.keypad.right.parenthesis}}
*{{code|key.keyboard.keypad.help}}
* {{code|key.keyboard.215}} → {{code|key.keyboard.keypad.plus.minus}}
*{{code|key.keyboard.keypad.new}}
* {{code|key.keyboard.271}} → {{code|key.keyboard.media.play.pause}}
*{{code|key.keyboard.keypad.save}}|
* {{code|key.keyboard.273}} → {{code|key.keyboard.new}}
{{code|key.keyboard.left.alt}}, {{code|key.keyboard.right.alt}}, {{code|key.keyboard.left.win}}, and {{code|key.keyboard.right.win}} now have different display names depending on the user's operating system.{{verify|Checking the lang files shows that there are distinct "[left/right].win" and "[left/right].windows" translation strings - investigate}}}}
* {{code|key.keyboard.277}} → {{code|key.keyboard.save}}
}}
|{{code|key.keyboard.left.alt}}, {{code|key.keyboard.right.alt}}, {{code|key.keyboard.left.win}}, and {{code|key.keyboard.right.win}} now use different translation keys based on the user's operating system.}}
|{{HistoryLine|||dev=snap9|IDs and translation strings have been added for all SDL scancodes, regardless of whether or not said keycodes correspond to actual, bindable keyboard buttons:
{{collapse|content=
* {{code|key.keyboard.102}} → {{code|key.keyboard.power}}
* {{code|key.keyboard.116}} → {{code|key.keyboard.execute}}
* {{code|key.keyboard.119}} → {{code|key.keyboard.select}}
* {{code|key.keyboard.134}} → {{code|key.keyboard.keypad.equals.as400}}
* {{code|key.keyboard.135}} → {{code|key.keyboard.international1}}
* {{code|key.keyboard.136}} → {{code|key.keyboard.international2}}
* {{code|key.keyboard.137}} → {{code|key.keyboard.international3}}
* {{code|key.keyboard.138}} → {{code|key.keyboard.international4}}
* {{code|key.keyboard.139}} → {{code|key.keyboard.international5}}
* {{code|key.keyboard.140}} → {{code|key.keyboard.international6}}
* {{code|key.keyboard.141}} → {{code|key.keyboard.international7}}
* {{code|key.keyboard.142}} → {{code|key.keyboard.international8}}
* {{code|key.keyboard.143}} → {{code|key.keyboard.international9}}
* {{code|key.keyboard.144}} → {{code|key.keyboard.lang1}}
* {{code|key.keyboard.145}} → {{code|key.keyboard.lang2}}
* {{code|key.keyboard.146}} → {{code|key.keyboard.lang3}}
* {{code|key.keyboard.147}} → {{code|key.keyboard.lang4}}
* {{code|key.keyboard.148}} → {{code|key.keyboard.lang5}}
* {{code|key.keyboard.149}} → {{code|key.keyboard.lang6}}
* {{code|key.keyboard.150}} → {{code|key.keyboard.lang7}}
* {{code|key.keyboard.151}} → {{code|key.keyboard.lang8}}
* {{code|key.keyboard.152}} → {{code|key.keyboard.lang9}}
* {{code|key.keyboard.153}} → {{code|key.keyboard.alternate.erase}}
* {{code|key.keyboard.154}} → {{code|key.keyboard.sys.req}}
* {{code|key.keyboard.155}} → {{code|key.keyboard.cancel}}
* {{code|key.keyboard.156}} → {{code|key.keyboard.clear}}
* {{code|key.keyboard.157}} → {{code|key.keyboard.prior}}
* {{code|key.keyboard.158}} → {{code|key.keyboard.enter2}}
* {{code|key.keyboard.159}} → {{code|key.keyboard.separator}}
* {{code|key.keyboard.160}} → {{code|key.keyboard.out}}
* {{code|key.keyboard.161}} → {{code|key.keyboard.oper}}
* {{code|key.keyboard.162}} → {{code|key.keyboard.clear.again}}
* {{code|key.keyboard.163}} → {{code|key.keyboard.crsel}}
* {{code|key.keyboard.164}} → {{code|key.keyboard.exsel}}
* {{code|key.keyboard.176}} → {{code|key.keyboard.keypad.00}}
* {{code|key.keyboard.177}} → {{code|key.keyboard.keypad.000}}
* {{code|key.keyboard.178}} → {{code|key.keyboard.thousands.separator}}
* {{code|key.keyboard.179}} → {{code|key.keyboard.decimal.separator}}
* {{code|key.keyboard.180}} → {{code|key.keyboard.currency.unit}}
* {{code|key.keyboard.181}} → {{code|key.keyboard.currency.subunit}}
* {{code|key.keyboard.184}} → {{code|key.keyboard.keypad.left.brace}}
* {{code|key.keyboard.185}} → {{code|key.keyboard.keypad.right.brace}}
* {{code|key.keyboard.186}} → {{code|key.keyboard.keypad.tab}}
* {{code|key.keyboard.187}} → {{code|key.keyboard.keypad.backspace}}
* {{code|key.keyboard.188}} → {{code|key.keyboard.keypad.a}}
* {{code|key.keyboard.189}} → {{code|key.keyboard.keypad.b}}
* {{code|key.keyboard.190}} → {{code|key.keyboard.keypad.c}}
* {{code|key.keyboard.191}} → {{code|key.keyboard.keypad.d}}
* {{code|key.keyboard.192}} → {{code|key.keyboard.keypad.e}}
* {{code|key.keyboard.193}} → {{code|key.keyboard.keypad.f}}
* {{code|key.keyboard.194}} → {{code|key.keyboard.keypad.xor}}
* {{code|key.keyboard.195}} → {{code|key.keyboard.keypad.power}}
* {{code|key.keyboard.196}} → {{code|key.keyboard.keypad.percent}}
* {{code|key.keyboard.197}} → {{code|key.keyboard.keypad.less}}
* {{code|key.keyboard.198}} → {{code|key.keyboard.keypad.greater}}
* {{code|key.keyboard.199}} → {{code|key.keyboard.keypad.ampersand}}
* {{code|key.keyboard.200}} → {{code|key.keyboard.keypad.double.ampersand}}
* {{code|key.keyboard.201}} → {{code|key.keyboard.keypad.vertical.bar}}
* {{code|key.keyboard.202}} → {{code|key.keyboard.keypad.double.vertical.bar}}
* {{code|key.keyboard.203}} → {{code|key.keyboard.keypad.colon}}
* {{code|key.keyboard.204}} → {{code|key.keyboard.keypad.hash}}
* {{code|key.keyboard.205}} → {{code|key.keyboard.keypad.space}}
* {{code|key.keyboard.206}} → {{code|key.keyboard.keypad.at}}
* {{code|key.keyboard.207}} → {{code|key.keyboard.keypad.exclamation}}
* {{code|key.keyboard.208}} → {{code|key.keyboard.keypad.memory.store}}
* {{code|key.keyboard.209}} → {{code|key.keyboard.keypad.memory.recall}}
* {{code|key.keyboard.210}} → {{code|key.keyboard.keypad.memory.clear}}
* {{code|key.keyboard.211}} → {{code|key.keyboard.keypad.memory.add}}
* {{code|key.keyboard.212}} → {{code|key.keyboard.keypad.memory.subtract}}
* {{code|key.keyboard.213}} → {{code|key.keyboard.keypad.memory.multiply}}
* {{code|key.keyboard.214}} → {{code|key.keyboard.keypad.memory.divide}}
* {{code|key.keyboard.216}} → {{code|key.keyboard.keypad.clear}}
* {{code|key.keyboard.217}} → {{code|key.keyboard.keypad.clear.entry}}
* {{code|key.keyboard.218}} → {{code|key.keyboard.keypad.binary}}
* {{code|key.keyboard.219}} → {{code|key.keyboard.keypad.octal}}
* {{code|key.keyboard.221}} → {{code|key.keyboard.keypad.hexadecimal}}
* {{code|key.keyboard.257}} → {{code|key.keyboard.mode}}
* {{code|key.keyboard.258}} → {{code|key.keyboard.sleep}}
* {{code|key.keyboard.259}} → {{code|key.keyboard.wake}}
* {{code|key.keyboard.260}} → {{code|key.keyboard.channel.up}}
* {{code|key.keyboard.261}} → {{code|key.keyboard.channel.down}}
* {{code|key.keyboard.262}} → {{code|key.keyboard.media.play}}
* {{code|key.keyboard.263}} → {{code|key.keyboard.media.pause}}
* {{code|key.keyboard.264}} → {{code|key.keyboard.media.record}}
* {{code|key.keyboard.265}} → {{code|key.keyboard.media.fast.forward}}
* {{code|key.keyboard.266}} → {{code|key.keyboard.media.rewind}}
* {{code|key.keyboard.267}} → {{code|key.keyboard.media.next.track}}
* {{code|key.keyboard.268}} → {{code|key.keyboard.media.previous.track}}
* {{code|key.keyboard.269}} → {{code|key.keyboard.media.stop}}
* {{code|key.keyboard.270}} → {{code|key.keyboard.media.eject}}
* {{code|key.keyboard.272}} → {{code|key.keyboard.media.select}}
* {{code|key.keyboard.274}} → {{code|key.keyboard.ac.open}}
* {{code|key.keyboard.275}} → {{code|key.keyboard.ac.close}}
* {{code|key.keyboard.276}} → {{code|key.keyboard.ac.exit}}
* {{code|key.keyboard.278}} → {{code|key.keyboard.ac.print}}
* {{code|key.keyboard.279}} → {{code|key.keyboard.ac.properties}}
* {{code|key.keyboard.280}} → {{code|key.keyboard.ac.search}}
* {{code|key.keyboard.281}} → {{code|key.keyboard.ac.home}}
* {{code|key.keyboard.282}} → {{code|key.keyboard.ac.back}}
* {{code|key.keyboard.283}} → {{code|key.keyboard.ac.forward}}
* {{code|key.keyboard.284}} → {{code|key.keyboard.ac.stop}}
* {{code|key.keyboard.285}} → {{code|key.keyboard.ac.refresh}}
* {{code|key.keyboard.286}} → {{code|key.keyboard.ac.bookmarks}}
* {{code|key.keyboard.287}} → {{code|key.keyboard.soft.left}}
* {{code|key.keyboard.288}} → {{code|key.keyboard.soft.right}}
* {{code|key.keyboard.289}} → {{code|key.keyboard.call}}
* {{code|key.keyboard.290}} → {{code|key.keyboard.end.call}}
}}
}}
|{{code|key.keyboard.application}} now displays as "Application".
|{{code|key.keyboard.left.win}} and {{code|key.keyboard.right.win}} now display as "Left Windows" and "Right Windows" on Windows, respectively.
|{{code|key.keyboard.left.win}} and {{code|key.keyboard.right.win}} now use the {{code|key.keyboard.left.meta}} and {{code|key.keyboard.right.meta}} translation keys on Linux, respectively.
|{{code|key.keyboard.new}} renamed to {{code|key.keyboard.ac.new}}
|{{code|key.keyboard.save}} renamed to {{code|key.keyboard.ac.save}}}}
}}
==== Removed keys ====
{| class="wikitable sortable" data-description="Key codes that no longer exist" style="margin-left:auto; margin-right:auto; text-align: center"
! ID
! Displayed name
! colspan="2" | Physical key or button
! Translation key
|-
! {{code|key.keyboard.f25}}
| {{btn|F25}}
| colspan="2" | Unclear{{note|Ostensibly for a twenty-fifth function key, but Windows, Linux and presumably macOS only recognize up to F24. Some keyboards from decades past go past F24, and Arch Linux can apparently recognize up to F246, however it is unknown if Minecraft would recognize either of these.}}
| {{code|key.keyboard.f25}}
|}


== Notes ==
== Notes ==
Line 1,078: Line 2,933:


== Navigation ==
== Navigation ==
{{Navbox Java Edition technical|general}}
{{Navbox input}}
{{Navbox Bedrock Edition}}


[[Category:Gameplay]]
[[Category:Gameplay]]

Latest revision as of 11:21, 22 October 2026

Template:For This is a list of key codes used by Minecraft:Minecraft, which are used in the Minecraft:options.txt file.

Java Edition

Template:For

Only keys which can be directly detected by the operating system are able to be bound to game controls - keys such as F Lock<ref>Template:Bug</ref> or Fn typically are not recognizable themselves as keys, and Minecraft and all other computer programs will be oblivious to them in isolation.

Only mouse buttons can have controls be bound to them in the options menu. Mouse movement, vertical scrolling and horizontal scrolling are hardcoded, and their default actions cannot be assigned to other keys or buttons, nor can scrolling or moving the mouse be made to do anything else.

Java Edition does not provide official support for controllers.

Keyboard codes

Keyboard buttons are handled as a signed 32-bit integer, meaning that through editing options.txt, values from Template:Code to Template:Code can be specified without being rejected by the game as invalid. Any keys corresponding to a valid SDL key code will be automatically converted to one of the named keys below.

The displayed names of several keys will change depending on the currently active system keyboard layout. The values displayed in this table assume a standard en-US QWERTY layout. Some keys also have operating system dependent names, which are assigned different rows sharing an ID.

If SDL does not define a specific key as a valid input, it will be set to "Not Bound" if attempting to bind a control to it.Template:Until

If a key is pressed that SDL does not assign a key code to, the game will act as though no key is pressed.Template:Upcoming This is a bug which Mojang have decided not to fix.<ref>Template:Bug</ref>

ID Displayed name Physical key or button Translation keyTemplate:Note
Template:Code Template:Btn Unassigned, or unrecognized<ref>Template:Bug</ref>Template:Until Template:Code
Template:Code Template:Btn Template:Key Template:Note
Template:Code Template:Btn Template:Key Template:Note
Template:Code Template:Btn Template:Key Template:Note
Template:Code Template:Btn Template:Key Template:Note
Template:Code Template:Btn Template:Key Template:Note
Template:Code Template:Btn Template:Key Template:Note
Template:Code Template:Btn Template:Key Template:Note
Template:Code Template:Btn Template:Key Template:Note
Template:Code Template:Btn Template:Key Template:Note
Template:Code Template:Btn Template:Key Template:Note
Template:Code Template:Btn Template:Key Template:Note
Template:Code Template:Btn Template:Key Template:Note
Template:Code Template:Btn Template:Key Template:Note
Template:Code Template:Btn Template:Key Template:Note
Template:Code Template:Btn Template:Key Template:Note
Template:Code Template:Btn Template:Key Template:Note
Template:Code Template:Btn Template:Key Template:Note
Template:Code Template:Btn Template:Key Template:Note
Template:Code Template:Btn Template:Key Template:Note
Template:Code Template:Btn Template:Key Template:Note
Template:Code Template:Btn Template:Key Template:Note
Template:Code Template:Btn Template:Key Template:Note
Template:Code Template:Btn Template:Key Template:Note
Template:Code Template:Btn Template:Key Template:Note
Template:Code Template:Btn Template:Key Template:Note
Template:Code Template:Btn Template:Key Template:Note
Template:Code Template:Btn Template:Key Template:Note
Template:Code Template:Btn Template:Key Template:Note
Template:Code Template:Btn Template:Key Template:Note
Template:Code Template:Btn Template:Key Template:Note
Template:Code Template:Btn Template:Key Template:Note
Template:Code Template:Btn Template:Key Template:Note
Template:Code Template:Btn Template:Key Template:Note
Template:Code Template:Btn Template:Key Template:Note
Template:Code Template:Btn Template:Key Template:Note
Template:Code Template:Btn Template:Key Template:Note
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:CodeTemplate:Note
Template:Code Template:Btn Template:Key (ANSI) Template:CodeTemplate:Note
Template:Code Template:Btn Template:Key Template:CodeTemplate:Note
Template:Code Template:Btn Template:Key Template:CodeTemplate:Note
Template:Code Template:Btn Template:Key Template:CodeTemplate:Note
Template:Code Template:Btn Template:Key Template:CodeTemplate:Note
Template:Code Template:Btn Template:Key Template:CodeTemplate:Note
Template:Code Template:Btn Template:Key Template:CodeTemplate:Note
Template:Code Template:Btn Template:Key Template:CodeTemplate:Note
Template:Code Template:Btn Template:Key Template:CodeTemplate:Note
Template:Code Template:Btn Template:Key Template:CodeTemplate:Note
Template:Code Template:Btn Template:Key (ISO) Template:CodeTemplate:Note
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:KeyTemplate:Note Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:BtnTemplate:Verify Template:Key Template:Code
Template:Code Template:BtnTemplate:Verify Template:Key Template:Code
Template:Code Template:BtnTemplate:Verify Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:KeyTemplate:Note Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:KeyTemplate:Verify Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:BtnTemplate:Note Template:KeyTemplate:Note Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Cannot be assignedTemplate:Note Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Windows
Linux
Template:Key Template:Code
Template:Btn macOS Template:Key Template:Code
Template:Code Template:Btn<ref>Template:Bug</ref> Windows
Linux
Template:Key Template:Code
Template:Btn macOS Template:Key Template:Code
Template:Code Template:Btn Windows Template:Key Template:Code
Template:Btn macOS Template:Key Template:Code
Template:Btn Linux Template:Key Template:Code
Template:Code Template:Btn Windows Template:Key Template:Code
Template:Btn macOS Template:Key Template:Code
Template:Btn Linux Template:Key Template:Code
Template:Code<ref name="genericintl">Mojang have chosen to keep the generic, non-descriptive USB HID titles for these keys, matching their internal SDL3 IDs rather than the actual real-life key names: Template:Bug</ref> Template:Btn<ref name="genericintl"/> Windows/Linux Template:Key Template:Code<ref name="genericintl"/>
macOS Template:Key
Template:Code<ref name="genericintl"/> Template:Btn<ref name="genericintl"/> Windows/Linux Template:Key Template:Code<ref name="genericintl"/>
macOS Template:Key
Template:Code<ref name="genericintl"/> Template:Btn<ref name="genericintl"/> Template:Key Template:Code<ref name="genericintl"/>
Template:Code<ref name="genericintl"/> Template:Btn<ref name="genericintl"/> Template:Key Template:Code<ref name="genericintl"/>
Template:Code<ref name="genericintl"/> Template:Btn<ref name="genericintl"/> Template:KeyTemplate:Note Template:Code<ref name="genericintl"/>
Template:Code<ref name="genericintl"/> Template:Btn<ref name="genericintl"/> Template:Key (JIS) / Template:Key (ABNT) Template:Code<ref name="genericintl"/>
Template:Code<ref name="genericintl"/> Template:Btn<ref name="genericintl"/> Template:Key Template:Code<ref name="genericintl"/>
Template:Code<ref name="genericintl"/> Template:Btn<ref name="genericintl"/> Template:Key Template:Code<ref name="genericintl"/>
Template:Code<ref name="genericintl"/> Template:Btn<ref name="genericintl"/> Template:Key Template:Code<ref name="genericintl"/>
Template:Code<ref name="genericintl"/> Template:Btn<ref name="genericintl"/> Template:Key Template:Code<ref name="genericintl"/>
Template:Code<ref name="generic9800">Template:Bug</ref> Template:Btn<ref name="generic9800"/> Template:Key (PC-9800)Template:Note Template:Code<ref name="generic9800"/>
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:KeyTemplate:Note Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key<ref>Template:Bug</ref> Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:KeyTemplate:Note Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:KeyTemplate:Note Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:KeyTemplate:Note Template:Code
Template:Code Template:Btn Template:Note Template:Code
Template:Code Template:Btn Template:Note Template:Code
Template:Code Template:Btn Template:Note Template:Code
Template:Code Template:Btn Template:Note Template:Code
Template:Code Template:Btn Template:NoteTemplate:Note Template:Code
Template:Code Template:Btn Template:Note Template:Code
Template:Code Template:BtnTemplate:Note Undefined key IDs Template:Code

Unused

Minecraft includes IDs and translation strings for all named SDL3 key IDs, even those which are not present in the key binding files for any supported operating system, and therefore cannot be accessed.

These can be set via modifying Template:Code manually, but will not be triggerable due to the lack of an associated key.

Keys such as Escape may warrant inclusion here. It may also be worth creating a table for accidentally-unassignable keys.

IDTemplate:Note Displayed name Notes
Template:Code Template:Btn
Template:Code Template:Btn This is a mobile phone button.<ref name="SDLmasterlist">https://wiki.libsdl.org/SDL3/SDL_Scancode</ref>
Template:Code Template:Btn
Template:Code Template:Btn
Template:Code Template:Btn
Template:Code Template:Btn
Template:Code Template:Btn
Template:Code Template:Btn This is a mobile phone button.<ref name="SDLmasterlist"/>
Template:Code Template:Btn
Template:Code Template:Btn
Template:Code Template:Btn
Template:Code Template:Btn
Template:Code Template:Btn
Template:Code Template:Btn
Template:Code Template:Btn
Template:Code Template:Btn
Template:Code Template:Btn
Template:Code Template:Btn
Template:Code Template:Btn
Template:Code Template:Btn
Template:Code Template:Btn
Template:Code Template:Btn
Template:Code Template:Btn
Template:Code Template:Btn
Template:Code Template:Btn
Template:Code Template:Btn
Template:Code Template:Btn
Template:Code Template:Btn
Template:Code Template:Btn
Template:Code Template:Btn
Template:Code Template:Btn
Template:Code Template:Btn
Template:Code Template:Btn
Template:Code Template:Btn
Template:Code Template:Btn
Template:Code Template:Btn
Template:Code Template:Btn
Template:Code Template:Btn
Template:Code Template:Btn
Template:Code Template:Btn
Template:Code Template:Btn
Template:Code Template:Btn
Template:Code Template:Btn
Template:Code Template:Btn
Template:Code Template:Btn
Template:Code Template:Btn
Template:Code Template:Btn
Template:Code Template:Btn
Template:Code Template:Btn
Template:Code Template:Btn
Template:Code Template:Btn
Template:Code Template:Btn
Template:Code Template:Btn
Template:Code Template:Btn
Template:Code Template:Btn
Template:Code Template:Btn
Template:Code Template:Btn
Template:Code Template:Btn
Template:Code Template:Btn
Template:Code Template:Btn
Template:Code Template:Btn
Template:Code Template:Btn
Template:Code Template:Btn This is a mobile phone button.<ref name="SDLmasterlist"/>
Template:Code Template:Btn This is a mobile phone button.<ref name="SDLmasterlist"/>
Template:Code Template:Btn
Template:Code Template:Btn Represents "Non-US Hash", which in practice is always pointed to the same code as the ANSI backslash.

Mouse codes

Mouse buttons are handled as a signed 32-bit integer, meaning that through editing options.txt, values from Template:Code to Template:Code can be specified without being rejected by the game as invalid.<ref>Template:Bug</ref> However, the USB HID specification only permits mouse buttons from 1 to 65535,<ref>https://www.usb.org/sites/default/files/documents/hut1_12v2.pdf</ref> meaning that all negative values and the vast majority of the positive values can never actually be assigned to in-game actions without file editing.

On Linux, mouse buttons up to 48 can be specified (evdev key press events 272 to 319) - it is not known if any supported operating systems support a 49th or higher mouse button as input. The maximum mouse button on macOS is 32,<ref>according to what karabiner-elements allows: https://discord.com/channels/647810384031645728/648555495564509184/1528136787434930358</ref> and the maximum mouse button on Windows is 5.

For the first three mouse buttons, the translation keys match the key IDs; all other buttons follow a generic template.

ID Displayed name Description Usable on
Windows macOS Linux
Template:CodeTemplate:Note Template:Btn Template:Mouse Template:Tc Template:Tc Template:Tc
Template:CodeTemplate:Note Template:Btn Template:Mouse Template:Tc Template:Tc Template:Tc
Template:CodeTemplate:Note Template:Btn Template:Mouse Template:Tc Template:Tc Template:Tc
Template:Code Template:Btn Template:Mouse Template:Tc Template:Tc Template:Tc
Template:Code Template:Btn Template:Mouse Template:Tc Template:Tc Template:Tc
Template:Code Template:Btn Template:Mouse Template:Tc Template:Tc Template:Tc
Template:Code Template:Btn Template:Mouse Template:Tc Template:Tc Template:Tc
Template:Code Template:Btn Template:Mouse Template:Tc Template:Tc Template:Tc
Template:Code Template:Btn Template:Mouse Template:Tc Template:Tc Template:Tc
Template:Code Template:Btn Template:Mouse Template:Tc Template:Tc Template:Tc
Template:Code Template:Btn Template:Mouse Template:Tc Template:Tc Template:Tc
Template:Code Template:Btn Template:Mouse Template:Tc Template:Tc Template:Tc
Template:Code Template:Btn Template:Mouse Template:Tc Template:Tc Template:Tc
Template:Code Template:Btn Template:Mouse Template:Tc Template:Tc Template:Tc
Template:Code Template:Btn Template:Mouse Template:Tc Template:Tc Template:Tc
Template:Code Template:Btn Template:Mouse Template:Tc Template:Tc Template:Tc
Template:Code Template:Btn Template:Mouse Template:Tc Template:Tc Template:Tc
Template:Code Template:Btn Template:Mouse Template:Tc Template:Tc Template:Tc
Template:Code Template:Btn Template:Mouse Template:Tc Template:Tc Template:Tc
Template:Code Template:Btn Template:Mouse Template:Tc Template:Tc Template:Tc
Template:Code Template:Btn Template:Mouse Template:Tc Template:Tc Template:Tc
Template:Code Template:Btn Template:Mouse Template:Tc Template:Tc Template:Tc
Template:Code Template:Btn Template:Mouse Template:Tc Template:Tc Template:Tc
Template:Code Template:Btn Template:Mouse Template:Tc Template:Tc Template:Tc
Template:Code Template:Btn Template:Mouse Template:Tc Template:Tc Template:Tc
Template:Code Template:Btn Template:Mouse Template:Tc Template:Tc Template:Tc
Template:Code Template:Btn Template:Mouse Template:Tc Template:Tc Template:Tc
Template:Code Template:Btn Template:Mouse Template:Tc Template:Tc Template:Tc
Template:Code Template:Btn Template:Mouse Template:Tc Template:Tc Template:Tc
Template:Code Template:Btn Template:Mouse Template:Tc Template:Tc Template:Tc
Template:Code Template:Btn Template:Mouse Template:Tc Template:Tc Template:Tc
Template:Code Template:Btn Template:Mouse Template:Tc Template:Tc Template:Tc
Template:Code Template:Btn Template:Mouse Template:Tc Template:Tc Template:Tc
Template:Code Template:Btn Template:Mouse Template:Tc Template:Tc Template:Tc
Template:Code Template:Btn Template:Mouse Template:Tc Template:Tc Template:Tc
Template:Code Template:Btn Template:Mouse Template:Tc Template:Tc Template:Tc
Template:Code Template:Btn Template:Mouse Template:Tc Template:Tc Template:Tc
Template:Code Template:Btn Template:Mouse Template:Tc Template:Tc Template:Tc
Template:Code Template:Btn Template:Mouse Template:Tc Template:Tc Template:Tc
Template:Code Template:Btn Template:Mouse Template:Tc Template:Tc Template:Tc
Template:Code Template:Btn Template:Mouse Template:Tc Template:Tc Template:Tc
Template:Code Template:Btn Template:Mouse Template:Tc Template:Tc Template:Tc
Template:Code Template:Btn Template:Mouse Template:Tc Template:Tc Template:Tc
Template:Code Template:Btn Template:Mouse Template:Tc Template:Tc Template:Tc
Template:Code Template:Btn Template:Mouse Template:Tc Template:Tc Template:Tc
Template:Code Template:Btn Template:Mouse Template:Tc Template:Tc Template:Tc
Template:Code Template:Btn Template:Mouse Template:Tc Template:Tc Template:Tc
Template:Code Template:Btn Template:Mouse Template:Tc Template:Tc Template:Tc

Bedrock Edition

Keyboard codes

Template:Info needed section Template:Cleanup In Template:BE, keys are stored as the decimal representation of their Windows virtual key code. This also includes platforms other than Windows, where keys are loosely mapped to these key codes.

On Android, the majority of non-basic keys are not recognized, and the Menu key is mapped to unknown (255).

Some numbers are skipped because they are reserved or not assigned. By modifying options.txt, you can force the game to show these numbers (prefixed with "Button"), but they are unobtainable by pressing a key. The virtual key code specification also provides numbers for buttons on the mouse. However, mouse buttons are not stored as those numbers.

Multiple keys can be bound to the same action by separating their key codes with a comma in options.txt. There is not a way to do this in-game. For example, the default value in options.txt for opening the chat is Template:Cd, representing both Template:Key and Template:Key.

ID Displayed name Physical key or button Translation key
Template:Code Template:Btn Not Bound Template:Info needed
Template:Code Template:BtnTemplate:Note<ref>Template:Bug</ref> Template:KeyTemplate:Note
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key
Template:Code Template:Btn Template:Key / Template:Key Template:Code
Template:Code Template:Btn Template:Key / Template:Key Template:Code
Template:Code Template:Btn Template:Key / Template:Key Template:Code
Template:Code Template:Btn Template:Key / Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:KeyTemplate:Verify / Template:Key
Template:Code Template:Btn Template:Key
Template:Code Template:Btn Template:Key
Template:Code Template:Btn Template:Key
Template:Code Template:Btn Template:Key / Template:KeyTemplate:Verify
Template:Code Template:Btn Template:Key
Template:Code Template:Btn Cannot be assignedTemplate:Note Template:Code
Template:Code Template:Btn Template:Key
Template:Code Template:Btn Template:Key
Template:Code Template:Btn Template:Key
Template:Code Template:Btn Template:Key
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key
Template:Code Template:Btn Template:Key
Template:Code Template:Btn Template:Key
Template:Code Template:Btn Template:Key
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key / Template:Key / Template:Key
Template:Code Template:Btn Template:Key / Template:Key
Template:Code Template:Btn Template:Key
Template:Code Template:Btn Template:Key
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key
Template:Code Template:Btn Template:Key
Template:Code Template:Btn Template:Key
Template:Code Template:Btn Template:Key
Template:Code Template:Btn Template:Key
Template:Code Template:Btn Template:Key
Template:Code Template:Btn Template:Key
Template:Code Template:Btn Template:Key
Template:Code Template:Btn Template:Key
Template:Code Template:Btn Template:Key
Template:Code Template:Btn Template:Key
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn OEM-SpecificTemplate:Note
Template:Code Template:Btn OEM-SpecificTemplate:Note
Template:Code Template:Btn OEM-SpecificTemplate:Note
Template:Code Template:Btn OEM-SpecificTemplate:Note
Template:Code Template:Btn OEM-SpecificTemplate:Note
Template:Code Template:Btn Template:Key
Template:Code Template:Btn Template:Key
Template:Code Template:Btn Template:Key
Template:Code Template:Btn Template:Key
Template:Code Template:Btn Template:Key
Template:Code Template:Btn Template:Key
Template:Code Template:Btn Template:Key
Template:Code Template:Btn Template:Key
Template:Code Template:Btn Template:Key
Template:Code Template:Btn Template:Key
Template:Code Template:Btn Template:Key
Template:Code Template:Btn Template:Key
Template:Code Template:Btn Template:Key
Template:Code Template:Btn Template:Key
Template:Code Template:Btn Template:Key
Template:Code Template:Btn Template:Key
Template:Code Template:Btn Template:Key
Template:Code Template:Btn Template:Key
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:More info
Template:Code Template:Btn Template:Key
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:KeyTemplate:Info needed Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn Template:Key Template:Code
Template:Code Template:Btn OEM-SpecificTemplate:Note
Template:Code Template:Btn OEM-SpecificTemplate:Note
Template:Code Template:Btn OEM-SpecificTemplate:Note
Template:Code Template:Btn OEM-SpecificTemplate:Note
Template:Code Template:Btn OEM-SpecificTemplate:Note
Template:Code Template:Btn Template:Key
Template:Code Template:Btn OEM-SpecificTemplate:Note
Template:Code Template:Btn Template:Info needed
Template:Code Template:Btn OEM-SpecificTemplate:Note
Template:Code Template:Btn OEM-SpecificTemplate:Note
Template:Code Template:Btn OEM-SpecificTemplate:Note
Template:Code Template:Btn OEM-SpecificTemplate:Note
Template:Code Template:Btn OEM-SpecificTemplate:Note
Template:Code Template:Btn OEM-SpecificTemplate:Note
Template:Code Template:Btn OEM-SpecificTemplate:Note
Template:Code Template:Btn OEM-SpecificTemplate:Note
Template:Code Template:Btn OEM-SpecificTemplate:Note
Template:Code Template:Btn OEM-SpecificTemplate:Note
Template:Code Template:Btn OEM-SpecificTemplate:Note
Template:Code Template:Btn OEM-SpecificTemplate:Note
Template:Code Template:Btn OEM-SpecificTemplate:Note
Template:Code Template:Btn Template:Key
Template:Code Template:Btn Template:Key
Template:Code Template:Btn Template:Key
Template:Code Template:Btn Template:Key
Template:Code Template:Btn Template:Key
Template:Code Template:Btn Template:Key
Template:Code Template:Btn Template:Key
Template:Code Template:Btn Template:Key
Template:Code Template:Btn All unknown keys

Mouse codes

Template:Info needed section

Mouse buttons are represented by negative numbers.

On Android, only 3 buttons are recognized, despite the OS supporting up to 5 buttons.

ID Displayed name Description
Template:Code Template:Btn Template:Mouse
Template:Code Template:Btn Template:Mouse
Template:Code Template:Btn Template:Mouse
Template:Code Template:Btn Template:Mouse
Template:Code Template:Btn Template:Mouse

Controller codes

Template:Info needed section

ID Display Description
Template:OS Template:OS Template:OS
Template:OS Template:OS
Template:Code Not Bound
Template:Code Template:Ore UI Cont Template:Ore UI Cont Template:Ore UI Cont Template:Ore UI Cont A
Template:Code Template:Ore UI Cont Template:Ore UI Cont Template:Ore UI Cont Template:Ore UI Cont B
Template:Code Template:Ore UI Cont Template:Ore UI Cont Template:Ore UI Cont Template:Ore UI Cont X
Template:Code Template:Ore UI Cont Template:Ore UI Cont Template:Ore UI Cont Template:Ore UI Cont Y
Template:Code Template:Ore UI Cont Template:Ore UI Cont/Template:Ore UI Cont Template:Ore UI Cont D-Pad Up
Template:Code Template:Ore UI Cont Template:Ore UI Cont/Template:Ore UI Cont Template:Ore UI Cont D-Pad Down
Template:Code Template:Ore UI Cont Template:Ore UI Cont/Template:Ore UI Cont Template:Ore UI Cont D-Pad Left
Template:Code Template:Ore UI Cont Template:Ore UI Cont/Template:Ore UI Cont Template:Ore UI Cont D-Pad Right
Template:Code Template:Ore UI Cont Template:Ore UI Cont Template:Ore UI Cont Left Stick Click
Template:Code Template:Ore UI Cont Template:Ore UI Cont Template:Ore UI Cont Right Stick Click
Template:Code Template:Ore UI Cont Template:Ore UI Cont Template:Ore UI Cont Left Bumper
Template:Code Template:Ore UI Cont Template:Ore UI Cont Template:Ore UI Cont Right Bumper
Template:Code Template:Ore UI Cont Template:Ore UI Cont Template:Ore UI Cont Template:Ore UI Cont Select
Template:Code Template:Ore UI Cont Template:Ore UI Cont Template:Ore UI Cont Template:Ore UI Cont Menu
Template:Code Template:Ore UI Cont Template:Ore UI Cont Template:Ore UI Cont Left Stick Down
Template:Code Template:Ore UI Cont Template:Ore UI Cont Template:Ore UI Cont Left Stick Right
Template:Code Template:Ore UI Cont Template:Ore UI Cont Template:Ore UI Cont Left Stick Left
Template:Code Template:Ore UI Cont Template:Ore UI Cont Template:Ore UI Cont Left Stick Up
Template:Code Template:Ore UI Cont Template:Ore UI Cont Template:Ore UI Cont Left Trigger
Template:Code Template:Ore UI Cont Template:Ore UI Cont Template:Ore UI Cont Right Trigger

History

Java Edition

Template:HistoryTable

Removed keys

ID Displayed name Physical key or button Translation key
Template:Code Template:Btn UnclearTemplate:Note Template:Code

Notes

Template:Notelist

References

Template:Reflist

Navigation

Template:Navbox input

Minecraft:fr:Codes de touche Minecraft:hu:Billentyűkódok Minecraft:ja:キーコード Minecraft:nl:Toetscodes Minecraft:pt:Códigos de teclas Minecraft:ru:Коды клавиш Minecraft:uk:Коди клавіш Minecraft:zh:键控代码