Added a key mapping for the equal key.

This commit is contained in:
Yuval Dolev 2020-01-17 00:49:08 +02:00
parent 2375a40b29
commit b6f6663727
2 changed files with 201 additions and 200 deletions

View File

@ -1,212 +1,212 @@
enum{ enum{
KeyCode_A = 1, KeyCode_A = 1,
KeyCode_B = 2, KeyCode_B = 2,
KeyCode_C = 3, KeyCode_C = 3,
KeyCode_D = 4, KeyCode_D = 4,
KeyCode_E = 5, KeyCode_E = 5,
KeyCode_F = 6, KeyCode_F = 6,
KeyCode_G = 7, KeyCode_G = 7,
KeyCode_H = 8, KeyCode_H = 8,
KeyCode_I = 9, KeyCode_I = 9,
KeyCode_J = 10, KeyCode_J = 10,
KeyCode_K = 11, KeyCode_K = 11,
KeyCode_L = 12, KeyCode_L = 12,
KeyCode_M = 13, KeyCode_M = 13,
KeyCode_N = 14, KeyCode_N = 14,
KeyCode_O = 15, KeyCode_O = 15,
KeyCode_P = 16, KeyCode_P = 16,
KeyCode_Q = 17, KeyCode_Q = 17,
KeyCode_R = 18, KeyCode_R = 18,
KeyCode_S = 19, KeyCode_S = 19,
KeyCode_T = 20, KeyCode_T = 20,
KeyCode_U = 21, KeyCode_U = 21,
KeyCode_V = 22, KeyCode_V = 22,
KeyCode_W = 23, KeyCode_W = 23,
KeyCode_X = 24, KeyCode_X = 24,
KeyCode_Y = 25, KeyCode_Y = 25,
KeyCode_Z = 26, KeyCode_Z = 26,
KeyCode_0 = 27, KeyCode_0 = 27,
KeyCode_1 = 28, KeyCode_1 = 28,
KeyCode_2 = 29, KeyCode_2 = 29,
KeyCode_3 = 30, KeyCode_3 = 30,
KeyCode_4 = 31, KeyCode_4 = 31,
KeyCode_5 = 32, KeyCode_5 = 32,
KeyCode_6 = 33, KeyCode_6 = 33,
KeyCode_7 = 34, KeyCode_7 = 34,
KeyCode_8 = 35, KeyCode_8 = 35,
KeyCode_9 = 36, KeyCode_9 = 36,
KeyCode_Space = 37, KeyCode_Space = 37,
KeyCode_Tick = 38, KeyCode_Tick = 38,
KeyCode_Minus = 39, KeyCode_Minus = 39,
KeyCode_Equal = 40, KeyCode_Equal = 40,
KeyCode_LeftBracket = 41, KeyCode_LeftBracket = 41,
KeyCode_RightBracket = 42, KeyCode_RightBracket = 42,
KeyCode_Semicolon = 43, KeyCode_Semicolon = 43,
KeyCode_Quote = 44, KeyCode_Quote = 44,
KeyCode_Comma = 45, KeyCode_Comma = 45,
KeyCode_Period = 46, KeyCode_Period = 46,
KeyCode_ForwardSlash = 47, KeyCode_ForwardSlash = 47,
KeyCode_BackwardSlash = 48, KeyCode_BackwardSlash = 48,
KeyCode_Tab = 49, KeyCode_Tab = 49,
KeyCode_Escape = 50, KeyCode_Escape = 50,
KeyCode_Pause = 51, KeyCode_Pause = 51,
KeyCode_Up = 52, KeyCode_Up = 52,
KeyCode_Down = 53, KeyCode_Down = 53,
KeyCode_Left = 54, KeyCode_Left = 54,
KeyCode_Right = 55, KeyCode_Right = 55,
KeyCode_Backspace = 56, KeyCode_Backspace = 56,
KeyCode_Return = 57, KeyCode_Return = 57,
KeyCode_Delete = 58, KeyCode_Delete = 58,
KeyCode_Insert = 59, KeyCode_Insert = 59,
KeyCode_Home = 60, KeyCode_Home = 60,
KeyCode_End = 61, KeyCode_End = 61,
KeyCode_PageUp = 62, KeyCode_PageUp = 62,
KeyCode_PageDown = 63, KeyCode_PageDown = 63,
KeyCode_CapsLock = 64, KeyCode_CapsLock = 64,
KeyCode_NumLock = 65, KeyCode_NumLock = 65,
KeyCode_ScrollLock = 66, KeyCode_ScrollLock = 66,
KeyCode_Menu = 67, KeyCode_Menu = 67,
KeyCode_Shift = 68, KeyCode_Shift = 68,
KeyCode_Control = 69, KeyCode_Control = 69,
KeyCode_Alt = 70, KeyCode_Alt = 70,
KeyCode_Command = 71, KeyCode_Command = 71,
KeyCode_F1 = 72, KeyCode_F1 = 72,
KeyCode_F2 = 73, KeyCode_F2 = 73,
KeyCode_F3 = 74, KeyCode_F3 = 74,
KeyCode_F4 = 75, KeyCode_F4 = 75,
KeyCode_F5 = 76, KeyCode_F5 = 76,
KeyCode_F6 = 77, KeyCode_F6 = 77,
KeyCode_F7 = 78, KeyCode_F7 = 78,
KeyCode_F8 = 79, KeyCode_F8 = 79,
KeyCode_F9 = 80, KeyCode_F9 = 80,
KeyCode_F10 = 81, KeyCode_F10 = 81,
KeyCode_F11 = 82, KeyCode_F11 = 82,
KeyCode_F12 = 83, KeyCode_F12 = 83,
KeyCode_F13 = 84, KeyCode_F13 = 84,
KeyCode_F14 = 85, KeyCode_F14 = 85,
KeyCode_F15 = 86, KeyCode_F15 = 86,
KeyCode_F16 = 87, KeyCode_F16 = 87,
KeyCode_COUNT = 88, KeyCode_COUNT = 88,
}; };
global char* key_code_name[KeyCode_COUNT] = { global char* key_code_name[KeyCode_COUNT] = {
"None", "None",
"A", "A",
"B", "B",
"C", "C",
"D", "D",
"E", "E",
"F", "F",
"G", "G",
"H", "H",
"I", "I",
"J", "J",
"K", "K",
"L", "L",
"M", "M",
"N", "N",
"O", "O",
"P", "P",
"Q", "Q",
"R", "R",
"S", "S",
"T", "T",
"U", "U",
"V", "V",
"W", "W",
"X", "X",
"Y", "Y",
"Z", "Z",
"0", "0",
"1", "1",
"2", "2",
"3", "3",
"4", "4",
"5", "5",
"6", "6",
"7", "7",
"8", "8",
"9", "9",
"Space", "Space",
"Tick", "Tick",
"Minus", "Minus",
"Equal", "Equal",
"LeftBracket", "LeftBracket",
"RightBracket", "RightBracket",
"Semicolon", "Semicolon",
"Quote", "Quote",
"Comma", "Comma",
"Period", "Period",
"ForwardSlash", "ForwardSlash",
"BackwardSlash", "BackwardSlash",
"Tab", "Tab",
"Escape", "Escape",
"Pause", "Pause",
"Up", "Up",
"Down", "Down",
"Left", "Left",
"Right", "Right",
"Backspace", "Backspace",
"Return", "Return",
"Delete", "Delete",
"Insert", "Insert",
"Home", "Home",
"End", "End",
"PageUp", "PageUp",
"PageDown", "PageDown",
"CapsLock", "CapsLock",
"NumLock", "NumLock",
"ScrollLock", "ScrollLock",
"Menu", "Menu",
"Shift", "Shift",
"Control", "Control",
"Alt", "Alt",
"Command", "Command",
"F1", "F1",
"F2", "F2",
"F3", "F3",
"F4", "F4",
"F5", "F5",
"F6", "F6",
"F7", "F7",
"F8", "F8",
"F9", "F9",
"F10", "F10",
"F11", "F11",
"F12", "F12",
"F13", "F13",
"F14", "F14",
"F15", "F15",
"F16", "F16",
}; };
enum{ enum{
MouseCode_Left = 1, MouseCode_Left = 1,
MouseCode_Middle = 2, MouseCode_Middle = 2,
MouseCode_Right = 3, MouseCode_Right = 3,
MouseCode_COUNT = 4, MouseCode_COUNT = 4,
}; };
global char* mouse_code_name[MouseCode_COUNT] = { global char* mouse_code_name[MouseCode_COUNT] = {
"None", "None",
"Left", "Left",
"Middle", "Middle",
"Right", "Right",
}; };
enum{ enum{
CoreCode_Startup = 1, CoreCode_Startup = 1,
CoreCode_Animate = 2, CoreCode_Animate = 2,
CoreCode_ClickActivateView = 3, CoreCode_ClickActivateView = 3,
CoreCode_ClickDeactivateView = 4, CoreCode_ClickDeactivateView = 4,
CoreCode_TryExit = 5, CoreCode_TryExit = 5,
CoreCode_FileExternallyModified = 6, CoreCode_FileExternallyModified = 6,
CoreCode_NewClipboardContents = 7, CoreCode_NewClipboardContents = 7,
CoreCode_COUNT = 8, CoreCode_COUNT = 8,
}; };
global char* core_code_name[CoreCode_COUNT] = { global char* core_code_name[CoreCode_COUNT] = {
"None", "None",
"Startup", "Startup",
"Animate", "Animate",
"ClickActivateView", "ClickActivateView",
"ClickDeactivateView", "ClickDeactivateView",
"TryExit", "TryExit",
"FileExternallyModified", "FileExternallyModified",
"NewClipboardContents", "NewClipboardContents",
}; };

View File

@ -387,6 +387,7 @@ mac_keycode_init(void){
keycode_lookup_table[kVK_Space] = KeyCode_Space; keycode_lookup_table[kVK_Space] = KeyCode_Space;
keycode_lookup_table[kVK_ANSI_Grave] = KeyCode_Tick; keycode_lookup_table[kVK_ANSI_Grave] = KeyCode_Tick;
keycode_lookup_table[kVK_ANSI_Minus] = KeyCode_Minus; keycode_lookup_table[kVK_ANSI_Minus] = KeyCode_Minus;
keycode_lookup_table[kVK_ANSI_Equal] = KeyCode_Equal;
keycode_lookup_table[kVK_ANSI_LeftBracket] = KeyCode_LeftBracket; keycode_lookup_table[kVK_ANSI_LeftBracket] = KeyCode_LeftBracket;
keycode_lookup_table[kVK_ANSI_RightBracket] = KeyCode_RightBracket; keycode_lookup_table[kVK_ANSI_RightBracket] = KeyCode_RightBracket;
keycode_lookup_table[kVK_ANSI_Semicolon] = KeyCode_Semicolon; keycode_lookup_table[kVK_ANSI_Semicolon] = KeyCode_Semicolon;