diff --git a/src/include/keycodes.h b/src/include/keycodes.h index ba54739..e372ff4 100644 --- a/src/include/keycodes.h +++ b/src/include/keycodes.h @@ -64,7 +64,9 @@ f(KEY_GRAVE , 53, "" , NULL, MODIFIERS_NONE ) \ f(KEY_DOT , 55, "." , ">" , MODIFIERS_SHIFT) \ f(KEY_SLASH , 56, "/" , "?" , MODIFIERS_SHIFT) \ - f(KEY_CAPS , 57, "" , NULL, MODIFIERS_NONE ) + f(KEY_CAPS , 57, "" , NULL, MODIFIERS_NONE ) \ + f(KEY_LEFT_SHIFT, 225, NULL, NULL, MODIFIERS_NONE) \ + f(KEY_RIGHT_SHIFT, 229, NULL, NULL, MODIFIERS_NONE) #define KEY_ENUM(name, id, normal, modified, modifiers) name = id, diff --git a/src/include/keycodes.h b/src/include/keycodes.h index ba54739..e372ff4 100644 --- a/src/include/keycodes.h +++ b/src/include/keycodes.h @@ -64,7 +64,9 @@ f(KEY_GRAVE , 53, "" , NULL, MODIFIERS_NONE ) \ f(KEY_DOT , 55, "." , ">" , MODIFIERS_SHIFT) \ f(KEY_SLASH , 56, "/" , "?" , MODIFIERS_SHIFT) \ - f(KEY_CAPS , 57, "" , NULL, MODIFIERS_NONE ) + f(KEY_CAPS , 57, "" , NULL, MODIFIERS_NONE ) \ + f(KEY_LEFT_SHIFT, 225, NULL, NULL, MODIFIERS_NONE) \ + f(KEY_RIGHT_SHIFT, 229, NULL, NULL, MODIFIERS_NONE) #define KEY_ENUM(name, id, normal, modified, modifiers) name = id, diff --git a/src/userland/ps2kb/main.c b/src/userland/ps2kb/main.c index 8b74e77..7fd96c4 100644 --- a/src/userland/ps2kb/main.c +++ b/src/userland/ps2kb/main.c @@ -2,13 +2,11 @@ #include #include -const char modifierScancodes[] = {0x2A, 0x36, 0x1D, 0x9D}; - uint32_t keycodes[128] = { 0, 27, KEY_1, KEY_2, KEY_3, KEY_4, KEY_5, KEY_6, KEY_7, KEY_8, KEY_9, KEY_0, KEY_MINUS, KEY_EQUALS, KEY_DELETE, KEY_TAB, KEY_Q, KEY_W, KEY_E, KEY_R, KEY_T, KEY_Y, KEY_U, KEY_I, KEY_O, KEY_P, KEY_BRACEOPEN, KEY_BRACECLOSE, KEY_RETURN, 0, KEY_A, KEY_S, KEY_D, KEY_F, KEY_G, KEY_H, KEY_J, KEY_K, KEY_L, - KEY_SEMICOLON, KEY_APOSTROPHE, /*backtick*/0, 0, KEY_BACKSLASH, KEY_Z, KEY_X, KEY_C, KEY_V, KEY_B, KEY_N, KEY_M, /*comma*/ 0, + KEY_SEMICOLON, KEY_APOSTROPHE, /*backtick*/0, KEY_LEFT_SHIFT, KEY_BACKSLASH, KEY_Z, KEY_X, KEY_C, KEY_V, KEY_B, KEY_N, KEY_M, /*comma*/ 0, KEY_DOT, KEY_SLASH, 0, /* asterisk */0, 0, KEY_SPACEBAR, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, KEY_MINUS, 0, 0, 0, /*KEY_PLUS*/0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; @@ -46,7 +44,6 @@ return; } else { keyDown(keycodes[scancode], 0); - keyUp(keycodes[scancode], 0); } } @@ -56,4 +53,4 @@ int32_t main() { createFunction("register", (void *)doRegister); -} \ No newline at end of file +}