Hi!
The handling of the Shift key in libs/client/glXEventHandler.cpp
currently only gives upper case characters A-Z, but does not work for
other keys produced with the Shift key, such as ()<>!...@#$% etc.
The attached patch fixes that.
(Note that this fix still is not entirely complete: for that, it would
have to take the Lock modifier into account and various settings that
influence its use, see
<http://tronche.com/gui/x/xlib/input/keyboard-encoding.html>. But I
guess nobody ever uses this so it's not worth the trouble).
Martin
Index: libs/client/glXEventHandler.cpp
===================================================================
--- libs/client/glXEventHandler.cpp (revision 5392)
+++ libs/client/glXEventHandler.cpp (working copy)
@@ -295,8 +295,12 @@
uint32_t GLXEventHandler::_getKey( XEvent& event )
{
+ int index = 0;
+ if( event.xkey.state & ShiftMask )
+ index = 1;
+
const KeySym key = XKeycodeToKeysym( event.xany.display,
- event.xkey.keycode, 0);
+ event.xkey.keycode, index );
switch( key )
{
case XK_Escape: return KC_ESCAPE;
@@ -339,10 +343,6 @@
case XK_Alt_R: return KC_ALT_R;
default:
- // 'Useful' Latin1 characters
- if( (event.xkey.state & ShiftMask) && key >= 'a' && key <= 'z' )
- return key + 'A' - 'a'; // capitalize letter
-
if( (key >= XK_space && key <= XK_asciitilde ) ||
(key >= XK_nobreakspace && key <= XK_ydiaeresis))
{
_______________________________________________
eq-dev mailing list
[email protected]
http://www.equalizergraphics.com/cgi-bin/mailman/listinfo/eq-dev
http://www.equalizergraphics.com