#hs.hid

HID interface for Hammerspoon, controls and queries caps lock state

Portions sourced from (https://discussions.apple.com/thread/7094207).


#Submodules


#API Overview

Functions - API calls offered directly by the extension


#API Documentation

#Functions

Signaturehs.hid.capslock.get() -> bool
TypeFunction
DescriptionChecks the state of the caps lock via HID
Parameters
  • None
Returns
  • true if on, false if off
NotesNone
ExamplesNone
Sourceextensions/hid/hid.lua line 16

Signaturehs.hid.capslock.set(state) -> bool
TypeFunction
DescriptionAssigns capslock to the desired state
Parameters
  • state - A boolean indicating desired state
Returns
  • true if on, false if off
NotesNone
ExamplesNone
Sourceextensions/hid/hid.lua line 42

Signaturehs.hid.capslock.toggle() -> bool
TypeFunction
DescriptionToggles the state of caps lock via HID
Parameters
  • None
Returns
  • true if on, false if off
NotesNone
ExamplesNone
Sourceextensions/hid/hid.lua line 29