docs » ModalMgr

Modal keybindings environment management. Just an wrapper of hs.hotkey.modal.

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

API Overview

API Documentation

Methods

activate
Signature ModalMgr:activate(idList, [trayColor], [showKeys])
Type Method
Description

Activate all modal environment in idList.

Parameters
  • idList - An table specifying IDs of modal environments
  • trayColor - An optional string (e.g. #000000) specifying the color of modalTray, defaults to nil.
  • showKeys - A optional boolean value to show all available keybindings, defaults to nil.
Returns
Source Source/ModalMgr.spoon/init.lua line 174
deactivate
Signature ModalMgr:deactivate(idList)
Type Method
Description

Deactivate modal environments in idList.

Parameters
  • idList - An table specifying IDs of modal environments
Returns
Source Source/ModalMgr.spoon/init.lua line 205
deactivateAll
Signature ModalMgr:deactivateAll()
Type Method
Description

Deactivate all active modal environments.

Parameters
  • None
Returns
Source Source/ModalMgr.spoon/init.lua line 224
new
Signature ModalMgr:new(id)
Type Method
Description

Create a new modal keybindings environment

Parameters
  • id - A string specifying ID of new modal keybindings
Returns
Source Source/ModalMgr.spoon/init.lua line 57
toggleCheatsheet
Signature ModalMgr:toggleCheatsheet([idList], [force])
Type Method
Description

Toggle the cheatsheet display of current modal environments's keybindings.

Parameters
  • iterList - An table specifying IDs of modal environments or active_list. Optional, defaults to all active environments.
  • force - A optional boolean value to force show cheatsheet, defaults to nil (automatically).
Returns
Source Source/ModalMgr.spoon/init.lua line 126