aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/PalmOS
diff options
context:
space:
mode:
Diffstat (limited to 'backends/platform/PalmOS')
-rw-r--r--backends/platform/PalmOS/Src/base_event.cpp13
-rw-r--r--backends/platform/PalmOS/Src/zodiac_event.cpp2
2 files changed, 10 insertions, 5 deletions
diff --git a/backends/platform/PalmOS/Src/base_event.cpp b/backends/platform/PalmOS/Src/base_event.cpp
index 620195deeb..a3913529b6 100644
--- a/backends/platform/PalmOS/Src/base_event.cpp
+++ b/backends/platform/PalmOS/Src/base_event.cpp
@@ -262,14 +262,14 @@ bool OSystem_PalmBase::pollEvent(Common::Event &event) {
case vchrLaunch:
event.type = Common::EVENT_KEYDOWN;
event.kbd.keycode = Common::KEYCODE_ESCAPE;
- event.kbd.ascii = Common::KEYCODE_ESCAPE;
+ event.kbd.ascii = Common::ASCII_ESCAPE;
event.kbd.flags = 0;
return true;
// F5 = menu
case vchrMenu:
event.type = Common::EVENT_KEYDOWN;
- event.kbd.keycode = Common::ASCII_F5; // FIXME: Should be changed to KEYCODE_F5
+ event.kbd.keycode = Common::KEYCODE_F5;
event.kbd.ascii = Common::ASCII_F5;
event.kbd.flags = 0;
return true;
@@ -411,8 +411,13 @@ bool OSystem_PalmBase::pollEvent(Common::Event &event) {
// F1 -> F10 key
if (key >= '0' && key <= '9' && mask == (Common::KBD_CTRL|Common::KBD_ALT)) {
- key = (key == '0') ? 324 : (Common::ASCII_F1 + key - '1');
- mask = 0;
+ key = (key - '0' + 10 - 1) % 10; // '0' -> 9, '1' -> 0, '2' -> 1, ...
+ _wasKey = true;
+ event.type = Common::EVENT_KEYDOWN;
+ event.kbd.keycode = Common::KEYCODE_F1 + key;
+ event.kbd.ascii = Common::ASCII_F1 + key;
+ event.kbd.flags = 0;
+ return true;
#ifdef STDLIB_TRACE_MEMORY
// print memory
diff --git a/backends/platform/PalmOS/Src/zodiac_event.cpp b/backends/platform/PalmOS/Src/zodiac_event.cpp
index 3ee2a32654..84ecc27097 100644
--- a/backends/platform/PalmOS/Src/zodiac_event.cpp
+++ b/backends/platform/PalmOS/Src/zodiac_event.cpp
@@ -46,7 +46,7 @@ bool OSystem_PalmZodiac::check_event(Common::Event &event, EventPtr ev) {
// F5 = menu
case vchrThumbWheelBack:
event.type = Common::EVENT_KEYDOWN;
- event.kbd.keycode = Common::ASCII_F5; // FIXME: Should be KEYCODE_F5
+ event.kbd.keycode = Common::KEYCODE_F5;
event.kbd.ascii = Common::ASCII_F5;
event.kbd.flags = 0;
return true;