Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Minecraft old (1.12) & new (1.16) keycodes
Key Old Code New Code
BUTTON0 -100 key.mouse.left
BUTTON1 -99 key.mouse.right
BUTTON2 -98 key.mouse.middle
BUTTON3 -97 key.mouse.4
BUTTON4 -96 key.mouse.5
BUTTON5 -95 key.mouse.6
BUTTON6 -94 key.mouse.7
BUTTON7 -93 key.mouse.8
NONE 0 key.keyboard.unknown
ESCAPE 1 key.keyboard.escape
1 2 key.keyboard.1
2 3 key.keyboard.2
3 4 key.keyboard.3
4 5 key.keyboard.4
5 6 key.keyboard.5
6 7 key.keyboard.6
7 8 key.keyboard.7
8 9 key.keyboard.8
9 10 key.keyboard.9
0 11 key.keyboard.0
MINUS 12 key.keyboard.minus
EQUALS 13 key.keyboard.equal
BACK 14 key.keyboard.backspace
TAB 15 key.keyboard.tab
Q 16 key.keyboard.q
W 17 key.keyboard.w
E 18 key.keyboard.e
R 19 key.keyboard.r
T 20 key.keyboard.t
Y 21 key.keyboard.y
U 22 key.keyboard.u
I 23 key.keyboard.i
O 24 key.keyboard.o
P 25 key.keyboard.p
LBRACKET 26 key.keyboard.left.bracket
RBRACKET 27 key.keyboard.right.bracket
RETURN 28 key.keyboard.enter
LCONTROL 29 key.keyboard.left.control
A 30 key.keyboard.a
S 31 key.keyboard.s
D 32 key.keyboard.d
F 33 key.keyboard.f
G 34 key.keyboard.g
H 35 key.keyboard.h
J 36 key.keyboard.j
K 37 key.keyboard.k
L 38 key.keyboard.l
SEMICOLON 39 key.keyboard.semicolon
APOSTROPHE 40 key.keyboard.apostrophe
GRAVE 41 key.keyboard.grave.accent
LSHIFT 42 key.keyboard.left.shift
BACKSLASH 43 key.keyboard.backslash
Z 44 key.keyboard.z
X 45 key.keyboard.x
C 46 key.keyboard.c
V 47 key.keyboard.v
B 48 key.keyboard.b
N 49 key.keyboard.n
M 50 key.keyboard.m
COMMA 51 key.keyboard.comma
PERIOD 52 key.keyboard.period
SLASH 53 key.keyboard.slash
RSHIFT 54 key.keyboard.right.shift
MULTIPLY 55 key.keyboard.keypad.multiply
LMENU 56 key.keyboard.left.alt
SPACE 57 key.keyboard.space
CAPITAL 58 key.keyboard.caps.lock
F1 59 key.keyboard.f1
F2 60 key.keyboard.f2
F3 61 key.keyboard.f3
F4 62 key.keyboard.f4
F5 63 key.keyboard.f5
F6 64 key.keyboard.f6
F7 65 key.keyboard.f7
F8 66 key.keyboard.f8
F9 67 key.keyboard.f9
F10 68 key.keyboard.f10
NUMLOCK 69 key.keyboard.num.lock
SCROLL 70 key.keyboard.scroll.lock
NUMPAD7 71 key.keyboard.keypad.7
NUMPAD8 72 key.keyboard.keypad.8
NUMPAD9 73 key.keyboard.keypad.9
SUBTRACT 74 key.keyboard.keypad.subtract
NUMPAD4 75 key.keyboard.keypad.4
NUMPAD5 76 key.keyboard.keypad.5
NUMPAD6 77 key.keyboard.keypad.6
ADD 78 key.keyboard.keypad.add
NUMPAD1 79 key.keyboard.keypad.1
NUMPAD2 80 key.keyboard.keypad.2
NUMPAD3 81 key.keyboard.keypad.3
NUMPAD0 82 key.keyboard.keypad.0
DECIMAL 83 key.keyboard.keypad.decimal
F11 87 key.keyboard.f11
F12 88 key.keyboard.f12
F13 100 key.keyboard.f13
F14 101 key.keyboard.f14
F15 102 key.keyboard.f15
F16 103 key.keyboard.f16
F17 104 key.keyboard.f17
F18 105 key.keyboard.f18
KANA 112
F19 113 key.keyboard.f19
F20 key.keyboard.f20
F21 key.keyboard.f21
F22 key.keyboard.f22
F23 key.keyboard.f23
F24 key.keyboard.f24
F25 key.keyboard.f25
CONVERT 121
NOCONVERT 123
YEN 125
NUMPADEQUALS 141 key.keyboard.keypad.equal
CIRCUMFLEX 144
AT 145
COLON 146
UNDERLINE 147
KANJI 148
STOP 149
AX 150
UNLABLED 151
NUMPADENTER 156 key.keyboard.keypad.enter
RCONTROL 157 key.keyboard.right.control
SECTION 157
NUMPADCOMMA 179
DIVIDE 181 key.keyboard.keypad.divide
SYSRQ 183 key.keyboard.print.screen
RMENU 184 key.keyboard.right.alt
FUNCTION 196
PAUSE 197 key.keyboard.pause
HOME 199 key.keyboard.home
UP 200 key.keyboard.up
PRIOR 201 key.keyboard.page.up
LEFT 203 key.keyboard.left
RIGHT 205 key.keyboard.right
END 207 key.keyboard.end
DOWN 208 key.keyboard.down
NEXT 209 key.keyboard.page.down
INSERT 210 key.keyboard.insert
DELETE 211 key.keyboard.delete
LMETA 219 key.keyboard.left.win
RMETA 220 key.keyboard.right.win
APPS 221 key.keyboard.menu
POWER 222
SLEEP 223
World 1 key.keyboard.world.1
World 2 key.keyboard.world.2

Format

Vanilla (no modifiers)

options.txt

key_ + name + : + keycode (old or new depending on Minecraft version)

Forge (up to one modifier)

options.txt

If no modifiers:

key_ + name + : + keycode

If one modifier:

key_ + name + : + keycode + : + modifier

Where modifier stands either for SHIFT or CONTROL or ALT.

Just Enough Keys (up to 2 modifiers)

options.txt

key_ + name + : + keycode

options.justenoughkeys.txt

modifiers. + name + : + modifier keycodes

Where modifier keycodes are a comma separated list of minecraft keycodes of alt, control, shift keys.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment