Changed: #942 Make all keys used for actions/macros identical on all platforms

This commit is contained in:
kervala 2010-05-26 14:46:13 +02:00
parent a63e6c5dc3
commit 7c664c32f7

View file

@ -304,9 +304,9 @@ void CUnixEventEmitter::processMessage (XEvent &event, CEventServer &server)
int c; int c;
c = XLookupString(&event.xkey, Text, 1024-1, &k, NULL); c = XLookupString(&event.xkey, Text, 1024-1, &k, NULL);
TKey key = getKey(XKeycodeToKeysym(_dpy, ((XKeyEvent*)&event)->keycode, 0)); TKey key = getKey(XKeycodeToKeysym(_dpy, event.xkey.keycode, 0));
if(key == KeyNOKEY) if(key == KeyNOKEY)
key = getKey(XKeycodeToKeysym(_dpy, ((XKeyEvent*)&event)->keycode, 1)); key = getKey(XKeycodeToKeysym(_dpy, event.xkey.keycode, 1));
server.postEvent (new CEventKeyDown (key, getKeyButton(event.xbutton.state), _PreviousKey != key, this)); server.postEvent (new CEventKeyDown (key, getKeyButton(event.xbutton.state), _PreviousKey != key, this));
_PreviousKey = key; _PreviousKey = key;
@ -332,9 +332,9 @@ void CUnixEventEmitter::processMessage (XEvent &event, CEventServer &server)
int c; int c;
c = XLookupString(&event.xkey, Text, 1024-1, &k, NULL); c = XLookupString(&event.xkey, Text, 1024-1, &k, NULL);
TKey key = getKey(XKeycodeToKeysym(_dpy, ((XKeyEvent*)&event)->keycode, 0)); TKey key = getKey(XKeycodeToKeysym(_dpy, event.xkey.keycode, 0));
if(key == KeyNOKEY) if(key == KeyNOKEY)
key = getKey(XKeycodeToKeysym(_dpy, ((XKeyEvent*)&event)->keycode, 1)); key = getKey(XKeycodeToKeysym(_dpy, event.xkey.keycode, 1));
server.postEvent (new CEventKeyUp (key, getKeyButton(event.xbutton.state), this)); server.postEvent (new CEventKeyUp (key, getKeyButton(event.xbutton.state), this));
_PreviousKey = KeyNOKEY; _PreviousKey = KeyNOKEY;