home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / os / linux / 10257 < prev    next >
Encoding:
Internet Message Format  |  1992-09-08  |  1.6 KB

  1. Path: sparky!uunet!wupost!usc!chaph.usc.edu!news
  2. From: aliu@usc.edu (Alex C. Liu)
  3. Newsgroups: comp.os.linux
  4. Subject: Yet another Caps/Ctrl keyboard patch
  5. Date: 8 Sep 1992 23:42:58 -0700
  6. Organization: None to Speak of
  7. Lines: 52
  8. Sender: aliu@aludra.usc.edu (Alex Liu)
  9. Distribution: world
  10. Message-ID: <lar77iINNfgk@aludra.usc.edu>
  11. NNTP-Posting-Host: aludra.usc.edu
  12. Keywords: caps/ctrl keyboard patch
  13.  
  14. Hi,
  15.     This is my patch for the keyboard driver kernel.  This doesn't
  16. really swap the CAPSLOCK with the CTRL key, but it makes both keys a
  17. CTRL key.  To use the CAPSLOCK you must hold SHIFT and the CAPSLOCK
  18. key simultaneously.
  19.  
  20. ----cut here----
  21. *** linux0.97pl4/kernel/chr_drv/keyboard.c    Fri Jul 31 17:50:04 1992
  22. --- linux/kernel/chr_drv/keyboard.c    Tue Sep  8 21:46:16 1992
  23. ***************
  24. *** 208,213 ****
  25. --- 208,214 ----
  26.   
  27.   static void caps(int sc)
  28.   {
  29. +      if (kmode & (RSHIFT|LSHIFT)) {
  30.       if (!(kmode & CAPSDOWN)) {
  31.           kleds ^= CAPSLED;
  32.           kmode ^= CAPS;
  33. ***************
  34. *** 214,219 ****
  35. --- 215,223 ----
  36.           kmode |= CAPSDOWN;
  37.           set_leds();
  38.       }
  39. +      }
  40. +      else
  41. +        ctrl(sc);
  42.   }
  43.   
  44.   void set_leds(void)
  45. ***************
  46. *** 231,237 ****
  47. --- 235,244 ----
  48.   
  49.   static void uncaps(int sc)
  50.   {
  51. +      if (kmode & (RSHIFT|LSHIFT)) 
  52.       kmode &= ~CAPSDOWN;
  53. +      else
  54. +         unctrl(sc);
  55.   }
  56.   
  57.   static void show_ptregs(void)
  58.  
  59.  
  60.  
  61. -- 
  62. _____________________________________________________________________________
  63. Alejandro Liu           |EMail: aliu@usc.edu |All mispellings are intentional
  64. 1551A Ridgecrest Apt A  |Voice: 213-264-9400 |Anything mentioned here is not
  65. Monterrey Park, CA91754 |                    |necessarily true.
  66.