Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 202227
Collapse All | Expand All

(-)xf86-input-keyboard-1.2.2.orig/src/kbd.c (-16 / +12 lines)
Lines 676-684 sunKeyboards: Link Here
676
	    keyc->curKeySyms.mapWidth * 
676
	    keyc->curKeySyms.mapWidth * 
677
	    (keycode - keyc->curKeySyms.minKeyCode));
677
	    (keycode - keyc->curKeySyms.minKeyCode));
678
678
679
#ifdef XKB
680
  if (pKbd->noXkb) {
681
#endif
682
  /*
679
  /*
683
   * Filter autorepeated caps/num/scroll lock keycodes.
680
   * Filter autorepeated caps/num/scroll lock keycodes.
684
   */
681
   */
Lines 733-739 sunKeyboards: Link Here
733
730
734
  /*
731
  /*
735
   * LockKey special handling:
732
   * LockKey special handling:
736
   * ignore releases, toggle on & off on presses.
733
   * ignore releases, toggle on & off on presses, preserve 'down'.
737
   * Don't deal with the Caps_Lock keysym directly, but check the lock modifier
734
   * Don't deal with the Caps_Lock keysym directly, but check the lock modifier
738
   */
735
   */
739
736
Lines 746-765 sunKeyboards: Link Here
746
   if (keysym[1] == XF86XK_ModeLock)
743
   if (keysym[1] == XF86XK_ModeLock)
747
       changeLock = MODEFLAG;
744
       changeLock = MODEFLAG;
748
745
749
   if (changeLock) {
746
   if (changeLock && down) {
750
      if (!down)
747
      if (changeLock & pKbd->keyLeds)
751
          return;
748
         /* led on. Turn it off */
752
749
         pKbd->keyLeds &= ~changeLock;
753
      pKbd->keyLeds &= ~changeLock;
750
      else
754
751
         /* led off. Turn it on. */
755
      if (KeyPressed(keycode)) {
752
         pKbd->keyLeds |= changeLock;
756
	  down = !down;
757
      } else {
758
          pKbd->keyLeds |= changeLock;
759
      }
760
      UpdateLeds(pInfo);
753
      UpdateLeds(pInfo);
761
  }
754
   }
762
755
756
#ifdef XKB
757
  if (pKbd->noXkb) {
758
#endif
763
  if (!pKbd->CustomKeycodes) {
759
  if (!pKbd->CustomKeycodes) {
764
    /*
760
    /*
765
     * normal, non-keypad keys
761
     * normal, non-keypad keys

Return to bug 202227