Trying to implement a shortcut key combination for Command+S to save a form.
I've read this - https://angular.io/guide/user-input, but it does not say anything about meta or command.
Tried surrounding the form with:
<div
(keyup.command.s)="save()"
(keyup.command.u)="save()"
(keyup.control.u)="save()"
(keyup.control.s)="save()"
(keyup.meta.u)="save()"
>
Of those, only control.u and control.s worked.
With all the power and cross-browser capabilities of Angular 2+, I was hoping that this is somehow handled in an elegant way, using (keyup...).
And for sure many Angular Devs use Macs :).
I've also read How does one capture a Mac's command key via JavaScript? and http://unixpapa.com/js/key.html but still hoping for Angular elegant solution instead of fighting with browser-specific stuff...