Try to fix Num_Lock handling: force application keypad to off when
authorsf-exg <sf-exg>
Fri, 2 Apr 2010 13:52:30 +0000 (13:52 +0000)
committersf-exg <sf-exg>
Fri, 2 Apr 2010 13:52:30 +0000 (13:52 +0000)
Num_Lock is on, do nothing otherwise.

src/command.C

index b8ac9e0..8a4f21d 100644 (file)
@@ -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