Open martinpro1000 opened 2 years ago
You would need to do it for each individual key combination or use reflection.
I also created that way:
for (int i = 0; i < 65406; i++) {
String text = NativeKeyEvent.getKeyText(i);
if (!text.startsWith("Unknown")) {
disableKey.getItems().add(text);
hashMap.put(text, i);
}
}
I want to add all the available keys of NativeKeyEvent to an HashMap<String, Integer>(with String being .getKeyText(i); and Integer being the actual key code) and also to a ComboBox, is there any way to do that? I can't find it!