From f089ad59fb9a3cfedb62aa6b85cfb1165d04dceb Mon Sep 17 00:00:00 2001 From: sbosse Date: Mon, 14 Oct 2024 23:09:09 +0200 Subject: [PATCH] Mon 14 Oct 23:06:38 CEST 2024 --- kernel/keymap.us.mac.c | 156 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 156 insertions(+) create mode 100644 kernel/keymap.us.mac.c diff --git a/kernel/keymap.us.mac.c b/kernel/keymap.us.mac.c new file mode 100644 index 0000000..cc50c25 --- /dev/null +++ b/kernel/keymap.us.mac.c @@ -0,0 +1,156 @@ + +// 0-9 +{'a', 'A', ASCII_SOH, KEYMAP_ALPHA}, +{'s', 'S', ASCII_DC3, KEYMAP_ALPHA}, +{'d', 'D', ASCII_EOT, KEYMAP_ALPHA}, +{'f', 'F', ASCII_ACK, KEYMAP_ALPHA}, +{'h', 'H', ASCII_BS, KEYMAP_ALPHA}, +{'g', 'G', ASCII_BEL, KEYMAP_ALPHA}, +{'z', 'Z', ASCII_SUB, KEYMAP_ALPHA}, +{'x', 'X', ASCII_CAN, KEYMAP_ALPHA}, +{'c', 'C', ASCII_ETX, KEYMAP_ALPHA}, +{'v', 'V', ASCII_SYN, KEYMAP_ALPHA}, + +// 10-19 +{KEY_INVALID, KEY_INVALID, KEY_INVALID, 0}, +{'b', 'B', ASCII_STX, KEYMAP_ALPHA}, +{'q', 'Q', ASCII_DC1, KEYMAP_ALPHA}, +{'w', 'W', ASCII_ETB, KEYMAP_ALPHA}, +{'e', 'E', ASCII_ENQ, KEYMAP_ALPHA}, +{'r', 'R', ASCII_DC2, KEYMAP_ALPHA}, +{'y', 'Y', ASCII_EM, KEYMAP_ALPHA}, +{'t', 'T', ASCII_DC4, KEYMAP_ALPHA}, +{'1', '!', '1', 0}, +{'2', '@', '2', 0}, + +// 20-29 +{'3', '#', '3', 0}, +{'4', '$', '4', 0}, +{'6', '^', '6', 0}, +{'5', '%', '5', 0}, +{'=', '+', '=', 0}, +{'9', '(', '9', 0}, +{'7', '&', '7', 0}, +{'-', '_', '-', 0}, +{'8', '*', '8', 0}, +{'0', ')', '0', 0}, + +// 30-39 +{']', '}', ']', 0}, +{'o', 'O', ASCII_SI, KEYMAP_ALPHA}, +{'u', 'U', ASCII_NAK, KEYMAP_ALPHA}, +{'[', '{', '[', 0}, +{'i', 'I', ASCII_HT, KEYMAP_ALPHA}, +{'p', 'P', ASCII_DLE, KEYMAP_ALPHA}, +{ASCII_CR, ASCII_CR, ASCII_CR, 0}, +{'l', 'L', ASCII_FF, KEYMAP_ALPHA}, +{'j', 'J', ASCII_LF, KEYMAP_ALPHA}, +{'\'', '\"', '\'', 0}, + +// 40-49 +{'k', 'K', ASCII_VT, KEYMAP_ALPHA}, +{';', ':', ';', 0}, +{'\\', '|', '\\', 0}, +{',', '<', ',', 0}, +{'/', '?', '/', 0}, +{'n', 'N', ASCII_SO, KEYMAP_ALPHA}, +{'m', 'M', ASCII_CR, KEYMAP_ALPHA}, +{'.', '>', '.', 0}, +{ASCII_HT, ASCII_HT, ASCII_HT, 0}, +{' ', ' ', ' ', 0}, + +// 50-59 +{'`', '~', '`', 0}, +{ASCII_BS, ASCII_BS, ASCII_BS, 0}, +{KEY_INVALID, KEY_INVALID, KEY_INVALID, 0}, +{ASCII_ESC, ASCII_ESC, ASCII_NUL, 0}, +{KEY_INVALID, KEY_INVALID, KEY_INVALID, 0}, +{KEY_INVALID, KEY_INVALID, KEY_INVALID, KEYMAP_ALT}, +{KEY_INVALID, KEY_INVALID, KEY_INVALID, KEYMAP_SHIFT}, +{KEY_INVALID, KEY_INVALID, KEY_INVALID, KEYMAP_CAPSLOCK}, +{KEY_INVALID, KEY_INVALID, KEY_INVALID, KEYMAP_ALT}, +{KEY_INVALID, KEY_INVALID, KEY_INVALID, KEYMAP_CTRL}, + +// 60-69 +{KEY_INVALID, KEY_INVALID, KEY_INVALID, 0}, +{KEY_INVALID, KEY_INVALID, KEY_INVALID, 0}, +{KEY_INVALID, KEY_INVALID, KEY_INVALID, 0}, +{KEY_INVALID, KEY_INVALID, KEY_INVALID, 0}, +{'.', '.', '.', 0}, +{KEY_INVALID, KEY_INVALID, KEY_INVALID, 0}, +{'*', '*', '*', 0}, +{KEY_INVALID, KEY_INVALID, KEY_INVALID, 0}, +{'+', '+', '+', 0}, + +// 70-79 +{KEY_INVALID, KEY_INVALID, KEY_INVALID, 0}, +{KEY_INVALID, KEY_INVALID, KEY_INVALID, 0}, +{KEY_INVALID, KEY_INVALID, KEY_INVALID, 0}, +{KEY_INVALID, KEY_INVALID, KEY_INVALID, 0}, +{KEY_INVALID, KEY_INVALID, KEY_INVALID, 0}, +{'/', '/', '/', 0}, +{ASCII_CR, ASCII_CR, ASCII_CR, 0}, +{KEY_INVALID, KEY_INVALID, KEY_INVALID, 0}, +{'-', '-', '-', 0}, +{KEY_INVALID, KEY_INVALID, KEY_INVALID, 0}, + +// 80-89 +{KEY_INVALID, KEY_INVALID, KEY_INVALID, 0}, +{'=', '=', '=', KEYMAP_NUMPAD}, +{'0', '0', '0', KEYMAP_NUMPAD}, +{'1', '1', '1', KEYMAP_NUMPAD}, +{'2', '2', '2', KEYMAP_NUMPAD}, +{'3', '3', '3', KEYMAP_NUMPAD}, +{'4', '4', '4', KEYMAP_NUMPAD}, +{'5', '5', '5', KEYMAP_NUMPAD}, +{'6', '6', '6', KEYMAP_NUMPAD}, +{'7', '7', '7', KEYMAP_NUMPAD}, + +// 90-99 +{KEY_INVALID, KEY_INVALID, KEY_INVALID, 0}, +{'8', '8', '8', KEYMAP_NUMPAD}, +{'9', '9', '9', KEYMAP_NUMPAD}, +{KEY_INVALID, KEY_INVALID, KEY_INVALID, 0}, +{KEY_INVALID, KEY_INVALID, KEY_INVALID, 0}, +{KEY_INVALID, KEY_INVALID, KEY_INVALID, 0}, +{KEY_F5,KEY_F5,KEY_F5,0}, +{KEY_F6,KEY_F6,KEY_F6,0}, +{KEY_F7,KEY_F7,KEY_F7,0}, +{KEY_F3,KEY_F3,KEY_F3,0}, + +// 100-109 +{KEY_F8,KEY_F8,KEY_F8,0}, +{KEY_F9,KEY_F9,KEY_F9,0}, +{KEY_INVALID, KEY_INVALID, KEY_INVALID, 0}, +{KEY_F11,KEY_F11,KEY_F11,0}, +{KEY_INVALID, KEY_INVALID, KEY_INVALID, 0}, +{KEY_F13,KEY_F13,KEY_F13,0}, +{KEY_INVALID, KEY_INVALID, KEY_INVALID, 0}, +{KEY_F14,KEY_F14,KEY_F14,0}, +{KEY_INVALID, KEY_INVALID, KEY_INVALID, 0}, +{KEY_F10,KEY_F10,KEY_F10,0}, + +// 110-119 +{KEY_INVALID, KEY_INVALID, KEY_INVALID, 0}, +{KEY_F12,KEY_F12,KEY_F12,0}, +{KEY_INVALID, KEY_INVALID, KEY_INVALID, 0}, +{KEY_F15,KEY_F15,KEY_F15,0}, +{KEY_HELP, KEY_HELP, KEY_HELP, 0}, +{KEY_HOME, KEY_HOME, KEY_HOME, 0}, +{KEY_PAGE_UP, KEY_PAGE_UP, KEY_PAGE_UP, 0}, +{ASCII_BS, ASCII_BS, ASCII_BS, 0}, +{KEY_INVALID, KEY_INVALID, KEY_INVALID, 0}, +{KEY_END, KEY_END, KEY_END, 0}, + +// 120-127 +{KEY_F2,KEY_F2,KEY_F2,0}, +{KEY_PAGE_DOWN, KEY_PAGE_DOWN, KEY_PAGE_DOWN, 0}, +{KEY_F1,KEY_F1,KEY_F1,0}, +{KEY_LEFT,KEY_LEFT,KEY_LEFT,0}, +{KEY_RIGHT,KEY_RIGHT,KEY_RIGHT,0}, +{KEY_DOWN,KEY_DOWN,KEY_DOWN,0}, +{KEY_UP,KEY_UP,KEY_UP,0}, +{KEY_INVALID, KEY_INVALID, KEY_INVALID, 0}, + + +