jaywcjlove / hotkeys-js

➷ A robust Javascript library for capturing keyboard input. It has no dependencies.
https://jaywcjlove.github.io/hotkeys-js
MIT License
6.57k stars 405 forks source link

Unable to capture `?` #484

Open pedrolamas opened 3 months ago

pedrolamas commented 3 months ago

First of all, thank you for your work on this library!

I have been trying to capture when the user enters ?, but that does not seem to work...

For my own keyboard layout, I know I could use Shift+/, but that will not match other layouts.

I know that it I capture '*' then I can use event.key === '?' and that does work, but seems to defeat the purpose of this library!

pedrolamas commented 3 months ago

Another example is for capturing # key.

The different keyboard layouts seem to cause an issue with this:

image

For US layout, it can be done with Shift+3, but in the UK layout it is just #

How do we go ahead and use this library for these cases?