From c2ed15fbbc61e6e7103928398caa83f6f5e8fbba Mon Sep 17 00:00:00 2001 From: Marcus Brinkmann Date: Tue, 17 Sep 2002 17:28:34 +0000 Subject: 2002-09-17 Marcus Brinkmann * pc-kbd.c (input_loop): Move code that toggles NumLock after code that handles direct entry of character codes with RightAlt. --- console-client/ChangeLog | 5 +++++ console-client/pc-kbd.c | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 10 deletions(-) (limited to 'console-client') diff --git a/console-client/ChangeLog b/console-client/ChangeLog index c43a5dfa..a784ab23 100644 --- a/console-client/ChangeLog +++ b/console-client/ChangeLog @@ -1,3 +1,8 @@ +2002-09-17 Marcus Brinkmann + + * pc-kbd.c (input_loop): Move code that toggles NumLock after code + that handles direct entry of character codes with RightAlt. + 2002-09-17 Marcus Brinkmann * Makefile, bdf.c, bdf.h, bell.h, console.c, display.h, driver.c, diff --git a/console-client/pc-kbd.c b/console-client/pc-kbd.c index 3ec6404e..085d1fe0 100644 --- a/console-client/pc-kbd.c +++ b/console-client/pc-kbd.c @@ -506,16 +506,6 @@ input_loop (any_t unused) else if (!down) state.caps_lock_pressed = 0; } - else if (sc == SC_NUMLOCK) - { - if (down && !state.num_lock_pressed) - { - state.num_lock = !state.num_lock; - state.num_lock_pressed = 1; - } - else if (!down) - state.num_lock_pressed = 0; - } else if (sc == SC_LEFT_CTRL) state.left_ctrl = down; else if (sc == SC_LEFT_ALT) @@ -552,6 +542,16 @@ input_loop (any_t unused) state.direct = (state.direct << 4) | 0xd; else if (state.right_alt && down && sc == SC_PAD_PLUS) /* XXX */ state.direct = (state.direct << 4) | 0xe; + else if (sc == SC_NUMLOCK) + { + if (down && !state.num_lock_pressed) + { + state.num_lock = !state.num_lock; + state.num_lock_pressed = 1; + } + else if (!down) + state.num_lock_pressed = 0; + } else if (down && sc < sizeof (sc_to_kc)/sizeof (sc_to_kc[0])) { #if QUAERENDO_INVENIETIS -- cgit v1.2.3