From owner-freebsd-questions Thu Oct 29 15:26:53 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id PAA12596 for freebsd-questions-outgoing; Thu, 29 Oct 1998 15:26:53 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from ntmail1.cskauto.com (csknet.cskauto.com [207.247.103.130]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id PAA12583 for ; Thu, 29 Oct 1998 15:26:51 -0800 (PST) (envelope-from JFOSTER@CSKAUTO.COM) Received: by v128041.vandenberg.af.mil with Internet Mail Service (5.5.2232.9) id ; Thu, 29 Oct 1998 16:27:35 -0700 Message-ID: From: "Foster, Jim" To: "'Greg Lehey'" Cc: freebsd-questions@FreeBSD.ORG Subject: RE: Meta-key and 107-key keyboard Date: Thu, 29 Oct 1998 16:25:59 -0700 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2232.9) Content-Type: text/plain; charset="iso-8859-1" Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Greg, OK, I think this is starting to sink in.... The change I made was to put 'meta' in for each key that I wanted to be the meta key (scan codes 105 & 106). The other option is to change EVERY OTHER key to output its meta value in the alt and alt-shift columns. In other words the for the letter 'a', meta-a is char code 225 ('a', with the high order bit set), for 'A', meta-A is char code 193, etc... So, chars with the high order bit set are really the meta function keys and not some international or other printed special character. I think my way is easier ;-). Thanks Jim > -----Original Message----- > From: Greg Lehey [SMTP:grog@lemis.com] > Sent: Thursday, October 29, 1998 3:43 PM > To: Foster, Jim > Cc: freebsd-questions@FreeBSD.ORG > Subject: Re: Meta-key and 107-key keyboard > > On Thursday, 29 October 1998 at 10:31:44 -0700, Foster, Jim wrote: > > Greg, > > > > I tried your keymap file last night and it would not work for me. After > > downloading it I tried using > > kbdcontrol -l /usr/share/syscons/us.emacs.kbd > > and I get the terse error message: > > Invalid key definition > > Well, I tried it and got > > kbdcontrol: keymap file not found: No such file or directory > > > Boy!, that told me a lot. > > Well, it told me that the pathname was wrong. It should be > /usr/share/syscons/keymaps/us.emacs.kbd. It's not a problem if you do > it manually, but it is if you want it to happen automatically at > startup. > > > Maybe it had to due to the fact that I really have a 107-key > > keyboard instead of the 104 that I originally said. > > I don't think that makes any differnce. > > > By the way, I am running 2.2.7-R, but recompiled for options that > > natd needs. > > Ah, I tried it there and got the same results. It would be nice if it > told you the line, wouldn't it? > > > Any way, I did some more playing around. I used kbdcontrol to dump out > my > > default keymap and edited it. On a lark I tried changing one of the > lalt's > > (scancode 056 on my map) to meta. I loaded the map and IT WORKED! > Next, I > > went into your us.emacs.kbd file and I could not find the word 'meta' > > anywhere. What indicates to your system that the alt key is the meta > key? > > Nothing. It maps the characters directly if the Alt key is pressed. > > > Finally, I noticed that towards the bottom of my keymap file I had three > > lines saying... > > 105 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 O > > 106 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 O > > 107 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 O > > I changed them to... > > 105 'a' fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 O > > 106 'b' fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 O > > 107 'c' fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 O > > > > Sure enough, the left window key printed 'a', the right window key > printed > > 'b', and the menu key printed 'c'. > > > > So, I went back in to the file and changed it to... > > 105 meta meta meta meta meta meta meta meta O > > 106 meta meta meta meta meta meta meta meta O > > 107 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 O > > and now my two window keys are my meta keys, freeing up the alt key to > be > > what ever it is suppose to be. :-) > > Well, it doesn't do very much in text mode. But I suppose this way it > can continue not doing very much. > > > Also, at the VERY bottom of my keymap file I had several records that > were > > structured like this... > > dtil '~' ( 'a' 227 ) ( 'A' 195 ) ( 'n' 241 ) ( 'N' 209 ) > > ( 'o' 245 ) ( 'O' 213 ) > > > > I can only assume it is used to take two keystrokes and combine it into > one > > "international" character. Being one of those ignorant Americans, I > don't > > tend to use many of those, that's why I am guessing ;-) > > You could read keyboard(4), but you'd still be guessing. I suppose I > need to look at this and fix the man page. Some time. > > > So, it seems that I have solved my only problem, but this leaves some > > academic questions unanswered. > > 1. Why didn't your keymap file work on my box? > > Looks like it contains new stuff introduced for 3.0. > > > 2. What about your keymap file indicates that the alt key is really the > meta > > key? > > It's the 'alt' column. It specifies a different code for alt, etc. > For example, here's the 'a' key for us.emacs.kbd: > > # scan cntrl alt alt cntrl lock > # code base shift cntrl shift alt shift cntrl shift state > # ------------------------------------------------------------------ > 030 'a' 'A' soh soh 225 193 129 129 C > > And here it is in us.iso.kbd: > > 030 'a' 'A' soh soh 'a' 'A' soh soh C > > > 3. And on a slightly different subject, *exactly* how do the letters at > the > > end of each line affect the keymap. All I can find in the docs is that > it > > determines how the map is treated with the caps-lock and num-lock on, > but it > > does not say HOW to use them. > > I'd have to dig too. Maybe somebody else would like to. > > Greg > -- > See complete headers for address, home page and phone numbers > finger grog@lemis.com for PGP public key To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message