aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad <broswen@users.noreply.github.com>2018-08-16 10:33:02 -0500
committerDrashna Jaelre <drashna@live.com>2018-08-16 08:33:02 -0700
commita828d49f8c6e0cce16727b596ed141f173c03495 (patch)
tree1f16a32572b5786ee2eb57072c948b3b3619da2b
parent9eab1667b070e8310dd0585eaf06cc78570d75ea (diff)
downloadqmk_firmware-a828d49f8c6e0cce16727b596ed141f173c03495.tar.gz
qmk_firmware-a828d49f8c6e0cce16727b596ed141f173c03495.zip
Keymap: Adding broswen keymap for iris split keyboard. (#3654)
* Adding broswen keymap for iris split keyboard. * added changes as requested by drashna * formatting
-rw-r--r--keyboards/iris/keymaps/broswen/config.h52
-rw-r--r--keyboards/iris/keymaps/broswen/keymap.c126
-rw-r--r--keyboards/iris/keymaps/broswen/rules.mk8
3 files changed, 186 insertions, 0 deletions
diff --git a/keyboards/iris/keymaps/broswen/config.h b/keyboards/iris/keymaps/broswen/config.h
new file mode 100644
index 000000000..19c47780d
--- /dev/null
+++ b/keyboards/iris/keymaps/broswen/config.h
@@ -0,0 +1,52 @@
1/*
2
3This program is free software: you can redistribute it and/or modify
4it under the terms of the GNU General Public License as published by
5the Free Software Foundation, either version 2 of the License, or
6(at your option) any later version.
7
8This program is distributed in the hope that it will be useful,
9but WITHOUT ANY WARRANTY; without even the implied warranty of
10MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11GNU General Public License for more details.
12
13You should have received a copy of the GNU General Public License
14along with this program. If not, see <http://www.gnu.org/licenses/>.
15*/
16
17#pragma once
18/* Use I2C or Serial, not both */
19
20#define USE_SERIAL
21// #define USE_I2C
22
23/* Select hand configuration */
24
25#define MASTER_LEFT
26// #define MASTER_RIGHT
27// #define EE_HANDS
28
29#undef RGBLED_NUM
30#define RGBLIGHT_ANIMATIONS
31#define RGBLED_NUM 12
32#define RGBLIGHT_HUE_STEP 5
33#define RGBLIGHT_SAT_STEP 8
34#define RGBLIGHT_VAL_STEP 8
35#define C6_AUDIO
36
37#define NO_MUSIC_MODE
38
39#ifdef AUDIO_ENABLE
40 #define STARTUP_SONG SONG(NO_SOUND)
41#endif
42
43
44#if !defined(NO_DEBUG) && !defined(CONSOLE_ENABLE)
45#define NO_DEBUG
46#endif // !NO_DEBUG
47#if !defined(NO_PRINT) && !defined(CONSOLE_ENABLE)
48#define NO_PRINT
49#endif // !NO_PRINT
50#define NO_ACTION_MACRO
51#define NO_ACTION_FUNCTION
52#define DISABLE_LEADER
diff --git a/keyboards/iris/keymaps/broswen/keymap.c b/keyboards/iris/keymaps/broswen/keymap.c
new file mode 100644
index 000000000..7453a9eef
--- /dev/null
+++ b/keyboards/iris/keymaps/broswen/keymap.c
@@ -0,0 +1,126 @@
1#include QMK_KEYBOARD_H
2
3
4extern keymap_config_t keymap_config;
5
6#define _QWERTY 0
7#define _LOWER 1
8#define _RAISE 2
9#define _ADJUST 16
10
11enum custom_keycodes {
12 QWERTY = SAFE_RANGE,
13 LOWER,
14 RAISE,
15 ADJUST,
16};
17
18#define KC_ KC_TRNS
19#define _______ KC_TRNS
20
21#define KC_LOWR LOWER
22#define KC_RASE RAISE
23#define KC_RST RESET
24#define KC_BL_S BL_STEP
25#define KC_DBUG DEBUG
26
27
28const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
29
30 [_QWERTY] = LAYOUT_kc(
31 //,----+----+----+----+----+----. ,----+----+----+----+----+----.
32 ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , DEL,
33 //|----+----+----+----+----+----| |----+----+----+----+----+----|
34 TAB , Q , W , E , R , T , Y , U , I , O , P ,BSPC ,
35 //|----+----+----+----+----+----| |----+----+----+----+----+----|
36 LCTL, A , S , D , F , G , H , J , K , L ,SCLN,QUOT,
37 //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
38 LSFT, Z , X , C , V , B ,LBRC, RBRC , N , M ,COMM,DOT ,SLSH,RSFT,
39 //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
40 LALT,LGUI,SPC, ENT ,LOWR,RASE
41 // `----+----+----' `----+----+----'
42 ),
43
44 [_LOWER] = LAYOUT_kc(
45 //,----+----+----+----+----+----. ,----+----+----+----+----+----.
46 , , , , , , , , , , , ,
47 //|----+----+----+----+----+----| |----+----+----+----+----+----|
48 , , , , , , , , , , , ,
49 //|----+----+----+----+----+----| |----+----+----+----+----+----|
50 ,TILD,PIPE,MINS,PLUS, , LEFT,DOWN, UP ,RGHT, , ,
51 //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
52 , GRV,BSLS,UNDS, EQL, , , , , , , , , ,
53 //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
54 , , , , ,
55 // `----+----+----' `----+----+----'
56 ),
57
58 [_RAISE] = LAYOUT_kc(
59 //,----+----+----+----+----+----. ,----+----+----+----+----+----.
60 F12 , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,
61 //|----+----+----+----+----+----| |----+----+----+----+----+----|
62 , , , , , , , , , , , ,
63 //|----+----+----+----+----+----| |----+----+----+----+----+----|
64 , , , , , , , , , , , ,
65 //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
66 , , , , , , , , , , , , , ,
67 //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
68 , , , , ,
69 // `----+----+----' `----+----+----'
70 ),
71
72 [_ADJUST] = LAYOUT(
73 //,--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------.
74 AU_TOG, CK_UP, CK_DOWN, _______, _______, _______, _______, _______, _______, _______, _______, _______,
75 //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
76 RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______,
77 //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
78 RESET , DEBUG , RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______,
79 //|--------+--------+--------+--------+--------+--------+--------. ,--------|--------+--------+--------+--------+--------+--------|
80 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
81 //`--------+--------+--------+----+---+--------+--------+--------/ \--------+--------+--------+---+----+--------+--------+--------'
82 _______, _______, _______, _______, _______, _______
83 // `--------+--------+--------' `--------+--------+--------'
84 )
85
86};
87
88bool process_record_user(uint16_t keycode, keyrecord_t *record) {
89 switch (keycode) {
90 // case QWERTY:
91 // if (record->event.pressed) {
92 // persistent_default_layer_set(1UL<<_QWERTY);
93 // }
94 // return false;
95 // break;
96 case LOWER:
97 if (record->event.pressed) {
98 layer_on(_LOWER);
99 update_tri_layer(_LOWER, _RAISE, _ADJUST);
100 } else {
101 layer_off(_LOWER);
102 update_tri_layer(_LOWER, _RAISE, _ADJUST);
103 }
104 return false;
105 break;
106 case RAISE:
107 if (record->event.pressed) {
108 layer_on(_RAISE);
109 update_tri_layer(_LOWER, _RAISE, _ADJUST);
110 } else {
111 layer_off(_RAISE);
112 update_tri_layer(_LOWER, _RAISE, _ADJUST);
113 }
114 return false;
115 break;
116 case ADJUST:
117 if (record->event.pressed) {
118 layer_on(_ADJUST);
119 } else {
120 layer_off(_ADJUST);
121 }
122 return false;
123 break;
124 }
125 return true;
126}
diff --git a/keyboards/iris/keymaps/broswen/rules.mk b/keyboards/iris/keymaps/broswen/rules.mk
new file mode 100644
index 000000000..14fa11289
--- /dev/null
+++ b/keyboards/iris/keymaps/broswen/rules.mk
@@ -0,0 +1,8 @@
1RGBLIGHT_ENABLE = yes
2BACKLIGHT_ENABLE = no
3MOUSEKEY_ENABLE = no
4MIDI_ENABLE = no
5BLUETOOTH_ENABLE = no
6COMMAND_ENABLE = no
7TERMINAL_ENABLE = no
8AUDIO_ENABLE = yes