add at least some kind of documentation

This commit is contained in:
xs5871 2022-02-07 18:39:31 +00:00 committed by Kyle Brown
parent 1c6b25517a
commit 481c69b212
2 changed files with 17 additions and 1 deletions

View File

@ -7,7 +7,7 @@ from kmk.modules.layers import Layers
keyboard.modules.append(Layers())
```
## Keycodes
## Keycodes
|Key |Description |
|-----------------|------------------------------------------------------------------------|
@ -19,3 +19,6 @@ keyboard.modules.append(Layers())
|`KC.TO(layer)` |Activates layer and deactivates all other layers |
|`KC.TT(layer)` |Momentarily activates layer if held, toggles it if tapped repeatedly |
## Custom HoldTap Behavior
`KC.TT` and `KC.LT` use the same heuristic to determine taps and holds as
ModTap. Check out the [ModTap doc](modtap.md) to find out more.

View File

@ -28,4 +28,17 @@ keyboard.modules.append(modtap)
|MEH = KC.MT(KC.SOMETHING, KC.LCTRL(KC.LSFT(KC.LALT))) |`CTRL` and `LSHIFT` and `LALT` if held `kc` if tapped |
|HYPR = KC.MT(KC.SOMETHING, KC.HYPR) |`LCTRL` and `LSHIFT` and `LALT` and `LGUI` if held `kc` if tapped|
## Custom HoldTap Behavior
The full ModTap signature is as follows:
```python
KC.MT(KC.TAP, KC.HOLD, prefer_hold=True, tap_interrupted=False, tap_time=None)
```
* `prefer_hold`: decides which keycode the ModTap key resolves to when another
key is pressed before the timeout finishes. When `True` the hold keycode is
choosen, the tap keycode when `False`.
* `tap_interrupted`: decides if the timeout will interrupt at the first other
key press/down, or after the first other key up/release. Set to `True` for
interrupt on release.
* `tap_time`: length of the tap timeout in milliseconds.
Each of these parameters can be set for every ModTap key individually.