Instantly share code, notes, and snippets.

Embed
What would you like to do?
Get double-shift behavior in Atom
keyPressed = false;
atom.keymaps.addKeystrokeResolver ({event}) ->
if event.key == "Shift" && event.type == "keydown"
if keyPressed
keyPressed = false;
console.log('keyPressed');
return 'shift-double';
else
keyPressed = true;
setTimeout (-> keyPressed = false), 200;
return null;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment