You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

102 lines
2.7 KiB
Python

keycodelst = {"A":0x04}
#keycodelst["Q"] = 0x04
keycodelst["B"] = 0x05
keycodelst["C"] = 0x06
keycodelst["D"] = 0x07
keycodelst["E"] = 0x08
keycodelst["F"] = 0x09
keycodelst["G"] = 0x0a
keycodelst["H"] = 0x0b
keycodelst["I"] = 0x0c
keycodelst["J"] = 0x0d
keycodelst["K"] = 0x0e
keycodelst["L"] = 0x0f
keycodelst["M"] = 0x10
keycodelst["N"] = 0x11
keycodelst["O"] = 0x12
keycodelst["P"] = 0x13
keycodelst["Q"] = 0x14
keycodelst["R"] = 0x15
keycodelst["S"] = 0x16
keycodelst["T"] = 0x17
keycodelst["U"] = 0x18
keycodelst["V"] = 0x19
keycodelst["W"] = 0x1a
keycodelst["X"] = 0x1b
keycodelst["Y"] = 0x1c
keycodelst["Z"] = 0x1d
keycodelst["1"] = 0x1e
keycodelst["2"] = 0x1f
keycodelst["3"] = 0x20
keycodelst["4"] = 0x21
keycodelst["5"] = 0x22
keycodelst["6"] = 0x23
keycodelst["7"] = 0x24
keycodelst["8"] = 0x25
keycodelst["9"] = 0x26
keycodelst["0"] = 0x27
keycodelst["ENTER"] = 0x28
keycodelst["ESCAPE"] = 0x29
keycodelst[","] = 0x36
keycodelst["BACKSPACE_DELETE"] = 0x2a
keycodelst["TAB"] = 0x2b
keycodelst[" "] = 0x2c
keycodelst["RIGHT_PARENTHESIS"] = 0x2d
keycodelst["="] = 0x2e
keycodelst["^"] = 0x2f
#keycodelst["DOLLAR_SIGN"] = 0x30
keycodelst["\\"] = 0x31 # Actually a mu
keycodelst["#"] = 0x32
keycodelst["U_ACCENT"] = 0x34
keycodelst["ACCENT_GRAVE"] = 0x35 # Actually, a superscript 2
keycodelst[";"] = 0x36
keycodelst[":"] = 0x37
keycodelst["<"] = 0x64 # Actually exclamation point
keycodelst["CAPS_LOCK"] = 0x39
keycodelst["F1"] = 0x3a
keycodelst["F2"] = 0x3b
keycodelst["F3"] = 0x3c
keycodelst["F4"] = 0x3d
keycodelst["F5"] = 0x3e
keycodelst["F6"] = 0x3f
keycodelst["F7"] = 0x40
keycodelst["F8"] = 0x41
keycodelst["F9"] = 0x42
keycodelst["F10"] = 0x43
keycodelst["F11"] = 0x44
keycodelst["F12"] = 0x45
keycodelst["PRINT_SCREEN"] = 0x46
keycodelst["SCROLL_LOCK"] = 0x47
keycodelst["PAUSE_BREAK"] = 0x48
keycodelst["INSERT"] = 0x49
keycodelst["HOME"] = 0x4a
keycodelst["PAGE_UP"] = 0x4b
keycodelst["DELETE"] = 0x4c
keycodelst["END"] = 0x4d
keycodelst["PAGE_DOWN"] = 0x4e
keycodelst["RIGHT_ARROW"] = 0x4f
keycodelst["LEFT_ARROW"] = 0x50
keycodelst["DOWN_ARROW"] = 0x51
keycodelst["UP_ARROW"] = 0x52
keycodelst["CLEAR"] = 0x53
keycodelst["LEFT_CTRL"] = 0xe0
keycodelst["LEFT_SHIFT"] = 0xe1
keycodelst["LEFT_ALT"] = 0xe2
keycodelst["LEFT_META"] = 0xe3
keycodelst["RIGHT_CTRL"] = 0xe4
keycodelst["RIGHT_SHIFT"] = 0xe5
keycodelst["RIGHT_ALT"] = 0xe6
keycodelst["RIGHT_META"] = 0xe7
keycodelst["MEDIA_PLAY_PAUSE"] = 0xe8
keycodelst["REFRESH"] = 0xfa
# Keycodes that have no mapping in AZERTY
keycodelst["/"] = 0x38
keycodelst["["] = 0x2f
keycodelst["-"] = 0x2d
keycodelst["]"] = 0x30
keycodelst["."] = 0x37
#keycodelst["\'"] = 0x31 # This exists, but we use keycodelst["4 instead.
keycodelst["`"] = 0x35
keycodelst["\'"] = 0x34