From 4232d964a3c75b1aaf64f6f06eb77424d29a68af Mon Sep 17 00:00:00 2001 From: Thomas Jentzsch Date: Tue, 20 Aug 2019 12:09:31 +0200 Subject: [PATCH] add some more keypad keys support --- src/common/PKeyboardHandler.cxx | 14 ++++++++++++-- src/debugger/gui/PromptWidget.cxx | 1 + src/gui/EditableWidget.cxx | 1 + 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/common/PKeyboardHandler.cxx b/src/common/PKeyboardHandler.cxx index 6a95ead0b..245f32abf 100644 --- a/src/common/PKeyboardHandler.cxx +++ b/src/common/PKeyboardHandler.cxx @@ -506,14 +506,24 @@ PhysicalKeyboardHandler::EventMappingArray PhysicalKeyboardHandler::DefaultMenuM {Event::UIDown, KBDK_DOWN}, {Event::UILeft, KBDK_LEFT}, {Event::UIRight, KBDK_RIGHT}, + {Event::UISelect, KBDK_RETURN}, {Event::UIHome, KBDK_HOME}, {Event::UIEnd, KBDK_END}, {Event::UIPgUp, KBDK_PAGEUP}, {Event::UIPgDown, KBDK_PAGEDOWN}, - - {Event::UISelect, KBDK_RETURN}, + // same with keypad + {Event::UIUp, KBDK_KP_8}, + {Event::UIDown, KBDK_KP_2}, + {Event::UILeft, KBDK_KP_4}, + {Event::UIRight, KBDK_KP_6}, {Event::UISelect, KBDK_KP_ENTER}, + + {Event::UIHome, KBDK_KP_7}, + {Event::UIEnd, KBDK_KP_1}, + {Event::UIPgUp, KBDK_KP_9}, + {Event::UIPgDown, KBDK_KP_3}, + {Event::UICancel, KBDK_ESCAPE}, {Event::UINavPrev, KBDK_TAB, KBDM_SHIFT}, diff --git a/src/debugger/gui/PromptWidget.cxx b/src/debugger/gui/PromptWidget.cxx index d16f2afe3..d9babbad0 100644 --- a/src/debugger/gui/PromptWidget.cxx +++ b/src/debugger/gui/PromptWidget.cxx @@ -328,6 +328,7 @@ bool PromptWidget::handleKeyDown(StellaKey key, StellaMod mod) break; case KBDK_DELETE: + case KBDK_KP_PERIOD: // actually the num delete killChar(+1); dirty = true; break; diff --git a/src/gui/EditableWidget.cxx b/src/gui/EditableWidget.cxx index f40a5a9f9..6c4ce7e95 100644 --- a/src/gui/EditableWidget.cxx +++ b/src/gui/EditableWidget.cxx @@ -142,6 +142,7 @@ bool EditableWidget::handleKeyDown(StellaKey key, StellaMod mod) break; case KBDK_DELETE: + case KBDK_KP_PERIOD: dirty = killChar(+1); if(dirty) sendCommand(EditableWidget::kChangedCmd, key, _id); break;