Suppose I have a control in my application that has some KeyStroke . And it automatically sets ToolTip depending on the system. For example, on Windows it is the text of the form Ctrl+Shift+Z , and on MacOS it is ⌘⇧Z . How to get this line for a given shortcut?

PS
I'm interested in getting this string as with AWT (or Swing).

  • Does your application automatically display a hot key? I understood correctly?) - Gorets

1 answer 1

See KeyEvent.getKeyModifiersText , KeyEvent.getKeyText, and KeyEvent.getKeyModifiersExText