LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook
User Name
Password
Linux - Laptop and Netbook Having a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).

Notices


Reply
  Search this Thread
Old 11-09-2005, 05:04 AM   #1
kmisfit
LQ Newbie
 
Registered: Apr 2005
Posts: 3

Rep: Reputation: 0
Question 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.

Last edited by kmisfit; 11-09-2005 at 09:01 AM.
 
Old 01-19-2006, 02:59 AM   #2
qminor
LQ Newbie
 
Registered: Jan 2006
Posts: 4

Rep: Reputation: 0
Post

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...
 
Old 01-19-2006, 03:42 AM   #3
qminor
LQ Newbie
 
Registered: Jan 2006
Posts: 4

Rep: Reputation: 0
Question 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
 
Old 02-07-2006, 11:27 PM   #4
qminor
LQ Newbie
 
Registered: Jan 2006
Posts: 4

Rep: Reputation: 0
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How xev, and media keys on a keyboard jrattner1 Linux - Software 1 09-29-2005 04:36 PM
Evo n1020v and xev Donma Linux - Laptop and Netbook 0 06-24-2005 10:46 AM
xev gone from mandrake 10? McKnight Mandriva 2 06-27-2004 01:53 PM
Looking for xev.c nonconformative Programming 2 11-30-2003 12:06 PM
xev package fruibat_2000 Linux - Software 0 09-08-2003 04:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook

All times are GMT -5. The time now is 12:17 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration