docs » ForceTouchMapper

Maps force touch clicks in specified apps to a hot key

Example use: spoon.SpoonInstall:andUse("ForceTouchMapper", { config = {apps = {["com.microsoft.VSCode"] = {keyStroke = {{"cmd"}, 'y'}}}} }) which will invoke cmd+y keystroke when you force click some definition in VS Code.

I have this key binding in VS Code for peek definition

{ "key": "cmd+y", "command": "editor.action.peekDefinition", "when": "editorHasDefinitionProvider && editorTextFocus && !inReferenceSearchEditor && !isInEmbeddedEditor" } ,

Download: https://github.com/Hammerspoon/Spoons/raw/master/Spoons/ForceTouchMapper.spoon.zip

API Overview

API Documentation

Variables

apps
Signature ForceTouchMapper.apps
Type Variable
Description

Table of bundle ids of apps in which you want to map forcetouch to keyStroke

Source Source/ForceTouchMapper.spoon/init.lua

Methods

start
Signature ForceTouchMapper:start()
Type Method
Description

Start ForceTouchMapper

Parameters:

  • None
Source Source/ForceTouchMapper.spoon/init.lua