problem with keyboard, up arrow calls on "Print Screen Key" and screenshot appears

Adam Jackson ajackson at redhat.com
Sun Mar 9 01:54:39 UTC 2008


On Sat, 2008-03-08 at 11:19 -0800, Antonio Olivares wrote:
> Dear all,
> 
> I have been noticing that when I am in a terminal, and
> I press the "up arrow", instead of getting the last
> command , I am getting what I normally get by pressing
> the "Print Screen Key".  Is this happening only to me,
> or is there a bug with keyboard problems already?

Yes, we know.

The problem is that hotkeys are implemented by doing XGrabKey on a
"keycode", which is just an integer corresponding to a key on the
keyboard.  But humans want to talk in terms of "keysyms", which are the
formal name for the key itself.  This matters because different
keyboards report different keycodes, and even beyond that, the mapping
from keysym to keycode can change at runtime.

The bug appears to be that gnome-settings-daemon is grabbing the keycode
for what happens to be "Print Screen" at some point during startup.
Then the map changes, and that keycode ends up mapping to Up.  But g-s-d
doesn't update the grabs when this happens.

This is actually a fairly intricate problem to solve, because there's no
direct communication path between g-s-d and the plugins that actually
hold the grab for sending this notification along.  That said, I think I
have a strategy for fixing it.  Hopefully I'll have it written by
tomorrow.

- ajax




More information about the fedora-test-list mailing list