summaryrefslogtreecommitdiffstats
path: root/keyboards/keebio/iris/keymaps
diff options
context:
space:
mode:
authorDanny <nooges@users.noreply.github.com>2022-08-11 17:04:00 -0400
committerGitHub <noreply@github.com>2022-08-11 14:04:00 -0700
commitfab6c8a0284eb84de0ab5552c5d0fb412043dd45 (patch)
treec942312d212e79da34b1962fcb6c058977262271 /keyboards/keebio/iris/keymaps
parent55f5406ac76652286121d3c1fa398fa0defb8e0d (diff)
[Keyboard] Add Iris Rev. 7 (#17967)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Diffstat (limited to 'keyboards/keebio/iris/keymaps')
-rw-r--r--keyboards/keebio/iris/keymaps/default/config.h21
-rw-r--r--keyboards/keebio/iris/keymaps/default/keymap.c20
-rw-r--r--keyboards/keebio/iris/keymaps/via/keymap.c30
-rw-r--r--keyboards/keebio/iris/keymaps/via/rules.mk1
4 files changed, 25 insertions, 47 deletions
diff --git a/keyboards/keebio/iris/keymaps/default/config.h b/keyboards/keebio/iris/keymaps/default/config.h
deleted file mode 100644
index 149a54be7f..0000000000
--- a/keyboards/keebio/iris/keymaps/default/config.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
-Copyright 2017 Danny Nguyen <danny@keeb.io>
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#pragma once
-
-// #define USE_I2C
-#define EE_HANDS
diff --git a/keyboards/keebio/iris/keymaps/default/keymap.c b/keyboards/keebio/iris/keymaps/default/keymap.c
index f1a2bf2164..7c95c6189b 100644
--- a/keyboards/keebio/iris/keymaps/default/keymap.c
+++ b/keyboards/keebio/iris/keymaps/default/keymap.c
@@ -33,7 +33,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
- QK_BOOT, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,
+ QK_BOOT, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
KC_DEL, _______, KC_LEFT, KC_RGHT, KC_UP, KC_LBRC, KC_RBRC, KC_P4, KC_P5, KC_P6, KC_PLUS, KC_PIPE,
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
@@ -111,21 +111,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
return true;
}
-
-bool encoder_update_user(uint8_t index, bool clockwise) {
- if (index == 0) {
- if (clockwise) {
- tap_code(KC_VOLU);
- } else {
- tap_code(KC_VOLD);
- }
- }
- else if (index == 1) {
- if (clockwise) {
- tap_code(KC_PGDN);
- } else {
- tap_code(KC_PGUP);
- }
- }
- return false;
-}
diff --git a/keyboards/keebio/iris/keymaps/via/keymap.c b/keyboards/keebio/iris/keymaps/via/keymap.c
index 1305a3b909..c0916cc213 100644
--- a/keyboards/keebio/iris/keymaps/via/keymap.c
+++ b/keyboards/keebio/iris/keymaps/via/keymap.c
@@ -1,11 +1,11 @@
#include QMK_KEYBOARD_H
-extern keymap_config_t keymap_config;
-
-#define _MAIN 0
-#define _FN1 1
-#define _FN2 2
-#define _FN3 3
+enum custom_layer {
+ _MAIN,
+ _FN1,
+ _FN2,
+ _FN3,
+};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
@@ -27,7 +27,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
- QK_BOOT, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,
+ QK_BOOT, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
KC_DEL, _______, KC_LEFT, KC_RGHT, KC_UP, KC_LBRC, KC_RBRC, KC_P4, KC_P5, KC_P6, KC_PLUS, KC_PIPE,
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
@@ -65,3 +65,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// └────────┴────────┴────────┘ └────────┴────────┴────────┘
)
};
+
+#ifdef ENCODER_MAP_ENABLE
+const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
+# if defined(KEYBOARD_keebio_iris_rev7)
+ [_MAIN] = { ENCODER_CCW_CW(KC_VOLU, KC_VOLD), ENCODER_CCW_CW(KC_PGUP, KC_PGDN), ENCODER_CCW_CW(KC_VOLU, KC_VOLD), ENCODER_CCW_CW(KC_PGDN, KC_PGUP) },
+ [_FN1] = { ENCODER_CCW_CW(KC_MNXT, KC_MPRV), ENCODER_CCW_CW(KC_HOME, KC_END), ENCODER_CCW_CW(KC_MNXT, KC_MPRV), ENCODER_CCW_CW(KC_HOME, KC_END) },
+ [_FN2] = { ENCODER_CCW_CW(RGB_RMOD, RGB_MOD), ENCODER_CCW_CW(RGB_HUD, RGB_HUI), ENCODER_CCW_CW(RGB_SAD, RGB_SAI), ENCODER_CCW_CW(RGB_VAD, RGB_VAI) },
+ [_FN3] = { ENCODER_CCW_CW(RGB_SPD, RGB_SPI), ENCODER_CCW_CW(KC_UP, KC_DOWN), ENCODER_CCW_CW(KC_LEFT, KC_RIGHT), ENCODER_CCW_CW(KC_UP, KC_DOWN) },
+# else
+ [_MAIN] = { ENCODER_CCW_CW(KC_PGUP, KC_PGDN), ENCODER_CCW_CW(KC_VOLU, KC_VOLD) },
+ [_FN1] = { ENCODER_CCW_CW(KC_HOME, KC_END), ENCODER_CCW_CW(KC_MNXT, KC_MPRV) },
+ [_FN2] = { ENCODER_CCW_CW(RGB_HUD, RGB_HUI), ENCODER_CCW_CW(RGB_SAD, RGB_SAI) },
+ [_FN3] = { ENCODER_CCW_CW(RGB_SPD, RGB_SPI), ENCODER_CCW_CW(RGB_VAD, RGB_VAI) },
+# endif
+};
+#endif
diff --git a/keyboards/keebio/iris/keymaps/via/rules.mk b/keyboards/keebio/iris/keymaps/via/rules.mk
index 36b7ba9cbc..1189f4ad19 100644
--- a/keyboards/keebio/iris/keymaps/via/rules.mk
+++ b/keyboards/keebio/iris/keymaps/via/rules.mk
@@ -1,2 +1,3 @@
VIA_ENABLE = yes
LTO_ENABLE = yes
+ENCODER_MAP_ENABLE = yes