summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/init/driver/ps2.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/init/driver/ps2.c b/src/init/driver/ps2.c
index a05ae61..5623b98 100644
--- a/src/init/driver/ps2.c
+++ b/src/init/driver/ps2.c
@@ -35,13 +35,17 @@ static handle_t fd;
static bool keys[0x80] = {0};
static void parse_scancode(uint8_t s) {
+ bool ctrl = keys[0x1D];
bool shift = keys[0x2A] || keys[0x36];
bool down = !(s & 0x80);
+ char c;
s &= 0x7f;
keys[s] = down;
- char c = shift ? keymap_upper[s] : keymap_lower[s];
- if (down) ring_put1b((void*)&backlog, c);
+ c = shift ? keymap_upper[s] : keymap_lower[s];
+ if (ctrl && keymap_upper[s] >= 'A' && keymap_upper[s] <= 'Z')
+ c = keymap_upper[s] - 'A' + 1;
+ if (down && c) ring_put1b((void*)&backlog, c);
}
static void main_loop(void) {