Gentoo Archives: gentoo-amd64

From: Duncan <1i5t5.duncan@×××.net>
To: gentoo-amd64@l.g.o
Subject: [gentoo-amd64] Re: Some multimedia keys not working
Date: Thu, 06 Jan 2011 14:04:38
Message-Id: pan.2011.01.06.13.13.38@cox.net
In Reply to: Re: [gentoo-amd64] Re: Some multimedia keys not working by Clemente Aguiar
Clemente Aguiar posted on Thu, 06 Jan 2011 11:01:21 +0000 as excerpted:

> I run xev and the result on the 3 keys that I first mentioned are as > follows: > > If press "My Documents" I get the following events: > > KeyPress event, serial 33, synthetic NO, window 0x4000001, > root 0x1ad, subw 0x0, time 67664120, (686,264), root:(879,344), > state 0x10, keycode 120 (keysym 0x0, NoSymbol), same_screen YES, > XLookupString gives 0 bytes: > XmbLookupString gives 0 bytes: > XFilterEvent returns: False > > KeyRelease event, serial 33, synthetic NO, window 0x4000001, > root 0x1ad, subw 0x0, time 67664246, (686,264), root:(879,344), > state 0x10, keycode 120 (keysym 0x0, NoSymbol), same_screen YES, > XLookupString gives 0 bytes: > XFilterEvent returns: False > > If I press "My Images" or "My Music" nothing happens. > > I then tried to see what happened at console level, with showkey.
I'm too sleepy ATM to do a reply real justice, but here's a brief one... 1) I've never worked at the kernel level or below, only at the X level, so don't know anything about the "nothing happens" keys or how to get them to "something happens". 2) The "Docs" key, however, has a keycode of 120, so you can do something with that. The "something" involves either finding or adding an appropriate mapping in X so it gets a valid symbol. As I mentioned, I've done it before by fiddling with the existing mappings, now found in /usr/share/X11/xkb, but I've forgotten the details and am not in a state to try to figure it out again ATM. But that should give you a place to look if you want to start reading the files therein and trying to figure it out, which should be possible as it's basically what I did, before, and what I'd do again only it should take less time this time as I've been thru it before. At this level, tho, it's simply a matter of setting up a config file or three properly, no complex recompiling or the like. I'll see about posting more on that if I get time to go back and look at them, later, but don't promise to get to it. 3) Without a valid keysym, it's no wonder gnome can't see it to map anything. You'll need to get the sym working and then see what gnome (or whatever else) can do with it. 4) The other keys, without even a valid keycode... will take deeper magic than I've ever tried, tho I've come across hints and bits of documentation here and there. Really, you've gotten farther than I know already, with showkey. Presumably you must add those scancodes to some table somewhere and then perhaps recompile something to build them in. A speculative guess would be either evdev or keyboard driver, but I'm not sure if it'd be at the kernel driver or xorg driver module level. That's the docs I'd start reading, tho. Or type in your precise keyboard model into google.com/linux (the Linux- specific search, I have a kde web shortcut setup for it here as I use it frequently enough...), and see if anyone else has come up with a better working solution. You can also try contacting the xorg and/or evdev folks and asking, but I'd do some research first. No need to bother them if the answer's only a few clicks away on google, or simply involves setting a couple config options in your xorg.conf after you figure out how the stuff in that xkb dir mentioned above works. Oh... one more thing... if you have microsoftmult or whatever set in your xorg.conf or if still using hal instead of udev for xorg hotplugging, whatever *.fdi file, try commenting/deleting that, and see if it auto- detects better settings than the ones you were manually using. With xorg- server-1.8 and 1.9 udev based hotplugging and evdev, as I said, all my keys "just work", at least as good if not better than they did with hal and xkb, and manually setting the keyboard type. I was pleasantly surprised on both my netbook and my desktop, as it detected the special keys on both and they "just worked". -- Duncan - List replies preferred. No HTML msgs. "Every nonfree program has a lord, a master -- and if you use the program, he is your master." Richard Stallman