#514 GUIUtilities.getShortcutLabel vs KevEventTranslator.parseKey

closed-fixed
Alan Ezust
None
5
2013-09-23
2013-09-23
Makarius
No

On Mac OS X (Jdk-7u40) some jEdit components (e.g. the file browser) produce warnings like this:

KeyEventTranslator: Invalid key code: ⌘W

Consequently, COMMAND-W does not work to close the dialog window.

This is because GUIUtilities.getShortcutLabel is used to produce a string version of the key stroke of some action, and KeyEventTranslator.parseKey to recover its internal form in Swing, e.g. in EnhancedDialog.isCloseBufferShortcut.

It seems that GUIUtilities.getShortcutLabel was at some point "upgraded", in order to produce nice Mac OS X output for the user, e.g. in menus or tooltips, but it broke that internal bypass. The included patch addresses that (via some slightly odd Boolean flag).

Discussion

  • Makarius
    Makarius
    2013-09-23

     
    Attachments
  • Alan Ezust
    Alan Ezust
    2013-09-23

    I see the boolean flag is called "platform" but there is no API docs that explain what the meaning of that boolean parameter is. can you explain it in a sentence or two, so I can add some API docs?

     
  • Alan Ezust
    Alan Ezust
    2013-09-23

    • assigned_to: nobody --> ezust
     
  • Alan Ezust
    Alan Ezust
    2013-09-23

    • status: open --> closed-fixed
     
  • Alan Ezust
    Alan Ezust
    2013-09-23

    nevermind, I figured it out and added api docs. Thanks!
    committed 23206.