From 964ed177165072572112abfbdbba3317ed13170c Mon Sep 17 00:00:00 2001 From: ridingqwerty Date: Tue, 4 Feb 2020 14:17:10 -0500 Subject: [PATCH] ridingqwerty: userspace update (#8076) * Userspace overhaul * Remove testing directory * Minorca keymap tweaks --- .../atreus/keymaps/ridingqwerty/keymap.c | 143 ++- .../atreus/keymaps/ridingqwerty/rules.mk | 15 +- .../minorca/keymaps/ridingqwerty/config.h | 7 + .../minorca/keymaps/ridingqwerty/keymap.c | 123 ++ .../minorca/keymaps/ridingqwerty/readme.md | 1 + .../minorca/keymaps/ridingqwerty/rules.mk | 10 + users/ridingqwerty/config.h | 8 + users/ridingqwerty/dict.h | 1012 +++++++++++++++++ users/ridingqwerty/process_records.c | 467 +++++++- users/ridingqwerty/process_records.h | 55 +- users/ridingqwerty/ridingqwerty.c | 64 ++ users/ridingqwerty/ridingqwerty.h | 64 +- users/ridingqwerty/rules.mk | 20 +- users/ridingqwerty/tapdances.c | 33 + users/ridingqwerty/tapdances.h | 9 + users/ridingqwerty/unicode.c | 7 + users/ridingqwerty/unicode.h | 295 +++++ users/ridingqwerty/wrappers.h | 156 +++ 18 files changed, 2388 insertions(+), 101 deletions(-) create mode 100644 keyboards/handwired/minorca/keymaps/ridingqwerty/config.h create mode 100644 keyboards/handwired/minorca/keymaps/ridingqwerty/keymap.c create mode 100644 keyboards/handwired/minorca/keymaps/ridingqwerty/readme.md create mode 100644 keyboards/handwired/minorca/keymaps/ridingqwerty/rules.mk create mode 100644 users/ridingqwerty/dict.h create mode 100644 users/ridingqwerty/tapdances.c create mode 100644 users/ridingqwerty/tapdances.h create mode 100644 users/ridingqwerty/unicode.c create mode 100644 users/ridingqwerty/unicode.h create mode 100644 users/ridingqwerty/wrappers.h diff --git a/keyboards/atreus/keymaps/ridingqwerty/keymap.c b/keyboards/atreus/keymaps/ridingqwerty/keymap.c index 336df4973..1eeb17fd1 100644 --- a/keyboards/atreus/keymaps/ridingqwerty/keymap.c +++ b/keyboards/atreus/keymaps/ridingqwerty/keymap.c @@ -30,9 +30,7 @@ MODS // LAYERS // MODS // */ -#ifdef LAYOUT -#undef LAYOUT -#define LAYOUT( \ +#define LAYOUT_atreus( \ K00, K01, K02, K03, K04, K40, K41, K42, K43, K44, \ K10, K11, K12, K13, K14, K50, K51, K52, K53, K54, \ K20, K21, K22, K23, K24, K60, K61, K62, K63, K64, \ @@ -47,70 +45,109 @@ { K64, K63, K62, K61, K60, KC_NO }, \ { K75, K74, K73, K72, K71, K70 } \ } -#endif + +//#define ALPHA XP(UCM_LDEL, UCM_UDEL) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QWERTY] = LAYOUT( /* Qwerty */ - KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, - ED_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, NM_SCLN, - LS_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, FK_DOT, RS_SLSH, - LC_ESC, LG_TAB, LA_LBRC, LS_RBRC, NM_BSPC, ED_ESC, SC_TAB, SM_SPC, RS_MINS, RA_EQL, RG_QUOT, RC_ENT + [_QWERTY] = LAYOUT_atreus_wrapper( /* Qwerty */ + ________________ATREUS_L1__________________, ________________ATREUS_R1__________________, + ________________ATREUS_L2__________________, ________________ATREUS_R2__________________, + ________________ATREUS_L3__________________, ________________ATREUS_R3__________________, + ________________BOTTOM_L4__________________, ____THUMBS_R4___, ________________BOTTOM_R4__________________ ), - [_EDITOR] = LAYOUT( /* ED_A, ED_ESC */ - KC_GRV, _______, KC_END, _______, KC_TAB, _______, _______, KC_INS, _______, KC_PGUP, - KC_HOME, _______, KC_DELT, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_ENT, - _______, _______, _______, _______, _______, KC_PGDN, _______, _______, _______, KC_BSLS, - _______, _______, _______, _______, _______, _______, KC_ENT, _______, _______, _______, _______, _______ + [_DVORAK] = LAYOUT_atreus_wrapper( /* Qwerty */ + ________________DVORAK_L1__________________, ________________DVORAK_R1__________________, + ________________DVORAK_L2__________________, ________________DVORAK_R2__________________, + ________________DVORAK_L3__________________, ________________DVORAK_R3__________________, + ________________BOTTOM_L4__________________, ____THUMBS_R4___, ________________BOTTOM_R4__________________ ), - [_NUMBER] = LAYOUT( /* NM_SCLN, NM_BSPC */ - KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, - KC_6, KC_7, KC_8, KC_9, KC_0, _______, KC_4, KC_5, KC_6, _______, - _______, _______, _______, _______, _______, _______, KC_1, KC_2, KC_3, KC_BSLS, - _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_0, KC_0, KC_DOT, _______, _______ + [_COLEMAK] = LAYOUT_atreus_wrapper( /* Qwerty */ + ________________COLEMAK_L1_________________, ________________COLEMAK_R1_________________, + ________________COLEMAK_L2_________________, ________________COLEMAK_R2_________________, + ________________COLEMAK_L3_________________, ________________COLEMAK_R3_________________, + ________________BOTTOM_L4__________________, ____THUMBS_R4___, ________________BOTTOM_R4__________________ ), - [_SYMBOL] = LAYOUT( /* SM_SPC */ - KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, - KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, _______, _______, _______, KC_COLN, +//#if defined(UNICODEMAP_ENABLE) +//#ifdef UNICODE_H +#ifdef UNICODEMAP_ENABLE + [_GREEK] = LAYOUT_atreus_wrapper( + ________________GREEK_L1___________________, ________________GREEK_R1___________________, + ________________GREEK_L2___________________, ________________GREEK_R2___________________, + ________________GREEK_L3___________________, ________________GREEK_R3___________________, + ________________BOTTOM_L4__________________, ____THUMBS_R4___, ________________BOTTOM_R4__________________ + ), + [_RUSSIAN] = LAYOUT_atreus_wrapper( + ________________CYRLC_L1___________________, ________________CYRLC_R1___________________, + ________________CYRLC_L2___________________, ________________CYRLC_R2___________________, + ________________CYRLC_L3___________________, ________________CYRLC_R3___________________, + ________________BOTTOM_L4__________________, ____THUMBS_R4___, ________________CYRLC_R4___________________ + ), + [_RUNES] = LAYOUT_atreus_wrapper( + ________________FTHRK_L1___________________, ________________FTHRK_R1___________________, + ________________FTHRK_L2___________________, ________________FTHRK_R2___________________, + ________________FTHRK_L3___________________, ________________FTHRK_R3___________________, + ________________BOTTOM_L4__________________, ____THUMBS_R4___, ________________BOTTOM_R4__________________ + ), + [_HIRA1] = LAYOUT_atreus_wrapper( + ________________JIS1_L1____________________, ________________JIS1_R1____________________, + ________________JIS1_L2____________________, ________________JIS1_R2____________________, + ________________JIS1_L3____________________, ________________JIS1_R3____________________, + ________________BOTTOM_L4__________________, ____THUMBS_R4___, ________________BOTTOM_R4__________________ + ), + [_HIRA2] = LAYOUT_atreus_wrapper( + ________________JIS2_L1____________________, ________________JIS2_R1____________________, + ________________JIS2_L2____________________, ________________JIS2_R2____________________, + ________________JIS2_L3____________________, ________________JIS2_R3____________________, + ________________BOTTOM_L4__________________, ____THUMBS_R4___, ________________BOTTOM_R4__________________ + ), +#endif + [_EDITOR] = LAYOUT_atreus_wrapper( /* ED_A, ED_ESC */ + ________________EDITOR_L1__________________, ________________EDITOR_R1__________________, + ________________EDITOR_L2__________________, ________________EDITOR_R2__________________, + ________________EDITOR_L3__________________, ________________EDITOR_R3__________________, + _______, _______, _______, _______, _______, ________________, _______, _______, _______, _______, _______ + ), + [_NUMBER] = LAYOUT_atreus_wrapper( /* NM_SCLN, NM_BSPC */ + ________________NUMROW_L1__________________, ________________NUMROW_R1__________________, + ________________NUMROW_R1__________________, ________________NUMPAD_R2__________________, + ___________________________________________, ________________NUMPAD_R3__________________, + ___________________________________________, ________________, ________________NUMPAD_R4__________________ + ), + [_SYMBOL] = LAYOUT_atreus_wrapper( /* SM_SPC */ + ________________SYMROW_L1__________________, ________________SYMROW_R1__________________, + ________________SYMROW_R1__________________, ________________SYMROW_R1__________________, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BSLS, - _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, _______, _______, _______, _______, _______ + KC_LBRC, _______, _______, _______, _______, ________________, _______, _______, _______, _______, KC_RBRC ), - [_F_KEYS] = LAYOUT( /* FK_DOT */ - KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, - KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, _______, _______, _______, KC_F11, - KC_F11, KC_F12, _______, _______, _______, _______, _______, _______, _______, KC_F12, + [_F_KEYS] = LAYOUT_atreus_wrapper( /* FK_DOT */ + ________________FKEYROW_L1_________________, ________________FKEYROW_R1_________________, + ________________FKEYROW_R1_________________, ________________FKEYROW_L1_________________, + KC_F11, KC_F12, _______, _______, _______, KC_F11, KC_F12, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), - [_SECRET] = LAYOUT( /* shhhh... */ - RESET, _______, _______, RUSTY, FUEL, KC_F13, _______, _______, _______, _______, + [_DEBUG] = LAYOUT_atreus_wrapper( /* shhhh... */ + ________________DEBUG_L1___________________, ________________DEBUG_R1___________________, + ________________DEBUG_L2___________________, ________________DEBUG_R2___________________, + ________________DEBUG_L3___________________, ________________DEBUG_R3___________________, + _______, _______, _______, _______, _______, ________________, _______, _______, _______, _______, _______ + ), + [_SECRET] = LAYOUT_atreus_wrapper( /* shhhh... */ +/* + _______, _______, _______, RUSTY, FUEL, _______, _______, _______, _______, _______, AR1ST, SYSNOC, _______, _______, _______, _______, _______, _______, OS_LAB, _______, - CDLOCAL, _______, C0RE, VAXIS, _______, _______, MUNKY, _______, _______, _______, + CDLOCAL, _______, C0RE, VAXIS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +*/ + ________________SECRET_L1__________________, ________________SECRET_R1__________________, + ________________SECRET_L2__________________, ________________SECRET_R2__________________, + ________________SECRET_L3__________________, ________________SECRET_R3__________________, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), - [_FINAL] = LAYOUT( /* . */ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + [_FINAL] = LAYOUT_atreus( /* . */ + _______, _______, _______, _______, TESTING, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ) }; - -// custom tap/hold keys -uint16_t key_timer; -bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { - switch(keycode) { - case RG_QUOT: - if (record->event.pressed) { - key_timer = timer_read(); - layer_on(_NUMBER); - register_mods(MOD_BIT(KC_RGUI)); - } else { - unregister_mods(MOD_BIT(KC_RGUI)); - layer_off(_NUMBER); - if (timer_elapsed(key_timer) < TAPPING_TERM) { - tap_code(KC_QUOT); - } - } - return false; break; - } - return true; -}; diff --git a/keyboards/atreus/keymaps/ridingqwerty/rules.mk b/keyboards/atreus/keymaps/ridingqwerty/rules.mk index 95b257f75..5c89d5481 100644 --- a/keyboards/atreus/keymaps/ridingqwerty/rules.mk +++ b/keyboards/atreus/keymaps/ridingqwerty/rules.mk @@ -5,13 +5,14 @@ MCU = STM32F303 # BACKLIGHT_ENABLE = no BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration -#MOUSEKEY_ENABLE = yes # Mouse keys +MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = yes # Console for debug -COMMAND_ENABLE = yes # Commands for debug and configuration -#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # USB Nkey Rollover -AUDIO_ENABLE = yes +AUDIO_ENABLE = yes # Doot RGBLIGHT_ENABLE = no -# SERIAL_LINK_ENABLE = yes -#TAP_DANCE_ENABLE = yes +TAP_DANCE_ENABLE = no +UNICODE_ENABLE = no +UNICODEMAP_ENABLE = yes + diff --git a/keyboards/handwired/minorca/keymaps/ridingqwerty/config.h b/keyboards/handwired/minorca/keymaps/ridingqwerty/config.h new file mode 100644 index 000000000..c54aac318 --- /dev/null +++ b/keyboards/handwired/minorca/keymaps/ridingqwerty/config.h @@ -0,0 +1,7 @@ +#pragma once + +#undef MATRIX_COL_PINS +#define MATRIX_COL_PINS { B3, B7, D0, D1, D2, D3, C6, C7, B5, B6, F7, F6 } + +#undef MATRIX_ROW_PINS +#define MATRIX_ROW_PINS { F0, F1, F4, F5 } diff --git a/keyboards/handwired/minorca/keymaps/ridingqwerty/keymap.c b/keyboards/handwired/minorca/keymaps/ridingqwerty/keymap.c new file mode 100644 index 000000000..ae490914d --- /dev/null +++ b/keyboards/handwired/minorca/keymaps/ridingqwerty/keymap.c @@ -0,0 +1,123 @@ +/* Copyright 2019 George Koenig + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H +#include "ridingqwerty.h" + +/* MinOrca + ┏━━━━━━━━┯━━━━━━━━┯━━━━━━━━┯━━━━━━━━┯━━━━━━━━┯━━━━━━━━┯━━━━━━━━┯━━━━━━━━┯━━━━━━━━┯━━━━━━━━┯━━━━━━━━┯━━━━━━━━┓ + ┃ ⎋ │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ ❦ ⌫ ┃ + ┠────────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴────────┨ + ┃ ¶ ⇥ │ A │ S │ D │ F │ G │ H │ J │ K │ L │ 🔢 ↵ ┃ + ┠──────────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬───────────┨ + ┃ " ⇧ │ Z │ X │ C │ V │ B │ N │ M │ , │ 𝔽 . │ ⇧ / ┃ + ┠──────────┬───┴──────┬─┴────────┼────────┴────────┴──┬─────┴────────┴─────┬──┴───────┬┴───────┬┴───────────┨ + ┃ { ⎈ │ [ ⌘ │ ( ⌥ │ 🔢 ␣ │ ★ ␣ │ ) ⌥ │ ] ⌘ │ } ⎈ ┃ + ┗━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━┷━━━━━━━━━━━━┛ +*/ + +#define LAYOUT_minorca( \ + KA00, KA01, KA02, KA03, KA04, KA05, KA06, KA07, KA08, KA09, KA10, KA11, \ + KB00, KB01, KB02, KB03, KB04, KB05, KB06, KB07, KB08, KB09, KB11, \ + KC00, KC02, KC03, KC04, KC05, KC06, KC07, KC08, KC09, KC10, KC11, \ + KD00, KD02, KD03, KD04, KD07, KD09, KD10, KD11 \ +) { \ + { KA00, KA01, KA02, KA03, KA04, KA05, KA06, KA07, KA08, KA09, KA10, KA11 }, \ + { KB00, KB01, KB02, KB03, KB04, KB05, KB06, KB07, KB08, KB09, KC_NO, KB11 }, \ + { KC00, KC_NO, KC02, KC03, KC04, KC05, KC06, KC07, KC08, KC09, KC10, KC11 }, \ + { KD00, KC_NO, KD02, KD03, KD04, KC_NO, KC_NO, KD07, KC_NO, KD09, KD10, KD11 } \ +} + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = { + {KC_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, SC(BSPC) }, + {ED(TAB), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, XXXXXXX, NM(SCLN) }, + {LS(QUOT), XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, FK(DOT), RS(SLSH) }, + {LC(ESC), XXXXXXX, LG(LBRC), LA(RBRC), NM(BSPC), XXXXXXX, XXXXXXX, SM(SPC), XXXXXXX, RA(MINS), RG(EQL), RC(ENT) } +/* + //┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┴────────┤ + //├────────┴────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┬────────┤ + //├─────────────────┼────────┼────────┼────────┴────────┼────────┴────────┼────────┴────────┼────────┼────────┤ + //└─────────────────┴────────┴────────┴─────────────────┴─────────────────┴─────────────────┴────────┴────────┘ +*/ + + + }, +#ifdef UNICODE_H + [_RUNE] = { + {KC_ESC, X(INGWZ), X(WUNJO), X(EHWAZ), X(RAIDO), X(TIWAZ), X(IWAZ), X(UR), X(ISAZ), X(ETHEL), X(PERTH), SC(BSPC) }, + {ED(TAB), X(ANSUZ), X(SOWIL), X(DAGAZ), X(FE), X(GEBO), X(HAGLZ), X(JERAN), X(KAUNA), X(LAUKZ), XXXXXXX, NM(SCLN) }, + {MT_QUOT, XXXXXXX, X(ALGIZ), X(THURS), X(KAUNA), X(WUNJO), X(BEORC), X(NAUDZ), X(MANNZ), KC_COMM, FK(DOT), RS(SLSH) }, + {LC(ESC), XXXXXXX, LG(LBRC), LA(RBRC), NM(BSPC), XXXXXXX, XXXXXXX, SM(SPC), XXXXXXX, RA(MINS), RG(EQL), RC(ENT) } + }, +#endif + [_EDITOR] = { + //┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + {KC_GRV, _______, _______, KC_END, _______, KC_F5, _______, _______, KC_INS, _______, KC_PGUP, KC_DELT }, + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┴────────┤ + {_______, KC_HOME, _______, KC_DELT, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, KC_SCLN }, + //├────────┴────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┬────────┤ + {_______, XXXXXXX, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, KC_PGDN, _______, KC_SCLN, KC_QUOT, KC_BSLS }, + //├─────────────────┼────────┼────────┼────────┴────────┼────────┴────────┼────────┴────────┼────────┼────────┤ + {_______, XXXXXXX, _______, _______, KC_EQL, XXXXXXX, XXXXXXX, KC_MINS, XXXXXXX, KC_COLN, KC_DQUO, KC_PIPE } + //└─────────────────┴────────┴────────┴─────────────────┴─────────────────┴─────────────────┴────────┴────────┘ + }, + [_NUMBER] = { + //┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + {KC_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC }, + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┴────────┤ + {_______, KC_4, KC_5, KC_6, KC_PAST, _______, KC_PPLS, KC_4, KC_5, KC_6, XXXXXXX, _______ }, + //├────────┴────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┬────────┤ + {_______, KC_7, KC_8, KC_9, KC_SLSH, _______, _______, KC_MINS, KC_1, KC_2, KC_3, _______ }, + //├─────────────────┼────────┼────────┼────────┴────────┼────────┴────────┼────────┴────────┼────────┼────────┤ + {_______, XXXXXXX, KC_0, _______, _______, XXXXXXX, XXXXXXX, KC_0, XXXXXXX, KC_DOT, _______, _______ } + //└─────────────────┴────────┴────────┴─────────────────┴─────────────────┴─────────────────┴────────┴────────┘ + }, + [_SYMBOL] = { + //┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + {KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DELT }, + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┴────────┤ + {_______, _______, _______, _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, XXXXXXX, _______ }, + //├────────┴────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┬────────┤ + {_______, XXXXXXX, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, _______, _______, KC_SCLN, KC_QUOT, KC_BSLS }, + //├─────────────────┼────────┼────────┼────────┴────────┼────────┴────────┼────────┴────────┼────────┼────────┤ + {_______, XXXXXXX, _______, _______, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, KC_COLN, KC_DQUO, KC_PIPE } + //└─────────────────┴────────┴────────┴─────────────────┴─────────────────┴─────────────────┴────────┴────────┘ + }, + [_SECRET] = { + //┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + {RESET, _______, _______, _______, SECRET0, SECRET1, _______, _______, _______, _______, VERSION, _______ }, + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┴────────┤ + {_______, SECRET4, SECRET8, DEBUG, _______, _______, _______, _______, _______, SECRET7, XXXXXXX, MAKE }, + //├────────┴────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┬────────┤ + {_______, XXXXXXX, SECRET6, _______, SECRET2, SECRET5, _______, _______, SECRET3, _______, _______, _______ }, + //├─────────────────┼────────┼────────┼────────┴────────┼────────┴────────┼────────┴────────┼────────┼────────┤ + {_______, XXXXXXX, _______, _______, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, _______, _______, _______ } + //└─────────────────┴────────┴────────┴─────────────────┴─────────────────┴─────────────────┴────────┴────────┘ + }, + [_F_KEYS] = { + //┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + {KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11 }, + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┴────────┤ + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, _______ }, + //├────────┴────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┬────────┤ + {_______, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + //├─────────────────┼────────┼────────┼────────┴────────┼────────┴────────┼────────┴────────┼────────┼────────┤ + {_______, XXXXXXX, _______, _______, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, _______, _______, _______ } + //└─────────────────┴────────┴────────┴─────────────────┴─────────────────┴─────────────────┴────────┴────────┘ + }, +}; diff --git a/keyboards/handwired/minorca/keymaps/ridingqwerty/readme.md b/keyboards/handwired/minorca/keymaps/ridingqwerty/readme.md new file mode 100644 index 000000000..4f0b3564b --- /dev/null +++ b/keyboards/handwired/minorca/keymaps/ridingqwerty/readme.md @@ -0,0 +1 @@ +# Handwire of Minorca using teensy 2.0 diff --git a/keyboards/handwired/minorca/keymaps/ridingqwerty/rules.mk b/keyboards/handwired/minorca/keymaps/ridingqwerty/rules.mk new file mode 100644 index 000000000..ac798576a --- /dev/null +++ b/keyboards/handwired/minorca/keymaps/ridingqwerty/rules.mk @@ -0,0 +1,10 @@ +MCU = atmega32u4 +BOOTLOADER = halfkay + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +UNICODE_ENABLE = no # Unicode +UNICODEMAP_ENABLE = yes # Unicode Map diff --git a/users/ridingqwerty/config.h b/users/ridingqwerty/config.h index 2461b8b8d..6501efe62 100644 --- a/users/ridingqwerty/config.h +++ b/users/ridingqwerty/config.h @@ -1,3 +1,11 @@ #pragma once + +#define BOOTMAGIC_LITE_ROW 0 +#define BOOTMAGIC_LITE_COL 0 + #define TAPPING_TERM 175 #define MACRO_TIMER 5 +#define TAPPING_FORCE_HOLD_PER_KEY +// testing +#define TAPPING_TERM_PER_KEY +//#define IGNORE_MOD_TAP_INTERRUPT // rolling R3 "zxcv", etc... diff --git a/users/ridingqwerty/dict.h b/users/ridingqwerty/dict.h new file mode 100644 index 000000000..43d4d50b5 --- /dev/null +++ b/users/ridingqwerty/dict.h @@ -0,0 +1,1012 @@ +#pragma once + +// lower this number if a smaller dictionary is desired +#define NUMBER_OF_WORDS 1000 + +#define MAX_WORDS 1000 +#if (NUMBER_OF_WORDS > MAX_WORDS) +# error *** NUMBER_OF_WORDS must be between 0 and 1000 inclusive +#endif + +const char *dict[MAX_WORDS] = { \ +"the", \ +"of", \ +"to", \ +"and", \ +"a", \ +"in", \ +"is", \ +"it", \ +"you", \ +"that", \ +"he", \ +"was", \ +"for", \ +"on", \ +"are", \ +"with", \ +"as", \ +"I", \ +"his", \ +"they", \ +"be", \ +"at", \ +"one", \ +"have", \ +"this", \ +"from", \ +"or", \ +"had", \ +"by", \ +"not", \ +"word", \ +"but", \ +"what", \ +"some", \ +"we", \ +"can", \ +"out", \ +"other", \ +"were", \ +"all", \ +"there", \ +"when", \ +"up", \ +"use", \ +"your", \ +"how", \ +"said", \ +"an", \ +"each", \ +"she", \ +"which", \ +"do", \ +"their", \ +"time", \ +"if", \ +"will", \ +"way", \ +"about", \ +"many", \ +"then", \ +"them", \ +"write", \ +"would", \ +"like", \ +"so", \ +"these", \ +"her", \ +"long", \ +"make", \ +"thing", \ +"see", \ +"him", \ +"two", \ +"has", \ +"look", \ +"more", \ +"day", \ +"could", \ +"go", \ +"come", \ +"did", \ +"number", \ +"sound", \ +"no", \ +"most", \ +"people", \ +"my", \ +"over", \ +"know", \ +"water", \ +"than", \ +"call", \ +"first", \ +"who", \ +"may", \ +"down", \ +"side", \ +"been", \ +"now", \ +"find", \ +"any", \ +"new", \ +"work", \ +"part", \ +"take", \ +"get", \ +"place", \ +"made", \ +"live", \ +"where", \ +"after", \ +"back", \ +"little", \ +"only", \ +"round", \ +"man", \ +"year", \ +"came", \ +"show", \ +"every", \ +"good", \ +"me", \ +"give", \ +"our", \ +"under", \ +"name", \ +"very", \ +"through", \ +"just", \ +"form", \ +"sentence", \ +"great", \ +"think", \ +"say", \ +"help", \ +"low", \ +"line", \ +"differ", \ +"turn", \ +"cause", \ +"much", \ +"mean", \ +"before", \ +"move", \ +"right", \ +"boy", \ +"old", \ +"too", \ +"same", \ +"tell", \ +"does", \ +"set", \ +"three", \ +"want", \ +"air", \ +"well", \ +"also", \ +"play", \ +"small", \ +"end", \ +"put", \ +"home", \ +"read", \ +"hand", \ +"port", \ +"large", \ +"spell", \ +"add", \ +"even", \ +"land", \ +"here", \ +"must", \ +"big", \ +"high", \ +"such", \ +"follow", \ +"act", \ +"why", \ +"ask", \ +"men", \ +"change", \ +"went", \ +"light", \ +"kind", \ +"off", \ +"need", \ +"house", \ +"picture", \ +"try", \ +"us", \ +"again", \ +"animal", \ +"point", \ +"mother", \ +"world", \ +"near", \ +"build", \ +"self", \ +"earth", \ +"father", \ +"head", \ +"stand", \ +"own", \ +"page", \ +"should", \ +"country", \ +"found", \ +"answer", \ +"school", \ +"grow", \ +"study", \ +"still", \ +"learn", \ +"plant", \ +"cover", \ +"food", \ +"sun", \ +"four", \ +"between", \ +"state", \ +"keep", \ +"eye", \ +"never", \ +"last", \ +"let", \ +"thought", \ +"city", \ +"tree", \ +"cross", \ +"farm", \ +"hard", \ +"start", \ +"might", \ +"story", \ +"saw", \ +"far", \ +"sea", \ +"draw", \ +"left", \ +"late", \ +"run", \ +"don't", \ +"while", \ +"press", \ +"close", \ +"night", \ +"real", \ +"life", \ +"few", \ +"north", \ +"open", \ +"seem", \ +"together", \ +"next", \ +"white", \ +"children", \ +"begin", \ +"got", \ +"walk", \ +"example", \ +"ease", \ +"paper", \ +"group", \ +"always", \ +"music", \ +"those", \ +"both", \ +"mark", \ +"often", \ +"letter", \ +"until", \ +"mile", \ +"river", \ +"car", \ +"feet", \ +"care", \ +"second", \ +"book", \ +"carry", \ +"took", \ +"science", \ +"eat", \ +"room", \ +"friend", \ +"began", \ +"idea", \ +"fish", \ +"mountain", \ +"stop", \ +"once", \ +"base", \ +"hear", \ +"horse", \ +"cut", \ +"sure", \ +"watch", \ +"color", \ +"face", \ +"wood", \ +"main", \ +"enough", \ +"plain", \ +"girl", \ +"usual", \ +"young", \ +"ready", \ +"above", \ +"ever", \ +"red", \ +"list", \ +"though", \ +"feel", \ +"talk", \ +"bird", \ +"soon", \ +"body", \ +"dog", \ +"family", \ +"direct", \ +"pose", \ +"leave", \ +"song", \ +"measure", \ +"door", \ +"product", \ +"black", \ +"short", \ +"numeral", \ +"class", \ +"wind", \ +"question", \ +"happen", \ +"complete", \ +"ship", \ +"area", \ +"half", \ +"rock", \ +"order", \ +"fire", \ +"south", \ +"problem", \ +"piece", \ +"told", \ +"knew", \ +"pass", \ +"since", \ +"top", \ +"whole", \ +"king", \ +"space", \ +"heard", \ +"best", \ +"hour", \ +"better", \ +"true", \ +"during", \ +"hundred", \ +"five", \ +"remember", \ +"step", \ +"early", \ +"hold", \ +"west", \ +"ground", \ +"interest", \ +"reach", \ +"fast", \ +"verb", \ +"sing", \ +"listen", \ +"six", \ +"table", \ +"travel", \ +"less", \ +"morning", \ +"ten", \ +"simple", \ +"several", \ +"vowel", \ +"toward", \ +"war", \ +"lay", \ +"against", \ +"pattern", \ +"slow", \ +"center", \ +"love", \ +"person", \ +"money", \ +"serve", \ +"appear", \ +"road", \ +"map", \ +"rain", \ +"rule", \ +"govern", \ +"pull", \ +"cold", \ +"notice", \ +"voice", \ +"unit", \ +"power", \ +"town", \ +"fine", \ +"certain", \ +"fly", \ +"fall", \ +"lead", \ +"cry", \ +"dark", \ +"machine", \ +"note", \ +"wait", \ +"plan", \ +"figure", \ +"star", \ +"box", \ +"noun", \ +"field", \ +"rest", \ +"correct", \ +"able", \ +"pound", \ +"done", \ +"beauty", \ +"drive", \ +"stood", \ +"contain", \ +"front", \ +"teach", \ +"week", \ +"final", \ +"gave", \ +"green", \ +"oh", \ +"quick", \ +"develop", \ +"ocean", \ +"warm", \ +"free", \ +"minute", \ +"strong", \ +"special", \ +"mind", \ +"behind", \ +"clear", \ +"tail", \ +"produce", \ +"fact", \ +"street", \ +"inch", \ +"multiply", \ +"nothing", \ +"course", \ +"stay", \ +"wheel", \ +"full", \ +"force", \ +"blue", \ +"object", \ +"decide", \ +"surface", \ +"deep", \ +"moon", \ +"island", \ +"foot", \ +"system", \ +"busy", \ +"test", \ +"record", \ +"boat", \ +"common", \ +"gold", \ +"possible", \ +"plane", \ +"stead", \ +"dry", \ +"wonder", \ +"laugh", \ +"thousand", \ +"ago", \ +"ran", \ +"check", \ +"game", \ +"shape", \ +"equate", \ +"hot", \ +"miss", \ +"brought", \ +"heat", \ +"snow", \ +"tire", \ +"bring", \ +"yes", \ +"distant", \ +"fill", \ +"east", \ +"paint", \ +"language", \ +"among", \ +"grand", \ +"ball", \ +"yet", \ +"wave", \ +"drop", \ +"heart", \ +"am", \ +"present", \ +"heavy", \ +"dance", \ +"engine", \ +"position", \ +"arm", \ +"wide", \ +"sail", \ +"material", \ +"size", \ +"vary", \ +"settle", \ +"speak", \ +"weight", \ +"general", \ +"ice", \ +"matter", \ +"circle", \ +"pair", \ +"include", \ +"divide", \ +"syllable", \ +"felt", \ +"perhaps", \ +"pick", \ +"sudden", \ +"count", \ +"square", \ +"reason", \ +"length", \ +"represent", \ +"art", \ +"subject", \ +"region", \ +"energy", \ +"hunt", \ +"probable", \ +"bed", \ +"brother", \ +"egg", \ +"ride", \ +"cell", \ +"believe", \ +"fraction", \ +"forest", \ +"sit", \ +"race", \ +"window", \ +"store", \ +"summer", \ +"train", \ +"sleep", \ +"prove", \ +"lone", \ +"leg", \ +"exercise", \ +"wall", \ +"catch", \ +"mount", \ +"wish", \ +"sky", \ +"board", \ +"joy", \ +"winter", \ +"sat", \ +"written", \ +"wild", \ +"instrument", \ +"kept", \ +"glass", \ +"grass", \ +"cow", \ +"job", \ +"edge", \ +"sign", \ +"visit", \ +"past", \ +"soft", \ +"fun", \ +"bright", \ +"gas", \ +"weather", \ +"month", \ +"million", \ +"bear", \ +"finish", \ +"happy", \ +"hope", \ +"flower", \ +"clothe", \ +"strange", \ +"gone", \ +"jump", \ +"baby", \ +"eight", \ +"village", \ +"meet", \ +"root", \ +"buy", \ +"raise", \ +"solve", \ +"metal", \ +"whether", \ +"push", \ +"seven", \ +"paragraph", \ +"third", \ +"shall", \ +"held", \ +"hair", \ +"describe", \ +"cook", \ +"floor", \ +"either", \ +"result", \ +"burn", \ +"hill", \ +"safe", \ +"cat", \ +"century", \ +"consider", \ +"type", \ +"law", \ +"bit", \ +"coast", \ +"copy", \ +"phrase", \ +"silent", \ +"tall", \ +"sand", \ +"soil", \ +"roll", \ +"temperature", \ +"finger", \ +"industry", \ +"value", \ +"fight", \ +"lie", \ +"beat", \ +"excite", \ +"natural", \ +"view", \ +"sense", \ +"ear", \ +"else", \ +"quite", \ +"broke", \ +"case", \ +"middle", \ +"kill", \ +"son", \ +"lake", \ +"moment", \ +"scale", \ +"loud", \ +"spring", \ +"observe", \ +"child", \ +"straight", \ +"consonant", \ +"nation", \ +"dictionary", \ +"milk", \ +"speed", \ +"method", \ +"organ", \ +"pay", \ +"age", \ +"section", \ +"dress", \ +"cloud", \ +"surprise", \ +"quiet", \ +"stone", \ +"tiny", \ +"climb", \ +"cool", \ +"design", \ +"poor", \ +"lot", \ +"experiment", \ +"bottom", \ +"key", \ +"iron", \ +"single", \ +"stick", \ +"flat", \ +"twenty", \ +"skin", \ +"smile", \ +"crease", \ +"hole", \ +"trade", \ +"melody", \ +"trip", \ +"office", \ +"receive", \ +"row", \ +"mouth", \ +"exact", \ +"symbol", \ +"die", \ +"least", \ +"trouble", \ +"shout", \ +"except", \ +"wrote", \ +"seed", \ +"tone", \ +"join", \ +"suggest", \ +"clean", \ +"break", \ +"lady", \ +"yard", \ +"rise", \ +"bad", \ +"blow", \ +"oil", \ +"blood", \ +"touch", \ +"grew", \ +"cent", \ +"mix", \ +"team", \ +"wire", \ +"cost", \ +"lost", \ +"brown", \ +"wear", \ +"garden", \ +"equal", \ +"sent", \ +"choose", \ +"fell", \ +"fit", \ +"flow", \ +"fair", \ +"bank", \ +"collect", \ +"save", \ +"control", \ +"decimal", \ +"gentle", \ +"woman", \ +"captain", \ +"practice", \ +"separate", \ +"difficult", \ +"doctor", \ +"please", \ +"protect", \ +"noon", \ +"whose", \ +"locate", \ +"ring", \ +"character", \ +"insect", \ +"caught", \ +"period", \ +"indicate", \ +"radio", \ +"spoke", \ +"atom", \ +"human", \ +"history", \ +"effect", \ +"electric", \ +"expect", \ +"crop", \ +"modern", \ +"element", \ +"hit", \ +"student", \ +"corner", \ +"party", \ +"supply", \ +"bone", \ +"rail", \ +"imagine", \ +"provide", \ +"agree", \ +"thus", \ +"capital", \ +"won't", \ +"chair", \ +"danger", \ +"fruit", \ +"rich", \ +"thick", \ +"soldier", \ +"process", \ +"operate", \ +"guess", \ +"necessary", \ +"sharp", \ +"wing", \ +"create", \ +"neighbor", \ +"wash", \ +"bat", \ +"rather", \ +"crowd", \ +"corn", \ +"compare", \ +"poem", \ +"string", \ +"bell", \ +"depend", \ +"meat", \ +"rub", \ +"tube", \ +"famous", \ +"dollar", \ +"stream", \ +"fear", \ +"sight", \ +"thin", \ +"triangle", \ +"planet", \ +"hurry", \ +"chief", \ +"colony", \ +"clock", \ +"mine", \ +"tie", \ +"enter", \ +"major", \ +"fresh", \ +"search", \ +"send", \ +"yellow", \ +"gun", \ +"allow", \ +"print", \ +"dead", \ +"spot", \ +"desert", \ +"suit", \ +"current", \ +"lift", \ +"rose", \ +"continue", \ +"block", \ +"chart", \ +"hat", \ +"sell", \ +"success", \ +"company", \ +"subtract", \ +"event", \ +"particular", \ +"deal", \ +"swim", \ +"term", \ +"opposite", \ +"wife", \ +"shoe", \ +"shoulder", \ +"spread", \ +"arrange", \ +"camp", \ +"invent", \ +"cotton", \ +"born", \ +"determine", \ +"quart", \ +"nine", \ +"truck", \ +"noise", \ +"level", \ +"chance", \ +"gather", \ +"shop", \ +"stretch", \ +"throw", \ +"shine", \ +"property", \ +"column", \ +"molecule", \ +"select", \ +"wrong", \ +"gray", \ +"repeat", \ +"require", \ +"broad", \ +"prepare", \ +"salt", \ +"nose", \ +"plural", \ +"anger", \ +"claim", \ +"continent", \ +"oxygen", \ +"sugar", \ +"death", \ +"pretty", \ +"skill", \ +"women", \ +"season", \ +"solution", \ +"magnet", \ +"silver", \ +"thank", \ +"branch", \ +"match", \ +"suffix", \ +"especially", \ +"fig", \ +"afraid", \ +"huge", \ +"sister", \ +"steel", \ +"discuss", \ +"forward", \ +"similar", \ +"guide", \ +"experience", \ +"score", \ +"apple", \ +"bought", \ +"led", \ +"pitch", \ +"coat", \ +"mass", \ +"card", \ +"band", \ +"rope", \ +"slip", \ +"win", \ +"dream", \ +"evening", \ +"condition", \ +"feed", \ +"tool", \ +"total", \ +"basic", \ +"smell", \ +"valley", \ +"nor", \ +"double", \ +"seat", \ +"arrive", \ +"master", \ +"track", \ +"parent", \ +"shore", \ +"division", \ +"sheet", \ +"substance", \ +"favor", \ +"connect", \ +"post", \ +"spend", \ +"chord", \ +"fat", \ +"glad", \ +"original", \ +"share", \ +"station", \ +"dad", \ +"bread", \ +"charge", \ +"proper", \ +"bar", \ +"offer", \ +"segment", \ +"slave", \ +"duck", \ +"instant", \ +"market", \ +"degree", \ +"populate", \ +"chick", \ +"dear", \ +"enemy", \ +"reply", \ +"drink", \ +"occur", \ +"support", \ +"speech", \ +"nature", \ +"range", \ +"steam", \ +"motion", \ +"path", \ +"liquid", \ +"log", \ +"meant", \ +"quotient", \ +"teeth", \ +"shell", \ +"neck" \ +}; diff --git a/users/ridingqwerty/process_records.c b/users/ridingqwerty/process_records.c index be72883ec..b0b0b48a2 100644 --- a/users/ridingqwerty/process_records.c +++ b/users/ridingqwerty/process_records.c @@ -1,4 +1,7 @@ +#include +#include #include "ridingqwerty.h" +#include "dict.h" __attribute__ ((weak)) bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { @@ -10,23 +13,475 @@ bool process_record_secrets(uint16_t keycode, keyrecord_t *record) { return true; } -uint16_t user_key_timer; +/* +typedef union { + struct { + uint8_t aesthetic : 1, + spongebob : 1, + uppercase : 1, + australia : 1, + unusued : 4; + }; + uint8_t all; +} mode_config_t; +*/ +mode_config_t mode = {.all = 0U}; + +bool randword_seed = false; +uint8_t user_mod_state; +uint16_t rand_key; +uint16_t temp_keycode; +uint32_t user_key_timer; + bool process_record_user(uint16_t keycode, keyrecord_t *record) { +#ifdef CONSOLE_ENABLE + uprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed); +#endif + + temp_keycode = keycode; + if ((mode.all != 0U) && ((keycode != DB(TAB) || keycode != ED(ESC)) && ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX)))) { + temp_keycode &= 0xFF; + } + + if (mode.spongebob) { + switch(temp_keycode) { + case KC_A ... KC_Z: + if (record->event.pressed) { + (mode.uppercase ^= 1) == 0 ? tap_code16(S(temp_keycode)) : tap_code(temp_keycode); + } + return false; + } + } + + if (mode.aesthetic) { + switch(temp_keycode) { +#if defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) + case KC_A: + if (record->event.pressed) { + send_unicode_hex_string("039B"); + tap_code(KC_SPC); + } + return false; + case KC_E: + if (record->event.pressed) { + send_unicode_hex_string("039E"); + tap_code(KC_SPC); + } + return false; +#else + case A: + case E: + if (record->event.pressed) { + tap_code16(S(temp_keycode)); + tap_code(KC_SPC); + } + return false; +#endif + case KC_B ... KC_D: + case KC_F ... KC_Z: + if (record->event.pressed) { + tap_code16(S(temp_keycode)); + tap_code(KC_SPC); + } + return false; + case KC_1 ... KC_0: + if (record->event.pressed) { + tap_code(temp_keycode); + tap_code(KC_SPC); + } + return false; + + case KC_BSPC: + if (record->event.pressed) { + tap_code(KC_BSPC); + tap_code(KC_BSPC); + } + return false; + case KC_SPC: + if (record->event.pressed) { + tap_code(KC_SPC); + tap_code(KC_SPC); + tap_code(KC_SPC); + } + return false; + } + } + + if (mode.australia) { + switch(temp_keycode) { + // IDEMPOTENT + case KC_L: + case KC_O: + case KC_S: + case KC_Z: + case KC_8: + case KC_0: + if (record->event.pressed) { + tap_code(temp_keycode); + tap_code(KC_LEFT); + } + return false; + + // INVERSE + case KC_B: + if (record->event.pressed) { + tap_code(KC_Q); + tap_code(KC_LEFT); + } + return false; + case KC_Q: + if (record->event.pressed) { + tap_code(KC_B); + tap_code(KC_LEFT); + } + return false; + case KC_D: + if (record->event.pressed) { + tap_code(KC_P); + tap_code(KC_LEFT); + } + return false; + case KC_P: + if (record->event.pressed) { + tap_code(KC_D); + tap_code(KC_LEFT); + } + return false; + case KC_N: + if (record->event.pressed) { + tap_code(KC_U); + tap_code(KC_LEFT); + } + return false; + case KC_U: + if (record->event.pressed) { + tap_code(KC_N); + tap_code(KC_LEFT); + } + return false; + case KC_6: + if (record->event.pressed) { + tap_code(KC_9); + tap_code(KC_LEFT); + } + return false; + case KC_9: + if (record->event.pressed) { + tap_code(KC_6); + tap_code(KC_LEFT); + } + return false; + + // TRANSLATE + case KC_A: + if (record->event.pressed) { + send_unicode_hex_string("0250"); + tap_code(KC_LEFT); + return false; + } + break; + case KC_C: + if (record->event.pressed) { + send_unicode_hex_string("0254"); + tap_code(KC_LEFT); + return false; + } + break; + case KC_E: + if (record->event.pressed) { + send_unicode_hex_string("01DD"); + tap_code(KC_LEFT); + return false; + } + break; + case KC_F: + if (record->event.pressed) { + send_unicode_hex_string("025F"); + tap_code(KC_LEFT); + return false; + } + break; + case KC_G: + if (record->event.pressed) { + send_unicode_hex_string("0183"); + tap_code(KC_LEFT); + return false; + } + break; + case KC_H: + if (record->event.pressed) { + send_unicode_hex_string("0265"); + tap_code(KC_LEFT); + return false; + } + break; + case KC_I: + if (record->event.pressed) { + send_unicode_hex_string("1D09"); + tap_code(KC_LEFT); + return false; + } + break; + case KC_J: + if (record->event.pressed) { + send_unicode_hex_string("027E"); + tap_code(KC_LEFT); + return false; + } + break; + case KC_K: + if (record->event.pressed) { + send_unicode_hex_string("029E"); + tap_code(KC_LEFT); + return false; + } + break; + case KC_M: + if (record->event.pressed) { + send_unicode_hex_string("026F"); + tap_code(KC_LEFT); + return false; + } + break; + case KC_R: + if (record->event.pressed) { + send_unicode_hex_string("0279"); + tap_code(KC_LEFT); + return false; + } + break; + case KC_T: + if (record->event.pressed) { + send_unicode_hex_string("0287"); + tap_code(KC_LEFT); + return false; + } + break; + case KC_V: + if (record->event.pressed) { + send_unicode_hex_string("028C"); + tap_code(KC_LEFT); + return false; + } + break; + case KC_W: + if (record->event.pressed) { + send_unicode_hex_string("028D"); + tap_code(KC_LEFT); + return false; + } + break; + case KC_X: + if (record->event.pressed) { + send_unicode_hex_string("2717"); + tap_code(KC_LEFT); + return false; + } + break; + case KC_Y: + if (record->event.pressed) { + send_unicode_hex_string("028E"); + tap_code(KC_LEFT); + return false; + } + break; + case KC_1: + if (record->event.pressed) { + send_unicode_hex_string("0269"); + tap_code(KC_LEFT); + return false; + } + break; + case KC_2: + if (record->event.pressed) { + send_unicode_hex_string("3139"); + tap_code(KC_LEFT); + return false; + } + break; + case KC_3: + if (record->event.pressed) { + send_unicode_hex_string("0190"); + tap_code(KC_LEFT); + return false; + } + break; + case KC_4: + if (record->event.pressed) { + send_unicode_hex_string("3123"); + tap_code(KC_LEFT); + return false; + } + break; + case KC_5: + if (record->event.pressed) { + send_unicode_hex_string("03DB"); + tap_code(KC_LEFT); + return false; + } + break; + case KC_7: + if (record->event.pressed) { + send_unicode_hex_string("3125"); + tap_code(KC_LEFT); + } + return false; + + // CONTROLS + case KC_ENT: + if (record->event.pressed) { + tap_code(KC_END); + tap_code(KC_ENTER); + } + return false; + case KC_BSPC: + if (record->event.pressed) { + tap_code(KC_DELT); + } + return false; + case KC_SPC: + if (record->event.pressed) { + tap_code(KC_SPC); + tap_code(KC_LEFT); + } + return false; + } + } + switch(keycode) { + + case VERSION: + if (!record->event.pressed) { + send_string_with_delay_P(PSTR(QMK_KEYBOARD ":" QMK_KEYMAP "\nVersion:" QMK_VERSION ", built: " QMK_BUILDDATE "\n"), MACRO_TIMER); + } + break; + + case QWERTY ... COLEMAK: +#if defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) + case GREEK ... HIRAGAN: +#endif + if (record->event.pressed) { + //set_single_persistent_default_layer(keycode - QWERTY); + default_layer_set(1U << (keycode - QWERTY)); + } + break; + + case MAKE: + if (record->event.pressed) { + user_mod_state = get_mods() & MOD_MASK_CTRL; + if (user_mod_state) { + clear_mods(); + send_string_with_delay_P(PSTR("sleep 1 && "), MACRO_TIMER); + } + send_string_with_delay_P(PSTR("make " QMK_KEYBOARD ":" QMK_KEYMAP), MACRO_TIMER); + if (user_mod_state) { + send_string_with_delay_P(PSTR(":flash\n"), MACRO_TIMER); + reset_keyboard(); + } else { + send_string_with_delay_P(PSTR("\n"), MACRO_TIMER); + } + } + break; + + case RNGWORD: + if (randword_seed == false) { + randword_seed = true; + srand(timer_read32()); + } + rand_key = rand() % NUMBER_OF_WORDS; + if (record->event.pressed) { + send_string(dict[rand_key]); + tap_code(KC_SPC); + } + break; + case RG_QUOT: if (record->event.pressed) { - user_key_timer = timer_read(); +#if defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) + user_mod_state = get_mods() & MOD_MASK_ALT; + if (user_mod_state) { + unregister_mods(MOD_BIT(KC_RALT)); + send_unicode_hex_string("00B0"); + set_mods(user_mod_state); + return false; + } +#endif + user_key_timer = timer_read32(); layer_on(_NUMBER); register_mods(MOD_BIT(KC_RGUI)); } else { unregister_mods(MOD_BIT(KC_RGUI)); layer_off(_NUMBER); - if (timer_elapsed(user_key_timer) < TAPPING_TERM) { - register_code(KC_QUOT); - unregister_code(KC_QUOT); - } + if (timer_elapsed32(user_key_timer) < TAPPING_TERM) { + tap_code(KC_QUOT); + } } return false; break; + + case TESTING: + /* + if (record->event.pressed) { + int length = snprintf( NULL, 0, "%lu", test_number ); + char* str = malloc( length + 1 ); + snprintf( str, length + 1, "%lu", test_number ); + send_string(str); + free(str); + // make CFLAGS+="-lc -specs=nosys.specs" board:keymap + } + */ + break; + + case CCCV: // One key copy/paste + if (record->event.pressed) { + user_key_timer = timer_read32(); + } else { + if (timer_elapsed32(user_key_timer) > TAPPING_TERM) { // Hold, copy + register_code(KC_LCTL); + tap_code(KC_C); + unregister_code(KC_LCTL); + } else { // Tap, paste + register_code(KC_LCTL); + tap_code(KC_V); + unregister_code(KC_LCTL); + } + } + break; + + case SEED: + if (record->event.pressed) { + srand(timer_read32()); + } + break; + + case SARCASM: + if (record->event.pressed) { + if (!(mode.spongebob ^= 1)) { mode.all = 0U; }; + } + break; + + case VPRWAVE: + if (record->event.pressed) { + if (!(mode.aesthetic ^= 1)) { mode.all = 0U; }; + } + break; + + case STRAYA: + if (record->event.pressed) { + if (!(mode.australia ^= 1)) { mode.all = 0U; }; + } + break; + default: + if (record->event.pressed && record->event.key.col == 4 && record->event.key.row == 1) { + if (get_mods() & MOD_BIT(KC_RALT)) { + unregister_mods(MOD_BIT(KC_RALT)); + //send_unicode_hex_string("262D"); + tap_code(KC_BSPC); + set_mods(MOD_BIT(KC_RALT)); + return false; + } + } + break; + } return process_record_keymap(keycode, record) && process_record_secrets(keycode, record); diff --git a/users/ridingqwerty/process_records.h b/users/ridingqwerty/process_records.h index 2c453bcd9..47c5f6790 100644 --- a/users/ridingqwerty/process_records.h +++ b/users/ridingqwerty/process_records.h @@ -11,19 +11,48 @@ bool process_record_secrets(uint16_t keycode, keyrecord_t *record); bool process_record_keymap(uint16_t keycode, keyrecord_t *record); enum userspace_custom_keycodes { - FIRST = PLACEHOLDER_SAFE_RANGE, - RUSTY, - FUEL, - C0RE, - MUNKY, - AR1ST, - VAXIS, - OS_LAB, - CDLOCAL, - SYSNOC, + VERSION = PLACEHOLDER_SAFE_RANGE, + QWERTY, + DVORAK, + COLEMAK, +#if defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) + GREEK, + RUSSIAN, + RUNES, + HIRAGAN, +#endif + MAKE, RG_QUOT, - LAST + TESTING, + RNGWORD, + CCCV, + SEED, + SARCASM, + VPRWAVE, + STRAYA, + SECRET0, + SECRET1, + SECRET2, + SECRET3, + SECRET4, + SECRET5, + SECRET6, + SECRET7, + SECRET8, + NEW_SAFE_RANGE // start new keyboard-level declarations with NEW_SAFE_RANGE }; -bool process_record_secrets(uint16_t keycode, keyrecord_t *record); -bool process_record_keymap(uint16_t keycode, keyrecord_t *record); +// clang-format off +typedef union { + struct { + uint8_t aesthetic : 1, + spongebob : 1, + uppercase : 1, + australia : 1, + unusued : 4; + }; + uint8_t all; +} mode_config_t; +// clang-format on + +extern mode_config_t mode; diff --git a/users/ridingqwerty/ridingqwerty.c b/users/ridingqwerty/ridingqwerty.c index fd39021da..ee6e7e897 100644 --- a/users/ridingqwerty/ridingqwerty.c +++ b/users/ridingqwerty/ridingqwerty.c @@ -1 +1,65 @@ #include "ridingqwerty.h" + +__attribute__((weak)) +void matrix_init_keymap(void) {} + +void matrix_init_user(void) { + matrix_init_keymap(); + +#if defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) + set_unicode_input_mode(UC_LNX); +#endif + + //set_single_persistent_default_layer(_QWERTY); + default_layer_set(1U << _QWERTY); +} + +__attribute__((weak)) +void matrix_scan_keymap(void) { +} + +void matrix_scan_user(void) { + // use for global event timers +} + +__attribute__((weak)) +void keyboard_post_init_keymap(void) {} + +void keyboard_post_init_user(void) { +#if defined(CONSOLE_ENABLE) + debug_enable = true; + debug_matrix = true; + //debug_keyboard=true; + //debug_mouse=true; +#endif +} + +__attribute__((weak)) +layer_state_t layer_state_set_keymap(layer_state_t state) { return state; } + +layer_state_t layer_state_set_user(layer_state_t state) { + state = update_tri_layer_state(state, _EDITOR, _DEBUG, _SECRET); +#ifdef CONSOLE_ENABLE + uprintf("LAYER: %u\n", state); +#endif + return state; +} + +uint16_t get_tapping_term(uint16_t keycode) { + switch (keycode) { + case RC(ENT): + case ED(ESC): + return 225; + default: + return TAPPING_TERM; + } +}; + +bool get_tapping_force_hold(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case NM(SCLN): + return true; + default: + return false; + } +} diff --git a/users/ridingqwerty/ridingqwerty.h b/users/ridingqwerty/ridingqwerty.h index ae5262567..6bd4aa570 100644 --- a/users/ridingqwerty/ridingqwerty.h +++ b/users/ridingqwerty/ridingqwerty.h @@ -1,37 +1,61 @@ #pragma once #include "quantum.h" +#include "version.h" #include "process_records.h" +#include "wrappers.h" +#ifdef TAP_DANCE_ENABLE +# include "tapdances.h" +#endif +#if defined(UNICODEMAP_ENABLE) || defined(UNICODE_ENABLE) +# include "unicode.h" +#endif enum userspace_layers { - _QWERTY = 0, + _QWERTY, + _DVORAK, + _COLEMAK, +/* + _WORKMAN et al. go here +*/ +#if defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) + _GREEK, + _RUSSIAN, + _RUNES, + _HIRA1, + _HIRA2, +#endif _EDITOR, _NUMBER, _SYMBOL, _F_KEYS, _DEBUG, _SECRET, +#if defined(MOUSEKEY_ENABLED) + _MOUSE, +#endif + _MEDIA, _FINAL }; -// modtaps -#define LS_Z MT(MOD_LSFT, KC_Z) -#define LC_ESC MT(MOD_LCTL, KC_ESC) -#define LG_TAB MT(MOD_LGUI, KC_TAB) -#define LA_LBRC MT(MOD_LALT, KC_LBRC) -#define LS_RBRC MT(MOD_LSFT, KC_RBRC) -#define RS_MINS MT(MOD_RSFT, KC_MINS) -#define RA_EQL MT(MOD_RALT, KC_EQL) -//RG_LMOT defined in process_records.h -#define RC_ENT MT(MOD_RCTL, KC_ENT) -#define RS_SLSH MT(MOD_RSFT, KC_SLSH) -// layertaps -#define ED_A LT(_EDITOR, KC_A) -#define ED_ESC LT(_EDITOR, KC_ESC) -#define NM_SCLN LT(_NUMBER, KC_SCLN) -#define NM_BSPC LT(_NUMBER, KC_BSPC) -#define SM_SPC LT(_SYMBOL, KC_SPC) -#define SC_TAB LT(_SECRET, KC_TAB) -#define FK_DOT LT(_F_KEYS, KC_DOT) +#define LS(kc) MT(MOD_LSFT, KC_##kc) +#define LC(kc) MT(MOD_LCTL, KC_##kc) +#define LG(kc) MT(MOD_LGUI, KC_##kc) +#define LA(kc) MT(MOD_LALT, KC_##kc) +#define RS(kc) MT(MOD_RSFT, KC_##kc) +#define RC(kc) MT(MOD_RCTL, KC_##kc) +#define RG(kc) MT(MOD_RGUI, KC_##kc) +#define RA(kc) MT(MOD_RALT, KC_##kc) +#define ED(kc) LT(_EDITOR, KC_##kc) +#define NM(kc) LT(_NUMBER, KC_##kc) +#define SM(kc) LT(_SYMBOL, KC_##kc) +#define SC(kc) LT(_SECRET, KC_##kc) +#define FK(kc) LT(_F_KEYS, KC_##kc) +#define DB(kc) LT(_DEBUG, KC_##kc) + +void matrix_init_keymap(void); +void matrix_scan_keymap(void); +void keyboard_post_init_keymap(void); +layer_state_t layer_state_set_keymap(layer_state_t state); diff --git a/users/ridingqwerty/rules.mk b/users/ridingqwerty/rules.mk index 9c3846744..153e5ff90 100644 --- a/users/ridingqwerty/rules.mk +++ b/users/ridingqwerty/rules.mk @@ -1,8 +1,24 @@ -#LEADER_ENABLE = yes - SRC += ridingqwerty.c \ process_records.c +BOOTMAGIC_ENABLE = lite +CONSOLE_ENABLE = no +COMMAND_ENABLE = no +UNICODE_ENABLE = no # "yes" in Atreus default keymap, blocking UNICODEMAP_ENABLE +UNICODEMAP_ENABLE = yes +MOUSEKEY_ENABLE = no +TAP_DANCE_ENABLE = yes +AUTO_SHIFT_ENABLE = no + ifneq ("$(wildcard $(USER_PATH)/secrets.c)","") SRC += secrets.c endif + +ifeq ($(strip $(TAP_DANCE_ENABLE)), yes) + SRC += tapdances.c +endif + +ifeq ($(strip $(UNICODEMAP_ENABLE)), yes) + SRC += unicode.c +endif + diff --git a/users/ridingqwerty/tapdances.c b/users/ridingqwerty/tapdances.c new file mode 100644 index 000000000..644166cb4 --- /dev/null +++ b/users/ridingqwerty/tapdances.c @@ -0,0 +1,33 @@ +#include "ridingqwerty.h" +#include "tapdances.h" + +void braces_finished (qk_tap_dance_state_t *state, void *user_data) { + if ((state->count == 1) || (state->count == 3)) { + register_code(KC_LSFT); + } +} + +void braces_reset (qk_tap_dance_state_t *state, void *user_data) { + // two or three taps for "[]"/"{}" + if ((state->count == 2) || (state->count == 3)) { + tap_code(KC_LBRC); + tap_code(KC_RBRC); + } + // one tap for "()" + else if (state->count == 1) { + tap_code(KC_9); + tap_code(KC_0); + } + + // unregister the shift unconditionally + unregister_code(KC_LSFT); + + // move back one space, inside the braces + if (state->count <= 3) { + tap_code(KC_LEFT); + } +} + +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_BRACES] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, braces_finished, braces_reset) +}; diff --git a/users/ridingqwerty/tapdances.h b/users/ridingqwerty/tapdances.h new file mode 100644 index 000000000..6eba0e2cb --- /dev/null +++ b/users/ridingqwerty/tapdances.h @@ -0,0 +1,9 @@ +#pragma once + +#include "quantum.h" + +#define TD_BRC TD(TD_BRACES) + +enum tapdance_id { + TD_BRACES = 0 +}; diff --git a/users/ridingqwerty/unicode.c b/users/ridingqwerty/unicode.c new file mode 100644 index 000000000..8ef5aaa1e --- /dev/null +++ b/users/ridingqwerty/unicode.c @@ -0,0 +1,7 @@ +#include "unicode.h" + +#ifdef UNICODEMAP_ENABLE +const uint32_t PROGMEM unicode_map[] = { + FOREACH_UNICODE(UCM_ENTRY) +}; +#endif diff --git a/users/ridingqwerty/unicode.h b/users/ridingqwerty/unicode.h new file mode 100644 index 000000000..8b403272a --- /dev/null +++ b/users/ridingqwerty/unicode.h @@ -0,0 +1,295 @@ +#pragma once +#include "quantum.h" + +// clang-format off +#define FOREACH_UNICODE(M) \ + M(UALP, 0x0391) /* Α */ \ + M(UBET, 0x0392) /* Β */ \ + M(UGAM, 0x0393) /* Γ */ \ + M(UDEL, 0x0394) /* Δ */ \ + M(UEPS, 0x0395) /* Ε */ \ + M(UZET, 0x0396) /* Ζ */ \ + M(UETA, 0x0397) /* Η */ \ + M(UTHE, 0x0398) /* Θ */ \ + M(UIOT, 0x0399) /* Ι */ \ + M(UKAP, 0x039A) /* Κ */ \ + M(ULAM, 0x039B) /* Λ */ \ + M(UMU, 0x039C) /* M */ \ + M(UNU, 0x039D) /* Ν */ \ + M(UXI, 0x039E) /* Ξ */ \ + M(UOMI, 0x039F) /* Ο */ \ + M(UPI, 0x03A0) /* Π */ \ + M(URHO, 0x03A1) /* Ρ */ \ + M(USIG, 0x03A3) /* Σ */ \ + M(UTAU, 0x03A4) /* Τ */ \ + M(UUPS, 0x03A5) /* Υ */ \ + M(UPHI, 0x03A6) /* Φ */ \ + M(UCHI, 0x03A7) /* Χ */ \ + M(UPSI, 0x03A8) /* Ψ */ \ + M(UOME, 0x03A9) /* Ω */ \ + M(LALP, 0x03B1) /* α */ \ + M(LBET, 0x03B2) /* β */ \ + M(LGAM, 0x03B3) /* γ */ \ + M(LDEL, 0x03B4) /* δ */ \ + M(LEPS, 0x03B5) /* ε */ \ + M(LZET, 0x03B6) /* ζ */ \ + M(LETA, 0x03B7) /* η */ \ + M(LTHE, 0x03B8) /* θ */ \ + M(LIOT, 0x03B9) /* ι */ \ + M(LKAP, 0x03BA) /* κ */ \ + M(LLAM, 0x03BB) /* λ */ \ + M(LMU, 0x03BC) /* μ */ \ + M(LNU, 0x03BD) /* ν */ \ + M(LXI, 0x03BE) /* ξ */ \ + M(LOMI, 0x03BF) /* ο */ \ + M(LPI, 0x03C0) /* π */ \ + M(LRHO, 0x03C1) /* ρ */ \ + M(LSIG, 0x03C3) /* σ */ \ + M(LTAU, 0x03C4) /* τ */ \ + M(LUPS, 0x03C5) /* υ */ \ + M(LPHI, 0x03C6) /* φ */ \ + M(LCHI, 0x03C7) /* χ */ \ + M(LPSI, 0x03C8) /* ψ */ \ + M(LOME, 0x03C9) /* ω */ \ + M(UAH, 0x0410) /* А */ \ + M(UBE, 0x0411) /* Б */ \ + M(UVE, 0x0412) /* В */ \ + M(UGHE, 0x0413) /* Г */ \ + M(UDE, 0x0414) /* Д */ \ + M(UIE, 0x0415) /* Е */ \ + M(UIO, 0x0401) /* Ё */ \ + M(UZHE, 0x0416) /* Ж */ \ + M(UZE, 0x0417) /* З */ \ + M(UIH, 0x0418) /* И */ \ + M(USIH, 0x0419) /* Й */ \ + M(UKA, 0x041A) /* К */ \ + M(UEL, 0x041B) /* Л */ \ + M(UEM, 0x041C) /* М */ \ + M(UEN, 0x041D) /* Н */ \ + M(UOH, 0x041E) /* О */ \ + M(UPE, 0x041F) /* П */ \ + M(UER, 0x0420) /* Р */ \ + M(UES, 0x0421) /* С */ \ + M(UTE, 0x0422) /* Т */ \ + M(UUU, 0x0423) /* У */ \ + M(UEF, 0x0424) /* Ф */ \ + M(UHA, 0x0425) /* Х */ \ + M(UTSE, 0x0426) /* Ц */ \ + M(UCHE, 0x0427) /* Ч */ \ + M(USHA, 0x0428) /* Ш */ \ + M(USCHA, 0x0429) /* Щ */ \ + M(UHARD, 0x042A) /* Ъ */ \ + M(UYERU, 0x042B) /* Ы */ \ + M(USOFT, 0x042C) /* Ь */ \ + M(UEH, 0x042D) /* Э */ \ + M(UYU, 0x042E) /* Ю */ \ + M(UYA, 0x042F) /* Я */ \ + M(LAH, 0x0430) /* а */ \ + M(LBE, 0x0431) /* б */ \ + M(LVE, 0x0432) /* в */ \ + M(LGHE, 0x0433) /* г */ \ + M(LDE, 0x0434) /* д */ \ + M(LIE, 0x0435) /* е */ \ + M(LIO, 0x0451) /* ё */ \ + M(LZHE, 0x0436) /* ж */ \ + M(LZE, 0x0437) /* з */ \ + M(LIH, 0x0438) /* и */ \ + M(LSIH, 0x0439) /* й */ \ + M(LKA, 0x043A) /* к */ \ + M(LEL, 0x043B) /* л */ \ + M(LEM, 0x043C) /* м */ \ + M(LEN, 0x043D) /* н */ \ + M(LOH, 0x043E) /* о */ \ + M(LPE, 0x043F) /* п */ \ + M(LER, 0x0440) /* р */ \ + M(LES, 0x0441) /* с */ \ + M(LTE, 0x0442) /* т */ \ + M(LUU, 0x0443) /* у */ \ + M(LEF, 0x0444) /* ф */ \ + M(LHA, 0x0445) /* х */ \ + M(LTSE, 0x0446) /* ц */ \ + M(LCHE, 0x0447) /* ч */ \ + M(LSHA, 0x0448) /* ш */ \ + M(LSCHA, 0x0449) /* щ */ \ + M(LHARD, 0x044A) /* ъ */ \ + M(LYERU, 0x044B) /* ы */ \ + M(LSOFT, 0x044C) /* ь */ \ + M(LEH, 0x044D) /* э */ \ + M(LYU, 0x044E) /* ю */ \ + M(LYA, 0x044F) /* я */ \ + M(FE, 0x16A0) /* ᚠ */ \ + M(UR, 0x16A2) /* ᚢ */ \ + M(THURS, 0x16A6) /* ᚦ */ \ + M(ANSUZ, 0x16A8) /* ᚨ */ \ + M(RAIDO, 0x16B1) /* ᚱ */ \ + M(KAUNA, 0x16B2) /* ᚲ */ \ + M(GEBO, 0x16B7) /* ᚷ */ \ + M(WUNJO, 0x16B9) /* ᚹ */ \ + M(HAGLZ, 0x16BA) /* ᚺ */ \ + M(NAUDZ, 0x16BE) /* ᚾ */ \ + M(ISAZ, 0x16C1) /* ᛁ */ \ + M(JERAN, 0x16C3) /* ᛃ */ \ + M(IWAZ, 0x16C7) /* ᛇ */ \ + M(PERTH, 0x16C8) /* ᛈ */ \ + M(ALGIZ, 0x16C9) /* ᛉ */ \ + M(SOWIL, 0x16CA) /* ᛊ */ \ + M(TIWAZ, 0x16CF) /* ᛏ */ \ + M(BEORC, 0x16D2) /* ᛒ */ \ + M(EHWAZ, 0x16D6) /* ᛖ */ \ + M(MANNZ, 0x16D7) /* ᛗ */ \ + M(LAUKZ, 0x16DA) /* ᛚ */ \ + M(INGWZ, 0x16DC) /* ᛜ */ \ + M(DAGAZ, 0x16DE) /* ᛞ */ \ + M(ETHEL, 0x16DF) /* ᛟ */ \ + M(JRO, 0x308D) /* ろ */ \ + M(JWA, 0x308F) /* わ */ \ + M(JNU, 0x306C) /* ぬ */ \ + M(JHU, 0x3075) /* ふ */ \ + M(JA, 0x3042) /* あ */ \ + M(JU, 0x3046) /* う */ \ + M(JE, 0x3048) /* え */ \ + M(JO, 0x304A) /* お */ \ + M(JYA, 0x3084) /* や */ \ + M(JYU, 0x3086) /* ゆ */ \ + M(JYO, 0x3088) /* よ */ \ + M(JHO, 0x307B) /* ほ */ \ + M(JHE, 0x3078) /* へ */ \ + M(JMU, 0x3080) /* む */ \ + M(JTA, 0x305F) /* た */ \ + M(JTE, 0x3066) /* て */ \ + M(JI, 0x3044) /* い */ \ + M(JSU, 0x3059) /* す */ \ + M(JKA, 0x3095) /* ゕ */ \ + M(JN, 0x3093) /* ん */ \ + M(JNA, 0x306A) /* な */ \ + M(JNI, 0x306B) /* に */ \ + M(JRA, 0x3089) /* ら */ \ + M(JSE, 0x305B) /* せ */ \ + M(JVV, 0x309B) /* ゛*/ \ + M(JSV, 0x309C) /* ゜*/ \ + M(JTI, 0x3061) /* ち */ \ + M(JTO, 0x3068) /* と */ \ + M(JSI, 0x3057) /* し */ \ + M(JHA, 0x306F) /* は */ \ + M(JKI, 0x304D) /* き */ \ + M(JKU, 0x304F) /* く */ \ + M(JMA, 0x307E) /* ま */ \ + M(JNO, 0x306E) /* の */ \ + M(JRI, 0x308A) /* り */ \ + M(JRE, 0x308C) /* れ */ \ + M(JKE, 0x3051) /* け */ \ + M(JTU, 0x3064) /* つ */ \ + M(JSA, 0x3055) /* さ */ \ + M(JSO, 0x305D) /* そ */ \ + M(JHI, 0x3072) /* ひ */ \ + M(JKO, 0x3053) /* こ */ \ + M(JMI, 0x307F) /* み */ \ + M(JMO, 0x3082) /* も */ \ + M(JNE, 0x306D) /* ね */ \ + M(JRU, 0x308B) /* る */ \ + M(JME, 0x3081) /* め */ \ + M(ALEF, 0x05D0) /* א */ \ + M(BET, 0x05D1) /* ב */ \ + M(GIMEL, 0x05D2) /* ג */ \ + M(DALET, 0x05D3) /* ד */ \ + M(HE, 0x05D4) /* ה */ \ + M(VAV, 0x05D5) /* ו */ \ + M(ZAYIN, 0x05D6) /* ז */ \ + M(CHET, 0x05D7) /* ח */ \ + M(TET, 0x05D8) /* ט */ \ + M(YOD, 0x05D9) /* י */ \ + M(KAF, 0x05DB) /* כ */ \ + M(LAMED, 0x05DC) /* ל */ \ + M(MEM, 0x05DE) /* מ */ \ + M(NUN, 0x05E0) /* נ */ \ + M(SAMCH, 0x05E1) /* ס */ \ + M(AYIN, 0x05E2) /* ע */ \ + M(PE, 0x05E4) /* פ */ \ + M(TZADI, 0x05E6) /* צ */ \ + M(KOF, 0x05E7) /* ק */ \ + M(RESH, 0x05E8) /* ר */ \ + M(SHIN, 0x05E9) /* ש */ \ + M(TAV, 0x05EA) /* ת */ +// clang-format on + +#define UC_KEYCODE(name, code) name = UC(code), // LALP = UC(0x03B1), + +#define UCM_NAME(name, code) UCM_ ## name, // UCM_LALP, +#define UCM_ENTRY(name, code) [UCM_ ## name] = code, // [UCM_LALP] = 0x03B1, +#define UCM_KEYCODE(name, code) name = X(UCM_ ## name), // LALP = X(UCM_LALP) + +#if defined(UNICODE_ENABLE) +enum unicode_keycodes { + FOREACH_UNICODE(UC_KEYCODE) +}; +#elif defined(UNICODEMAP_ENABLE) +enum unicode_names { + FOREACH_UNICODE(UCM_NAME) +}; + +extern const uint32_t PROGMEM unicode_map[]; + +enum unicode_keycodes { + FOREACH_UNICODE(UCM_KEYCODE) +}; +#endif + + +#define ALPHA XP(LALP, UALP) +#define BETA XP(LBET, UBET) +#define GAMMA XP(LGAM, UGAM) +#define DELTA XP(LDEL, UDEL) +#define EPSLN XP(LEPS, UEPS) +#define ZETA XP(LZET, UZET) +#define ETA XP(LETA, UETA) +#define THETA XP(LTHE, UTHE) +#define IOTA XP(LIOT, UIOT) +#define KAPPA XP(LKAP, UKAP) +#define LAMBD XP(LLAM, ULAM) +#define GMU XP(LMU, UMU) +#define NU XP(LNU, UNU) +#define XI XP(LXI, UXI) +#define OMCRN XP(LOMI, UOMI) +#define PI XP(LPI, UPI) +#define RHO XP(LRHO, URHO) +#define SIGMA XP(LSIG, USIG) +#define TAU XP(LTAU, UTAU) +#define UPSLN XP(LUPS, UUPS) +#define PHI XP(LPHI, UPHI) +#define CHI XP(LCHI, UCHI) +#define PSI XP(LPSI, UPSI) +#define OMEGA XP(LOME, UOME) + +#define AH XP(LAH, UAH) +#define BE XP(LBE, UBE) +#define VE XP(LVE, UVE) +#define GHE XP(LGHE, UGHE) +#define DE XP(LDE, UDE) +#define IE XP(LIE, UIE) +#define IO XP(LIO, UIO) +#define ZHE XP(LZHE, UZHE) +#define ZE XP(LZE, UZE) +#define IH XP(LIH, UIH) +#define SIH XP(LSIH, USIH) +#define KA XP(LKA, UKA) +#define EL XP(LEL, UEL) +#define EM XP(LEM, UEM) +#define EN XP(LEN, UEN) +#define OH XP(LOH, UOH) +#define PE XP(LPE, UPE) +#define ER XP(LER, UER) +#define ES XP(LES, UES) +#define TE XP(LTE, UTE) +#define UU XP(LUU, UUU) +#define EF XP(LEF, UEF) +#define HA XP(LHA, UHA) +#define TSE XP(LTSE, UTSE) +#define CHE XP(LCHE, UCHE) +#define SHA XP(LSHA, USHA) +#define SCHA XP(LSCHA, USCHA) +#define HARD XP(LHARD, UHARD) +#define YERU XP(LYERU, UYERU) +#define SOFT XP(LSOFT, USOFT) +#define EH XP(LEH, UEH) +#define YU XP(LYU, UYU) +#define YA XP(LYA, UYA) diff --git a/users/ridingqwerty/wrappers.h b/users/ridingqwerty/wrappers.h new file mode 100644 index 000000000..f78219a56 --- /dev/null +++ b/users/ridingqwerty/wrappers.h @@ -0,0 +1,156 @@ +#pragma once +#include "ridingqwerty.h" + +// clang-format off +#define LAYOUT_atreus_wrapper(...) LAYOUT_atreus(__VA_ARGS__) +#define LAYOUT_minorca_wrapper(...) LAYOUT_minorca(__VA_ARGS__) + +#define ___________VI_ARROWS______________ KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + +// 1......__2......__3......__4......__5...... 1......__2......__3......__4......__5...... +#define ________________QWERTY_L1__________________ KC_Q, KC_W, KC_E, KC_R, KC_T +#define ________________QWERTY_L2__________________ KC_A, KC_S, KC_D, KC_F, KC_G +#define ________________QWERTY_L3__________________ KC_Z, KC_X, KC_C, KC_V, KC_B + +#define ________________QWERTY_R1__________________ KC_Y, KC_U, KC_I, KC_O, KC_P +#define ________________QWERTY_R2__________________ KC_H, KC_J, KC_K, KC_L, KC_SCLN +#define ________________QWERTY_R3__________________ KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH + + +#define ________________ATREUS_L1__________________ ________________QWERTY_L1__________________ +#define ________________ATREUS_L2__________________ ED(A), KC_S, KC_D, KC_F, KC_G +#define ________________ATREUS_L3__________________ LS(Z), KC_X, KC_C, KC_V, KC_B + +#define ________________ATREUS_R1__________________ ________________QWERTY_R1__________________ +#define ________________ATREUS_R2__________________ KC_H, KC_J, KC_K, KC_L, NM(SCLN) +#define ________________ATREUS_R3__________________ KC_N, KC_M, KC_COMM, FK(DOT), RS(SLSH) + +#define ________________FNHOMEROW_L2_______________ C(KC_A), G(KC_S), A(KC_D), S(KC_F), KC_G +#define ________________FNHOMEROW_R2_______________ KC_H, S(KC_J), A(KC_K), G(KC_L), C(SCLN) + +#define ____THUMBS_R4___ ED(ESC), DB(TAB) +#define _____BLANK_R4___ _______, _______ +#define ________________ _______, _______ + + +#define ________________COLEMAK_L1_________________ KC_Q, KC_W, KC_F, KC_P, KC_G +#define ________________COLEMAK_L2_________________ ED(A), KC_R, KC_S, KC_T, KC_D +#define ________________COLEMAK_L3_________________ LS(Z), KC_X, KC_C, KC_V, KC_B + +#define ________________COLEMAK_R1_________________ KC_J, KC_L, KC_U, KC_Y, KC_SCLN +#define ________________COLEMAK_R2_________________ KC_H, KC_N, KC_E, KC_I, NM(O) +#define ________________COLEMAK_R3_________________ KC_K, KC_M, KC_COMM, FK(DOT), RS(SLSH) + + +#define ________________DVORAK_L1__________________ KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y +#define ________________DVORAK_L2__________________ ED(A), KC_O, KC_E, KC_U, KC_I +#define ________________DVORAK_L3__________________ LS(SCLN),KC_Q, KC_J, KC_K, KC_X + +#define ________________DVORAK_R1__________________ KC_F, KC_G, KC_C, KC_R, KC_L +#define ________________DVORAK_R2__________________ KC_D, KC_H, KC_T, KC_N, NM(S) +#define ________________DVORAK_R3__________________ KC_B, KC_M, KC_W, FK(V), RS(Z) + +#define ________________BOTTOM_L4__________________ LC(ESC), LG(TAB), LA(LBRC), LS(RBRC), NM(BSPC) +#define ________________BOTTOM_R4__________________ SM(SPC), RS(MINS), RA(EQL), RG_QUOT, RC(ENT) + + +#define ________________NUMROW_L1__________________ KC_1, KC_2, KC_3, KC_4, KC_5 +#define ________________NUMROW_R1__________________ KC_6, KC_7, KC_8, KC_9, KC_0 + +#define ________________NUMPAD_R1__________________ _______, KC_7, KC_8, KC_9, KC_0 +#define ________________NUMPAD_R2__________________ _______, KC_4, KC_5, KC_6, _______ +#define ________________NUMPAD_R3__________________ _______, KC_1, KC_2, KC_3, KC_BSLS +#define ________________NUMPAD_R4__________________ KC_0, KC_0, KC_DOT, KC_3, _______ + + +#define ________________SYMROW_L1__________________ KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC +#define ________________SYMROW_R1__________________ KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN + + +#define ________________ _______, _______ +#define _________________________ _______, _______, _______ +#define __________________________________ _______, _______, _______, _______ +#define ___________________________________________ _______, _______, _______, _______, _______ +#define ___________________________________________ _______, _______, _______, _______, _______ +#define ___________________________________________ _______, _______, _______, _______, _______ +#define ________________BLANK______________________ ___________________________________________ +#define ________________BLOCK______________________ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO +#define XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ________________BLOCK______________________ + +#define ________________FKEYROW_L1_________________ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5 +#define ________________FKEYROW_R1_________________ KC_F6, KC_F7, KC_F8, KC_F9, KC_F10 + +#define ________________EDITOR_L1__________________ KC_GRV, _______, KC_END, _______, KC_F5 +#define ________________EDITOR_L2__________________ KC_HOME, _______, KC_DELT, _______, _______ +#if defined(TAP_DANCE_ENABLE) +#define ________________EDITOR_L3__________________ _______, KC_VOLD, KC_VOLU, CCCV, TD_BRC +#else +#define ________________EDITOR_L3__________________ _______, KC_VOLD, KC_VOLU, CCCV, _______ +#endif + +#define ________________EDITOR_R1__________________ _______, _______, KC_INS, _______, KC_PGUP +#define ________________EDITOR_R2__________________ ___________VI_ARROWS______________, _______ +#define ________________EDITOR_R3__________________ KC_PGDN, _______, _______, _______, KC_BSLS + + +#define ________________DEBUG_L1___________________ DEBUG, _______, _______, RNGWORD, SARCASM +#define ________________DEBUG_L2___________________ GREEK, RUSSIAN, HIRAGAN, RUNES, _______ +#define ________________DEBUG_L3___________________ _______, _______, _______, VERSION, _______ + +#define ________________DEBUG_R1___________________ VPRWAVE, STRAYA, _______, TESTING, _______ +#define ________________DEBUG_R2___________________ _______, _______, EEP_RST, RESET, MAKE +#define ________________DEBUG_R3___________________ QWERTY, DVORAK, COLEMAK, _______, _______ + + +#define ________________SECRET_L1__________________ _______, _______, _______, SECRET0, SECRET1 +#define ________________SECRET_L2__________________ SECRET4, SECRET8, _______, _______, _______ +#define ________________SECRET_L3__________________ SECRET7, _______, SECRET2, SECRET5, _______ + +#define ________________SECRET_R1__________________ _______, _______, _______, _______, _______ +#define ________________SECRET_R2__________________ _______, _______, _______, SECRET6, _______ +#define ________________SECRET_R3__________________ _______, SECRET3, _______, _______, _______ + + +#if defined(UNICODEMAP_ENABLE) +// Greek +#define ________________GREEK_L1___________________ THETA, OMEGA, EPSLN, RHO, TAU +#define ________________GREEK_L2___________________ ALPHA, SIGMA, DELTA, PHI, GAMMA +#define ________________GREEK_L3___________________ ZETA, XI, CHI, PHI, BETA +#define ________________GREEK_R1___________________ UPSLN, UPSLN, IOTA, OMCRN, PI +#define ________________GREEK_R2___________________ ETA, PSI, KAPPA, LAMBD, NM(SCLN) +#define ________________GREEK_R3___________________ NU, GMU, KC_COMM, FK(DOT), RS(SLSH) + +// Elder Futhark +#define ________________FTHRK_L1___________________ INGWZ, WUNJO, EHWAZ, RAIDO, TIWAZ +#define ________________FTHRK_L2___________________ ANSUZ, SOWIL, DAGAZ, FE, GEBO +#define ________________FTHRK_L3___________________ ALGIZ, THURS, KAUNA, WUNJO, BEORC +#define ________________FTHRK_R1___________________ IWAZ, UR, ISAZ, ETHEL, PERTH +#define ________________FTHRK_R2___________________ HAGLZ, JERAN, KAUNA, LAUKZ, KC_SCLN +#define ________________FTHRK_R3___________________ NAUDZ, MANNZ, KC_COMM, KC_DOT, KC_SLSH + +// Russian Cyrillic +#define ________________CYRLC_L1___________________ YA, SCHA, IE, ER, TE +#define ________________CYRLC_L2___________________ AH, ES, DE, EF, GHE +#define ________________CYRLC_L3___________________ ZE, HA, TSE, VE, BE +#define ________________CYRLC_R1___________________ YERU, UU, IH, OH, PE +#define ________________CYRLC_R2___________________ CHE, SIH, KA, EL, SOFT +#define ________________CYRLC_R3___________________ EN, EM, YU, SCHA, EH +#define ________________CYRLC_R4___________________ SM(SPC), IO, HARD, ZHE, RC(ENT) + +// Hiragana +#define ________________JIS1_R1____________________ JTA, JTE, JI, JSU, JKA +#define ________________JIS1_R2____________________ JTI, JTO, JSI, JHA, JKI +#define ________________JIS1_R3____________________ JMI, JMO, KC_COMM, KC_DOT, MO(_HIRA2) +#define ________________JIS1_L1____________________ JN, JNA, JNI, JRA, JSE +#define ________________JIS1_L2____________________ JKU, JMA, JNO, JRI, JRE +#define ________________JIS1_L3____________________ JTU, JSA, JSO, JHI, JKO + +#define ________________JIS2_R1____________________ JRO, JWA, JNU, JHU, JA +#define ________________JIS2_R2____________________ JYO, JHO, JHE, JMU, JVV +#define ________________JIS2_R3____________________ JRU, JME, KC_COMM, KC_DOT, _______ +#define ________________JIS2_L1____________________ JU, JE, JO, JYA, JYU +#define ________________JIS2_L2____________________ JSV, JKE, JMI, JMO, JNE +#define ________________JIS2_L3____________________ JTU, JSA, JSO, JHI, JKO + +#endif +// clang-format on