Refused to execute script from 'https://rawgithub.com/dmauro/Keypress/master/keypress.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
EDIT: It's because Keypress is using rawgit.com instead of cdn.rawgit.com to host the actual keypress.js script.
To be more precise: by looking at the response in Firebug's Net panel I see
<h1>Blacklisted for abuse</h1>
<p>
This request has been blacklisted for sending too much traffic to <code>rawgit.com</code>. Please contact the owner of the site that sent you here and ask them to use <code>cdn.rawgit.com</code> instead, which has no traffic limit.
</p>
Nevertheless I wonder if this will work when Firefox's search as you type is enabled. I guess the browser should eat up all those events, but maybe I'm wrong. Can't check it because of the blacklisted script and no time to write my own test now.
A big problem I experience is the lack of web-safe keyboard shortcuts for complex web-apps. If looking for a safe key-combination, you have to consider the superset of OS and Browser combinations and that leaves almost nothing.
The gmail approach is for unmodified keys but that only works if you don't have focus in an editable field. The gdocs approach is for menu chords but that sucks for frequent actions and still generates weird dual handling of events by the browser.
I'd love a web/browser standards committee to preserve the universal utility of the keyboard. It could ring-fence some application specific shortcuts, give a semantic abstraction of some actions e.g. undo, and standardise mechanisms for os specific remappings.
As it is, as more tech comes along, the less usable keyboards become. I am still dumbfounded that the iPad lacks a tab button or any chord for one despite claiming to be usable for word-processing. This basically means no web-app can ever assume a keyboard has a tab key. Gah.
16 comments
[ 2.7 ms ] story [ 48.6 ms ] thread"Are reposts ok?
If a story has had significant attention in the last year or so, we kill reposts as duplicates. If not, a small number of reposts is ok."
As with much of the HN system, that's intentionally vague, but in my interpretation, reposts can occur more frequently than once per year.
[1] https://news.ycombinator.com/newsfaq.html
Details here - http://rawgit.com/dmauro/Keypress/master/keypress.js
Working script source - http://cdn.rawgit.com/dmauro/Keypress/master/keypress.js
<h1>Blacklisted for abuse</h1>
<p> This request has been blacklisted for sending too much traffic to <code>rawgit.com</code>. Please contact the owner of the site that sent you here and ask them to use <code>cdn.rawgit.com</code> instead, which has no traffic limit. </p>
Nevertheless I wonder if this will work when Firefox's search as you type is enabled. I guess the browser should eat up all those events, but maybe I'm wrong. Can't check it because of the blacklisted script and no time to write my own test now.
https://github.com/madrobby/keymaster does an OK job with this, and too bad it's not being actively maintained.
The gmail approach is for unmodified keys but that only works if you don't have focus in an editable field. The gdocs approach is for menu chords but that sucks for frequent actions and still generates weird dual handling of events by the browser.
I'd love a web/browser standards committee to preserve the universal utility of the keyboard. It could ring-fence some application specific shortcuts, give a semantic abstraction of some actions e.g. undo, and standardise mechanisms for os specific remappings.
As it is, as more tech comes along, the less usable keyboards become. I am still dumbfounded that the iPad lacks a tab button or any chord for one despite claiming to be usable for word-processing. This basically means no web-app can ever assume a keyboard has a tab key. Gah.
Also, coming from Windows/Linux world, I was surprised how many physical keys are missing on a Mac keyboard.
https://github.com/danprince/keystate
I've used it successfully in Marionette and Angular applications.
It is 29k unminified, vs 35k of keypress.js.
Also, it has a better name. ;)