11.11.2014, 14:46
(11.11.2014, 08:33)ryanthara Wrote:(09.11.2014, 17:09)ryanthara Wrote: Unter Mac OS X, hier Yosemite, wird nicht die Steuerungs-Taste, sonder die cmd-Taste (früher "Apfel"-Taste) für die meisten Tastaturkürzel benutzt. Ich denke, bzw. weiß auch eigener Programmiererfahrung, dass dies nicht so schwer zu implementieren ist.
[..] I found out, that the JMenuHelper.java has the code base for the keystrokes.
That is the correct place. I'm using the JDK standard mechanism: javax.swing.KeyStroke#getKeyStroke
(11.11.2014, 08:33)ryanthara Wrote: A simple question, are the shortcuts working under windows and linux?
Yes
(11.11.2014, 08:33)ryanthara Wrote: I need a little bit more background. Do you use a visual design tool for the gui? If the answer is yes, which one?
I'm using IntelliJ IDEA as indicated in the README and FAQ.
But to solve the problem, we need tips like this and this.
Apple states
Quote:You should make your keyboard shortcuts conditional based on the current platform, because standard shortcuts vary across platforms.and so RouteConverter should be extended to address this. Keystrokes are defined in the source code
Code:
contentPane.registerKeyboardAction(new DialogAction(this) {
public void run() {
cancel();
}
}, getKeyStroke(VK_ESCAPE, 0), WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
Code:
new-file-action=New
new-file-action-mnemonic=N
new-file-action-keystroke=ctrl N
--
Christian
Christian