LinuxQuestions.org
Help answer threads with 0 replies.
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 09-06-2008, 12:28 AM   #1
mlp68
Member
 
Registered: Jun 2002
Location: NY
Distribution: Gentoo,RH
Posts: 333

Rep: Reputation: 40
HP Pavillion keyboard key code mystery


I have a HP DV2940SE with Gentoo (tried Kubuntu, had endless problems with suspend/resume, Gentoo works better in that respect). Now there are a few media keys which do what they say (also the remote control does what the buttons say), EXCEPT for the "brightness down" and "up" keys, which are FN+F7 and FN+F8. In Ubuntu they work, but to my surprise, in Gentoo they don't even generate a keycode (never mind how it might get interpreted and how keymaps are set up). In U they generate key codes 102 and 212, respectively. In Gentoo it's as if the key didn't get pressed at all. I checked both systems with xev. As far as I can tell, the same keyboard driver is used ("atkbd"). This works in Ubuntu even when booted from the live CD.

Does anyone know what the trick is? What determines if a key (+modifier) sends a code in the first place?

The next question would be, how is the brightness controlled then? My KPowersave applet says that the hardware does not support changing the brightness. That's the 2nd trick I'd like to understand. I tried to dissect how it's done in Ubuntu but I can't figure it out.

Thanks for any insights,
mlp
 
Old 09-06-2008, 05:16 PM   #2
Uncle_Theodore
Member
 
Registered: Dec 2007
Location: Charleston WV, USA
Distribution: Slackware 12.2, Arch Linux Amd64
Posts: 896

Rep: Reputation: 71
I would suggest you try to insert the module called video.ko. Like this:

modprobe video

I've just checked on my Slackware laptop: with this module the brightness keys (Fn+F6 and Fn+F7 in my case) generate keycodes and change the screen brightness, without it the keys generate no keycode at all (and don't change anything). It's an acpi module, I assume it should be in your kernel.
 
Old 09-06-2008, 08:07 PM   #3
masonm
Senior Member
 
Registered: Mar 2003
Location: Following the white rabbit
Distribution: Slackware64 -current
Posts: 2,300

Rep: Reputation: 90
All of those keys work for me on my HP Pavillion both in Slack and Debian. Both do have the video module loaded so Uncle Theodore may well be on the spot there.

Either that or you're just not holding your tongue the right way when you press the buttons.
 
Old 09-07-2008, 11:51 AM   #4
mlp68
Member
 
Registered: Jun 2002
Location: NY
Distribution: Gentoo,RH
Posts: 333

Original Poster
Rep: Reputation: 40
Great! Yes, that's it.

I didn't have the video.ko module built -- it has dependencies which are set indirectly by enabling other kernel features. I figured out how to enable it, built it... works.

Thanks, guys!

mlp
 
  


Reply

Tags
keyboard, keycodes, laptop



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
Windows key lacking scan code DavidMcCann Linux - General 8 02-16-2011 07:04 PM
Bash & Xdialog - how to code to recognize ENTER key on keyboard.? craftybytes Linux - Software 6 04-03-2008 01:00 AM
Keyboard-shortcut mystery Ander Linux - Software 2 01-15-2005 01:45 PM
keyboard key: where is my | ??? erickFis Linux - Hardware 1 02-10-2004 03:29 PM
Key code? wyvis Linux - General 1 01-14-2003 01:30 PM

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

All times are GMT -5. The time now is 10:28 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