diff --git a/src/mac/carbon/toplevel.cpp b/src/mac/carbon/toplevel.cpp index 44af089624..56d3c0ded6 100644 --- a/src/mac/carbon/toplevel.cpp +++ b/src/mac/carbon/toplevel.cpp @@ -249,9 +249,13 @@ pascal OSStatus wxMacWindowEventHandler( EventHandlerCallRef handler , EventRef short keychar ; keychar = short(rec.message & charCodeMask); keycode = short(rec.message & keyCodeMask) >> 8 ; - long keyval = wxMacTranslateKey(keychar, keycode) ; wxWindow* focus = wxWindow::FindFocus() ; - + // it is wxWindows Convention to have Ctrl Key Combinations at ASCII char value + if ( (rec.modifiers & controlKey) && keychar >= 0 && keychar < 0x20 ) + { + keychar += 0x40 ; + } + long keyval = wxMacTranslateKey(keychar, keycode) ; if ( (focus != NULL) && wxTheApp->MacSendKeyDownEvent( focus , keyval , rec.modifiers , rec.when , rec.where.h , rec.where.v ) ) { // was handled internally diff --git a/src/mac/toplevel.cpp b/src/mac/toplevel.cpp index 44af089624..56d3c0ded6 100644 --- a/src/mac/toplevel.cpp +++ b/src/mac/toplevel.cpp @@ -249,9 +249,13 @@ pascal OSStatus wxMacWindowEventHandler( EventHandlerCallRef handler , EventRef short keychar ; keychar = short(rec.message & charCodeMask); keycode = short(rec.message & keyCodeMask) >> 8 ; - long keyval = wxMacTranslateKey(keychar, keycode) ; wxWindow* focus = wxWindow::FindFocus() ; - + // it is wxWindows Convention to have Ctrl Key Combinations at ASCII char value + if ( (rec.modifiers & controlKey) && keychar >= 0 && keychar < 0x20 ) + { + keychar += 0x40 ; + } + long keyval = wxMacTranslateKey(keychar, keycode) ; if ( (focus != NULL) && wxTheApp->MacSendKeyDownEvent( focus , keyval , rec.modifiers , rec.when , rec.where.h , rec.where.v ) ) { // was handled internally