fn keys and xev
I have a laptop and some "Fn" keys weren't recognized by the kernel (linux 2.6.13). Therefore, I "setkeycodes" as suggested by dmesg, and mapped them with xmodmap. That way xev recognizes them properly. However, xev seems pretty confused by them.
The keys I "setkeycoded" are reported released and then pressed (respectively) as if when I release the key it is "pressed" to the kernel and vice versa... I thought it had something to do with ACPI, as the "suspend" key triggers an ACPI event. But there seems to be no event bound for that keys. Has anyone else experienced this VERY weird behavior? The laptop is a Dell D510. Thanks. |
Hi Kmisfit,
I have a Dell Latitude D610 and I've noticed the same thing. I still don't know how to get most of my Fn-keys to work in X. Just wondering though, how did you map them with xmodmap so "xev" can see them? I would be interested to try that out. Assuming you have suspend working on your laptop, you can get the suspend key to work by creating a file in the acpi events directory, '/etc/acpi/events/sleep.conf', with the contents event=button/sleep action=/usr/sbin/hibernate Note that the "action" line may be different on your machine, depending on what command triggers suspension (I have Software Suspend 2 on my machine). Anyway, let me know about xmodmap, I'm very curious about it...thanks... |
xmodmap, xev, and Dell Fn-keys
Ah, figured out xmodmap, and now I see what you mean. I tried to map the "eject" function key (Fn-F10) by assigning it to "F19" via xmodmap. Then when I tried xev, it registered the event, but showed "keysym 0x0, NoSymbol". So it doesn't seem to want to assign symbols to these keys, even though it will recognize them when pressed.
If anybody has any ideas about this, I'm all ears! Thanks, Quinn |
Hi kmisfit,
I've had some success getting Fn-keys to work in Fedora (I have a Dell Latitude D610). However, I should mention that using xmodmap and xev is apparently very unstable, and often one has to restart X (or even reboot) to get things working right after messing with these tools. I have configured the "hibernate" key (Fn-F1) to trigger Suspend-to-Disk, and the "eject" key to eject a CD, but you could easily configure other Fn-keys using the same method. So, here we go... In my rc.local script, I put the following: setkeycodes e00a 123 setkeycodes e009 122 In the file ~/.Xmodmap, I placed these commands: keycode 210 = F14 keycode 209 = F15 Then, using gconf-editor (in Gnome) I mapped these keys to the desired tasks. (Of course, you have to restart X for this to take effect.) Now, the strange part is, I couldn't get any other keycodes to work EXCEPT 123 and 122, which map (respectively) to 210 and 209 respectively. I don't know why none of the other codes seem to work. But I hope they will work for you. Let me know if you have any questions. Good luck, Quinn |
All times are GMT -5. The time now is 07:41 PM. |