Add double-shift behavior

Created by lee-dohm
Last updated about 4 years ago
keyPressed = false;

atom.keymaps.addKeystrokeResolver ({event}) ->
  if event.key == "Shift" && event.type == "keydown"
    if keyPressed
      keyPressed = false;
      return 'shift-double';
      keyPressed = true;
      setTimeout (-> keyPressed = false), 200;
      return null;

Adding this to your should allow you to use shift-double in keymaps to execute commands by double-tapping either shift key.

Credit goes to @spaceribs for the code: