Skip to content

Commit

Permalink
Merge pull request #99 from tanjeffreyz/dev
Browse files Browse the repository at this point in the history
Fixed existing key names for now, will add more soon
  • Loading branch information
tanjeffreyz authored May 29, 2022
2 parents 98774ea + 5e81be1 commit 07430fb
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 66 deletions.
2 changes: 1 addition & 1 deletion resources
132 changes: 67 additions & 65 deletions src/common/vkeys.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,71 +23,73 @@
MAPVK_VK_TO_VSC = 0

# https://docs.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes?redirectedfrom=MSDN
KEY_MAP = {'tab': 0x09, # Special Keys
'alt': 0x12,
'space': 0x20,
'lshift': 0xA0,
'ctrl': 0x11,
'del': 0x2E,
'end': 0x23,
'pgup': 0x21,
'pgdown': 0x22,

'left': 0x25, # Arrow keys
'up': 0x26,
'right': 0x27,
'down': 0x28,

'0': 0x30, # Numbers
'1': 0x31,
'2': 0x32,
'3': 0x33,
'4': 0x34,
'5': 0x35,
'6': 0x36,
'7': 0x37,
'8': 0x38,
'9': 0x39,

'f1': 0x70, # Function keys
'f2': 0x71,
'f3': 0x72,
'f4': 0x73,
'f5': 0x74,
'f6': 0x75,
'f7': 0x76,
'f8': 0x77,
'f9': 0x78,
'f10': 0x79,
'f11': 0x7A,
'f12': 0x7B,

'a': 0x41, # Letters
'b': 0x42,
'c': 0x43,
'd': 0x44,
'e': 0x45,
'f': 0x46,
'g': 0x47,
'h': 0x48,
'i': 0x49,
'j': 0x4A,
'k': 0x4B,
'l': 0x4C,
'm': 0x4D,
'n': 0x4E,
'o': 0x4F,
'p': 0x50,
'q': 0x51,
'r': 0x52,
's': 0x53,
't': 0x54,
'u': 0x55,
'v': 0x56,
'w': 0x57,
'x': 0x58,
'y': 0x59,
'z': 0x5A}
KEY_MAP = {
'tab': 0x09, # Special Keys
'alt': 0x12,
'space': 0x20,
'shift': 0xA0,
'ctrl': 0x11,
'del': 0x2E,
'end': 0x23,
'pgup': 0x21,
'pgdown': 0x22,

'left': 0x25, # Arrow keys
'up': 0x26,
'right': 0x27,
'down': 0x28,

'0': 0x30, # Numbers
'1': 0x31,
'2': 0x32,
'3': 0x33,
'4': 0x34,
'5': 0x35,
'6': 0x36,
'7': 0x37,
'8': 0x38,
'9': 0x39,

'f1': 0x70, # Function keys
'f2': 0x71,
'f3': 0x72,
'f4': 0x73,
'f5': 0x74,
'f6': 0x75,
'f7': 0x76,
'f8': 0x77,
'f9': 0x78,
'f10': 0x79,
'f11': 0x7A,
'f12': 0x7B,

'a': 0x41, # Letters
'b': 0x42,
'c': 0x43,
'd': 0x44,
'e': 0x45,
'f': 0x46,
'g': 0x47,
'h': 0x48,
'i': 0x49,
'j': 0x4A,
'k': 0x4B,
'l': 0x4C,
'm': 0x4D,
'n': 0x4E,
'o': 0x4F,
'p': 0x50,
'q': 0x51,
'r': 0x52,
's': 0x53,
't': 0x54,
'u': 0x55,
'v': 0x56,
'w': 0x57,
'x': 0x58,
'y': 0x59,
'z': 0x5A
}


#################################
Expand Down

0 comments on commit 07430fb

Please sign in to comment.