aboutsummaryrefslogtreecommitdiff
path: root/users/konstantin
diff options
context:
space:
mode:
Diffstat (limited to 'users/konstantin')
-rw-r--r--users/konstantin/config.h18
-rw-r--r--users/konstantin/konstantin.c86
-rw-r--r--users/konstantin/konstantin.h42
-rw-r--r--users/konstantin/post_config.h22
-rw-r--r--users/konstantin/rgb.c16
-rw-r--r--users/konstantin/rgb.h16
-rw-r--r--users/konstantin/tap_dance.c16
-rw-r--r--users/konstantin/tap_dance.h16
-rw-r--r--users/konstantin/unicode.c16
-rw-r--r--users/konstantin/unicode.h16
10 files changed, 216 insertions, 48 deletions
diff --git a/users/konstantin/config.h b/users/konstantin/config.h
index 2629cdd57..d42945236 100644
--- a/users/konstantin/config.h
+++ b/users/konstantin/config.h
@@ -1,3 +1,19 @@
1/* Copyright 2019-2021 Konstantin Đorđević <vomindoraan@gmail.com>
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
1#pragma once 17#pragma once
2 18
3// Keyboard reports 19// Keyboard reports
@@ -24,7 +40,7 @@
24// Tapping 40// Tapping
25#define PERMISSIVE_HOLD 41#define PERMISSIVE_HOLD
26#define TAPPING_TERM 200 42#define TAPPING_TERM 200
27#define TAPPING_TOGGLE 3 43#define TAPPING_TOGGLE 2
28 44
29// Unicode 45// Unicode
30#define UNICODE_CYCLE_PERSIST false 46#define UNICODE_CYCLE_PERSIST false
diff --git a/users/konstantin/konstantin.c b/users/konstantin/konstantin.c
index 3fdf5a4ca..5d80877f0 100644
--- a/users/konstantin/konstantin.c
+++ b/users/konstantin/konstantin.c
@@ -1,3 +1,19 @@
1/* Copyright 2019-2021 Konstantin Đorđević <vomindoraan@gmail.com>
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
1#include "konstantin.h" 17#include "konstantin.h"
2 18
3__attribute__((weak)) 19__attribute__((weak))
@@ -22,6 +38,41 @@ void keyboard_post_init_user(void) {
22} 38}
23 39
24__attribute__((weak)) 40__attribute__((weak))
41layer_state_t layer_state_set_keymap(layer_state_t state) {
42 return state;
43}
44
45layer_state_t layer_state_set_user(layer_state_t state) {
46 state = layer_state_set_keymap(state);
47
48#ifdef LAYER_NUMPAD
49 bool numpad = IS_LAYER_ON_STATE(state, L_NUMPAD);
50 bool num_lock = IS_HOST_LED_ON(USB_LED_NUM_LOCK);
51 if (numpad != num_lock) {
52 tap_code(KC_NLCK); // Toggle Num Lock to match Numpad layer state
53 }
54#endif
55
56 return state;
57}
58
59__attribute__((weak))
60void led_set_keymap(uint8_t usb_led) {}
61
62void led_set_user(uint8_t usb_led) {
63 led_set_keymap(usb_led);
64}
65
66__attribute__((weak))
67bool led_update_keymap(led_t led_state) {
68 return true;
69}
70
71bool led_update_user(led_t led_state) {
72 return led_update_keymap(led_state);
73}
74
75__attribute__((weak))
25bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { 76bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
26 return true; 77 return true;
27} 78}
@@ -91,38 +142,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
91 142
92 return true; 143 return true;
93} 144}
94
95__attribute__((weak))
96uint32_t layer_state_set_keymap(uint32_t state) {
97 return state;
98}
99
100layer_state_t layer_state_set_user(layer_state_t state) {
101 state = layer_state_set_keymap(state);
102
103#ifdef LAYER_NUMPAD
104 bool numpad = IS_LAYER_ON_STATE(state, L_NUMPAD);
105 bool num_lock = IS_HOST_LED_ON(USB_LED_NUM_LOCK);
106 if (numpad != num_lock) {
107 tap_code(KC_NLCK); // Toggle Num Lock to match Numpad layer state
108 }
109#endif
110
111 return state;
112}
113
114__attribute__((weak))
115void led_set_keymap(uint8_t usb_led) {}
116
117void led_set_user(uint8_t usb_led) {
118 led_set_keymap(usb_led);
119}
120
121__attribute__((weak))
122bool led_update_keymap(led_t led_state) {
123 return true;
124}
125
126bool led_update_user(led_t led_state) {
127 return led_update_keymap(led_state);
128}
diff --git a/users/konstantin/konstantin.h b/users/konstantin/konstantin.h
index 249b3fe15..7da1dbfd2 100644
--- a/users/konstantin/konstantin.h
+++ b/users/konstantin/konstantin.h
@@ -1,3 +1,19 @@
1/* Copyright 2019-2021 Konstantin Đorđević <vomindoraan@gmail.com>
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
1#pragma once 17#pragma once
2 18
3#include "quantum.h" 19#include "quantum.h"
@@ -56,14 +72,6 @@
56 set_mods(mods); \ 72 set_mods(mods); \
57 } 73 }
58 74
59enum keycodes_user {
60 CLEAR = SAFE_RANGE,
61 DST_P_R,
62 DST_N_A,
63
64 RANGE_KEYMAP,
65};
66
67enum layers_user { 75enum layers_user {
68 L_BASE, 76 L_BASE,
69#ifdef LAYER_FN 77#ifdef LAYER_FN
@@ -76,11 +84,21 @@ enum layers_user {
76 LAYERS_KEYMAP, 84 LAYERS_KEYMAP,
77}; 85};
78 86
87enum keycodes_user {
88 CLEAR = SAFE_RANGE,
89 DST_P_R,
90 DST_N_A,
91
92 RANGE_KEYMAP,
93};
94
79void keyboard_pre_init_keymap(void); 95void keyboard_pre_init_keymap(void);
80void eeconfig_init_keymap(void); 96void eeconfig_init_keymap(void);
81void keyboard_post_init_keymap(void); 97void keyboard_post_init_keymap(void);
82 98
83bool process_record_keymap(uint16_t keycode, keyrecord_t *record); 99layer_state_t layer_state_set_keymap(layer_state_t state);
84uint32_t layer_state_set_keymap(uint32_t state); 100
85void led_set_keymap(uint8_t usb_led); 101void led_set_keymap(uint8_t usb_led);
86bool led_update_keymap(led_t led_state); 102bool led_update_keymap(led_t led_state);
103
104bool process_record_keymap(uint16_t keycode, keyrecord_t *record);
diff --git a/users/konstantin/post_config.h b/users/konstantin/post_config.h
new file mode 100644
index 000000000..3199b2124
--- /dev/null
+++ b/users/konstantin/post_config.h
@@ -0,0 +1,22 @@
1/* Copyright 2021 Konstantin Đorđević <vomindoraan@gmail.com>
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// VIA
20#ifndef DYNAMIC_KEYMAP_LAYER_COUNT
21 #define DYNAMIC_KEYMAP_LAYER_COUNT 3
22#endif
diff --git a/users/konstantin/rgb.c b/users/konstantin/rgb.c
index fffa250f2..2eeef829b 100644
--- a/users/konstantin/rgb.c
+++ b/users/konstantin/rgb.c
@@ -1,3 +1,19 @@
1/* Copyright 2019-2021 Konstantin Đorđević <vomindoraan@gmail.com>
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
1#include "rgb.h" 17#include "rgb.h"
2 18
3#ifdef RGBLIGHT_EFFECT_BREATHING 19#ifdef RGBLIGHT_EFFECT_BREATHING
diff --git a/users/konstantin/rgb.h b/users/konstantin/rgb.h
index e09c5bd77..3425dcb06 100644
--- a/users/konstantin/rgb.h
+++ b/users/konstantin/rgb.h
@@ -1,3 +1,19 @@
1/* Copyright 2019-2021 Konstantin Đorđević <vomindoraan@gmail.com>
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
1#pragma once 17#pragma once
2 18
3#include "quantum.h" 19#include "quantum.h"
diff --git a/users/konstantin/tap_dance.c b/users/konstantin/tap_dance.c
index 4ec8caa63..57a29d98b 100644
--- a/users/konstantin/tap_dance.c
+++ b/users/konstantin/tap_dance.c
@@ -1,3 +1,19 @@
1/* Copyright 2019-2021 Konstantin Đorđević <vomindoraan@gmail.com>
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
1#include "tap_dance.h" 17#include "tap_dance.h"
2#include "konstantin.h" 18#include "konstantin.h"
3 19
diff --git a/users/konstantin/tap_dance.h b/users/konstantin/tap_dance.h
index 56889a19e..047662a8e 100644
--- a/users/konstantin/tap_dance.h
+++ b/users/konstantin/tap_dance.h
@@ -1,3 +1,19 @@
1/* Copyright 2019-2021 Konstantin Đorđević <vomindoraan@gmail.com>
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
1#pragma once 17#pragma once
2 18
3#include "quantum.h" 19#include "quantum.h"
diff --git a/users/konstantin/unicode.c b/users/konstantin/unicode.c
index 8ef5aaa1e..4eae716af 100644
--- a/users/konstantin/unicode.c
+++ b/users/konstantin/unicode.c
@@ -1,3 +1,19 @@
1/* Copyright 2019-2021 Konstantin Đorđević <vomindoraan@gmail.com>
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
1#include "unicode.h" 17#include "unicode.h"
2 18
3#ifdef UNICODEMAP_ENABLE 19#ifdef UNICODEMAP_ENABLE
diff --git a/users/konstantin/unicode.h b/users/konstantin/unicode.h
index b2616d120..1a1eb6089 100644
--- a/users/konstantin/unicode.h
+++ b/users/konstantin/unicode.h
@@ -1,3 +1,19 @@
1/* Copyright 2019-2021 Konstantin Đorđević <vomindoraan@gmail.com>
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
1#pragma once 17#pragma once
2 18
3#include "quantum.h" 19#include "quantum.h"