diff options
| author | James Young <18669334+noroadsleft@users.noreply.github.com> | 2021-08-19 11:32:23 -0700 |
|---|---|---|
| committer | James Young <18669334+noroadsleft@users.noreply.github.com> | 2021-08-19 11:32:23 -0700 |
| commit | 4279b14adffe081a3dfb17fa0f04ed21513e5eda (patch) | |
| tree | 770bd82b05595b686ad8cfdce79ea7f8439bda83 /users | |
| parent | 9d1c98c891bb8e1e98dc618e0693a7efff23a22e (diff) | |
| parent | f4f679779e1404d9dc34c64823b9eb993bfa7ab3 (diff) | |
| download | qmk_firmware-4279b14adffe081a3dfb17fa0f04ed21513e5eda.tar.gz qmk_firmware-4279b14adffe081a3dfb17fa0f04ed21513e5eda.zip | |
Merge remote-tracking branch 'upstream/master' into develop
Conflicts:
keyboards/gmmk/pro/ansi/keymaps/jonavin/rules.mk
keyboards/space_space/rules.mk
Diffstat (limited to 'users')
| -rw-r--r-- | users/ajp10304/ajp10304.c | 16 | ||||
| -rw-r--r-- | users/ajp10304/ajp10304.h | 16 | ||||
| -rw-r--r-- | users/ajp10304/readme.md | 2 | ||||
| -rw-r--r-- | users/jonavin/config.h | 30 | ||||
| -rw-r--r-- | users/jonavin/jonavin.c | 231 | ||||
| -rw-r--r-- | users/jonavin/jonavin.h | 82 | ||||
| -rw-r--r-- | users/jonavin/readme.md | 76 | ||||
| -rw-r--r-- | users/jonavin/rules.mk | 13 |
8 files changed, 465 insertions, 1 deletions
diff --git a/users/ajp10304/ajp10304.c b/users/ajp10304/ajp10304.c index 9cae65d5c..dd13787d6 100644 --- a/users/ajp10304/ajp10304.c +++ b/users/ajp10304/ajp10304.c | |||
| @@ -1,3 +1,19 @@ | |||
| 1 | /* Copyright 2021 Alan Pocklington | ||
| 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 "ajp10304.h" | 17 | #include "ajp10304.h" |
| 2 | 18 | ||
| 3 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | 19 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { |
diff --git a/users/ajp10304/ajp10304.h b/users/ajp10304/ajp10304.h index b96e00fc4..ec1ed11c0 100644 --- a/users/ajp10304/ajp10304.h +++ b/users/ajp10304/ajp10304.h | |||
| @@ -1,3 +1,19 @@ | |||
| 1 | /* Copyright 2021 Alan Pocklington | ||
| 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 QMK_KEYBOARD_H | 17 | #include QMK_KEYBOARD_H |
| 2 | 18 | ||
| 3 | enum ajp10304_layers { | 19 | enum ajp10304_layers { |
diff --git a/users/ajp10304/readme.md b/users/ajp10304/readme.md index 8e1a438aa..2ac0a6996 100644 --- a/users/ajp10304/readme.md +++ b/users/ajp10304/readme.md | |||
| @@ -14,7 +14,7 @@ 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/>. | 14 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 15 | 15 | ||
| 16 | # AJP10304 Custom 40% Layout | 16 | # AJP10304 Custom 40% Layout |
| 17 | # For the Planck, Shark, JJ40 and Atreus50 | 17 | # For the Planck, Shark, Quark, JJ40 and Atreus50 |
| 18 | 18 | ||
| 19 | **Note:** In the tables below where there are two characters on a key, | 19 | **Note:** In the tables below where there are two characters on a key, |
| 20 | the second is the output when shift is applied. | 20 | the second is the output when shift is applied. |
diff --git a/users/jonavin/config.h b/users/jonavin/config.h new file mode 100644 index 000000000..4f4568f70 --- /dev/null +++ b/users/jonavin/config.h | |||
| @@ -0,0 +1,30 @@ | |||
| 1 | /* Copyright 2021 Jonavin Eng | ||
| 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 | #define TAPPING_TOGGLE 2 // TT () set to two taps | ||
| 20 | |||
| 21 | /* Handle GRAVESC combo keys */ | ||
| 22 | #define GRAVE_ESC_ALT_OVERRIDE // Always send Escape if Alt is pressed | ||
| 23 | #define GRAVE_ESC_CTRL_OVERRIDE // Always send Escape if Control is pressed | ||
| 24 | |||
| 25 | #define TAPPING_TERM 180 | ||
| 26 | |||
| 27 | #ifdef RGB_MATRIX_ENABLE | ||
| 28 | #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR | ||
| 29 | #define RGB_DISABLE_WHEN_USB_SUSPENDED true | ||
| 30 | #endif | ||
diff --git a/users/jonavin/jonavin.c b/users/jonavin/jonavin.c new file mode 100644 index 000000000..d5fdb2a1e --- /dev/null +++ b/users/jonavin/jonavin.c | |||
| @@ -0,0 +1,231 @@ | |||
| 1 | |||
| 2 | /* Copyright 2021 Jonavin Eng @Jonavin | ||
| 3 | |||
| 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 | ||
| 6 | the Free Software Foundation, either version 2 of the License, or | ||
| 7 | (at your option) any later version. | ||
| 8 | |||
| 9 | This program is distributed in the hope that it will be useful, | ||
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | GNU General Public License for more details. | ||
| 13 | |||
| 14 | 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/>. | ||
| 16 | */ | ||
| 17 | |||
| 18 | |||
| 19 | #include QMK_KEYBOARD_H | ||
| 20 | #include "jonavin.h" | ||
| 21 | |||
| 22 | |||
| 23 | #ifdef TD_LSFT_CAPSLOCK_ENABLE | ||
| 24 | // Tap once for shift, twice for Caps Lock but only if Win Key in not disabled | ||
| 25 | void dance_LSFT_finished(qk_tap_dance_state_t *state, void *user_data) { | ||
| 26 | if (state->count == 1 || keymap_config.no_gui) { | ||
| 27 | register_code16(KC_LSFT); | ||
| 28 | } else { | ||
| 29 | register_code(KC_CAPS); | ||
| 30 | } | ||
| 31 | } | ||
| 32 | |||
| 33 | void dance_LSFT_reset(qk_tap_dance_state_t *state, void *user_data) { | ||
| 34 | if (state->count == 1 || keymap_config.no_gui) { | ||
| 35 | unregister_code16(KC_LSFT); | ||
| 36 | } else { | ||
| 37 | unregister_code(KC_CAPS); | ||
| 38 | } | ||
| 39 | } | ||
| 40 | |||
| 41 | qk_tap_dance_action_t tap_dance_actions[] = { | ||
| 42 | // Tap once for shift, twice for Caps Lock | ||
| 43 | [TD_LSFT_CAPSLOCK] = ACTION_TAP_DANCE_DOUBLE(KC_LSFT, KC_CAPS), | ||
| 44 | [TD_LSFT_CAPS_WIN] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_LSFT_finished, dance_LSFT_reset), | ||
| 45 | }; | ||
| 46 | #endif // TD_LSFT_CAPSLOCK_ENABLE | ||
| 47 | |||
| 48 | // TIMEOUTS | ||
| 49 | #ifdef IDLE_TIMEOUT_ENABLE | ||
| 50 | static uint16_t timeout_timer = 0; | ||
| 51 | static uint16_t timeout_counter = 0; //in minute intervals | ||
| 52 | static uint16_t timeout_threshold = TIMEOUT_THRESHOLD_DEFAULT; | ||
| 53 | |||
| 54 | uint16_t get_timeout_threshold(void) { | ||
| 55 | return timeout_threshold; | ||
| 56 | } | ||
| 57 | |||
| 58 | void timeout_reset_timer(void) { | ||
| 59 | timeout_timer = timer_read(); | ||
| 60 | timeout_counter = 0; | ||
| 61 | }; | ||
| 62 | |||
| 63 | void timeout_update_threshold(bool increase) { | ||
| 64 | if (increase && timeout_threshold < TIMEOUT_THRESHOLD_MAX) timeout_threshold++; | ||
| 65 | if (!increase && timeout_threshold > 0) timeout_threshold--; | ||
| 66 | }; | ||
| 67 | |||
| 68 | void timeout_tick_timer(void) { | ||
| 69 | if (timeout_threshold > 0) { | ||
| 70 | if (timer_elapsed(timeout_timer) >= 60000) { // 1 minute tick | ||
| 71 | timeout_counter++; | ||
| 72 | timeout_timer = timer_read(); | ||
| 73 | } | ||
| 74 | #ifdef RGB_MATRIX_ENABLE | ||
| 75 | if (timeout_threshold > 0 && timeout_counter >= timeout_threshold) { | ||
| 76 | rgb_matrix_disable_noeeprom(); | ||
| 77 | } | ||
| 78 | #endif | ||
| 79 | } // timeout_threshold = 0 will disable timeout | ||
| 80 | } | ||
| 81 | |||
| 82 | __attribute__((weak)) void matrix_scan_keymap(void) {} | ||
| 83 | |||
| 84 | void matrix_scan_user(void) { | ||
| 85 | timeout_tick_timer(); | ||
| 86 | matrix_scan_keymap(); | ||
| 87 | } | ||
| 88 | #endif // IDLE_TIMEOUT_ENABLE | ||
| 89 | |||
| 90 | |||
| 91 | #if defined(ENCODER_ENABLE) && defined(ENCODER_DEFAULTACTIONS_ENABLE) // Encoder Functionality | ||
| 92 | #ifndef DYNAMIC_KEYMAP_LAYER_COUNT | ||
| 93 | #define DYNAMIC_KEYMAP_LAYER_COUNT 4 //default in case this is not already defined elsewhere | ||
| 94 | #endif | ||
| 95 | #ifndef ENCODER_DEFAULTACTIONS_INDEX | ||
| 96 | #define ENCODER_DEFAULTACTIONS_INDEX 0 // can select encoder index if there are multiple encoders | ||
| 97 | #endif | ||
| 98 | |||
| 99 | uint8_t selected_layer = 0; | ||
| 100 | |||
| 101 | __attribute__((weak)) bool encoder_update_keymap(uint8_t index, bool clockwise) { return true; } | ||
| 102 | |||
| 103 | bool encoder_update_user(uint8_t index, bool clockwise) { | ||
| 104 | if (!encoder_update_keymap(index, clockwise)) { return false; } | ||
| 105 | if (index != ENCODER_DEFAULTACTIONS_INDEX) {return true;} // exit if the index doesn't match | ||
| 106 | if ( clockwise ) { | ||
| 107 | if (keyboard_report->mods & MOD_BIT(KC_LSFT) ) { // If you are holding L shift, encoder changes layers | ||
| 108 | if(selected_layer < (DYNAMIC_KEYMAP_LAYER_COUNT - 1)) { | ||
| 109 | selected_layer ++; | ||
| 110 | layer_move(selected_layer); | ||
| 111 | } | ||
| 112 | } else if (keyboard_report->mods & MOD_BIT(KC_RSFT) ) { // If you are holding R shift, Page up | ||
| 113 | unregister_mods(MOD_BIT(KC_RSFT)); | ||
| 114 | register_code(KC_PGDN); | ||
| 115 | register_mods(MOD_BIT(KC_RSFT)); | ||
| 116 | } else if (keyboard_report->mods & MOD_BIT(KC_LCTL)) { // if holding Left Ctrl, navigate next word | ||
| 117 | tap_code16(LCTL(KC_RGHT)); | ||
| 118 | } else if (keyboard_report->mods & MOD_BIT(KC_LALT)) { // if holding Left Alt, change media next track | ||
| 119 | tap_code(KC_MEDIA_NEXT_TRACK); | ||
| 120 | } else { | ||
| 121 | switch (selected_layer) { | ||
| 122 | case _FN1: | ||
| 123 | #ifdef IDLE_TIMEOUT_ENABLE | ||
| 124 | timeout_update_threshold(true); | ||
| 125 | #endif | ||
| 126 | break; | ||
| 127 | default: | ||
| 128 | tap_code(KC_VOLU); // Otherwise it just changes volume | ||
| 129 | break; | ||
| 130 | } | ||
| 131 | } | ||
| 132 | } else { | ||
| 133 | if (keyboard_report->mods & MOD_BIT(KC_LSFT) ) { | ||
| 134 | if (selected_layer > 0) { | ||
| 135 | selected_layer --; | ||
| 136 | layer_move(selected_layer); | ||
| 137 | } | ||
| 138 | } else if (keyboard_report->mods & MOD_BIT(KC_RSFT) ) { | ||
| 139 | unregister_mods(MOD_BIT(KC_RSFT)); | ||
| 140 | register_code(KC_PGUP); | ||
| 141 | register_mods(MOD_BIT(KC_RSFT)); | ||
| 142 | } else if (keyboard_report->mods & MOD_BIT(KC_LCTL)) { // if holding Left Ctrl, navigate previous word | ||
| 143 | tap_code16(LCTL(KC_LEFT)); | ||
| 144 | } else if (keyboard_report->mods & MOD_BIT(KC_LALT)) { // if holding Left Alt, change media previous track | ||
| 145 | tap_code(KC_MEDIA_PREV_TRACK); | ||
| 146 | } else { | ||
| 147 | switch (selected_layer) { | ||
| 148 | case _FN1: | ||
| 149 | #ifdef IDLE_TIMEOUT_ENABLE | ||
| 150 | timeout_update_threshold(false); | ||
| 151 | #endif | ||
| 152 | break; | ||
| 153 | default: | ||
| 154 | tap_code(KC_VOLD); | ||
| 155 | break; | ||
| 156 | } | ||
| 157 | } | ||
| 158 | } | ||
| 159 | |||
| 160 | return true; | ||
| 161 | } | ||
| 162 | #endif // ENCODER_ENABLE | ||
| 163 | |||
| 164 | |||
| 165 | // PROCESS KEY CODES | ||
| 166 | __attribute__ ((weak)) bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { return true; } | ||
| 167 | |||
| 168 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
| 169 | if (!process_record_keymap(keycode, record)) { return false; } | ||
| 170 | switch (keycode) { | ||
| 171 | case KC_00: | ||
| 172 | if (record->event.pressed) { | ||
| 173 | // when keycode KC_00 is pressed | ||
| 174 | SEND_STRING("00"); | ||
| 175 | } else unregister_code16(keycode); | ||
| 176 | break; | ||
| 177 | case KC_WINLCK: | ||
| 178 | if (record->event.pressed) { | ||
| 179 | keymap_config.no_gui = !keymap_config.no_gui; //toggle status | ||
| 180 | } else unregister_code16(keycode); | ||
| 181 | break; | ||
| 182 | |||
| 183 | #ifdef IDLE_TIMEOUT_ENABLE | ||
| 184 | case RGB_TOI: | ||
| 185 | if(record->event.pressed) { | ||
| 186 | timeout_update_threshold(true); | ||
| 187 | } else unregister_code16(keycode); | ||
| 188 | break; | ||
| 189 | case RGB_TOD: | ||
| 190 | if(record->event.pressed) { | ||
| 191 | timeout_update_threshold(false); //decrease timeout | ||
| 192 | } else unregister_code16(keycode); | ||
| 193 | break; | ||
| 194 | #endif // IDLE_TIMEOUT_ENABLE | ||
| 195 | |||
| 196 | default: | ||
| 197 | if (record->event.pressed) { | ||
| 198 | #ifdef RGB_MATRIX_ENABLE | ||
| 199 | rgb_matrix_enable(); | ||
| 200 | #endif | ||
| 201 | #ifdef IDLE_TIMEOUT_ENABLE | ||
| 202 | timeout_reset_timer(); //reset activity timer | ||
| 203 | #endif | ||
| 204 | } | ||
| 205 | break; | ||
| 206 | } | ||
| 207 | return true; | ||
| 208 | }; | ||
| 209 | |||
| 210 | |||
| 211 | // Turn on/off NUM LOCK if current state is different | ||
| 212 | void activate_numlock(bool turn_on) { | ||
| 213 | if (IS_HOST_LED_ON(USB_LED_NUM_LOCK) != turn_on) { | ||
| 214 | tap_code(KC_NUMLOCK); | ||
| 215 | } | ||
| 216 | } | ||
| 217 | |||
| 218 | |||
| 219 | // INITIAL STARTUP | ||
| 220 | |||
| 221 | __attribute__ ((weak)) void keyboard_post_init_keymap(void) {} | ||
| 222 | |||
| 223 | void keyboard_post_init_user(void) { | ||
| 224 | keyboard_post_init_keymap(); | ||
| 225 | #ifdef STARTUP_NUMLOCK_ON | ||
| 226 | activate_numlock(true); // turn on Num lock by default so that the numpad layer always has predictable results | ||
| 227 | #endif // STARTUP_NUMLOC_ON | ||
| 228 | #ifdef IDLE_TIMEOUT_ENABLE | ||
| 229 | timeout_timer = timer_read(); // set inital time for ide timeout | ||
| 230 | #endif | ||
| 231 | } | ||
diff --git a/users/jonavin/jonavin.h b/users/jonavin/jonavin.h new file mode 100644 index 000000000..894feddfd --- /dev/null +++ b/users/jonavin/jonavin.h | |||
| @@ -0,0 +1,82 @@ | |||
| 1 | |||
| 2 | /* Copyright 2021 Jonavin Eng @Jonavin | ||
| 3 | |||
| 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 | ||
| 6 | the Free Software Foundation, either version 2 of the License, or | ||
| 7 | (at your option) any later version. | ||
| 8 | |||
| 9 | This program is distributed in the hope that it will be useful, | ||
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | GNU General Public License for more details. | ||
| 13 | |||
| 14 | 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/>. | ||
| 16 | */ | ||
| 17 | |||
| 18 | #pragma once | ||
| 19 | |||
| 20 | // DEFINE MACROS | ||
| 21 | #define ARRAYSIZE(arr) sizeof(arr)/sizeof(arr[0]) | ||
| 22 | |||
| 23 | |||
| 24 | // LAYERS | ||
| 25 | enum custom_user_layers { | ||
| 26 | _BASE, | ||
| 27 | _FN1, | ||
| 28 | _LOWER, | ||
| 29 | _RAISE, | ||
| 30 | }; | ||
| 31 | |||
| 32 | // KEYCODES | ||
| 33 | enum custom_user_keycodes { | ||
| 34 | KC_00 = SAFE_RANGE, | ||
| 35 | ENCFUNC, | ||
| 36 | KC_WINLCK, //Toggles Win key on and off | ||
| 37 | RGB_TOI, // Timeout idle time up | ||
| 38 | RGB_TOD, // Timeout idle time down | ||
| 39 | }; | ||
| 40 | |||
| 41 | #define KC_CAD LALT(LCTL(KC_DEL)) | ||
| 42 | #define KC_AF4 LALT(KC_F4) | ||
| 43 | #define KC_TASK LCTL(LSFT(KC_ESC)) | ||
| 44 | |||
| 45 | |||
| 46 | #ifdef TD_LSFT_CAPSLOCK_ENABLE | ||
| 47 | // Tap Dance Definitions | ||
| 48 | enum custom_tapdance { | ||
| 49 | TD_LSFT_CAPSLOCK, | ||
| 50 | TD_LSFT_CAPS_WIN | ||
| 51 | }; | ||
| 52 | |||
| 53 | #define KC_LSFTCAPS TD(TD_LSFT_CAPSLOCK) | ||
| 54 | #define KC_LSFTCAPSWIN TD(TD_LSFT_CAPS_WIN) | ||
| 55 | #else // regular Shift | ||
| 56 | #define KC_LSFTCAPS KC_LSFT | ||
| 57 | #endif // TD_LSFT_CAPSLOCK_ENABLE | ||
| 58 | |||
| 59 | |||
| 60 | |||
| 61 | #ifdef RGB_MATRIX_ENABLE | ||
| 62 | //RGB custom colours | ||
| 63 | #define RGB_GODSPEED 0x00, 0xE4, 0xFF // colour for matching keycaps | ||
| 64 | #define RGB_NAUTILUS 0x00, 0xA4, 0xA9 // Nautilus Font colours | ||
| 65 | #endif | ||
| 66 | |||
| 67 | |||
| 68 | // IDLE TIMEOUTS | ||
| 69 | #ifdef IDLE_TIMEOUT_ENABLE | ||
| 70 | #define TIMEOUT_THRESHOLD_DEFAULT 5 // default timeout minutes | ||
| 71 | #define TIMEOUT_THRESHOLD_MAX 140 // upper limits (2 hours and 10 minutes -- no rgb indicators above this value) | ||
| 72 | |||
| 73 | //prototype functions | ||
| 74 | uint16_t get_timeout_threshold(void); | ||
| 75 | void timeout_reset_timer(void); | ||
| 76 | void timeout_update_threshold(bool increase); | ||
| 77 | void timeout_tick_timer(void); | ||
| 78 | #endif //IDLE_TIMEOUT_ENABLE | ||
| 79 | |||
| 80 | |||
| 81 | // OTHER FUNCTION PROTOTYPE | ||
| 82 | void activate_numlock(bool turn_on); | ||
diff --git a/users/jonavin/readme.md b/users/jonavin/readme.md new file mode 100644 index 000000000..97fff6520 --- /dev/null +++ b/users/jonavin/readme.md | |||
| @@ -0,0 +1,76 @@ | |||
| 1 | Copyright 2021 Jonavin Eng @Jonavin | ||
| 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 | LAYERS: | ||
| 17 | 0 = _BASE | ||
| 18 | 1 = _FN1 | ||
| 19 | 2 = _LOWER | ||
| 20 | 3 = _RAISE | ||
| 21 | |||
| 22 | KEYCODES: | ||
| 23 | KC_CAD Ctrl-Alt-Del | ||
| 24 | KC_AF4 Alt-F4 | ||
| 25 | KC_TASK Windows Task Manager (Ctrl-Shift-Esc) | ||
| 26 | LSFT_CAPSLOCK When LSFT_CAPSLOCK_ENABLE is defined, hold for Shift double tap for CAPSLOCK; otherwise, just Shift | ||
| 27 | KC_00 double zero "00" | ||
| 28 | KC_WINLCK toggles LGui/Win key lock | ||
| 29 | RGB_TOI Increase Timeout idle time threshold | ||
| 30 | RGB_TOD Decrease Timeout idle time threshold | ||
| 31 | |||
| 32 | ENABLE FEATURES your keymap rules.mk | ||
| 33 | |||
| 34 | STARTUP_NUMLOCK_ON = yes | ||
| 35 | turns on NUMLOCK by default | ||
| 36 | |||
| 37 | ENCODER_DEFAULTACTIONS_ENABLE = yes | ||
| 38 | Enabled default encoder funtions | ||
| 39 | When enabled, use this in the keymap for an additional encoder processing | ||
| 40 | bool encoder_update_keymap(uint8_t index, bool clockwise) | ||
| 41 | |||
| 42 | OPTION: set ENCODER_DEFAULTACTIONS_INDEX to the encoder number if the encoder is not index 0 | ||
| 43 | |||
| 44 | TD_LSFT_CAPSLOCK_ENABLE = yes | ||
| 45 | This will enable double tap on Left Shift to toggle CAPSLOCK | ||
| 46 | KC_LSFTCAPS to bind to left Shift to enable feature | ||
| 47 | KC_LSFTCAPSWIN does the same thing but will not turn on CAPS when Win Lkey is disabled | ||
| 48 | |||
| 49 | IDLE_TIMEOUT_ENABLE = yes | ||
| 50 | Enables Timer functionality; for RGB idle timeouts that can be changed dynamically | ||
| 51 | When enabled, use this in the keymap for an additional matrix processing | ||
| 52 | void matrix_scan_keymap(void) | ||
| 53 | |||
| 54 | Functions: | ||
| 55 | u16int_t get_timeout_threshold(void) // returns the current timeout threshold | ||
| 56 | void timeout_update_threshold(bool increase) // change threshold: true = increase, false = decrease | ||
| 57 | void timeout_reset_timer(void) // resets timer (put in process_record_user if you override it) | ||
| 58 | void timeout_tick_timer(void) // registers time ticks (put in maxtrix_scan_user if you override it) | ||
| 59 | |||
| 60 | Other Functions: | ||
| 61 | - activate_numlock(bool turn_on) // true = turn on NUM LOCK, false = off | ||
| 62 | |||
| 63 | KEYMAP LEVEL ADDITIONAL PROCESSING FUNCTIONS | ||
| 64 | bool process_record_keymap(uint16_t keycode, keyrecord_t *record) | ||
| 65 | void keyboard_post_init_keymap(void) | ||
| 66 | |||
| 67 | LIST OF COMPATIBLE KEYMAPS | ||
| 68 | - gmmk/pro | ||
| 69 | - gmmk/pro/ansi | ||
| 70 | - keebio/quefrency/rev3 | ||
| 71 | - mechwild/mercutio | ||
| 72 | - mechwild/murphpad (*) | ||
| 73 | - mechwild/OBE (*) | ||
| 74 | - nopunin10did/kastenwagen (*) | ||
| 75 | |||
| 76 | (*) coming soon | ||
diff --git a/users/jonavin/rules.mk b/users/jonavin/rules.mk new file mode 100644 index 000000000..4e9ee08ff --- /dev/null +++ b/users/jonavin/rules.mk | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | SRC += jonavin.c | ||
| 2 | ifeq ($(strip $(ENCODER_DEFAULTACTIONS_ENABLE)), yes) | ||
| 3 | OPT_DEFS += -DENCODER_DEFAULTACTIONS_ENABLE | ||
| 4 | endif | ||
| 5 | ifeq ($(strip $(TD_LSFT_CAPSLOCK_ENABLE)), yes) | ||
| 6 | OPT_DEFS += -DTD_LSFT_CAPSLOCK_ENABLE | ||
| 7 | endif | ||
| 8 | ifeq ($(strip $(IDLE_TIMEOUT_ENABLE)), yes) | ||
| 9 | OPT_DEFS += -DIDLE_TIMEOUT_ENABLE | ||
| 10 | endif | ||
| 11 | ifeq ($(strip $(STARTUP_NUMLOCK_ON)), yes) | ||
| 12 | OPT_DEFS += -DSTARTUP_NUMLOCK_ON | ||
| 13 | endif | ||
