From 5654cb54b0e32dccc53de027e204d11051fab3c1 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Wed, 30 Dec 2020 10:08:27 -0600 Subject: [PATCH] Enable mousekeys --- iris/src/keymap.c | 27 ++++++++++++++++++--------- iris/src/rules.mk | 2 ++ 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/iris/src/keymap.c b/iris/src/keymap.c index c6f968e..8979419 100644 --- a/iris/src/keymap.c +++ b/iris/src/keymap.c @@ -20,6 +20,7 @@ enum custom_keycodes { RIGHT, ADJUST, CONFIG, + PADJUST, }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -96,13 +97,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_ADJUST] = LAYOUT( //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_ACL0, KC_ACL1, KC_ACL2, _______, _______, _______, _______, _______, _______, _______, _______, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ - _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MPLY, KC_VOLU, KC_MNXT, _______, + _______, KC_BTN1, KC_MS_U, KC_BTN2, KC_WH_U, _______, KC_MPRV, KC_VOLD, KC_MPLY, KC_VOLU, KC_MNXT, _______, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ - _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, + _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, _______, + PADJUST, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, _______, //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ _______, _______, _______, _______, _______, _______ // └────────┴────────┴────────┘ └────────┴────────┴────────┘ @@ -110,15 +111,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_CONFIG] = LAYOUT( //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ - RESET, _______, _______, _______, _______, RGB_TOG, _______, _______, _______, _______, _______, _______, + RESET, _______, _______, _______, _______, RGB_TOG, _______, _______, _______, _______, _______, RESET, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ - _______, _______, _______, _______, _______, RGB_MOD, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, KC_MPRV, _______, + _______, _______, _______, _______, _______, RGB_MOD, _______, _______, _______, _______, _______, _______, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ - _______, _______, _______, RGB_HUI, RGB_SAI, RGB_VAI, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, + _______, _______, _______, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - _______, _______, _______, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, _______, + _______, _______, _______, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ - _______, QWERTY, RGB_TOG, _______, GAMER, RETRO_GAMER + _______, QWERTY, RGB_TOG, _______, GAMER, RETRO_GAMER // └────────┴────────┴────────┘ └────────┴────────┴────────┘ ) }; @@ -177,6 +178,14 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; + case PADJUST: + rgblight_enable_noeeprom(); + rgblight_sethsv_noeeprom(HSV_GREEN); + if (record->event.pressed) { + set_single_persistent_default_layer(_ADJUST); + } + return false; + break; } return true; } diff --git a/iris/src/rules.mk b/iris/src/rules.mk index d746341..76ef86e 100644 --- a/iris/src/rules.mk +++ b/iris/src/rules.mk @@ -1,2 +1,4 @@ RGBLIGHT_ENABLE = yes BACKLIGHT_ENABLE = yes +MOUSEKEY_ENABLE = yes +CONSOLE_ENABLE = no