I am developing an application which now has an extensive Menu with Accelerators.
I am looking for a way to make it possible for the user to bind the keys for certain functions and save the key bindings for the next startup.
Is there a way to load MenuItem accelerators for an FXML file from a configuration file?
Otherwise, I would probably need to serialize a map for each MenuItem function individually.
Thanks in advance for any info.
You can use KeyCombination.getName() to get a
Stringrepresentation of aMenuItemaccelerator and KeyCombination.keyCombination(String) to create aMenuItemaccelerator from aStringrepresentation. See example: