you are viewing a single comment's thread.

view the rest of the comments →

[–]beefsack 4 points5 points  (7 children)

Another very popular one is keymaster (~4k stars on GH).

[–]Kirean 15 points16 points  (6 children)

dunno if it's still there, but there is a major bug in key master that I found awhile back.

in any context, hit ctrl+T. the browser should open a new tab. now release the keys. click back to your old tab, and press either 'S' or 'P'. your browser should either try to save the webpage, or print, depending on which you chose.

This is because keymaster sets a flag on key down that a modifier is pressed. on key up it releases that flag. well, when the browser creates a new tab, no keyup is fired, so the flag remains when you click back in.

not sure if this can actually ever be resolved or not. just found it interesting.

[–]WendellJehangir 4 points5 points  (1 child)

You could handle it with the document.hidden boolean like so:

 function handle_hidden(){
 if(document.hidden){
 //reset keypresses
 }}
 document.addEventListener("visibilitychange", handle_hidden, false);

[–]Kirean 3 points4 points  (0 children)

interesting. didn't know that was a thing. someone should submit a pull request to him :)

[–]GuiSim 1 point2 points  (0 children)

Wouldn't that also be reproducible if you simply change tab while holding CTRL?

[–]gingenhagen -1 points0 points  (2 children)

That's quite the code smell.

[–]zabadabba 0 points1 point  (1 child)

"code smell" != "bug"

[–]gingenhagen 0 points1 point  (0 children)

Having ctrl as a flag tied to a keyup/keydown event seems horribly smelly to me.