Re: Keyboard handling intrinsics

From: Tomas Frydrych <tf_at_o-hand.com>
Date: Fri May 30 2008 - 10:42:06 CEST

Hi Rob,

Robert Staudinger wrote:
>
> In ev_UnixKeyboard::keyPressEvent() the case "if (e->state &
> GDK_CONTROL_MASK)" is never triggered (<ctrl>, <alt>, <shift>, <apple>
> or other keys).
> Is that possibly because shortcuts using <ctrl> are already filtered
> at accelerator level?

The shortcuts should triggered from withing this method with the
invokeKeyboardMethod() call; IIRC that branch is there to deal with the
difference between Ctrl+ and Ctrl+Shift+.

> In the same file the function s_getAltMask() tries to find out how
> modifier keys are mapped. Is this really needed or can we just assume
> a sane setup? Or maybe there is a way implementing this using portable
> gdk functionality? I would like to get rid of non-portable code.

I think this (or something like this) is needed as the Alt keys can be
remapped on a given X system, and I would not be surprised if the code
is there because such case was encountered in the wild. If this can be
handled more sensibly using GDK, it would make sense. (The whole kbd
handling mechanism is rather peculiar and I suspect in many ways rooted
in the state of affairs more than a decade ago and cross-platform
issues; if the X version could be streamlined a bit making better use of
stock functionality provided by gdk/gtk, it would certainly be good in
the long term.)

Tomas
Received on Fri May 30 10:44:55 2008

This archive was generated by hypermail 2.1.8 : Fri May 30 2008 - 10:44:55 CEST