aboutsummaryrefslogtreecommitdiff
path: root/keyboards
diff options
context:
space:
mode:
authorHagVcom <HagVcom@users.noreply.github.com>2018-02-02 07:50:22 +0100
committerJack Humbert <jack.humb@gmail.com>2018-02-02 01:50:22 -0500
commite9944bfc8e89dc772fa04be90638cab1e722ece1 (patch)
treecae1b3c67b7bbfc627be8023dbce1edcc8452059 /keyboards
parent9303b42e690f5668e29b874d88e2bb3564bd93a2 (diff)
downloadqmk_firmware-e9944bfc8e89dc772fa04be90638cab1e722ece1.tar.gz
qmk_firmware-e9944bfc8e89dc772fa04be90638cab1e722ece1.zip
Added "hag" keymap to Iris (#2313)
* Create keymap.c Add Hag keymap, a heavily modified dvorak swedish keymap with multiple layouts and often used stuff under the alpha cluster. * Create config.h * Create rules.mk
Diffstat (limited to 'keyboards')
-rw-r--r--keyboards/iris/keymaps/hag/config.h41
-rw-r--r--keyboards/iris/keymaps/hag/keymap.c297
-rw-r--r--keyboards/iris/keymaps/hag/rules.mk6
3 files changed, 344 insertions, 0 deletions
diff --git a/keyboards/iris/keymaps/hag/config.h b/keyboards/iris/keymaps/hag/config.h
new file mode 100644
index 000000000..c4604af43
--- /dev/null
+++ b/keyboards/iris/keymaps/hag/config.h
@@ -0,0 +1,41 @@
1/*
2Copyright 2017 Danny Nguyen <danny@hexwire.com>
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18#ifndef CONFIG_USER_H
19#define CONFIG_USER_H
20
21#include "config_common.h"
22
23/* Use I2C or Serial, not both */
24
25#define USE_SERIAL
26// #define USE_I2C
27
28/* Select hand configuration */
29
30#define MASTER_LEFT
31// #define MASTER_RIGHT
32// #define EE_HANDS
33
34#undef RGBLED_NUM
35#define RGBLIGHT_ANIMATIONS
36#define RGBLED_NUM 12
37#define RGBLIGHT_HUE_STEP 8
38#define RGBLIGHT_SAT_STEP 8
39#define RGBLIGHT_VAL_STEP 8
40
41#endif
diff --git a/keyboards/iris/keymaps/hag/keymap.c b/keyboards/iris/keymaps/hag/keymap.c
new file mode 100644
index 000000000..3aac1394e
--- /dev/null
+++ b/keyboards/iris/keymaps/hag/keymap.c
@@ -0,0 +1,297 @@
1#include "iris.h"
2#include "action_layer.h"
3#include "eeconfig.h"
4
5extern keymap_config_t keymap_config;
6
7
8//Heavily modified keymap. Some features:
9//Multiple layouts, I use dvorak as main.
10//Nordic(swedish) signs
11//Symbols, numpad, arrows/navigation reachable under the alpas via the layers
12//Mirrored ctl, alt and shift to be able to use both hands when doing commands
13//Gaming layer, qwerty with space on left half.
14
15#define _QWERTY 2
16#define _DVORAK 0
17#define _COLEMAK 1
18#define _WORKMAN 3
19#define _GAMING 4
20#define _NUMPAD 5
21#define _LOWER 6
22#define _RAISE 7
23
24#define _ADJUST 16
25
26enum custom_keycodes {
27 QWERTY = SAFE_RANGE,
28 DVORAK,
29 COLEMAK,
30 WORKMAN,
31 GAMING,
32 NUMPAD,
33 LOWER,
34 RAISE,
35 ADJUST,
36};
37
38#define KC_ KC_TRNS
39#define _______ KC_TRNS
40#define KC_XXXX KC_NO
41
42#define KC_Sw2 RALT(KC_2) // Nordic @
43#define KC_Sw3 RALT(KC_3) // Nordic something
44#define KC_Sw4 RALT(KC_4) // Nordic something
45#define KC_Sw5 RALT(KC_5) // Nordic something
46#define KC_Sw6 RALT(KC_6) // ...
47#define KC_Sw7 RALT(KC_7)
48#define KC_Sw8 RALT(KC_8)
49#define KC_Sw9 RALT(KC_9)
50#define KC_Sw0 RALT(KC_0)
51#define KC_Tild RALT(KC_RBRC)
52#define KC_Bsls RALT(KC_MINS)
53#define KC_Bar RALT(KC_NUBS)
54#define KC_Less S(KC_NUBS)
55#define KC_CATDEL LCTL(LALT(KC_DEL)) // Ctrl alt del
56#define KC_TSKMGR LCTL(S(KC_ESC)) // Ctrl shift esc
57#define KC_NUMP TG(_NUMPAD) // Toggle layer NUMPAD for use in KC_keymaps
58#define KC_Close RALT(KC_F4) // Alt F4
59#define KC_Great S(KC_NUBS)
60#define KC_MEH1 MEH(KC_1)
61#define KC_MEH2 MEH(KC_2)
62#define KC_MEH3 MEH(KC_3)
63#define KC_MEH4 MEH(KC_4)
64#define KC_MEH5 MEH(KC_5)
65
66#define KC_LOWR LOWER
67#define KC_RASE RAISE
68#define KC_RST RESET
69#define KC_BL_S BL_STEP
70
71const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
72
73 [_QWERTY] = KC_KEYMAP(
74 //,----+----+----+----+----+----. ,----+----+----+----+----+----.
75 DEL ,APP, VOLD,MUTE,VOLU,LGUI, RGUI,MPRV,MPLY,MNXT,DOWN,ESC ,
76 //|----+----+----+----+----+----| |----+----+----+----+----+----|
77 TAB , Q , W , E , R , T , Y , U , I , O , P ,LBRC,
78 //|----+----+----+----+----+----| |----+----+----+----+----+----|
79 LCTL, A , S , D , F , G , H , J , K , L ,SCLN,QUOT,
80 //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
81 LSFT, Z , X , C , V , B ,NUMP, ENT , N , M ,COMM,DOT ,SLSH,RSFT,
82 //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
83 LALT,LOWR,BSPC, SPC ,RASE,LALT
84 // `----+----+----' `----+----+----'
85 ),
86
87 [_GAMING] = KC_KEYMAP(
88 //,----+----+----+----+----+----. ,----+----+----+----+----+----.
89 ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,ESC ,
90 //|----+----+----+----+----+----| |----+----+----+----+----+----|
91 TAB , Q , W , E , R , T , Y , U , I , O , P ,DEL,
92 //|----+----+----+----+----+----| |----+----+----+----+----+----|
93 LCTL, A , S , D , F , G , H , J , K , L ,SCLN,RCTL,
94 //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
95 LSFT, Z , X , C , V , B , Y , ENT , N , M ,COMM,DOT ,SLSH,RSFT,
96 //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
97 LALT,LOWR,SPC, BSPC ,RASE,LALT
98 // `----+----+----' `----+----+----'
99 ),
100
101 [_DVORAK] = KC_KEYMAP(
102 //,----+----+----+----+----+----. ,----+----+----+----+----+----.
103 DEL ,APP ,VOLD,MUTE,VOLU,LGUI, RGUI,MPRV,MPLY,MNXT,DOWN,ESC ,
104 //,----+----+----+----+----+----. ,----+----+----+----+----+----.
105 TAB ,LBRC,QUOT,SCLN, P , Y , F , G , C , R , L ,DEL,
106 //,----+----+----+----+----+----. ,----+----+----+----+----+----.
107 LCTL, A , O , E , U , I , D , H , T , N , S ,RCTL,
108 //,----+----+----+----+----+----. ,----+----+----+----+----+----.
109 LSFT,DOT , Q , J , K , X ,NUMP, ENT , B , M , W , V , Z ,RSFT,
110 //,----+----+----+----+----+----. ,----+----+----+----+----+----.
111 LALT,LOWR,BSPC, SPC ,RASE,LALT
112 // `----+----+----' `----+----+----'
113 ),
114
115 [_COLEMAK] = KC_KEYMAP(
116 //,----+----+----+----+----+----. ,----+----+----+----+----+----.
117 DEL ,APP, VOLD,MUTE,VOLU,LGUI, RGUI,MPRV,MPLY,MNXT,DOWN,ESC ,
118 //|----+----+----+----+----+----| |----+----+----+----+----+----|
119 TAB , Q , W , F , P , G , J , L , U , Y ,LBRC,QUOT,
120 //|----+----+----+----+----+----| |----+----+----+----+----+----|
121 LCTL, A , R , S , T , D , H , N , E , I , O ,SCLN,
122 //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
123 LSFT, Z , X , C , V , B ,NUMP, ENT , K , M ,COMM, DOT,SLSH,RSFT,
124 //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
125 LALT,LOWR,BSPC, SPC ,RASE,LALT
126 // `----+----+----' `----+----+----'
127 ),
128
129[_WORKMAN] = KC_KEYMAP(
130 //,----+----+----+----+----+----. ,----+----+----+----+----+----.
131 DEL ,APP, VOLD,MUTE,VOLU,LGUI, RGUI,MPRV,MPLY,MNXT,DOWN,ESC ,
132 //|----+----+----+----+----+----| |----+----+----+----+----+----|
133 TAB , Q , W , R , W , B , J , F , U , P ,LBRC,SCLN,
134 //|----+----+----+----+----+----| |----+----+----+----+----+----|
135 LCTL, A , S , H , T , G , Y , N , E , O , I ,RCTL,
136 //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
137 LSFT, Z , X , M , C , V ,NUMP, ENT , K , L ,QUOT, DOT,SLSH,RSFT,
138 //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
139 LALT,LOWR,BSPC, SPC ,RASE,LALT
140 // `----+----+----' `----+----+----'
141 ),
142
143 [_NUMPAD] = KC_KEYMAP(
144 //,----+----+----+----+----+----. ,----+----+----+----+----+----.
145 F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,F12 ,
146 //|----+----+----+----+----+----| |----+----+----+----+----+----|
147 ,MEH1,BTN2,MS_U,BTN1,CATDEL, PIPE, P7 , P8 , P9 ,SLSH, ,
148 //|----+----+----+----+----+----| |----+----+----+----+----+----|
149 ,MEH4,MS_L,MS_D,MS_R,TSKMGR, COMM, P4 , P5 , P6 ,MINS, ,
150 //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
151 ,MEH5,ACL0,ACL1,ACL2,MEH3, , PENT,DOT , P1 , P2 , P3 , P0 , ,
152 //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
153 LALT,LOWR,BSPC, , P0 ,NLCK
154 // `----+----+----' `----+----+----'
155 ),
156
157
158 [_LOWER] = KC_KEYMAP(
159 //,----+----+----+----+----+----. ,----+----+----+----+----+----.
160 F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,F12 ,
161 //|----+----+----+----+----+----| |----+----+----+----+----+----|
162 ,CAPS,PGUP, UP ,PGDN, ESC, RCBR,EXLM,ASTR,LPRN,UNDS, ,
163 //|----+----+----+----+----+----| |----+----+----+----+----+----|
164 ,HOME,LEFT,DOWN,RGHT, END, RPRN,QUES,Sw8 ,Sw9 ,LABK, ,
165 //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
166 , ENT, , , , DEL, , ,RABK,NUBS,Sw7 ,Sw0 ,Great, ,
167 //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
168 , , , , ,
169 // `----+----+----' `----+----+----'
170 ),
171
172 [_RAISE] = KC_KEYMAP(
173 //,----+----+----+----+----+----. ,----+----+----+----+----+----.
174 TILD,EXLM,GRV ,EQL, DLR ,PERC, Sw3 ,Sw5 ,Sw6 ,Sw0 ,RPRN, ,
175 //|----+----+----+----+----+----| |----+----+----+----+----+----|
176 ,Bar ,Sw2 ,HASH, AT ,PERC, PIPE, 7 , 8 , 9 ,PMNS,PSLS,
177 //|----+----+----+----+----+----| |----+----+----+----+----+----|
178 ,Bsls,Tild,SLSH,AMPR,BSLS, COMM, 4 , 5 , 6 ,PPLS,PAST,
179 //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
180 ,PIPE,Sw4 ,PLUS,CIRC,TILD, , PENT,DOT , 1 , 2 , 3 , 0 ,PEQL,
181 //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
182 , ,DEL , , ,
183 // `----+----+----' `----+----+----'
184 ),
185
186 [_ADJUST] = KEYMAP(
187 //,--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------.
188 GAMING , DVORAK, WORKMAN, COLEMAK, QWERTY , KC_RST, _______, _______, _______, _______, KC_PWR, RESET,
189 //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
190 _______, _______, _______,LGUI(KC_UP),_______,LALT(KC_F4), _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI,
191 //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
192 _______, _______,LGUI(KC_LEFT),LGUI(KC_DOWN),LGUI(KC_RGHT),_______, _______, DEBUG , RGB_HUD, RGB_SAD, RGB_VAD, BL_STEP,
193 //|--------+--------+--------+--------+--------+--------+--------. ,--------|--------+--------+--------+--------+--------+--------|
194 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
195 //`--------+--------+--------+----+---+--------+--------+--------/ \--------+--------+--------+---+----+--------+--------+--------'
196 _______, _______, _______, _______, _______, _______
197 // `--------+--------+--------' `--------+--------+--------'
198 )
199
200};
201
202#ifdef AUDIO_ENABLE
203float tone_qwerty[][2] = SONG(QWERTY_SOUND);
204#endif
205
206void persistent_default_layer_set(uint16_t default_layer) {
207 eeconfig_update_default_layer(default_layer);
208 default_layer_set(default_layer);
209}
210
211bool process_record_user(uint16_t keycode, keyrecord_t *record) {
212 switch (keycode) {
213 case QWERTY:
214 if (record->event.pressed) {
215 #ifdef AUDIO_ENABLE
216 PLAY_SONG(tone_qwerty);
217 #endif
218 persistent_default_layer_set(1UL<<_QWERTY);
219 }
220 return false;
221 break;
222 case DVORAK:
223 if (record->event.pressed) {
224 #ifdef AUDIO_ENABLE
225// PLAY_SONG(tone_qwerty);
226 #endif
227 persistent_default_layer_set(1UL<<_DVORAK);
228 }
229 return false;
230 break;
231 case NUMPAD:
232 if (record->event.pressed) {
233 #ifdef AUDIO_ENABLE
234// PLAY_SONG(tone_qwerty);
235 #endif
236 persistent_default_layer_set(1UL<<_NUMPAD);
237 }
238 return false;
239 break;
240 case COLEMAK:
241 if (record->event.pressed) {
242 #ifdef AUDIO_ENABLE
243// PLAY_SONG(tone_qwerty);
244 #endif
245 persistent_default_layer_set(1UL<<_COLEMAK);
246 }
247 return false;
248 break;
249 case WORKMAN:
250 if (record->event.pressed) {
251 #ifdef AUDIO_ENABLE
252// PLAY_SONG(tone_qwerty);
253 #endif
254 persistent_default_layer_set(1UL<<_WORKMAN);
255 }
256 return false;
257 break;
258 case GAMING:
259 if (record->event.pressed) {
260 #ifdef AUDIO_ENABLE
261// PLAY_SONG(tone_qwerty);
262 #endif
263 persistent_default_layer_set(1UL<<_GAMING);
264 }
265 return false;
266 break;
267 case LOWER:
268 if (record->event.pressed) {
269 layer_on(_LOWER);
270 update_tri_layer(_LOWER, _RAISE, _ADJUST);
271 } else {
272 layer_off(_LOWER);
273 update_tri_layer(_LOWER, _RAISE, _ADJUST);
274 }
275 return false;
276 break;
277 case RAISE:
278 if (record->event.pressed) {
279 layer_on(_RAISE);
280 update_tri_layer(_LOWER, _RAISE, _ADJUST);
281 } else {
282 layer_off(_RAISE);
283 update_tri_layer(_LOWER, _RAISE, _ADJUST);
284 }
285 return false;
286 break;
287 case ADJUST:
288 if (record->event.pressed) {
289 layer_on(_ADJUST);
290 } else {
291 layer_off(_ADJUST);
292 }
293 return false;
294 break;
295 }
296 return true;
297}
diff --git a/keyboards/iris/keymaps/hag/rules.mk b/keyboards/iris/keymaps/hag/rules.mk
new file mode 100644
index 000000000..22b6ec476
--- /dev/null
+++ b/keyboards/iris/keymaps/hag/rules.mk
@@ -0,0 +1,6 @@
1RGBLIGHT_ENABLE = yes
2BACKLIGHT_ENABLE = yes
3
4ifndef QUANTUM_DIR
5 include ../../../../Makefile
6endif