From owner-freebsd-hackers Sat Apr 15 3:15:13 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from techunix.technion.ac.il (techunix.technion.ac.il [132.68.1.28]) by hub.freebsd.org (Postfix) with ESMTP id 3C96137B5C8 for ; Sat, 15 Apr 2000 03:15:09 -0700 (PDT) (envelope-from mellon@techunix.technion.ac.il) Received: by techunix.technion.ac.il (Postfix, from userid 14309) id 4B10A8650; Sat, 15 Apr 2000 13:15:06 +0300 (IDT) Message-ID: <20000415131506.28342@techunix.technion.ac.il> Date: Sat, 15 Apr 2000 13:15:06 +0300 From: Anatoly Vorobey To: Warner Losh Cc: Mike Pritchard , Daniel O'Connor , hackers@FreeBSD.ORG Subject: Re: PC Keyboard Scancodes 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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.88 In-Reply-To: <200004150601.AAA75213@harmony.village.org>; from Warner Losh on Sat, Apr 15, 2000 at 12:01:05AM -0600 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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