[tlinux-users:07616] Re: M40X laptop hotkeys (Phoenix bios)

Grant McDorman <[email protected]>
Newsgroups gmane.linux.hardware.toshiba
Message-ID <[email protected]>
On 26/01/06, Alex Nikitin <[email protected]> wrote:
> There is fnfx, which make your fn keys work, not all of them, also you may
be interested to look at hotkeys...

fnfx doesn't work on Toshiba laptops with the Phoenix BIOS.

Julien, to make keys like those work is a two step process.

For the first step, if you look in your system log (/var/log/messages)
you'll likely see a message for some keys when you press them, something
like
Nov 24 16:43:17 yourhostnamehere kernel: atkbd.c: Unknown key pressed
(translated set 2, code 0xd9 on isa0060/serio0).
Nov 24 16:43:17 yourhostnamehere kernel: atkbd.c: Use 'setkeycodes e059
<keycode>' to make it known.

Collect the keycodes for all of the keys of interest and add to your boot
scripts (unfortunately *where* depends on your distro) something lke:
  setkeycodes e059 148 # increase brightness
for each one. Use getkeycodes and look at the 'Escaped scancodes e0 xx
(hex)' section to make sure you don't introduce any duplicates.

Once you've done that, you need to assign the keys a name in the UI
(including ones that don't log the unknown key message). For that,
you'll use xev - which unfortunately produces a lot of noise in addition to
what you want. In an xterm, run xev:
  xev
It'll open a new window. With the keyboard focus in that window, press the
keys you want to set up. You'll get output looking like:

KeyPress event, serial 27, synthetic NO, window 0x3200001,
    root 0x49, subw 0x0, time 6482667, (90,37), root:(1188,558),
    state 0x0, keycode 147 (keysym 0x0, NoSymbol), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyRelease event, serial 30, synthetic NO, window 0x3200001,
    root 0x49, subw 0x0, time 6482793, (90,37), root:(1188,558),
    state 0x0, keycode 147 (keysym 0x0, NoSymbol), same_screen YES,
    XLookupString gives 0 bytes:

Note the keycode associated with the key. (Keys that say something other
than 'NoSymbol' for the keysym are already known to X, by the way). Then you
need to create a file in your home directory called .Xmodmap containing
lines for each keycode like:
keycode 147 = XF86CD

Usable key names can be found in /usr/X11R6/lib/X11/XKeysymDB.

Your distro *should* automagically load the .Xmodmap when you sign in. If
not, you'll need to add
  xmodmap $HOME/.Xmodmap
into some script.

Good luck.


--
Grant McDorman
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.