diff options
Diffstat (limited to 'keyboards/iris')
-rw-r--r-- | keyboards/iris/info.json | 2 | ||||
-rw-r--r-- | keyboards/iris/keymaps/drashna/rules.mk | 2 | ||||
-rw-r--r-- | keyboards/iris/keymaps/hag/keymap.c | 2 | ||||
-rw-r--r-- | keyboards/iris/keymaps/swedish/keymap.c | 4 | ||||
-rw-r--r-- | keyboards/iris/keymaps/transmogrified/keymap.c | 106 | ||||
-rw-r--r-- | keyboards/iris/rev1/rev1.c | 20 | ||||
-rw-r--r-- | keyboards/iris/rev1_led/rev1_led.c | 20 | ||||
-rw-r--r-- | keyboards/iris/rev2/rev2.c | 20 |
8 files changed, 153 insertions, 23 deletions
diff --git a/keyboards/iris/info.json b/keyboards/iris/info.json index 984ac56255..ed4528b9d2 100644 --- a/keyboards/iris/info.json +++ b/keyboards/iris/info.json @@ -5,7 +5,7 @@ "width": 14.5, "height": 5, "layouts": { - "KEYMAP": { + "LAYOUT": { "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":8.5, "y":0}, {"x":9.5, "y":0}, {"x":10.5, "y":0}, {"x":11.5, "y":0}, {"x":12.5, "y":0}, {"x":13.5, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":8.5, "y":2}, {"x":9.5, "y":2}, {"x":10.5, "y":2}, {"x":11.5, "y":2}, {"x":12.5, "y":2}, {"x":13.5, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3}, {"x":6, "y":3}, {"x":7.5, "y":3}, {"x":8.5, "y":3}, {"x":9.5, "y":3}, {"x":10.5, "y":3}, {"x":11.5, "y":3}, {"x":12.5, "y":3}, {"x":13.5, "y":3}, {"x":4, "y":4}, {"x":5, "y":4}, {"x":6, "y":4}, {"x":7.5, "y":4}, {"x":8.5, "y":4}, {"x":9.5, "y":4}] } } diff --git a/keyboards/iris/keymaps/drashna/rules.mk b/keyboards/iris/keymaps/drashna/rules.mk index 0e49adf4af..8f19384f62 100644 --- a/keyboards/iris/keymaps/drashna/rules.mk +++ b/keyboards/iris/keymaps/drashna/rules.mk @@ -8,4 +8,4 @@ RGBLIGHT_ENABLE = yes AUDIO_ENABLE = yes NKRO_ENABLE = yes BACKLIGHT_ENABLE = no - +SWAP_HANDS_ENABLE = yes diff --git a/keyboards/iris/keymaps/hag/keymap.c b/keyboards/iris/keymaps/hag/keymap.c index a708b56022..a690f8761a 100644 --- a/keyboards/iris/keymaps/hag/keymap.c +++ b/keyboards/iris/keymaps/hag/keymap.c @@ -183,7 +183,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // `----+----+----' `----+----+----' ), - [_ADJUST] = KEYMAP( + [_ADJUST] = LAYOUT( //,--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------. GAMING , DVORAK, WORKMAN, COLEMAK, QWERTY , KC_RST, _______, _______, _______, _______, KC_PWR, RESET, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| diff --git a/keyboards/iris/keymaps/swedish/keymap.c b/keyboards/iris/keymaps/swedish/keymap.c index 70699bce1a..015e26aec9 100644 --- a/keyboards/iris/keymaps/swedish/keymap.c +++ b/keyboards/iris/keymaps/swedish/keymap.c @@ -43,7 +43,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // `----+----+----' `----+----+----' ), - [_LOWER] = KEYMAP( + [_LOWER] = LAYOUT( //,-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------. NO_TILD,KC_EXLM,NO_AT ,KC_HASH,NO_DLR ,KC_PERC, NO_CIRC,NO_AMPR,NO_ASTR,NO_SLSH,NO_LPRN,NO_RPRN, //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| @@ -57,7 +57,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // `-------+-------+-------' `-------+-------+-------' ), - [_RAISE] = KEYMAP( + [_RAISE] = LAYOUT( //,-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------. KC_F12 ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 , KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_F11 , //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| diff --git a/keyboards/iris/keymaps/transmogrified/keymap.c b/keyboards/iris/keymaps/transmogrified/keymap.c index 714b826ac5..43d6cc6002 100644 --- a/keyboards/iris/keymaps/transmogrified/keymap.c +++ b/keyboards/iris/keymaps/transmogrified/keymap.c @@ -27,6 +27,8 @@ enum custom_keycodes { ONEHANDL, RLAYER, LLAYER, + RLOCK, + LLOCK, DUAL, CONFIG, }; @@ -44,13 +46,15 @@ enum { /* LAYERS */ #define KC_LLAY LLAYER #define KC_RLAY RLAYER +#define KC_RLOK RLOCK +#define KC_LLOK LLOCK #define KC_QWER QWERTY #define KC_DVOR DVORAK #define KC_COLE COLEMAK #define KC_ONER ONEHANDR #define KC_ONEL ONEHANDL #define KC_DUAL DUAL -#define KC_CONF OSL(_CONFIG) +#define KC_CONF CONFIG /* Custom Shortened Keys */ #define KC_MCTB LCTL(KC_TAB) @@ -71,7 +75,7 @@ enum { #define KC_BLUP BL_INC #define KC_BLDN BL_DEC #define KC_SYSR KC_SYSREQ -#define KC_FLASH RESET +#define KC_REST RESET /* Tap Dance */ #define KC_LGUA TD(TD_LGUIAPP) @@ -82,13 +86,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT_kc( //,----+----+----+----+----+----. ,----+----+----+----+----+----. - LEAD, 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC, + XXXX, 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC, //|----+----+----+----+----+----| |----+----+----+----+----+----| TAB , Q , W , E , R , T , Y , U , I , O , P ,DEL , //|----+----+----+----+----+----| |----+----+----+----+----+----| CTEC, A , S , D , F , G , H , J , K , L ,SCLN,ENT , //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| - SHCL, Z , X , C , V , B ,XXXX, XXXX, N , M ,COMM,DOT ,SLSH,RSFT, + SHCL, Z , X , C , V , B ,LLOK, RLOK, N , M ,COMM,DOT ,SLSH,RSFT, //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' LALT,LLAY,TAB , SPC ,RLAY,LGUA // `----+----+----' `----+----+----' @@ -96,13 +100,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_COLEMAK] = LAYOUT_kc( //,----+----+----+----+----+----. ,----+----+----+----+----+----. - LEAD, 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC, + XXXX, 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC, //|----+----+----+----+----+----| |----+----+----+----+----+----| TAB , Q , W , F , P , G , J , L , U , Y ,SCLN,DEL , //|----+----+----+----+----+----| |----+----+----+----+----+----| - CTEC, A , R , S , T , D , H , N , E , I ,SCLN,ENT , + CTEC, A , R , S , T , D , H , N , E , I , O ,ENT , //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| - SHCL, Z , X , C , V , B ,XXXX, XXXX, K , M ,COMM,DOT ,SLSH,RSFT, + SHCL, Z , X , C , V , B ,LLOK, RLOK, K , M ,COMM,DOT ,SLSH,RSFT, //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' LALT,LLAY,TAB , SPC ,RLAY,LGUA // `----+----+----' `----+----+----' @@ -110,13 +114,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_DVORAK] = LAYOUT_kc( //,----+----+----+----+----+----. ,----+----+----+----+----+----. - LEAD, 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC, + XXXX, 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC, //|----+----+----+----+----+----| |----+----+----+----+----+----| TAB ,QUOT,COMM,DOT , P , Y , F , G , C , R , L ,SLSH, //|----+----+----+----+----+----| |----+----+----+----+----+----| CTEC, A , O , E , U , I , D , H , T , N , S ,ENT , //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| - SHCL,SCLN, Q , J , K , X ,XXXX, XXXX, B , M , W , V , Z ,EQL , + SHCL,SCLN, Q , J , K , X ,LLOK, RLOK, B , M , W , V , Z ,EQL , //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' LALT,LLAY,TAB , SPC ,RLAY,LGUA // `----+----+----' `----+----+----' @@ -138,7 +142,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_ONEHANDL] = LAYOUT_kc( //,----+----+----+----+----+----. ,----+----+----+----+----+----. - XXXX,XXXX,XXXX,XXXX,XXXX,XXXX, 5 , 4 , 3 , 2 , 1 ,LEAD, + XXXX,XXXX,XXXX,XXXX,XXXX,XXXX, 5 , 4 , 3 , 2 , 1 ,XXXX, //|----+----+----+----+----+----| |----+----+----+----+----+----| XXXX,XXXX,XXXX,XXXX,XXXX,XXXX, T , R , E , W , Q ,TAB , //|----+----+----+----+----+----| |----+----+----+----+----+----| @@ -152,14 +156,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_RLAYER] = LAYOUT_kc( //,----+----+----+----+----+----. ,----+----+----+----+----+----. - ,XXXX,XXXX,XXXX,XXXX,XXXX, MUTE,VOLD,VOLU,BLDN,BLUP, , + ,SLCK,SYSR,PSCR,INS ,PAUS, MUTE,VOLD,VOLU,BLDN,BLUP, , //|----+----+----+----+----+----| |----+----+----+----+----+----| - ,TILD,GRV ,EQL ,LBRC,RBRC, PGUP,ASTR, UP ,AMPR,CIRC, , + ,TILD,GRV ,EQL ,LBRC,RBRC, ASTR,HOME, UP ,PGUP,PLUS, , //|----+----+----+----+----+----| |----+----+----+----+----+----| - ,EXLM,PIPE,DLR ,LPRN,RPRN, HOME,LEFT,DOWN,RGHT,END ,QUOT, + ,EXLM,PIPE,DLR ,LPRN,RPRN, AMPR,LEFT,DOWN,RGHT,MINS,QUOT, //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| - , AT ,HASH,PERC,LCBR,RCBR,LGUI, ,PGDN,UNDS,MINS,PLUS,BSLS, , - //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' + , AT ,HASH,PERC,LCBR,RCBR, , ,CIRC,END ,UNDS,PGDN,BSLS, , + //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' , , , , , // `----+----+----' `----+----+----' ), @@ -172,7 +176,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|----+----+----+----+----+----| |----+----+----+----+----+----| ,XXXX,MCST,DOWN,MCTB,ENT , SLSH, 4 , 5 , 6 ,MINS, , //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| - ,XXXX,XXXX,BSPC,SPC ,SINS,F11 , F12 ,EQL , 1 , 2 , 3 ,DOT , , + ,XXXX,XXXX,BSPC,SINS,SPC ,F11 , F12 ,EQL , 1 , 2 , 3 ,DOT , , //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' , , , 0 , , // `----+----+----' `----+----+----' @@ -180,7 +184,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_DUAL] = LAYOUT_kc( //,----+----+----+----+----+----. ,----+----+----+----+----+----. - ,XXXX,XXXX,PSCR,INS ,XXXX, XXXX,SLEP,SLCK,PAUS,SYSR,XXXX, + ,XXXX,XXXX,XXXX,XXXX,XXXX, XXXX,XXXX,XXXX,XXXX,XXXX,XXXX, //|----+----+----+----+----+----| |----+----+----+----+----+----| ,XXXX,XXXX,XXXX,XXXX,XXXX, XXXX,XXXX,MS_U,XXXX,XXXX,MCAD, //|----+----+----+----+----+----| |----+----+----+----+----+----| @@ -194,7 +198,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_CONFIG] = LAYOUT_kc( //,----+----+----+----+----+----. ,----+----+----+----+----+----. - FLASH,XXXX,XXXX,XXXX,XXXX,XXXX, XXXX,XXXX,XXXX,XXXX,XXXX,XXXX, + REST,XXXX,XXXX,XXXX,XXXX,XXXX, XXXX,XXXX,XXXX,XXXX,XXXX,XXXX, //|----+----+----+----+----+----| |----+----+----+----+----+----| XXXX,QWER,XXXX,XXXX,XXXX,XXXX, XXXX,XXXX,XXXX,ONER,XXXX,XXXX, //|----+----+----+----+----+----| |----+----+----+----+----+----| @@ -237,6 +241,11 @@ void persistent_default_layer_set(uint16_t default_layer) { default_layer_set(default_layer); } +/* Variables for layer light toggling */ +static uint16_t currentBL = 0; +static uint16_t rlocked = 0; +static uint16_t llocked = 0; + bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case QWERTY: @@ -263,14 +272,33 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; + case CONFIG: + if (record->event.pressed) { + set_single_persistent_default_layer(_CONFIG); + backlight_toggle(); + } + return false; + break; case RLAYER: if (record->event.pressed) { layer_on(_RLAYER); update_tri_layer(_RLAYER, _LLAYER, _DUAL); + /* add logic to toggle backlight change when on a layer */ + currentBL = get_backlight_level(); + if ( currentBL == 0 || currentBL == 1 ) { + backlight_set(5); + } else { + backlight_set(0); + } } else { unregister_code(KC_LGUI); + rlocked = 0; layer_off(_RLAYER); update_tri_layer(_RLAYER, _LLAYER, _DUAL); + if ( llocked == 0 ) { + backlight_set(currentBL); + } else { + } } return false; break; @@ -278,9 +306,51 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { layer_on(_LLAYER); update_tri_layer(_RLAYER, _LLAYER, _DUAL); + /* add logic to toggle backlight change when on a layer */ + currentBL = get_backlight_level(); + if ( currentBL == 0 || currentBL == 1 ) { + backlight_set(5); + } else { + backlight_set(0); + } } else { + llocked = 0; layer_off(_LLAYER); update_tri_layer(_RLAYER, _LLAYER, _DUAL); + if ( rlocked == 0 ) { + backlight_set(currentBL); + } else { + } + } + return false; + break; + case RLOCK: + if (record->event.pressed) { + layer_on(_RLAYER); + /* add logic to toggle backlight change when on a layer */ + rlocked = 1; + currentBL = get_backlight_level(); + if ( currentBL == 0 || currentBL == 1 ) { + backlight_set(5); + } else { + backlight_set(0); + } + } else { + } + return false; + break; + case LLOCK: + if (record->event.pressed) { + layer_on(_LLAYER); + /* add logic to toggle backlight change when on a layer */ + llocked = 1; + currentBL = get_backlight_level(); + if ( currentBL == 0 || currentBL == 1 ) { + backlight_set(5); + } else { + backlight_set(0); + } + } else { } return false; break; diff --git a/keyboards/iris/rev1/rev1.c b/keyboards/iris/rev1/rev1.c index 609c479eb3..3fdfaa94bc 100644 --- a/keyboards/iris/rev1/rev1.c +++ b/keyboards/iris/rev1/rev1.c @@ -20,3 +20,23 @@ void matrix_init_kb(void) { matrix_init_user(); }; + + +#ifdef SWAP_HANDS_ENABLE +__attribute__ ((weak)) +// swap-hands action needs a matrix to define the swap +const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { + /* Left hand, matrix positions */ + {{0,5}, {1,5}, {2,5}, {3,5}, {4,5}, {5,5}}, + {{0,6}, {1,6}, {2,6}, {3,6}, {4,6}, {5,6}}, + {{0,7}, {1,7}, {2,7}, {3,7}, {4,7}, {5,7}}, + {{0,8}, {1,8}, {2,8}, {3,8}, {4,8}, {5,8}}, + {{0,9}, {1,9}, {2,9}, {3,9}, {4,9}, {5,9}}, + /* Right hand, matrix positions */ + {{0,0}, {1,0}, {2,0}, {3,0}, {4,0}, {5,0}}, + {{0,1}, {1,1}, {2,1}, {3,1}, {4,1}, {5,1}}, + {{0,2}, {1,2}, {2,2}, {3,2}, {4,2}, {5,2}}, + {{0,3}, {1,3}, {2,3}, {3,3}, {4,3}, {5,3}}, + {{0,4}, {1,4}, {2,4}, {3,4}, {4,4}, {5,4}}, +}; +#endif diff --git a/keyboards/iris/rev1_led/rev1_led.c b/keyboards/iris/rev1_led/rev1_led.c index 7a4c874884..681625f4b0 100644 --- a/keyboards/iris/rev1_led/rev1_led.c +++ b/keyboards/iris/rev1_led/rev1_led.c @@ -20,3 +20,23 @@ void matrix_init_kb(void) { matrix_init_user(); }; + + +#ifdef SWAP_HANDS_ENABLE +__attribute__ ((weak)) +// swap-hands action needs a matrix to define the swap +const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { + /* Left hand, matrix positions */ + {{0,5}, {1,5}, {2,5}, {3,5}, {4,5}, {5,5}}, + {{0,6}, {1,6}, {2,6}, {3,6}, {4,6}, {5,6}}, + {{0,7}, {1,7}, {2,7}, {3,7}, {4,7}, {5,7}}, + {{0,8}, {1,8}, {2,8}, {3,8}, {4,8}, {5,8}}, + {{0,9}, {1,9}, {2,9}, {3,9}, {4,9}, {5,9}}, + /* Right hand, matrix positions */ + {{0,0}, {1,0}, {2,0}, {3,0}, {4,0}, {5,0}}, + {{0,1}, {1,1}, {2,1}, {3,1}, {4,1}, {5,1}}, + {{0,2}, {1,2}, {2,2}, {3,2}, {4,2}, {5,2}}, + {{0,3}, {1,3}, {2,3}, {3,3}, {4,3}, {5,3}}, + {{0,4}, {1,4}, {2,4}, {3,4}, {4,4}, {5,4}}, +}; +#endif diff --git a/keyboards/iris/rev2/rev2.c b/keyboards/iris/rev2/rev2.c index fb53f283ee..133fce66ad 100644 --- a/keyboards/iris/rev2/rev2.c +++ b/keyboards/iris/rev2/rev2.c @@ -20,3 +20,23 @@ void matrix_init_kb(void) { matrix_init_user(); }; + +#ifdef SWAP_HANDS_ENABLE +__attribute__ ((weak)) +// swap-hands action needs a matrix to define the swap +const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { + /* Left hand, matrix positions */ + {{0,5}, {1,5}, {2,5}, {3,5}, {4,5}, {5,5}}, + {{0,6}, {1,6}, {2,6}, {3,6}, {4,6}, {5,6}}, + {{0,7}, {1,7}, {2,7}, {3,7}, {4,7}, {5,7}}, + {{0,8}, {1,8}, {2,8}, {3,8}, {4,8}, {5,8}}, + {{0,9}, {1,9}, {2,9}, {3,9}, {4,9}, {5,9}}, + /* Right hand, matrix positions */ + {{0,0}, {1,0}, {2,0}, {3,0}, {4,0}, {5,0}}, + {{0,1}, {1,1}, {2,1}, {3,1}, {4,1}, {5,1}}, + {{0,2}, {1,2}, {2,2}, {3,2}, {4,2}, {5,2}}, + {{0,3}, {1,3}, {2,3}, {3,3}, {4,3}, {5,3}}, + {{0,4}, {1,4}, {2,4}, {3,4}, {4,4}, {5,4}}, +}; +#endif + |