aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorMartin Kiewitz2009-12-31 16:50:26 +0000
committerMartin Kiewitz2009-12-31 16:50:26 +0000
commitba8b15908ca2616f933694deb85888bfcb57431f (patch)
treeeb088d226614e648e06a7345cff5ed922fef3e98 /engines/sci
parentcb6b1e8aff0e34c6cd556455ee173f925300acd3 (diff)
downloadscummvm-rg350-ba8b15908ca2616f933694deb85888bfcb57431f.tar.gz
scummvm-rg350-ba8b15908ca2616f933694deb85888bfcb57431f.tar.bz2
scummvm-rg350-ba8b15908ca2616f933694deb85888bfcb57431f.zip
SCI: keyboard events now dont use scancode anymore, fixing compatibility with foreign keyboard layouts (needs testing, cleanup will follow shortly after)
svn-id: r46801
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/event.cpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/engines/sci/event.cpp b/engines/sci/event.cpp
index bf4e215a28..19f155f47d 100644
--- a/engines/sci/event.cpp
+++ b/engines/sci/event.cpp
@@ -397,23 +397,26 @@ sciEvent SciEvent::get(unsigned int mask) {
if (event.type == SCI_EVENT_KEYBOARD) {
// Do we still have to translate the key?
- event.character = event.data;
+ // TODO: Needs cleanup
+ //event.character = event.data;
// Scancodify if appropriate
if (event.modifiers & SCI_KEYMOD_ALT) {
- event.character = altify(event.character);
+ event.character = altify(event.data);
} else if (event.modifiers & SCI_KEYMOD_CTRL) {
- event.character = controlify(event.character);
+ event.character = event.data;
+ //event.character = controlify(event.data);
}
// Shift if appropriate
- else if (((event.modifiers & (SCI_KEYMOD_RSHIFT | SCI_KEYMOD_LSHIFT)) && !(event.modifiers & SCI_KEYMOD_CAPSLOCK))
- || (!(event.modifiers & (SCI_KEYMOD_RSHIFT | SCI_KEYMOD_LSHIFT)) && (event.modifiers & SCI_KEYMOD_CAPSLOCK)))
- event.character = shiftify(event.character);
+ // else
+ //if (((event.modifiers & (SCI_KEYMOD_RSHIFT | SCI_KEYMOD_LSHIFT)) && !(event.modifiers & SCI_KEYMOD_CAPSLOCK))
+ // || (!(event.modifiers & (SCI_KEYMOD_RSHIFT | SCI_KEYMOD_LSHIFT)) && (event.modifiers & SCI_KEYMOD_CAPSLOCK)))
+ // event.character = shiftify(event.character);
// Numlockify if appropriate
- else if (event.modifiers & SCI_KEYMOD_NUMLOCK)
- event.data = numlockify(event.data);
+ //else if (event.modifiers & SCI_KEYMOD_NUMLOCK)
+ // event.data = numlockify(event.data);
}
return event;