docs » InputSourceSwitch

Automatically switch the input source when switching applications.

Example:

hs.loadSpoon("InputSourceSwitch")

spoon.InputSourceSwitch:setApplications({
    ["WeChat"] = "Pinyin - Simplified",
    ["Mail"] = "ABC"
})

spoon.InputSourceSwitch:start()

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

API Overview

API Documentation

Variables

applicationMap
Signature InputSourceSwitch.applicationMap
Type Variable
Description

Mapping the application name to the input source

Source Source/InputSourceSwitch.spoon/init.lua line 75

Methods

setApplications
Signature InputSourceSwitch:setApplications()
Type Method
Description

Set that mapping the application name to the input source

Parameters
  • applications - A table containing that mapping the application name to the input source key is the application name and value is the input source name example: { ["WeChat"] = "Pinyin - Simplified", ["Mail"] = "ABC" }
Returns
Source Source/InputSourceSwitch.spoon/init.lua line 80
start
Signature InputSourceSwitch:start()
Type Method
Description

Start InputSourceSwitch

Parameters
  • None
Returns
Source Source/InputSourceSwitch.spoon/init.lua line 100