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.

Closes #16415.

(this is a backport of 4f69410cd8 from master)
This commit is contained in:
John Roberts
2015-07-18 01:03:08 +02:00
committed by Vadim Zeitlin
parent 9fe3c3f774
commit 38e410a273
2 changed files with 6 additions and 4 deletions

View File

@@ -636,8 +636,9 @@ wxOSX:
- Fix length of text in wxTextDataObject.
- Fix using wxHTTP and wxFTP from worker thread.
- Fix wxFileDialog::GetFilterIndex() for file open dialogs (phsilva).
- Fix printing all pages non-interactively (John Roberts).
- Generate correct events for WXK_NUMPAD_ENTER (John Roberts).
- Fix handling of WXK_NUMPAD_ENTER in wxTextCtrl (John Roberts).
- Fix printing all pages non-interactively (John Roberts).
- Fix custom paper support (tijsv).
- Return false from wxSound::Create()/IsOk() if the file doesn't exist.

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;