summaryrefslogtreecommitdiff
path: root/users/muppetjones/readme/dancelayers.md
diff options
context:
space:
mode:
authorStephen J Bush <2041619+muppetjones@users.noreply.github.com>2022-08-03 12:23:17 -0500
committerGitHub <noreply@github.com>2022-08-03 18:23:17 +0100
commitdf8a538489414b1f0c0cdcb786a76cca763ae37a (patch)
treebbe7658a309bb07267b77461f45d6d0fa8ba17c7 /users/muppetjones/readme/dancelayers.md
parent5f6cf24294c789963415f615db2fa24e46f89fa6 (diff)
Userspace: muppetjones (#1) (#13461)
* Userspace: muppetjones (#1) Add and update lily58 to work with userspace Add and update kyria keymap to work with userspace Add and update planck keymap with userspace Add etchamouse code and docs to userpace Add userspace Update mouse encoder for smoother movement. Encoder + mouse Added casemodes by andrewjrae * Rollback lily58 state reader and add missing GPL * Apply suggestions from code review Co-authored-by: Drashna Jaelre <drashna@live.com> Co-authored-by: Joel Challis <git@zvecr.com> * fix lily58 keymap * Updates to user and lily for muppetjones. Updated parameters for etchamouse for smoother mouse movement. Updated lily keymap and userspace to actually work together. * Update keyboards/lily58/keymaps/muppetjones/config.h Co-authored-by: Drashna Jaelre <drashna@live.com> * Updated keymaps and userspace * Little more cleanup. * Update keyboards/lily58/keymaps/muppetjones/rules.mk Co-authored-by: Ryan <fauxpark@gmail.com> * Rollback accidental libchibios update * Apply suggestions from code review Co-authored-by: Drashna Jaelre <drashna@live.com> * Update kyria keymap * Move kyria keymap to splitkb/kyria * Update planck keymap * Remove all changes to keyboards/lily58/lib/layer_state_reader.c * Update lily58 keymap * Recommended change * Update keymap readme * Update kyria keymap and userspace * Apply suggestions from code review Co-authored-by: Drashna Jaelre <drashna@live.com> * Renamed users/muppetjones/README.md to lc * Update keyboards/lily58/keymaps/muppetjones/config.h Co-authored-by: Drashna Jaelre <drashna@live.com> Co-authored-by: Drashna Jaelre <drashna@live.com> Co-authored-by: Joel Challis <git@zvecr.com> Co-authored-by: Ryan <fauxpark@gmail.com>
Diffstat (limited to 'users/muppetjones/readme/dancelayers.md')
-rw-r--r--users/muppetjones/readme/dancelayers.md73
1 files changed, 73 insertions, 0 deletions
diff --git a/users/muppetjones/readme/dancelayers.md b/users/muppetjones/readme/dancelayers.md
new file mode 100644
index 0000000000..85c4b7cad9
--- /dev/null
+++ b/users/muppetjones/readme/dancelayers.md
@@ -0,0 +1,73 @@
+# Tap Dance Layers
+
+This feature creates a key that changes the current layer via tap dance. By
+default, this assumes that you have the following layers defined:
+
+- `_ADJUST`
+- `_LOWER`
+- `_RAISE`
+- `_MOUSE`
+
+And sets up the following tap dance:
+
+| Count | Action | Layer |
+| ----- | ------ | --------- |
+| 1x | hold | `_ADJUST` |
+| 1x | tap | `_MOUSE` |
+| 2x | tap | `_LOWER` |
+| 3x | tap | `_RAISE` |
+| 4x | tap | `_ADJUST` |
+
+## Usage
+
+> NOTE: If you use other tap-dance functions, you may require additonal setup.
+
+1. Copy `features/dancelayers.{c,h}` into your keymap or userspace directory.
+2. Add the following to your `rules.mk`
+
+ ```
+ TAP_DANCE_ENABLE = yes
+
+ SRC += ./features/dancelayers.c
+ ```
+
+3. Add the following to your `keymap.c`:
+
+ ```
+ #ifdef TAP_DANCE_ENABLE
+ # include "features/dancelayers.h"
+ # define TD_LAYR TD(TD_LAYERS)
+ #else
+ # define TD_LAYR XXXXXXX
+ #endif
+ ```
+
+4. Add `TD_LYR` to your keymap.
+
+## Functions and Enumerations
+
+The following functions are available for use:
+
+- `cur_dance`
+
+The following tap dance enumerations are defined:
+
+- `TD_1X_HOLD`
+- `TD_1X_TAP`
+- `TD_2X_TAP`
+- `TD_3X_TAP`
+- `TD_4X_TAP`
+
+## Overriding the Defaults
+
+If you want to define different layers to tap dance actions, you'll need to
+define two additional functions in your `keymap.c`:
+
+- `td_lyr_finished`
+- `td_lyr_reset`
+
+Both of these functions are necessary and require a certain pattern for each
+layer. "Tap" actions are handled in `*_finished` while "hold" actions are
+resolved in `*_finished` and `*_reset`.
+
+See the implementation in `dancelayers.c` for an example.