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
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 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}}
|}
 
{| 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 +
! {{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.period{{upcoming|je 26.3}} || colspan="2" | 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.decimal || colspan="2" | Keypad Decimal
! {{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.enter || colspan="2" | Keypad Enter
! {{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 || colspan="2" | Keypad =
! {{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.comma{{upcoming|je 26.3}} || colspan="2" | 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.multiply || colspan="2" | 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.divide || colspan="2" | 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.subtract || colspan="2" | 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.plus.minus{{upcoming|je 26.3}} || colspan="2" | 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.left.parenthesis{{upcoming|je 26.3}} || colspan="2" | 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.right.parenthesis{{upcoming|je 26.3}} || colspan="2" | 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 || colspan="2" | 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 || colspan="2" | 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 || colspan="2" | 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.down || colspan="2" | Down Arrow
! {{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 || colspan="2" | Left Arrow
! {{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 || colspan="2" | Right Arrow
! {{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.up || colspan="2" | Up Arrow
! {{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" | Display name
! 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, often<br>the scroll wheel when pressed
| 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,<br>aka "Back" or XBUTTON1
| 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,<br>aka "Forward" or XBUTTON2
| 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. 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>}}
|{{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.{{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.{{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

Template:For

Keyboard codes

Template:For

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 Unassigned actionsTemplate: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:CodeTemplate:Note
Template:Code 1Template:Until
Keypad 1Template:Upcoming
Numeric keypad "one" key Template:CodeTemplate:Note
Template:Code 2Template:Until
Keypad 2Template:Upcoming
Numeric keypad "two" key Template:CodeTemplate:Note
Template:Code 3Template:Until
Keypad 3Template:Upcoming
Numeric keypad "three" key Template:CodeTemplate:Note
Template:Code 4Template:Until
Keypad 4Template:Upcoming
Numeric keypad "four" key Template:CodeTemplate:Note
Template:Code 5Template:Until
Keypad 5Template:Upcoming
Numeric keypad "five" key Template:CodeTemplate:Note
Template:Code 6Template:Until
Keypad 6Template:Upcoming
Numeric keypad "six" key Template:CodeTemplate:Note
Template:Code 7Template:Until
Keypad 7Template:Upcoming
Numeric keypad "seven" key Template:CodeTemplate:Note
Template:Code 8Template:Until
Keypad 8Template:Upcoming
Numeric keypad "eight" key Template:CodeTemplate:Note
Template:Code 9Template:Until
Keypad 9Template:Upcoming
Numeric keypad "nine" key Template:CodeTemplate:Note
Template:Code +Template:Until
Keypad +Template:Upcoming
Numeric keypad "plus" key Template:CodeTemplate:Note
Template:Code -Template:Until
Keypad -Template:Upcoming
Numeric keypad "minus" key Template:CodeTemplate:Note
Template:Code *Template:Until
Keypad *Template:Upcoming
Numeric keypad "asterisk" key Template:CodeTemplate:Note
Template:Code /Template:Until
Keypad /Template:Upcoming
Numeric keypad "slash" key Template:CodeTemplate:Note
Template:Code =Template:Until
Keypad =Template:Upcoming
Numeric keypad "equals" key Template:CodeTemplate:Note
Template:CodeTemplate:Upcoming Keypad ±Template:Note Numeric keypad "plus or minus" key Template:Code
Template:CodeTemplate:Upcoming Keypad (Template:Note Numeric keypad "opening bracket" key Template:Code
Template:CodeTemplate:Upcoming Keypad )Template:Note Numeric keypad "closing bracket" key Template:Code
Template:Code .Template:Until
Keypad DecimalTemplate:Upcoming
Numeric keypad "point" keyTemplate:Until Template:CodeTemplate:Note
Template:CodeTemplate:Upcoming Keypad . Numeric keypad "point" key Template:Code
Template:CodeTemplate:Upcoming Keypad , Seemingly unused<ref>Template:Bug</ref> Template:Code
Template:Code Keypad Enter Numeric keypad "enter" key Template:Code
Template:Code Num Lock Number lock Template:Code
Template:Code Caps Lock Caps lock Template:Code
Template:Code Scroll Lock Scroll lock Template:Code
Template:Code Up Arrow Up arrow Template:Code
Template:Code Left Arrow Left arrow Template:Code
Template:Code Right Arrow Right arrow Template:Code
Template:Code Down Arrow Down arrow Template:Code
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.

ID Displayed name Description Usable on
Windows macOS Linux
Template:CodeTemplate:Note Left Button Primary mouse button Template:Tc Template:Tc Template:Tc
Template:CodeTemplate:Note Right Button Secondary mouse button Template:Tc Template:Tc Template:Tc
Template:CodeTemplate:Note Middle Button Tertiary mouse buttonTemplate:Note Template:Tc Template:Tc Template:Tc
Template:Code Button 4 Fourth mouse buttonTemplate:Note Template:Tc Template:Tc Template:Tc
Template:Code Button 5 Fifth mouse buttonTemplate:Note Template:Tc Template:Tc Template:Tc
Template:Code Button 6 Sixth mouse button Template:Tc Template:Tc Template:Tc
Template:Code Button 7 Seventh mouse button Template:Tc Template:Tc Template:Tc
Template:Code Button 8 Eighth mouse button Template:Tc Template:Tc Template:Tc
Template:Code Button 9 Ninth mouse button Template:Tc Template:TcTemplate:Upcoming Template:TcTemplate:Upcoming
Template:Code Button 10 Tenth mouse button Template:Tc Template:TcTemplate:Upcoming Template:TcTemplate:Upcoming
Template:Code Button 11 Eleventh mouse button Template:Tc Template:TcTemplate:Upcoming Template:TcTemplate:Upcoming
Template:Code Button 12 Twelfth mouse button Template:Tc Template:TcTemplate:Upcoming Template:TcTemplate:Upcoming
Template:Code Button 13 Thirteenth mouse button Template:Tc Template:TcTemplate:Upcoming Template:TcTemplate:Upcoming
Template:Code Button 14 Fourteenth mouse button Template:Tc Template:TcTemplate:Upcoming Template:TcTemplate:Upcoming
Template:Code Button 15 Fifteenth mouse button Template:Tc Template:TcTemplate:Upcoming Template:TcTemplate:Upcoming
Template:Code Button 16 Sixteenth mouse button Template:Tc Template:TcTemplate:Upcoming Template:TcTemplate:Upcoming
Template:Code Button 17 Seventeenth mouse button Template:Tc Template:TcTemplate:Upcoming Template:TcTemplate:Upcoming
Template:Code Button 18 Eighteenth mouse button Template:Tc Template:TcTemplate:Upcoming Template:TcTemplate:Upcoming
Template:Code Button 19 Nineteenth mouse button Template:Tc Template:TcTemplate:Upcoming Template:TcTemplate:Upcoming
Template:Code Button 20 Twentieth mouse button Template:Tc Template:TcTemplate:Upcoming Template:TcTemplate:Upcoming
Template:Code Button 21 Twenty-first mouse button Template:Tc Template:TcTemplate:Upcoming Template:TcTemplate:Upcoming
Template:Code Button 22 Twenty-second mouse button Template:Tc Template:TcTemplate:Upcoming Template:TcTemplate:Upcoming
Template:Code Button 23 Twenty-third mouse button Template:Tc Template:TcTemplate:Upcoming Template:TcTemplate:Upcoming
Template:Code Button 24 Twenty-fourth mouse button Template:Tc Template:TcTemplate:Upcoming Template:TcTemplate:Upcoming
Template:Code Button 25 Twenty-fifth mouse button Template:Tc Template:TcTemplate:Upcoming Template:TcTemplate:Upcoming
Template:Code Button 26 Twenty-sixth mouse button Template:Tc Template:TcTemplate:Upcoming Template:TcTemplate:Upcoming
Template:Code Button 27 Twenty-seventh mouse button Template:Tc Template:TcTemplate:Upcoming Template:TcTemplate:Upcoming
Template:Code Button 28 Twenty-eighth mouse button Template:Tc Template:TcTemplate:Upcoming Template:TcTemplate:Upcoming
Template:Code Button 29 Twenty-ninth mouse button Template:Tc Template:TcTemplate:Upcoming Template:TcTemplate:Upcoming
Template:Code Button 30 Thirtieth mouse button Template:Tc Template:TcTemplate:Upcoming Template:TcTemplate:Upcoming
Template:Code Button 31 Thirty-first mouse button Template:Tc Template:TcTemplate:Upcoming Template:TcTemplate:Upcoming
Template:Code Button 32 Thirty-second mouse button Template:Tc Template:TcTemplate:Upcoming Template:TcTemplate:Upcoming
Template:Code Button 33 Thirty-third mouse button Template:Tc Template:Tc Template:TcTemplate:Upcoming
Template:Code Button 34 Thirty-fourth mouse button Template:Tc Template:Tc Template:TcTemplate:Upcoming
Template:Code Button 35 Thirty-fifth mouse button Template:Tc Template:Tc Template:TcTemplate:Upcoming
Template:Code Button 36 Thirty-sixth mouse button Template:Tc Template:Tc Template:TcTemplate:Upcoming
Template:Code Button 37 Thirty-seventh mouse button Template:Tc Template:Tc Template:TcTemplate:Upcoming
Template:Code Button 38 Thirty-eighth mouse button Template:Tc Template:Tc Template:TcTemplate:Upcoming
Template:Code Button 39 Thirty-ninth mouse button Template:Tc Template:Tc Template:TcTemplate:Upcoming
Template:Code Button 40 Fortieth mouse button Template:Tc Template:Tc Template:TcTemplate:Upcoming
Template:Code Button 41 Forty-first mouse button Template:Tc Template:Tc Template:TcTemplate:Upcoming
Template:Code Button 42 Forty-second mouse button Template:Tc Template:Tc Template:TcTemplate:Upcoming
Template:Code Button 43 Forty-third mouse button Template:Tc Template:Tc Template:TcTemplate:Upcoming
Template:Code Button 44 Forty-fourth mouse button Template:Tc Template:Tc Template:TcTemplate:Upcoming
Template:Code Button 45 Forty-fifth mouse button Template:Tc Template:Tc Template:TcTemplate:Upcoming
Template:Code Button 46 Forty-sixth mouse button Template:Tc Template:Tc Template:TcTemplate:Upcoming
Template:Code Button 47 Forty-seventh mouse button Template:Tc Template:Tc Template:TcTemplate:Upcoming
Template:Code Button 48 Forty-eighth mouse button Template:Tc Template:Tc Template:TcTemplate:Upcoming

Bedrock Edition

Keyboard codes

In Template:BE, keys are stored as the value of their virtual key code.

ID Displayed name Description Translation key
Template:Code Unassigned Not Bound Template:Info needed
Template:Code Button3 Break
Template:Code BACK Backspace Template:Code
Template:Code TAB Tab Template:Code
Template:Code Button12 Clear
Template:Code RETURN Enter Template:Code
Template:Code SHIFT Shift Template:Code
Template:Code CONTROL Control Template:Code
Template:Code ALTERNATIVE Alt Template:Code
Template:Code PAUSE Pause Template:Code
Template:Code CAPITAL Caps Lock Template:Code
Template:Code Button21 IME Kana
Template:Code Button22 IME Hangul
Template:Code Button23 IME on
Template:Code Button24 IME Junja
Template:Code Button25 IME final mode
Template:Code Button26 IME Hanja / Kanji
Template:Code ESCAPE EscapeTemplate:Note Template:Code
Template:Code Button28 IME conversion
Template:Code Button29 IME non-conversion
Template:Code Button30 IME accept
Template:Code Button31 IME mode change request
Template:Code SPACE Space Template:Code
Template:Code PAGE UP Page Up Template:Code
Template:Code PAGE DOWN Page Down Template:Code
Template:Code END End Template:Code
Template:Code HOME Home Template:Code
Template:Code LEFT Left Arrow Template:Code
Template:Code UP Up Arrow Template:Code
Template:Code RIGHT Right Arrow Template:Code
Template:Code DOWN Down Arrow Template:Code
Template:Code Button41 Select
Template:Code Button42 Print
Template:Code Button43 Execute
Template:Code Button44 Print Screen
Template:Code INSERT Insert Template:Code
Template:Code DELETE Delete Template:Code
Template:Code Button47 Help
Template:Code 0 0 Template:Code
Template:Code 1 1 Template:Code
Template:Code 2 2 Template:Code
Template:Code 3 3 Template:Code
Template:Code 4 4 Template:Code
Template:Code 5 5 Template:Code
Template:Code 6 6 Template:Code
Template:Code 7 7 Template:Code
Template:Code 8 8 Template:Code
Template:Code 9 9 Template:Code
Template:Code A A Template:Code
Template:Code B B Template:Code
Template:Code C C Template:Code
Template:Code D D Template:Code
Template:Code E E Template:Code
Template:Code F F Template:Code
Template:Code G G Template:Code
Template:Code H H Template:Code
Template:Code I I Template:Code
Template:Code J J Template:Code
Template:Code K K Template:Code
Template:Code L L Template:Code
Template:Code M M Template:Code
Template:Code N N Template:Code
Template:Code O O Template:Code
Template:Code P P Template:Code
Template:Code Q Q Template:Code
Template:Code R R Template:Code
Template:Code S S Template:Code
Template:Code T T Template:Code
Template:Code U U Template:Code
Template:Code V V Template:Code
Template:Code W W Template:Code
Template:Code X X Template:Code
Template:Code Y Y Template:Code
Template:Code Z Z Template:Code
Template:Code Button91 Left Windows Key / Left ⌘ / Chromebook Search key
Template:Code Button92 Right Windows Key / Right ⌘
Template:Code Button93 Menu
Template:Code Button95 Sleep
Template:Code NUMPAD0 Numpad 0 Template:Code
Template:Code NUMPAD1 Numpad 1 Template:Code
Template:Code NUMPAD2 Numpad 2 Template:Code
Template:Code NUMPAD3 Numpad 3 Template:Code
Template:Code NUMPAD4 Numpad 4 Template:Code
Template:Code NUMPAD5 Numpad 5 Template:Code
Template:Code NUMPAD6 Numpad 6 Template:Code
Template:Code NUMPAD7 Numpad 7 Template:Code
Template:Code NUMPAD8 Numpad 8 Template:Code
Template:Code NUMPAD9 Numpad 9 Template:Code
Template:Code MULTIPLY Multiply Template:Code
Template:Code ADD Add Template:Code
Template:Code Button108 Separator
Template:Code SUBTRACT Subtract Template:Code
Template:Code DECIMAL Decimal Template:Code
Template:Code DIVIDE Divide Template:Code
Template:Code F1 F1 Template:Code
Template:Code F2 F2 Template:Code
Template:Code F3 F3 Template:Code
Template:Code F4 F4 Template:Code
Template:Code F5 F5 Template:Code
Template:Code F6 F6 Template:Code
Template:Code F7 F7 Template:Code
Template:Code F8 F8 Template:Code
Template:Code F9 F9 Template:Code
Template:Code F10 F10 Template:Code
Template:Code F11 F11 Template:Code
Template:Code F12 F12 Template:Code
Template:Code F13 F13 Template:Code
Template:Code Button125 F14
Template:Code Button126 F15
Template:Code Button127 F16
Template:Code Button128 F17
Template:Code Button129 F18
Template:Code Button130 F19
Template:Code Button131 F20
Template:Code Button132 F21
Template:Code Button133 F22
Template:Code Button134 F23
Template:Code Button135 F24
Template:Code NUMLOCK Num Lock Template:Code
Template:Code SCROLL Scroll Lock Template:Code
Template:Code Button146 OEM-SpecificTemplate:Note
Template:Code Button147 OEM-SpecificTemplate:Note
Template:Code Button148 OEM-SpecificTemplate:Note
Template:Code Button149 OEM-SpecificTemplate:Note
Template:Code Button150 OEM-SpecificTemplate:Note
Template:Code Button166 Browser Back
Template:Code Button167 Browser Forward
Template:Code Button168 Browser Refresh
Template:Code Button169 Browser Stop
Template:Code Button170 Browser Search
Template:Code Button171 Browser Favorites
Template:Code Button172 Browser Start and Home
Template:Code Button173 Volume Mute
Template:Code Button174 Volume Down
Template:Code Button175 Volume Up
Template:Code Button176 Next Track
Template:Code Button177 Previous Track
Template:Code Button178 Stop Media
Template:Code Button179 Play/Pause Media
Template:Code Button180 Start Mail
Template:Code Button181 Select Media
Template:Code Button182 Start Application 1
Template:Code Button183 Start Application 2
Template:Code SEMICOLON Semicolon Template:Code
Template:Code EQUALS Equals Template:Code
Template:Code COMMA Comma Template:Code
Template:Code MINUS Minus Template:Code
Template:Code PERIOD Period Template:Code
Template:Code SLASH Forward Slash Template:Code
Template:Code GRAVE Grave Accent Template:Code
Template:Code LBRACKET Left Bracket Template:Code
Template:Code BACKSLASH Backslash Template:Code
Template:Code RBRACKET Right Bracket Template:Code
Template:Code APOSTROPHE Apostrophe Template:Code
Template:Code Button223 OEM-SpecificTemplate:Note
Template:Code Button225 OEM-SpecificTemplate:Note
Template:Code Button226 OEM-SpecificTemplate:Note
Template:Code Button227 OEM-SpecificTemplate:Note
Template:Code Button228 OEM-SpecificTemplate:Note
Template:Code Button229 IME process
Template:Code Button230 OEM-SpecificTemplate:Note
Template:Code Button231 Template:Info needed
Template:Code Button233 OEM-SpecificTemplate:Note
Template:Code Button234 OEM-SpecificTemplate:Note
Template:Code Button235 OEM-SpecificTemplate:Note
Template:Code Button236 OEM-SpecificTemplate:Note
Template:Code Button237 OEM-SpecificTemplate:Note
Template:Code Button238 OEM-SpecificTemplate:Note
Template:Code Button239 OEM-SpecificTemplate:Note
Template:Code Button240 OEM-SpecificTemplate:Note
Template:Code Button241 OEM-SpecificTemplate:Note
Template:Code Button242 OEM-SpecificTemplate:Note
Template:Code Button243 OEM-SpecificTemplate:Note
Template:Code Button244 OEM-SpecificTemplate:Note
Template:Code Button245 OEM-SpecificTemplate:Note
Template:Code Button246 Attn
Template:Code Button247 CrSel
Template:Code Button248 ExSel
Template:Code Button249 Erase EOF
Template:Code Button250 Play
Template:Code Button251 Zoom
Template:Code Button253 PA1
Template:Code Button254 Clear

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

Template:Verify

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

Notes

Template:Notelist

References

Template:Reflist

Navigation

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:键控代码