I need to define shortcut keys Ctrl+. and Ctrl+/ to my extension's functions.
Here is what I have in my browser.xul
overlay:
<keyset id="mainKeyset">
<key oncommand="window.alert('SLASH')"
id="cue-cmd-1"
keycode="VK_SLASH"
modifiers="accel"
/>
<key oncommand="window.alert('PERIOD')"
id="cue-cmd-2"
keycode="VK_PERIOD"
modifiers="accel"
/>
</keyset>
The overlay merges successfully. However the shortcut keys do not work.
If I change keycode="VK_PERIOD"
to key="."
and similarly keycode="VK_SLASH"
to key="/"
, shortcuts keys work as expected.
Since I am allowing users to assign their preferred shortcuts to commands, I need to use keycode
attribute in order to be able to use shift
modifier key.
What am I missing?