Description
This is a code snippet from MenuItemContainer:
String text = KeystrokeUtils.toString(item.getAccelerator());
right = new Label(text);
For me this would make more sense:
String text = item.getAccelerator().getDisplayText();
right = new Label(text);
--------
I need this for accessibility where I have a ACCELERATOR attribute which return the KeyCombination for the node.
On Mac it is important to have the KeyCombination as It needs to know the modifiers, keyCode, charCode, etc.
On Window it is just parsed to a String so it can be read by Narrator.
Currently we using KeyCombination#toString() but that returns "Shortcut+S" instead of "Ctrl+S".
Note that in glass we can't reference controls, so using KeystrokeUtils is not an option in WinAccessible.
We could do our own parsing, but I rather use the 'official' one.
String text = KeystrokeUtils.toString(item.getAccelerator());
right = new Label(text);
For me this would make more sense:
String text = item.getAccelerator().getDisplayText();
right = new Label(text);
--------
I need this for accessibility where I have a ACCELERATOR attribute which return the KeyCombination for the node.
On Mac it is important to have the KeyCombination as It needs to know the modifiers, keyCode, charCode, etc.
On Window it is just parsed to a String so it can be read by Narrator.
Currently we using KeyCombination#toString() but that returns "Shortcut+S" instead of "Ctrl+S".
Note that in glass we can't reference controls, so using KeystrokeUtils is not an option in WinAccessible.
We could do our own parsing, but I rather use the 'official' one.