On Wed, Nov 14, 2012 at 10:43:31PM +0800, lina wrote: > On Wednesday 14,November,2012 09:31 PM, Darac Marjal wrote: > > On Wed, Nov 14, 2012 at 10:03:55PM +1000, adam wolter wrote: > >> Release 6.0.6 (squeeze) > >> i have the PowerPC version installed on a lampShade iMac G4. > >> LCD monitor brightness is controlled by function keys F1 and F2 which have > >> brightness markings. > >> it all works well. > >> i just want to know HOW so i can make similar support in ubuntu. > >> Volume controls work well also and i can find XF86 Keyboard Shortcuts. > >> "xdotool key XF86MonBrightnessDown" works also but there is no Keyboard > >> Shortcut for it ! > >> Can someone tell me how the F1 key is bound to XF86MonBrightnessDown ???? > >> please. > > > > Run the following: > > > > $ xev | grep -A2 --line-buffered '^KeyRelease' | sed -n '/keycode > > /s/^.*keycode \([0-9]*\).* (.*, \(.*\)).*$/\1 \2/p' > > > > (all one line. The initial $ is to show it's to be run as an ordinary > > user). > > > > That should pop up a little window, press Fn+F1 and then FN+F2 and see > > what codes you get out. You should get a pair of "Number Function" for > > each key. > > > > Next, add the following lines to "~/.Xmodmap": > > > > keycode 123 = XF86MonBrightnessUp > > keycode 124 = XF86MonBrightnessDown > > > > (replacing 123 and 124 with the appropriate numbers obtained above). Log > > out and restart X (or just reboot) and see if that works. > > Thanks, I also tried via *touch* the file .Xmodmap under my home > directory with > > $ more .Xmodmap > 232 XF86MonBrightnessDown > 233 XF86MonBrightnessUp > > Not work. Furthermore, > > $ xev | grep -A2 '^KeyRelease' > KeyRelease event, serial 39, synthetic NO, window 0x3a00001, > root 0xb4, subw 0x0, time 307378, (132,112), root:(763,477), > state 0x0, keycode 232 (keysym 0x1008ff03, XF86MonBrightnessDown), > same_screen YES, > -- > KeyRelease event, serial 39, synthetic NO, window 0x3a00001, > root 0xb4, subw 0x0, time 308218, (132,112), root:(763,477), > state 0x0, keycode 233 (keysym 0x1008ff02, XF86MonBrightnessUp), > same_screen YES, > > I did a reboot. OK, so you're getting the appropriate keycodes being sent, but it's still not working? Yet it works if you synthetically generate those keycodes with "xdotool"? That's very odd.
Description: Digital signature