aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYan-Fa li <yanfali@gmail.com>2017-12-10 22:16:31 -0800
committerJack Humbert <jack.humb@gmail.com>2018-02-16 12:02:33 -0500
commitbfc2b1205a724c4562d893a17200fffcef8b7fcf (patch)
tree485556490c894a9e5faaa977575f0cae8d984ba4
parent7b5c6a895e998870d3a898847f89e78d9ae71224 (diff)
downloadqmk_firmware-bfc2b1205a724c4562d893a17200fffcef8b7fcf.tar.gz
qmk_firmware-bfc2b1205a724c4562d893a17200fffcef8b7fcf.zip
u/yanfali custom keymap for Iris
Based heavily on the keymap by hexwire. 1. Moved LALT to LCTL; I don't need CTL because of ESCC. 1. Moved RAISE to old LALT. 1. Moved ENTER to old RAISE. 1. Move QUOTE to old ENTER. 1. Moved PLUS to old QUOTE. 1. replaced music next and volume up with browser forward and back through history
-rw-r--r--keyboards/iris/keymaps/yanfali/config.h43
-rw-r--r--keyboards/iris/keymaps/yanfali/keymap.c145
-rw-r--r--keyboards/iris/keymaps/yanfali/readme.md17
-rw-r--r--keyboards/iris/keymaps/yanfali/rules.mk6
4 files changed, 211 insertions, 0 deletions
diff --git a/keyboards/iris/keymaps/yanfali/config.h b/keyboards/iris/keymaps/yanfali/config.h
new file mode 100644
index 000000000..81df2e916
--- /dev/null
+++ b/keyboards/iris/keymaps/yanfali/config.h
@@ -0,0 +1,43 @@
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#define TAPPING_TERM 150
35
36#undef RGBLED_NUM
37#define RGBLIGHT_ANIMATIONS
38#define RGBLED_NUM 12
39#define RGBLIGHT_HUE_STEP 8
40#define RGBLIGHT_SAT_STEP 8
41#define RGBLIGHT_VAL_STEP 8
42
43#endif
diff --git a/keyboards/iris/keymaps/yanfali/keymap.c b/keyboards/iris/keymaps/yanfali/keymap.c
new file mode 100644
index 000000000..370db668d
--- /dev/null
+++ b/keyboards/iris/keymaps/yanfali/keymap.c
@@ -0,0 +1,145 @@
1#include "iris.h"
2#include "action_layer.h"
3#include "eeconfig.h"
4
5extern keymap_config_t keymap_config;
6
7#define _QWERTY 0
8#define _LOWER 1
9#define _RAISE 2
10#define _ADJUST 16
11
12enum custom_keycodes {
13 QWERTY = SAFE_RANGE,
14 LOWER,
15 RAISE,
16 ADJUST,
17};
18
19#define KC_ KC_TRNS
20#define _______ KC_TRNS
21
22#define KC_CAPW LGUI(LSFT(KC_3)) // Capture whole screen
23#define KC_CPYW LGUI(LSFT(LCTL(KC_3))) // Copy whole screen
24#define KC_CAPP LGUI(LSFT(KC_4)) // Capture portion of screen
25#define KC_CPYP LGUI(LSFT(LCTL(KC_4))) // Copy portion of screen
26#define KC_ESCC MT(MOD_LCTL, KC_ESC) // Control (hold), Escape (tap)
27#define KC_BACK LGUI(KC_LEFT) // Browser Back
28#define KC_FORW LGUI(KC_RIGHT) // Browser Forward
29#define KC_LOWR LOWER
30#define KC_RASE RAISE
31#define KC_RST RESET
32#define KC_BL_S BL_STEP
33#define KC_ENTS MT(MOD_LSFT, KC_ENT)
34
35const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
36
37 [_QWERTY] = KC_KEYMAP(
38 //,----+----+----+----+----+----. ,----+----+----+----+----+----.
39 GRV , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS,
40 //|----+----+----+----+----+----| |----+----+----+----+----+----|
41 TAB , Q , W , E , R , T , Y , U , I , O , P ,PLUS,
42 //|----+----+----+----+----+----| |----+----+----+----+----+----|
43 ESCC, A , S , D , F , G , H , J , K , L ,SCLN,QUOT,
44 //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
45 LSFT, Z , X , C , V , B ,SPC , LALT, N , M ,COMM,DOT ,SLSH,DEL ,
46 //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
47 LGUI,LOWR,SPC , BSPC,ENTS,RASE
48 // `----+----+----' `----+----+----'
49 ),
50
51 [_LOWER] = KC_KEYMAP(
52 //,----+----+----+----+----+----. ,----+----+----+----+----+----.
53 TILD,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,BSPC,
54 //|----+----+----+----+----+----| |----+----+----+----+----+----|
55 RST , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , ,
56 //|----+----+----+----+----+----| |----+----+----+----+----+----|
57 DEL ,CAPP,LEFT,RGHT, UP ,LBRC, RBRC, P4 , P5 , P6 ,PLUS,PIPE,
58 //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
59 BL_S,CPYP, , ,DOWN,LCBR,LPRN, RPRN,RCBR, P1 , P2 , P3 ,MINS, ,
60 //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
61 , ,DEL , DEL , , P0
62 // `----+----+----' `----+----+----'
63 ),
64
65 [_RAISE] = KC_KEYMAP(
66 //,----+----+----+----+----+----. ,----+----+----+----+----+----.
67 F12 , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,
68 //|----+----+----+----+----+----| |----+----+----+----+----+----|
69 ,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN, ,
70 //|----+----+----+----+----+----| |----+----+----+----+----+----|
71 DEL ,MPRV,BACK,FORW,PGUP,UNDS, EQL ,HOME, , , ,BSLS,
72 //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
73 MUTE,MSTP,MPLY,VOLD,PGDN,MINS, , ,PLUS,END , , , , ,
74 //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
75 , , , , ,
76 // `----+----+----' `----+----+----'
77 ),
78
79 [_ADJUST] = KEYMAP(
80 //,--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------.
81 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
82 //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
83 RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______,
84 //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
85 RESET , DEBUG , RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______,
86 //|--------+--------+--------+--------+--------+--------+--------. ,--------|--------+--------+--------+--------+--------+--------|
87 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
88 //`--------+--------+--------+----+---+--------+--------+--------/ \--------+--------+--------+---+----+--------+--------+--------'
89 _______, _______, _______, _______, _______, _______
90 // `--------+--------+--------' `--------+--------+--------'
91 )
92
93};
94
95#ifdef AUDIO_ENABLE
96float tone_qwerty[][2] = SONG(QWERTY_SOUND);
97#endif
98
99void persistent_default_layer_set(uint16_t default_layer) {
100 eeconfig_update_default_layer(default_layer);
101 default_layer_set(default_layer);
102}
103
104bool process_record_user(uint16_t keycode, keyrecord_t *record) {
105 switch (keycode) {
106 case QWERTY:
107 if (record->event.pressed) {
108 #ifdef AUDIO_ENABLE
109 PLAY_SONG(tone_qwerty);
110 #endif
111 persistent_default_layer_set(1UL<<_QWERTY);
112 }
113 return false;
114 break;
115 case LOWER:
116 if (record->event.pressed) {
117 layer_on(_LOWER);
118 update_tri_layer(_LOWER, _RAISE, _ADJUST);
119 } else {
120 layer_off(_LOWER);
121 update_tri_layer(_LOWER, _RAISE, _ADJUST);
122 }
123 return false;
124 break;
125 case RAISE:
126 if (record->event.pressed) {
127 layer_on(_RAISE);
128 update_tri_layer(_LOWER, _RAISE, _ADJUST);
129 } else {
130 layer_off(_RAISE);
131 update_tri_layer(_LOWER, _RAISE, _ADJUST);
132 }
133 return false;
134 break;
135 case ADJUST:
136 if (record->event.pressed) {
137 layer_on(_ADJUST);
138 } else {
139 layer_off(_ADJUST);
140 }
141 return false;
142 break;
143 }
144 return true;
145}
diff --git a/keyboards/iris/keymaps/yanfali/readme.md b/keyboards/iris/keymaps/yanfali/readme.md
new file mode 100644
index 000000000..f72e88e51
--- /dev/null
+++ b/keyboards/iris/keymaps/yanfali/readme.md
@@ -0,0 +1,17 @@
1## u/yanfali keymap for Iris
2
3Based heavily off Hexwire's configuration. Differs in following ways:
4
5 1. Moved LALT to LCTL; I don't need CTL because of ESCC.
6 1. Moved RAISE to old LALT.
7 1. Moved ENTER to old RAISE.
8 1. Move QUOTE to old ENTER.
9 1. Moved PLUS to old QUOTE.
10 1. replaced music next and volume up with browser forward and back
11 through history
12
13This configuration lets me use my thumbs for enter and backspace.
14It turns out I need `+` a lot for programming so I moved it logically
15below `-`. I also added a couple of web specific short cuts for
16navigating previous and next in web history on OSX Chrome.
17
diff --git a/keyboards/iris/keymaps/yanfali/rules.mk b/keyboards/iris/keymaps/yanfali/rules.mk
new file mode 100644
index 000000000..22b6ec476
--- /dev/null
+++ b/keyboards/iris/keymaps/yanfali/rules.mk
@@ -0,0 +1,6 @@
1RGBLIGHT_ENABLE = yes
2BACKLIGHT_ENABLE = yes
3
4ifndef QUANTUM_DIR
5 include ../../../../Makefile
6endif