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,