0

I want to allow a shortcut configuration for my application that works around the world. That's why I load them from resource bundles. I first wanted to simply put the resource value for the shortcut directly to javax.swing.KeyStroke.getKeyStroke(String), but that doesn't work for unicode keyboards, e.g. arabic:

KeyStroke test = KeyStroke.getKeyStroke("control ش");
// test is null, i.e. it did not work

ش is the arabic keyboard key of A.

Is there a easy way to allow String definition of international keystrokes for java?

jan
  • 2,741
  • 4
  • 35
  • 56
  • What do chinese keyboards keys send if one presses A? In elcipse I get a popup with 10 different chinese symbols, i.e. how do chinese shortcuts work? – jan Apr 02 '14 at 10:16

1 Answers1

0

It does not work with pressed keystrokes:

KeyStroke test = KeyStroke.getKeyStroke("control typed ش");
// test not null, works
jan
  • 2,741
  • 4
  • 35
  • 56
  • you get the keystroke that way, but this high level typed event cannot be used for keyboard action shortcuts... :( see http://stackoverflow.com/questions/22814845/how-to-define-readable-shortcuts-for-international-keyboards – jan Apr 03 '14 at 07:25