ContextSearch-web-ext icon indicating copy to clipboard operation
ContextSearch-web-ext copied to clipboard

Layout agnostic keyboard shortcuts

Open sojusnik opened this issue 5 years ago • 1 comments

I've set Ctrl+Shift+L to open the sidebar, but when I switch to a Russian layout, this shortcut stops working. Is this a bug or by design?

As the default Firefox shortcuts are layout agnostic, the ones from your great add-on should be too.

sojusnik avatar Jan 28 '20 14:01 sojusnik

I think this has to do with how the shortcuts are captured and stored.

KeyboardEvent.keyCode is being depreciated so developers are moving all events to KeyboardEvent.key

MDN

If the same button outputs a different KeyboardEvent.key when you switch layouts, you'll run into problems.

There are drawbacks with both .key and .keyCode. I'm just trying to stay compliant with the standards.

ssborbis avatar Jan 28 '20 15:01 ssborbis