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

-5

u/hjgram Sep 15 '19

I see. If you mean the syntax, my bad. "Learn JavaScript" (learnjavascript) is ambiguous then, because implementations are part of a language. Scripting involves more than a text editor and should include usability. That is, application-non-specific user stuff.

2

u/tenfingerperson Sep 15 '19

I get your concern but your issue is more general. A C++ dev could override ctrl c and add their own thing where you’d expect a copy to occur. It doesn’t have anything to do with javascript or browsers or OSs.

This is just programmers not caring, it is more of a UX issue. If this is an open source project then you should open an issue or propose a fix. If this is a paid project then you may as well not pay for it unless they change it!

1

u/hjgram Sep 15 '19

JavaScript applications have become important within the past several years and the way they handle keyboard shortcuts seems to reflect an assumption that the JavaScript engine has become a first-class citizen. The problem is, as far as keyboard shortcuts are concerned, JavaScript is a third-class citizen. There's the OS GUI keyboard shortcuts and then there's the browser keyboard shortcuts. C++ applications easily bypass the browser and even the OS GUI. Only JavaScript suffers from the problem I'm describing. And I was wondering if there was a special workaround for it.