Fix generating events for WXK_NUMPAD_ENTER in wxOSX.

This allows to properly detected numeric keypad "Enter" key in the code,
notably in wxTextCtrl inside wxWidgets itself.

See #16415.
This commit is contained in:
John Roberts
2015-07-18 01:03:08 +02:00
committed by Vadim Zeitlin
parent a79a2c0c8a
commit 4f69410cd8

View File

@@ -232,6 +232,10 @@ long wxOSXTranslateCocoaKey( NSEvent* event, int eventType )
{
switch ( [s characterAtIndex:0] )
{
// numpad enter key End-of-text character ETX U+0003
case 3:
retval = WXK_NUMPAD_ENTER;
break;
// backspace key
case 0x7F :
case 8 :
@@ -345,9 +349,6 @@ long wxOSXTranslateCocoaKey( NSEvent* event, int eventType )
case 69: // +
retval = WXK_NUMPAD_ADD;
break;
case 76: // Enter
retval = WXK_NUMPAD_ENTER;
break;
case 65: // .
retval = WXK_NUMPAD_DECIMAL;
break;