Return to BSD News archive
Path: sserve!newshost.anu.edu.au!munnari.oz.au!goanna.cs.rmit.oz.au!yallara!lm
From: lm@yallara.cs.rmit.OZ.AU (Luke Mewburn)
Newsgroups: comp.os.386bsd.bugs
Subject: [NetBSD 0.9] pccons hack for no capslock
Date: 6 Nov 1993 09:36:32 GMT
Organization: Technical Support Group, Dept. of Computer Science, RMIT
Lines: 130
Message-ID: <2bfr70$416@goanna.cs.rmit.oz.au>
Reply-To: zak@rmit.edu.au
NNTP-Posting-Host: yallara.cs.rmit.oz.au
Summary: capslock is now another control key
Keywords: hack, pccons, capslock, no_X11_I_Can_Do_That_With_xmodmap_OK_?
A while ago I hacked pccons.c to make capslock a control key, and
right-shift/capslock actually perform capslock. That was in NetBSD 0.8
When NetBSD 0.9 came around, my patch didn't apply correctly. So, I
went around and did it again. This time, it's much simpler - capslock
is a control key, and there's no way to actually get caps lock.
(BTW: my patch also undefs FAT_CURSOR, so you may wanna redef it. I
was too lazy to make a dummy pccons.c with that change removed ;)
Oh, before all you X freaks tell me to use xmodmap, two comments:
- I don't run X at home, so xmodmap is rather useless don't you think?
- I know how to do that. Here's what I put in my .xsession at work:
xmodmap ~/.Xkeymap
and here's .Xkeymap
remove Lock = Caps_Lock
keycode 0x11 = Control_L
add Control = Control_L
(probably specific to my NCD, but hey, it will stop people starting
a 600 article thread asking/telling how to do it under Xfree-86 :)
Without further ado, here's the patch: (for /sys/arch/i386/isa/pccons.c)
--- cut here --- file: dl/caps09.dif
*** pccons.c.OLD Mon Sep 6 11:25:33 1993
--- pccons.c Fri Sep 17 00:12:09 1993
***************
*** 119,126 ****
};
/* block cursor so wfj does not go blind on laptop hunting for
- the verdamnt cursor -wfj */
#define FAT_CURSOR
#define COL 80
#define ROW 25
--- 119,127 ----
};
/* block cursor so wfj does not go blind on laptop hunting for
#define FAT_CURSOR
+ the verdamnt cursor -wfj */
+ #define NO_CAPSLOCK
#define COL 80
#define ROW 25
***************
*** 1451,1456 ****
--- 1452,1458 ----
num ^= 1;
update_led();
break;
+ #ifndef NO_CAPSLOCK
case CAPS:
if (dt & 0x80) {
lock_down &= ~CAPS;
***************
*** 1462,1467 ****
--- 1464,1470 ----
caps ^= 1;
update_led();
break;
+ #endif /* !NO_CAPSLOCK */
case SCROLL:
if (dt & 0x80) {
lock_down &= ~SCROLL;
***************
*** 1528,1536 ****
--- 1531,1541 ----
case NUM:
lock_down &= ~NUM;
break;
+ #ifndef NO_CAPSLOCK
case CAPS:
lock_down &= ~CAPS;
break;
+ #endif /* !NO_CAPSLOCK */
case SCROLL:
lock_down &= ~SCROLL;
break;
***************
*** 1540,1545 ****
--- 1545,1553 ----
case ALT:
alt_down = 0;
break;
+ #ifdef NO_CAPSLOCK
+ case CAPS:
+ #endif /* NO_CAPSLOCK */
case CTL:
ctrl_down = 0;
break;
***************
*** 1563,1568 ****
--- 1571,1577 ----
num ^= 1;
update_led();
break;
+ #ifndef NO_CAPSLOCK
case CAPS:
if (lock_down & CAPS)
break;
***************
*** 1570,1575 ****
--- 1579,1585 ----
caps ^= 1;
update_led();
break;
+ #endif /* !NO_CAPSLOCK */
case SCROLL:
if (lock_down & SCROLL)
break;
***************
*** 1589,1594 ****
--- 1599,1607 ----
case ALT:
alt_down = 0x80;
break;
+ #ifdef NO_CAPSLOCK
+ case CAPS:
+ #endif /* NO_CAPSLOCK */
case CTL:
ctrl_down = 1;
break;
--- cut here ---
--
Luke Mewburn Programmer, Technical Support Group,
Email: <zak@rmit.edu.au> Department of Computer Science, RMIT