From 361e0c74be237e086d3f12a18fdc4d61d1b6b0ac Mon Sep 17 00:00:00 2001 From: sf-exg Date: Fri, 2 Apr 2010 13:52:30 +0000 Subject: [PATCH] Try to fix Num_Lock handling: force application keypad to off when Num_Lock is on, do nothing otherwise. --- src/command.C | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/command.C b/src/command.C index b8ac9e04..8a4f21df 100644 --- a/src/command.C +++ b/src/command.C @@ -424,12 +424,6 @@ rxvt_term::key_press (XKeyEvent &ev) ctrl = ev.state & ControlMask; meta = ev.state & ModMetaMask; - if (numlock_state || (ev.state & ModNumLockMask)) - { - numlock_state = (ev.state & ModNumLockMask); - set_privmode (PrivMode_aplKP, !numlock_state); - } - kbuf[0] = 0; #ifdef USE_XIM @@ -655,6 +649,8 @@ rxvt_term::key_press (XKeyEvent &ev) bool kp = priv_modes & PrivMode_aplKP ? !shft : shft; unsigned int newlen = 1; + if (ev.state & ModNumLockMask) + kp = false; switch (translate_keypad (keysym, kp)) { #ifndef NO_BACKSPACE_KEY -- 2.34.1