Phoenix binds to a key press, ignoring the modifiers I pass, meaning pressing the key on its own (such as when trying to type this message) triggers my callback.
I'm using the following code:
Key.on('p', ['command', 'control'], function () {
Phoenix.notify('Hello there!');
});
Edit:
This code also behaves the same as above, binding to just the p alone:
let keyHandler = new Key('p', ['command', 'control'], function () {
Phoenix.notify('Hello there!');
});
I've worked it out at last, but there's nothing in Console.app to tell me what's going wrong, and the docs are unclear, stating:
Modifiers: command (cmd), option (alt), control (ctrl) and shift (case insensitive)
I read this to mean both command and cmd are valid, when it appears that onlycmd is valid. I would expect invalid modifiers to throw an error, or for Phoenix to accept both command and cmd as modifiers.
Phoenix binds to a key press, ignoring the modifiers I pass, meaning pressing the key on its own (such as when trying to type this message) triggers my callback.
I'm using the following code:
Edit: This code also behaves the same as above, binding to just the
p
alone:I've worked it out at last, but there's nothing in
Console.app
to tell me what's going wrong, and the docs are unclear, stating:I read this to mean both
command
andcmd
are valid, when it appears that onlycmd
is valid. I would expect invalid modifiers to throw an error, or for Phoenix to accept bothcommand
andcmd
as modifiers.