mirror of https://github.com/stella-emu/stella.git
add some more keypad keys support
This commit is contained in:
parent
b1f841cccc
commit
4232d964a3
|
@ -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},
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue