(Note: requires version 2 of the Framework)
A script can react to Ctrl+Alt keyboard shortcuts in two ways:
You assign a shortcut key to the script. The platform runs the script when you press the shortcut.
Or, a script is set to run permanently, and listens for shortcut keypresses while it is running.
(The platform only handles Ctrl+Alt+X, not Ctrl+X or Alt+X, because Ctrl+X and Alt+X are widely used by web browsers for their own shortcuts which cannot be overridden or replaced. For example, Ctrl+S and Ctrl+B are reserved shortcuts in all web browsers.)
The
| Property | Description |
| key | The Javascript key code of the browser keyboard event |
| shiftKey | The true/false state of the Shift key |
For example:
Framework.OnMessage = function(Msg) {
if (Msg.is(FXB.MessageTypes.SHORTCUT_KEY)) {
if (Msg.key == "p") {
// User has pressed Ctrl+Alt+P
}
}
};
Note: for a Ctrl+Alt+Shift+X keyboard combination, two
One when the Shift key is pressed, with the
A further notification, with