Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 Apr 2000 13:15:06 +0300
From:      Anatoly Vorobey <mellon@pobox.com>
To:        Warner Losh <imp@village.org>
Cc:        Mike Pritchard <mpp@mppsystems.com>, Daniel O'Connor <doconnor@gsoft.com.au>, hackers@FreeBSD.ORG
Subject:   Re: PC Keyboard Scancodes
Message-ID:  <20000415131506.28342@techunix.technion.ac.il>
In-Reply-To: <200004150601.AAA75213@harmony.village.org>; from Warner Losh on Sat, Apr 15, 2000 at 12:01:05AM -0600
References:  <20000415004922.A71407@mppsystems.com> <20000414200026.60056@techunix.technion.ac.il> <200004142102.PAA59521@harmony.village.org> <20000415004922.A71407@mppsystems.com> <200004150601.AAA75213@harmony.village.org>

next in thread | previous in thread | raw e-mail | index | archive | help
You, Warner Losh, were spotted writing this on Sat, Apr 15, 2000 at 12:01:05AM -0600:
> In message <20000415004922.A71407@mppsystems.com> Mike Pritchard writes:
> : Here are the codes for the Compaq "Easy Access Internet Keyboard".
> : They also have a newer version with even more buttons, but I don't
> : have access to one, so I can't supply the codes for it.  If someone
> : is going to do some work to get the Microsoft keyboard's extra keys
> : to work, it shouldn't be hard to integrate these keys at the same time.
> 
> Thanks Mike.  If I move forward on this, I'll include these too.

To make FreeBSD grok them, go to sys/dev/kbd/atkbd.c (that's assuming
the keyboard is AT-style rather than USB), and modify atkbd_read_char():

--- atkbd.c     Sat Apr 15 11:58:13 2000
+++ atkbd.c.new Sat Apr 15 12:09:28 2000
@@ -681,6 +681,15 @@
                case 0x5d:      /* menu key */
                        keycode = 0x6b;
                        break;
+                /* the following are super-duper extended MS keys */
+                case 0x5f:     /* Sleep key */
+                        keycode = 0x6d;
+                        break;
+                case 0x65:    /* Search key */
+                        keycode = 0x6e;
+                case 0x66:    /* Favourites key */
+                        keycode = 0x70;
+
                default:        /* ignore everything else */
                        goto next_code;
                }

And so on for all the keys, using your scancodes in case
statements, and allocating new keycodes as you go along, starting
from the first available one now which is 0x6d.  Then
you just add new lines to keymap files, starting from 109=0x6d,
and it should work at once. We have 148 spare entries in keymap_t
at the moment, they should suffice for some time ;)

Of course, with all those new keys on all those keyboards, we should
perhaps think about whether to add all of them as new keycodes,
and if so, in which order, etc. I've no idea if FreeBSD's concept
of 'keycode' (i.e. key number independent of keyboard model) is
synchronized with other BSD's, or Linux, etc.

Have no idea what to do about X though. 

-- 
Anatoly Vorobey,
mellon@pobox.com http://pobox.com/~mellon/
"Angels can fly because they take themselves lightly" - G.K.Chesterton


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000415131506.28342>