Keyboard 29 July 2005 Status
Guides
Software
Installation history 1 May 2006 The /var/log/sleep.log file was no longer showing the ° sign, due to a changed screen font. I reset the screen font the brute-force way, by copying the /usr/share/consolefonts/lat9u-16.psf.gz file to default8x16.psf.gz, the default console font, so this is now the font that gets loaded with the simple "setfont" command (with no parameters), and presumably also on boot. I upgraded console-common, console-data, and kbd. Note that /etc/kbd/config still asks for thelat9u-16 screen font. 11 September 2005: install-keymap Discovered that console-tools has the install-keymap utility, which takes a keymap-name as argument: The file is passed to loadkeys for loading, so that valid values for this argument are the same as that of arguments to loadkeys. install-keymap expands include-like statements in that file, and puts the result in /etc/console/boottime.kmap.gz, which will be loaded into the kernel at boot-time. This is clearly the way to do it on Sokrates, and it's worth reverting to console-tools to do that on Sigillo too. Just issue, install-keymap /usr/share/keymaps/i386/qwerty/no-x1.kmap.gz and you have your default boottime keyboard. Very nice. Now, my first
method was simply to copy the custom Norwegian keyboard, calling it
/etc/console/boottime.kmap.gz, and this worked great. You might want to
check that doing it properly like this also has the desired effect. 10 September 2005: input utils and volume keys Gerd Knorr's input-utils (new package) has these utilities:
0x0090 = 165 # KEY_PREVIOUSSONGSo there are my volume keysysm -- but how do you define what they actually do? For these keys, although defined correctly, don't do anything -- I had to use xbindkeys to produce "amixer set Master 2+ -q" and "2-". So the question is how functions are assigned to keysyms, not keycodes. You now have the keysym names. Is this what hotkeys is using? The vpr hotkeys configuration file in ~/.hotkeys has the following: <VolUp keycode="176"/>All three work great. If I run hotkeys, when I press the volume keys (Fn-F6 and Fn-F5) while running "input-events 0", I get 05:21:08.267108: EV_SYN code=0 value=0The things is, I get exactly the same output from "input-events 0" if I'm running kbindkeys, where I've programmed in the keys to run "amixer set Master 2+ -q"So it's not surprising it works -- but the keys aren't just using the keysyms; they run a program I told it to run. So how is hotkeys working? The MS Natural Pro keyboard also lists this one: <Sleep keycode="227"/>What this means, of course, is that hotkeys uses words like "VolUp" and "Sleep" for the user, but behind the scenes these are mapped to keysyms.k Back to "input-kbd 0", these may work with acpid: 0x00de = 116 # KEY_POWERThe tool doesn't appear to work in console -- the input-event system is tied to xorg. Anyway, a fantastic tool to see the keysyms. 10 September 2005: setfont (consolechars) In the Linux console, the screen font is defined in the
/etc/kbd/config file (or /etc/console-tools/config), activated on boot
or by running "just reconfigure kbd -p low". I added the lat9u-16 font to the config file; it has the euro symbol. Before I quite realized how the system works, I copied
the
/usr/share/consolefonts/lat9u-16.psf.gz file to default8x16.psf.gz, the
default console font, so this is now the font that gets loaded with the
simple "setfont" command (with no parameters). This really isn't the
cleanest way of doing it, however, since a future upgrade may overwrite
this default font file. The clean way is to use "setfont lat9u-16" in
scripts, so I did this in /usr/local/bin/sus. In the console-tools
package the command is consolechars. Enter the euro with the Norwegian keyboard's shift-4 key -- you could put it somewhere on the US keyboard if you need it; the keysym is currency. 21 August 2005: xbindkeys (finally discovered!) Since hotkeys doesn't support mode keys, I installed
xbindkeys. It doesn't have OSD (on-screen display), but it sure handles
mode keys -- in fact you can program it to use unnamed mode keys, cf. instructions in /usr/share/doc/xbindkeys/README.Debian. Configure in ~/.xbindkeysrc -- it's a cinch: xbindkeys -kwill give you the line (use one of the two provided) you need to put in .xbindkeysrc. In my case I added: # Plain vpr matrix keyIt is very easy to add additional modifier variations, or additional keys. Add xbindkeys &to .xsession and you're done. Even simpler, use the gui, xbindkeys-conf -- it's elegant. So in the end, the definition of extra keys is a blast in Linux. KDE hasn't quite caught up, nor has Gnome, but xbindkeys is brilliant. I later added "amixer set Master 2+ -q" and "2-" to the volume keys. Note also the new input-utils package by Gerd Knorr; the input-kbd program lists keycode (in hex and decimal) to keysyms mappings. Makes you wonder if I can define keysyms somewhere -- in xorg they're in /usr/X11R6/include/X11/keysymdef.h. 6 August 2005: Andries Brouwer on the state of keyboards on the 2.6 kernel Commenting on my attempt to see keycodes: The 2.6 situation is complicated and messy. Earlier, the kernel reported the truth. But today showkey -s gets from the kernel not what the keyboard sent but a value that was converted to a keycode and then converted back. Since the conversion is not 1-1, the result is difficult to interpret. If you want to know what the keyboard actually does, it is easier to work with a 2.4 kernel. That makes sense to me -- the scancodes reported by showkeys don't reflect the raw scancodes; they are translated by the kernel. Incidentally, the kbd utilities are far superior to those in console-tools; showkey -a gives the kind of information you sought after below. 5 August 2005: removing and cleaning under the keyboard To remove the keyboard, push three sprung latches at the top back and lift up; it's connected to the motherboard with a flat cable. The cable can be disconnected by sliding the white latch towards you; it squeezes the cable in place. To reattach the keyboard use the butt end of a flat razor blade and ease the keyboard under the latches one at a time. You need the razor blade -- the metal bends easily so don't use too much force. You cannot access the hard drive from beneath the keyboard. It may be useful to remove the keyboard to pop out keys that lack lettering, and possibly for cleaning the keyboard itself. 3 August 2005: remapping mouse clicks In a hotkeys definition (/usr/share/hotkeys), I find this: Clicking the wheel is keycode 140, I map it using xmodmap instead -- This is obviously something I could do too -- learn how to use xmodmap. It may be simpler than running hotkeys -- and better, since hotkeys doesn't support mode keys (shift, control, etc.). However, xmodmap -- unlike the keyboard definition files used by console-tools -- doesn't appear to support strings, so this may be what hotplug essentially adds. Or not -- I just see no mention of strings in the xmodmap man page. The xmodmap -pke command shows that x-windows sees the vpr key at 236 (keycode 236 = 0x1008ffa0) , so it can clearly be reassigned -- but can it be assigned to a string? If so, you could use the mode keys and get better results than with hotkeys. Curious, incidentally, how the console tools turn out to be more sophisticated than the x-windows tools (at least it looks that way so far). 2 August 2005: kbd and console-tools Looking through hotkeys definitions (/usr/share/hotkeys), I found this: The extra keys need to be enabled by sending the bytes 0xea and 0x71 to port 0x60 using the standard keyboard protocol. I do this using the kbd_cmd program available in the source package `kbd'. This is an interesting concept -- first of all, the idea that you can send bytes to the keyboard using a utility, and secondly that there's a package called 'kbd' that I still haven't discovered. Indeed it is so; kbd is a set of "Linux console font and keytable utilities" which "allows you to set up the Linux console, change the font, resize text mode virtual consoles and remap the keyboard." So this looks potentially extremely useful and it's as usual shocking I've never run into it before. Andries Brouwer says not to use console-tools but to use kbd instead. However, the packages have several differences. For instance, the scripts differ quite a bit -- console-tools has /etc/init.d/console-screen.sh and kbd has /etc/init.d/console-screen.kbd.sh. Installing kbd uninstalled console-tools, but not /etc/init.d/console-screen.sh. The kbd package appears to have better utilities; its 'showkey -a' is better than any showkey switch I found in console-tools.Console-tools also has configuration files in /etc/console-tools, which is where it determines which linux console keyboard to load and where you can remap keys. You can likely use this setup to add the missing vpr keycode. On the other hand, I don't know if kbd includes this option -- most likely it doesn't, as it's not present in the init daemon script. 1 August 2005: summary To assign a function to an unusual key, first use showkey to determine if the kernel already assigns it a keycode. If it doesn't, use setscankey to do so (this must be put in a boot script). Once the key has a keycode, you can assign it a function. Use dumpkeys -l to show all predefined functions, or keysyms; you can also assign strings to unused keysyms. Issue loadkeys to find the current keymap -- this is the keymap loadkeys loads by default (note that this is not the same as the kernel keymap) and edit the file, assigning a keysym (e.g. F100) to the new keycode. You can use a spare keysym that doesn't have a predefined function and assign a string to that keysym. Recompress the keymap and load it with loadkeys, and you're off. The scancode-to-keycode map (see getkeycodes) is hardcoded in the kernel, so you cannot change it; you have to add additional scancode-to-keycode mappings in a script somewhere (ask Andries Brouwer for good suggestions). The default keycode-to-keysym map is supplied by the console-data package, and it can be modified. However, it may become overwritten in an update or debconf session. If you've only added a completely new key, that's pretty uninvasive, so there's little harm just overwriting the default keymap. I've set up /usr/local/bin/no to load a Norwegian keymap. You can also use your new expertise to assign functions to additional keys. The keysyms and strings assigned to keys in the linux console appear to have no effect on the keyboard in x-windows, which loads its own keyboard. Thus there isn't any interference between the new keymap and hotkeys -- I later verified this is the case; the kbd / console-tool mappings have no effect in x-windows. However, if you use the setkeycode command to assign a new keycode to a scancode, that key will also now be detected by x-windows -- but with a different keycode than the one you assigned it to. So what is common to both is that they need a keycode associated with the scancode if the key is simply unknown, and this can be done at boot. Obviously you could play around with some of the other keys to see if you can get scancodes out of them, and reassign some of them to something useful. For instance, [prt sc] and [sys rq] generate identical keysyms, and they should surely be different. Fn+F1 brightens the screen, but uses a scancode the kernel doesn't know. Fn+F7 shows no code -- but may simply not be generating a usable scancode; ditto for Fn+F8. Those two keys may in fact be working, however, but speak directly to the hardware, without any OS intervention -- let's say they are defined in the BIOS, or hardwired on the motherboard (likely the latter). The same goes for the Fn+F3 key, which is supposed to switch between laptop and external screen and which may work both in WinXP and (according to the nVidia guide, in certain modes with the nVidia driver (never tested). Those are the only three keys that don't produce scancodes in the Fn mode. Once a key produces a scancode, you can assign a keysym to multiple modes, such as Shift, Ctrl, Alt, and others. Giving a function to the vpr matrix key is really the only obvious improvement; it's a big, visible key and it had no function at all. If you want more stuff, you can assign additional functions to sh-vpr (now "sov"), ctrl-vpr, and alt-vpr. 31 July 2005: defining keys in console How can I define the vpr matrix key in console? It's apparently possible to bind it to a script. First I discovered "dumpkeys -", which gives a nice hex listing of all keys. For instance, Pause is 0x011d -- the value I got from "setkeycode e023 151" for the vpr key -- given as
So that's the story -- "dumpkeys -l" says Pause is hex 0x011d, and "dumpkeys -n" shows that this function is assigned to keycode 119. (Note incidentally "dotlessi" -- Scandinavian Society in Istanbul?) In x-windows, I use a keyboard where the console keycode 151 is translated into keycode 110 with associated keysym 0xff13, which is the function Pause. After 119 Pause, there are no further key assignments in the 8-255 range, but there are additional sets assigned further down -- F keys and so on. So the idea here is that
That could be correct -- and if so, that's progress. So you've figured out how to get the scancode (showkey -s), though I don't know how to derive the observed showkey value "translated set 2, code 0xa3 on isa0060/serio0" into the value used by setkeycode, namely e023. How did 0xa3 turn into e023? Is the latter an octal value? Could I use "setkeycodes 0xa3"? That command certainly is accepted, and may be working. If so, the e023 is surely just an octal or even decimal value of the original hex. The "man keymaps" says that the syntax of string definitions is:
This suggests assigning a script to the vpr key requires three steps. First the scancode must be assigned to a keycode (done), then a keysym must be assigned to the same keycode (the keycode was not previously associated with any function, that's why I chose it), and then a string -- the script name -- must be associated with the keysym. So how do I assign an unused keysym to the keycode? Again from "man keymaps": to bind the string "du\ndf\n" to the key AltGr-D, use the "spare" action code F100 not normally bound to any key. altgr keycode 32 = F100 Translating to my needs, this means the following plain keycode 155 = F100 That should do it! But how do you put this into the keymap? Manually edit the keymap? When you run "loadkeys -d", it's the file /usr/share/keymaps/i386/qwerty/defkeymap.kmap.gz that gets loaded, so this is what you need to modify. (Note that this is not the kernel keyboard.) Make a copy first and then load it explicitly. So I created defkeymap.vpr and gzipped it, then loaded it with "loadkeys defkeymap.vpr.gz" -- and it works! The "dumpkeys" command now shows "keycode 155 = F100" -- you've successfully assigned a keysyms to the 155 keycode -- and "string F100 = "echo hi\012"" (my test string) to the keysyms. After loading defkeymap.vpr.gz, I get this: #dumpkeys | grep F100 The key is tied to the function via the keysyms F100. There is lots of space in the keyboard file for more functions if you want them! The predefined functions are found in "dumpkeys -l", and then you can define your own as above. So there you go, you solved it. You could automate it in various ways. User-defined keymaps, according to "man loadkeys", should be put in /usr/share/keymaps/i386/qwerty/. This is in fact the directory with keymaps from the package console-data, and where my default keyboard is located. Should I just make my new keymap the default? That would be the simplest -- but it may get overwritten, for instance by locales. For now, just leave the keyboard in /usr/local/bin and put "loadkeys /usr/local/bin/defkeymap.vpr.gz" in the cool script and run that on boot. You'll find out if everything is working. Another question is, will this have an effect on hotkeys? Finally, note that "showkey -m" now gives this result on pressing vpr: $ showkey -m kb mode was XLATE press any key (program terminates after 10s of last keypress)... keycode 115 press keycode 117 press keycode 115 press keycode 10 press Note that the terminology here is confused -- these aren't keycodes, but keysyms. It's showing that three letters (sus) and a return is being generated. If I issue "showkey -m" and press 's', 'u', and 's', these "keycode" values are what I get. However, the keysyms for these letters is not the same as their actual keycodes, which are shown in dumpkeys or lynx /usr/local/bin/defkeymap.vpr.gz. In dumpkeys -l, we see these: 0x0073 s Presumably these values are equivalent to decimal 115, 116, and 117 (indeed they are -- 16*7+3). In brief, the vpr key has:
The problem here is a combination of multiple levels and types of representational status (e.g. scancode, keycode, and keysyms) and multiple information formats (e.g. octal, hexagesimal, and decimal). This makes the system wildly complicated, but also immensely powerful. What you have here is of course the combinatorial explosion first exploited by natural language. Finally, note that 'showkeys -s' doesn't simply show the original scancode. The vpr key's scancode was originally 0xa3, but after issuing "setkeycode e023 155" it is "0xe0 0x6c" for press and "0xe0 0xec" for release. So after assigning the scancode to a keycode, the operating system appears to have assigned it a new set of scancodes -- now one for press and a different one for release. That just might mean that you could do a second round of keycode assignments, where a different keycode is assigned to each of the scancodes now available. Since I don't want or need this, I won't experiment further. 30 July 2005: hotkeys I installed the latest version of hotkeys, 0.5.7.3. I then edited /usr/share/hotkeys/vprmatrix200a5.def, based on ibook.def and inspiron8100.def, and saved it in ~/.hotplug for both steen and root. The /etc/hotplug.conf file lists the functions that hotkeys assigns to the keys -- modify this to suit your own needs. To activate the keyboard in debug mode I issued, hotkeys -L 7 -t vprmatrix200a5 In syslog I can now see the keycodes that have been assigned to these keys -- the ones I found in the configuration files. These things work out of the box, with OSD (on-screen display): Fn-F4: mute and unmute None of them have any effect on the headphone, but they work on speaker volume. The vpr matrix key is not detected. I try "setkeycodes e06f 144" in console and suddenly I get this in xev: KeyRelease event, serial 28, synthetic NO, window 0x400001, A keycode! I assigned 144 in the console and get 111 in x-windows! I try 145 and get 112. I try 155 and get nothing. A table: CLI X11 So mapping it to 153 or 161 makes it the menu key in KDE -- which incidentally ought to be assigned to the real menu key, but currently is assigned to the Windows key. Clearly I could just bump into a workable solution here. And maybe you just did: xev senses nothing for setkeycode 157, but hotkeys says it's 235! It even makes sense in terms of xev, since surrounding numbers are in the 230s. And 155 yields 236. It looks like I may have a solution: assign the vprmatrix key to 155, and pick that up in hotkeys as 236, which is then assigned to the sus script? Test it out with a script that does something visible, such as starting Xmms. And it fscking works -- it's sad how messy this stuff is, how blindly going where no man has gone before just works. I then put this in /usr/local/bin/nvx -- sudo setkeycodes e023 155 I also put it in /etc/init.d/bootmisc.sh, which is messy but works. The real problem is that switching keyboards in x-windows overwrites the hotkeys mappings, so hotkeys has to be restarted every time. In ~/.hotkeys/vprmatrix200a5.def, I assigned the key to the sus script, and in /etc/hotplug.conf I set this keyboard as default. Finally, how do I make hotkeys start with x-windows? For instrucitons, see lynx /usr/share/doc/xfree86-common/examples/xsession.gz. Edit ~/.xsession and add "hotkeys &" before "startx" -- the & makes sure the program backgrounds. It works -- loads the default keyboard and shows the splash screen. (There just might be a problem with icewm hanging if you exit immediately, before hotkeys is fully started.) 29 July 2005 update Now that I have a working software suspend setup and script, I'd like to map the main script onto the vprmatrix key. When I press that key in a console outside of x-windows I get this: atkbd.c: Unknown key pressed (translated set 2, code 0xa3 on isa0060/serio0). So this is handled by atkbd.c and setkeycodes can assign it some value -- but what are valid keycodes? The function of setkeycodes (according to the man page) is to "load kernel scancode-to-keycode mapping table entries". Scancodes are shown by showkey -s (use outside of x-windows) -- in the case of the vprmatrix key, it shows the same as just pressing it in a console, with no other command. More from man setkeycodes: It is hardwired in the current kernel that in the range 1-88 (0x01-0x58) keycode equals scancode. For the remaining scancodes (0x59-0x7f) or scancode pairs (0xe0 0x00- 0xe0 0x7f) a corresponding keycode can be assigned (in the range 1-127). For example, if you have a Macro key that produces e06f according to showkey(1), the commandsetkeycodes e06f 112will assign the keycode 112 to it, and then loadkeys(1) can be used to define the function of this key. Note that these utilities remap keys on the commandline, not in x-windows! dumpkeys(1), loadkeys(1), showkey(1), getkeycodes(8) dumpkeys | more shows that keycodes 120 to 255 are available -- more than man setkeycodes says. You could try reassigning vprmatrix to keycode 122: setkeycodes e023 121 After issuing this, pressing the vprmatrix key no longer spontaneously generates the "Unknown key pressed" message. If I now use showkey -s (scan code dump mode, hex values), I get 0x7e press) But with showkey -k (keycode dump mode) I don't get the nice decimal keycode promised but: 0x79 (press) Andries Brouwer points out this is what I asked for (7*16+9 = 121). So 0x79 is hexigesimal, which means you multiply 7 by 16 and add 9. If instead I use setkeycodes e023 122 I get this with showkey -s 0xf1 (press) That may in fact be preferable, so I leave that setting. With showkey -k I still don't get a decimal keycode: 0x7a (press) So obviously setkeycodes is working, and assigning a new key code of sorts -- but it doesn't show up as a decimal keycode. Using showkey -t 5 -m I see that in fact keys above keycode 120 are taken -- for instance, pressing z produces this: keycode 122 press For "showkey -t 5 -k", z gives 0x9c And for "showkey -t 5 -s", z gives exactly the same: 0x9c If I now reassign the vprmatrix button to a key above 127, sudo setkeycodes e023 130 I get this from "showkey -t 5 -s" 0xe0 0x06 And this from "showkey -t 5 -k": 0x00 0x81 0x82 These results take you into new ranges of keycodes, and I still don't get clean decimal codes, so there's something I'm not getting. There are lots of keymaps in /usr/share/keymaps/i386/qwerty -- they aren't from the recent kernel, but from the console-data package, version 2002.12.04dbs-49. This is what is loaded by loadkeys -d or loadkeys defkeymap: $ sudo loadkeys -d This won't clear the new keystring you defined -- to do that, I issued, $ sudo loadkeys -d -s Note that the loaded keymap is different from the kernel keymap -- at
least, the format of the file produced by "loadkeys -mktable
defkeymap.map > defkeymap.c" cannot in fact be loaded by loadkeys
Now, the vpr key has moved to this behavior from "showkey -t 5 -s": 0xe0 0x5d And this from "showkey -t 5 -k" (still no decimal keycode): 0x7f So again it's not clear what's going on. It ought to be simple to reassign a single key, but apparently there's something I don't understand. Once I've mapped the scancode to a keycode (which isn't working so far), I can use loadkeys to assign the keymapped key a function, namely to run /usr/local/bin/sus, following these instructions from man loadkeys: The kernel string table is a sequence of strings with names like F31. One can make function key F5 (on an ordinary PC keyboard) produce the text `Hello!', and Shift+F5 `Goodbye!' using lines in the keymap: Clearly, I can use this to assign a script to the key, but first I have to successfully assign the key a keycode. From man keycodes it's clear that it's possible to create a file with a few new keycodes and these will be added to the current keymap definition -- in theory. The file /usr/src/linux/drivers/char/defkeymap.c says it was created with this command: loadkeys --mktable defkeymap.map > defkeymap.c Try this (the man page is missing this information): loadkeys -m defkeymap.map > newkeymap.c That works -- and the file gets created in the current directory, not in /usr/src/linux/drivers/char. You can then test if this keymap file has been modified by your setkeycodes command: sudo setkeycodes e023 156 A diff shows the files are identical -- setkeycodes doesn't modify defkeymap.map, so I don't know how this all works. Besides, there is this problem: I'm not at all sure that I'm actually using this keyboard map -- I may well have loaded another already, through some other means, already in the console. In x-windows, I've definitely loaded a new keyboard. Now in x-windows there's the utility xmodmap that seems to do the same kind of thing, and I might have more luck with it: xmodmap -pk (list current keymap) This is informative -- it shows for instance that 118 to 123 is available for new keys. It looks like you can keep a list of extra keys in ~/.xmodmaprc, which would be a nice solution. But no -- the examples are all about swapping keys, not adding a key with no keycode or known name. The simplest is obviously to use the hotkeys package, which was written to solve your problem and can handle scancodes directly. However, I need access to the source, or I need to to tell the author (Anthony Y P Wong <ypwong@ypwong.org>) my scancode. When it became clear he was no longer maintaining the package, I wrote Andries Brouwer instead. I edited /usr/share/hotkeys/vprmatrix2005a.def but it's not clear this is the way to go. Looking at that file and the sample.xml file, I see that hotkeys is using keycodes above 127 -- in fact more or less all the codes are above that number. On the other hand, the keycodes I get from the multimedia keys are all below 127. Anyway, this indicates you can use keycodes above 127, and they're generally available. However, I haven't succeeded in assigning the vpr scancode to a keycode in a way that works yet. In fact, the file /usr/X11R6/lib/X11/xkb/keycodes/xfree86 defines the valid range of keycodes as 8-255. However, the file doesn't use the type of scancodes that I get from showkey. Clearly x-windows loads its own keyboard(s) -- as defined in kcontrol. The bummer about hotkeys is that it runs a daemon -- that should hardly be needed? Once it's been assigned a keycode, perhaps KDE will see it and you can assign it to a shortcut key in kmenuedit? 27 August 2004: IceWm key bindings In IceWM, I added these entries to the prog "Norsk tastatur" /usr/share/locale/l10n/no/flag.png setxkbmap -model inspiron -layout no -variant basic This works really well. I got these command strings from kcontrol's keyboard switching menu. You can see some of the syntax here:
These three parameters define the keyboard. However, I can't make any sense of how these three categories are mapped onto the contents of /usr/X11R6/lib/X11/xkb -- this directory contains the categories compat, geometry, keycodes, keymap, rules, semantics, symbols, and types. Where, for instance, is the Inspiron hardware defined? root@sigillo:/usr/X11R6/lib/X11/xkb# grep inspiron * -R It's in rules and symbols; who would have known. It's extremely difficult to see how one can modify the behavior of a keyboard in a predictable manner. Again, in IceWm, you can define shortcuts in ~/.icewm/keys. I added these: key "Ctrl+Alt+o" oowriterThese work great and save time. There's a slew of others I don't need. Note that Ctrl+Alt is the same as the Win key! I wanted to map Ctrl+Alt+Down to poff, but that key is already mapped to "Previous window" -- in ~/.icewm/preferences, this is listed as # "Previous window" shortcut However, "Alt+Shift+F6" doesn't give you previous window, it gives you the other window in the same workspace, whether you had focus on that last or not. So the current Ctrl+Alt+Down functionality is actually extremely useful, even though it's not according to the book. I checked a few other of the shortcuts listed in preferences and they don't work as advertized. For instance, # "Last item" shortcut brings up the Alt-Tab switching bar, which lists only current workspace windows; # "Next sys window" shortcut switches between the windows in the same workspace (same behavior as "Alt+Shift+F6") -- should be doing the next window on any desktop? So it's not clear exactly what they should be doing, but pretty clear they're not doing it. I copied in the latest preferences file from icewm-common, but when I read it into my preferences editor, the editor makes some changes to it that are likely no longer entirely correct. These problems are not severe enough to really bother me -- in fact the "switch to previous window" feature is incredibly handy, and I've never had it before. I don't know what the reason for the confusion is -- it could be my keyboard is incorrectly defined, but it's hard to see how keys like Esc, Shift, and Alt can be wrongly defined. Keyboards remain a bit of a mystery. December 2002: initial explorations Keyboard definition: use xkeycaps !!! It looks like the IBM ThinkPad 770 and the Texas Instruments TravelMate 4000M are both close to what I have. There is also a Microsoft Natural 105 keyboard that may match my other one. What works: All first-level keys except Fn, Microsoft, and Menu Fn+F9 pause The program is designed to allow you to work with your local keyboard on a remote system. It's possible it would be useful for defining a local keyboard, but this is unclear. It's also useful for simply telling you what the keycodes are for all your keys! I think it could remap your keyboard. You have a whole set of sound controls on the keyboard, activated by the Fn switch. These don't need x-windows to work, as I thought xkeymaps was suggesting. Numbers -- 1 (confident), 2 (likely), 3 (possibly), 4 (unlikely), 5 (impossible) -- indicate my assessment of what I think hotkeys can in principle handle (though volume controls on spello aren't in fact working). 1 Windows The remaining keys may all be working (not fully tested): Fn+F9 - pause (this is either working or close to working) Use xkeymaps or one of the other programs to determine the
keycode to the vpr matrix key. xmodmap may be even more useful -- I've
not really pursued this. Under Linux 2.5.69, both Fn+F1 and Fn+F2 work fine (bright up and down). Since the onboard volume control is working, it out to be possible to map volume to Fn+F5 and F6 -- which could be handy. Here are the codes I get when I press the key outside of X: Windows The fact that the remaining keys don't give scancodes means either that they're working (but don't necessarily show a visible effect), or that they're not working -- this final category may include a two or three keys. The volume keys should be simple to remap, and so should vpr matrix -- you could have it start x, or suspend, as there's no suspend key, or anything you like, such as check mail or open a browser. So I figured out the numlock -- it is indeed working, and turns a set of keys on the keypad into a number pad. So that feature works. Note that if you use Fn+ the keypad keys that are mapped onto numlock keys -- namely 7890uiopjkl;m./ -- but with numlock *off*, then these keys act as cursor keys, as they would on a turned-off number pad. So this is full number pad functionality. That actually handles all the keys on the keyboard with the exception of the Windows key and the Menu key. I think the Menu key is in fact already working (test it more), and the Windows key can be remapped. Hotkeys is designed to handle several of the Fn functions, such as volume up and down and mute. Can it handle bright up and down? Three keys may be more difficult -- toggle monitors (this might be handy, but is hardly a major feature, as I can just run mirror monitors, which I already know how to do -- and 96/192 (a feature missing in Linux), and then the S/PDIF, which actually probably could be mapped, as this is configurable (but I don't understand it yet). Possibly useful for high-quality sound out? In brief, you're better off when it comes to the keyboard than
you thought. Hotkeys will be useful, and could use some customizing. This is the hard way of doing stuff -- the easy way is xbindkeys -- but it is still more powerful, if you should need it. From a discussion list somewhere. It works now, and is wonderful! Bellow is the synopsis for anyone else interested. My "keymap" mod looks like: VT100.dbxKeymap.translations: \
Dumb question, but how are you getting F13 thru F20?
Here's part of my XTerm file:
|
|
|
|
|||||
Maintained by Francis F. Steen, Communication Studies, University of California Los Angeles |