Skip to content
This repository has been archived by the owner on Jun 9, 2023. It is now read-only.

Latest commit

 

History

History
44 lines (34 loc) · 2.5 KB

hs.hid.md

File metadata and controls

44 lines (34 loc) · 2.5 KB

docs » 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
  • get
  • set
  • toggle

API Documentation

Functions

Signature hs.hid.capslock.get() -> bool
Type Function
Description Checks the state of the caps lock via HID
Parameters
  • None
Returns
  • true if on, false if off
Signature hs.hid.capslock.set(state) -> bool
Type Function
Description Assigns capslock to the desired state
Parameters
  • state - A boolean indicating desired state
Returns
  • true if on, false if off
Signature hs.hid.capslock.toggle() -> bool
Type Function
Description Toggles the state of caps lock via HID
Parameters
  • None
Returns
  • true if on, false if off