On Fri, Oct 10, 2008 at 01:50:49AM -0000, Bryce Harrington wrote:
> 1. The problem with g-p-m not handling the brightness key when numlock
> is set is in fact an issue local to gnome-power-manager. It's simply
> neglects to grab the modifiers for the keys.
>
> The first line of the attached patch makes the issue go away (the rest
> of the patch is just instrumentation). No changes to X are required; it
> seems to be working properly.
Thanks for the analysis, Bryce. I'm attaching a debdiff which implements
that change. I don't see any cases in the code where it would be
appropriate to treat these keysyms differently with a modifier, since
they're all special-purpose hotkeys:
> 2. On the Thinkpad T61 specific issue, I discussed it with Peter
> Hutterer. It seems to be that on this hardware, the numlock key doesn't
> actually send events when the fn is pressed so we have no way of knowing
> that it is pressed. This was verified via gdb on the xserver. Scroll
> lock and numlock are shared, so fn has to be pressed to trigger numlock.
>
> So it seems to be either a hardware or kernel bug.
On Fri, Oct 10, 2008 at 01:50:49AM -0000, Bryce Harrington wrote: manager. It's simply
> 1. The problem with g-p-m not handling the brightness key when numlock
> is set is in fact an issue local to gnome-power-
> neglects to grab the modifiers for the keys.
>
> The first line of the attached patch makes the issue go away (the rest
> of the patch is just instrumentation). No changes to X are required; it
> seems to be working properly.
Thanks for the analysis, Bryce. I'm attaching a debdiff which implements
that change. I don't see any cases in the code where it would be
appropriate to treat these keysyms differently with a modifier, since
they're all special-purpose hotkeys:
gpm_button_ xevent_ key (button, XF86XK_PowerOff, GPM_BUTTON_POWER); xevent_ key (button, XF86XK_Sleep, GPM_BUTTON_ SUSPEND) ; /* should be configurable */ xevent_ key (button, XF86XK_ MonBrightnessUp , GPM_BUTTON_ BRIGHT_ UP); xevent_ key (button, XF86XK_ MonBrightnessDo wn, GPM_BUTTON_ BRIGHT_ DOWN); xevent_ key (button, XF86XK_ScreenSaver, GPM_BUTTON_LOCK); xevent_ key (button, XF86XK_ KbdBrightnessUp , GPM_BUTTON_ KBD_BRIGHT_ UP); xevent_ key (button, XF86XK_ KbdBrightnessDo wn, GPM_BUTTON_ KBD_BRIGHT_ DOWN); xevent_ key (button, XF86XK_ KbdLightOnOff, GPM_BUTTON_ KBD_BRIGHT_ TOGGLE) ;
gpm_button_
gpm_button_
gpm_button_
gpm_button_
gpm_button_
gpm_button_
gpm_button_
> 2. On the Thinkpad T61 specific issue, I discussed it with Peter
> Hutterer. It seems to be that on this hardware, the numlock key doesn't
> actually send events when the fn is pressed so we have no way of knowing
> that it is pressed. This was verified via gdb on the xserver. Scroll
> lock and numlock are shared, so fn has to be pressed to trigger numlock.
>
> So it seems to be either a hardware or kernel bug.
I will open that one as a separate bug.
--
- mdz