Minecraft:Key codes: Difference between revisions
More actions
Sync: updated from Minecraft |
Sync: updated from Minecraft |
||
| Line 1: | Line 1: | ||
{{for|other uses|Key}} | {{for|other uses|Key}} | ||
{{missing information|Bedrock Edition keycodes for both keyboard and controller}} | {{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 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"}} | This is a list of '''key codes''' used by ''[[Minecraft:Minecraft]]'', which are used in configuration files such as the [[Minecraft: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'' == | ||
| Line 8: | Line 8: | ||
=== Keyboard codes === | === Keyboard codes === | ||
{{for|keys which controls can be bound to, but do not display a proper name|Java Edition untranslated keys}} | {{for|keys which controls can be bound to, but do not display a proper name|Java Edition untranslated keys}} | ||
{| class="wikitable" | |||
! | The displayed names of several keys will change depending on the currently active system keyboard layout. The values displayed in this table assume standard en-US. | ||
{| class="wikitable" data-description="Mouse button IDs" style="margin-left:auto; margin-right:auto" | |||
! ID | |||
! Displayed name | |||
! Description | |||
! Translation key | |||
|- | |- | ||
|key.keyboard. | ! {{code|key.keyboard.unknown}} | ||
| style="text-align:center; font-family:Minecraft" | Not Bound | |||
| Actions with no key assigned{{note|Also used by keys unrecognised by SDL3, see {{bug|MC-310108}}{{upcoming|java 26.3}}}} | |||
| style="text-align:center" | {{code|key.keyboard.unknown}} | |||
|- | |- | ||
|key.keyboard. | ! {{code|key.keyboard.0}} | ||
| style="text-align:center; font-family:Minecraft" | 0 | |||
| Alphanumeric section "zero" key | |||
| style="text-align:center" | {{note|name=single-character|If the internal name of the key code is only one character, there is no translation key and Minecraft will simply display that character. This applies to all letters and numbers.}} | |||
|- | |- | ||
|key.keyboard. | ! {{code|key.keyboard.1}} | ||
| style="text-align:center; font-family:Minecraft" | 1 | |||
| Alphanumeric section "one" key | |||
| style="text-align:center" | {{note|name=single-character}} | |||
|- | |- | ||
|key.keyboard. | ! {{code|key.keyboard.2}} | ||
| style="text-align:center; font-family:Minecraft" | 2 | |||
| Alphanumeric section "two" key | |||
| style="text-align:center" | {{note|name=single-character}} | |||
|- | |- | ||
|key.keyboard. | ! {{code|key.keyboard.3}} | ||
| style="text-align:center; font-family:Minecraft" | 3 | |||
| Alphanumeric section "three" key | |||
| style="text-align:center" | {{note|name=single-character}} | |||
|- | |- | ||
|key.keyboard. | ! {{code|key.keyboard.4}} | ||
| style="text-align:center; font-family:Minecraft" | 4 | |||
| Alphanumeric section "four" key | |||
| style="text-align:center" | {{note|name=single-character}} | |||
|- | |- | ||
|key.keyboard. | ! {{code|key.keyboard.5}} | ||
| style="text-align:center; font-family:Minecraft" | 5 | |||
| Alphanumeric section "five" key | |||
| style="text-align:center" | {{note|name=single-character}} | |||
|- | |- | ||
|key.keyboard. | ! {{code|key.keyboard.6}} | ||
| style="text-align:center; font-family:Minecraft" | 6 | |||
| Alphanumeric section "six" key | |||
| style="text-align:center" | {{note|name=single-character}} | |||
|- | |- | ||
|key.keyboard. | ! {{code|key.keyboard.7}} | ||
| style="text-align:center; font-family:Minecraft" | 7 | |||
| Alphanumeric section "seven" key | |||
| style="text-align:center" | {{note|name=single-character}} | |||
|- | |- | ||
|key.keyboard. | ! {{code|key.keyboard.8}} | ||
| style="text-align:center; font-family:Minecraft" | 8 | |||
| Alphanumeric section "eight" key | |||
| style="text-align:center" | {{note|name=single-character}} | |||
|- | |- | ||
|key.keyboard. | ! {{code|key.keyboard.9}} | ||
| style="text-align:center; font-family:Minecraft" | 9 | |||
| Alphanumeric section "nine" key | |||
| style="text-align:center" | {{note|name=single-character}} | |||
|- | |- | ||
|key.keyboard. | ! {{code|key.keyboard.a}} | ||
| style="text-align:center; font-family:Minecraft" | A | |||
| Alphanumeric section "A" key | |||
| style="text-align:center" | {{note|name=single-character}} | |||
|- | |- | ||
|key.keyboard. | ! {{code|key.keyboard.b}} | ||
| style="text-align:center; font-family:Minecraft" | B | |||
| Alphanumeric section "B" key | |||
| style="text-align:center" | {{note|name=single-character}} | |||
|- | |- | ||
|key.keyboard. | ! {{code|key.keyboard.c}} | ||
| style="text-align:center; font-family:Minecraft" | C | |||
| Alphanumeric section "C" key | |||
| style="text-align:center" | {{note|name=single-character}} | |||
|- | |- | ||
|key.keyboard. | ! {{code|key.keyboard.d}} | ||
| style="text-align:center; font-family:Minecraft" | D | |||
| Alphanumeric section "D" key | |||
| style="text-align:center" | {{note|name=single-character}} | |||
|- | |- | ||
|key.keyboard. | ! {{code|key.keyboard.e}} | ||
| style="text-align:center; font-family:Minecraft" | E | |||
| Alphanumeric section "E" key | |||
| style="text-align:center" | {{note|name=single-character}} | |||
|- | |- | ||
|key.keyboard. | ! {{code|key.keyboard.f}} | ||
| style="text-align:center; font-family:Minecraft" | F | |||
| Alphanumeric section "F" key | |||
| style="text-align:center" | {{note|name=single-character}} | |||
|- | |- | ||
|key.keyboard. | ! {{code|key.keyboard.g}} | ||
| style="text-align:center; font-family:Minecraft" | G | |||
| Alphanumeric section "G" key | |||
| style="text-align:center" | {{note|name=single-character}} | |||
|- | |- | ||
|key.keyboard. | ! {{code|key.keyboard.h}} | ||
| style="text-align:center; font-family:Minecraft" | H | |||
| Alphanumeric section "H" key | |||
| style="text-align:center" | {{note|name=single-character}} | |||
|- | |- | ||
|key.keyboard. | ! {{code|key.keyboard.i}} | ||
| style="text-align:center; font-family:Minecraft" | I | |||
| Alphanumeric section "I" key | |||
| style="text-align:center" | {{note|name=single-character}} | |||
|- | |- | ||
|key.keyboard. | ! {{code|key.keyboard.j}} | ||
| style="text-align:center; font-family:Minecraft" | J | |||
| Alphanumeric section "J" key | |||
| style="text-align:center" | {{note|name=single-character}} | |||
|- | |- | ||
|key.keyboard. | ! {{code|key.keyboard.k}} | ||
| style="text-align:center; font-family:Minecraft" | K | |||
| Alphanumeric section "K" key | |||
| style="text-align:center" | {{note|name=single-character}} | |||
|- | |- | ||
|key.keyboard. | ! {{code|key.keyboard.l}} | ||
| style="text-align:center; font-family:Minecraft" | L | |||
| Alphanumeric section "L" key | |||
| style="text-align:center" | {{note|name=single-character}} | |||
|- | |- | ||
|key.keyboard. | ! {{code|key.keyboard.m}} | ||
| style="text-align:center; font-family:Minecraft" | M | |||
| Alphanumeric section "M" key | |||
| style="text-align:center" | {{note|name=single-character}} | |||
|- | |- | ||
|key.keyboard. | ! {{code|key.keyboard.n}} | ||
| style="text-align:center; font-family:Minecraft" | N | |||
| Alphanumeric section "N" key | |||
| style="text-align:center" | {{note|name=single-character}} | |||
|- | |- | ||
|key.keyboard. | ! {{code|key.keyboard.o}} | ||
| style="text-align:center; font-family:Minecraft" | O | |||
| Alphanumeric section "O" key | |||
| style="text-align:center" | {{note|name=single-character}} | |||
|- | |- | ||
|key.keyboard. | ! {{code|key.keyboard.p}} | ||
| style="text-align:center; font-family:Minecraft" | P | |||
| Alphanumeric section "P" key | |||
| style="text-align:center" | {{note|name=single-character}} | |||
|- | |- | ||
|key.keyboard. | ! {{code|key.keyboard.q}} | ||
| style="text-align:center; font-family:Minecraft" | Q | |||
| Alphanumeric section "Q" key | |||
| style="text-align:center" | {{note|name=single-character}} | |||
|- | |- | ||
|key.keyboard. | ! {{code|key.keyboard.r}} | ||
| style="text-align:center; font-family:Minecraft" | R | |||
| Alphanumeric section "R" key | |||
| style="text-align:center" | {{note|name=single-character}} | |||
|- | |- | ||
|key.keyboard. | ! {{code|key.keyboard.s}} | ||
| style="text-align:center; font-family:Minecraft" | S | |||
| Alphanumeric section "S" key | |||
| style="text-align:center" | {{note|name=single-character}} | |||
|- | |- | ||
|key.keyboard. | ! {{code|key.keyboard.t}} | ||
| style="text-align:center; font-family:Minecraft" | T | |||
| Alphanumeric section "T" key | |||
| style="text-align:center" | {{note|name=single-character}} | |||
|- | |- | ||
|key.keyboard. | ! {{code|key.keyboard.u}} | ||
| style="text-align:center; font-family:Minecraft" | U | |||
| Alphanumeric section "U" key | |||
| style="text-align:center" | {{note|name=single-character}} | |||
|- | |- | ||
|key.keyboard. | ! {{code|key.keyboard.v}} | ||
| style="text-align:center; font-family:Minecraft" | V | |||
| Alphanumeric section "V" key | |||
| style="text-align:center" | {{note|name=single-character}} | |||
|- | |- | ||
|key.keyboard. | ! {{code|key.keyboard.w}} | ||
| style="text-align:center; font-family:Minecraft" | W | |||
| Alphanumeric section "W" key | |||
| style="text-align:center" | {{note|name=single-character}} | |||
|- | |- | ||
|key.keyboard. | ! {{code|key.keyboard.x}} | ||
| style="text-align:center; font-family:Minecraft" | X | |||
| Alphanumeric section "X" key | |||
| style="text-align:center" | {{note|name=single-character}} | |||
|- | |- | ||
|key.keyboard. | ! {{code|key.keyboard.y}} | ||
| style="text-align:center; font-family:Minecraft" | Y | |||
| Alphanumeric section "Y" key | |||
| style="text-align:center" | {{note|name=single-character}} | |||
|- | |- | ||
|key.keyboard. | ! {{code|key.keyboard.z}} | ||
| style="text-align:center; font-family:Minecraft" | Z | |||
| Alphanumeric section "Z" key | |||
| style="text-align:center" | {{note|name=single-character}} | |||
|- | |- | ||
|key.keyboard. | ! {{code|key.keyboard.f1}} | ||
| style="text-align:center; font-family:Minecraft" | F1 | |||
| First function key | |||
| style="text-align:center" | {{code|key.keyboard.f1}} | |||
|- | |- | ||
|key.keyboard. | ! {{code|key.keyboard.f2}} | ||
| style="text-align:center; font-family:Minecraft" | F2 | |||
| Second function key | |||
| style="text-align:center" | {{code|key.keyboard.f2}} | |||
|- | |- | ||
|key.keyboard. | ! {{code|key.keyboard.f3}} | ||
| style="text-align:center; font-family:Minecraft" | F3 | |||
| Third function key | |||
| style="text-align:center" | {{code|key.keyboard.f3}} | |||
|- | |- | ||
|key.keyboard. | ! {{code|key.keyboard.f4}} | ||
| style="text-align:center; font-family:Minecraft" | F4 | |||
| Fourth function key | |||
| style="text-align:center" | {{code|key.keyboard.f4}} | |||
|- | |- | ||
|key.keyboard. | ! {{code|key.keyboard.f5}} | ||
| style="text-align:center; font-family:Minecraft" | F5 | |||
| Fifth function key | |||
| style="text-align:center" | {{code|key.keyboard.f5}} | |||
|- | |- | ||
|key.keyboard. | ! {{code|key.keyboard.f6}} | ||
| style="text-align:center; font-family:Minecraft" | F6 | |||
| Sixth function key | |||
| style="text-align:center" | {{code|key.keyboard.f6}} | |||
|- | |- | ||
|key.keyboard. | ! {{code|key.keyboard.f7}} | ||
| style="text-align:center; font-family:Minecraft" | F7 | |||
| Seventh function key | |||
| style="text-align:center" | {{code|key.keyboard.f7}} | |||
|- | |- | ||
|key.keyboard. | ! {{code|key.keyboard.f8}} | ||
| style="text-align:center; font-family:Minecraft" | F8 | |||
| Eighth function key | |||
| style="text-align:center" | {{code|key.keyboard.f8}} | |||
|- | |- | ||
|key.keyboard. | ! {{code|key.keyboard.f9}} | ||
| style="text-align:center; font-family:Minecraft" | F9 | |||
| Ninth function key | |||
| style="text-align:center" | {{code|key.keyboard.f9}} | |||
|- | |- | ||
|key.keyboard. | ! {{code|key.keyboard.f10}} | ||
| style="text-align:center; font-family:Minecraft" | F10 | |||
| Tenth function key | |||
| style="text-align:center" | {{code|key.keyboard.f10}} | |||
|- | |- | ||
|key.keyboard. | ! {{code|key.keyboard.f11}} | ||
| style="text-align:center; font-family:Minecraft" | F11 | |||
| Eleventh function key | |||
| style="text-align:center" | {{code|key.keyboard.f11}} | |||
|- | |- | ||
|key.keyboard. | ! {{code|key.keyboard.f12}} | ||
| style="text-align:center; font-family:Minecraft" | F12 | |||
| Twelfth function key | |||
| style="text-align:center" | {{code|key.keyboard.f12}} | |||
|- | |- | ||
|key.keyboard. | ! {{code|key.keyboard.f13}} | ||
| style="text-align:center; font-family:Minecraft" | F13 | |||
| Thirteenth function key | |||
| style="text-align:center" | {{code|key.keyboard.f13}} | |||
|- | |- | ||
|key.keyboard. | ! {{code|key.keyboard.f14}} | ||
| style="text-align:center; font-family:Minecraft" | F14 | |||
| Fourteenth function key | |||
| style="text-align:center" | {{code|key.keyboard.f14}} | |||
|- | |- | ||
|key.keyboard. | ! {{code|key.keyboard.f15}} | ||
| style="text-align:center; font-family:Minecraft" | F15 | |||
| Fifteenth function key | |||
| style="text-align:center" | {{code|key.keyboard.f15}} | |||
|- | |- | ||
|key.keyboard. | ! {{code|key.keyboard.f16}} | ||
| style="text-align:center; font-family:Minecraft" | F16 | |||
| Sixteenth function key | |||
| style="text-align:center" | {{code|key.keyboard.f16}} | |||
|- | |- | ||
|key.keyboard. | ! {{code|key.keyboard.f17}} | ||
| style="text-align:center; font-family:Minecraft" | F17 | |||
| Seventeenth function key | |||
| style="text-align:center" | {{code|key.keyboard.f17}} | |||
|- | |- | ||
|key.keyboard. | ! {{code|key.keyboard.f18}} | ||
| style="text-align:center; font-family:Minecraft" | F18 | |||
| Eighteenth function key | |||
| style="text-align:center" | {{code|key.keyboard.f18}} | |||
|- | |- | ||
|key.keyboard. | ! {{code|key.keyboard.f19}} | ||
| style="text-align:center; font-family:Minecraft" | F19 | |||
| Nineteenth function key | |||
| style="text-align:center" | {{code|key.keyboard.f19}} | |||
|- | |- | ||
|key.keyboard. | ! {{code|key.keyboard.f20}} | ||
| style="text-align:center; font-family:Minecraft" | F20 | |||
| Twentieth function key | |||
| style="text-align:center" | {{code|key.keyboard.f20}} | |||
|- | |- | ||
|key.keyboard. | ! {{code|key.keyboard.f21}} | ||
| style="text-align:center; font-family:Minecraft" | F21 | |||
| Twenty-first function key | |||
| style="text-align:center" | {{code|key.keyboard.f21}} | |||
|- | |- | ||
|key.keyboard. | ! {{code|key.keyboard.f22}} | ||
| style="text-align:center; font-family:Minecraft" | F22 | |||
| Twenty-second function key | |||
| style="text-align:center" | {{code|key.keyboard.f22}} | |||
|- | |- | ||
|key.keyboard. | ! {{code|key.keyboard.f23}} | ||
| style="text-align:center; font-family:Minecraft" | F23 | |||
| Twenty-third function key | |||
| style="text-align:center" | {{code|key.keyboard.f23}} | |||
|- | |- | ||
|key.keyboard. | ! {{code|key.keyboard.f24}} | ||
| style="text-align:center; font-family:Minecraft" | F24 | |||
| Twenty-fourth function key | |||
| style="text-align:center" | {{code|key.keyboard.f24}} | |||
|- | |- | ||
|key.keyboard. | ! {{code|key.keyboard.f25}}{{until|java 26.3}} | ||
| style="text-align:center; font-family:Minecraft" | F25 | |||
| Purpose unclear{{note|Ostensibly for a twenty-fifth function key, but Windows, Linux and presumably macOS only recognise up to F24. Some keyboards from decades past go past F24, and Arch Linux can apparently recognise up to F246, however it is unknown if Minecraft would recognise either of these.}} | |||
| style="text-align:center" | {{code|key.keyboard.f25}}{{until|java 26.3}} | |||
|- | |- | ||
|key.keyboard.keypad.0 || | ! {{code|key.keyboard.keypad.0}} | ||
| style="text-align:center; font-family:Minecraft" | 0{{until|java 26.3}}<br>Keypad 0{{upcoming|java 26.3}} | |||
| Numeric keypad "zero" key | |||
| style="text-align:center" | {{code|key.keyboard.keypad.0}} | |||
|- | |- | ||
|key.keyboard.keypad.1 || | ! {{code|key.keyboard.keypad.1}} | ||
| style="text-align:center; font-family:Minecraft" | 1{{until|java 26.3}}<br>Keypad 1{{upcoming|java 26.3}} | |||
| Numeric keypad "one" key | |||
| style="text-align:center" | {{code|key.keyboard.keypad.1}} | |||
|- | |- | ||
|key.keyboard.keypad.2 || | ! {{code|key.keyboard.keypad.2}} | ||
| style="text-align:center; font-family:Minecraft" | 2{{until|java 26.3}}<br>Keypad 2{{upcoming|java 26.3}} | |||
| Numeric keypad "two" key | |||
| style="text-align:center" | {{code|key.keyboard.keypad.2}} | |||
|- | |- | ||
|key.keyboard.keypad.3 || | ! {{code|key.keyboard.keypad.3}} | ||
| style="text-align:center; font-family:Minecraft" | 3{{until|java 26.3}}<br>Keypad 3{{upcoming|java 26.3}} | |||
| Numeric keypad "three" key | |||
| style="text-align:center" | {{code|key.keyboard.keypad.3}} | |||
|- | |- | ||
|key.keyboard.keypad.4 || | ! {{code|key.keyboard.keypad.4}} | ||
| style="text-align:center; font-family:Minecraft" | 4{{until|java 26.3}}<br>Keypad 4{{upcoming|java 26.3}} | |||
| Numeric keypad "four" key | |||
| style="text-align:center" | {{code|key.keyboard.keypad.4}} | |||
|- | |- | ||
|key.keyboard.keypad.5 || | ! {{code|key.keyboard.keypad.5}} | ||
| style="text-align:center; font-family:Minecraft" | 5{{until|java 26.3}}<br>Keypad 5{{upcoming|java 26.3}} | |||
| Numeric keypad "five" key | |||
| style="text-align:center" | {{code|key.keyboard.keypad.5}} | |||
|- | |- | ||
|key.keyboard.keypad.6 || | ! {{code|key.keyboard.keypad.6}} | ||
| style="text-align:center; font-family:Minecraft" | 6{{until|java 26.3}}<br>Keypad 6{{upcoming|java 26.3}} | |||
| Numeric keypad "six" key | |||
| style="text-align:center" | {{code|key.keyboard.keypad.6}} | |||
|- | |- | ||
|key.keyboard.keypad.7 || | ! {{code|key.keyboard.keypad.7}} | ||
| style="text-align:center; font-family:Minecraft" | 7{{until|java 26.3}}<br>Keypad 7{{upcoming|java 26.3}} | |||
| Numeric keypad "seven" key | |||
| style="text-align:center" | {{code|key.keyboard.keypad.7}} | |||
|- | |- | ||
|key.keyboard.keypad.8 || | ! {{code|key.keyboard.keypad.8}} | ||
| style="text-align:center; font-family:Minecraft" | 8{{until|java 26.3}}<br>Keypad 8{{upcoming|java 26.3}} | |||
| Numeric keypad "eight" key | |||
| style="text-align:center" | {{code|key.keyboard.keypad.8}} | |||
|- | |- | ||
|key.keyboard.keypad.9 || | ! {{code|key.keyboard.keypad.9}} | ||
| style="text-align:center; font-family:Minecraft" | 9{{until|java 26.3}}<br>Keypad 9{{upcoming|java 26.3}} | |||
| Numeric keypad "nine" key | |||
| style="text-align:center" | {{code|key.keyboard.keypad.9}} | |||
|} | |||
{| 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 | |||
|- | |- | ||
|key.keyboard.keypad.add || colspan="2" | Keypad + | |key.keyboard.keypad.add || colspan="2" | Keypad + | ||
| Line 180: | Line 404: | ||
|- | |- | ||
|key.keyboard.keypad.right.parenthesis{{upcoming|je 26.3}} || colspan="2" | Keypad ) | |key.keyboard.keypad.right.parenthesis{{upcoming|je 26.3}} || colspan="2" | Keypad ) | ||
|- | |||
|key.keyboard.num.lock || colspan="2" | Num Lock | |||
|- | |||
|key.keyboard.caps.lock || colspan="2" | Caps Lock | |||
|- | |||
|key.keyboard.scroll.lock || colspan="2" | Scroll Lock | |||
|- | |- | ||
|key.keyboard.down || colspan="2" | Down Arrow | |key.keyboard.down || colspan="2" | Down Arrow | ||
| Line 248: | Line 478: | ||
|- | |- | ||
|key.keyboard.page.up || colspan="2" | Page Up | |key.keyboard.page.up || colspan="2" | Page Up | ||
|- | |- | ||
|key.keyboard.pause || colspan="2" | Pause | |key.keyboard.pause || colspan="2" | Pause | ||
|- | |- | ||
|key.keyboard.application{{upcoming|je 26.3}} || colspan="2" | Menu | |key.keyboard.application{{upcoming|je 26.3}} || colspan="2" | Menu | ||
| Line 306: | Line 532: | ||
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. | 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. | ||
For the first three mouse buttons, the translation keys match the key IDs; all other buttons follow a generic template. | |||
{| class="wikitable" data-description="Mouse button IDs" style="margin-left:auto; margin-right:auto" | {| class="wikitable" data-description="Mouse button IDs" style="margin-left:auto; margin-right:auto" | ||
! rowspan="2" | ID | ! rowspan="2" | ID | ||
| Line 317: | Line 546: | ||
|- | |- | ||
! {{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 | | style="text-align:center; font-family:Minecraft" | Left Button | ||
| Primary mouse button | | Primary mouse button | ||
! {{tc|Yes}} | ! {{tc|Yes}} | ||
| Line 324: | Line 553: | ||
|- | |- | ||
! {{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 | | style="text-align:center; font-family:Minecraft" | Right Button | ||
| Secondary mouse button | | Secondary mouse button | ||
! {{tc|Yes}} | ! {{tc|Yes}} | ||
| Line 331: | Line 560: | ||
|- | |- | ||
! {{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 | | style="text-align:center; font-family:Minecraft" | Middle Button | ||
| Tertiary mouse button, often the scroll wheel when pressed | | Tertiary mouse button, often<br>the scroll wheel when pressed | ||
! {{tc|Yes}} | ! {{tc|Yes}} | ||
! {{tc|Yes}} | ! {{tc|Yes}} | ||
| Line 338: | Line 567: | ||
|- | |- | ||
! {{code|key.mouse.4}} | ! {{code|key.mouse.4}} | ||
| Button 4 | | style="text-align:center; font-family:Minecraft" | Button 4 | ||
| Fourth mouse button, aka "Back" or XBUTTON1 | | Fourth mouse button,<br>aka "Back" or XBUTTON1 | ||
! {{tc|Yes}} | ! {{tc|Yes}} | ||
! {{tc|Yes}} | ! {{tc|Yes}} | ||
| Line 345: | Line 574: | ||
|- | |- | ||
! {{code|key.mouse.5}} | ! {{code|key.mouse.5}} | ||
| Button 5 | | style="text-align:center; font-family:Minecraft" | Button 5 | ||
| Fifth mouse button, aka "Forward" or XBUTTON2 | | Fifth mouse button,<br>aka "Forward" or XBUTTON2 | ||
! {{tc|Yes}} | ! {{tc|Yes}} | ||
! {{tc|Yes}} | ! {{tc|Yes}} | ||
| Line 352: | Line 581: | ||
|- | |- | ||
! {{code|key.mouse.6}} | ! {{code|key.mouse.6}} | ||
| Button 6 | | style="text-align:center; font-family:Minecraft" | Button 6 | ||
| Sixth mouse button | | Sixth mouse button | ||
! {{tc|No}} | ! {{tc|No}} | ||
| Line 359: | Line 588: | ||
|- | |- | ||
! {{code|key.mouse.7}} | ! {{code|key.mouse.7}} | ||
| Button 7 | | style="text-align:center; font-family:Minecraft" | Button 7 | ||
| Seventh mouse button | | Seventh mouse button | ||
! {{tc|No}} | ! {{tc|No}} | ||
| Line 366: | Line 595: | ||
|- | |- | ||
! {{code|key.mouse.8}} | ! {{code|key.mouse.8}} | ||
| Button 8 | | style="text-align:center; font-family:Minecraft" | Button 8 | ||
| Eighth mouse button | | Eighth mouse button | ||
! {{tc|No}} | ! {{tc|No}} | ||
| Line 373: | Line 602: | ||
|- | |- | ||
! {{code|key.mouse.9}} | ! {{code|key.mouse.9}} | ||
| Button 9 | | style="text-align:center; font-family:Minecraft" | Button 9 | ||
| Ninth mouse button | | Ninth mouse button | ||
! {{tc|No}} | ! {{tc|No}} | ||
| Line 380: | Line 609: | ||
|- | |- | ||
! {{code|key.mouse.10}} | ! {{code|key.mouse.10}} | ||
| Button 10 | | style="text-align:center; font-family:Minecraft" | Button 10 | ||
| Tenth mouse button | | Tenth mouse button | ||
! {{tc|No}} | ! {{tc|No}} | ||
| Line 387: | Line 616: | ||
|- | |- | ||
! {{code|key.mouse.11}} | ! {{code|key.mouse.11}} | ||
| Button 11 | | style="text-align:center; font-family:Minecraft" | Button 11 | ||
| Eleventh mouse button | | Eleventh mouse button | ||
! {{tc|No}} | ! {{tc|No}} | ||
| Line 394: | Line 623: | ||
|- | |- | ||
! {{code|key.mouse.12}} | ! {{code|key.mouse.12}} | ||
| Button 12 | | style="text-align:center; font-family:Minecraft" | Button 12 | ||
| Twelfth mouse button | | Twelfth mouse button | ||
! {{tc|No}} | ! {{tc|No}} | ||
| Line 401: | Line 630: | ||
|- | |- | ||
! {{code|key.mouse.13}} | ! {{code|key.mouse.13}} | ||
| Button 13 | | style="text-align:center; font-family:Minecraft" | Button 13 | ||
| Thirteenth mouse button | | Thirteenth mouse button | ||
! {{tc|No}} | ! {{tc|No}} | ||
| Line 408: | Line 637: | ||
|- | |- | ||
! {{code|key.mouse.14}} | ! {{code|key.mouse.14}} | ||
| Button 14 | | style="text-align:center; font-family:Minecraft" | Button 14 | ||
| Fourteenth mouse button | | Fourteenth mouse button | ||
! {{tc|No}} | ! {{tc|No}} | ||
| Line 415: | Line 644: | ||
|- | |- | ||
! {{code|key.mouse.15}} | ! {{code|key.mouse.15}} | ||
| Button 15 | | style="text-align:center; font-family:Minecraft" | Button 15 | ||
| Fifteenth mouse button | | Fifteenth mouse button | ||
! {{tc|No}} | ! {{tc|No}} | ||
| Line 422: | Line 651: | ||
|- | |- | ||
! {{code|key.mouse.16}} | ! {{code|key.mouse.16}} | ||
| Button 16 | | style="text-align:center; font-family:Minecraft" | Button 16 | ||
| Sixteenth mouse button | | Sixteenth mouse button | ||
! {{tc|No}} | ! {{tc|No}} | ||
| Line 429: | Line 658: | ||
|- | |- | ||
! {{code|key.mouse.17}} | ! {{code|key.mouse.17}} | ||
| Button 17 | | style="text-align:center; font-family:Minecraft" | Button 17 | ||
| Seventeenth mouse button | | Seventeenth mouse button | ||
! {{tc|No}} | ! {{tc|No}} | ||
| Line 436: | Line 665: | ||
|- | |- | ||
! {{code|key.mouse.18}} | ! {{code|key.mouse.18}} | ||
| Button 18 | | style="text-align:center; font-family:Minecraft" | Button 18 | ||
| Eighteenth mouse button | | Eighteenth mouse button | ||
! {{tc|No}} | ! {{tc|No}} | ||
| Line 443: | Line 672: | ||
|- | |- | ||
! {{code|key.mouse.19}} | ! {{code|key.mouse.19}} | ||
| Button 19 | | style="text-align:center; font-family:Minecraft" | Button 19 | ||
| Nineteenth mouse button | | Nineteenth mouse button | ||
! {{tc|No}} | ! {{tc|No}} | ||
| Line 450: | Line 679: | ||
|- | |- | ||
! {{code|key.mouse.20}} | ! {{code|key.mouse.20}} | ||
| Button 20 | | style="text-align:center; font-family:Minecraft" | Button 20 | ||
| Twentieth mouse button | | Twentieth mouse button | ||
! {{tc|No}} | ! {{tc|No}} | ||
| Line 457: | Line 686: | ||
|- | |- | ||
! {{code|key.mouse.21}} | ! {{code|key.mouse.21}} | ||
| Button 21 | | style="text-align:center; font-family:Minecraft" | Button 21 | ||
| Twenty-first mouse button | | Twenty-first mouse button | ||
! {{tc|No}} | ! {{tc|No}} | ||
| Line 464: | Line 693: | ||
|- | |- | ||
! {{code|key.mouse.22}} | ! {{code|key.mouse.22}} | ||
| Button 22 | | style="text-align:center; font-family:Minecraft" | Button 22 | ||
| Twenty-second mouse button | | Twenty-second mouse button | ||
! {{tc|No}} | ! {{tc|No}} | ||
| Line 471: | Line 700: | ||
|- | |- | ||
! {{code|key.mouse.23}} | ! {{code|key.mouse.23}} | ||
| Button 23 | | style="text-align:center; font-family:Minecraft" | Button 23 | ||
| Twenty-third mouse button | | Twenty-third mouse button | ||
! {{tc|No}} | ! {{tc|No}} | ||
| Line 478: | Line 707: | ||
|- | |- | ||
! {{code|key.mouse.24}} | ! {{code|key.mouse.24}} | ||
| Button 24 | | style="text-align:center; font-family:Minecraft" | Button 24 | ||
| Twenty-fourth mouse button | | Twenty-fourth mouse button | ||
! {{tc|No}} | ! {{tc|No}} | ||
| Line 485: | Line 714: | ||
|- | |- | ||
! {{code|key.mouse.25}} | ! {{code|key.mouse.25}} | ||
| Button 25 | | style="text-align:center; font-family:Minecraft" | Button 25 | ||
| Twenty-fifth mouse button | | Twenty-fifth mouse button | ||
! {{tc|No}} | ! {{tc|No}} | ||
| Line 492: | Line 721: | ||
|- | |- | ||
! {{code|key.mouse.26}} | ! {{code|key.mouse.26}} | ||
| Button 26 | | style="text-align:center; font-family:Minecraft" | Button 26 | ||
| Twenty-sixth mouse button | | Twenty-sixth mouse button | ||
! {{tc|No}} | ! {{tc|No}} | ||
| Line 499: | Line 728: | ||
|- | |- | ||
! {{code|key.mouse.27}} | ! {{code|key.mouse.27}} | ||
| Button 27 | | style="text-align:center; font-family:Minecraft" | Button 27 | ||
| Twenty-seventh mouse button | | Twenty-seventh mouse button | ||
! {{tc|No}} | ! {{tc|No}} | ||
| Line 506: | Line 735: | ||
|- | |- | ||
! {{code|key.mouse.28}} | ! {{code|key.mouse.28}} | ||
| Button 28 | | style="text-align:center; font-family:Minecraft" | Button 28 | ||
| Twenty-eighth mouse button | | Twenty-eighth mouse button | ||
! {{tc|No}} | ! {{tc|No}} | ||
| Line 513: | Line 742: | ||
|- | |- | ||
! {{code|key.mouse.29}} | ! {{code|key.mouse.29}} | ||
| Button 29 | | style="text-align:center; font-family:Minecraft" | Button 29 | ||
| Twenty-ninth mouse button | | Twenty-ninth mouse button | ||
! {{tc|No}} | ! {{tc|No}} | ||
| Line 520: | Line 749: | ||
|- | |- | ||
! {{code|key.mouse.30}} | ! {{code|key.mouse.30}} | ||
| Button 30 | | style="text-align:center; font-family:Minecraft" | Button 30 | ||
| Thirtieth mouse button | | Thirtieth mouse button | ||
! {{tc|No}} | ! {{tc|No}} | ||
| Line 527: | Line 756: | ||
|- | |- | ||
! {{code|key.mouse.31}} | ! {{code|key.mouse.31}} | ||
| Button 31 | | style="text-align:center; font-family:Minecraft" | Button 31 | ||
| Thirty-first mouse button | | Thirty-first mouse button | ||
! {{tc|No}} | ! {{tc|No}} | ||
| Line 534: | Line 763: | ||
|- | |- | ||
! {{code|key.mouse.32}} | ! {{code|key.mouse.32}} | ||
| Button 32 | | style="text-align:center; font-family:Minecraft" | Button 32 | ||
| Thirty-second mouse button | | Thirty-second mouse button | ||
! {{tc|No}} | ! {{tc|No}} | ||
| Line 541: | Line 770: | ||
|- | |- | ||
! {{code|key.mouse.33}} | ! {{code|key.mouse.33}} | ||
| Button 33 | | style="text-align:center; font-family:Minecraft" | Button 33 | ||
| Thirty-third mouse button | | Thirty-third mouse button | ||
! {{tc|No}} | ! {{tc|No}} | ||
| Line 548: | Line 777: | ||
|- | |- | ||
! {{code|key.mouse.34}} | ! {{code|key.mouse.34}} | ||
| Button 34 | | style="text-align:center; font-family:Minecraft" | Button 34 | ||
| Thirty-fourth mouse button | | Thirty-fourth mouse button | ||
! {{tc|No}} | ! {{tc|No}} | ||
| Line 555: | Line 784: | ||
|- | |- | ||
! {{code|key.mouse.35}} | ! {{code|key.mouse.35}} | ||
| Button 35 | | style="text-align:center; font-family:Minecraft" | Button 35 | ||
| Thirty-fifth mouse button | | Thirty-fifth mouse button | ||
! {{tc|No}} | ! {{tc|No}} | ||
| Line 562: | Line 791: | ||
|- | |- | ||
! {{code|key.mouse.36}} | ! {{code|key.mouse.36}} | ||
| Button 36 | | style="text-align:center; font-family:Minecraft" | Button 36 | ||
| Thirty-sixth mouse button | | Thirty-sixth mouse button | ||
! {{tc|No}} | ! {{tc|No}} | ||
| Line 569: | Line 798: | ||
|- | |- | ||
! {{code|key.mouse.37}} | ! {{code|key.mouse.37}} | ||
| Button 37 | | style="text-align:center; font-family:Minecraft" | Button 37 | ||
| Thirty-seventh mouse button | | Thirty-seventh mouse button | ||
! {{tc|No}} | ! {{tc|No}} | ||
| Line 576: | Line 805: | ||
|- | |- | ||
! {{code|key.mouse.38}} | ! {{code|key.mouse.38}} | ||
| Button 38 | | style="text-align:center; font-family:Minecraft" | Button 38 | ||
| Thirty-eighth mouse button | | Thirty-eighth mouse button | ||
! {{tc|No}} | ! {{tc|No}} | ||
| Line 583: | Line 812: | ||
|- | |- | ||
! {{code|key.mouse.39}} | ! {{code|key.mouse.39}} | ||
| Button 39 | | style="text-align:center; font-family:Minecraft" | Button 39 | ||
| Thirty-ninth mouse button | | Thirty-ninth mouse button | ||
! {{tc|No}} | ! {{tc|No}} | ||
| Line 590: | Line 819: | ||
|- | |- | ||
! {{code|key.mouse.40}} | ! {{code|key.mouse.40}} | ||
| Button 40 | | style="text-align:center; font-family:Minecraft" | Button 40 | ||
| Fortieth mouse button | | Fortieth mouse button | ||
! {{tc|No}} | ! {{tc|No}} | ||
| Line 597: | Line 826: | ||
|- | |- | ||
! {{code|key.mouse.41}} | ! {{code|key.mouse.41}} | ||
| Button 41 | | style="text-align:center; font-family:Minecraft" | Button 41 | ||
| Forty-first mouse button | | Forty-first mouse button | ||
! {{tc|No}} | ! {{tc|No}} | ||
| Line 604: | Line 833: | ||
|- | |- | ||
! {{code|key.mouse.42}} | ! {{code|key.mouse.42}} | ||
| Button 42 | | style="text-align:center; font-family:Minecraft" | Button 42 | ||
| Forty-second mouse button | | Forty-second mouse button | ||
! {{tc|No}} | ! {{tc|No}} | ||
| Line 611: | Line 840: | ||
|- | |- | ||
! {{code|key.mouse.43}} | ! {{code|key.mouse.43}} | ||
| Button 43 | | style="text-align:center; font-family:Minecraft" | Button 43 | ||
| Forty-third mouse button | | Forty-third mouse button | ||
! {{tc|No}} | ! {{tc|No}} | ||
| Line 618: | Line 847: | ||
|- | |- | ||
! {{code|key.mouse.44}} | ! {{code|key.mouse.44}} | ||
| Button 44 | | style="text-align:center; font-family:Minecraft" | Button 44 | ||
| Forty-fourth mouse button | | Forty-fourth mouse button | ||
! {{tc|No}} | ! {{tc|No}} | ||
| Line 625: | Line 854: | ||
|- | |- | ||
! {{code|key.mouse.45}} | ! {{code|key.mouse.45}} | ||
| Button 45 | | style="text-align:center; font-family:Minecraft" | Button 45 | ||
| Forty-fifth mouse button | | Forty-fifth mouse button | ||
! {{tc|No}} | ! {{tc|No}} | ||
| Line 632: | Line 861: | ||
|- | |- | ||
! {{code|key.mouse.46}} | ! {{code|key.mouse.46}} | ||
| Button 46 | | style="text-align:center; font-family:Minecraft" | Button 46 | ||
| Forty-sixth mouse button | | Forty-sixth mouse button | ||
! {{tc|No}} | ! {{tc|No}} | ||
| Line 639: | Line 868: | ||
|- | |- | ||
! {{code|key.mouse.47}} | ! {{code|key.mouse.47}} | ||
| Button 47 | | style="text-align:center; font-family:Minecraft" | Button 47 | ||
| Forty-seventh mouse button | | Forty-seventh mouse button | ||
! {{tc|No}} | ! {{tc|No}} | ||
| Line 646: | Line 875: | ||
|- | |- | ||
! {{code|key.mouse.48}} | ! {{code|key.mouse.48}} | ||
| Button 48 | | style="text-align:center; font-family:Minecraft" | Button 48 | ||
| Forty-eighth mouse button | | Forty-eighth mouse button | ||
! {{tc|No}} | ! {{tc|No}} | ||
| Line 1,043: | Line 1,272: | ||
|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||?|Letter keys are now displayed in lowercase.}} | |||
|{{HistoryLine||?|Controls that are not bound to anything now display "Not Bound", rather than the button being left blank.}} | |||
|{{HistoryLine||?|Letter keys are now displayed in uppercase again.}} | |||
|{{HistoryLine||?|Keypad keys, excluding the enter key, are not prefixed with "Keypad " - many now look identical to other keys despite being different.}} | |||
|{{HistoryLine|java upcoming}} | |{{HistoryLine|java upcoming}} | ||
|{{HistoryLine||?|Keypad keys are now prefixed with "Keypad " again.}} | |||
|{{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}}.}} | ||
| Line 1,053: | Line 1,287: | ||
*{{code|key.keyboard.keypad.left.parenthesis}} | *{{code|key.keyboard.keypad.left.parenthesis}} | ||
*{{code|key.keyboard.keypad.right.parenthesis}} | *{{code|key.keyboard.keypad.right.parenthesis}} | ||
*{{code|key.keyboard | *{{code|key.keyboard.application}} | ||
*{{code|key.keyboard | *{{code|key.keyboard.mute}} | ||
*{{code|key.keyboard | *{{code|key.keyboard.volume.up}} | ||
*{{code|key.keyboard | *{{code|key.keyboard.volume.down}} | ||
*{{code|key.keyboard | *{{code|key.keyboard.media.play.pause}} | ||
*{{code|key.keyboard | *{{code|key.keyboard.stop}} | ||
*{{code|key.keyboard | *{{code|key.keyboard.again}} | ||
*{{code|key.keyboard | *{{code|key.keyboard.undo}} | ||
*{{code|key.keyboard | *{{code|key.keyboard.cut}} | ||
*{{code|key.keyboard | *{{code|key.keyboard.copy}} | ||
*{{code|key.keyboard | *{{code|key.keyboard.paste}} | ||
*{{code|key.keyboard | *{{code|key.keyboard.find}} | ||
*{{code|key.keyboard | *{{code|key.keyboard.help}} | ||
*{{code|key.keyboard | *{{code|key.keyboard.new}} | ||
*{{code|key.keyboard | *{{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 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.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}}}} | ||
}} | }} | ||
Revision as of 11:15, 6 August 2026
Template:For Template:Missing information This is a list of key codes used by Minecraft:Minecraft, which are used in configuration files such as the Minecraft:options.txt file in the Minecraft directory.Template:Info needed
Java Edition
Keyboard codes
The displayed names of several keys will change depending on the currently active system keyboard layout. The values displayed in this table assume standard en-US.
| ID | Displayed name | Description | Translation key |
|---|---|---|---|
| Template:Code | Not Bound | Actions with no key assignedTemplate:Note | Template:Code |
| Template:Code | 0 | Alphanumeric section "zero" key | Template:Note |
| Template:Code | 1 | Alphanumeric section "one" key | Template:Note |
| Template:Code | 2 | Alphanumeric section "two" key | Template:Note |
| Template:Code | 3 | Alphanumeric section "three" key | Template:Note |
| Template:Code | 4 | Alphanumeric section "four" key | Template:Note |
| Template:Code | 5 | Alphanumeric section "five" key | Template:Note |
| Template:Code | 6 | Alphanumeric section "six" key | Template:Note |
| Template:Code | 7 | Alphanumeric section "seven" key | Template:Note |
| Template:Code | 8 | Alphanumeric section "eight" key | Template:Note |
| Template:Code | 9 | Alphanumeric section "nine" key | Template:Note |
| Template:Code | A | Alphanumeric section "A" key | Template:Note |
| Template:Code | B | Alphanumeric section "B" key | Template:Note |
| Template:Code | C | Alphanumeric section "C" key | Template:Note |
| Template:Code | D | Alphanumeric section "D" key | Template:Note |
| Template:Code | E | Alphanumeric section "E" key | Template:Note |
| Template:Code | F | Alphanumeric section "F" key | Template:Note |
| Template:Code | G | Alphanumeric section "G" key | Template:Note |
| Template:Code | H | Alphanumeric section "H" key | Template:Note |
| Template:Code | I | Alphanumeric section "I" key | Template:Note |
| Template:Code | J | Alphanumeric section "J" key | Template:Note |
| Template:Code | K | Alphanumeric section "K" key | Template:Note |
| Template:Code | L | Alphanumeric section "L" key | Template:Note |
| Template:Code | M | Alphanumeric section "M" key | Template:Note |
| Template:Code | N | Alphanumeric section "N" key | Template:Note |
| Template:Code | O | Alphanumeric section "O" key | Template:Note |
| Template:Code | P | Alphanumeric section "P" key | Template:Note |
| Template:Code | Q | Alphanumeric section "Q" key | Template:Note |
| Template:Code | R | Alphanumeric section "R" key | Template:Note |
| Template:Code | S | Alphanumeric section "S" key | Template:Note |
| Template:Code | T | Alphanumeric section "T" key | Template:Note |
| Template:Code | U | Alphanumeric section "U" key | Template:Note |
| Template:Code | V | Alphanumeric section "V" key | Template:Note |
| Template:Code | W | Alphanumeric section "W" key | Template:Note |
| Template:Code | X | Alphanumeric section "X" key | Template:Note |
| Template:Code | Y | Alphanumeric section "Y" key | Template:Note |
| Template:Code | Z | Alphanumeric section "Z" key | Template:Note |
| Template:Code | F1 | First function key | Template:Code |
| Template:Code | F2 | Second function key | Template:Code |
| Template:Code | F3 | Third function key | Template:Code |
| Template:Code | F4 | Fourth function key | Template:Code |
| Template:Code | F5 | Fifth function key | Template:Code |
| Template:Code | F6 | Sixth function key | Template:Code |
| Template:Code | F7 | Seventh function key | Template:Code |
| Template:Code | F8 | Eighth function key | Template:Code |
| Template:Code | F9 | Ninth function key | Template:Code |
| Template:Code | F10 | Tenth function key | Template:Code |
| Template:Code | F11 | Eleventh function key | Template:Code |
| Template:Code | F12 | Twelfth function key | Template:Code |
| Template:Code | F13 | Thirteenth function key | Template:Code |
| Template:Code | F14 | Fourteenth function key | Template:Code |
| Template:Code | F15 | Fifteenth function key | Template:Code |
| Template:Code | F16 | Sixteenth function key | Template:Code |
| Template:Code | F17 | Seventeenth function key | Template:Code |
| Template:Code | F18 | Eighteenth function key | Template:Code |
| Template:Code | F19 | Nineteenth function key | Template:Code |
| Template:Code | F20 | Twentieth function key | Template:Code |
| Template:Code | F21 | Twenty-first function key | Template:Code |
| Template:Code | F22 | Twenty-second function key | Template:Code |
| Template:Code | F23 | Twenty-third function key | Template:Code |
| Template:Code | F24 | Twenty-fourth function key | Template:Code |
| Template:CodeTemplate:Until | F25 | Purpose unclearTemplate:Note | Template:CodeTemplate:Until |
| Template:Code | 0Template:Until Keypad 0Template:Upcoming |
Numeric keypad "zero" key | Template:Code |
| Template:Code | 1Template:Until Keypad 1Template:Upcoming |
Numeric keypad "one" key | Template:Code |
| Template:Code | 2Template:Until Keypad 2Template:Upcoming |
Numeric keypad "two" key | Template:Code |
| Template:Code | 3Template:Until Keypad 3Template:Upcoming |
Numeric keypad "three" key | Template:Code |
| Template:Code | 4Template:Until Keypad 4Template:Upcoming |
Numeric keypad "four" key | Template:Code |
| Template:Code | 5Template:Until Keypad 5Template:Upcoming |
Numeric keypad "five" key | Template:Code |
| Template:Code | 6Template:Until Keypad 6Template:Upcoming |
Numeric keypad "six" key | Template:Code |
| Template:Code | 7Template:Until Keypad 7Template:Upcoming |
Numeric keypad "seven" key | Template:Code |
| Template:Code | 8Template:Until Keypad 8Template:Upcoming |
Numeric keypad "eight" key | Template:Code |
| Template:Code | 9Template:Until Keypad 9Template:Upcoming |
Numeric keypad "nine" key | Template:Code |
| Value | In-game name | Description |
|---|---|---|
| key.keyboard.keypad.add | Keypad + | |
| key.keyboard.keypad.periodTemplate:Upcoming | Keypad . | |
| key.keyboard.keypad.decimal | Keypad Decimal | |
| key.keyboard.keypad.enter | Keypad Enter | |
| key.keyboard.keypad.equal | Keypad = | |
| key.keyboard.keypad.commaTemplate:Upcoming | Keypad , | |
| key.keyboard.keypad.multiply | Keypad * | |
| key.keyboard.keypad.divide | Keypad / | |
| key.keyboard.keypad.subtract | Keypad - | |
| key.keyboard.keypad.plus.minusTemplate:Upcoming | Keypad ± | |
| key.keyboard.keypad.left.parenthesisTemplate:Upcoming | Keypad ( | |
| key.keyboard.keypad.right.parenthesisTemplate:Upcoming | Keypad ) | |
| key.keyboard.num.lock | Num Lock | |
| key.keyboard.caps.lock | Caps Lock | |
| key.keyboard.scroll.lock | Scroll Lock | |
| key.keyboard.down | Down Arrow | |
| key.keyboard.left | Left Arrow | |
| key.keyboard.right | Right Arrow | |
| key.keyboard.up | Up Arrow | |
| key.keyboard.apostrophe | ' | |
| key.keyboard.backslash | \ | |
| key.keyboard.comma | , | |
| key.keyboard.equal | = | |
| key.keyboard.grave.accent | ` | |
| key.keyboard.left.bracket | [ | |
| key.keyboard.minus | - | |
| key.keyboard.period | . | |
| key.keyboard.right.bracket | ] | |
| key.keyboard.semicolon | ; | |
| key.keyboard.slash | / | |
| key.keyboard.space | Space | |
| key.keyboard.tab | Tab | |
| key.keyboard.left.alt | Windows/Linux: Left Alt macOS: Left OptionTemplate:Upcoming | |
| key.keyboard.left.control | Left Control | |
| key.keyboard.left.shift | Left Shift | |
| key.keyboard.left.win | Windows: Left Win Linux: Left MetaTemplate:Upcoming macOS: Left CommandTemplate:Upcoming | |
| key.keyboard.right.alt | Windows/Linux: Right Alt macOS: Right OptionTemplate:Upcoming | |
| key.keyboard.right.control | Right Control | |
| key.keyboard.right.shift | Right Shift | |
| key.keyboard.right.win | Windows: Right Win Linux: Right MetaTemplate:Upcoming macOS: Right CommandTemplate:Upcoming | |
| key.keyboard.enter | Enter | |
| key.keyboard.escape | Escape | |
| key.keyboard.backspace | Backspace | |
| key.keyboard.delete | Delete | |
| key.keyboard.end | End | |
| key.keyboard.home | Home | |
| key.keyboard.insert | Insert | |
| key.keyboard.page.down | Page Down | |
| key.keyboard.page.up | Page Up | |
| key.keyboard.pause | Pause | |
| key.keyboard.applicationTemplate:Upcoming | Menu | |
| key.keyboard.menu | Menu | |
| key.keyboard.print.screen | Print Screen | |
| key.keyboard.world.1 | World 1 | Template:Info needed |
| key.keyboard.world.2 | World 2 | Template:Info needed |
| key.keyboard.muteTemplate:Upcoming | Mute | |
| key.keyboard.volume.upTemplate:Upcoming | Volume Up | |
| key.keyboard.volume.downTemplate:Upcoming | Volume Down | |
| key.keyboard.media.play.pauseTemplate:Upcoming | Play/Pause | |
| key.keyboard.stopTemplate:Upcoming | Stop | |
| key.keyboard.againTemplate:Upcoming | Again | |
| key.keyboard.undoTemplate:Upcoming | Undo | |
| key.keyboard.cutTemplate:Upcoming | Cut | |
| key.keyboard.copyTemplate:Upcoming | Copy | |
| key.keyboard.pasteTemplate:Upcoming | Paste | |
| key.keyboard.findTemplate:Upcoming | Find | |
| key.keyboard.helpTemplate:Upcoming | Help | |
| key.keyboard.newTemplate:Upcoming | New | |
| key.keyboard.saveTemplate:Upcoming | Save | |
| scancode.###Template:Until | scancode.### | Untranslated |
| key.keyboard.###Template:Upcoming | key.keyboard.### | Untranslated |
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 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.
Only the first eight mouse buttons can have controls assigned to them.Template:Until
On Linux, mouse buttons up to 48Template:Upcoming 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.
For the first three mouse buttons, the translation keys match the key IDs; all other buttons follow a generic template.
Bedrock Edition
| Key Code | Key |
|---|---|
| 0 | That key has no keycode |
| 3 | break |
| 8 | backspace / delete |
| 9 | tab |
| 12 | clear |
| 13 | enter |
| 16 | shift |
| 17 | w |
| 18 | alt |
| 19 | pause/break |
| 20 | caps lock |
| 21 | hangul |
| 25 | hanja |
| 27 | escape |
| 28 | conversion |
| 29 | non-conversion |
| 32 | spacebar |
| 33 | page up |
| 34 | page down |
| 35 | end |
| 36 | home |
| 37 | left arrow |
| 38 | up arrow |
| 39 | right arrow |
| 40 | down arrow |
| 41 | select |
| 42 | |
| 43 | execute |
| 44 | Print Screen |
| 45 | insert |
| 46 | delete |
| 47 | help |
| 48 | 0 |
| 49 | 1 |
| 50 | 2 |
| 51 | 3 |
| 52 | 4 |
| 53 | 5 |
| 54 | 6 |
| 55 | 7 |
| 56 | 8 |
| 57 | 9 |
| 58 | : |
| 59 | semicolon (firefox), equals |
| 60 | < |
| 61 | equals (firefox) |
| 63 | ß |
| 64 | @ (firefox) |
| 65 | a |
| 66 | b |
| 67 | c |
| 68 | d |
| 69 | e |
| 70 | f |
| 71 | g |
| 72 | h |
| 73 | i |
| 74 | j |
| 75 | k |
| 76 | l |
| 77 | m |
| 78 | n |
| 79 | o |
| 80 | p |
| 81 | q |
| 82 | r |
| 83 | s |
| 84 | t |
| 85 | u |
| 86 | v |
| 87 | w |
| 88 | x |
| 89 | y |
| 90 | z |
| 91 | Windows Key / Left ⌘ / Chromebook Search key |
| 92 | right window key |
| 93 | Windows Menu / Right ⌘ |
| 95 | sleep |
| 96 | numpad 0 |
| 97 | numpad 1 |
| 98 | numpad 2 |
| 99 | numpad 3 |
| 100 | numpad 4 |
| 101 | numpad 5 |
| 102 | numpad 6 |
| 103 | numpad 7 |
| 104 | numpad 8 |
| 105 | numpad 9 |
| 106 | multiply |
| 107 | add |
| 108 | numpad period (firefox) |
| 109 | subtract |
| 110 | decimal point |
| 111 | divide |
| 112 | f1 |
| 113 | f2 |
| 114 | f3 |
| 115 | f4 |
| 116 | f5 |
| 117 | f6 |
| 118 | f7 |
| 119 | f8 |
| 120 | f9 |
| 121 | f10 |
| 122 | f11 |
| 123 | f12 |
| 124 | f13 |
| 125 | f14 |
| 126 | f15 |
| 127 | f16 |
| 128 | f17 |
| 129 | f18 |
| 130 | f19 |
| 131 | f20 |
| 132 | f21 |
| 133 | f22 |
| 134 | f23 |
| 135 | f24 |
| 136 | f25 |
| 137 | f26 |
| 138 | f27 |
| 139 | f28 |
| 140 | f29 |
| 141 | f30 |
| 142 | f31 |
| 143 | f32 |
| 144 | num lock |
| 145 | scroll lock |
| 151 | airplane mode |
| 160 | ^ |
| 161 | ! |
| 162 | ؛ (arabic semicolon) |
| 163 | # |
| 164 | $ |
| 165 | ù |
| 166 | page backward |
| 167 | page forward |
| 168 | refresh |
| 169 | closing paren (AZERTY) |
| 170 | * |
| 171 | ~ + * key |
| 172 | home key |
| 173 | minus (firefox), mute/unmute |
| 174 | decrease volume level |
| 175 | increase volume level |
| 176 | next |
| 177 | previous |
| 178 | stop |
| 179 | play/pause |
| 180 | |
| 181 | mute/unmute (firefox) |
| 182 | decrease volume level (firefox) |
| 183 | increase volume level (firefox) |
| 186 | semi-colon / ñ |
| 187 | equal sign |
| 188 | comma |
| 189 | dash |
| 190 | period |
| 191 | forward slash / ç |
| 192 | grave accent / ñ / æ / ö |
| 193 | ?, / or ° |
| 194 | numpad period (chrome) |
| 219 | open bracket |
| 220 | back slash |
| 221 | close bracket / å |
| 222 | single quote / ø / ä |
| 223 | ` |
| 224 | left or right ⌘ key (firefox) |
| 225 | altgr |
| 226 | < /git >, left back slash |
| 230 | GNOME Compose Key |
| 231 | ç |
| 233 | XF86Forward |
| 234 | XF86Back |
| 235 | non-conversion |
| 240 | alphanumeric |
| 242 | hiragana/katakana |
| 243 | half-width/full-width |
| 244 | kanji |
| 251 | unlock trackpad (Chrome/Edge) |
| 255 | toggle touchpad |
| -99 | Mouse Left |
| -98 | Mouse Right |
| -97 | Mouse Middle |
| -94 | Mouse Button 6 |
| -95 | Mouse Button 5 |
History
Java Edition
Notes
References
Template:Navbox Java Edition technical Template:Navbox Bedrock Edition
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:键控代码