aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--keyboards/keebio/iris/keymaps/sq5rix/config.h25
-rw-r--r--keyboards/keebio/iris/keymaps/sq5rix/keymap.c185
-rw-r--r--keyboards/keebio/iris/keymaps/sq5rix/readme.md17
-rw-r--r--keyboards/keebio/iris/keymaps/sq5rix/rules.mk4
4 files changed, 231 insertions, 0 deletions
diff --git a/keyboards/keebio/iris/keymaps/sq5rix/config.h b/keyboards/keebio/iris/keymaps/sq5rix/config.h
new file mode 100644
index 000000000..8c576917e
--- /dev/null
+++ b/keyboards/keebio/iris/keymaps/sq5rix/config.h
@@ -0,0 +1,25 @@
1/*
2Copyright 2017 Danny Nguyen <danny@keeb.io>
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#pragma once
19#define EE_HANDS
20#define TAPPING_TERM 164
21#define IGNORE_MOD_TAP_INTERRUPT
22#define PERMISSIVE_HOLD
23#define RGBLIGHT_LAYERS
24#define ENCODER_RESOLUTION 4
25#define ENCODER_DEFAULT_POS 0x3
diff --git a/keyboards/keebio/iris/keymaps/sq5rix/keymap.c b/keyboards/keebio/iris/keymaps/sq5rix/keymap.c
new file mode 100644
index 000000000..19a939a55
--- /dev/null
+++ b/keyboards/keebio/iris/keymaps/sq5rix/keymap.c
@@ -0,0 +1,185 @@
1// Copyright 2021 Tomasz Wawer (@sq5rix)
2// SPDX-License-Identifier: GPL-2.0-or-later
3
4#include QMK_KEYBOARD_H
5
6enum layers {
7 _BEAKL15,
8 _LOWER,
9 _RAISE,
10 _MOUSE
11};
12
13enum custom_keycodes {
14 LT_DAT = SAFE_RANGE,
15 LT_COM,
16 LT_QUOT
17};
18
19#define LOWER LT(_LOWER, KC_ENT)
20#define LOWER2 LT(_LOWER, KC_T)
21#define RAISE LT(_RAISE, KC_SPC)
22#define RAISE2 LT(_RAISE, KC_BSPC)
23#define MOUSE LT(_MOUSE, KC_A)
24
25#define SH_ESC MT(MOD_LSFT, KC_ESC)
26#define SH_CWD MT(MOD_LALT, KC_BSPC)
27#define SH_LTAB MT(MOD_LALT, KC_TAB)
28#define SH_UND MT(MOD_LCTL, KC_UNDS)
29#define SH_Z MT(MOD_LCTL, KC_Z)
30
31#define SH_LGS MT(MOD_LGUI, KC_B)
32#define AL_I ALGR_T(KC_I)
33#define AL_N ALGR_T(KC_N)
34
35// Tap Dance definitions
36enum {
37 TD_S
38};
39qk_tap_dance_action_t tap_dance_actions[] = {
40 [TD_S] = ACTION_TAP_DANCE_DOUBLE(KC_S, KC_Z),
41};
42
43bool sh_key(keyrecord_t *record, uint8_t sk, uint8_t nk);
44bool sh_key8(keyrecord_t *record, uint8_t sk, uint8_t nk);
45
46const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
47
48 [_BEAKL15] = LAYOUT(
49 TG(_RAISE), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL,
50 SH_LTAB, KC_Q, KC_H, KC_O, KC_U, KC_X, KC_G, KC_C, KC_R, KC_F, KC_Z, KC_LGUI,
51 SH_UND, KC_Y, AL_I, KC_E, MOUSE, LT_DAT, KC_D, TD(TD_S),LOWER2, AL_N, KC_B, KC_SCLN,
52 KC_LSFT, KC_J, KC_SLSH, LT_COM, KC_K, LT_QUOT, RGB_TOG, BL_TOGG, KC_W, KC_M, KC_L, KC_P, KC_V, KC_RSFT,
53 SH_Z, LOWER, RAISE, SH_ESC, RAISE2, SH_LTAB
54 ),
55
56 [_LOWER] = LAYOUT(
57 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
58 _______, _______, KC_LT, KC_DLR, KC_GT, KC_EXLM, _______, KC_LBRC, KC_UNDS, KC_RBRC, KC_EXLM, _______,
59 _______, KC_BSLS, KC_LPRN, KC_DQUO, KC_RPRN, KC_HASH, KC_PERC, KC_LCBR, KC_EQL, KC_RCBR, KC_PIPE, _______,
60 _______, KC_SCLN, KC_SLSH, KC_ASTR, KC_PLUS, _______, _______, _______, _______, KC_AMPR, KC_CIRC, KC_TILD, KC_SCLN, _______,
61 _______, _______, _______, _______, _______, _______
62
63 ),
64
65 [_RAISE] = LAYOUT(
66 _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_BRIGHTNESS_DOWN, KC_BRIGHTNESS_UP, KC_PSCREEN, _______, _______, _______, _______, RESET,
67 _______, KC_SLSH, KC_6, KC_5, KC_4, KC_EQL, KC_CIRC, KC_PGUP, KC_UP, KC_PGDN, _______, RGB_VAI,
68 _______, KC_3, KC_2, KC_1, KC_0, KC_DOT, KC_EQL, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______,
69 _______, KC_ASTR, KC_9, KC_8, KC_7, KC_PLUS, _______, _______, KC_PLUS, KC_HOME, KC_COLN, KC_END, _______, RGB_MOD,
70 _______, _______, _______, _______, _______, _______
71 ),
72
73 [_MOUSE] = LAYOUT(
74 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
75 _______, _______, _______, _______, _______, _______, _______, KC_BTN1, KC_MS_U, KC_BTN2, _______, _______,
76 _______, _______, _______, KC_BTN1, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______,
77 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BTN3, _______, _______, _______,
78 _______, _______, _______, _______, _______, _______
79 )
80};
81
82bool process_record_user(uint16_t keycode, keyrecord_t *record) {
83 switch (keycode) {
84 case LT_DAT:
85 return sh_key8(record, KC_2, KC_DOT);
86 case LT_COM:
87 return sh_key8(record, KC_1, KC_COMM);
88 case LT_QUOT:
89 return sh_key(record, KC_GRV, KC_QUOT);
90 default:
91 return true;
92 }
93}
94
95bool sh_key(keyrecord_t *record, uint8_t sk, uint8_t nk){
96 if (record->event.pressed) {
97 if (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT)){
98 unregister_code(KC_LSFT);
99 unregister_code(KC_RSFT);
100 register_code(sk);
101 } else {
102 register_code(nk);
103 }
104 }
105 else {
106 unregister_code16(sk);
107 unregister_code(nk);
108 }
109 return false;
110}
111
112bool sh_key8(keyrecord_t *record, uint8_t sk, uint8_t nk){
113 if (record->event.pressed) {
114 if (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT)){
115 register_code(sk);
116 } else {
117 register_code(nk);
118 }
119 }
120 else {
121 unregister_code(sk);
122 unregister_code(nk);
123 }
124 return false;
125}
126
127bool encoder_update_user(uint8_t index, bool clockwise) {
128 if (index == 0) {
129 if (clockwise) {
130 tap_code16(C(G(KC_LEFT)));
131 } else {
132 tap_code16(C(G(KC_RGHT)));
133 }
134 }
135 // tmux screen
136 else if (index == 1) {
137 switch(biton32(layer_state)){
138 case 0:
139 if (clockwise) {
140 send_string(SS_LCTL("B")"p");
141 } else {
142 send_string(SS_LCTL("B")"n");
143 }
144 break;
145 case _RAISE:
146 if (clockwise) {
147 tap_code16(C(G(KC_PGUP)));
148 } else {
149 tap_code16(C(G(KC_PGDN)));
150 }
151 break;
152 }
153 }
154 return true;
155}
156
157const rgblight_segment_t PROGMEM raise_layer[] = RGBLIGHT_LAYER_SEGMENTS(
158 {1, 12, HSV_RED}
159);
160const rgblight_segment_t PROGMEM lower_layer[] = RGBLIGHT_LAYER_SEGMENTS(
161 {1, 12, HSV_BLUE}
162);
163const rgblight_segment_t PROGMEM mouse_layer[] = RGBLIGHT_LAYER_SEGMENTS(
164 {1, 12, HSV_GREEN}
165);
166
167// Now define the array of layers. Later layers take precedence
168const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST(
169 lower_layer,
170 raise_layer,
171 mouse_layer
172);
173
174void keyboard_post_init_user(void) {
175 // Enable the LED layers
176 rgblight_layers = my_rgb_layers;
177}
178
179layer_state_t layer_state_set_user(layer_state_t state) {
180 rgblight_set_layer_state(0, layer_state_cmp(state, 2));
181 rgblight_set_layer_state(1, layer_state_cmp(state, 3));
182 rgblight_set_layer_state(2, layer_state_cmp(state, 4));
183 return state;
184}
185
diff --git a/keyboards/keebio/iris/keymaps/sq5rix/readme.md b/keyboards/keebio/iris/keymaps/sq5rix/readme.md
new file mode 100644
index 000000000..96370c74c
--- /dev/null
+++ b/keyboards/keebio/iris/keymaps/sq5rix/readme.md
@@ -0,0 +1,17 @@
1BEAKL-15 keymap for keebio iris
2@sq5rix tom wawer
3https://deskthority.net/wiki/BEAKL#BEAKL_15
4
5Modern keyboard map easy to learn
6very effective to type
7
8esc F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 Del
9 q h o u x g c r f z
10 - y i e a . d s t n b ;
11 j / , , k w m l p v
12
13 z enter space esc bkspc tab
14
15lots of special functions
16three layers with puncs, numbers and mouse
17
diff --git a/keyboards/keebio/iris/keymaps/sq5rix/rules.mk b/keyboards/keebio/iris/keymaps/sq5rix/rules.mk
new file mode 100644
index 000000000..3fc2bd976
--- /dev/null
+++ b/keyboards/keebio/iris/keymaps/sq5rix/rules.mk
@@ -0,0 +1,4 @@
1RGBLIGHT_ENABLE = yes
2TAP_DANCE_ENABLE = yes
3LTO_ENABLE = yes
4MOUSEKEY_ENABLE = yes