diff options
-rw-r--r-- | keyboards/handwired/riblee_f401/riblee_f401.h | 2 | ||||
-rw-r--r-- | keyboards/handwired/riblee_f401/rules.mk | 2 | ||||
-rw-r--r-- | layouts/community/ortho_5x12/riblee/config.h (renamed from keyboards/handwired/riblee_f401/keymaps/riblee/config.h) | 2 | ||||
-rw-r--r-- | layouts/community/ortho_5x12/riblee/keymap.c (renamed from keyboards/handwired/riblee_f401/keymaps/riblee/keymap.c) | 184 | ||||
-rw-r--r-- | layouts/community/ortho_5x12/riblee/readme.md (renamed from keyboards/handwired/riblee_f401/keymaps/riblee/readme.md) | 0 | ||||
-rw-r--r-- | layouts/community/ortho_5x12/riblee/rules.mk (renamed from keyboards/handwired/riblee_f401/keymaps/riblee/rules.mk) | 0 | ||||
-rw-r--r-- | users/riblee/readme.md | 14 | ||||
-rw-r--r-- | users/riblee/riblee.c | 166 | ||||
-rw-r--r-- | users/riblee/riblee.h | 56 | ||||
-rw-r--r-- | users/riblee/rules.mk | 1 |
10 files changed, 244 insertions, 183 deletions
diff --git a/keyboards/handwired/riblee_f401/riblee_f401.h b/keyboards/handwired/riblee_f401/riblee_f401.h index 306565a31..a1b326aae 100644 --- a/keyboards/handwired/riblee_f401/riblee_f401.h +++ b/keyboards/handwired/riblee_f401/riblee_f401.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | Copyright 2020 QMK Community, Daniel Reibl <janos.daniel.reibl@protonmail.com> | 2 | Copyright 2020 QMK Community, Janos Daniel Reibl <janos.daniel.reibl@protonmail.com> @riblee |
3 | 3 | ||
4 | This program is free software: you can redistribute it and/or modify | 4 | This program is free software: you can redistribute it and/or modify |
5 | it under the terms of the GNU General Public License as published by | 5 | it under the terms of the GNU General Public License as published by |
diff --git a/keyboards/handwired/riblee_f401/rules.mk b/keyboards/handwired/riblee_f401/rules.mk index bd4592d50..efe2522ee 100644 --- a/keyboards/handwired/riblee_f401/rules.mk +++ b/keyboards/handwired/riblee_f401/rules.mk | |||
@@ -22,3 +22,5 @@ BACKLIGHT_DRIVER = software | |||
22 | RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow | 22 | RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow |
23 | BLUETOOTH_ENABLE = no # Enable Bluetooth | 23 | BLUETOOTH_ENABLE = no # Enable Bluetooth |
24 | AUDIO_ENABLE = no # Audio output | 24 | AUDIO_ENABLE = no # Audio output |
25 | |||
26 | LAYOUTS = ortho_5x12 \ No newline at end of file | ||
diff --git a/keyboards/handwired/riblee_f401/keymaps/riblee/config.h b/layouts/community/ortho_5x12/riblee/config.h index bc80ffdd7..8dbff5e10 100644 --- a/keyboards/handwired/riblee_f401/keymaps/riblee/config.h +++ b/layouts/community/ortho_5x12/riblee/config.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* Copyright 2020 Daniel Reibl <janos.daniel.reibl@protonmail.com> | 1 | /* Copyright 2020 Janos Daniel Reibl <janos.daniel.reibl@protonmail.com> @riblee |
2 | * | 2 | * |
3 | * This program is free software: you can redistribute it and/or modify | 3 | * This program is free software: you can redistribute it and/or modify |
4 | * it under the terms of the GNU General Public License as published by | 4 | * it under the terms of the GNU General Public License as published by |
diff --git a/keyboards/handwired/riblee_f401/keymaps/riblee/keymap.c b/layouts/community/ortho_5x12/riblee/keymap.c index eec732df5..ba5eb07b8 100644 --- a/keyboards/handwired/riblee_f401/keymaps/riblee/keymap.c +++ b/layouts/community/ortho_5x12/riblee/keymap.c | |||
@@ -1,5 +1,4 @@ | |||
1 | /* Copyright 2015-2017 Jack Humbert | 1 | /* Copyright 2020 Janos Daniel Reibl <janos.daniel.reibl@protonmail.com> @riblee |
2 | * Copyright 2020 Daniel Reibl <janos.daniel.reibl@protonmail.com> | ||
3 | * | 2 | * |
4 | * This program is free software: you can redistribute it and/or modify | 3 | * This program is free software: you can redistribute it and/or modify |
5 | * it under the terms of the GNU General Public License as published by | 4 | * it under the terms of the GNU General Public License as published by |
@@ -14,146 +13,8 @@ | |||
14 | * You should have received a copy of the GNU General Public License | 13 | * You should have received a copy of the GNU General Public License |
15 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | */ | 15 | */ |
16 | #include "riblee.h" | ||
17 | 17 | ||
18 | #include QMK_KEYBOARD_H | ||
19 | |||
20 | enum preonic_layers { | ||
21 | _QWERTY, | ||
22 | _COLEMAK, | ||
23 | _DVORAK, | ||
24 | _LOWER, | ||
25 | _RAISE, | ||
26 | _ADJUST | ||
27 | }; | ||
28 | |||
29 | enum preonic_keycodes { | ||
30 | QWERTY = SAFE_RANGE, | ||
31 | COLEMAK, | ||
32 | DVORAK, | ||
33 | BACKLIT | ||
34 | }; | ||
35 | |||
36 | #define LOWER MO(_LOWER) | ||
37 | #define RAISE MO(_RAISE) | ||
38 | |||
39 | // Tap Dance declarations | ||
40 | enum { | ||
41 | TD_A, | ||
42 | TD_E, | ||
43 | TD_I, | ||
44 | TD_O, | ||
45 | TD_U, | ||
46 | }; | ||
47 | |||
48 | const uint8_t shift = MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT); | ||
49 | |||
50 | // Tap Dance functions | ||
51 | void dance_key_a (qk_tap_dance_state_t *state, void *user_data) { | ||
52 | if (state->count == 1) { | ||
53 | SEND_STRING("a"); | ||
54 | reset_tap_dance(state); | ||
55 | } else if (state->count == 2) { | ||
56 | if (!(keyboard_report->mods & shift)) { | ||
57 | send_unicode_string("á"); | ||
58 | } else { | ||
59 | send_unicode_string("Á"); | ||
60 | } | ||
61 | |||
62 | reset_tap_dance(state); | ||
63 | } | ||
64 | } | ||
65 | |||
66 | void dance_key_e (qk_tap_dance_state_t *state, void *user_data) { | ||
67 | if (state->count == 1) { | ||
68 | SEND_STRING("e"); | ||
69 | reset_tap_dance(state); | ||
70 | } else if (state->count == 2) { | ||
71 | if (!(keyboard_report->mods & shift)) { | ||
72 | send_unicode_string("é"); | ||
73 | } else { | ||
74 | send_unicode_string("É"); | ||
75 | } | ||
76 | |||
77 | reset_tap_dance(state); | ||
78 | } | ||
79 | } | ||
80 | |||
81 | void dance_key_i (qk_tap_dance_state_t *state, void *user_data) { | ||
82 | if (state->count == 1) { | ||
83 | SEND_STRING("i"); | ||
84 | reset_tap_dance(state); | ||
85 | } else if (state->count == 2) { | ||
86 | if (!(keyboard_report->mods & shift)) { | ||
87 | send_unicode_string("í"); | ||
88 | } else { | ||
89 | send_unicode_string("Í"); | ||
90 | } | ||
91 | |||
92 | reset_tap_dance(state); | ||
93 | } | ||
94 | } | ||
95 | |||
96 | void dance_key_o (qk_tap_dance_state_t *state, void *user_data) { | ||
97 | if (state->count == 1) { | ||
98 | SEND_STRING("o"); | ||
99 | reset_tap_dance(state); | ||
100 | } else if (state->count == 2) { | ||
101 | if (!(keyboard_report->mods & shift)) { | ||
102 | send_unicode_string("ó"); | ||
103 | } else { | ||
104 | send_unicode_string("Ó"); | ||
105 | } | ||
106 | |||
107 | reset_tap_dance(state); | ||
108 | } else if (state->count == 3) { | ||
109 | if (!(keyboard_report->mods & shift)) { | ||
110 | send_unicode_string("ö"); | ||
111 | } else { | ||
112 | send_unicode_string("Ö"); | ||
113 | } | ||
114 | |||
115 | reset_tap_dance(state); | ||
116 | } else if (state->count == 4) { | ||
117 | if (!(keyboard_report->mods & shift)) { | ||
118 | send_unicode_string("ő"); | ||
119 | } else { | ||
120 | send_unicode_string("Ő"); | ||
121 | } | ||
122 | |||
123 | reset_tap_dance(state); | ||
124 | } | ||
125 | } | ||
126 | |||
127 | void dance_key_u (qk_tap_dance_state_t *state, void *user_data) { | ||
128 | if (state->count == 1) { | ||
129 | SEND_STRING("u"); | ||
130 | reset_tap_dance(state); | ||
131 | } else if (state->count == 2) { | ||
132 | if (!(keyboard_report->mods & shift)) { | ||
133 | send_unicode_string("ú"); | ||
134 | } else { | ||
135 | send_unicode_string("Ú"); | ||
136 | } | ||
137 | |||
138 | reset_tap_dance(state); | ||
139 | } else if (state->count == 3) { | ||
140 | if (!(keyboard_report->mods & shift)) { | ||
141 | send_unicode_string("ü"); | ||
142 | } else { | ||
143 | send_unicode_string("Ü"); | ||
144 | } | ||
145 | |||
146 | reset_tap_dance(state); | ||
147 | } else if (state->count == 4) { | ||
148 | if (!(keyboard_report->mods & shift)) { | ||
149 | send_unicode_string("ű"); | ||
150 | } else { | ||
151 | send_unicode_string("Ű"); | ||
152 | } | ||
153 | |||
154 | reset_tap_dance(state); | ||
155 | } | ||
156 | } | ||
157 | 18 | ||
158 | // Tap Dance definitions | 19 | // Tap Dance definitions |
159 | qk_tap_dance_action_t tap_dance_actions[] = { | 20 | qk_tap_dance_action_t tap_dance_actions[] = { |
@@ -299,43 +160,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
299 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | 160 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ |
300 | ) | 161 | ) |
301 | 162 | ||
302 | }; | 163 | }; \ No newline at end of file |
303 | |||
304 | layer_state_t layer_state_set_user(layer_state_t state) { | ||
305 | return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); | ||
306 | } | ||
307 | |||
308 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
309 | switch (keycode) { | ||
310 | case QWERTY: | ||
311 | if (record->event.pressed) { | ||
312 | set_single_persistent_default_layer(_QWERTY); | ||
313 | } | ||
314 | return false; | ||
315 | break; | ||
316 | case COLEMAK: | ||
317 | if (record->event.pressed) { | ||
318 | set_single_persistent_default_layer(_COLEMAK); | ||
319 | } | ||
320 | return false; | ||
321 | break; | ||
322 | case DVORAK: | ||
323 | if (record->event.pressed) { | ||
324 | set_single_persistent_default_layer(_DVORAK); | ||
325 | } | ||
326 | return false; | ||
327 | break; | ||
328 | case BACKLIT: | ||
329 | if (record->event.pressed) { | ||
330 | register_code(keycode_config(KC_LGUI)); | ||
331 | #ifdef BACKLIGHT_ENABLE | ||
332 | backlight_step(); | ||
333 | #endif | ||
334 | } else { | ||
335 | unregister_code(keycode_config(KC_LGUI)); | ||
336 | } | ||
337 | return false; | ||
338 | break; | ||
339 | } | ||
340 | return true; | ||
341 | }; | ||
diff --git a/keyboards/handwired/riblee_f401/keymaps/riblee/readme.md b/layouts/community/ortho_5x12/riblee/readme.md index 231f7afd3..231f7afd3 100644 --- a/keyboards/handwired/riblee_f401/keymaps/riblee/readme.md +++ b/layouts/community/ortho_5x12/riblee/readme.md | |||
diff --git a/keyboards/handwired/riblee_f401/keymaps/riblee/rules.mk b/layouts/community/ortho_5x12/riblee/rules.mk index 517f2700e..517f2700e 100644 --- a/keyboards/handwired/riblee_f401/keymaps/riblee/rules.mk +++ b/layouts/community/ortho_5x12/riblee/rules.mk | |||
diff --git a/users/riblee/readme.md b/users/riblee/readme.md new file mode 100644 index 000000000..54f5cc8bb --- /dev/null +++ b/users/riblee/readme.md | |||
@@ -0,0 +1,14 @@ | |||
1 | Copyright 2020 Janos Daniel Reibl <janos.daniel.reibl@protonmail.com> @riblee | ||
2 | |||
3 | This program is free software: you can redistribute it and/or modify | ||
4 | it under the terms of the GNU General Public License as published by | ||
5 | the Free Software Foundation, either version 2 of the License, or | ||
6 | (at your option) any later version. | ||
7 | |||
8 | This program is distributed in the hope that it will be useful, | ||
9 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | GNU General Public License for more details. | ||
12 | |||
13 | You should have received a copy of the GNU General Public License | ||
14 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
diff --git a/users/riblee/riblee.c b/users/riblee/riblee.c new file mode 100644 index 000000000..e1fe607ef --- /dev/null +++ b/users/riblee/riblee.c | |||
@@ -0,0 +1,166 @@ | |||
1 | /* Copyright 2020 Janos Daniel Reibl <janos.daniel.reibl@protonmail.com> @riblee | ||
2 | * | ||
3 | * This program is free software: you can redistribute it and/or modify | ||
4 | * it under the terms of the GNU General Public License as published by | ||
5 | * the Free Software Foundation, either version 2 of the License, or | ||
6 | * (at your option) any later version. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | |||
17 | #include "riblee.h" | ||
18 | |||
19 | const uint8_t shift = MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT); | ||
20 | |||
21 | // Tap Dance functions | ||
22 | void dance_key_a (qk_tap_dance_state_t *state, void *user_data) { | ||
23 | if (state->count == 1) { | ||
24 | SEND_STRING("a"); | ||
25 | reset_tap_dance(state); | ||
26 | } else if (state->count == 2) { | ||
27 | if (!(keyboard_report->mods & shift)) { | ||
28 | send_unicode_string("á"); | ||
29 | } else { | ||
30 | send_unicode_string("Á"); | ||
31 | } | ||
32 | |||
33 | reset_tap_dance(state); | ||
34 | } | ||
35 | } | ||
36 | |||
37 | void dance_key_e (qk_tap_dance_state_t *state, void *user_data) { | ||
38 | if (state->count == 1) { | ||
39 | SEND_STRING("e"); | ||
40 | reset_tap_dance(state); | ||
41 | } else if (state->count == 2) { | ||
42 | if (!(keyboard_report->mods & shift)) { | ||
43 | send_unicode_string("é"); | ||
44 | } else { | ||
45 | send_unicode_string("É"); | ||
46 | } | ||
47 | |||
48 | reset_tap_dance(state); | ||
49 | } | ||
50 | } | ||
51 | |||
52 | void dance_key_i (qk_tap_dance_state_t *state, void *user_data) { | ||
53 | if (state->count == 1) { | ||
54 | SEND_STRING("i"); | ||
55 | reset_tap_dance(state); | ||
56 | } else if (state->count == 2) { | ||
57 | if (!(keyboard_report->mods & shift)) { | ||
58 | send_unicode_string("í"); | ||
59 | } else { | ||
60 | send_unicode_string("Í"); | ||
61 | } | ||
62 | |||
63 | reset_tap_dance(state); | ||
64 | } | ||
65 | } | ||
66 | |||
67 | void dance_key_o (qk_tap_dance_state_t *state, void *user_data) { | ||
68 | if (state->count == 1) { | ||
69 | SEND_STRING("o"); | ||
70 | reset_tap_dance(state); | ||
71 | } else if (state->count == 2) { | ||
72 | if (!(keyboard_report->mods & shift)) { | ||
73 | send_unicode_string("ó"); | ||
74 | } else { | ||
75 | send_unicode_string("Ó"); | ||
76 | } | ||
77 | |||
78 | reset_tap_dance(state); | ||
79 | } else if (state->count == 3) { | ||
80 | if (!(keyboard_report->mods & shift)) { | ||
81 | send_unicode_string("ö"); | ||
82 | } else { | ||
83 | send_unicode_string("Ö"); | ||
84 | } | ||
85 | |||
86 | reset_tap_dance(state); | ||
87 | } else if (state->count == 4) { | ||
88 | if (!(keyboard_report->mods & shift)) { | ||
89 | send_unicode_string("ő"); | ||
90 | } else { | ||
91 | send_unicode_string("Ő"); | ||
92 | } | ||
93 | |||
94 | reset_tap_dance(state); | ||
95 | } | ||
96 | } | ||
97 | |||
98 | void dance_key_u (qk_tap_dance_state_t *state, void *user_data) { | ||
99 | if (state->count == 1) { | ||
100 | SEND_STRING("u"); | ||
101 | reset_tap_dance(state); | ||
102 | } else if (state->count == 2) { | ||
103 | if (!(keyboard_report->mods & shift)) { | ||
104 | send_unicode_string("ú"); | ||
105 | } else { | ||
106 | send_unicode_string("Ú"); | ||
107 | } | ||
108 | |||
109 | reset_tap_dance(state); | ||
110 | } else if (state->count == 3) { | ||
111 | if (!(keyboard_report->mods & shift)) { | ||
112 | send_unicode_string("ü"); | ||
113 | } else { | ||
114 | send_unicode_string("Ü"); | ||
115 | } | ||
116 | |||
117 | reset_tap_dance(state); | ||
118 | } else if (state->count == 4) { | ||
119 | if (!(keyboard_report->mods & shift)) { | ||
120 | send_unicode_string("ű"); | ||
121 | } else { | ||
122 | send_unicode_string("Ű"); | ||
123 | } | ||
124 | |||
125 | reset_tap_dance(state); | ||
126 | } | ||
127 | } | ||
128 | |||
129 | layer_state_t layer_state_set_user(layer_state_t state) { | ||
130 | return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); | ||
131 | } | ||
132 | |||
133 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
134 | switch (keycode) { | ||
135 | case QWERTY: | ||
136 | if (record->event.pressed) { | ||
137 | set_single_persistent_default_layer(_QWERTY); | ||
138 | } | ||
139 | return false; | ||
140 | break; | ||
141 | case COLEMAK: | ||
142 | if (record->event.pressed) { | ||
143 | set_single_persistent_default_layer(_COLEMAK); | ||
144 | } | ||
145 | return false; | ||
146 | break; | ||
147 | case DVORAK: | ||
148 | if (record->event.pressed) { | ||
149 | set_single_persistent_default_layer(_DVORAK); | ||
150 | } | ||
151 | return false; | ||
152 | break; | ||
153 | case BACKLIT: | ||
154 | if (record->event.pressed) { | ||
155 | register_code(keycode_config(KC_LGUI)); | ||
156 | #ifdef BACKLIGHT_ENABLE | ||
157 | backlight_step(); | ||
158 | #endif | ||
159 | } else { | ||
160 | unregister_code(keycode_config(KC_LGUI)); | ||
161 | } | ||
162 | return false; | ||
163 | break; | ||
164 | } | ||
165 | return true; | ||
166 | }; | ||
diff --git a/users/riblee/riblee.h b/users/riblee/riblee.h new file mode 100644 index 000000000..bdaa9f321 --- /dev/null +++ b/users/riblee/riblee.h | |||
@@ -0,0 +1,56 @@ | |||
1 | /* Copyright 2020 Janos Daniel Reibl <janos.daniel.reibl@protonmail.com> @riblee | ||
2 | * | ||
3 | * This program is free software: you can redistribute it and/or modify | ||
4 | * it under the terms of the GNU General Public License as published by | ||
5 | * the Free Software Foundation, either version 2 of the License, or | ||
6 | * (at your option) any later version. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | |||
17 | #pragma once | ||
18 | |||
19 | #include QMK_KEYBOARD_H | ||
20 | |||
21 | enum preonic_layers { | ||
22 | _QWERTY, | ||
23 | _COLEMAK, | ||
24 | _DVORAK, | ||
25 | _LOWER, | ||
26 | _RAISE, | ||
27 | _ADJUST | ||
28 | }; | ||
29 | |||
30 | enum preonic_keycodes { | ||
31 | QWERTY = SAFE_RANGE, | ||
32 | COLEMAK, | ||
33 | DVORAK, | ||
34 | BACKLIT | ||
35 | }; | ||
36 | |||
37 | #define LOWER MO(_LOWER) | ||
38 | #define RAISE MO(_RAISE) | ||
39 | |||
40 | // Tap Dance declarations | ||
41 | enum { | ||
42 | TD_A, | ||
43 | TD_E, | ||
44 | TD_I, | ||
45 | TD_O, | ||
46 | TD_U, | ||
47 | }; | ||
48 | |||
49 | void dance_key_a (qk_tap_dance_state_t *, void *); | ||
50 | void dance_key_e (qk_tap_dance_state_t *, void *); | ||
51 | void dance_key_i (qk_tap_dance_state_t *, void *); | ||
52 | void dance_key_o (qk_tap_dance_state_t *, void *); | ||
53 | void dance_key_u (qk_tap_dance_state_t *, void *); | ||
54 | |||
55 | layer_state_t layer_state_set_user(layer_state_t); | ||
56 | bool process_record_user(uint16_t keycode, keyrecord_t *record); \ No newline at end of file | ||
diff --git a/users/riblee/rules.mk b/users/riblee/rules.mk new file mode 100644 index 000000000..31c0645d7 --- /dev/null +++ b/users/riblee/rules.mk | |||
@@ -0,0 +1 @@ | |||
SRC += riblee.c \ No newline at end of file | |||