aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/input_translator.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2016-03-31 23:40:30 -0400
committerPaul Gilbert2016-03-31 23:40:30 -0400
commit43f183c207023c4398548ae385c9f3cbf853d9a9 (patch)
tree64f62004696566cf406f188729c7d03cead60749 /engines/titanic/input_translator.cpp
parent18fabbb2d40ce9456d4673c0b7c602f50458b583 (diff)
downloadscummvm-rg350-43f183c207023c4398548ae385c9f3cbf853d9a9.tar.gz
scummvm-rg350-43f183c207023c4398548ae385c9f3cbf853d9a9.tar.bz2
scummvm-rg350-43f183c207023c4398548ae385c9f3cbf853d9a9.zip
TITANIC: Implement keyboard event handling
Diffstat (limited to 'engines/titanic/input_translator.cpp')
-rw-r--r--engines/titanic/input_translator.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/engines/titanic/input_translator.cpp b/engines/titanic/input_translator.cpp
index 2251c2fe7a..9769076a1d 100644
--- a/engines/titanic/input_translator.cpp
+++ b/engines/titanic/input_translator.cpp
@@ -94,4 +94,16 @@ void CInputTranslator::rightButtonDoubleClick(int special, const Point &pt) {
_inputHandler->handleMessage(msg);
}
+void CInputTranslator::keyDown(const Common::KeyState &keyState) {
+ if (keyState.keycode >= Common::KEYCODE_F1 && keyState.keycode <= Common::KEYCODE_F5) {
+ CVirtualKeyCharMsg msg(keyState);
+ _inputHandler->handleMessage(msg);
+ }
+
+ if (keyState.ascii >= 32 && keyState.ascii <= 127) {
+ CKeyCharMsg msg(keyState.ascii);
+ _inputHandler->handleMessage(msg);
+ }
+}
+
} // End of namespace Titanic