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}} | ||
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"}} | 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"}} | ||
| Line 25: | Line 24: | ||
| style="text-align:center; font-family:Minecraft" | 0 | | style="text-align:center; font-family:Minecraft" | 0 | ||
| Alphanumeric section "zero" key | | 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.}} | | 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.{{Verify|what about characters that are neither letters nor numbers? there are many symbols}}}} | ||
|- | |- | ||
! {{code|key.keyboard.1}} | ! {{code|key.keyboard.1}} | ||
| Line 328: | Line 327: | ||
|- | |- | ||
! {{code|key.keyboard.keypad.0}} | ! {{code|key.keyboard.keypad.0}} | ||
| style="text-align:center" | <span style="font-family:Minecraft">0</span>{{until|java 26.3}}<br><span style="font-family:Minecraft">Keypad 0{{upcoming|java 26.3}} | | style="text-align:center" | <span style="font-family:Minecraft">0</span>{{until|java 26.3}}<br><span style="font-family:Minecraft">Keypad 0</span>{{upcoming|java 26.3}} | ||
| Numeric keypad "zero" key | | Numeric keypad "zero" key | ||
| style="text-align:center" | {{code|key.keyboard.keypad.0}} | | style="text-align:center" | {{code|key.keyboard.keypad.0}}{{note|name=unused-translation-until|Despite the presence of this translation key, it is not used for displaying the key, see {{bug|MC-263708}}.{{until|je 26.3}}}} | ||
|- | |- | ||
! {{code|key.keyboard.keypad.1}} | ! {{code|key.keyboard.keypad.1}} | ||
| style="text-align:center" | <span style="font-family:Minecraft">1</span>{{until|java 26.3}}<br><span style="font-family:Minecraft">Keypad 1</span>{{upcoming|java 26.3}} | | style="text-align:center" | <span style="font-family:Minecraft">1</span>{{until|java 26.3}}<br><span style="font-family:Minecraft">Keypad 1</span>{{upcoming|java 26.3}} | ||
| Numeric keypad "one" key | | Numeric keypad "one" key | ||
| style="text-align:center" | {{code|key.keyboard.keypad.1}} | | style="text-align:center" | {{code|key.keyboard.keypad.1}}{{note|name=unused-translation-until}} | ||
|- | |- | ||
! {{code|key.keyboard.keypad.2}} | ! {{code|key.keyboard.keypad.2}} | ||
| style="text-align:center" | <span style="font-family:Minecraft">2</span>{{until|java 26.3}}<br><span style="font-family:Minecraft">Keypad 2</span>{{upcoming|java 26.3}} | | style="text-align:center" | <span style="font-family:Minecraft">2</span>{{until|java 26.3}}<br><span style="font-family:Minecraft">Keypad 2</span>{{upcoming|java 26.3}} | ||
| Numeric keypad "two" key | | Numeric keypad "two" key | ||
| style="text-align:center" | {{code|key.keyboard.keypad.2}} | | style="text-align:center" | {{code|key.keyboard.keypad.2}}{{note|name=unused-translation-until}} | ||
|- | |- | ||
! {{code|key.keyboard.keypad.3}} | ! {{code|key.keyboard.keypad.3}} | ||
| style="text-align:center" | <span style="font-family:Minecraft">3</span>{{until|java 26.3}}<br><span style="font-family:Minecraft">Keypad 3</span>{{upcoming|java 26.3}} | | style="text-align:center" | <span style="font-family:Minecraft">3</span>{{until|java 26.3}}<br><span style="font-family:Minecraft">Keypad 3</span>{{upcoming|java 26.3}} | ||
| Numeric keypad "three" key | | Numeric keypad "three" key | ||
| style="text-align:center" | {{code|key.keyboard.keypad.3}} | | style="text-align:center" | {{code|key.keyboard.keypad.3}}{{note|name=unused-translation-until}} | ||
|- | |- | ||
! {{code|key.keyboard.keypad.4}} | ! {{code|key.keyboard.keypad.4}} | ||
| style="text-align:center" | <span style="font-family:Minecraft">4</span>{{until|java 26.3}}<br><span style="font-family:Minecraft">Keypad 4</span>{{upcoming|java 26.3}} | | style="text-align:center" | <span style="font-family:Minecraft">4</span>{{until|java 26.3}}<br><span style="font-family:Minecraft">Keypad 4</span>{{upcoming|java 26.3}} | ||
| Numeric keypad "four" key | | Numeric keypad "four" key | ||
| style="text-align:center" | {{code|key.keyboard.keypad.4}} | | style="text-align:center" | {{code|key.keyboard.keypad.4}}{{note|name=unused-translation-until}} | ||
|- | |- | ||
! {{code|key.keyboard.keypad.5}} | ! {{code|key.keyboard.keypad.5}} | ||
| style="text-align:center" | <span style="font-family:Minecraft">5</span>{{until|java 26.3}}<br><span style="font-family:Minecraft">Keypad 5</span>{{upcoming|java 26.3}} | | style="text-align:center" | <span style="font-family:Minecraft">5</span>{{until|java 26.3}}<br><span style="font-family:Minecraft">Keypad 5</span>{{upcoming|java 26.3}} | ||
| Numeric keypad "five" key | | Numeric keypad "five" key | ||
| style="text-align:center" | {{code|key.keyboard.keypad.5}} | | style="text-align:center" | {{code|key.keyboard.keypad.5}}{{note|name=unused-translation-until}} | ||
|- | |- | ||
! {{code|key.keyboard.keypad.6}} | ! {{code|key.keyboard.keypad.6}} | ||
| style="text-align:center" | <span style="font-family:Minecraft">6</span>{{until|java 26.3}}<br><span style="font-family:Minecraft">Keypad 6</span>{{upcoming|java 26.3}} | | style="text-align:center" | <span style="font-family:Minecraft">6</span>{{until|java 26.3}}<br><span style="font-family:Minecraft">Keypad 6</span>{{upcoming|java 26.3}} | ||
| Numeric keypad "six" key | | Numeric keypad "six" key | ||
| style="text-align:center" | {{code|key.keyboard.keypad.6}} | | style="text-align:center" | {{code|key.keyboard.keypad.6}}{{note|name=unused-translation-until}} | ||
|- | |- | ||
! {{code|key.keyboard.keypad.7}} | ! {{code|key.keyboard.keypad.7}} | ||
| style="text-align:center" | <span style="font-family:Minecraft">7</span>{{until|java 26.3}}<br><span style="font-family:Minecraft">Keypad 7</span>{{upcoming|java 26.3}} | | style="text-align:center" | <span style="font-family:Minecraft">7</span>{{until|java 26.3}}<br><span style="font-family:Minecraft">Keypad 7</span>{{upcoming|java 26.3}} | ||
| Numeric keypad "seven" key | | Numeric keypad "seven" key | ||
| style="text-align:center" | {{code|key.keyboard.keypad.7}} | | style="text-align:center" | {{code|key.keyboard.keypad.7}}{{note|name=unused-translation-until}} | ||
|- | |- | ||
! {{code|key.keyboard.keypad.8}} | ! {{code|key.keyboard.keypad.8}} | ||
| style="text-align:center" | <span style="font-family:Minecraft">8</span>{{until|java 26.3}}<br><span style="font-family:Minecraft">Keypad 8</span>{{upcoming|java 26.3}} | | style="text-align:center" | <span style="font-family:Minecraft">8</span>{{until|java 26.3}}<br><span style="font-family:Minecraft">Keypad 8</span>{{upcoming|java 26.3}} | ||
| Numeric keypad "eight" key | | Numeric keypad "eight" key | ||
| style="text-align:center" | {{code|key.keyboard.keypad.8}} | | style="text-align:center" | {{code|key.keyboard.keypad.8}}{{note|name=unused-translation-until}} | ||
|- | |- | ||
! {{code|key.keyboard.keypad.9}} | ! {{code|key.keyboard.keypad.9}} | ||
| style="text-align:center" | <span style="font-family:Minecraft">9</span>{{until|java 26.3}}<br><span style="font-family:Minecraft">Keypad 9</span>{{upcoming|java 26.3}} | | style="text-align:center" | <span style="font-family:Minecraft">9</span>{{until|java 26.3}}<br><span style="font-family:Minecraft">Keypad 9</span>{{upcoming|java 26.3}} | ||
| Numeric keypad "nine" key | | Numeric keypad "nine" key | ||
| style="text-align:center" | {{code|key.keyboard.keypad.9}} | | style="text-align:center" | {{code|key.keyboard.keypad.9}}{{note|name=unused-translation-until}} | ||
{| | |||
|- | |- | ||
|key.keyboard.keypad.add || | ! {{code|key.keyboard.keypad.add}} | ||
| style="text-align:center" | <span style="font-family:Minecraft">+</span>{{until|java 26.3}}<br><span style="font-family:Minecraft">Keypad +</span>{{upcoming|java 26.3}} | |||
| Numeric keypad "plus" key | |||
| style="text-align:center" | {{code|key.keyboard.keypad.add}}{{note|name=unused-translation-until}} | |||
|- | |- | ||
|key.keyboard.keypad. | ! {{code|key.keyboard.keypad.subtract}} | ||
| style="text-align:center" | <span style="font-family:Minecraft">-</span>{{until|java 26.3}}<br><span style="font-family:Minecraft">Keypad -</span>{{upcoming|java 26.3}} | |||
| Numeric keypad "minus" key | |||
| style="text-align:center" | {{code|key.keyboard.keypad.subtract}}{{note|name=unused-translation-until}} | |||
|- | |- | ||
|key.keyboard.keypad. | ! {{code|key.keyboard.keypad.multiply}} | ||
| style="text-align:center" | <span style="font-family:Minecraft">*</span>{{until|java 26.3}}<br><span style="font-family:Minecraft">Keypad *</span>{{upcoming|java 26.3}} | |||
| Numeric keypad "asterisk" key | |||
| style="text-align:center" | {{code|key.keyboard.keypad.multiply}}{{note|name=unused-translation-until}} | |||
|- | |- | ||
|key.keyboard.keypad. | ! {{code|key.keyboard.keypad.divide}} | ||
| style="text-align:center" | <span style="font-family:Minecraft">/</span>{{until|java 26.3}}<br><span style="font-family:Minecraft">Keypad /</span>{{upcoming|java 26.3}} | |||
| Numeric keypad "slash" key | |||
| style="text-align:center" | {{code|key.keyboard.keypad.divide}}{{note|name=unused-translation-until}} | |||
|- | |- | ||
|key.keyboard.keypad.equal || | ! {{code|key.keyboard.keypad.equal}} | ||
| style="text-align:center" | <span style="font-family:Minecraft">=</span>{{until|java 26.3}}<br><span style="font-family:Minecraft">Keypad =</span>{{upcoming|java 26.3}} | |||
| Numeric keypad "equals" key | |||
| style="text-align:center" | {{code|key.keyboard.keypad.equal}}{{note|name=unused-translation-until}} | |||
|- | |- | ||
|key.keyboard.keypad. | ! {{code|key.keyboard.keypad.plus.minus}}{{upcoming|java 26.3}} | ||
| style="text-align:center" | <span style="font-family:Minecraft">Keypad ±</span>{{note|name=missing-keypad|May appear missing the "Keypad " prefix on some systems, see {{bug|MC-310844}}.}} | |||
| Numeric keypad "plus or minus" key | |||
| style="text-align:center" | {{code|key.keyboard.keypad.plus.minus}} | |||
|- | |- | ||
|key.keyboard.keypad. | ! {{code|key.keyboard.keypad.left.parenthesis}}{{upcoming|java 26.3}} | ||
| style="text-align:center" | <span style="font-family:Minecraft">Keypad (</span>{{note|name=missing-keypad}} | |||
| Numeric keypad "opening bracket" key | |||
| style="text-align:center" | {{code|key.keyboard.keypad.left.parenthesis}} | |||
|- | |- | ||
|key.keyboard.keypad. | ! {{code|key.keyboard.keypad.right.parenthesis}}{{upcoming|java 26.3}} | ||
| style="text-align:center" | <span style="font-family:Minecraft">Keypad )</span>{{note|name=missing-keypad}} | |||
| Numeric keypad "closing bracket" key | |||
| style="text-align:center" | {{code|key.keyboard.keypad.right.parenthesis}} | |||
|- | |- | ||
|key.keyboard.keypad. | ! {{code|key.keyboard.keypad.decimal}} | ||
| style="text-align:center" | <span style="font-family:Minecraft">.</span>{{until|java 26.3}}<br><span style="font-family:Minecraft">Keypad Decimal</span>{{upcoming|java 26.3}} | |||
| Numeric keypad "point" key{{until|java 26.3}} | |||
| style="text-align:center" | {{code|key.keyboard.keypad.decimal}}{{note|name=unused-translation-until}} | |||
|- | |- | ||
|key.keyboard.keypad. | ! {{code|key.keyboard.keypad.period}}{{upcoming|java 26.3}} | ||
| style="text-align:center; font-family:Minecraft" | Keypad . | |||
| Numeric keypad "point" key | |||
| style="text-align:center" | {{code|key.keyboard.keypad.period}} | |||
|- | |- | ||
|key.keyboard.keypad. | ! {{code|key.keyboard.keypad.comma}}{{upcoming|java 26.3}} | ||
| style="text-align:center; font-family:Minecraft" | Keypad , | |||
| Seemingly unused<ref>{{bug|MC-310845}}</ref> | |||
| style="text-align:center" | {{code|key.keyboard.keypad.comma}} | |||
|- | |- | ||
|key.keyboard.keypad. | ! {{code|key.keyboard.keypad.enter}} | ||
| style="text-align:center; font-family:Minecraft" | Keypad Enter | |||
| Numeric keypad "enter" key | |||
| style="text-align:center" | {{code|key.keyboard.keypad.enter}} | |||
|- | |- | ||
|key.keyboard.num.lock | | ! {{code|key.keyboard.num.lock}} | ||
| style="text-align:center; font-family:Minecraft" | Num Lock | |||
| Number lock | |||
| style="text-align:center" | {{code|key.keyboard.num.lock}} | |||
|- | |- | ||
|key.keyboard.caps.lock | | ! {{code|key.keyboard.caps.lock}} | ||
| style="text-align:center; font-family:Minecraft" | Caps Lock | |||
| Caps lock | |||
| style="text-align:center" | {{code|key.keyboard.caps.lock}} | |||
|- | |- | ||
|key.keyboard.scroll.lock | | ! {{code|key.keyboard.scroll.lock}} | ||
| style="text-align:center; font-family:Minecraft" | Scroll Lock | |||
| Scroll lock | |||
| style="text-align:center" | {{code|key.keyboard.scroll.lock}} | |||
|- | |- | ||
|key.keyboard. | ! {{code|key.keyboard.up}} | ||
| style="text-align:center; font-family:Minecraft" | Up Arrow | |||
| Up arrow | |||
| style="text-align:center" | {{code|key.keyboard.up}} | |||
|- | |- | ||
|key.keyboard.left | | ! {{code|key.keyboard.left}} | ||
| style="text-align:center; font-family:Minecraft" | Left Arrow | |||
| Left arrow | |||
| style="text-align:center" | {{code|key.keyboard.left}} | |||
|- | |- | ||
|key.keyboard.right | | ! {{code|key.keyboard.right}} | ||
| style="text-align:center; font-family:Minecraft" | Right Arrow | |||
| Right arrow | |||
| style="text-align:center" | {{code|key.keyboard.right}} | |||
|- | |- | ||
|key.keyboard. | ! {{code|key.keyboard.down}} | ||
| style="text-align:center; font-family:Minecraft" | Down Arrow | |||
| Down arrow | |||
| style="text-align:center" | {{code|key.keyboard.down}} | |||
|} | |||
{| 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.apostrophe || colspan="2" | ' | |key.keyboard.apostrophe || colspan="2" | ' | ||
| Line 537: | Line 593: | ||
{| 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 | ||
! rowspan="2" | | ! rowspan="2" | Displayed name | ||
! rowspan="2" | Description | ! rowspan="2" | Description | ||
! colspan="3" | Usable on | ! colspan="3" | Usable on | ||
| Line 561: | Line 617: | ||
! {{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}} | ||
| style="text-align:center; font-family:Minecraft" | Middle Button | | style="text-align:center; font-family:Minecraft" | Middle Button | ||
| Tertiary mouse button | | Tertiary mouse button{{note|Often the scroll wheel when pressed; some mice with no wheel may implement this as a central button instead}} | ||
! {{tc|Yes}} | ! {{tc|Yes}} | ||
! {{tc|Yes}} | ! {{tc|Yes}} | ||
| Line 568: | Line 624: | ||
! {{code|key.mouse.4}} | ! {{code|key.mouse.4}} | ||
| style="text-align:center; font-family:Minecraft" | Button 4 | | style="text-align:center; font-family:Minecraft" | Button 4 | ||
| Fourth mouse button | | Fourth mouse button{{note|Sometimes referred to as "Back" or XBUTTON1}} | ||
! {{tc|Yes}} | ! {{tc|Yes}} | ||
! {{tc|Yes}} | ! {{tc|Yes}} | ||
| Line 575: | Line 631: | ||
! {{code|key.mouse.5}} | ! {{code|key.mouse.5}} | ||
| style="text-align:center; font-family:Minecraft" | Button 5 | | style="text-align:center; font-family:Minecraft" | Button 5 | ||
| Fifth mouse button | | Fifth mouse button{{note|Sometimes referred to as "Forward" or XBUTTON2}} | ||
! {{tc|Yes}} | ! {{tc|Yes}} | ||
! {{tc|Yes}} | ! {{tc|Yes}} | ||
| Line 2,005: | Line 2,061: | ||
|Removed {{code|key.keyboard.f25}}. | |Removed {{code|key.keyboard.f25}}. | ||
|Keypad keys are now prefixed with "Keypad ".}} | |Keypad keys are now prefixed with "Keypad ".}} | ||
|{{HistoryLine|||dev=?|The keypad plus-or-minus, keypad opening bracket and keypad closing bracket buttons now display as ±, ( and ) in-game | |{{HistoryLine|||dev=?|The keypad plus-or-minus, keypad opening bracket and keypad closing bracket buttons now display as ±, ( and ) in-game - they are not prefixed with "Keypad ", unlike other keypad keys.<ref>{{bug|MC-310109}}, {{bug|MC-310110}}</ref> | ||
|They use the number placeholder system for their IDs respectively: key.keyboard.215, key.keyboard.182, key.keyboard.183}} | |||
|{{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}} | *{{code|key.keyboard.keypad.period}} | ||
| Line 2,027: | Line 2,084: | ||
*{{code|key.keyboard.new}} | *{{code|key.keyboard.new}} | ||
*{{code|key.keyboard.save}}| | *{{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.{{ | {{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.{{info needed|Checking the lang files shows that there are distinct "[left/right].win" and "[left/right].windows" translation strings - explain how these are applied}}}} | ||
}} | }} | ||
Revision as of 11:26, 8 August 2026
Template:For 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.
| Value | In-game name | Description |
|---|---|---|
| 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
Keyboard codes
In Template:BE, keys are stored as the value of their virtual key code.
Mouse codes
Mouse buttons are represented by negative numbers.Template:Info needed
| ID | Displayed name | Description |
|---|---|---|
| Template:Code | Button1 | Left Mouse Button |
| Template:Code | Button2 | Right Mouse Button |
| Template:Code | Button3 | Middle Mouse Button |
| Template:Code | Button5 | Mouse Button 5 |
| Template:Code | Button6 | Mouse Button 6 |
Controller codes
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:键控代码