1

I am emulating an Arabic keyboard and why they use the Tilde key for an alphabet, I don't know. Regardless, I have to make it work.

I am using the following key binding code to grab the ~ key, but it doesn't seem to register:

JButton key = new JButton();
key.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(DEAD_TILDE, "action");
key.getActionMap().put("action", new KeyAction(key));

I have looked online and can't find an explanation for this.

Can anybody please help me out?

Jeffrey Bosboom
  • 13,313
  • 16
  • 79
  • 92
Omar
  • 31
  • 3

0 Answers0