From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1Pag9V-0001Vz-Qi for garchives@archives.gentoo.org; Thu, 06 Jan 2011 03:04:38 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3EB38E07C8 for ; Thu, 6 Jan 2011 03:04:37 +0000 (UTC) Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by pigeon.gentoo.org (Postfix) with ESMTP id B5EE1E06BE for ; Thu, 6 Jan 2011 02:25:48 +0000 (UTC) Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PafXv-0004bM-2f for gentoo-amd64@lists.gentoo.org; Thu, 06 Jan 2011 03:25:47 +0100 Received: from ip68-231-22-224.ph.ph.cox.net ([68.231.22.224]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 06 Jan 2011 03:25:47 +0100 Received: from 1i5t5.duncan by ip68-231-22-224.ph.ph.cox.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 06 Jan 2011 03:25:47 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: gentoo-amd64@lists.gentoo.org From: Duncan <1i5t5.duncan@cox.net> Subject: [gentoo-amd64] Re: Some multimedia keys not working Date: Thu, 6 Jan 2011 02:25:36 +0000 (UTC) Message-ID: References: <1294241958.18513.6.camel@caguiar-gentoo.madeiratecnopolo.pt> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-amd64@lists.gentoo.org Reply-to: gentoo-amd64@lists.gentoo.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: ip68-231-22-224.ph.ph.cox.net User-Agent: Pan/0.133 (House of Butterflies; GIT 25ed40d branch-testing) Content-Transfer-Encoding: quoted-printable X-Archives-Salt: e1a22a17-8dd6-4c90-b190-695a89d1ecac X-Archives-Hash: f3c9005fee0d2b2573ecfa66beeec21e Clemente Aguiar posted on Wed, 05 Jan 2011 15:39:18 +0000 as excerpted: > I have a Microsoft Wireless Multimedia Keyboard 1.0A, and some of the > multimedia keys are not working in Gnome, for instance the "My > Documents", "My Images", "My Music), etc. >=20 > I see that there are definitions for these keys for microsoftmult > in /usr/share/X11/xkb/symbols/inet, however when I check the keyboard > settings with the following command it does not seem to be using them. >=20 > # setxkbmap -print -verbose 10 > Setting verbose level to 10 > locale is C > Applied rules from evdev: > rules: evdev > model: microsoftmult > layout: pt > options: grp:alts_toggle > Trying to build keymap using the following components: > keycodes: evdev+aliases(qwerty) > types: complete > compat: complete > symbols: pc+pt > +inet(evdev)+level3(ralt_switch_for_alts_toggle)+group(alts_toggle) > geometry: pc(pc104) > xkb_keymap { > xkb_keycodes { include "evdev+aliases(qwerty)" }; xkb_types { > include "complete" }; > xkb_compat { include "complete" }; > xkb_symbols { include "pc+pt > +inet(evdev)+level3(ralt_switch_for_alts_toggle)+group(alts_toggle)" }; > xkb_geometry { include "pc(pc104)" }; > }; >=20 > How do I configure this keyboard correctly? Try running xev (emerge it if necessary, it's a tiny app) from a terminal= =20 window. This should popup a small X window with a smaller window inside.= =20 When it has the focus, you'll get a running list of "X EVents" (thus xev)= =20 on its STDOUT -- the terminal window. These will include mouse movement=20 and clicks, keyboard keypress/release events, window focus/unfocus events= ,=20 etc. Of course what we're interested in here are the keyboard events... FWIW, I have a Logitech media/inet cordless keyboard here[1], so I know=20 the issues with extra keys, altho I run KDE as when it comes to my=20 computer I'm a control freak (so Gentoo's perfect for me! =3D:^), and KDE= =20 allows more in depth customization -- including both kde environment leve= l=20 and application level keyboard acceleration customization -- than Gnome=20 tends to. Anyway, the first thing you need to do is to make sure X is recognizing=20 the "extra" keys and returning appropriate key-names. Here's an excerpt=20 from xev's output as I hit (actually release) one of mine (indent modifie= d=20 slightly to avoid line-wrap as posted): KeyRelease event, serial 33, synthetic NO, window 0x4400001, root 0x111, subw 0x0, time 824814070, (75,95), root:(79,1915), state 0x0, keycode 180 (keysym 0x1008ff18, XF86HomePage), same_screen YE= S, XLookupString gives 0 bytes:=20 XFilterEvent returns: False See that XF86HomePage? That's the name that key is assigned. Here's a=20 similar event for the escape key (no indent mod needed, escape is short=20 enough it doesn't extend the line far enough to wrap): KeyRelease event, serial 34, synthetic NO, window 0x4400001, root 0x111, subw 0x0, time 824817164, (75,95), root:(79,1915), state 0x0, keycode 9 (keysym 0xff1b, Escape), same_screen YES, XLookupString gives 1 bytes: (1b) " XFilterEvent returns: False Given that your posted setxkbmap settings say microsoftmult and include=20 inet(evdev), there's a good chance xev will report the extra key events=20 with registered keynames. FWIW, with newer xorg and evdev (I'm running=20 ~amd64 plus some stuff from the x11 and kde overlays), you shouldn't even= =20 need microsoftmult -- my model is reported simply as pc101, but symbols=20 include inet(evdev) and everything "just works" now, unlike years ago whe= n=20 I remember having to figure out what new rules I needed and fix all my=20 shortcuts to work with the new names, as an upgrade had broken the old=20 ones. Once you see that xev is recognizing and reporting the keys, it /should/=20 be a simple matter of setting up keyboard shortcuts appropriately to use=20 the names xev reports. I know it's simple enough to do on kde, but=20 gnome... isn't known for making keyboard shortcut customizations (among=20 others) as simple and straightforward as it might, one of the reasons I=20 strongly prefer kde, and don't have gnome on my system (tho I do have gtk +, for pan and firefox). But the first thing to find out is whether xev's seeing the keys and what= =20 they're called. (I've had names for the same keys change out on me=20 before, as I upgraded, tho with evdev they seem to be getting more=20 standardized and stable.) If xev doesn't have names registered or doesn'= t=20 see the key at all, it's an X/evdev level (or lower, kernel) key-mapping=20 issue. If xev is reporting the keys properly, it's a desktop environment= =20 and/or hotkey-app mapping issue. FWIW, if gnome's hotkey mapping isn't sufficient for you, take a look at=20 xhotkeys (not in the tree, apparently) and x11-misc/xbindkeys (this one=20 can take a simple or advanced config, with the advanced config using guil= e=20 scripting so you can do things like check delay to do something different= =20 with a long vs short keypress, or multiple key sequences). Both of these= =20 are environment independent. I researched them as a result of a still=20 unfixed regression in multi-key recognition between kde3 and kde4, but=20 only the guile-scripted mode of xbindkeys would have been advanced enough= =20 for what I needed, and as I was trying to absorb that, I realized that I=20 could do very close to the same thing using a khotkey single-key trigger=20 to launch a custom bash script to catch the second key, and since I=20 already know bash reasonably well, I went that way rather than trying to=20 learn guile to get xbindkeys doing what I wanted. There's also gtkhotkey, which might be more appropriate for gnome users,=20 but the Gentoo one-line description says it's a library, and the homepage= =20 is launchpad, without any reasonable description I can find, so I don't=20 know if it includes a hotkey app that can be run or if it is indeed just = a=20 library, to be used by (other) apps. ---- [1] I tried an MS cordless keyboard/mouse at some point but was frustrate= d=20 with it. I'm guessing that the MS drivers include some sort of Tx gain=20 control for the keyboard, and that without those drivers, it defaulted to= =20 low-power on Linux. Or maybe I just got a bad one -- it happens. All I=20 know is that I had a terrible time with it as even with the receiver righ= t=20 next to it, it would often have trouble detecting keys. So I went back t= o=20 Logitech, which has always worked well. --=20 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