diff --git a/src/Fl_Sys_Menu_Bar.mm b/src/Fl_Sys_Menu_Bar.mm index 2e7d32caa..05cdfa16a 100644 --- a/src/Fl_Sys_Menu_Bar.mm +++ b/src/Fl_Sys_Menu_Bar.mm @@ -167,7 +167,17 @@ typedef struct { if ( (key >= (FL_F+1)) && (key <= FL_F_Last) ) { // Handle function keys int fkey_num = (key - FL_F); // 1,2.. mac_key = NSF1FunctionKey + fkey_num - 1; - } + } else if (key == FL_Escape) { + mac_key = 27; + } else if (key == FL_Tab) { + mac_key = NSTabCharacter; + } else if (key == FL_Enter) { + mac_key = 0x0d; + } else if (key == FL_BackSpace) { + mac_key = NSBackspaceCharacter; + } else if (key == FL_Delete) { + mac_key = NSDeleteCharacter; + } [self setKeyEquivalent:[NSString stringWithCharacters:&mac_key length:1]]; [self setKeyEquivalentModifierMask:mod]; } diff --git a/src/fl_shortcut.cxx b/src/fl_shortcut.cxx index f95821848..b96a33413 100644 --- a/src/fl_shortcut.cxx +++ b/src/fl_shortcut.cxx @@ -122,13 +122,12 @@ static Keyname table[] = { static Keyname table[] = { // v - this column may contain UTF-8 characters {' ', "Space"}, - {FL_BackSpace,"\xe2\x8c\xab"}, // erase to the left + {FL_BackSpace,"⌫"/*"\xe2\x8c\xab"*/}, // U+232B : erase to the left {FL_Tab, "\xe2\x87\xa5"}, // rightwards arrow to bar - {0xff0b, "\xe2\x8c\xa6"}, // erase to the right {FL_Enter, "\xe2\x86\xa9"}, // leftwards arrow with hook {FL_Pause, "Pause"}, {FL_Scroll_Lock, "Scroll_Lock"}, - {FL_Escape, "\xe2\x90\x9b"}, + {FL_Escape, "⎋"}, // U+238B : broken circle with northwest arrow {FL_Home, "\xe2\x86\x96"}, // north west arrow {FL_Left, "\xe2\x86\x90"}, // leftwards arrow {FL_Up, "\xe2\x86\x91"}, // upwards arrow @@ -151,7 +150,7 @@ static Keyname table[] = { {FL_Meta_R, "Meta_R"}, {FL_Alt_L, "Alt_L"}, {FL_Alt_R, "Alt_R"}, - {FL_Delete, "\xe2\x8c\xa7"} // x in a rectangle box + {FL_Delete, "⌦"/*"\xe2\x8c\xa6"*/} // U+2326 : erase to the right }; #endif