summaryrefslogtreecommitdiffstats
path: root/users/ericgebhart/defs/encoders.def
diff options
context:
space:
mode:
authorEric Gebhart <e.a.gebhart@gmail.com>2022-11-12 00:09:41 +0100
committerGitHub <noreply@github.com>2022-11-11 23:09:41 +0000
commit050472a4d07d07c1d9ae17d2fd26d44e9d95d950 (patch)
tree8c326011ec8cac395a92839ec4b420bf12652fa1 /users/ericgebhart/defs/encoders.def
parent49a78b81145213e2883e6c3beab6d9c136c10085 (diff)
Eric Gebhart user space and keymaps (#17487)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Diffstat (limited to 'users/ericgebhart/defs/encoders.def')
-rw-r--r--users/ericgebhart/defs/encoders.def65
1 files changed, 65 insertions, 0 deletions
diff --git a/users/ericgebhart/defs/encoders.def b/users/ericgebhart/defs/encoders.def
new file mode 100644
index 0000000000..638d3fbf4b
--- /dev/null
+++ b/users/ericgebhart/defs/encoders.def
@@ -0,0 +1,65 @@
+// Layer/none, encoder index 0/1, CW_KC, CCW_KC, Qualifying mod or none
+// LAYER_NONE and MOD_NONE for a single use.
+// LEFT and RIGHT for index. 0 and 1...
+
+// default encoders, all layers no mods.
+ENCODER_ACTION(LAYER_NONE, RIGHT, KC_PGDN, KC_PGUP, MOD_NONE)
+ENCODER_ACTION(LAYER_NONE, LEFT, KC_DOWN, KC_UP, MOD_NONE)
+ENCODER_ACTION(LAYER_NONE, LEFT, KC_PGDN, KC_PGUP, MOD_LSFT)
+
+// Symbol layer encoders.
+// left and right.
+ENCODER_ACTION(_SYMB_EN, LEFT, KC_LEFT, KC_RIGHT, MOD_NONE)
+// word left or right.
+ENCODER_ACTION(_SYMB_EN, LEFT, LCTL(KC_LEFT), LCTL(KC_RIGHT), MOD_NONE)
+
+// Nav layer encoders.
+ENCODER_ACTION(_NAV, LEFT, KC_TAB, S(KC_TAB), MOD_NONE)
+ENCODER_ACTION(_NAV, RIGHT, A(KC_TAB), A(S(KC_TAB)), MOD_NONE)
+ENCODER_ACTION(_NAV, RIGHT, KC_VOLU, KC_VOLD, MOD_NONE)
+
+// RGB functions for the RGB layer.
+#ifdef RGB_MATRIX_ENABLE
+ ENCODER_FUNCTION(_RGB, LEFT,
+ rgb_matrix_increase_speed_noeeprom,
+ rgb_matrix_decrease_speed_noeeprom, MOD_NONE)
+
+ ENCODER_FUNCTION(_RGB, RIGHT,
+ rgb_matrix_increase_hue_noeeprom,
+ rgb_matrix_decrease_hue_noeeprom, MOD_NONE)
+
+ ENCODER_FUNCTION(_RGB, LEFT,
+ rgb_matrix_increase_sat_noeeprom,
+ rgb_matrix_decrease_sat_noeeprom, MOD_LSFT)
+
+ ENCODER_FUNCTION(_RGB, RIGHT,
+ rgb_matrix_increase_val_noeeprom,
+ rgb_matrix_decrease_val_noeeprom, MOD_LSFT)
+
+ ENCODER_FUNCTION(_RGB, LEFT,
+ rgb_matrix_step_noeeprom;
+ rgb_matrix_step_reverse_noeeprom, MOD_LCTL)
+
+#elif defined(RGBLIGHT_ENABLE)
+
+ ENCODER_FUNCTION(_RGB, LEFT,
+ rgblight_increase_speed_noeeprom,
+ rgblight_decrease_speed_noeeprom, MOD_NONE)
+
+ ENCODER_FUNCTION(_RGB, RIGHT,
+ rgblight_increase_hue_noeeprom,
+ rgblight_decrease_hue_noeeprom, MOD_NONE)
+
+ ENCODER_FUNCTION(_RGB, LEFT,
+ rgblight_increase_sat_noeeprom,
+ rgblight_decrease_sat_noeeprom, MOD_LSFT)
+
+ ENCODER_FUNCTION(_RGB, RIGHT,
+ rgblight_increase_val_noeeprom,
+ rgblight_decrease_val_noeeprom, MOD_LSFT)
+
+
+ ENCODER_FUNCTION(_RGB, LEFT,
+ rgblight_step_noeeprom,
+ rgblight_step_reverse_noeeprom, MOD_LCTL)
+ #endif // RGB_MATRIX_ENABLE || RGBLIGHT_ENABLE