diff options
| author | jonavin <71780717+Jonavin@users.noreply.github.com> | 2021-10-11 21:03:58 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-11 18:03:58 -0700 |
| commit | ea2505901e39715bbca8245b7ea767eb56f630dc (patch) | |
| tree | 2aa76175b4a000c3d3c6fe13f5782bd93ac3507b /users | |
| parent | 633ef1441b23755186f95b55957c50fb5c568e9f (diff) | |
| download | qmk_firmware-ea2505901e39715bbca8245b7ea767eb56f630dc.tar.gz qmk_firmware-ea2505901e39715bbca8245b7ea767eb56f630dc.zip | |
[Keymap] Jonavin new obe keymap (#14657)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Jonavin <=>
Diffstat (limited to 'users')
| -rw-r--r-- | users/jonavin/jonavin.c | 32 | ||||
| -rw-r--r-- | users/jonavin/jonavin.h | 14 | ||||
| -rw-r--r-- | users/jonavin/readme.md | 106 | ||||
| -rw-r--r-- | users/jonavin/rules.mk | 3 |
4 files changed, 112 insertions, 43 deletions
diff --git a/users/jonavin/jonavin.c b/users/jonavin/jonavin.c index f53aa8664..1a0760ea8 100644 --- a/users/jonavin/jonavin.c +++ b/users/jonavin/jonavin.c | |||
| @@ -256,7 +256,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 256 | break; | 256 | break; |
| 257 | } | 257 | } |
| 258 | } | 258 | } |
| 259 | return true; | 259 | return false; |
| 260 | } | 260 | } |
| 261 | #endif // ENCODER_ENABLE | 261 | #endif // ENCODER_ENABLE |
| 262 | 262 | ||
| @@ -266,7 +266,7 @@ __attribute__ ((weak)) bool process_record_keymap(uint16_t keycode, keyrecord_t | |||
| 266 | 266 | ||
| 267 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | 267 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { |
| 268 | if (!process_record_keymap(keycode, record)) { return false; } | 268 | if (!process_record_keymap(keycode, record)) { return false; } |
| 269 | switch (keycode) { | 269 | switch (keycode) { |
| 270 | case KC_00: | 270 | case KC_00: |
| 271 | if (record->event.pressed) { | 271 | if (record->event.pressed) { |
| 272 | // when keycode KC_00 is pressed | 272 | // when keycode KC_00 is pressed |
| @@ -298,6 +298,34 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 298 | } else unregister_code16(keycode); | 298 | } else unregister_code16(keycode); |
| 299 | break; | 299 | break; |
| 300 | #endif // RGB_MATRIX_ENABLE | 300 | #endif // RGB_MATRIX_ENABLE |
| 301 | |||
| 302 | #ifdef EMOTICON_ENABLE | ||
| 303 | case EMO_SHRUG: | ||
| 304 | if (record->event.pressed) SEND_STRING("`\\_(\"/)_/`"); | ||
| 305 | else unregister_code16(keycode); | ||
| 306 | break; | ||
| 307 | case EMO_CONFUSE: | ||
| 308 | if (record->event.pressed) SEND_STRING("(*_*)"); | ||
| 309 | else unregister_code16(keycode); | ||
| 310 | break; | ||
| 311 | case EMO_TEARS: | ||
| 312 | if (record->event.pressed) SEND_STRING("(T_T)"); | ||
| 313 | else unregister_code16(keycode); | ||
| 314 | break; | ||
| 315 | case EMO_NERVOUS: | ||
| 316 | if (record->event.pressed) SEND_STRING("(~_~;)"); | ||
| 317 | else unregister_code16(keycode); | ||
| 318 | break; | ||
| 319 | case EMO_JOY: | ||
| 320 | if (record->event.pressed) SEND_STRING("(^o^)"); | ||
| 321 | else unregister_code16(keycode); | ||
| 322 | break; | ||
| 323 | case EMO_SAD: | ||
| 324 | if (record->event.pressed) SEND_STRING(":'-("); | ||
| 325 | else unregister_code16(keycode); | ||
| 326 | break; | ||
| 327 | #endif // EMOTICON_ENABLE | ||
| 328 | |||
| 301 | default: | 329 | default: |
| 302 | if (record->event.pressed) { | 330 | if (record->event.pressed) { |
| 303 | #ifdef RGB_MATRIX_ENABLE | 331 | #ifdef RGB_MATRIX_ENABLE |
diff --git a/users/jonavin/jonavin.h b/users/jonavin/jonavin.h index efe0301af..feaf6b6a1 100644 --- a/users/jonavin/jonavin.h +++ b/users/jonavin/jonavin.h | |||
| @@ -38,13 +38,23 @@ enum custom_user_keycodes { | |||
| 38 | RGB_TOD, // Timeout idle time down | 38 | RGB_TOD, // Timeout idle time down |
| 39 | RGB_NITE, // Turns off all rgb but allow rgb indicators to work | 39 | RGB_NITE, // Turns off all rgb but allow rgb indicators to work |
| 40 | 40 | ||
| 41 | EMO_SHRUG, // `\_("/)_/` | ||
| 42 | EMO_CONFUSE, // (*_*) | ||
| 43 | EMO_SAD, // :'-( | ||
| 44 | EMO_NERVOUS, // (~_~;) | ||
| 45 | EMO_JOY, // (^o^) | ||
| 46 | EMO_TEARS, // (T_T) | ||
| 47 | |||
| 41 | NEW_SAFE_RANGE // new safe range for keymap level custom keycodes | 48 | NEW_SAFE_RANGE // new safe range for keymap level custom keycodes |
| 42 | }; | 49 | }; |
| 43 | 50 | ||
| 44 | #define KC_CAD LALT(LCTL(KC_DEL)) | 51 | #define KC_CAD LALT(LCTL(KC_DEL)) |
| 45 | #define KC_AF4 LALT(KC_F4) | 52 | #define KC_AF4 LALT(KC_F4) |
| 46 | #define KC_TASK LCTL(LSFT(KC_ESC)) | 53 | #define KC_TASK LCTL(LSFT(KC_ESC)) |
| 47 | 54 | #define CT_PGUP RCTL(KC_PGUP) | |
| 55 | #define CT_PGDN RCTL(KC_PGDN) | ||
| 56 | #define CT_HOME RCTL(KC_HOME) | ||
| 57 | #define CT_END RCTL(KC_END) | ||
| 48 | 58 | ||
| 49 | #ifdef TD_LSFT_CAPSLOCK_ENABLE | 59 | #ifdef TD_LSFT_CAPSLOCK_ENABLE |
| 50 | // Tap Dance Definitions | 60 | // Tap Dance Definitions |
diff --git a/users/jonavin/readme.md b/users/jonavin/readme.md index c029796b4..9fccb8c73 100644 --- a/users/jonavin/readme.md +++ b/users/jonavin/readme.md | |||
| @@ -14,62 +14,90 @@ 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 | LAYERS: | 16 | LAYERS: |
| 17 | 0 = _BASE | 17 | - 0 = _BASE |
| 18 | 1 = _FN1 | 18 | - 1 = _FN1 |
| 19 | 2 = _LOWER | 19 | - 2 = _LOWER |
| 20 | 3 = _RAISE | 20 | - 3 = _RAISE |
| 21 | 21 | ||
| 22 | KEYCODES: | 22 | KEYCODES: |
| 23 | KC_CAD Ctrl-Alt-Del | 23 | - KC_CAD Ctrl-Alt-Del |
| 24 | KC_AF4 Alt-F4 | 24 | - KC_AF4 Alt-F4 |
| 25 | KC_TASK Windows Task Manager (Ctrl-Shift-Esc) | 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 | 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" | 27 | - KC_00 double zero "00" |
| 28 | KC_WINLCK toggles LGui/Win key lock | 28 | - KC_WINLCK toggles LGui/Win key lock |
| 29 | RGB_TOI Increase Timeout idle time threshold | 29 | - RGB_TOI Increase Timeout idle time threshold |
| 30 | RGB_TOD Decrease Timeout idle time threshold | 30 | - RGB_TOD Decrease Timeout idle time threshold |
| 31 | - CT_PGUP Ctrl-PgUp | ||
| 32 | - CT_PGDN Ctrl-PgDn | ||
| 33 | - CT_HOME Ctrl-HOme | ||
| 34 | - CT_END Ctrl-End | ||
| 35 | - | ||
| 36 | When EMOTICON_ENABLE = yes | ||
| 37 | - EMO_SHRUG `\_("/)_/` | ||
| 38 | - EMO_CONFUSE (*_*) | ||
| 39 | - EMD_TEARS (T_T) | ||
| 40 | - EMO_NERVOUS (~_~;) | ||
| 41 | - EMO_JOY (^o^) | ||
| 42 | |||
| 43 | |||
| 44 | AVAILABLE ENCODER ACTIONS: | ||
| 45 | - void encoder_action_volume(bool clockwise); | ||
| 46 | - void encoder_action_mediatrack(bool clockwise); | ||
| 47 | - void encoder_action_navword(bool clockwise); | ||
| 48 | - void encoder_action_navpage(bool clockwise); | ||
| 49 | - | ||
| 50 | - uint8_t get_selected_layer(void); | ||
| 51 | - void encoder_action_layerchange(bool clockwise); | ||
| 52 | - | ||
| 53 | - void encoder_action_rgb_speed(bool clockwise); | ||
| 54 | - void encoder_action_rgb_hue(bool clockwise); | ||
| 55 | - void encoder_action_rgb_saturation(bool clockwise); | ||
| 56 | - void encoder_action_rgb_brightness(bool clockwise); | ||
| 57 | - void encoder_action_rgb_mode(bool clockwise); | ||
| 58 | |||
| 31 | 59 | ||
| 32 | ENABLE FEATURES your keymap rules.mk | 60 | ENABLE FEATURES your keymap rules.mk |
| 61 | --------------------------------------- | ||
| 33 | 62 | ||
| 34 | STARTUP_NUMLOCK_ON = yes | 63 | STARTUP_NUMLOCK_ON = yes |
| 35 | turns on NUMLOCK by default | 64 | - turns on NUMLOCK by default |
| 36 | 65 | ||
| 37 | ENCODER_DEFAULTACTIONS_ENABLE = yes | 66 | ENCODER_DEFAULTACTIONS_ENABLE = yes |
| 38 | Enabled default encoder funtions | 67 | - Enabled default encoder funtions |
| 39 | When enabled, use this in the keymap for an additional encoder processing | 68 | - When enabled, use this in the keymap for an additional encoder processing |
| 40 | bool encoder_update_keymap(uint8_t index, bool clockwise) | 69 | - 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 | 70 | ||
| 71 | OPTION: set ENCODER_DEFAULTACTIONS_INDEX to the encoder number if the encoder is not index 0 | ||
| 72 | |||
| 44 | TD_LSFT_CAPSLOCK_ENABLE = yes | 73 | TD_LSFT_CAPSLOCK_ENABLE = yes |
| 45 | This will enable double tap on Left Shift to toggle CAPSLOCK | 74 | - This will enable double tap on Left Shift to toggle CAPSLOCK |
| 46 | KC_LSFTCAPS to bind to left Shift to enable feature | 75 | - 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 | 76 | - KC_LSFTCAPSWIN does the same thing but will not turn on CAPS when Win Lkey is disabled |
| 48 | 77 | ||
| 49 | IDLE_TIMEOUT_ENABLE = yes | 78 | IDLE_TIMEOUT_ENABLE = yes |
| 50 | Enables Timer functionality; for RGB idle timeouts that can be changed dynamically | 79 | - 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 | 80 | - When enabled, use this in the keymap for an additional matrix processing: void matrix_scan_keymap(void) |
| 52 | void matrix_scan_keymap(void) | 81 | |
| 53 | 82 | - Functions: | |
| 54 | Functions: | 83 | - u16int_t get_timeout_threshold(void) // returns the current timeout threshold |
| 55 | u16int_t get_timeout_threshold(void) // returns the current timeout threshold | 84 | - void timeout_update_threshold(bool increase) // change threshold: true = increase, false = decrease |
| 56 | void timeout_update_threshold(bool increase) // change threshold: true = increase, false = decrease | 85 | - void timeout_reset_timer(void) // resets timer (put in process_record_user if you override it) |
| 57 | void timeout_reset_timer(void) // resets timer (put in process_record_user if you override it) | 86 | - void timeout_tick_timer(void) // registers time ticks (put in maxtrix_scan_user if you override it) |
| 58 | void timeout_tick_timer(void) // registers time ticks (put in maxtrix_scan_user if you override it) | ||
| 59 | 87 | ||
| 60 | Other Functions: | 88 | Other Functions: |
| 61 | - activate_numlock(bool turn_on) // true = turn on NUM LOCK, false = off | 89 | - activate_numlock(bool turn_on) // true = turn on NUM LOCK, false = off |
| 62 | 90 | ||
| 63 | KEYMAP LEVEL ADDITIONAL PROCESSING FUNCTIONS | 91 | KEYMAP LEVEL ADDITIONAL PROCESSING FUNCTIONS |
| 64 | bool process_record_keymap(uint16_t keycode, keyrecord_t *record) | 92 | - bool process_record_keymap(uint16_t keycode, keyrecord_t *record) |
| 65 | void keyboard_post_init_keymap(void) | 93 | - void keyboard_post_init_keymap(void) |
| 66 | 94 | ||
| 67 | LIST OF COMPATIBLE KEYMAPS | 95 | LIST OF COMPATIBLE KEYMAPS |
| 68 | - gmmk/pro/ansi | 96 | - gmmk/pro/ansi |
| 69 | - keebio/quefrency/rev3 | 97 | - keebio/quefrency/rev3 |
| 70 | - mechwild/mercutio | 98 | - mechwild/mercutio |
| 71 | - mechwild/murphpad | 99 | - mechwild/murphpad |
| 72 | - mechwild/OBE (*) | 100 | - mechwild/OBE |
| 73 | - nopunin10did/kastenwagen (*) | 101 | - nopunin10did/kastenwagen (*) |
| 74 | 102 | ||
| 75 | (*) coming soon | 103 | (*) coming soon |
diff --git a/users/jonavin/rules.mk b/users/jonavin/rules.mk index e2918d9e2..eb279f629 100644 --- a/users/jonavin/rules.mk +++ b/users/jonavin/rules.mk | |||
| @@ -14,3 +14,6 @@ endif | |||
| 14 | ifeq ($(strip $(COLEMAK_LAYER_ENABLE)), yes) | 14 | ifeq ($(strip $(COLEMAK_LAYER_ENABLE)), yes) |
| 15 | OPT_DEFS += -DCOLEMAK_LAYER_ENABLE | 15 | OPT_DEFS += -DCOLEMAK_LAYER_ENABLE |
| 16 | endif | 16 | endif |
| 17 | ifeq ($(strip $(EMOTICON_ENABLE)), yes) | ||
| 18 | OPT_DEFS += -DEMOTICON_ENABLE | ||
| 19 | endif | ||
