Hammerspoon / Spoons

The official repository of Spoon plugins
https://www.hammerspoon.org/Spoons/
450 stars 141 forks source link

feat: add ForceTouchMapper spoon #233

Closed krystofcelba closed 3 years ago

krystofcelba commented 3 years ago

Hi, I have implemented a simple spoon for mapping force clicks in specified apps to key stroke. The motivation for that was missing support for force click actions in VS Code where it's perfect candidate for invoke a Peek Definition functionality.

Example use:

spoon.SpoonInstall:andUse("ForceTouchMapper", {
    config = {apps = {["com.microsoft.VSCode"] = {keyStroke = {{"cmd"}, 'y'}}}}
})