/hammerspoon-config

My Hammerspoon configuration files.

Primary LanguageLuaMIT LicenseMIT

My Hammerspoon Settings

My Hammerspoon configuration file sets up the following rules. See my init.lua file for more details.

When the left command key is pressed, the following keys get remapped so that they can be used for navigation:

  • iup
  • kdown
  • jleft
  • lright
  • ualt + left (left one word)
  • oalt + right (right one word)
  • hcmd + left (beginning of line)
  • ; or 'cmd + right (end of line)

Note: If you are trying to map from one key to that same key with a different modifier (e.g. rightCmd+a -> ctrl+a), the default method I use in my code to setup the above mappings won't work, but you can use the workaround mentioned here: elliotwaite#1

The following hotkeys are enabled when my external keyboard is not connected:

  • `escape
  • cmd + ` `

Global hotkeys:

  • cmd + escape → Activate Google Chrome and open a new tab. (Note: I have my caps lock key remapped to escape in System Preferences > Keyboard > Modifier Keys, so for me, this hotkey is really activated by cmd + caps lock)

Remapped Chrome hotkeys:

  • cmd + 1alt + cmd + i (Toggle the developer tools)
  • cmd + 4cmd + ctrl + f (Toggle full screen mode)

Remapped Davinci Resolve events:

  • cmd + scrollalt + scroll (so that I can use cmd + scroll to zoom in an out of the timeline)

I swap my middle and right mouse button events (I use an Evoluent vertical mouse, and the Evoluent mouse driver is currently broken in Big Sur, so I use Hammerspoon to remap the buttons instead):

  • rightMouseDownmiddleMouseDown
  • rightMouseUpmiddleMouseUp
  • rightMouseDraggedmiddleMouseDragged
  • middleMouseDownrightMouseDown
  • middleMouseUprightMouseUp
  • middleMouseDraggedrightMouseDragged

My YouTube Video about Hammerspoon: https://youtu.be/wpVNm8Ub-1s

License

MIT