implement keyboard lock status reader API
This commit is contained in:
@@ -9,6 +9,7 @@ extensions are
|
||||
|
||||
- [International](international.md): Adds international keycodes
|
||||
- [LED](led.md): Adds backlight support. This is for monocolor backlight, not RGB
|
||||
- [LockStatus](lock_status.md): Exposes host-side locks like caps or num lock.
|
||||
- [MediaKeys](media_keys.md): Adds support for media keys such as volume
|
||||
- [RGB](rgb.md): RGB lighting for underglow. Will work on most matrix RGB as will
|
||||
be treated the same as underglow.
|
||||
|
23
docs/lock_status.md
Normal file
23
docs/lock_status.md
Normal file
@@ -0,0 +1,23 @@
|
||||
# Lock Status
|
||||
This extension exposes host-side locks like caps or num lock.
|
||||
|
||||
## Enabling the extension
|
||||
```python
|
||||
from kmk.extensions.lock_status import LockStatus
|
||||
|
||||
locks = LockStatus()
|
||||
keyboard.extensions.append(locks)
|
||||
|
||||
```
|
||||
|
||||
## Read Lock Status
|
||||
Lock states can be retrieved with getter methods and are truth valued -- `True`
|
||||
when the lock is enabled and `False` otherwise.
|
||||
|
||||
|Method |Description |
|
||||
|--------------------------|------------|
|
||||
|`locks.get_caps_lock() ` |Num Lock |
|
||||
|`locks.get_caps_lock() ` |Caps Lock |
|
||||
|`locks.get_scroll_lock() `|Scroll Lock |
|
||||
|`locks.get_compose() ` |Compose |
|
||||
|`locks.get_kana() ` |Kana |
|
Reference in New Issue
Block a user