Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use function keys? #121

Open
lunanigra opened this issue Dec 5, 2019 · 1 comment
Open

How to use function keys? #121

lunanigra opened this issue Dec 5, 2019 · 1 comment

Comments

@lunanigra
Copy link

Hello, does your Hotkeys service also support function keys or control keys (e.g. F1, F2, ..., F8)?

Would be cool if you can add an example to your documentation.

Thanks!

@vishalisakar
Copy link

vishalisakar commented Nov 24, 2020

@lunanigra yes Hotkeys service works perfectly for function keys and control keys.

 this._hotkeysService.add(new Hotkey(
      ['f1',"f2", "f3", "f4", "f5", "f6", "f7", "f8", "f9", "f10", "f11" ,"f12", "ctrl" ] ,(event: KeyboardEvent): boolean => {
      console.log('Typed hotkey',event );
      return false; // Prevent bubbling
  }));

you have to give lowercase in the hotKey parameter string for all keycode. This works fine form me. I hope it will be help full for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants