home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!wupost!usc!chaph.usc.edu!news
- From: aliu@usc.edu (Alex C. Liu)
- Newsgroups: comp.os.linux
- Subject: Yet another Caps/Ctrl keyboard patch
- Date: 8 Sep 1992 23:42:58 -0700
- Organization: None to Speak of
- Lines: 52
- Sender: aliu@aludra.usc.edu (Alex Liu)
- Distribution: world
- Message-ID: <lar77iINNfgk@aludra.usc.edu>
- NNTP-Posting-Host: aludra.usc.edu
- Keywords: caps/ctrl keyboard patch
-
- 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.
-