summaryrefslogtreecommitdiff
path: root/keyboards/gmmk/pro
diff options
context:
space:
mode:
authorQMK Bot <hello@qmk.fm>2021-09-28 19:24:40 +0000
committerQMK Bot <hello@qmk.fm>2021-09-28 19:24:40 +0000
commitbc41d37bafefc098d36eabafdc8f4c23af188c34 (patch)
treebf08da39937c9cd1f0d018c2c7c87fda521f9bc4 /keyboards/gmmk/pro
parentf89620d7af11f4f7e155ae7f015281d2526bbe46 (diff)
parent705cd433c22aad00b12183eaa3bada50d90fd97b (diff)
Merge remote-tracking branch 'origin/master' into develop
Diffstat (limited to 'keyboards/gmmk/pro')
-rw-r--r--keyboards/gmmk/pro/ansi/keymaps/jonavin/keymap.c37
-rw-r--r--keyboards/gmmk/pro/ansi/keymaps/jonavin/readme.md1
-rw-r--r--keyboards/gmmk/pro/ansi/keymaps/jonavin/rules.mk2
3 files changed, 39 insertions, 1 deletions
diff --git a/keyboards/gmmk/pro/ansi/keymaps/jonavin/keymap.c b/keyboards/gmmk/pro/ansi/keymaps/jonavin/keymap.c
index 20a786feb7..f37abfac30 100644
--- a/keyboards/gmmk/pro/ansi/keymaps/jonavin/keymap.c
+++ b/keyboards/gmmk/pro/ansi/keymaps/jonavin/keymap.c
@@ -78,6 +78,43 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
#endif // COLEMAK_LAYER_ENABLE
};
+#if defined(ENCODER_ENABLE) && !defined(ENCODER_DEFAULTACTIONS_ENABLE) // Encoder Functionality when not using userspace defaults
+ void encoder_action_rgbhue(bool clockwise) {
+ if (clockwise)
+ rgblight_increase_hue_noeeprom();
+ else
+ rgblight_decrease_hue_noeeprom();
+ }
+
+ bool encoder_update_user(uint8_t index, bool clockwise) {
+ uint8_t mods_state = get_mods();
+ if (mods_state & MOD_BIT(KC_LSFT) ) { // If you are holding L shift, encoder changes layers
+ encoder_action_layerchange(clockwise);
+ } else if (mods_state & MOD_BIT(KC_RSFT) ) { // If you are holding R shift, Page up/dn
+ unregister_mods(MOD_BIT(KC_RSFT));
+ encoder_action_navpage(clockwise);
+ register_mods(MOD_BIT(KC_RSFT));
+ } else if (mods_state & MOD_BIT(KC_LCTL)) { // if holding Left Ctrl, navigate next/prev word
+ encoder_action_navword(clockwise);
+ } else if (mods_state & MOD_BIT(KC_RCTL)) { // if holding Right Ctrl, change rgb hue/colour
+ encoder_action_rgbhue(clockwise);
+ } else if (mods_state & MOD_BIT(KC_LALT)) { // if holding Left Alt, change media next/prev track
+ encoder_action_mediatrack(clockwise);
+ } else {
+ switch(get_highest_layer(layer_state)) {
+ case _FN1:
+ #ifdef IDLE_TIMEOUT_ENABLE
+ timeout_update_threshold(clockwise);
+ #endif
+ break;
+ default:
+ encoder_action_volume(clockwise); // Otherwise it just changes volume
+ break;
+ }
+ }
+ return true;
+ }
+#endif // ENCODER_ENABLE && !ENCODER_DEFAULTACTIONS_ENABLE
#ifdef RGB_MATRIX_ENABLE
// Capslock, Scroll lock and Numlock indicator on Left side lights.
diff --git a/keyboards/gmmk/pro/ansi/keymaps/jonavin/readme.md b/keyboards/gmmk/pro/ansi/keymaps/jonavin/readme.md
index a6482baa56..2aa910e0c7 100644
--- a/keyboards/gmmk/pro/ansi/keymaps/jonavin/readme.md
+++ b/keyboards/gmmk/pro/ansi/keymaps/jonavin/readme.md
@@ -12,6 +12,7 @@
- holding Left shift, change layers
- holding right shift, Navigate page up/down
- holding Left Ctrl, navigate prev/next word
+ - holding Right Ctrl, changes RGB hue/colour
- holding Left Alt, change media prev/next track
- default is change volume
diff --git a/keyboards/gmmk/pro/ansi/keymaps/jonavin/rules.mk b/keyboards/gmmk/pro/ansi/keymaps/jonavin/rules.mk
index b06ae1b6ad..81b84eea7f 100644
--- a/keyboards/gmmk/pro/ansi/keymaps/jonavin/rules.mk
+++ b/keyboards/gmmk/pro/ansi/keymaps/jonavin/rules.mk
@@ -6,6 +6,6 @@ BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite
TD_LSFT_CAPSLOCK_ENABLE = yes
IDLE_TIMEOUT_ENABLE = yes
STARTUP_NUMLOCK_ON = yes
-ENCODER_DEFAULTACTIONS_ENABLE = yes
+ENCODER_DEFAULTACTIONS_ENABLE = no
COLEMAK_LAYER_ENABLE = yes #Enable Colemak layer / set to no to disable