add some more keypad keys support

This commit is contained in:
Thomas Jentzsch 2019-08-20 12:09:31 +02:00
parent b1f841cccc
commit 4232d964a3
3 changed files with 14 additions and 2 deletions

View File

@ -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},

View File

@ -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;

View File

@ -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;