Only with the power of JavaScript's boolean operators XD The Actions & Inputs system is device-agnostic and doesn't include additional logic for keyboard modifiers.
I would create a new action called CtrlModifier
. Then, in the code, I would detect key combinations like this:
if (ct.actions.CtrlModifier.down && ct.actions.Select.pressed) {
selectAll();
}
The trick is looking for down
state for the modifier but looking only for pressed
state for the main key. This assumes that you don't need to listen for cases when someone holds A firstly and then presses Ctrl. But if you do, you would add an additional clause like the following:
if ((ct.actions.CtrlModifier.down && ct.actions.Select.pressed) ||
(ct.actions.CtrlModifier.pressed && ct.actions.Select.down)
) {
selectAll();
}