diff options
author | Lionel Ulmer | 2002-05-20 21:19:53 +0000 |
---|---|---|
committer | Lionel Ulmer | 2002-05-20 21:19:53 +0000 |
commit | adf44644cce9a1ca3e4f26160b22aa5a4d4aed2e (patch) | |
tree | 75c862baf179b2a49fb5f17411034faf855281ba | |
parent | f6b934e068f9d59a2a8b6a02b7dc27e68e02e1de (diff) | |
download | scummvm-rg350-adf44644cce9a1ca3e4f26160b22aa5a4d4aed2e.tar.gz scummvm-rg350-adf44644cce9a1ca3e4f26160b22aa5a4d4aed2e.tar.bz2 scummvm-rg350-adf44644cce9a1ca3e4f26160b22aa5a4d4aed2e.zip |
Add modifier support to the X11 port.
svn-id: r4366
-rw-r--r-- | x11.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -819,6 +819,11 @@ bool OSystem_X11::poll_event(Event *scumm_event) { */ int keycode = -1; int ascii = -1; + byte mode = 0; + + if (event.xkey.state & 0x01) mode |= KBD_SHIFT; + if (event.xkey.state & 0x04) mode |= KBD_CTRL; + if (event.xkey.state & 0x08) mode |= KBD_ALT; switch (event.xkey.keycode) { case 9: /* Escape on my PC */ case 130: /* Calendar on the iPAQ */ @@ -857,7 +862,7 @@ bool OSystem_X11::poll_event(Event *scumm_event) { scumm_event->event_code = EVENT_KEYDOWN; scumm_event->kbd.keycode = keycode; scumm_event->kbd.ascii = (ascii != -1 ? ascii : keycode); - scumm_event->kbd.flags = 0; + scumm_event->kbd.flags = mode; return true; } } break; |