diff options
| author | fauxpark <fauxpark@gmail.com> | 2021-09-20 16:58:29 +1000 |
|---|---|---|
| committer | fauxpark <fauxpark@gmail.com> | 2021-09-20 16:58:29 +1000 |
| commit | c38a7308054f2072d234ee0d44d3bea9f809a63d (patch) | |
| tree | f84f46444812526c63c3892ca1783834e91599d9 /users | |
| parent | 28b8b578b055bf76b28f47f9fd02db351cacfa09 (diff) | |
| parent | 574b6734afb6ec7073f6fb816dd454f03b7eb26f (diff) | |
| download | qmk_firmware-c38a7308054f2072d234ee0d44d3bea9f809a63d.tar.gz qmk_firmware-c38a7308054f2072d234ee0d44d3bea9f809a63d.zip | |
Merge remote-tracking branch 'upstream/master' into develop
Diffstat (limited to 'users')
| -rw-r--r-- | users/konstantin/config.h | 18 | ||||
| -rw-r--r-- | users/konstantin/konstantin.c | 86 | ||||
| -rw-r--r-- | users/konstantin/konstantin.h | 42 | ||||
| -rw-r--r-- | users/konstantin/post_config.h | 22 | ||||
| -rw-r--r-- | users/konstantin/rgb.c | 16 | ||||
| -rw-r--r-- | users/konstantin/rgb.h | 16 | ||||
| -rw-r--r-- | users/konstantin/tap_dance.c | 16 | ||||
| -rw-r--r-- | users/konstantin/tap_dance.h | 16 | ||||
| -rw-r--r-- | users/konstantin/unicode.c | 16 | ||||
| -rw-r--r-- | users/konstantin/unicode.h | 16 |
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)) |
| 41 | layer_state_t layer_state_set_keymap(layer_state_t state) { | ||
| 42 | return state; | ||
| 43 | } | ||
| 44 | |||
| 45 | layer_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)) | ||
| 60 | void led_set_keymap(uint8_t usb_led) {} | ||
| 61 | |||
| 62 | void led_set_user(uint8_t usb_led) { | ||
| 63 | led_set_keymap(usb_led); | ||
| 64 | } | ||
| 65 | |||
| 66 | __attribute__((weak)) | ||
| 67 | bool led_update_keymap(led_t led_state) { | ||
| 68 | return true; | ||
| 69 | } | ||
| 70 | |||
| 71 | bool led_update_user(led_t led_state) { | ||
| 72 | return led_update_keymap(led_state); | ||
| 73 | } | ||
| 74 | |||
| 75 | __attribute__((weak)) | ||
| 25 | bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { | 76 | bool 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)) | ||
| 96 | uint32_t layer_state_set_keymap(uint32_t state) { | ||
| 97 | return state; | ||
| 98 | } | ||
| 99 | |||
| 100 | layer_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)) | ||
| 115 | void led_set_keymap(uint8_t usb_led) {} | ||
| 116 | |||
| 117 | void led_set_user(uint8_t usb_led) { | ||
| 118 | led_set_keymap(usb_led); | ||
| 119 | } | ||
| 120 | |||
| 121 | __attribute__((weak)) | ||
| 122 | bool led_update_keymap(led_t led_state) { | ||
| 123 | return true; | ||
| 124 | } | ||
| 125 | |||
| 126 | bool 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 | ||
| 59 | enum keycodes_user { | ||
| 60 | CLEAR = SAFE_RANGE, | ||
| 61 | DST_P_R, | ||
| 62 | DST_N_A, | ||
| 63 | |||
| 64 | RANGE_KEYMAP, | ||
| 65 | }; | ||
| 66 | |||
| 67 | enum layers_user { | 75 | enum 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 | ||
| 87 | enum keycodes_user { | ||
| 88 | CLEAR = SAFE_RANGE, | ||
| 89 | DST_P_R, | ||
| 90 | DST_N_A, | ||
| 91 | |||
| 92 | RANGE_KEYMAP, | ||
| 93 | }; | ||
| 94 | |||
| 79 | void keyboard_pre_init_keymap(void); | 95 | void keyboard_pre_init_keymap(void); |
| 80 | void eeconfig_init_keymap(void); | 96 | void eeconfig_init_keymap(void); |
| 81 | void keyboard_post_init_keymap(void); | 97 | void keyboard_post_init_keymap(void); |
| 82 | 98 | ||
| 83 | bool process_record_keymap(uint16_t keycode, keyrecord_t *record); | 99 | layer_state_t layer_state_set_keymap(layer_state_t state); |
| 84 | uint32_t layer_state_set_keymap(uint32_t state); | 100 | |
| 85 | void led_set_keymap(uint8_t usb_led); | 101 | void led_set_keymap(uint8_t usb_led); |
| 86 | bool led_update_keymap(led_t led_state); | 102 | bool led_update_keymap(led_t led_state); |
| 103 | |||
| 104 | bool 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" |
