Show input method indicator in the current mouse position. It is a small but noticable dot near the cursor. It can be very useful when you are using a non-ABC input method and often needs to switch between ABC and the non-ABC input method. You can use it as follows in the init.lua: hs.loadSpoon("InputMethodIndicator") spoon.InputMethodIndicator:start(nil) note: config parameter is a table, pass nil to use the default config the default config is as follows: { ABCColor = "#62C555", -- the dot color when the input method is ABC LocalLanguageColor = "#ED6A5E", -- the dot color when the input method is not ABC mode = "nearMouse", -- the mode of the indicator showOnChangeDuration = 3, -- seconds to show the indicator when the input method is changed checkInterval = .01, -- seconds to check the input method dotSize = 6, -- the size of the dot deltaY=7, -- the distance between the dot and the center of the selection or mouse } the mode can be "nearMouse","onChange","adaptive", the default mode is "adaptive" "nearMouse" means the indicator will always show near the mouse "onChange" means the indicator will show when the input method is changed and hide after showOnChangeDuration seconds "adaptive" means the indicator will show near the textarea when typing, otherwise it will show near the mouse Note: the "adaptive" mode is not perfect, it may not work in some apps because of the limitation of the accessibility API
Signature | InputMethodIndicator:init() |
---|---|
Type | Method |
Description | init. |
Parameters |
|
Returns |
|
Source | Source/InputMethodIndicator.spoon/init.lua line 67 |
Signature | InputMethodIndicator:start(config) |
---|---|
Type | Method |
Description | Start InputMethodIndicator. |
Parameters |
|
Returns | |
Source | Source/InputMethodIndicator.spoon/init.lua line 200 |
Signature | InputMethodIndicator:stop() |
---|---|
Type | Method |
Description | Stop InputMethodIndicator. |
Parameters |
|
Returns | |
Source | Source/InputMethodIndicator.spoon/init.lua line 245 |