question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Combo alt + number doesn't work

See original GitHub issue

Hello everybody, I have a hotkey that combined from ‘alt’ key and a number (from 0 - 5) key. But it doesn’t work. My code here:

private filterHotkey = new Hotkey(['alt+1', 'alt+2', 'alt+3', 'alt+4', 'alt+5', 'alt+0'], function (event: KeyboardEvent): boolean {
	console.log(event.key);
}.bind(this));

I just changed ‘alt’ key to ‘ctrl’ key, it works normally. But I think that will be perfect if we can work with both ‘alt’ and ‘ctrl’. Do you have any idea?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
omridevkcommented, May 22, 2019

though it seems the base implementation here uses Mousetrap behind the scene, and I do not think Mousetrap supports key combination such as “a + b”, it does support sequences though.

1reaction
omridevkcommented, May 22, 2019

@jnfaerch

I wouldn’t call it “deliberate” per se, it just a scenario we have yet decided to support, as it require some breaking changes in core code of the library (ng-keyboard-shortcuts), however. it is in my roadmap, and should be added in the future. As for this library, I cannot provide any further insight in regards to their decision.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix ALT Codes not Working on Windows 10 - Appuals
What is causing ALT Codes to stop working on Windows 10? · Method 1: Enabling Mouse Keys when Numlock is ON · Method...
Read more >
ALT Codes Not Working - Microsoft Community
I seem to have a unique predicament, as my alt codes partially work, but only up to 9. If i type alt+23 or...
Read more >
How to Fix ALT Codes not Working in Windows 10
Special Char registry is corrupted – In rare cases, this issue can also be caused by inconsistency with the register that keeps track...
Read more >
How to Fix the Alt-Tab Keyboard Shortcut Not Working on ...
In most cases, driver issues contribute significantly to not supporting specific keyboard shortcuts, and Alt-Tab may be one of them. Thus, it's ...
Read more >
ALT+NUMPAD ASCII Key Combos: The α and Ω of Creating ...
Second, make sure NUM LOCK is on. It does not have to be on in all cases for these key combos to work,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found