From: Alex C. Liu (aliu@usc.edu)
Date: 09/09/92


From: aliu@usc.edu (Alex C. Liu)
Subject: Yet another Caps/Ctrl keyboard patch
Date: 9 Sep 1992 06:42:58 GMT

Hi,
        This is my patch for the keyboard driver kernel. This doesn't
really swap the CAPSLOCK with the CTRL key, but it makes both keys a
CTRL key. To use the CAPSLOCK you must hold SHIFT and the CAPSLOCK
key simultaneously.

----cut here----
*** linux0.97pl4/kernel/chr_drv/keyboard.c Fri Jul 31 17:50:04 1992
--- linux/kernel/chr_drv/keyboard.c Tue Sep 8 21:46:16 1992
***************
*** 208,213 ****
--- 208,214 ----
  
  static void caps(int sc)
  {
+ if (kmode & (RSHIFT|LSHIFT)) {
        if (!(kmode & CAPSDOWN)) {
                kleds ^= CAPSLED;
                kmode ^= CAPS;
***************
*** 214,219 ****
--- 215,223 ----
                kmode |= CAPSDOWN;
                set_leds();
        }
+ }
+ else
+ ctrl(sc);
  }
  
  void set_leds(void)
***************
*** 231,237 ****
--- 235,244 ----
  
  static void uncaps(int sc)
  {
+ if (kmode & (RSHIFT|LSHIFT))
        kmode &= ~CAPSDOWN;
+ else
+ unctrl(sc);
  }
  
  static void show_ptregs(void)

-- 
_____________________________________________________________________________
Alejandro Liu           |EMail: aliu@usc.edu |All mispellings are intentional
1551A Ridgecrest Apt A  |Voice: 213-264-9400 |Anything mentioned here is not
Monterrey Park, CA91754 |                    |necessarily true.