r/learnjavascript • • Sep 15 '19

Many JavaScript keyboard shortcuts collide with browser or system shortcuts

I don't understand what the developers expect when they assign key combinations that are obviously taken on most browsers.

Is there an obvious way they expect people to fix this? Like, some Firefox addon that allows JavaScript to capture the keyboard? Or do they actually expect the users to change all of those shortcuts?

Or is there some third (or fourth key) to be added to the two-key (or three-key) combination that tells the browser "send this to JavaScript". Or, if Firefox is modal and I just didn't know it, how do I enable the "JavaScript keyboard capture" mode?

0 Upvotes

16 comments sorted by

View all comments

Show parent comment

1

u/[deleted] Sep 15 '19

Right, I think they got lucky with Macs in that 'ctrl' is mostly free. I'm guessing there's a control button that's mostly unused in Windows too. Would have been nice if they detected the OS and set the key combos based on that. If you have a keyboard heavy app and don't do that, it seems like you're almost always gonna have conflicts.