diff options
-rw-r--r-- | engines/sci/event.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/engines/sci/event.cpp b/engines/sci/event.cpp index 3f615f610f..90ddaaf967 100644 --- a/engines/sci/event.cpp +++ b/engines/sci/event.cpp @@ -214,6 +214,15 @@ SciEvent EventManager::getScummVMEvent() { //((ev.kbd.flags & Common::KBD_CAPS) ? SCI_KEYMOD_CAPSLOCK : 0) | //((ev.kbd.flags & Common::KBD_SCRL) ? SCI_KEYMOD_SCRLOCK : 0) | + if (input.data >= Common::KEYCODE_KP0 && input.data <= Common::KEYCODE_KP9) { + if (!(ev.kbd.flags & Common::KBD_NUM)) { + // HACK: Num-Lock not enabled + // We shouldn't get a valid ascii code in these cases. We fix it here, so that cursor keys + // on the numpad work properly. + input.character = 0; + } + } + if ((input.character) && (input.character <= 0xFF)) { // Directly accept most common keys without conversion if ((input.character >= 0x80) && (input.character <= 0xFF)) { |