From 6f4acae161840986453e69b86ddf5fadefb75d13 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 9 Jan 2008 12:59:11 +0000 Subject: Fixed some issues with AGI keyboard input svn-id: r30356 --- engines/agi/agi.cpp | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) (limited to 'engines/agi/agi.cpp') diff --git a/engines/agi/agi.cpp b/engines/agi/agi.cpp index 109278fb94..17359236f0 100644 --- a/engines/agi/agi.cpp +++ b/engines/agi/agi.cpp @@ -219,23 +219,10 @@ void AgiEngine::processEvents() { key = KEY_BACKSPACE; break; default: - // FIXME: This fixes assertions with isalpha below, but it essentially filters - // out all function keys (control, alt and shift). - // Well, actually, it does *not* filter them out (as we still pass the value - // in key to keyEnqueue after this switch/case statement); but it means that - // we perform no filtering on these input events, which is bad. That is, we - // provide keycode in one format, and the AGI core expects some other format... - // So maybe we should set key to 0 if key > 255? - if (key > 255) - break; - - // FIXME: We let lots of keys slip through here unchanged, passing our internal - // keycode values directly to the AGI core. Do we really want that??? - if (isalpha(key)) { - // FIXME: We probably should be using event.kbd.ascii at some point here, - // but it's not completly clear how/where, this needs testing. - // In particular, what about 'a' vs. 'A' (resp. the keys A vs. Shift-A) ? + // Not a special key, so get the ASCII code for it + key = event.kbd.ascii; + if (isalpha(key)) { // Key is A-Z. // Map Ctrl-A to 1, Ctrl-B to 2, etc. if (event.kbd.flags & Common::KBD_CTRL) { -- cgit v1.2.3