From 7e9bd7264ad9c0faa1785ab8ca1a97d5f5996fbe Mon Sep 17 00:00:00 2001 From: Frederik Baerentsen Date: Tue, 26 May 2020 22:31:54 +0200 Subject: [PATCH] Changed a lot... --- keyboards/kyria/keymaps/drashna/config.h | 2 + keyboards/kyria/keymaps/drashna/keymap.c | 208 +--- keyboards/kyria/keymaps/drashna/rules.mk | 2 + keyboards/kyria/keymaps/frederik/config.h | 11 +- keyboards/kyria/keymaps/frederik/keymap.c | 413 +++---- keyboards/kyria/keymaps/frederik/rules.mk | 10 +- users/333fred/333fred.c | 122 -- users/333fred/333fred.h | 30 - users/333fred/333fred_config.h | 4 - users/333fred/layout_macros.h | 44 - users/333fred/rgb.c | 28 - users/333fred/rules.mk | 5 - users/_example/_example.c | 5 - users/_example/_example.h | 8 - users/_example/readme.md | 14 - users/_example/rules.mk | 1 - users/alfrdmalr/alfrdmalr.c | 95 -- users/alfrdmalr/alfrdmalr.h | 286 ----- users/alfrdmalr/config.h | 7 - users/alfrdmalr/readme.md | 46 - users/alfrdmalr/rules.mk | 8 - users/arkag/arkag.c | 630 ---------- users/arkag/arkag.h | 139 --- users/arkag/config.h | 6 - users/arkag/readme.md | 42 - users/arkag/rules.mk | 1 - users/bbaserdem/README.md | 51 - users/bbaserdem/bbaserdem.c | 633 ----------- users/bbaserdem/bbaserdem.h | 268 ----- users/bbaserdem/config.h | 9 - users/bbaserdem/rules.mk | 24 - users/bcat/bcat.c | 6 - users/bcat/config.h | 90 -- users/bcat/rules.mk | 23 - users/billypython/billypython.c | 32 - users/billypython/billypython.h | 34 - users/billypython/config.h | 17 - users/billypython/rules.mk | 6 - users/billypython/tap_dance.c | 33 - users/billypython/tap_dance.h | 9 - users/bocaj/bocaj.c | 189 --- users/bocaj/bocaj.h | 85 -- users/bocaj/config.h | 33 - users/bocaj/process_records.c | 149 --- users/bocaj/process_records.h | 50 - users/bocaj/readme.md | 102 -- users/bocaj/rules.mk | 33 - users/bocaj/send_unicode.c | 106 -- users/bocaj/send_unicode.h | 71 -- users/bocaj/tap_dances.c | 64 -- users/bocaj/tap_dances.h | 19 - users/bocaj/wrappers.h | 37 - users/brett/brett.c | 61 - users/brett/brett.h | 25 - users/brett/rules.mk | 1 - users/cbbrowne/cbbrowne.c | 0 users/cbbrowne/cbbrowne.h | 39 - users/cbbrowne/rules.mk | 1 - users/cjuniet/cjuniet.c | 13 - users/cjuniet/cjuniet.h | 5 - users/cjuniet/glcdfont.c | 230 ---- users/cjuniet/readme.md | 14 - users/cjuniet/rules.mk | 1 - users/csc027/csc027.c | 53 - users/csc027/csc027.h | 29 - users/csc027/custom_audio.c | 17 - users/csc027/custom_audio.h | 8 - users/csc027/custom_rgb.c | 25 - users/csc027/custom_rgb.h | 9 - users/csc027/defines.h | 270 ----- users/csc027/rules.mk | 11 - users/csc027/usb_led.c | 32 - users/csc027/usb_led.h | 3 - users/curry/.gitignore | 1 - users/curry/LICENSE | 14 - users/curry/README.md | 30 - users/curry/config.h | 111 -- users/curry/curry.c | 130 --- users/curry/curry.h | 59 - users/curry/glcdfont.c | 232 ---- users/curry/leader.c | 24 - users/curry/leader.h | 3 - users/curry/oled.c | 163 --- users/curry/process_records.c | 76 -- users/curry/process_records.h | 86 -- users/curry/rgb_lighting_user.h | 19 - users/curry/rgb_matrix_user.c | 144 --- users/curry/rules.mk | 71 -- users/curry/tap_dances.c | 4 - users/curry/tap_dances.h | 1 - users/curry/wrappers.h | 88 -- users/d4mation/config.h | 1 - users/d4mation/d4mation.c | 37 - users/d4mation/d4mation.h | 17 - users/d4mation/macros.c | 160 --- users/d4mation/macros.h | 23 - users/d4mation/rules.mk | 15 - users/d4mation/tap-dance.c | 6 - users/d4mation/tap-dance.h | 7 - users/d4mation/tap-hold.c | 28 - users/d4mation/tap-hold.h | 5 - users/d4mation/zalgo.c | 21 - users/d4mation/zalgo.h | 5 - users/danielo515/alt_tab.c | 38 - users/danielo515/alt_tab.h | 4 - users/danielo515/combo.c | 36 - users/danielo515/combo.h | 2 - users/danielo515/config.h | 10 - users/danielo515/danielo515.c | 87 -- users/danielo515/danielo515.h | 7 - users/danielo515/process_records.c | 167 --- users/danielo515/process_records.h | 104 -- users/danielo515/readme.md | 14 - users/danielo515/rules.mk | 11 - users/danielo515/tap_dance.c | 139 --- users/danielo515/tap_dance.h | 81 -- users/datagrok/README.md | 63 - users/datagrok/feature_cdeq.c | 47 - users/datagrok/feature_cdeq.h | 2 - .../feature_default_layers_selector.c | 46 - .../feature_default_layers_selector.h | 69 -- users/dhertz/config.h | 9 - users/dhertz/dhertz.c | 101 -- users/dhertz/dhertz.h | 23 - users/dhertz/rules.mk | 1 - users/doogle999/doogle999.c | 460 -------- users/doogle999/doogle999.h | 99 -- users/doogle999/readme.md | 41 - users/doogle999/rules.mk | 14 - users/drashna/config.h | 5 +- users/drashna/drashna.c | 35 +- users/drashna/drashna.h | 9 +- users/drashna/oled_stuff.c | 278 +++++ users/drashna/oled_stuff.h | 91 ++ users/drashna/process_records.c | 363 ++++-- users/drashna/process_records.h | 18 +- users/drashna/rgb_matrix_stuff.c | 86 ++ .../rgb_matrix_stuff.h} | 8 +- users/drashna/rgb_stuff.c | 404 +------ users/drashna/rgb_stuff.h | 26 +- users/drashna/rules.mk | 13 +- users/dshields/config.h | 57 - users/dshields/dshields.c | 26 - users/dshields/dshields.h | 42 - users/dshields/rules.mk | 32 - users/dudeofawesome/dudeofawesome.c | 1 - users/dudeofawesome/dudeofawesome.h | 25 - users/dudeofawesome/rules.mk | 1 - users/edvorakjp/edvorakjp.c | 32 - users/edvorakjp/edvorakjp.h | 70 -- users/edvorakjp/edvorakjp_process_record.c | 89 -- users/edvorakjp/edvorakjp_status.c | 64 -- users/edvorakjp/edvorakjp_tap_dance.c | 73 -- users/edvorakjp/readme.md | 67 -- users/edvorakjp/rules.mk | 7 - users/ericgebhart/config.h | 33 - users/ericgebhart/ericgebhart.c | 637 ----------- users/ericgebhart/ericgebhart.h | 429 ------- users/ericgebhart/flash-ergodox | 1 - users/ericgebhart/readme.md | 124 -- users/ericgebhart/rules.mk | 18 - users/ericgebhart/switch-kbd | 74 -- users/frederik/frederik.c | 266 +++++ users/frederik/frederik.h | 48 + .../rgb_stuff.c} | 86 +- users/frederik/rgb_stuff.h | 22 + .../rgblight_breathe_table.h | 0 users/gary/gary.c | 1 - users/gary/gary.h | 43 - users/gary/readme.md | 14 - users/gary/rules.mk | 1 - users/gordon/gordon.c | 410 ------- users/gordon/gordon.h | 247 ---- users/gordon/readme.md | 14 - users/gordon/rules.mk | 4 - users/hvp/hvp.c | 2 - users/hvp/hvp.h | 12 - users/hvp/readme.md | 1 - users/hvp/rules.mk | 4 - users/hvp/tap_dances.c | 103 -- users/hvp/tap_dances.h | 12 - users/ibnuda/combo.c | 1 - users/ibnuda/combo.h | 61 - users/ibnuda/config.h | 9 - users/ibnuda/ibnuda.c | 1 - users/ibnuda/ibnuda.h | 55 - users/ibnuda/readme.md | 14 - users/ibnuda/rules.mk | 14 - users/ibnuda/tapdance.c | 83 -- users/ibnuda/tapdance.h | 23 - users/ibnuda/wrapper.h | 46 - users/ishtob/config.h | 75 -- users/ishtob/ishtob.c | 69 -- users/ishtob/ishtob.h | 237 ---- users/ishtob/readme.md | 87 -- users/ishtob/rules.mk | 7 - users/issmirnov/config.h | 45 - users/issmirnov/issmirnov.c | 43 - users/issmirnov/issmirnov.h | 35 - users/issmirnov/rows.h | 55 - users/issmirnov/rules.mk | 25 - users/issmirnov/tap_tog.c | 52 - users/issmirnov/tap_tog.h | 10 - users/jackhumbert/jackhumbert.c | 1 - users/jackhumbert/jackhumbert.h | 6 - users/jackhumbert/readme.md | 14 - users/jackhumbert/rules.mk | 1 - users/jarred/config.h | 51 - users/jarred/jarred.c | 97 -- users/jarred/jarred.h | 172 --- users/jarred/readme.md | 17 - users/jarred/rules.mk | 16 - users/kageurufu/config.h | 4 - users/kageurufu/custom_rgb.c | 18 - users/kageurufu/custom_rgb.h | 3 - users/kageurufu/kageurufu.c | 12 - users/kageurufu/kageurufu.h | 5 - users/kageurufu/layouts.h | 58 - users/kageurufu/process_records.c | 44 - users/kageurufu/process_records.h | 27 - users/kageurufu/readme.md | 14 - users/kageurufu/rules.mk | 15 - users/konstantin/config.h | 30 - users/konstantin/konstantin.c | 119 -- users/konstantin/konstantin.h | 88 -- users/konstantin/rgb.c | 26 - users/konstantin/rgb.h | 13 - users/konstantin/rules.mk | 16 - users/konstantin/tap_dance.c | 119 -- users/konstantin/tap_dance.h | 29 - users/konstantin/unicode.c | 7 - users/konstantin/unicode.h | 34 - users/kuatsure/kuatsure.c | 139 --- users/kuatsure/kuatsure.h | 61 - users/kuatsure/readme.md | 14 - users/kuatsure/rules.mk | 4 - users/kuchosauronad0/.gitignore | 3 - users/kuchosauronad0/combo.c | 27 - users/kuchosauronad0/combo.h | 21 - users/kuchosauronad0/config.h | 90 -- users/kuchosauronad0/encoder.c | 63 - users/kuchosauronad0/encoder.h | 4 - users/kuchosauronad0/kuchosauronad0.c | 197 ---- users/kuchosauronad0/kuchosauronad0.h | 109 -- users/kuchosauronad0/leader.c | 116 -- users/kuchosauronad0/leader.h | 6 - users/kuchosauronad0/process_records.c | 244 ---- users/kuchosauronad0/process_records.h | 91 -- users/kuchosauronad0/readme.md | 217 ---- users/kuchosauronad0/rgblight_user.c | 156 --- users/kuchosauronad0/rgblight_user.h | 23 - users/kuchosauronad0/rules.mk | 49 - users/kuchosauronad0/tap_dances.c | 55 - users/kuchosauronad0/tap_dances.h | 26 - users/kuchosauronad0/template.c | 125 -- users/kuchosauronad0/template.h | 18 - users/kuchosauronad0/unicode.c | 62 - users/kuchosauronad0/unicode.h | 67 -- users/kuchosauronad0/wrappers.h | 212 ---- users/losinggeneration/README.md | 185 --- .../losinggeneration-common.h | 71 -- .../losinggeneration-config.h | 29 - .../losinggeneration-keymap.h | 379 ------ users/losinggeneration/rules.mk | 13 - users/manna-harbour_miryoku/README.org | 1 - users/manna-harbour_miryoku/config.h | 12 - .../manna-harbour_miryoku.c | 62 - users/manna-harbour_miryoku/miryoku.org | 705 ------------ users/manna-harbour_miryoku/rules.mk | 5 - users/mattly/config.h | 9 - users/mattly/mattly.c | 70 -- users/mattly/mattly.h | 98 -- users/mattly/readme.md | 10 - users/mattly/rules.mk | 2 - users/mechmerlin/changelog.md | 31 - users/mechmerlin/config.h | 29 - users/mechmerlin/mechmerlin.c | 26 - users/mechmerlin/mechmerlin.h | 19 - users/mechmerlin/readme.md | 53 - users/mechmerlin/rules.mk | 2 - users/mguterl/config.h | 0 users/mguterl/mguterl.c | 1 - users/mguterl/mguterl.h | 67 -- users/mguterl/readme.md | 14 - users/mguterl/rules.mk | 1 - users/mtdjr/config.h | 7 - users/mtdjr/mtdjr.c | 163 --- users/mtdjr/mtdjr.h | 99 -- users/mtdjr/readme.md | 14 - users/mtdjr/rules.mk | 2 - users/mtdjr/solenoid.h | 99 -- users/mverteuil/.gitignore | 1 - users/mverteuil/mverteuil.c | 2 - users/mverteuil/mverteuil.h | 21 - users/mverteuil/rules.mk | 1 - users/narze/narze.c | 1 - users/narze/narze.h | 9 - users/narze/readme.md | 18 - users/narze/rules.mk | 5 - users/narze/superduper.c | 66 -- users/narze/superduper.h | 7 - users/ninjonas/.gitignore | 1 - users/ninjonas/README.md | 117 -- users/ninjonas/combos.c | 55 - users/ninjonas/config.h | 21 - users/ninjonas/encoder.c | 104 -- users/ninjonas/ninjonas.c | 39 - users/ninjonas/ninjonas.h | 148 --- users/ninjonas/oled.c | 111 -- users/ninjonas/process_records.c | 117 -- users/ninjonas/process_records.h | 30 - users/ninjonas/rules.mk | 16 - users/ninjonas/tap_dances.c | 112 -- users/ninjonas/tap_dances.h | 37 - users/not-quite-neo/nqn-basic-layout.h | 124 -- users/not-quite-neo/nqn-common.h | 9 - .../nqn-keys-on-quertz-de-latin1.h | 73 -- users/not-quite-neo/readme.md | 24 - users/nstickney/nstickney.c | 44 - users/nstickney/nstickney.h | 25 - users/nstickney/rules.mk | 4 - users/pvinis/config.h | 10 - users/pvinis/pvinis.c | 89 -- users/pvinis/pvinis.h | 152 --- users/pvinis/rules.mk | 15 - users/readme.md | 3 - users/replicaJunction/config.h | 66 -- users/replicaJunction/readme.md | 14 - users/replicaJunction/replicaJunction.c | 149 --- users/replicaJunction/replicaJunction.h | 114 -- users/replicaJunction/rules.mk | 1 - users/ridingqwerty/config.h | 11 - users/ridingqwerty/dict.h | 1012 ----------------- users/ridingqwerty/process_records.c | 488 -------- users/ridingqwerty/process_records.h | 58 - users/ridingqwerty/ridingqwerty.c | 65 -- users/ridingqwerty/ridingqwerty.h | 61 - users/ridingqwerty/rules.mk | 24 - 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 --- users/rishka/rishka.c | 1 - users/rishka/rishka.h | 74 -- users/rishka/rules.mk | 1 - users/romus/README.md | 45 - users/romus/config.h | 8 - users/romus/romus.c | 557 --------- users/romus/romus.h | 270 ----- users/romus/rules.mk | 24 - users/rossman360/readme.md | 14 - users/rossman360/rossman360.c | 80 -- users/rossman360/rossman360.h | 35 - users/rossman360/rules.mk | 5 - users/rs/karabiner.json | 154 --- users/rs/readme.md | 30 - users/rs/rs.c | 74 -- users/rs/rs.h | 50 - users/rs/rules.mk | 1 - users/sethBarberee/config.h | 8 - users/sethBarberee/readme.md | 6 - users/sethBarberee/rules.mk | 1 - users/sethBarberee/sethBarberee.c | 45 - users/sethBarberee/sethBarberee.h | 20 - users/sigma/config.h | 21 - users/sigma/rules.mk | 3 - users/sigma/sigma.c | 276 ----- users/sigma/sigma.h | 58 - users/spacebarracecar/config.h | 2 - users/spacebarracecar/readme.md | 111 -- users/spacebarracecar/rules.mk | 5 - users/spacebarracecar/spacebarracecar.c | 352 ------ users/spacebarracecar/spacebarracecar.h | 247 ---- users/stanrc85/config.h | 9 - users/stanrc85/layer_rgb.c | 29 - users/stanrc85/readme.md | 52 - users/stanrc85/rules.mk | 25 - users/stanrc85/stanrc85.c | 80 -- users/stanrc85/stanrc85.h | 54 - users/talljoe/config.h | 12 - users/talljoe/readme.md | 7 - users/talljoe/rules.mk | 9 - users/talljoe/talljoe.c | 179 --- users/talljoe/talljoe.h | 199 ---- users/talljoe/tapdance.c | 146 --- users/tominabox1/.gitignore | 2 - users/tominabox1/config.h | 80 -- users/tominabox1/dimple_rgb.c | 433 ------- users/tominabox1/doug.c | 232 ---- users/tominabox1/readme.md | 5 - users/tominabox1/rules.mk | 26 - users/tominabox1/tominabox1.c | 281 ----- users/tominabox1/tominabox1.h | 56 - users/tominabox1/wrappers.h | 142 --- users/turbomech/backupturbomech.c | 389 ------- users/turbomech/turbomech.c | 125 -- users/turbomech/turbomech.h | 50 - users/twschum/config.h | 0 users/twschum/readme.md | 14 - users/twschum/rules.mk | 5 - users/twschum/twschum.c | 257 ----- users/twschum/twschum.h | 131 --- users/twschum/xtonhasvim.c | 593 ---------- users/twschum/xtonhasvim.h | 62 - users/vosechu/config.h | 24 - users/vosechu/readme.md | 14 - users/vosechu/rules.mk | 1 - users/vosechu/vosechu.c | 25 - users/vosechu/vosechu.h | 71 -- users/wanleg/config.h | 51 - users/wanleg/readme.md | 125 -- users/wanleg/rules.mk | 45 - users/wanleg/tapdances.c | 264 ----- users/wanleg/wanleg.c | 176 --- users/wanleg/wanleg.h | 322 ------ users/xtonhasvim/fancylighting.c | 172 --- users/xtonhasvim/fancylighting.h | 36 - users/xtonhasvim/readme.md | 10 - users/xtonhasvim/rules.mk | 2 - users/xtonhasvim/xtonhasvim.c | 643 ----------- users/xtonhasvim/xtonhasvim.h | 65 -- users/xulkal/config.h | 34 - users/xulkal/custom_encoder.c | 72 -- users/xulkal/custom_encoder.h | 2 - users/xulkal/custom_keycodes.h | 40 - users/xulkal/custom_oled.c | 188 --- users/xulkal/custom_oled.h | 2 - users/xulkal/custom_rgb.c | 64 -- users/xulkal/custom_rgb.h | 17 - users/xulkal/custom_tap_dance.c | 59 - users/xulkal/custom_tap_dance.h | 23 - users/xulkal/layouts.h | 119 -- users/xulkal/process_records.c | 62 - users/xulkal/process_records.h | 18 - users/xulkal/rules.mk | 32 - users/xulkal/xulkal.c | 1 - users/xulkal/xulkal.h | 6 - users/yanfali/config.h | 21 - users/yanfali/rules.mk | 27 - users/yet-another-developer/.gitignore | 2 - users/yet-another-developer/README.md | 7 - users/yet-another-developer/combo.c | 27 - users/yet-another-developer/combo.h | 21 - users/yet-another-developer/config.h | 56 - users/yet-another-developer/leader.c | 46 - users/yet-another-developer/leader.h | 6 - users/yet-another-developer/process_records.c | 193 ---- users/yet-another-developer/process_records.h | 109 -- users/yet-another-developer/rules.mk | 50 - users/yet-another-developer/tap_dances.c | 55 - users/yet-another-developer/tap_dances.h | 26 - users/yet-another-developer/unicode.c | 62 - users/yet-another-developer/unicode.h | 67 -- users/yet-another-developer/wrappers.h | 166 --- .../yet-another-developer.c | 160 --- .../yet-another-developer.h | 87 -- users/zer09/config.h | 32 - users/zer09/lights.c | 189 --- users/zer09/lights.h | 45 - users/zer09/rules.mk | 2 - users/zer09/tap_dance.c | 203 ---- users/zer09/tap_dance.h | 55 - users/zer09/zer09.c | 88 -- users/zer09/zer09.h | 25 - 465 files changed, 1451 insertions(+), 33148 deletions(-) delete mode 100644 users/333fred/333fred.c delete mode 100644 users/333fred/333fred.h delete mode 100644 users/333fred/333fred_config.h delete mode 100644 users/333fred/layout_macros.h delete mode 100644 users/333fred/rgb.c delete mode 100644 users/333fred/rules.mk delete mode 100644 users/_example/_example.c delete mode 100644 users/_example/_example.h delete mode 100644 users/_example/readme.md delete mode 100644 users/_example/rules.mk delete mode 100644 users/alfrdmalr/alfrdmalr.c delete mode 100644 users/alfrdmalr/alfrdmalr.h delete mode 100644 users/alfrdmalr/config.h delete mode 100644 users/alfrdmalr/readme.md delete mode 100644 users/alfrdmalr/rules.mk delete mode 100644 users/arkag/arkag.c delete mode 100644 users/arkag/arkag.h delete mode 100644 users/arkag/config.h delete mode 100644 users/arkag/readme.md delete mode 100644 users/arkag/rules.mk delete mode 100644 users/bbaserdem/README.md delete mode 100644 users/bbaserdem/bbaserdem.c delete mode 100644 users/bbaserdem/bbaserdem.h delete mode 100644 users/bbaserdem/config.h delete mode 100644 users/bbaserdem/rules.mk delete mode 100644 users/bcat/bcat.c delete mode 100644 users/bcat/config.h delete mode 100644 users/bcat/rules.mk delete mode 100644 users/billypython/billypython.c delete mode 100644 users/billypython/billypython.h delete mode 100644 users/billypython/config.h delete mode 100644 users/billypython/rules.mk delete mode 100644 users/billypython/tap_dance.c delete mode 100644 users/billypython/tap_dance.h delete mode 100644 users/bocaj/bocaj.c delete mode 100644 users/bocaj/bocaj.h delete mode 100644 users/bocaj/config.h delete mode 100644 users/bocaj/process_records.c delete mode 100644 users/bocaj/process_records.h delete mode 100644 users/bocaj/readme.md delete mode 100644 users/bocaj/rules.mk delete mode 100644 users/bocaj/send_unicode.c delete mode 100644 users/bocaj/send_unicode.h delete mode 100644 users/bocaj/tap_dances.c delete mode 100644 users/bocaj/tap_dances.h delete mode 100644 users/bocaj/wrappers.h delete mode 100644 users/brett/brett.c delete mode 100644 users/brett/brett.h delete mode 100644 users/brett/rules.mk delete mode 100644 users/cbbrowne/cbbrowne.c delete mode 100644 users/cbbrowne/cbbrowne.h delete mode 100644 users/cbbrowne/rules.mk delete mode 100644 users/cjuniet/cjuniet.c delete mode 100644 users/cjuniet/cjuniet.h delete mode 100644 users/cjuniet/glcdfont.c delete mode 100644 users/cjuniet/readme.md delete mode 100644 users/cjuniet/rules.mk delete mode 100644 users/csc027/csc027.c delete mode 100644 users/csc027/csc027.h delete mode 100644 users/csc027/custom_audio.c delete mode 100644 users/csc027/custom_audio.h delete mode 100644 users/csc027/custom_rgb.c delete mode 100644 users/csc027/custom_rgb.h delete mode 100644 users/csc027/defines.h delete mode 100644 users/csc027/rules.mk delete mode 100644 users/csc027/usb_led.c delete mode 100644 users/csc027/usb_led.h delete mode 100644 users/curry/.gitignore delete mode 100644 users/curry/LICENSE delete mode 100644 users/curry/README.md delete mode 100644 users/curry/config.h delete mode 100644 users/curry/curry.c delete mode 100644 users/curry/curry.h delete mode 100644 users/curry/glcdfont.c delete mode 100644 users/curry/leader.c delete mode 100644 users/curry/leader.h delete mode 100644 users/curry/oled.c delete mode 100644 users/curry/process_records.c delete mode 100644 users/curry/process_records.h delete mode 100644 users/curry/rgb_lighting_user.h delete mode 100644 users/curry/rgb_matrix_user.c delete mode 100644 users/curry/rules.mk delete mode 100644 users/curry/tap_dances.c delete mode 100644 users/curry/tap_dances.h delete mode 100644 users/curry/wrappers.h delete mode 100644 users/d4mation/config.h delete mode 100644 users/d4mation/d4mation.c delete mode 100644 users/d4mation/d4mation.h delete mode 100644 users/d4mation/macros.c delete mode 100644 users/d4mation/macros.h delete mode 100644 users/d4mation/rules.mk delete mode 100644 users/d4mation/tap-dance.c delete mode 100644 users/d4mation/tap-dance.h delete mode 100644 users/d4mation/tap-hold.c delete mode 100644 users/d4mation/tap-hold.h delete mode 100644 users/d4mation/zalgo.c delete mode 100644 users/d4mation/zalgo.h delete mode 100644 users/danielo515/alt_tab.c delete mode 100644 users/danielo515/alt_tab.h delete mode 100644 users/danielo515/combo.c delete mode 100644 users/danielo515/combo.h delete mode 100644 users/danielo515/config.h delete mode 100644 users/danielo515/danielo515.c delete mode 100644 users/danielo515/danielo515.h delete mode 100644 users/danielo515/process_records.c delete mode 100644 users/danielo515/process_records.h delete mode 100644 users/danielo515/readme.md delete mode 100644 users/danielo515/rules.mk delete mode 100644 users/danielo515/tap_dance.c delete mode 100644 users/danielo515/tap_dance.h delete mode 100644 users/datagrok/README.md delete mode 100644 users/datagrok/feature_cdeq.c delete mode 100644 users/datagrok/feature_cdeq.h delete mode 100644 users/datagrok/feature_default_layers_selector.c delete mode 100644 users/datagrok/feature_default_layers_selector.h delete mode 100644 users/dhertz/config.h delete mode 100644 users/dhertz/dhertz.c delete mode 100644 users/dhertz/dhertz.h delete mode 100644 users/dhertz/rules.mk delete mode 100644 users/doogle999/doogle999.c delete mode 100644 users/doogle999/doogle999.h delete mode 100644 users/doogle999/readme.md delete mode 100644 users/doogle999/rules.mk create mode 100644 users/drashna/oled_stuff.c create mode 100644 users/drashna/oled_stuff.h create mode 100644 users/drashna/rgb_matrix_stuff.c rename users/{curry/rgb_matrix_user.h => drashna/rgb_matrix_stuff.h} (53%) delete mode 100644 users/dshields/config.h delete mode 100644 users/dshields/dshields.c delete mode 100644 users/dshields/dshields.h delete mode 100644 users/dshields/rules.mk delete mode 100644 users/dudeofawesome/dudeofawesome.c delete mode 100644 users/dudeofawesome/dudeofawesome.h delete mode 100644 users/dudeofawesome/rules.mk delete mode 100644 users/edvorakjp/edvorakjp.c delete mode 100644 users/edvorakjp/edvorakjp.h delete mode 100644 users/edvorakjp/edvorakjp_process_record.c delete mode 100644 users/edvorakjp/edvorakjp_status.c delete mode 100644 users/edvorakjp/edvorakjp_tap_dance.c delete mode 100644 users/edvorakjp/readme.md delete mode 100644 users/edvorakjp/rules.mk delete mode 100644 users/ericgebhart/config.h delete mode 100644 users/ericgebhart/ericgebhart.c delete mode 100644 users/ericgebhart/ericgebhart.h delete mode 100644 users/ericgebhart/flash-ergodox delete mode 100644 users/ericgebhart/readme.md delete mode 100644 users/ericgebhart/rules.mk delete mode 100644 users/ericgebhart/switch-kbd create mode 100644 users/frederik/frederik.c create mode 100644 users/frederik/frederik.h rename users/{curry/rgb_lighting_user.c => frederik/rgb_stuff.c} (83%) create mode 100644 users/frederik/rgb_stuff.h rename users/{curry => frederik}/rgblight_breathe_table.h (100%) delete mode 100644 users/gary/gary.c delete mode 100644 users/gary/gary.h delete mode 100644 users/gary/readme.md delete mode 100644 users/gary/rules.mk delete mode 100644 users/gordon/gordon.c delete mode 100644 users/gordon/gordon.h delete mode 100644 users/gordon/readme.md delete mode 100644 users/gordon/rules.mk delete mode 100644 users/hvp/hvp.c delete mode 100644 users/hvp/hvp.h delete mode 100644 users/hvp/readme.md delete mode 100644 users/hvp/rules.mk delete mode 100644 users/hvp/tap_dances.c delete mode 100644 users/hvp/tap_dances.h delete mode 100644 users/ibnuda/combo.c delete mode 100644 users/ibnuda/combo.h delete mode 100644 users/ibnuda/config.h delete mode 100644 users/ibnuda/ibnuda.c delete mode 100644 users/ibnuda/ibnuda.h delete mode 100644 users/ibnuda/readme.md delete mode 100644 users/ibnuda/rules.mk delete mode 100644 users/ibnuda/tapdance.c delete mode 100644 users/ibnuda/tapdance.h delete mode 100644 users/ibnuda/wrapper.h delete mode 100644 users/ishtob/config.h delete mode 100644 users/ishtob/ishtob.c delete mode 100644 users/ishtob/ishtob.h delete mode 100644 users/ishtob/readme.md delete mode 100644 users/ishtob/rules.mk delete mode 100644 users/issmirnov/config.h delete mode 100644 users/issmirnov/issmirnov.c delete mode 100644 users/issmirnov/issmirnov.h delete mode 100644 users/issmirnov/rows.h delete mode 100644 users/issmirnov/rules.mk delete mode 100644 users/issmirnov/tap_tog.c delete mode 100644 users/issmirnov/tap_tog.h delete mode 100644 users/jackhumbert/jackhumbert.c delete mode 100644 users/jackhumbert/jackhumbert.h delete mode 100644 users/jackhumbert/readme.md delete mode 100644 users/jackhumbert/rules.mk delete mode 100644 users/jarred/config.h delete mode 100644 users/jarred/jarred.c delete mode 100644 users/jarred/jarred.h delete mode 100644 users/jarred/readme.md delete mode 100644 users/jarred/rules.mk delete mode 100644 users/kageurufu/config.h delete mode 100644 users/kageurufu/custom_rgb.c delete mode 100644 users/kageurufu/custom_rgb.h delete mode 100644 users/kageurufu/kageurufu.c delete mode 100644 users/kageurufu/kageurufu.h delete mode 100644 users/kageurufu/layouts.h delete mode 100644 users/kageurufu/process_records.c delete mode 100644 users/kageurufu/process_records.h delete mode 100644 users/kageurufu/readme.md delete mode 100644 users/kageurufu/rules.mk delete mode 100644 users/konstantin/config.h delete mode 100644 users/konstantin/konstantin.c delete mode 100644 users/konstantin/konstantin.h delete mode 100644 users/konstantin/rgb.c delete mode 100644 users/konstantin/rgb.h delete mode 100644 users/konstantin/rules.mk delete mode 100644 users/konstantin/tap_dance.c delete mode 100644 users/konstantin/tap_dance.h delete mode 100644 users/konstantin/unicode.c delete mode 100644 users/konstantin/unicode.h delete mode 100644 users/kuatsure/kuatsure.c delete mode 100644 users/kuatsure/kuatsure.h delete mode 100644 users/kuatsure/readme.md delete mode 100644 users/kuatsure/rules.mk delete mode 100644 users/kuchosauronad0/.gitignore delete mode 100644 users/kuchosauronad0/combo.c delete mode 100644 users/kuchosauronad0/combo.h delete mode 100644 users/kuchosauronad0/config.h delete mode 100644 users/kuchosauronad0/encoder.c delete mode 100644 users/kuchosauronad0/encoder.h delete mode 100644 users/kuchosauronad0/kuchosauronad0.c delete mode 100644 users/kuchosauronad0/kuchosauronad0.h delete mode 100644 users/kuchosauronad0/leader.c delete mode 100644 users/kuchosauronad0/leader.h delete mode 100644 users/kuchosauronad0/process_records.c delete mode 100644 users/kuchosauronad0/process_records.h delete mode 100644 users/kuchosauronad0/readme.md delete mode 100644 users/kuchosauronad0/rgblight_user.c delete mode 100644 users/kuchosauronad0/rgblight_user.h delete mode 100644 users/kuchosauronad0/rules.mk delete mode 100644 users/kuchosauronad0/tap_dances.c delete mode 100644 users/kuchosauronad0/tap_dances.h delete mode 100644 users/kuchosauronad0/template.c delete mode 100644 users/kuchosauronad0/template.h delete mode 100644 users/kuchosauronad0/unicode.c delete mode 100644 users/kuchosauronad0/unicode.h delete mode 100644 users/kuchosauronad0/wrappers.h delete mode 100644 users/losinggeneration/README.md delete mode 100644 users/losinggeneration/losinggeneration-common.h delete mode 100644 users/losinggeneration/losinggeneration-config.h delete mode 100644 users/losinggeneration/losinggeneration-keymap.h delete mode 100644 users/losinggeneration/rules.mk delete mode 100644 users/manna-harbour_miryoku/README.org delete mode 100644 users/manna-harbour_miryoku/config.h delete mode 100644 users/manna-harbour_miryoku/manna-harbour_miryoku.c delete mode 100644 users/manna-harbour_miryoku/miryoku.org delete mode 100644 users/manna-harbour_miryoku/rules.mk delete mode 100644 users/mattly/config.h delete mode 100644 users/mattly/mattly.c delete mode 100644 users/mattly/mattly.h delete mode 100644 users/mattly/readme.md delete mode 100644 users/mattly/rules.mk delete mode 100644 users/mechmerlin/changelog.md delete mode 100644 users/mechmerlin/config.h delete mode 100644 users/mechmerlin/mechmerlin.c delete mode 100644 users/mechmerlin/mechmerlin.h delete mode 100644 users/mechmerlin/readme.md delete mode 100644 users/mechmerlin/rules.mk delete mode 100644 users/mguterl/config.h delete mode 100644 users/mguterl/mguterl.c delete mode 100644 users/mguterl/mguterl.h delete mode 100644 users/mguterl/readme.md delete mode 100644 users/mguterl/rules.mk delete mode 100644 users/mtdjr/config.h delete mode 100644 users/mtdjr/mtdjr.c delete mode 100644 users/mtdjr/mtdjr.h delete mode 100644 users/mtdjr/readme.md delete mode 100644 users/mtdjr/rules.mk delete mode 100644 users/mtdjr/solenoid.h delete mode 100644 users/mverteuil/.gitignore delete mode 100644 users/mverteuil/mverteuil.c delete mode 100644 users/mverteuil/mverteuil.h delete mode 100644 users/mverteuil/rules.mk delete mode 100644 users/narze/narze.c delete mode 100644 users/narze/narze.h delete mode 100644 users/narze/readme.md delete mode 100644 users/narze/rules.mk delete mode 100644 users/narze/superduper.c delete mode 100644 users/narze/superduper.h delete mode 100644 users/ninjonas/.gitignore delete mode 100644 users/ninjonas/README.md delete mode 100644 users/ninjonas/combos.c delete mode 100644 users/ninjonas/config.h delete mode 100644 users/ninjonas/encoder.c delete mode 100644 users/ninjonas/ninjonas.c delete mode 100644 users/ninjonas/ninjonas.h delete mode 100644 users/ninjonas/oled.c delete mode 100644 users/ninjonas/process_records.c delete mode 100644 users/ninjonas/process_records.h delete mode 100644 users/ninjonas/rules.mk delete mode 100644 users/ninjonas/tap_dances.c delete mode 100644 users/ninjonas/tap_dances.h delete mode 100644 users/not-quite-neo/nqn-basic-layout.h delete mode 100644 users/not-quite-neo/nqn-common.h delete mode 100644 users/not-quite-neo/nqn-keys-on-quertz-de-latin1.h delete mode 100644 users/not-quite-neo/readme.md delete mode 100644 users/nstickney/nstickney.c delete mode 100644 users/nstickney/nstickney.h delete mode 100644 users/nstickney/rules.mk delete mode 100644 users/pvinis/config.h delete mode 100644 users/pvinis/pvinis.c delete mode 100644 users/pvinis/pvinis.h delete mode 100644 users/pvinis/rules.mk delete mode 100644 users/readme.md delete mode 100644 users/replicaJunction/config.h delete mode 100644 users/replicaJunction/readme.md delete mode 100644 users/replicaJunction/replicaJunction.c delete mode 100644 users/replicaJunction/replicaJunction.h delete mode 100644 users/replicaJunction/rules.mk delete mode 100644 users/ridingqwerty/config.h delete mode 100644 users/ridingqwerty/dict.h delete mode 100644 users/ridingqwerty/process_records.c delete mode 100644 users/ridingqwerty/process_records.h delete mode 100644 users/ridingqwerty/ridingqwerty.c delete mode 100644 users/ridingqwerty/ridingqwerty.h delete mode 100644 users/ridingqwerty/rules.mk delete mode 100644 users/ridingqwerty/tapdances.c delete mode 100644 users/ridingqwerty/tapdances.h delete mode 100644 users/ridingqwerty/unicode.c delete mode 100644 users/ridingqwerty/unicode.h delete mode 100644 users/ridingqwerty/wrappers.h delete mode 100644 users/rishka/rishka.c delete mode 100644 users/rishka/rishka.h delete mode 100644 users/rishka/rules.mk delete mode 100644 users/romus/README.md delete mode 100644 users/romus/config.h delete mode 100644 users/romus/romus.c delete mode 100644 users/romus/romus.h delete mode 100644 users/romus/rules.mk delete mode 100644 users/rossman360/readme.md delete mode 100644 users/rossman360/rossman360.c delete mode 100644 users/rossman360/rossman360.h delete mode 100644 users/rossman360/rules.mk delete mode 100644 users/rs/karabiner.json delete mode 100644 users/rs/readme.md delete mode 100644 users/rs/rs.c delete mode 100644 users/rs/rs.h delete mode 100644 users/rs/rules.mk delete mode 100644 users/sethBarberee/config.h delete mode 100644 users/sethBarberee/readme.md delete mode 100644 users/sethBarberee/rules.mk delete mode 100644 users/sethBarberee/sethBarberee.c delete mode 100644 users/sethBarberee/sethBarberee.h delete mode 100644 users/sigma/config.h delete mode 100644 users/sigma/rules.mk delete mode 100644 users/sigma/sigma.c delete mode 100644 users/sigma/sigma.h delete mode 100644 users/spacebarracecar/config.h delete mode 100644 users/spacebarracecar/readme.md delete mode 100644 users/spacebarracecar/rules.mk delete mode 100644 users/spacebarracecar/spacebarracecar.c delete mode 100644 users/spacebarracecar/spacebarracecar.h delete mode 100644 users/stanrc85/config.h delete mode 100644 users/stanrc85/layer_rgb.c delete mode 100644 users/stanrc85/readme.md delete mode 100644 users/stanrc85/rules.mk delete mode 100644 users/stanrc85/stanrc85.c delete mode 100644 users/stanrc85/stanrc85.h delete mode 100644 users/talljoe/config.h delete mode 100644 users/talljoe/readme.md delete mode 100644 users/talljoe/rules.mk delete mode 100644 users/talljoe/talljoe.c delete mode 100644 users/talljoe/talljoe.h delete mode 100644 users/talljoe/tapdance.c delete mode 100644 users/tominabox1/.gitignore delete mode 100644 users/tominabox1/config.h delete mode 100644 users/tominabox1/dimple_rgb.c delete mode 100644 users/tominabox1/doug.c delete mode 100644 users/tominabox1/readme.md delete mode 100644 users/tominabox1/rules.mk delete mode 100644 users/tominabox1/tominabox1.c delete mode 100644 users/tominabox1/tominabox1.h delete mode 100644 users/tominabox1/wrappers.h delete mode 100644 users/turbomech/backupturbomech.c delete mode 100644 users/turbomech/turbomech.c delete mode 100644 users/turbomech/turbomech.h delete mode 100644 users/twschum/config.h delete mode 100644 users/twschum/readme.md delete mode 100644 users/twschum/rules.mk delete mode 100644 users/twschum/twschum.c delete mode 100644 users/twschum/twschum.h delete mode 100644 users/twschum/xtonhasvim.c delete mode 100644 users/twschum/xtonhasvim.h delete mode 100644 users/vosechu/config.h delete mode 100644 users/vosechu/readme.md delete mode 100644 users/vosechu/rules.mk delete mode 100644 users/vosechu/vosechu.c delete mode 100644 users/vosechu/vosechu.h delete mode 100644 users/wanleg/config.h delete mode 100644 users/wanleg/readme.md delete mode 100644 users/wanleg/rules.mk delete mode 100644 users/wanleg/tapdances.c delete mode 100644 users/wanleg/wanleg.c delete mode 100644 users/wanleg/wanleg.h delete mode 100644 users/xtonhasvim/fancylighting.c delete mode 100644 users/xtonhasvim/fancylighting.h delete mode 100644 users/xtonhasvim/readme.md delete mode 100644 users/xtonhasvim/rules.mk delete mode 100644 users/xtonhasvim/xtonhasvim.c delete mode 100644 users/xtonhasvim/xtonhasvim.h delete mode 100644 users/xulkal/config.h delete mode 100644 users/xulkal/custom_encoder.c delete mode 100644 users/xulkal/custom_encoder.h delete mode 100644 users/xulkal/custom_keycodes.h delete mode 100644 users/xulkal/custom_oled.c delete mode 100644 users/xulkal/custom_oled.h delete mode 100644 users/xulkal/custom_rgb.c delete mode 100644 users/xulkal/custom_rgb.h delete mode 100644 users/xulkal/custom_tap_dance.c delete mode 100644 users/xulkal/custom_tap_dance.h delete mode 100644 users/xulkal/layouts.h delete mode 100644 users/xulkal/process_records.c delete mode 100644 users/xulkal/process_records.h delete mode 100644 users/xulkal/rules.mk delete mode 100644 users/xulkal/xulkal.c delete mode 100644 users/xulkal/xulkal.h delete mode 100644 users/yanfali/config.h delete mode 100644 users/yanfali/rules.mk delete mode 100644 users/yet-another-developer/.gitignore delete mode 100644 users/yet-another-developer/README.md delete mode 100644 users/yet-another-developer/combo.c delete mode 100644 users/yet-another-developer/combo.h delete mode 100644 users/yet-another-developer/config.h delete mode 100644 users/yet-another-developer/leader.c delete mode 100644 users/yet-another-developer/leader.h delete mode 100644 users/yet-another-developer/process_records.c delete mode 100644 users/yet-another-developer/process_records.h delete mode 100644 users/yet-another-developer/rules.mk delete mode 100644 users/yet-another-developer/tap_dances.c delete mode 100644 users/yet-another-developer/tap_dances.h delete mode 100644 users/yet-another-developer/unicode.c delete mode 100644 users/yet-another-developer/unicode.h delete mode 100644 users/yet-another-developer/wrappers.h delete mode 100644 users/yet-another-developer/yet-another-developer.c delete mode 100644 users/yet-another-developer/yet-another-developer.h delete mode 100644 users/zer09/config.h delete mode 100644 users/zer09/lights.c delete mode 100644 users/zer09/lights.h delete mode 100644 users/zer09/rules.mk delete mode 100644 users/zer09/tap_dance.c delete mode 100644 users/zer09/tap_dance.h delete mode 100644 users/zer09/zer09.c delete mode 100644 users/zer09/zer09.h diff --git a/keyboards/kyria/keymaps/drashna/config.h b/keyboards/kyria/keymaps/drashna/config.h index e566b16d..f93069ac 100644 --- a/keyboards/kyria/keymaps/drashna/config.h +++ b/keyboards/kyria/keymaps/drashna/config.h @@ -37,3 +37,5 @@ // If you are using an Elite C rev3 on the slave side, uncomment the lines below: #define SPLIT_USB_DETECT #define SPLIT_USB_TIMEOUT 1000 + +#define KEYLOGGER_LENGTH 10 diff --git a/keyboards/kyria/keymaps/drashna/keymap.c b/keyboards/kyria/keymaps/drashna/keymap.c index 5604f1a6..5e97ca55 100644 --- a/keyboards/kyria/keymaps/drashna/keymap.c +++ b/keyboards/kyria/keymaps/drashna/keymap.c @@ -2,35 +2,6 @@ uint8_t is_master; -#ifdef OLED_DRIVER_ENABLE -# define KEYLOGGER_LENGTH 10 -static uint32_t oled_timer = 0; -static char keylog_str[KEYLOGGER_LENGTH + 1] = {"\n"}; -static uint16_t log_timer = 0; -// clang-format off -static const char PROGMEM code_to_name[0xFF] = { -// 0 1 2 3 4 5 6 7 8 9 A B c D E F - ' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', // 0x - 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '1', '2', // 1x - '3', '4', '5', '6', '7', '8', '9', '0', 20, 19, 27, 26, 22, '-', '=', '[', // 2x - ']','\\', '#', ';','\'', '`', ',', '.', '/', 128, ' ', ' ', ' ', ' ', ' ', ' ', // 3x - ' ', ' ', ' ', ' ', ' ', ' ', 'P', 'S', ' ', ' ', ' ', ' ', 16, ' ', ' ', ' ', // 4x - ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 5x - ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 6x - ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 7x - ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 8x - ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 9x - ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Ax - ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Bx - ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Cx - ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Dx - 'C', 'S', 'A', 'C', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Ex - ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' // Fx -}; - -void add_keylog(uint16_t keycode); -#endif - #ifndef UNICODE_ENABLE # define UC(x) KC_NO #endif @@ -52,7 +23,7 @@ void add_keylog(uint16_t keycode); LAYOUT_wrapper( \ KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_MINS, \ LALT_T(KC_TAB), K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \ - OS_LSFT, CTL_T(K21), K22, K23, K24, K25, KC_NO, KC_NO, MEH(KC_MINS), KC_NO, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \ + OS_LSFT, CTL_T(K21), K22, K23, K24, K25, KC_NO, MEH(KC_MINS), TG(_DIABLO), KC_NO, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \ KC_MUTE, OS_LALT, KC_GRV, KC_SPC, BK_LWER, DL_RAIS, KC_ENT, OS_RGUI, UC(0x03A8), UC(0x2E2E) \ ) /* Re-pass though to allow templates to be used */ @@ -107,12 +78,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _____________CARPLAX_QFMLWY_L2_____________, _____________CARPLAX_QFMLWY_R2_____________, _____________CARPLAX_QFMLWY_L3_____________, _____________CARPLAX_QFMLWY_R3_____________ ), + [_MODS] = LAYOUT_wrapper( _______, ___________________BLANK___________________, ___________________BLANK___________________, _______, _______, ___________________BLANK___________________, ___________________BLANK___________________, _______, KC_LSFT, ___________________BLANK___________________, _______, _______, _______, _______, ___________________BLANK___________________, KC_RSFT, _______, _______, KC_LALT, _______, _______, _______, _______, KC_RGUI, _______, _______ ), + [_DIABLO] = LAYOUT_wrapper( + KC_ESC, KC_S, KC_I, KC_F, KC_M, KC_T, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO, + KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_G, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_LCTL, KC_D3_1, KC_D3_2, KC_D3_3, KC_D3_4, KC_Z, KC_J, KC_L, TG(_DIABLO), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_DIABLO_CLEAR, KC_J, KC_NO, SFT_T(KC_SPACE), ALT_T(KC_Q), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO + ), [_LOWER] = LAYOUT_wrapper( KC_F12, _________________LOWER_L1__________________, _________________LOWER_R1__________________, KC_F11, _______, _________________LOWER_L2__________________, _________________LOWER_R2__________________, KC_PIPE, @@ -142,10 +120,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { -#ifdef OLED_DRIVER_ENABLE - oled_timer = timer_read32(); - add_keylog(keycode); -#endif #ifndef SPLIT_KEYBOARD if (keycode == RESET && !is_master) { return false; @@ -154,133 +128,16 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { } return true; } + void matrix_init_keymap(void) { is_master = (uint8_t)is_keyboard_master(); } #ifdef OLED_DRIVER_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; } -void add_keylog(uint16_t keycode) { - if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX) || (keycode >= QK_MODS && keycode <= QK_MODS_MAX)) { - keycode = keycode & 0xFF; - } else if (keycode > 0xFF) { - keycode = 0; - } - - for (uint8_t i = (KEYLOGGER_LENGTH - 1); i > 0; --i) { - keylog_str[i] = keylog_str[i - 1]; - } - - if (keycode < (sizeof(code_to_name) / sizeof(char))) { - keylog_str[0] = pgm_read_byte(&code_to_name[keycode]); - } - - log_timer = timer_read(); -} - -void update_log(void) { - if (timer_elapsed(log_timer) > 750) { - // add_keylog(0); - } -} - -void render_keylogger_status(void) { - oled_write_P(PSTR("Keylogger: "), false); - oled_write(keylog_str, false); -} - -void render_default_layer_state(void) { - oled_write_P(PSTR("Layout: "), false); - switch (get_highest_layer(default_layer_state)) { - case _QWERTY: oled_write_ln_P(PSTR("Qwerty"), false); break; - case _COLEMAK: oled_write_ln_P(PSTR("Colemak"), false); break; - case _DVORAK: oled_write_ln_P(PSTR("Dvorak"), false); break; - case _WORKMAN: oled_write_ln_P(PSTR("Workman"), false); break; - case _NORMAN: oled_write_ln_P(PSTR("Norman"), false); break; - case _MALTRON: oled_write_ln_P(PSTR("Maltron"), false); break; - case _EUCALYN: oled_write_ln_P(PSTR("Eucalyn"), false); break; - case _CARPLAX: oled_write_ln_P(PSTR("Carplax"), false); break; - } -} - -void render_layer_state(void) { - oled_write_ln_P(PSTR("Layer:"), false); - oled_write_P(PSTR(" "), false); - oled_write_P(PSTR("Lower"), layer_state_is(_LOWER)); - oled_write_P(PSTR(" "), false); - oled_write_P(PSTR("Raise"), layer_state_is(_RAISE)); - oled_write_P(PSTR(" "), false); - oled_write_ln_P(PSTR("Mods"), layer_state_is(_MODS)); -} - -void render_keylock_status(uint8_t led_usb_state) { - oled_write_P(PSTR("Lock: "), false); - oled_write_P(PSTR("NUML"), led_usb_state & (1 << USB_LED_NUM_LOCK)); - oled_write_P(PSTR(" "), false); - oled_write_P(PSTR("CAPS"), led_usb_state & (1 << USB_LED_CAPS_LOCK)); - oled_write_P(PSTR(" "), false); - oled_write_ln_P(PSTR("SCLK"), led_usb_state & (1 << USB_LED_SCROLL_LOCK)); -} - -void render_mod_status(uint8_t modifiers) { - oled_write_P(PSTR("Mods: "), false); - oled_write_P(PSTR("Sft"), (modifiers & MOD_MASK_SHIFT)); - oled_write_P(PSTR(" "), false); - oled_write_P(PSTR("Ctl"), (modifiers & MOD_MASK_CTRL)); - oled_write_P(PSTR(" "), false); - oled_write_P(PSTR("Alt"), (modifiers & MOD_MASK_ALT)); - oled_write_P(PSTR(" "), false); - oled_write_P(PSTR("GUI"), (modifiers & MOD_MASK_GUI)); -} - -void render_bootmagic_status(void) { - /* Show Ctrl-Gui Swap options */ - static const char PROGMEM logo[][2][3] = { - {{0x97, 0x98, 0}, {0xb7, 0xb8, 0}}, - {{0x95, 0x96, 0}, {0xb5, 0xb6, 0}}, - }; - oled_write_P(PSTR("Boot "), false); - if (keymap_config.swap_lctl_lgui) { - oled_write_P(logo[1][0], false); - } else { - oled_write_P(logo[0][0], false); - } - oled_write_P(PSTR(" "), false); - oled_write_P(PSTR("NKRO"), keymap_config.nkro); - oled_write_P(PSTR(" "), false); - oled_write_ln_P(PSTR("GUI"), !keymap_config.no_gui); - oled_write_P(PSTR("Magic "), false); - if (keymap_config.swap_lctl_lgui) { - oled_write_P(logo[1][1], false); - } else { - oled_write_P(logo[0][1], false); - } - oled_write_P(PSTR(" "), false); - oled_write_P(PSTR("GRV"), keymap_config.swap_grave_esc); - oled_write_P(PSTR(" "), false); - oled_write_ln_P(PSTR("CAPS"), keymap_config.swap_control_capslock); -} - -void render_user_status(void) { - oled_write_P(PSTR("USER: "), false); - oled_write_P(PSTR("Anim"), userspace_config.rgb_matrix_idle_anim); - oled_write_P(PSTR(" "), false); - oled_write_P(PSTR("Layr"), userspace_config.rgb_layer_change); - oled_write_P(PSTR(" "), false); - oled_write_ln_P(PSTR("Nuke"), userspace_config.nuke_switch); -} - // clang-format off -void render_logo(void) { - static const char PROGMEM qmk_logo[] = { - 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, - 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, - 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0}; - - oled_write_P(qmk_logo, false); -} # ifndef SPLIT_TRANSPORT_MIRROR -void render_kyria_logo(void) { +void oled_driver_render_logo(void) { static const char PROGMEM kyria_logo[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128,192,224,240,112,120, 56, 60, 28, 30, 14, 14, 14, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 14, 14, 30, 28, 60, 56,120,112,240,224,192,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192,224,240,124, 62, 31, 15, 7, 3, 1,128,192,224,240,120, 56, 60, 28, 30, 14, 14, 7, 7,135,231,127, 31,255,255, 31,127,231,135, 7, 7, 14, 14, 30, 28, 60, 56,120,240,224,192,128, 1, 3, 7, 15, 31, 62,124,240,224,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -294,51 +151,6 @@ void render_kyria_logo(void) { oled_write_raw_P(kyria_logo, sizeof(kyria_logo)); } # endif -// clang-format on - -void render_status_main(void) { - /* Show Keyboard Layout */ - render_default_layer_state(); - render_keylock_status(host_keyboard_leds()); - render_bootmagic_status(); - render_user_status(); - - render_keylogger_status(); -} - -void render_status_secondary(void) { - /* Show Keyboard Layout */ - render_logo(); - render_default_layer_state(); - render_layer_state(); - render_mod_status(get_mods() | get_oneshot_mods()); - - render_keylogger_status(); -} - -void oled_task_user(void) { - if (timer_elapsed32(oled_timer) > 30000) { - oled_off(); - return; - } -# ifndef SPLIT_KEYBOARD - else { - oled_on(); - } -# endif - - update_log(); - if (is_master) { - render_status_main(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) - } else { -# ifdef SPLIT_TRANSPORT_MIRROR - render_status_secondary(); -# else - render_kyria_logo(); -# endif - } -} - #endif #ifdef ENCODER_ENABLE diff --git a/keyboards/kyria/keymaps/drashna/rules.mk b/keyboards/kyria/keymaps/drashna/rules.mk index e835340b..2486ecd5 100644 --- a/keyboards/kyria/keymaps/drashna/rules.mk +++ b/keyboards/kyria/keymaps/drashna/rules.mk @@ -20,3 +20,5 @@ HD44780_ENABLE = no # Enable support for HD44780 based LCDs BOOTLOADER = atmel-dfu SPLIT_TRANSPORT = mirror + +TAP_DANCE_ENABLE = yes diff --git a/keyboards/kyria/keymaps/frederik/config.h b/keyboards/kyria/keymaps/frederik/config.h index ba90c77d..48bbaf30 100644 --- a/keyboards/kyria/keymaps/frederik/config.h +++ b/keyboards/kyria/keymaps/frederik/config.h @@ -17,15 +17,18 @@ #pragma once #ifdef OLED_DRIVER_ENABLE - #define OLED_DISPLAY_128X64 +# define OLED_DISPLAY_128X64 +# define OLED_DISABLE_TIMEOUT +# define OLED_SCROLL_TIMEOUT_RIGHT 60000 #endif #ifdef RGBLIGHT_ENABLE #define RGBLIGHT_ANIMATIONS + #define RGBLIGHT_LIMIT_VAL 200 #define RGBLIGHT_HUE_STEP 8 #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 - #define RGBLIGHT_SLEEP + #define RGBLIGHT_SPLIT #define RGBLIGHT_LAYERS #endif @@ -46,3 +49,7 @@ // Allows media codes to properly register in macros and rotary encoder code #define TAP_CODE_DELAY 10 + +#define SPLIT_USB_DETECT +#define SPLIT_USB_TIMEOUT 1000 +#define KEYLOGGER_LENGTH 10 diff --git a/keyboards/kyria/keymaps/frederik/keymap.c b/keyboards/kyria/keymaps/frederik/keymap.c index 3d969218..f05de1f9 100644 --- a/keyboards/kyria/keymaps/frederik/keymap.c +++ b/keyboards/kyria/keymaps/frederik/keymap.c @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include QMK_KEYBOARD_H +#include "frederik.h" bool is_alt_tab_active = false; uint16_t alt_tab_timer = 0; @@ -23,51 +23,37 @@ uint16_t ctrl_tab_timer = 0; uint16_t copy_paste_timer; -enum layers { - QWERTY, - LOWER, - RAISE, - NAV, - ADJUST, - WoW -}; - -enum custom_keycodes { - KC_CCCV = SAFE_RANGE, - KC_ENT_LAY -}; - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* * Base Layer: QWERTY * * ,-------------------------------------------. ,-------------------------------------------. - * | ESC | Q | W | E | R | T | | Y | U | I | O | P | | \ | + * | ESC | Q | W | E | R | T | | Y | U | I | O | P | BKSP | * |--------+------+------+------+------+------| |------+------+------+------+------+--------| * | LSFT | A | S | D | F | G | | H | J | K | L | ; : | ' " | * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| - * | LCTL | Z | X | C | V | B | WoW | | | Del |Leader| N | M | , < | . > | / ? | - _ | + * | LCTL | Z | X | C | V | B | CCCV | | |Leader| WoW | N | M | , < | . > | / ? | - _ | * `----------------------+------+------+------+------+ | |------+------+------+------+------+----------------------' - * | GUI | Alt | | Space| Enter| |Enter | Space| | Tab | AltGr| + * | GUI | Alt | | Space| Enter| | Del | Space| | Tab | AltGr| * | | | Lower| | | | | Nav | Raise| | | * `----------------------------------' `----------------------------------' */ - [QWERTY] = LAYOUT( + [_QWERTY] = LAYOUT( KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, - KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, TG(WoW), XXXXXXX, /*--*/ KC_DEL, KC_LEAD, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_MINS, - KC_LGUI,KC_LALT,MO(LOWER), LT(KC_LSFT, KC_SPC), KC_ENT, /*--*/ KC_ENT, LT(NAV, KC_SPC), MO(RAISE), KC_TAB, KC_RALT + KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_CCCV, XXXXXXX, /*--*/ KC_LEAD, TG(_WoW), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_MINS, + KC_LGUI,KC_LALT,MO(_LOWER), KC_SPC, KC_ENT, /*--*/ KC_DEL, LT(_NAV, KC_SPC), MO(_RAISE),KC_TAB, KC_RALT ), /* * Lower Layer: Numpad, Media * * ,-------------------------------------------. ,-------------------------------------------. - * | | | | VolUp| | | | / ? | 7 & | 8 * | 9 ( | - _ | | + * | | | | | | | | / ? | 7 & | 8 * | 9 ( | - _ | | * |--------+------+------+------+------+------| |------+------+------+------+------+--------| - * | | | Prev | Play | Next | | | * | 4 $ | 5 % | 6 ^ | , < | + | + * | | | Prev | Play | Next | | | * | 4 $ | 5 % | 6 ^ | , < | | * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| - * | | | | VolDn| Mute | | | | | | | 0 ) | 1 ! | 2 @ | 3 # | = + | | + * | | | | | | | | | | | | 0 ) | 1 ! | 2 @ | 3 # | = + | | * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' * | | | | | | | | | | | | * | | | Lower| | | | | Nav | Raise| | MUTE | @@ -75,30 +61,30 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ - [LOWER] = LAYOUT( + [_LOWER] = LAYOUT( _______, _______, _______, KC_VOLU, _______, _______, KC_SLSH, KC_7, KC_8, KC_9, KC_MINS, _______, - _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, KC_ASTR, KC_4, KC_5, KC_6, KC_COMM, KC_PLUS, + _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, KC_ASTR, KC_4, KC_5, KC_6, KC_COMM, _______, _______, _______, _______, KC_VOLD, KC_MUTE, _______, _______, _______, _______, _______, KC_0, KC_1, KC_2, KC_3, KC_EQL, _______, - _______, _______, _______, _______, RGB_TOG, _______, _______, _______, _______, KC_MUTE + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE ), /* * Raise Layer: Symbols * * ,-------------------------------------------. ,-------------------------------------------. - * | | ! | @ | { | } | | | | | _ | € | | | \ | + * | | ! | @ | ( | ) | | | | | _ | € | | \ | | * |--------+------+------+------+------+------| |------+------+------+------+------+--------| - * | | # | $ | ( | ) | ` | | + | - | / | * | % | ' " | + * | | # | $ | [ | ] | ` | | + | - | / | * | % | ' " | * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| - * | | % | ^ | [ | ] | ~ | | | | | | & | = | , | . | / ? | - _ | + * | | % | ^ | { | } | ~ | | | | | | & | = | , | . | / ? | - _ | * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' * | | | | | | | | | | | | * | | | Lower| | | | | Nav | Raise| | | * `----------------------------------' `----------------------------------' */ - [RAISE] = LAYOUT( - _______, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, _______, KC_UNDS, ALGR(KC_5),_______,_______,KC_BSLS, - _______, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, KC_PLUS, KC_MINS, KC_SLSH, KC_ASTR, KC_PERC, KC_QUOT, - _______, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, _______, _______, _______, _______, KC_AMPR, KC_EQL, KC_COMM, KC_DOT, KC_SLSH, KC_MINS, + [_RAISE] = LAYOUT( + _______, KC_EXLM, KC_AT, KC_LPRN, KC_RPRN, KC_PIPE, _______, KC_UNDS, ALGR(KC_5),_______,KC_BSLS,_______, + _______, KC_HASH, KC_DLR, KC_LBRC, KC_RBRC, KC_GRV, KC_PLUS, KC_MINS, KC_SLSH, KC_ASTR, KC_PERC, KC_QUOT, + _______, KC_PERC, KC_CIRC, KC_LCBR, KC_RCBR, KC_TILD, _______, _______, _______, _______, KC_AMPR, KC_EQL, KC_COMM, KC_DOT, KC_SLSH, KC_MINS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), /* @@ -115,9 +101,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | Lower| | | | | Nav | Raise| | | * `----------------------------------' `----------------------------------' */ - [NAV] = LAYOUT( - _______, _______, _______, _______, _______, _______, KC_PGUP, KC_HOME, KC_UP, KC_END, _______, KC_SLCK, - _______, _______, _______, KC_UP , _______, _______, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_CAPS, + [_NAV] = LAYOUT( + _______, _______, _______, _______, _______, _______, KC_PGUP, KC_HOME, KC_UP, KC_END, _______, _______, + KC_CAPS, _______, _______, KC_UP , _______, _______, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), @@ -125,7 +111,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * Adjust Layer * * ,-------------------------------------------. ,-------------------------------------------. - * | | | | | | | | | F7 | F8 | F9 | F10 | | + * | | | | | | | | RGB | F7 | F8 | F9 | F10 | | * |--------+------+------+------+------+------| |------+------+------+------+------+--------| * | | | SAI | HUI | VAI | | | | F4 | F5 | F6 | F11 | | * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| @@ -135,10 +121,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `----------------------------------' `----------------------------------' */ - [ADJUST] = LAYOUT( - _______, _______, _______, _______, _______, _______, _______, KC_F7, KC_F8, KC_F9, KC_F10, _______, - _______, _______, RGB_SAI, RGB_HUI, RGB_VAI, _______, _______, KC_F4, KC_F5, KC_F6, KC_F11, _______, - _______, _______, RGB_SAD, RGB_HUD, RGB_VAD, _______, _______, _______, _______, _______, _______, KC_F1, KC_F2, KC_F3, KC_F12, _______, + [_ADJUST] = LAYOUT( + _______, _______, _______, _______, _______, _______, RGB_TOG, KC_F7, KC_F8, KC_F9, KC_F10, ae, + _______, _______, RGB_SAI, RGB_HUI, RGB_VAI, _______, _______, KC_F4, KC_F5, KC_F6, KC_F11, oe, + _______, _______, RGB_SAD, RGB_HUD, RGB_VAD, _______, _______, _______, _______, _______, _______, KC_F1, KC_F2, KC_F3, KC_F12, aa, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), @@ -150,16 +136,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // * |--------+------+------+------+------+------| |------+------+------+------+------+--------| // * | SHIFT |SHIFT+`| Q | W | E |SHIFT+R| | | | | | | | // * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| -// * | CTRL | F | A | S | D | F | | | | M | Y | | | | | | | +// * | CTRL | F | A | S | D |SHIFT+F| | | | M | WoW | | | | | | | // * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' -// * | | TAB |SPACE | C | T | | B | I | | . | | +// * | | TAB |SPACE | C | T | | B | I | Y | . | | // * | | | | | | | | | | | | // * `----------------------------------' `----------------------------------' // */ - [WoW] = LAYOUT( + [_WoW] = LAYOUT( KC_ESC , KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , _______, _______, _______, _______, _______, _______, - KC_LSFT, LSFT(KC_GRV), KC_Q , KC_W , KC_E , LSFT(KC_R) , _______, _______, _______, _______, _______, _______, - KC_LCTL, KC_F , KC_A , KC_S , KC_D , LSFT(KC_F) , _______, _______, KC_M , KC_Y , _______, _______, _______, _______, _______, _______, + KC_LSFT, LSFT(KC_GRV), KC_Q , KC_W , KC_E , LSFT(KC_R) , _______, _______, _______, _______, _______, _______, + KC_LCTL, KC_F , KC_A , KC_S , KC_D , LSFT(KC_F) , _______, _______, KC_M , TG(_WoW),_______, _______, _______, _______, _______, _______, _______, KC_TAB , KC_SPC , KC_C , KC_T , KC_B , KC_I , _______, KC_DOT , _______ ), @@ -189,6 +175,73 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // return update_tri_layer_state(state, LOWER, RAISE, ADJUST); // } + +#ifdef RGBLIGHT_ENABLE +const rgblight_segment_t PROGMEM _QWERTY_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 10, HSV_GREEN} +); +const rgblight_segment_t PROGMEM _LOWER_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 10, HSV_CYAN} +); +const rgblight_segment_t PROGMEM _RAISE_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 10, HSV_PURPLE} +); +const rgblight_segment_t PROGMEM _NAV_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 10, HSV_TEAL} +); +const rgblight_segment_t PROGMEM _ADJUST_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 10, HSV_YELLOW} +); +const rgblight_segment_t PROGMEM _WoW_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 10, HSV_ORANGE} +); +const rgblight_segment_t PROGMEM _CAPS_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 10, HSV_RED} +); + +const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST( + _QWERTY_layer, + _LOWER_layer, // Overrides caps lock layer + _RAISE_layer, + _NAV_layer, + //_ADJUST_layer, + _WoW_layer, + _CAPS_layer + + // Overrides other layers +); + +void keyboard_post_init_user(void) { + rgblight_layers = my_rgb_layers; + // rgblight_enable_noeeprom(); // Enables RGB, without saving settings + // rgblight_sethsv_noeeprom(HSV_BLUE); + // rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); +} + +layer_state_t layer_state_set_user(layer_state_t state) { + + for (int i = 0; i < sizeof(my_rgb_layers)/sizeof(my_rgb_layers[0]); i++) { + rgblight_set_layer_state(i, layer_state_cmp(state, i)); + } + + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); + +} + +bool led_update_user(led_t led_state) { + rgblight_set_layer_state(0, layer_state_cmp(_QWERTY, 0)); + // rgblight_set_layer_state(1, layer_state_cmp(LOWER, 1)); + // rgblight_set_layer_state(2, layer_state_cmp(RAISE, 2)); + // rgblight_set_layer_state(3, layer_state_cmp(NAV, 3)); + // rgblight_set_layer_state(4, layer_state_cmp(ADJUST, 4)); + // rgblight_set_layer_state(5, layer_state_cmp(WoW, 5)); + rgblight_set_layer_state(6, led_state.caps_lock); + return true; +} + +#endif + + bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case KC_CCCV: // One key copy/paste @@ -202,6 +255,72 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } } break; + case OE: + if (record->event.pressed) { + SEND_STRING(SS_DOWN(X_RALT)); + SEND_STRING(SS_TAP(X_KP_0)); + SEND_STRING(SS_TAP(X_KP_2)); + SEND_STRING(SS_TAP(X_KP_1)); + SEND_STRING(SS_TAP(X_KP_6)); + SEND_STRING(SS_UP(X_RALT)); + return false; + } + break; + case oe: + if (record->event.pressed) { + SEND_STRING(SS_DOWN(X_RALT)); + SEND_STRING(SS_TAP(X_KP_0)); + SEND_STRING(SS_TAP(X_KP_2)); + SEND_STRING(SS_TAP(X_KP_4)); + SEND_STRING(SS_TAP(X_KP_8)); + SEND_STRING(SS_UP(X_RALT)); + return false; + } + break; + case AE: + if (record->event.pressed) { + SEND_STRING(SS_DOWN(X_RALT)); + SEND_STRING(SS_TAP(X_KP_0)); + SEND_STRING(SS_TAP(X_KP_1)); + SEND_STRING(SS_TAP(X_KP_9)); + SEND_STRING(SS_TAP(X_KP_8)); + SEND_STRING(SS_UP(X_RALT)); + return false; + } + break; + case ae: + if (record->event.pressed) { + SEND_STRING(SS_DOWN(X_RALT)); + SEND_STRING(SS_TAP(X_KP_0)); + SEND_STRING(SS_TAP(X_KP_2)); + SEND_STRING(SS_TAP(X_KP_3)); + SEND_STRING(SS_TAP(X_KP_0)); + SEND_STRING(SS_UP(X_RALT)); + return false; + } + break; + case AA: + if (record->event.pressed) { + SEND_STRING(SS_DOWN(X_RALT)); + SEND_STRING(SS_TAP(X_KP_0)); + SEND_STRING(SS_TAP(X_KP_1)); + SEND_STRING(SS_TAP(X_KP_9)); + SEND_STRING(SS_TAP(X_KP_7)); + SEND_STRING(SS_UP(X_RALT)); + return false; + } + break; + case aa: + if (record->event.pressed) { + SEND_STRING(SS_DOWN(X_RALT)); + SEND_STRING(SS_TAP(X_KP_0)); + SEND_STRING(SS_TAP(X_KP_2)); + SEND_STRING(SS_TAP(X_KP_2)); + SEND_STRING(SS_TAP(X_KP_9)); + SEND_STRING(SS_UP(X_RALT)); + return false; + } + break; } return true; } @@ -263,6 +382,11 @@ void matrix_scan_user(void) { } } +// layer_state_t layer_state_set_user(layer_state_t state) { +// return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +// } + + #ifdef OLED_DRIVER_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; @@ -282,182 +406,15 @@ static void render_kyria_logo(void) { oled_write_raw_P(kyria_logo, sizeof(kyria_logo)); } -#ifdef RGBLIGHT_ENABLE +// layer_state_t layer_state_set_user(layer_state_t state) { -const rgblight_segment_t PROGMEM QWERTY_layer[] = RGBLIGHT_LAYER_SEGMENTS( - {0, 10, HSV_BLUE} -); -const rgblight_segment_t PROGMEM LOWER_layer[] = RGBLIGHT_LAYER_SEGMENTS( - {0, 10, HSV_CYAN} -); -const rgblight_segment_t PROGMEM RAISE_layer[] = RGBLIGHT_LAYER_SEGMENTS( - {0, 10, HSV_PURPLE} -); -const rgblight_segment_t PROGMEM NAV_layer[] = RGBLIGHT_LAYER_SEGMENTS( - {0, 10, HSV_GREEN} -); -const rgblight_segment_t PROGMEM ADJUST_layer[] = RGBLIGHT_LAYER_SEGMENTS( - {0, 10, HSV_YELLOW} -); -const rgblight_segment_t PROGMEM WoW_layer[] = RGBLIGHT_LAYER_SEGMENTS( - {0, 10, HSV_ORANGE} -); -const rgblight_segment_t PROGMEM CAPS_layer[] = RGBLIGHT_LAYER_SEGMENTS( - {0, 10, HSV_RED} -); - -const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST( - QWERTY_layer, - LOWER_layer, // Overrides caps lock layer - RAISE_layer, - NAV_layer, - ADJUST_layer, - WoW_layer, - CAPS_layer - - // Overrides other layers -); - -void keyboard_post_init_user(void) { - rgblight_layers = my_rgb_layers; - // rgblight_enable_noeeprom(); // Enables RGB, without saving settings - // rgblight_sethsv_noeeprom(HSV_BLUE); - // rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); -} - -layer_state_t layer_state_set_user(layer_state_t state) { - - for (int i = 0; i < sizeof(my_rgb_layers)/sizeof(my_rgb_layers[0]); i++) { - rgblight_set_layer_state(i, layer_state_cmp(state, i)); - } - - return update_tri_layer_state(state, LOWER, RAISE, ADJUST); +// return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); -} - -bool led_update_user(led_t led_state) { - rgblight_set_layer_state(0, layer_state_cmp(QWERTY, 0)); - // rgblight_set_layer_state(1, layer_state_cmp(LOWER, 1)); - // rgblight_set_layer_state(2, layer_state_cmp(RAISE, 2)); - // rgblight_set_layer_state(3, layer_state_cmp(NAV, 3)); - // rgblight_set_layer_state(4, layer_state_cmp(ADJUST, 4)); - // rgblight_set_layer_state(5, layer_state_cmp(WoW, 5)); - rgblight_set_layer_state(6, led_state.caps_lock); - return true; -} - -#endif - -// static void render_wow_logo(void) { -// static const char PROGMEM wow_logo[] = { -// 0x00, 0xFE, 0x02, 0x02, 0x02, 0x02, 0x02, 0x82, 0x82, 0x82, -// 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0xC2, 0xE2, 0xE2, 0xF2, -// 0xF2, 0xFA, 0xFA, 0xFA, 0xFA, 0xFE, 0xFC, 0xFC, 0xFC, 0xDC, -// 0xDC, 0xDC, 0xDC, 0xDC, 0xDC, 0x9C, 0x1C, 0x1C, 0x3C, 0x3A, -// 0x3A, 0x3A, 0x72, 0x72, 0x72, 0xE2, 0x42, 0x42, 0x02, 0x02, -// 0x02, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x02, 0x02, -// 0x02, 0x02, 0x02, 0xFE, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, -// 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -// 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -// 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -// 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -// 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -// 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, -// 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, -// 0x3F, 0x1F, 0x0F, 0x1F, 0x1F, 0x3F, 0x7F, 0x7F, 0x7F, 0x7F, -// 0x7F, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x13, -// 0x3F, 0x03, 0x21, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -// 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -// 0x01, 0x03, 0x07, 0x07, 0x0F, 0x03, 0x00, 0x00, 0x00, 0x00, -// 0x00, 0xFF, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -// 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xC0, -// 0x80, 0x00, 0x80, 0xC0, 0xC0, 0x80, 0x00, 0x80, 0xC0, 0xC0, -// 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -// 0x00, 0x00, 0xE0, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, -// 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -// 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0xC0, -// 0xF8, 0xFE, 0xFF, 0x3F, 0x0F, 0x13, 0x78, 0x10, 0x00, 0x00, -// 0x81, 0x07, 0x7F, 0xFF, 0xFF, 0xFF, 0xF3, 0xE3, 0xF1, 0xE1, -// 0x00, 0x0F, 0xFF, 0xFF, 0xFF, 0x7F, 0x1F, 0xCF, 0xFC, 0x00, -// 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0xFF, 0xFF, 0xFF, -// 0xFF, 0x0F, 0x03, 0x03, 0x03, 0x01, 0x01, 0x00, 0x00, 0x00, -// 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, -// 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -// 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x1F, 0x7F, 0x78, -// 0x7F, 0x07, 0x0F, 0x7F, 0x78, 0x7F, 0x0F, 0x3E, 0x7F, 0x77, -// 0x63, 0x63, 0x7F, 0x3E, 0x00, 0x7F, 0x7F, 0x03, 0x01, 0x00, -// 0x7F, 0x7F, 0x3E, 0x7F, 0x77, 0x63, 0x63, 0x7F, 0x7F, 0x00, -// 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -// 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xFE, 0xFF, 0xFF, 0x0F, -// 0x60, 0x7E, 0xFE, 0xFC, 0xFC, 0xFC, 0xF0, 0xF0, 0xE0, 0x80, -// 0x00, 0x03, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xE0, -// 0x00, 0x00, 0x00, 0xC0, 0xFC, 0xFF, 0xDF, 0xF8, 0xF8, 0xE0, -// 0x00, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, -// 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -// 0x00, 0x00, 0x00, 0x0E, 0xFE, 0xFE, 0xC0, 0x03, 0x00, 0x00, -// 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -// 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -// 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, -// 0x80, 0x00, 0x80, 0xF0, 0xF0, 0xB0, 0x90, 0x00, 0x00, 0x00, -// 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -// 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -// 0x00, 0x00, 0x00, 0x80, 0x3F, 0xFF, 0x7F, 0x00, 0x00, 0x01, -// 0x03, 0x03, 0x03, 0x00, 0x05, 0x19, 0x01, 0x00, 0x00, 0x00, -// 0x00, 0x07, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xC0, -// 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xF0, -// 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0x00, 0x00, -// 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -// 0x00, 0xF8, 0xFF, 0xFF, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00, -// 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -// 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -// 0x00, 0x00, 0x00, 0x1F, 0x3F, 0x3B, 0x31, 0x31, 0x3F, 0x1F, -// 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -// 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -// 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -// 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -// 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -// 0x00, 0x0F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, -// 0xFF, 0x0F, 0x00, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, -// 0xFF, 0x3F, 0x1F, 0x3F, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, -// 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xE0, 0xF8, 0xFF, 0x7F, -// 0x0F, 0x03, 0xF0, 0xCF, 0xF0, 0xF0, 0x00, 0x00, 0x00, 0x00, -// 0x00, 0x70, 0xF0, 0xE0, 0x00, 0xE0, 0xF0, 0xF0, 0xE0, 0x00, -// 0xE0, 0xF0, 0x30, 0x40, 0x40, 0xC0, 0xC0, 0xC0, 0x80, 0x00, -// 0xC0, 0xC0, 0xC0, 0x40, 0x80, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, -// 0x00, 0x00, 0xC0, 0xC0, 0xC0, 0x40, 0x00, 0x40, 0x40, 0xC0, -// 0xC0, 0xC0, 0x80, 0x40, 0xF8, 0xF8, 0x58, 0x48, 0xF0, 0xF0, -// 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, -// 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xE0, 0xC0, 0xC0, 0x80, -// 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, -// 0x07, 0x03, 0x03, 0x01, 0x01, 0x01, 0x03, 0x03, 0x07, 0x00, -// 0x00, 0x00, 0x06, 0x07, 0x03, 0x03, 0x01, 0x01, 0x01, 0x03, -// 0x02, 0x00, 0x00, 0x00, 0x80, 0x80, 0xC0, 0xE0, 0xF0, 0xF0, -// 0xFC, 0xFE, 0xFF, 0xFF, 0xFF, 0xE3, 0x00, 0x00, 0x00, 0x00, -// 0xFF, 0x0F, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -// 0x07, 0x1F, 0x1E, 0x1F, 0x01, 0x03, 0x1F, 0x1E, 0x1F, 0x03, -// 0x0C, 0x1E, 0x1E, 0x1E, 0x1A, 0x1F, 0x1F, 0x00, 0x1F, 0x1F, -// 0x00, 0x00, 0x0F, 0x1F, 0x1D, 0x18, 0x18, 0x18, 0x00, 0x00, -// 0x1F, 0x1F, 0x00, 0x00, 0x0C, 0x1E, 0x1E, 0x1E, 0x1A, 0x1F, -// 0x1F, 0x00, 0x1F, 0x1F, 0x00, 0x00, 0x1F, 0x1F, 0x18, 0x10, -// 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x80, 0x80, -// 0x80, 0x80, 0x80, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x80, -// 0x80, 0x80, 0x80, 0x80, 0x85, 0x86, 0x8E, 0x8E, 0x9C, 0x9C, -// 0xBC, 0xB8, 0x38, 0x38, 0x38, 0x78, 0x78, 0x70, 0x70, 0x78, -// 0x78, 0x78, 0x78, 0x38, 0x38, 0xBC, 0xBC, 0xBC, 0x9E, 0x9E, -// 0x9E, 0x8F, 0x8F, 0x87, 0x83, 0x83, 0x81, 0x83, 0x83, 0x83, -// 0x83, 0x83, 0x83, 0x81, 0x80, 0x80, 0x80, 0x80, 0x7F, 0x00, -// 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -// 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -// 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -// 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -// 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -// 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -// 0x00, 0x00, 0x00, 0x00 -// }; -// oled_write_raw_P(wow_logo, sizeof(wow_logo)); // } + + static void render_qmk_logo(void) { static const char PROGMEM qmk_logo[] = { 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, @@ -476,22 +433,22 @@ static void render_status(void) { // Host Keyboard Layer Status oled_write_P(PSTR("Layer: "), false); switch (get_highest_layer(layer_state)) { - case QWERTY: + case _QWERTY: oled_write_P(PSTR("Default\n"), false); break; - case LOWER: + case _LOWER: oled_write_P(PSTR("Lower\n"), false); break; - case RAISE: + case _RAISE: oled_write_P(PSTR("Raise\n"), false); break; - case NAV: + case _NAV: oled_write_P(PSTR("Navigation\n"), false); break; - case ADJUST: + case _ADJUST: oled_write_P(PSTR("Adjust\n"), false); break; - case WoW: + case _WoW: oled_write_P(PSTR("Warcraft\n"), false); break; default: @@ -518,8 +475,8 @@ void oled_task_user(void) { void encoder_update_user(uint8_t index, bool clockwise) { if (index == 0) { switch (biton32(layer_state)) { - case WoW: - case QWERTY: + case _WoW: + case _QWERTY: // Move whole words. Hold shift to select while moving. if (!clockwise) { if (!is_alt_tab_active) { @@ -537,7 +494,7 @@ void encoder_update_user(uint8_t index, bool clockwise) { tap_code16(S(KC_TAB)); } break; - case RAISE: + case _RAISE: if (!clockwise) { if (!is_ctrl_tab_active) { is_ctrl_tab_active = true; @@ -566,7 +523,7 @@ void encoder_update_user(uint8_t index, bool clockwise) { } } else if (index == 1) { switch (biton32(layer_state)) { - case QWERTY: + case _QWERTY: // Scrolling with Mouse wheel. if (clockwise) { tap_code(KC_WH_D); diff --git a/keyboards/kyria/keymaps/frederik/rules.mk b/keyboards/kyria/keymaps/frederik/rules.mk index 9b8e2941..0ff27f5f 100644 --- a/keyboards/kyria/keymaps/frederik/rules.mk +++ b/keyboards/kyria/keymaps/frederik/rules.mk @@ -1,5 +1,9 @@ OLED_DRIVER_ENABLE = yes # Enables the use of OLED displays -ENCODER_ENABLE = yes # Enables the use of one or more encoders +ENCODER_ENABLE = yes # ENables the use of one or more encoders RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -LEADER_ENABLE = yes # Enable the Leader Key feature -MOUSEKEY_ENABLE = no +RGBLIGHT_STARTUP_ANIMATION = yes + +LEADER_ENABLE = yes + +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control diff --git a/users/333fred/333fred.c b/users/333fred/333fred.c deleted file mode 100644 index 79df8c4d..00000000 --- a/users/333fred/333fred.c +++ /dev/null @@ -1,122 +0,0 @@ -#include "333fred.h" -#include "quantum.h" -#include "action.h" - -typedef enum { - SINGLE_TAP, SINGLE_HOLD, DOUBLE -} tap_dance_state_enum; - -static tap_dance_state_enum tap_dance_state; -static bool tap_dance_active = false; - -void tap_dance_sym_vim_finished(qk_tap_dance_state_t *state, void *user_data) { - // Determine the current state - if (state->count == 1) { - if (state->interrupted || state->pressed == 0) tap_dance_state = SINGLE_TAP; - else tap_dance_state = SINGLE_HOLD; - } else { - // Handle any number of other taps as a VIM movement hold - tap_dance_state = DOUBLE; - } - - switch (tap_dance_state) { - case SINGLE_TAP: - if (tap_dance_active) { - reset_oneshot_layer(); - tap_dance_active = false; - } else { - set_oneshot_layer(SYMB, ONESHOT_START); - tap_dance_active = true; - } - break; - case SINGLE_HOLD: - layer_on(SYMB); - break; - case DOUBLE: - layer_on(VIM); - break; - } -} - -void tap_dance_sym_vim_reset(qk_tap_dance_state_t *state, void *user_data) { - switch(tap_dance_state) { - case SINGLE_TAP: - clear_oneshot_layer_state(ONESHOT_PRESSED); - break; - case SINGLE_HOLD: - layer_off(SYMB); - break; - case DOUBLE: - layer_off(VIM); - break; - } -} - -void tap_dance_copy_paste_finished(qk_tap_dance_state_t *state, void *user_data) { - bool is_paste = state->count == 2; - // If either the one-shot shift is set, or if shift is being held, count as shift being held. - // We'll clear the one-shot shift if it was held - uint8_t one_shot_mods = get_oneshot_mods(); - bool is_shift = false; - - if (get_mods() & MOD_MASK_SHIFT) { - is_shift = true; - } else if (one_shot_mods & MOD_MASK_SHIFT) { - set_oneshot_mods(one_shot_mods & ~MOD_MASK_SHIFT); - is_shift = true; - } - - if (is_paste) { - if (is_shift) { - SEND_STRING(SS_LSFT(SS_TAP(X_INSERT))); - } else { - SEND_STRING(SS_LCTRL("v")); - } - } else { - if (is_shift) { - SEND_STRING(SS_LCTRL(SS_TAP(X_INSERT))); - } else { - SEND_STRING(SS_LCTRL("c")); - } - } -} - -qk_tap_dance_action_t tap_dance_actions[] = { - [TD_SYM_VIM] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, tap_dance_sym_vim_finished, tap_dance_sym_vim_reset), - [TD_COPY_PASTE] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, tap_dance_copy_paste_finished, NULL) -}; - -void tap_dance_process_keycode(uint16_t keycode) { - if (tap_dance_state == SINGLE_TAP && keycode != TD(TD_SYM_VIM)) { - tap_dance_active = false; - } -} - -__attribute__ ((weak)) -void layer_state_set_rgb(uint32_t state) {} - -uint32_t layer_state_set_user(uint32_t state) { - layer_state_set_rgb(state); - return state; -} - -bool try_handle_macro(uint16_t keycode, keyrecord_t *record) { - switch (keycode) - { - case DLEFT: - if (record->event.pressed) - SEND_STRING(SS_LGUI(SS_LALT(SS_TAP(X_LEFT)))); - return true; - case DRIGHT: - if (record->event.pressed) - SEND_STRING(SS_LGUI(SS_LALT(SS_TAP(X_RIGHT)))); - return true; - case PSCREEN_APP: - if (record->event.pressed) - SEND_STRING(SS_LALT(SS_TAP(X_PSCREEN))); - return true; - - default: - return false; - } -} diff --git a/users/333fred/333fred.h b/users/333fred/333fred.h deleted file mode 100644 index 716b61a2..00000000 --- a/users/333fred/333fred.h +++ /dev/null @@ -1,30 +0,0 @@ -#pragma once - -#include "quantum.h" -#include "layout_macros.h" - -#define BASE 0 -#define CODE 1 // code layer -#define CODEFLOW 2 -#define SYMB 3 -#define MDIA 4 // media keys -#define VIM 5 -#define GAME 6 -#define GAME_ARROW 7 - -// Tap dance config shared between my keyboards -enum tap_dance_declarations { - TD_SYM_VIM = 0, - TD_COPY_PASTE, -}; - -enum custom_keys { - DLEFT = SAFE_RANGE, - DRIGHT, - PSCREEN_APP -}; - -void tap_dance_sym_vim_finished(qk_tap_dance_state_t*, void*); -void tap_dance_sym_vim_reset(qk_tap_dance_state_t*, void*); -void tap_dance_process_keycode(uint16_t); -bool try_handle_macro(uint16_t keycode, keyrecord_t *record); diff --git a/users/333fred/333fred_config.h b/users/333fred/333fred_config.h deleted file mode 100644 index c099072f..00000000 --- a/users/333fred/333fred_config.h +++ /dev/null @@ -1,4 +0,0 @@ -#pragma once - -#define PERMISSIVE_HOLD -#define NO_ACTION_MACRO diff --git a/users/333fred/layout_macros.h b/users/333fred/layout_macros.h deleted file mode 100644 index 3b163f6c..00000000 --- a/users/333fred/layout_macros.h +++ /dev/null @@ -1,44 +0,0 @@ -#pragma once - -#define SIX_TRNS _______, _______, _______, _______, _______, _______ -#define FOUR_TRNS _______, _______, _______, _______ - -// Row 5: 6 keys -#define ROW5_LEFT_BASE KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5 -#define ROW5_RGHT_BASE KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS -#define ROW5_LEFT_SYMB _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5 -#define ROW5_RGHT_SYMB KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11 -#define ROW5_LEFT_VIM SIX_TRNS -#define ROW5_RGHT_VIM SIX_TRNS - -// Row 4: 6 keys -#define ROW4_LEFT_BASE KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T -#define ROW4_RGHT_BASE KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS -#define ROW4_LEFT_SYMB _______, KC_EXLM, KC_AT, KC_LPRN, KC_RPRN, KC_PIPE -#define ROW4_RGHT_SYMB KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12 -#define ROW4_LEFT_VIM SIX_TRNS -#define ROW4_RGHT_VIM SIX_TRNS - -// Row 3: 6 keys -#define ROW3_LEFT_BASE CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G -#define ROW3_RGHT_BASE KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT -#define ROW3_LEFT_SYMB _______, KC_HASH, KC_DLR, KC_LCBR, KC_RCBR, KC_GRV -#define ROW3_RGHT_SYMB KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, _______ -#define ROW3_LEFT_VIM _______, DLEFT, DRIGHT, KC_LCTL, KC_LGUI, _______ -#define ROW3_RGHT_VIM KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______ - -// Row 2: 6 keys -#define ROW2_LEFT_BASE OSM(MOD_LSFT), CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B -#define ROW2_RGHT_BASE KC_N, KC_M, KC_COMM, KC_DOT, CTL_T(KC_SLSH), OSM(MOD_RSFT) -#define ROW2_LEFT_SYMB _______, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD -#define ROW2_RGHT_SYMB KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, _______ -#define ROW2_LEFT_VIM _______, _______, KC_TAB, _______, _______, _______ -#define ROW2_RGHT_VIM SIX_TRNS - -// Row 1: 4 keys -#define ROW1_LEFT_BASE OSM(MOD_LCTL), KC_F4, KC_F5, KC_LALT -#define ROW1_RGHT_BASE KC_DOWN, KC_EQL, KC_RIGHT, KC_RGUI -#define ROW1_LEFT_SYMB _______, _______, _______, _______ -#define ROW1_RGHT_SYMB KC_0, KC_DOT, KC_EQL, _______ -#define ROW1_LEFT_VIM FOUR_TRNS -#define ROW1_RGHT_VIM FOUR_TRNS diff --git a/users/333fred/rgb.c b/users/333fred/rgb.c deleted file mode 100644 index c86cd1c7..00000000 --- a/users/333fred/rgb.c +++ /dev/null @@ -1,28 +0,0 @@ -#include "quantum.h" -#include "333fred.h" - -void layer_state_set_rgb(uint32_t state) { - switch (biton32(state)) { - case BASE: - // purple - rgblight_sethsv_noeeprom(210, 255, 20); - break; - case SYMB: - // blue - rgblight_sethsv_noeeprom(191, 255, 20); - break; - case VIM: - // green - rgblight_sethsv_noeeprom(85, 255, 20); - break; - case GAME: - // red - rgblight_sethsv_noeeprom(0, 255, 20); - break; - } -} - -void keyboard_post_init_user(void) { - rgblight_enable_noeeprom(); - layer_state_set_rgb(1); // Set layer 0 (bit 1) on -} diff --git a/users/333fred/rules.mk b/users/333fred/rules.mk deleted file mode 100644 index 0e2cc258..00000000 --- a/users/333fred/rules.mk +++ /dev/null @@ -1,5 +0,0 @@ -SRC += 333fred.c - -ifeq ($(strip $(RGBLIGHT_ENABLE)), yes) - SRC += rgb.c -endif diff --git a/users/_example/_example.c b/users/_example/_example.c deleted file mode 100644 index 8e0778b1..00000000 --- a/users/_example/_example.c +++ /dev/null @@ -1,5 +0,0 @@ -#include "_example.h" - -void my_custom_function(void) { - -} \ No newline at end of file diff --git a/users/_example/_example.h b/users/_example/_example.h deleted file mode 100644 index f7c79902..00000000 --- a/users/_example/_example.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef USERSPACE -#define USERSPACE - -#include "quantum.h" - -void my_custom_function(void); - -#endif \ No newline at end of file diff --git a/users/_example/readme.md b/users/_example/readme.md deleted file mode 100644 index fdea33b6..00000000 --- a/users/_example/readme.md +++ /dev/null @@ -1,14 +0,0 @@ -Copyright @ - -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 . \ No newline at end of file diff --git a/users/_example/rules.mk b/users/_example/rules.mk deleted file mode 100644 index 250adc3d..00000000 --- a/users/_example/rules.mk +++ /dev/null @@ -1 +0,0 @@ -SRC += _example.c \ No newline at end of file diff --git a/users/alfrdmalr/alfrdmalr.c b/users/alfrdmalr/alfrdmalr.c deleted file mode 100644 index 18ce8bad..00000000 --- a/users/alfrdmalr/alfrdmalr.c +++ /dev/null @@ -1,95 +0,0 @@ -#include "alfrdmalr.h" -#include "muse.h" - -bool muse_mode = false; -uint8_t last_muse_note = 0; -uint16_t muse_counter = 0; -uint8_t muse_offset = 70; -uint16_t muse_tempo = 50; - -LEADER_EXTERNS(); - -void matrix_scan_user(void) { -#ifdef AUDIO_ENABLE - if (muse_mode) { - if (muse_counter == 0) { - uint8_t muse_note = muse_offset + SCALE[muse_clock_pulse()]; - if (muse_note != last_muse_note) { - stop_note(compute_freq_for_midi_note(last_muse_note)); - play_note(compute_freq_for_midi_note(muse_note), 0xF); - last_muse_note = muse_note; - } - } - muse_counter = (muse_counter + 1) % muse_tempo; - } else { - if (muse_counter) { - stop_all_notes(); - muse_counter = 0; - } - } -#endif - - LEADER_DICTIONARY() { - leading = false; - // reset keyboard to bootloader - SEQ_FIVE_KEYS(KC_R, KC_E, KC_S, KC_E, KC_T) { - reset_keyboard(); - } - leader_end(); - } -} - -bool syml_pressed = false; -bool symr_pressed = false; -bool settings_active = false; -bool symbols_active = false; -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch(keycode) { - case SYML: - if (record->event.pressed) { - syml_pressed = true; - } else { - syml_pressed = false; - } - break; - case SYMR: - if (record->event.pressed) { - symr_pressed = true; - } else { - symr_pressed = false; - } - break; - } - - // trilayer-esque behavior. If both SYMBOL layer keys are held, then the - // settings layer is open. If only one is held, SYMBOL is active. - if (syml_pressed && symr_pressed) { - layer_on(_SETTINGS); - settings_active = true; - } else if (syml_pressed || symr_pressed) { - if (settings_active) { - layer_off(_SETTINGS); - settings_active = false; - } - layer_on(_SYMBOL); - symbols_active = true; - } else { - if (symbols_active) { - layer_off(_SYMBOL); - symbols_active = false; - } - } - - return true; -} - -// allow access to the settings layer to turn music mode back off -bool music_mask_user(uint16_t keycode) { - switch (keycode) { - case SYML: - case SYMR: - return false; - default: - return true; - } -} \ No newline at end of file diff --git a/users/alfrdmalr/alfrdmalr.h b/users/alfrdmalr/alfrdmalr.h deleted file mode 100644 index 1989fb11..00000000 --- a/users/alfrdmalr/alfrdmalr.h +++ /dev/null @@ -1,286 +0,0 @@ -/* -Copyright 2020 Alfred Maler @alfrdmalr - -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 -MERCHANTIBILITY 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 . -*/ - -#pragma once -#include QMK_KEYBOARD_H - -enum shared_layers { - _QWERTY, - _SYMBOL, - _NAVIGATION, - _NUMPAD, - _SETTINGS -}; - -// KEYCODES ============================================================================ - -// the SYML and SYMR keycodes are just used to activate the symbols layer. -// they're distinct so that I can hit both of them to activate a trilayer -enum alfrdmalr_keycodes { - SYML = SAFE_RANGE, - SYMR -}; - -#define NUMSPACE LT(_NUMPAD, KC_SPC) -#define NAVLAYER MO(_NAVIGATION) -#define SYMLAYER MO(_SYMBOL) -#define SETLAYER MO(_SETTINGS) -#define CTRLSHFT C(KC_LSFT) -#define WINUNDO C(KC_Z) -#define WINCOPY C(KC_C) -#define WINCUT C(KC_X) -#define WINPASTE C(KC_V) - -// convenience keycodes/aliases for base modifiers -// bottom row -#define K41 CTRLSHFT -#define K42 KC_LGUI -#define K43 KC_LALT -// #define K44 SYMLAYER -#define K44 SYML -#define K45 NUMSPACE -#define K46 NUMSPACE -// #define K47 SYMLAYER -#define K47 SYMR -#define K48 KC_RALT -#define K49 SETLAYER -#define K4A MU_TOG - -// leftmost column -#define K00 KC_ESC -#define K10 KC_TAB -#define K20 NAVLAYER -#define K30 KC_LSFT -#define K40 KC_LCTL - -// rightmost column -#define K0B KC_BSPC -#define K1B KC_BSPC -#define K1B_ALT KC_DEL // for 5x12 boards, keep backspace as the top-left key and add delete key -#define K2B KC_QUOT -#define K3B KC_RSFT -#define K4B KC_LEAD - -// LAYOUT WRAPPERS ===================================================================== -#if (!defined(LAYOUT) && defined(KEYMAP)) -# define LAYOUT KEYMAP -#endif - -#define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__) -#define LAYOUT_ortho_4x12_wrapper(...) LAYOUT_ortho_4x12(__VA_ARGS__) -#define LAYOUT_ortho_5x12_wrapper(...) LAYOUT_ortho_5x12(__VA_ARGS__) - -// KEYCODE GROUPS ====================================================================== -// MISC -#define ______TRANS______ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS -#define ____NUMROW_L0____ KC_1, KC_2, KC_3, KC_4, KC_5 -#define ____NUMROW_R0____ KC_6, KC_7, KC_8, KC_9, KC_0 -#define _____BASE_L4_____ K41, K42, K43, K44, K45 -#define _____BASE_R4_____ K46, K47, K48, K49, K4A - -/* QWERTY ============================================================================== - * ,-----------------------------------------------------------------------------------. - * | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | BKSP | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | TAB | Q | W | E | R | T | Y | U | I | O | P | BKSP | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | NAV | A | S | D | F | G | H | J | K | L | ; | " | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | SHFT | Z | X | C | V | B | N | M | , | . | / | SHFT | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | CTRL | C/S | LGUI | LALT | SYMB | NUM/SPACE | SYMB | RALT | SETT | MUTG | LEAD | - * `-----------------------------------------------------------------------------------' - */ - -// LEFT -// - CORE -#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 - -// RIGHT -// - CORE -#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 - -/* NUMPAD ============================================================================== - * ,-----------------------------------------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | TRNS | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | TRNS | F9 | F10 | F11 | F12 | | NLCK | 7 | 8 | 9 | - | TRNS | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | ESC | F5 | F6 | F7 | F8 | SPC | SPC | 4 | 5 | 6 | + | ENTR | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | TRNS | F1 | F2 | F3 | F4 | ALT | | 1 | 2 | 3 | / | TRNS | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | 0 | , | . | * | TRNS | - * `-----------------------------------------------------------------------------------' - */ - -// LEFT -// - CORE -#define ____NUMPAD_L1____ KC_F9, KC_F10, KC_F11, KC_F12, KC_NO -#define ____NUMPAD_L2____ KC_F5, KC_F6, KC_F7, KC_F8, KC_SPC -#define ____NUMPAD_L3____ KC_F1, KC_F2, KC_F3, KC_F4, KC_LALT - -// - MODS -#define ____NUMPAD_L4____ ______TRANS______ -#define K00_NUM KC_TRNS -#define K10_NUM KC_TRNS -#define K20_NUM KC_TRNS -#define K30_NUM KC_TRNS -#define K40_NUM KC_TRNS - -// RIGHT -// - CORE -#define ____NUMPAD_R1____ KC_NLCK, KC_7, KC_8, KC_9, KC_MINS -#define ____NUMPAD_R2____ KC_SPC, KC_4, KC_5, KC_6, KC_PLUS -#define ____NUMPAD_R3____ KC_NO, KC_1, KC_2, KC_3, KC_SLSH - -// - MODS -#define ____NUMPAD_R4____ KC_TRNS, KC_0, KC_COMM, KC_DOT, KC_ASTR -#define K0B_NUM KC_TRNS -#define K1B_NUM KC_TRNS -#define K2B_NUM KC_ENT -#define K3B_NUM KC_TRNS -#define K4B_NUM KC_TRNS - -/* SYMBOL ============================================================================== - * ,-----------------------------------------------------------------------------------. - * | TRNS | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | TRNS | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | TRNS | ! | @ | { | } | | | ^ | $ | & | | | DEL | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | TRNS | < | > | ( | ) | | | - | + | = | \ | ` | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | TRNS | ~ | # | [ | ] | | | _ | * | % | / | TRNS | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | - * `-----------------------------------------------------------------------------------' - */ - -// LEFT -// - CORE -#define ____SYMBOL_L1____ KC_EXCLAIM, KC_AT, KC_LCBR, KC_RCBR, KC_NO -#define ____SYMBOL_L2____ KC_LABK, KC_RABK, KC_LPRN, KC_RPRN, KC_NO -#define ____SYMBOL_L3____ KC_TILD, KC_HASH, KC_LBRC, KC_RBRC, KC_NO - -// - MODS -#define ____SYMBOL_L4____ ______TRANS______ -#define K00_SYM KC_TRNS -#define K10_SYM KC_TRNS -#define K20_SYM KC_TRNS -#define K30_SYM KC_TRNS -#define K40_SYM KC_TRNS - -// RIGHT -// - CORE -#define ____SYMBOL_R1____ KC_NO, KC_CIRC, KC_DOLLAR, KC_AMPR, KC_PIPE -#define ____SYMBOL_R2____ KC_NO, KC_MINS, KC_PLUS, KC_EQL, KC_BSLS -#define ____SYMBOL_R3____ KC_NO, KC_UNDS, KC_ASTR, KC_PERC, KC_SLSH - -// - MODS -#define ____SYMBOL_R4____ ______TRANS______ -#define K0B_SYM KC_TRNS -#define K1B_SYM KC_DEL -#define K2B_SYM KC_GRV -#define K3B_SYM KC_TRNS -#define K4B_SYM KC_TRNS - -/* NAVIGATION ========================================================================== - * ,-----------------------------------------------------------------------------------. - * | TRNS | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | TRNS | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | TRNS | | | SPC | F5 | | INS | HOME | END | TAB | DEL | TRNS | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | TRNS | SHFT | CTRl | ALT | GUI | | LEFT | DOWN | UP | RGHT | | ENTR | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | TRNS | UNDO | CUT | COPY | PSTE | | | PGDO | PGUP | CAPS | | TRNS | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | TRNS | TRNS | TRNS | TRNS | TRNS | ESC | TRNS | TRNS | TRNS | TRNS | TRNS | - * `-----------------------------------------------------------------------------------' - */ - -// LEFT -// - CORE -#define __NAVIGATION_L1__ KC_NO, KC_NO, KC_SPC, KC_F5, KC_NO -#define __NAVIGATION_L2__ KC_LSFT, KC_LCTRL, KC_LALT, KC_LGUI, KC_NO -#define __NAVIGATION_L3__ WINUNDO, WINCUT, WINCOPY, WINPASTE, KC_NO - -// - MODS -#define __NAVIGATION_L4__ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_ESC -#define K00_NAV KC_TRNS -#define K10_NAV KC_TRNS -#define K20_NAV KC_TRNS -#define K30_NAV KC_TRNS -#define K40_NAV KC_TRNS - -// RIGHT -// - CORE -#define __NAVIGATION_R1__ KC_INS, KC_HOME, KC_END, KC_TAB, KC_DEL -#define __NAVIGATION_R2__ KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_NO -#define __NAVIGATION_R3__ KC_NO, KC_PGDN, KC_PGUP, KC_CAPS, KC_NO - -// - MODS -#define __NAVIGATION_R4__ KC_ESC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS -#define K0B_NAV KC_TRNS -#define K1B_NAV KC_TRNS -#define K2B_NAV KC_ENT -#define K3B_NAV KC_TRNS -#define K4B_NAV KC_TRNS - -/* SETTINGS ============================================================================ - * ,-----------------------------------------------------------------------------------. - * | | | | | | | | | | BRID | BRIU | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | | | | | MPRV | MPLY | MUTE | MNXT | | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | ASTG | MUTO | AUOF | AUON | | | | VOLD | VOLU | | | ASTG | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | TRNS | | TRNS | | | | | - * `-----------------------------------------------------------------------------------' - */ -// LEFT -// - CORE -#define ___SETTINGS_L1___ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO -#define ___SETTINGS_L2___ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO -#define ___SETTINGS_L3___ MU_TOG, AU_OFF, AU_ON, KC_NO, KC_NO - -// - MODS -#define ___SETTINGS_L4___ KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO -#define K00_SET KC_NO -#define K10_SET KC_NO -#define K20_SET KC_NO -#define K30_SET KC_ASTG -#define K40_SET KC_NO - -// RIGHT -// - CORE -#define ___SETTINGS_R1___ KC_NO, KC_NO, KC_NO, KC_BRID, KC_BRIU -#define ___SETTINGS_R2___ KC_MPRV, KC_MPLY, KC_MUTE, KC_MNXT, KC_NO -#define ___SETTINGS_R3___ KC_NO, KC_VOLD, KC_VOLU, KC_NO, KC_NO - -// - MODS -#define ___SETTINGS_R4___ KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO -#define K0B_SET KC_NO -#define K1B_SET KC_NO -#define K2B_SET KC_NO -#define K3B_SET KC_ASTG -#define K4B_SET KC_NO diff --git a/users/alfrdmalr/config.h b/users/alfrdmalr/config.h deleted file mode 100644 index 502d3158..00000000 --- a/users/alfrdmalr/config.h +++ /dev/null @@ -1,7 +0,0 @@ -#pragma once - -#define MUSIC_MASK (keycode != KC_NO) -#define MIDI_BASIC - -#define LEADER_TIMEOUT 400 -#define LEADER_PER_KEY_TIMING diff --git a/users/alfrdmalr/readme.md b/users/alfrdmalr/readme.md deleted file mode 100644 index 9e5f962b..00000000 --- a/users/alfrdmalr/readme.md +++ /dev/null @@ -1,46 +0,0 @@ -# alfrdmalr's userspace -## Overview -The alphanumeric characters and symbols are spread between three main 'typing' layers: REGULAR, NUMPAD, and SYMBOL. - -A fourth layer, NAVIGATION, contains useful modifiers, shortcuts, and navigation functions like the arrow keys and page up/down. This layer also provides access to the `ENTER` and `ESC` keys. - -Finally, a SETTINGS layer can be used to adjust certain keyboard-related options. - -A visual representation of each layer can be found in [alfrdmalr.h](./alfrdmalr.h) - -### Layers - -#### REGULAR -Right now this is just a QWERTY layer, but other layouts (DVORAK, COLEMAK, etc.) could easily be added. The REGULAR layer uses the default modifiers. - -The default modifiers are defined in the style `K00`, where the first digit is the row index and the second digit is the column index. These indices are based on the Preonic's 5x12 grid, and are **not** adjusted for a board of different size; for instance, the upper-leftmost key in the preonic layout is `K00`, whereas the upper-leftmost key on a Planck would be `K10`. - -This convention is designed to work nicely with layout wrappers. - -#### NUMPAD -The NUMPAD layer puts a numpad under the right hand, surrounding the home row position. Several basic arithmetic operators are also provided, as well as comma/decimal symbols, to emulate a traditional numpad. The numlock/capslock keys are accessible from this layer as well, though it should be noted that the actual keycodes being sent by the numpad are NOT the numpad versions of the numbers - this is to prevent the normal numlock behavior from blocking numbers from being sent. - -This layer also holds the first twelve function keys. - -#### SYMBOL -This layer holds all the symbols that are not accessible from the REGULAR layer. There is some redundancy (for instance, `/` exists in both the REGULAR and SYMBOL layer; its position, however, remains consistent) but with the exception of single and double quotes, all symbols are available from this layer. - -#### NAVIGATION -Over time, this layer has become a general utility layer, though its primary function of is still to provide arrow keys under hjkl. The surrounding keys contain similar functionality - for instance, the keys directly below `DOWN` and `UP` are `PAGEDOWN` and `PAGEUP`, respectively. `HOME` and `END` are inverted from this convention, simply because I kept hitting the wrong key when trying to jump to the beginning/end of lines when editing text. - -To the immediate right of the NAVIGATION layer key are the following modifiers: `SHIFT`, `CONTROL`, `ALT`, `GUI`. All modifiers are the "left" variants. The idea is to use the left hand to hold different modifiers as necessary while using the right hand to navigate and format. - -`ESCAPE` is located on the spacebar from this layer, and `DELETE` is placed next to `BACKSPACE`, for convenience when formatting text. There are also four Windows shortcuts for undo, cut, copy, and paste, located in the same position as the relevant keys on the base layer (undo, for example, is in the same place as the `Z` key). Again, this is for convenience when formatting text. - -#### SETTINGS -The SETTINGS layer can be accessed by pressing both SYMBOL layer keys at once. This is functionally the same as a trilayer, though because both keys are activating the same layer it doesn't actually use the trilayer feature. - -This layer contains things like feature toggles, media controls, and other infrequently-used options. - -### Leader Key Sequences -A complete list of leader sequences can be found below. The LEAD key that begins each sequence has been omitted. - - -| Sequence | Function | -| :------: | -------------------------------- | -| R-E-S-E-T | Reset the keyboard into DFU mode | diff --git a/users/alfrdmalr/rules.mk b/users/alfrdmalr/rules.mk deleted file mode 100644 index 1b674c04..00000000 --- a/users/alfrdmalr/rules.mk +++ /dev/null @@ -1,8 +0,0 @@ -SRC += alfrdmalr.c - -ifdef AUDIO_ENABLE - SRC += muse.c -endif - -AUTO_SHIFT_ENABLE = yes -LEADER_ENABLE = yes diff --git a/users/arkag/arkag.c b/users/arkag/arkag.c deleted file mode 100644 index 9e8c7af2..00000000 --- a/users/arkag/arkag.c +++ /dev/null @@ -1,630 +0,0 @@ -#include "arkag.h" - -/* - Current Layout and Keeb: - https://github.com/arkag/qmk_firmware/blob/master/keyboards/mechmini/v2/keymaps/arkag/keymap.c -*/ - -#include - -// Start: Written by Chris Lewis -#ifndef MIN -#define MIN(a,b) (((a)<(b))?(a):(b)) -#endif -#ifndef MAX -#define MAX(a,b) (((a)>(b))?(a):(b)) -#endif - -#define TYPING_SPEED_MAX_VALUE 200 -uint8_t typing_speed = 0; - -void velocikey_accelerate() { - if (typing_speed < TYPING_SPEED_MAX_VALUE) typing_speed += (TYPING_SPEED_MAX_VALUE / 50); -} - -void velocikey_decelerate() { - static uint16_t decay_timer = 0; - - if (timer_elapsed(decay_timer) > 500 || decay_timer == 0) { - if (typing_speed > 0) typing_speed -= 1; - //Decay a little faster at half of max speed - if (typing_speed > TYPING_SPEED_MAX_VALUE / 2) typing_speed -= 1; - //Decay even faster at 3/4 of max speed - if (typing_speed > TYPING_SPEED_MAX_VALUE / 4 * 3) typing_speed -= 3; - decay_timer = timer_read(); - } -} - -uint8_t velocikey_match_speed(uint8_t minValue, uint8_t maxValue) { - return MAX(minValue, maxValue - (maxValue - minValue) * ((float)typing_speed / TYPING_SPEED_MAX_VALUE)); -} -// End: Written by Chris Lewis - -uint8_t current_os, - mod_primary_mask, - fade_interval, - num_extra_flashes_off = 0; -Color underglow, - flash_color, - saved_color, - hsv_none = {0,0,0}; -flashState flash_state = no_flash; -fadeState fade_state = add_fade; -activityState state = boot; -bool aesthetic = false, - shifty = false; - -void set_color (Color new, bool update) { - rgblight_sethsv_eeprom_helper(new.h, new.s, new.v, update); -} - -void save_color(Color to_save) { - saved_color = to_save; -} - -void reset_color(void) { - underglow = saved_color; -} - -Color mod_color(Color current_color, bool should_add, uint8_t change_amount) { - save_color(underglow); - int addlim = 359 - change_amount; - int sublim = change_amount; - int leftovers; - if (should_add) { - if (current_color.h <= addlim) { - current_color.h += change_amount; - } else { - leftovers = (359 + change_amount) % 359; - current_color.h = 0 + leftovers; - } - } else { - if (current_color.h >= sublim) { - current_color.h -= change_amount; - } else { - leftovers = change_amount - current_color.h; - current_color.h = 359 - leftovers; - } - } - return current_color; -} - -void check_state (void) { - static uint16_t active_timer; - if (!active_timer) {active_timer = timer_read();} - static bool activated, deactivated, slept; - switch (state) { - case active: - if (!activated) { - if (slept) {rgblight_mode_noeeprom(1);} - activated = true; - deactivated = false; - slept = false; - } - fade_interval = velocikey_match_speed(1, 25); - if (timer_elapsed(active_timer) < INACTIVE_DELAY) {return;} - active_timer = timer_read(); - state = inactive; - return; - - case inactive: - if (!deactivated) { - deactivated = true; - activated = false; - slept = false; - } - velocikey_decelerate(); - fade_interval = velocikey_match_speed(1, 25); - if (timer_elapsed(active_timer) < SLEEP_DELAY) {return;} - state = sleeping; - return; - - case sleeping: - if (!slept) { - rgblight_mode_noeeprom(5); - slept = true; - activated = false; - deactivated = false; - } - return; - - case boot: - return; - } -} - -void fade_rgb (void) { - static uint16_t fade_timer; - if (state == boot) {return;} - if (!fade_timer) {fade_timer = timer_read();} - if (timer_elapsed(fade_timer) < fade_interval) {return;} - switch (fade_state) { - case add_fade: - if (underglow.h == 359) { - fade_state = sub_fade; - return; - } - underglow.h = underglow.h + 1; - break; - - case sub_fade: - if (underglow.h == 0) { - fade_state = add_fade; - return; - } - underglow.h = underglow.h - 1; - break; - } - fade_timer = timer_read(); - if (flash_state == no_flash) { - set_color(underglow, false); - } -} - -void flash_rgb (void) { - static uint16_t flash_timer; - switch(flash_state) { - case no_flash: - return; - - case flash_off: - if (!flash_timer) {flash_timer = timer_read();} - if (timer_elapsed(flash_timer) >= LED_FLASH_DELAY) { - set_color(hsv_none, false); - flash_timer = timer_read(); - flash_state = flash_on; - } - return; - - case flash_on: - if (timer_elapsed(flash_timer) >= LED_FLASH_DELAY) { - set_color(flash_color, false); - flash_timer = timer_read(); - if (num_extra_flashes_off > 0) { - flash_state = flash_off; - num_extra_flashes_off--; - } else { - set_color(underglow, false); - flash_state = no_flash; - } - } - return; - } -} - -void set_os (uint8_t os, bool update) { - current_os = os; - if (update) { - eeprom_update_byte(EECONFIG_USERSPACE, current_os); - } - switch (os) { - case OS_MAC: - set_unicode_input_mode(UC_OSX); - underglow = (Color){ 300, 255, 255 }; - mod_primary_mask = MOD_GUI_MASK; - break; - case OS_WIN: - set_unicode_input_mode(UC_WINC); - underglow = (Color){ 180, 255, 255 }; - mod_primary_mask = MOD_CTL_MASK; - break; - case OS_NIX: - set_unicode_input_mode(UC_LNX); - underglow = (Color){ 60, 255, 255 }; - mod_primary_mask = MOD_CTL_MASK; - break; - default: - underglow = (Color){ 0, 0, 255 }; - mod_primary_mask = MOD_CTL_MASK; - } - set_color(underglow, update); - flash_color = underglow; - flash_state = flash_off; - state = boot; - num_extra_flashes_off = 1; -} - -// register GUI if Mac or Ctrl if other -void pri_mod(bool press) { - if (press) { - if (current_os == OS_MAC) { - register_code(KC_LGUI); - } else { - register_code(KC_LCTL); - } - } else { - if (current_os == OS_MAC) { - unregister_code(KC_LGUI); - } else { - unregister_code(KC_LCTL); - } - } -} - -// register Ctrl if Mac or GUI if other -void sec_mod(bool press) { - if (press) { - if (current_os == OS_MAC) { - register_code(KC_LCTL); - } else { - register_code(KC_LGUI); - } - } else { - if (current_os == OS_MAC) { - unregister_code(KC_LCTL); - } else { - unregister_code(KC_LGUI); - } - } -} - -void surround_type(uint8_t num_of_chars, uint16_t keycode, bool use_shift) { - if (use_shift) { - register_code(KC_LSFT); - } - for (int i = 0; i < num_of_chars; i++) { - tap_code(keycode); - } - if (use_shift) { - unregister_code(KC_LSFT); - } - for (int i = 0; i < (num_of_chars/2); i++) { - tap_code(KC_LEFT); - } -} - -void long_keystroke(size_t num_of_keys, uint16_t keys[]) { - for (int i = 0; i < num_of_keys-1; i++) { - register_code(keys[i]); - } - tap_code(keys[num_of_keys-1]); - for (int i = 0; i < num_of_keys-1; i++) { - unregister_code(keys[i]); - } -} - -void dance_grv (qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 1) { - tap_code(KC_GRV); - if (aesthetic) { - tap_code(KC_SPACE); - } - } else if (state->count == 2) { - surround_type(2, KC_GRAVE, false); - } else { - surround_type(6, KC_GRAVE, false); - } -} - -void dance_quot (qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 1) { - tap_code(KC_QUOT); - if (aesthetic) { - tap_code(KC_SPACE); - } - } else if (state->count == 2) { - surround_type(2, KC_QUOTE, false); - } else if (state->count == 3) { - surround_type(2, KC_QUOTE, true); - } -} - -void dance_hyph (qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 1) { - tap_code(KC_MINS); - if (aesthetic) { - tap_code(KC_SPACE); - } - } else if (state->count == 2) { - register_code(KC_LSFT); - tap_code(KC_MINS); - if (aesthetic) { - tap_code(KC_SPACE); - } - unregister_code(KC_LSFT); - } else if (state->count == 3) { - send_unicode_hex_string("2014"); - } -} - -void dance_obrck (qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 1) { - tap_code(KC_LBRC); - if (aesthetic) { - tap_code(KC_SPACE); - } - } else if (state->count == 2) { - register_code(KC_LSFT); - tap_code(KC_9); - if (aesthetic) { - tap_code(KC_SPACE); - } - unregister_code(KC_LSFT); - } -} - -void dance_cbrck (qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 1) { - tap_code(KC_RBRC); - if (aesthetic) { - tap_code(KC_SPACE); - } - } else if (state->count == 2) { - register_code(KC_LSFT); - tap_code(KC_0); - if (aesthetic) { - tap_code(KC_SPACE); - } - unregister_code(KC_LSFT); - } -} - -void dance_game (qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 1) { - - } else if (state->count == 2) { - - } else if (state->count == 3) { - uint8_t layer = biton32(layer_state); - if (layer == _QWERTY) { - layer_off(_QWERTY); - layer_on(_GAMING); - // swirling rgb - rgblight_mode_noeeprom(12); - } else { - layer_off(_GAMING); - layer_on(_QWERTY); - rgblight_mode_noeeprom(1); - } - } -} - -void matrix_init_user(void) { - current_os = eeprom_read_byte(EECONFIG_USERSPACE); - set_os(current_os, false); -} - -LEADER_EXTERNS(); - -void matrix_scan_user(void) { - check_state(); - flash_rgb(); - fade_rgb(); - LEADER_DICTIONARY() { - leading = false; - leader_end(); - - // begin OS functions - SEQ_TWO_KEYS(KC_P, KC_B) { - if (current_os == OS_WIN) { - long_keystroke(2, (uint16_t[]){KC_LGUI, KC_PAUSE}); - } else { - return; - } - } - SEQ_TWO_KEYS(KC_LSFT, M_PMOD) { - if (current_os == OS_WIN) { - long_keystroke(3, (uint16_t[]){KC_LCTL, KC_LSFT, KC_ESC}); - } else { - } - } - SEQ_TWO_KEYS(KC_S, KC_S) { - if (current_os == OS_MAC) { - long_keystroke(3, (uint16_t[]){KC_LGUI, KC_LSFT, KC_4}); - } else if (current_os == OS_WIN) { - long_keystroke(3, (uint16_t[]){KC_LGUI, KC_LSFT, KC_S}); - } else { - return; - } - } - SEQ_THREE_KEYS(KC_C, KC_A, KC_D) { - if (current_os == OS_WIN) { - long_keystroke(3, (uint16_t[]){KC_LCTL, KC_LALT, KC_DEL}); - } else { - } - } - SEQ_FOUR_KEYS(KC_C, KC_A, KC_L, KC_C) { - if (current_os == OS_WIN) { - SEND_STRING(SS_TAP(X_CALCULATOR)); - } else if (current_os == OS_MAC) { - SEND_STRING(SS_DOWN(X_LGUI) SS_TAP(X_SPACE) SS_UP(X_LGUI) "calculator" SS_TAP(X_ENTER)); - } - } - // end OS functions - - // begin format functions - SEQ_ONE_KEY(KC_B) { - surround_type(4, KC_8, true); - } - SEQ_ONE_KEY(KC_I) { - surround_type(2, KC_8, true); - } - SEQ_ONE_KEY(KC_U) { - surround_type(4, KC_MINS, true); - } - SEQ_ONE_KEY(KC_S) { - surround_type(4, KC_GRAVE, true); - } - SEQ_ONE_KEY(KC_C) { - send_unicode_hex_string("00E7"); - } - SEQ_TWO_KEYS(KC_C, KC_C) { - surround_type(2, KC_GRAVE, false); - } - SEQ_THREE_KEYS(KC_C, KC_C, KC_C) { - surround_type(6, KC_GRAVE, false); - } - SEQ_ONE_KEY(KC_E) { - send_unicode_hex_string("00E8"); - } - SEQ_TWO_KEYS(KC_E, KC_E) { - send_unicode_hex_string("00E9"); - } - // end format functions - - // start fancy functions - SEQ_THREE_KEYS(KC_C, KC_C, KC_ENT) { - surround_type(6, KC_GRAVE, false); - pri_mod(true); - tap_code(KC_V); - pri_mod(false); - tap_code(KC_RGHT); - tap_code(KC_RGHT); - tap_code(KC_RGHT); - tap_code(KC_ENTER); - } - // end fancy functions - - // start typing functions - SEQ_TWO_KEYS(KC_T, KC_M) { - // ™ - send_unicode_hex_string("2122"); - } - SEQ_TWO_KEYS(KC_D, KC_D) { - SEND_STRING(".\\Administrator"); - } - SEQ_THREE_KEYS(KC_L, KC_O, KC_D) { - // ಠ__ಠ - send_unicode_hex_string("0CA0 005F 005F 0CA0"); - } - SEQ_FOUR_KEYS(KC_R, KC_E, KC_P, KC_O) { - SEND_STRING("https://github.com/qmk/qmk_firmware/tree/master/users/arkag"); - } - SEQ_FOUR_KEYS(KC_F, KC_L, KC_I, KC_P) { - // (╯‵Д′)╯彡┻━┻ - send_unicode_hex_string("0028 256F 2035 0414 2032 0029 256F 5F61 253B 2501 253B"); - } - SEQ_FIVE_KEYS(KC_U, KC_F, KC_L, KC_I, KC_P) { - // ┬─┬ノ( º _ º ノ) - send_unicode_hex_string("252C 2500 252C 30CE 0028 0020 00BA 0020 005F 0020 00BA 0020 30CE 0029"); - } - SEQ_FIVE_KEYS(KC_L, KC_E, KC_N, KC_N, KC_Y) { - // ( ͡° ͜ʖ ͡°) - send_unicode_hex_string("0028 0020 0361 00B0 0020 035C 0296 0020 0361 00B0 0029"); - } - SEQ_FIVE_KEYS(KC_S, KC_H, KC_R, KC_U, KC_G) { - // ¯\_(ツ)_/¯ - send_unicode_hex_string("00AF 005C 005F 0028 30C4 0029 005F 002F 00AF"); - } - // end typing functions - - } -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - if (aesthetic) { - switch (keycode) { - case KC_A ... KC_0: - case KC_SPACE ... KC_SLASH: - if (record->event.pressed) { - state = active; - velocikey_accelerate(); - tap_code(keycode); - tap_code(KC_SPACE); - } - return false; - - case KC_BSPACE: - if (record->event.pressed) { - state = active; - velocikey_accelerate(); - tap_code(keycode); - tap_code(keycode); - } - return false; - default: // Do nothing - break; - } - } - - if (shifty) { - switch (keycode) { - case KC_A ... KC_Z: - if (record->event.pressed) { - int shift = rand() % 2; - state = active; - velocikey_accelerate(); - if (shift == 1){ - register_code(KC_LSFT); - } - tap_code(keycode); - if (shift == 1){ - unregister_code(KC_LSFT); - } - } - return false; - case KC_SPC: - if (record->event.pressed) { - state = active; - velocikey_accelerate(); - tap_code(keycode); - } - return false; - default: // Do nothing - break; - } - } - - switch (keycode) { - case M_PMOD: - pri_mod(record->event.pressed); - return false; - - case M_SMOD: - sec_mod(record->event.pressed); - return false; - - case M_OS: - if (record->event.pressed){ - set_os((current_os+1) % _OS_COUNT, true); - } - - return false; - - case M_SPC: - if(record->event.pressed){ - if (aesthetic) { - aesthetic = false; - rgblight_mode_noeeprom(1); - } else { - aesthetic = true; - shifty = false; - // snake mode - rgblight_mode_noeeprom(20); - } - return false; - } - - case M_SFT: - if(record->event.pressed){ - if (shifty) { - shifty = false; - rgblight_mode_noeeprom(1); - } else { - shifty = true; - aesthetic = false; - // knight mode - rgblight_mode_noeeprom(23); - } - return false; - } - - default: - if (record->event.pressed) { - state = active; - velocikey_accelerate(); - } - return true; - } -} - -//Tap Dance Definitions -qk_tap_dance_action_t tap_dance_actions[] = { - [TD_GRV_3GRV] = ACTION_TAP_DANCE_FN (dance_grv), - [TD_SING_DOUB] = ACTION_TAP_DANCE_FN (dance_quot), - [TD_HYPH_UNDR] = ACTION_TAP_DANCE_FN (dance_hyph), - [TD_BRCK_PARN_O] = ACTION_TAP_DANCE_FN (dance_obrck), - [TD_BRCK_PARN_C] = ACTION_TAP_DANCE_FN (dance_cbrck), - [TD_LALT_RALT] = ACTION_TAP_DANCE_DOUBLE (KC_LALT, KC_RALT), - [TD_GAME] = ACTION_TAP_DANCE_FN (dance_game), -}; diff --git a/users/arkag/arkag.h b/users/arkag/arkag.h deleted file mode 100644 index fdc4a5fe..00000000 --- a/users/arkag/arkag.h +++ /dev/null @@ -1,139 +0,0 @@ -#pragma once - -#include "quantum.h" -#include "process_keycode/process_tap_dance.h" - -#define EECONFIG_USERSPACE (uint8_t *)20 - -#define LRALT TD(TD_LALT_RALT) -#define QUOTE TD(TD_SING_DOUB) -#define GRAVE TD(TD_GRV_3GRV) -#define OBRACK TD(TD_BRCK_PARN_O) -#define CBRACK TD(TD_BRCK_PARN_C) -#define THREE TD(TD_3_GRV_ACT) -#define STRIKE TD(TD_STRK_SHOT) -#define HYPHEN TD(TD_HYPH_UNDR) -#define CEDILLA TD(TD_C_CED) -#define GAME TD(TD_GAME) - -#define RAISE MO(1) -#define LOWER MO(2) -#define MEDIA MO(3) -#define FUNCT MO(4) -#define KEEB MO(5) - -#define MOD_CTL_MASK (MOD_BIT(KC_LCTL) | MOD_BIT(KC_RCTL)) -#define MOD_GUI_MASK (MOD_BIT(KC_LGUI) | MOD_BIT(KC_RGUI)) -#define MOD_SFT_MASK (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) - -#define LED_FLASH_DELAY 150 - -#define ACCEL_DELAY 500 -#define DEACCEL_DELAY 500 - -#define INACTIVE_DELAY 250 -#define SLEEP_DELAY 180000 - -enum { - _QWERTY = 0, - _RAISE, - _LOWER, - _MEDIA, - _FUNCT, - _KEEB, - _GAMING, -}; - -typedef enum { - OS_MAC, // Don't assign values - OS_WIN, - OS_NIX, - _OS_COUNT, -} OS; - -typedef struct { - uint16_t h; - uint8_t s; - uint8_t v; -} Color; - -typedef enum { - no_flash = 0, - flash_off, - flash_on, -} flashState; - -typedef enum { - add_fade = 0, - sub_fade, -} fadeState; - -typedef enum { - active = 0, - inactive, - sleeping, - boot, -} activityState; - -enum custom_keycodes { - M_PMOD = SAFE_RANGE, - M_SMOD, - M_OS, - M_SFT, - M_SPC, -}; - -enum tapdances { - TD_3_GRV_ACT = 0, - TD_C_CED, - TD_GRV_3GRV, - TD_SLSH_HTTP, - TD_SING_DOUB, - TD_HYPH_UNDR, - TD_SPECIAL, - TD_BRCK_PARN_O, - TD_BRCK_PARN_C, - TD_LALT_RALT, - TD_GAME, -}; - -void velocikey_accelerate(void); -void velocikey_decelerate(void); -uint8_t velocikey_match_speed(uint8_t minValue, uint8_t maxValue); - -void set_color (Color new, bool update); -void save_color(Color to_save); -void reset_color(void); - -Color mod_color(Color current_color, bool should_add, uint8_t change_amount); - -void reverse_fade (void); - -void check_state (void); - -void fade_rgb (void); - -void flash_rgb (void); - -void set_os (uint8_t os, bool update); - -void tap_key(uint8_t keycode); - -void pri_mod(bool press); - -void sec_mod(bool press); - -void surround_type(uint8_t num_of_chars, uint16_t keycode, bool use_shift); - -void long_keystroke(size_t num_of_keys, uint16_t keys[]); - -void dance_grv (qk_tap_dance_state_t *state, void *user_data); -void dance_quot (qk_tap_dance_state_t *state, void *user_data); -void dance_strk (qk_tap_dance_state_t *state, void *user_data); -void dance_3 (qk_tap_dance_state_t *state, void *user_data); -void dance_c (qk_tap_dance_state_t *state, void *user_data); -void dance_game (qk_tap_dance_state_t *state, void *user_data); - -int cur_dance (qk_tap_dance_state_t *state); -void spc_finished (qk_tap_dance_state_t *state, void *user_data); -void spc_reset (qk_tap_dance_state_t *state, void *user_data); diff --git a/users/arkag/config.h b/users/arkag/config.h deleted file mode 100644 index 5a89a18f..00000000 --- a/users/arkag/config.h +++ /dev/null @@ -1,6 +0,0 @@ -#pragma once - -#define TAPPING_TERM 200 -#define LEADER_TIMEOUT 300 - -#define LEADER_PER_KEY_TIMING diff --git a/users/arkag/readme.md b/users/arkag/readme.md deleted file mode 100644 index c685892f..00000000 --- a/users/arkag/readme.md +++ /dev/null @@ -1,42 +0,0 @@ -# Shot on Pixel 2 XL with Cheap Lamp at Work - -![mmm, tasty](mechmini2.jpg) - -# I don't know what I'm doing - -Some links: -* [Layout File: Mech Mini 2](layout_mm2) -* [Userspace Header](arkag_h) -* [Userspace Main](arkag_c) - -Here's a list of some things I have working with my currently [keyboard](mm2_home): - -* Reactive (sort of) fading while typing, ported from [Velocikey](https://github.com/qmk/qmk_firmware/pull/3754). -* OS Switching, storing to EEPROM -* OS Specific Macros and Shortcuts(WIN+SHIFT+S for Windows and CMD+SHIFT+4 for MacOS) -* Flashing RGB LED on OS change -* Hex Unicode Macros dependent on OS(half works on Windows due to [WinCompose](https://github.com/SamHocevar/wincompose) not functioning properly just yet). -* "Sleep" function activates after 3 minutes (breathing). -* Markdown style macros for surround type __eve__ ~~ryw~~ *her* **eee** (apparently only certain places support underline and strikethrough ಠ__ಠ) - -# License Stuff - -Copyright 2018 arkag arkag@pm.me - -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 . - -[arkag_c]: /users/arkag/arkag.c -[arkag_h]: /users/arkag/arkag.h -[layout_mm2]: /keyboards/mechmini/v2/keymaps/arkag/keymap.c -[mm2_home]: https://cartel.ltd/projects/mechmini2/ diff --git a/users/arkag/rules.mk b/users/arkag/rules.mk deleted file mode 100644 index 3513f0ea..00000000 --- a/users/arkag/rules.mk +++ /dev/null @@ -1 +0,0 @@ - SRC += arkag.c diff --git a/users/bbaserdem/README.md b/users/bbaserdem/README.md deleted file mode 100644 index eb8f33d4..00000000 --- a/users/bbaserdem/README.md +++ /dev/null @@ -1,51 +0,0 @@ -# Overview - -I have mostly ortholinear keyboards, which share a lot of functions. -For this purpose, I collected them here. - -I have the following keymaps: - -* Gherkin (Does not use the user space) -* XD75RE (Uses different keymap) -* Let's Split -* Let's Split It Up -* Planck - -# Layout - -I use DVORAK with an unorthodox Turkish layout. -If you wanna grab my code, and you used a layout with a persistent base -layer change, change it to layer 0 before proceeding. - -# Layers - -* **Dvorak**: Base layer,with dvorak layout. -* **Alternative**: Has alternate characters. -* **Game**: Toggled from *Function*, comfortable for gaming use. -* **Numeric**: Has numericals and symbols. Can be locked. -* **Function**: Layer has media and function keys. -* **Mouse**: Manipulates mouse. Can be locked. -* **Music** Allows playing sounds. - -# Functionality - -* **RGB Backlight**: With layer indication, and ability to change base layer lighting mode. -* **Secrets**: By placing a secrets.h, and not tracking it, passwords can be stored. -* **Mouse**: Mouse emulation, complete with diagonal keys. -* **Turkish**: An AltGr-like overlay that allows some non-common letters, in unicode. - -I suggest checking out how I enabled Turkish keys, -how I planned out RGB lighting, -and my mouse implementation; -they might offer some insight into fringe user cases. - -# Issues - -All features are too big for the 32kB bootloader. -Offenders are audio and rgb lights; it comes down to one or the other. - -~The Proton board, and rev 6 might fix that.~ - -# Credits - -I have previously written my keymap by myself before, but I rewrote it here, diff --git a/users/bbaserdem/bbaserdem.c b/users/bbaserdem/bbaserdem.c deleted file mode 100644 index ac7b1b62..00000000 --- a/users/bbaserdem/bbaserdem.c +++ /dev/null @@ -1,633 +0,0 @@ -#include "bbaserdem.h" - -/*---------------*\ -|*-----MOUSE-----*| -\*---------------*/ -#ifdef MOUSEKEY_ENABLE -#include "mousekey.h" -#endif - -/*-------------*\ -|*-----RGB-----*| -\*-------------*/ -#ifdef RGBLIGHT_ENABLE -#include "rgblight.h" -#endif - -/*-------------*\ -|*---UNICODE---*| -\*-------------*/ -#ifdef UNICODE_ENABLE -#endif - -/*-----------------*\ -|*-----SECRETS-----*| -\*-----------------*/ -// Enabled by adding a non-tracked secrets.h to this dir. -#if (__has_include("secrets.h")) -#include "secrets.h" -#endif - -/*---------------*\ -|*-----MUSIC-----*| -\*---------------*/ -#ifdef AUDIO_ENABLE -float tone_game[][2] = SONG(ZELDA_PUZZLE); -float tone_return[][2] = SONG(ZELDA_TREASURE); -float tone_linux[][2] = SONG(UNICODE_LINUX); -float tone_windows[][2] = SONG(UNICODE_WINDOWS); -#endif - -/*-------------------*\ -|*-----TAP-DANCE-----*| -\*-------------------*/ -#ifdef TAP_DANCE_ENABLE -qk_tap_dance_action_t tap_dance_actions[] = { - // Shift on double tap of semicolon - [SCL] = ACTION_TAP_DANCE_DOUBLE( KC_SCLN, KC_COLN ) -}; -#endif - -/* In keymaps, instead of writing _user functions, write _keymap functions - * The __attribute__((weak)) allows for empty definitions here, and during - * compilation, if these functions are defined elsewhere, they are written - * over. This allows to include custom code from keymaps in the generic code - * in this file. - */ -__attribute__ ((weak)) void matrix_init_keymap(void) { } -__attribute__ ((weak)) void matrix_scan_keymap(void) { } -__attribute__ ((weak)) bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { - return true; -} -__attribute__ ((weak)) uint32_t layer_state_set_keymap (uint32_t state) { - return state; -} -__attribute__ ((weak)) void led_set_keymap(uint8_t usb_led) { } - -/* ----------------------- *\ - * -----RGB Functions----- * -\* ----------------------- */ -#ifdef RGBLIGHT_ENABLE -// Storage variables -extern rgblight_config_t rgblight_config; -bool base_sta; // Keeps track if in saveable state -bool base_tog; // Whether base state is active or not -int base_hue; // Hue value of base state -int base_sat; // Saturation value of base state -int base_val; // Brightness value of base state -uint8_t base_mod; // Animation mode of the base state - -// Save the current state of the rgb mode -void rgblight_saveBase(void) { - base_hue = rgblight_config.hue; - base_sat = rgblight_config.sat; - base_val = rgblight_config.val; - base_mod = rgblight_config.mode; - base_tog = rgblight_config.enable; - base_sta = false; // If saving, that means base layer is being left -} - -// Load the base state back -void rgblight_loadBase(void) { - // Don't do anything if not enabled - if ( !base_sta ) { - if ( base_tog ) { - rgblight_enable(); - rgblight_mode( base_mod ); - rgblight_sethsv( base_hue, base_sat, base_val ); - } else { - rgblight_disable(); - } - } - // Mark that base is loaded, and to be saved before leaving - base_sta = true; -} - -// Set to plain HSV color -void rgblight_colorStatic( int hu, int sa, int va ) { - // First, it must be enabled or color change is not written - rgblight_enable(); - rgblight_mode(1); - rgblight_sethsv(hu,sa,va); -} -/* HSV values - * white ( 0, 0, 255) - * red ( 0, 255, 255) - * coral ( 16, 176, 255) - * orange ( 39, 255, 255) - * goldenrod ( 43, 218, 218) - * gold ( 51, 255, 255) - * yellow ( 60, 255, 255) - * chartreuse ( 90, 255, 255) - * green (120, 255, 255) - * springgreen (150, 255, 255) - * turquoise (174, 90, 112) - * teal (180, 255, 128) - * cyan (180, 255, 255) - * azure (186, 102, 255) - * blue (240, 255, 255) - * purple (270, 255, 255) - * magenta (300, 255, 255) - * pink (330, 128, 255) - */ - -// Set RGBLIGHT state depending on layer -void rgblight_change( uint8_t this_layer ) { - // Save state, if saving is requested - if ( base_sta ) { - rgblight_saveBase(); - } - // Change RGB light - switch ( this_layer ) { - case _DV: - // Load base layer - rgblight_loadBase(); - break; - case _AL: - // Do yellow for alternate - rgblight_colorStatic( 60,255,255); - break; - case _GA: - // Do purple for game - rgblight_colorStatic(285,255,255); - break; - case _NU: - // Do azure for number - rgblight_colorStatic(186,200,255); - break; - case _SE: - // Do red for settings - rgblight_colorStatic( 16,255,255); - break; - case _MO: - // Do green for mouse - rgblight_colorStatic(120,255,255); - break; - case _MU: - // Do orange for music - rgblight_colorStatic( 39,255,255); - break; - default: - // Something went wrong - rgblight_colorStatic( 0,255,255); - break; - } -} - -#endif - -/*---------------------*\ -|*-----MATRIX INIT-----*| -\*---------------------*/ -void matrix_init_user (void) { - - // Keymap specific things, do it first thing to allow for delays etc - matrix_init_keymap(); - - // Correct unicode -#ifdef UNICODE_ENABLE - set_unicode_input_mode(UC_LNX); -#endif - - // Make beginning layer DVORAK - set_single_persistent_default_layer(_DV); - -//--RGB light initialize base layer -#ifdef RGBLIGHT_ENABLE - // Base hue is white, and RGB disabled - base_hue = 100; - base_sat = 0; - base_val = 255; - base_mod = 2; - base_tog = false; - rgblight_enable(); - rgblight_mode(base_mod); - rgblight_sethsv(base_hue,base_sat,base_val); - rgblight_disable(); - rgblight_loadBase(); -#endif - -} - -/*---------------------*\ -|*-----MATRIX SCAN-----*| -\*---------------------*/ -void matrix_scan_user (void) { - // Keymap specific, do it first - matrix_scan_keymap(); -} - -/*------------------*\ -|*-----KEYCODES-----*| -\*------------------*/ -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - - // Shift check - bool is_capital = ( keyboard_report->mods & (MOD_BIT(KC_LSFT)|MOD_BIT(KC_RSFT)) ); - static bool lock_flag = false; - uint8_t layer = biton32 (layer_state); - - switch (keycode) { - // Secrets implementation -#if (__has_include("secrets.h")) - case SECRET1: - if( !record->event.pressed ) { - send_string_P( secret[ keycode - SECRET1 ] ); - } - return false; - break; - case SECRET2: - if( !record->event.pressed ) { - send_string_P( secret[ keycode - SECRET2 ] ); - } - return false; - break; - case SECRET3: - if( !record->event.pressed ) { - send_string_P( secret[ keycode - SECRET3 ] ); - } - return false; - break; -#endif - - // If these keys are pressed, load base layer config, and mark saving -#ifdef RGBLIGHT_ENABLE - case RGB_TOG: - case RGB_MOD: - case RGB_VAI: - case RGB_VAD: - case RGB_SAI: - case RGB_SAD: - case RGB_HUI: - case RGB_HUD: - if ( !base_sta ) { - rgblight_loadBase(); - } - return true; - break; -#endif - - // Lock functionality: These layers are locked if the LOCKED buttons are - // pressed. Otherwise, they are momentary toggles - case K_LOCK: - if (record->event.pressed) { - lock_flag = !lock_flag; - } - return false; - break; - case K_MOUSE: - if (record->event.pressed) { - layer_on(_MO); - lock_flag = false; - } else { - if ( lock_flag ) { - lock_flag = false; - } else { - layer_off(_MO); - } - } - return false; - break; - case K_NUMBR: - if (record->event.pressed) { - layer_on(_NU); - lock_flag = false; - } else { - if ( lock_flag ) { - lock_flag = false; - } else { - layer_off(_NU); - } - } - return false; - break; - - // Layer switches with sound - case K_GAMES: - if (record->event.pressed) { - // On press, turn off layer if active - if ( layer == _GA ) { -#ifdef AUDIO_ENABLE - stop_all_notes(); - PLAY_SONG(tone_return); -#endif - layer_off(_GA); - } - } else { - // After click, turn on layer if accessed from setting - if ( layer == _SE ) { -#ifdef AUDIO_ENABLE - stop_all_notes(); - PLAY_SONG(tone_game); -#endif - layer_on(_GA); - layer_off(_SE); - } - } - return false; - break; - case MU_TOG: - if (record->event.pressed) { - // On press, turn off layer if active - if ( layer == _SE ) { - layer_off(_SE); - layer_on(_MU); - } else { - layer_off(_MU); - } - } - return true; - break; - -//------UNICODE - // Unicode switches with sound -#ifdef UNICODE_ENABLE - case UNI_LI: - if (record->event.pressed) { -#ifdef AUDIO_ENABLE - stop_all_notes(); - PLAY_SONG(tone_linux); -#endif - set_unicode_input_mode(UC_LNX); - } - return false; - break; - case UNI_WN: - if (record->event.pressed) { -#ifdef AUDIO_ENABLE - stop_all_notes(); - PLAY_SONG(tone_windows); -#endif - set_unicode_input_mode(UC_WIN); - } - return false; - break; - - // Turkish letters, with capital functionality - case TUR_A: - if (record->event.pressed) { - if ( is_capital ) { - unicode_input_start(); - register_hex(0x00c2); - unicode_input_finish(); - } else { - unicode_input_start(); - register_hex(0x00e2); - unicode_input_finish(); - } - } - return false; - break; - case TUR_O: - if (record->event.pressed) { - if ( is_capital ) { - unicode_input_start(); - register_hex(0x00d6); - unicode_input_finish(); - } else { - unicode_input_start(); - register_hex(0x00f6); - unicode_input_finish(); - } - } - return false; - break; - case TUR_U: - if (record->event.pressed) { - if ( is_capital ) { - unicode_input_start(); - register_hex(0x00dc); - unicode_input_finish(); - } else { - unicode_input_start(); - register_hex(0x00fc); - unicode_input_finish(); - } - } - return false; - break; - case TUR_I: - if (record->event.pressed) { - if ( is_capital ) { - unicode_input_start(); - register_hex(0x0130); - unicode_input_finish(); - } else { - unicode_input_start(); - register_hex(0x0131); - unicode_input_finish(); - } - } - return false; - break; - case TUR_G: - if (record->event.pressed) { - if ( is_capital ) { - unicode_input_start(); - register_hex(0x011e); - unicode_input_finish(); - } else { - unicode_input_start(); - register_hex(0x011f); - unicode_input_finish(); - } - } - return false; - break; - case TUR_C: - if (record->event.pressed) { - if ( is_capital ) { - unicode_input_start(); - register_hex(0x00c7); - unicode_input_finish(); - } else { - unicode_input_start(); - register_hex(0x00e7); - unicode_input_finish(); - } - } - return false; - break; - case TUR_S: - if (record->event.pressed) { - if ( is_capital ) { - unicode_input_start(); - register_hex(0x015e); - unicode_input_finish(); - } else { - unicode_input_start(); - register_hex(0x015f); - unicode_input_finish(); - } - } - return false; - break; -#endif - -//-------Diagonal mouse movements -#ifdef MOUSEKEY_ENABLE - case MO_NE: - if( record->event.pressed ) { - mousekey_on(MO_N); - mousekey_on(MO_E); - mousekey_send(); - } else { - mousekey_off(MO_N); - mousekey_off(MO_E); - mousekey_send(); - } - return false; - break; - case MO_NW: - if( record->event.pressed ) { - mousekey_on(MO_N); - mousekey_on(MO_W); - mousekey_send(); - } else { - mousekey_off(MO_N); - mousekey_off(MO_W); - mousekey_send(); - } - return false; - break; - case MO_SE: - if( record->event.pressed ) { - mousekey_on(MO_S); - mousekey_on(MO_E); - mousekey_send(); - } else { - mousekey_off(MO_S); - mousekey_off(MO_E); - mousekey_send(); - } - return false; - break; - case MO_SW: - if( record->event.pressed ) { - mousekey_on(MO_S); - mousekey_on(MO_W); - mousekey_send(); - } else { - mousekey_off(MO_S); - mousekey_off(MO_W); - mousekey_send(); - } - return false; - break; - case MO_S_NE: - if( record->event.pressed ) { - mousekey_on(MO_S_N); - mousekey_on(MO_S_E); - mousekey_send(); - } else { - mousekey_off(MO_S_N); - mousekey_off(MO_S_E); - mousekey_send(); - } - return false; - break; - case MO_S_NW: - if( record->event.pressed ) { - mousekey_on(MO_S_N); - mousekey_on(MO_S_W); - mousekey_send(); - } else { - mousekey_off(MO_S_N); - mousekey_off(MO_S_W); - mousekey_send(); - } - return false; - break; - case MO_S_SE: - if( record->event.pressed ) { - mousekey_on(MO_S_S); - mousekey_on(MO_S_E); - mousekey_send(); - } else { - mousekey_off(MO_S_S); - mousekey_off(MO_S_E); - mousekey_send(); - } - return false; - break; - case MO_S_SW: - if( record->event.pressed ) { - mousekey_on(MO_S_S); - mousekey_on(MO_S_W); - mousekey_send(); - } else { - mousekey_off(MO_S_S); - mousekey_off(MO_S_W); - mousekey_send(); - } - return false; - break; -#endif - -//------DOUBLE PRESS, with added left navigation - case DBL_SPC: - if( record->event.pressed ) { - SEND_STRING(" "SS_TAP(X_LEFT)); - } - return false; - break; - case DBL_ANG: - if( record->event.pressed ) { - SEND_STRING("<>"SS_TAP(X_LEFT)); - } - return false; - break; - case DBL_PAR: - if( record->event.pressed ) { - SEND_STRING("()"SS_TAP(X_LEFT)); - } - return false; - break; - case DBL_SQR: - if( record->event.pressed ) { - SEND_STRING("[]"SS_TAP(X_LEFT)); - } - return false; - break; - case DBL_BRC: - if( record->event.pressed ) { - SEND_STRING("{}"SS_TAP(X_LEFT)); - } - return false; - break; - case DBL_QUO: - if( record->event.pressed ) { - SEND_STRING("\'\'"SS_TAP(X_LEFT)); - } - return false; - break; - case DBL_DQT: - if( record->event.pressed ) { - SEND_STRING("\"\""SS_TAP(X_LEFT)); - } - return false; - break; - case DBL_GRV: - if( record->event.pressed ) { - SEND_STRING("``"SS_TAP(X_LEFT)); - } - return false; - break; -// END OF KEYCODES - } - return process_record_keymap(keycode, record); -} - -/*----------------------*\ -|*-----LAYER CHANGE-----*| -\*----------------------*/ - -uint32_t layer_state_set_user(uint32_t state) { - - state = layer_state_set_keymap (state); -#ifdef RGBLIGHT_ENABLE - // Change RGB lighting depending on the last layer activated - rgblight_change( biton32(state) ); -#endif - return state; -} diff --git a/users/bbaserdem/bbaserdem.h b/users/bbaserdem/bbaserdem.h deleted file mode 100644 index 3a405f2a..00000000 --- a/users/bbaserdem/bbaserdem.h +++ /dev/null @@ -1,268 +0,0 @@ -#ifndef USERSPACE -#define USERSPACE - -#include "quantum.h" - -#define XXX KC_NO - -// Layers -#define _DV 0 // Base layer -#define _AL 1 // Alt char overlay -#define _GA 2 // Game layer -#define _NU 3 // Numbers layer -#define _SE 4 // Settings layer -#define _MO 5 // Mouse emulation -#define _MU 6 // Music mode - -// Define short macros -#define UNDO LCTL(KC_Z) -#define REDO LCTL(KC_Y) -#define COPY LCTL(KC_C) -#define CUT LCTL(KC_X) -#define PASTE LCTL(KC_V) - -// Rename mouse keys with 7 letters -#ifdef MOUSEKEY_ENABLE -#define MO_S_N KC_MS_WH_UP -#define MO_S_S KC_MS_WH_DOWN -#define MO_S_E KC_MS_WH_RIGHT -#define MO_S_W KC_MS_WH_LEFT -#define MO_N KC_MS_UP -#define MO_S KC_MS_DOWN -#define MO_E KC_MS_RIGHT -#define MO_W KC_MS_LEFT -#define MO_CL_L KC_MS_BTN1 -#define MO_CL_R KC_MS_BTN2 -#define MO_CL_M KC_MS_BTN3 -#define MO_CL_4 KC_MS_BTN4 -#define MO_CL_5 KC_MS_BTN5 -#define MO_AC_0 KC_MS_ACCEL0 -#define MO_AC_1 KC_MS_ACCEL1 -#define MO_AC_2 KC_MS_ACCEL2 -#else -#define MO_S_N KC_NO -#define MO_S_S KC_NO -#define MO_S_E KC_NO -#define MO_S_W KC_NO -#define MO_N KC_NO -#define MO_S KC_NO -#define MO_E KC_NO -#define MO_W KC_NO -#define MO_CL_L KC_NO -#define MO_CL_R KC_NO -#define MO_CL_M KC_NO -#define MO_CL_1 KC_NO -#define MO_CL_2 KC_NO -#define MO_AC_0 KC_NO -#define MO_AC_1 KC_NO -#define MO_AC_2 KC_NO -#endif - -// Rename music keys with <8 letters -#ifdef AUDIO_ENABLE -#define MU_REC KC_LCTL -#define MU_STOP KC_LALT -#define MU_PLAY KC_LGUI -#define MU_PLAY KC_LGUI -#define MU_FAST KC_UP -#define MU_SLOW KC_DOWN -#define MU_MASK KC_A -#else -#define MU_REC KC_NO -#define MU_STOP KC_NO -#define MU_PLAY KC_NO -#define MU_PLAY KC_NO -#define MU_FAST KC_NO -#define MU_SLOW KC_NO -#define MU_MASK KC_NO -#endif - -// Define non-capitalized UTF shortcuts here -#ifdef UNICODE_ENABLE -#define PHY_HBR UC(0x0127) -#define PHY_DEG UC(0x00b0) -#define CUR_LIR UC(0x20ba) -#define CUR_BIT UC(0x20bf) -#define CUR_EUR UC(0x20ac) -#define CUR_BPN UC(0x00a3) -#define CUR_YEN UC(0x00a5) -#else -#define PHY_HBR KC_NO -#define PHY_DEG KC_NO -#define CUR_LIR KC_NO -#define CUR_BIT KC_NO -#define CUR_EUR KC_NO -#define CUR_BPN KC_NO -#define CUR_YEN KC_NO -#endif - -// Custom keycodes -enum userspace_custom_keycodes { - // Turkish letters, with shifting - TUR_A = SAFE_RANGE, - TUR_C, - TUR_G, - TUR_I, - TUR_O, - TUR_S, - TUR_U, - // Unicode mode switch - UNI_LI, - UNI_WN, - // Double keys - DBL_SPC, - DBL_ANG, - DBL_PAR, - DBL_SQR, - DBL_BRC, - DBL_QUO, - DBL_DQT, - DBL_GRV, - // Diagonal mouse movements - MO_NE, - MO_NW, - MO_SE, - MO_SW, - MO_S_NE, - MO_S_NW, - MO_S_SE, - MO_S_SW, - // Layer switches and lock functionality - K_MOUSE, - K_NUMBR, - K_LOCK, - K_GAMES, - // Secret macros - SECRET1, - SECRET2, - SECRET3 -}; - -// Do tap dancable semicolon key if available -#ifdef TAP_DANCE_ENABLE -enum { - SCL = 0 -}; -#define MY_SCL TD(SCL) -#else -#define MY_SCL KC_SCLN -#endif - -// Shared keymaps -#define LAYOUT_planck_wrapper(...) LAYOUT_planck_grid(__VA_ARGS__) -#define LAYOUT_letssplit_wrapper(...) LAYOUT_ortho_4x12(__VA_ARGS__) - -/* Dvorak - * ,------------------------------------------------------------------------. - * | Esc | ' " | , | . | P | Y || F | G | C | R | L | Bkp | - * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| - * | Tab | A | O | E | U | I || D | H | T | N | S | / ? | - * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| - * | SYM | ; : | Q | J | K | X || B | M | W | V | Z | SET | - * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| - * | TUR | OS | Ctrl| Alt | Shf | Spc || Ent | Lft | Dwn | Up | Rght| MSE | - * `------------------------------------------------------------------------' */ -#define DVORAK \ - KC_ESC, KC_QUOT,KC_COMM,KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \ - KC_TAB, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \ - K_NUMBR,MY_SCL, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, MO(_SE), \ - MO(_AL),KC_LGUI,KC_LCTL,KC_LALT,KC_LSFT,KC_SPC, KC_ENT, KC_LEFT,KC_DOWN,KC_UP, KC_RGHT,K_MOUSE - -/* Alternative character overlay - * ,------------------------------------------------------------------------. - * | | ' ' | Undo| Redo|Pound| Yen || | G | C | |TLira| Del | - * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| - * | | A | O | Euro| U | I ||Degre|Plank| | | S | Ins | - * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| - * | | " " | Cut | Copy|Paste| || BTC | < > | ( ) | [ ] | { } | PgUp| - * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| - * | | | | | | || | Home|PgDwn| PgUp| End | | - * `------------------------------------------------------------------------' */ -#define ALTCHAR \ - _______,DBL_QUO,UNDO, REDO, CUR_BPN,CUR_YEN,_______,TUR_G, TUR_C, _______,CUR_LIR,KC_DEL , \ - _______,TUR_A, TUR_O, CUR_EUR,TUR_U, TUR_I, PHY_DEG,PHY_HBR,_______,_______,TUR_S, KC_INS , \ - _______,DBL_DQT,CUT, COPY, PASTE, DBL_GRV,CUR_BIT,DBL_ANG,DBL_PAR,DBL_SQR,DBL_BRC,_______, \ - _______,_______,_______,_______,_______,DBL_SPC,_______,KC_HOME,KC_PGDN,KC_PGUP,KC_END, _______ - -/* Game layer - * ,------------------------------------------------------------------------. - * | OFF | Q | W | E | R | T || Esc | 7 | 8 | 9 |NumLk|Bkspc| - * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| - * | Tab | A | S | D | F | G || F1 | 4 | 5 | 6 | \ | Ent | - * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| - * | | Z | X | C | V | B || F2 | 1 | 2 | 3 | ^ | | - * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| - * | / | ` | | | | Spc || Spc | Ent | 0 | < | v | > | - * `------------------------------------------------------------------------' */ -#define GAME \ - K_GAMES,KC_Q, KC_W, KC_E, KC_R, KC_T, KC_ESC, KC_P7, KC_P8, KC_P9, KC_NLCK,KC_BSPC, \ - KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_F1, KC_P4, KC_P5, KC_P6, KC_BSLS,KC_ENT , \ - _______,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_F2, KC_P1, KC_P2, KC_P3, KC_UP, _______, \ - KC_SLSH,KC_GRV, _______,_______,_______,KC_SPC, KC_SPC, KC_ENT, KC_P0, KC_LEFT,KC_DOWN,KC_RGHT - -/* Symbols layer - * ,------------------------------------------------------------------------. - * | OFF | ` | ~ | [ | ] | { || } | - | _ | = | + | | - * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| - * | | 1 | 2 | 3 | 4 | 5 || 6 | 7 | 8 | 9 | 0 | \ | - * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| - * | | ! | @ | # | $ | % || ^ | & | * | ( | ) | LCK | - * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| - * | | | | | | | || | | | | | | - * `------------------------------------------------------------------------' */ -#define NUMBERS \ - K_NUMBR,KC_GRV, KC_TILD,KC_LBRC,KC_RBRC,KC_LCBR,KC_RCBR,KC_MINS,KC_UNDS,KC_EQL, KC_PLUS,_______, \ - _______,KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, \ - _______,KC_EXLM,KC_AT, KC_HASH,KC_DLR, KC_PERC,KC_CIRC,KC_AMPR,KC_ASTR,KC_LPRN,KC_RPRN,K_LOCK , \ - KC_PIPE,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ - -/* Settings layer - * ,------------------------------------------------------------------------. - * |BLLed| F1 | F2 | F3 | F4 | Lin || Win | Wake| |Hue -|Hue +|Reset| - * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| - * | | F5 | F6 | F7 | F8 | || | |RGBto|Sat -|Sat +| | - * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| - * | Game| F9 | F10 | F11 | F12 |Vol 0||PrtSc| |RGBan|Bri -|Bri +| | - * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| - * |Musir| | | | |Vol -||Vol +| Prev| Stop|TogMu| Next| | - * `------------------------------------------------------------------------' */ -#define SETTINGS \ - BL_STEP,KC_F1, KC_F2, KC_F3, KC_F4, UNI_LI, UNI_WN, KC_WAKE,_______,RGB_HUD,RGB_HUI,RESET , \ - _______,KC_F5, KC_F6, KC_F7, KC_F8, _______,_______,_______,RGB_TOG,RGB_SAD,RGB_SAI,_______, \ - K_GAMES,KC_F9, KC_F10, KC_F11, KC_F12, KC_MUTE,KC_PSCR,_______,RGB_MOD,RGB_VAD,RGB_VAI,_______, \ - MU_TOG, _______,_______,_______,_______,KC_VOLD,KC_VOLU,KC_MPRV,KC_MSTP,KC_MPLY,KC_MNXT,_______ - -/* Mouse layer - * ,------------------------------------------------------------------------. - * |Ulock| \ | ^ | / |.....|.....||.....|.....| |\|.| |^| | |/|.| | - * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| - * | | < | Mid | > |Btn 4|.....||.....|Btn 5| <-- | Mid | --> | | - * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| - * | | / | v | \ |.....|.....||.....|.....| |/| | |v| | |\| | LCK | - * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| - * | | | | | | Left||Right| | |Accl0|Accl1|Accl2| - * `------------------------------------------------------------------------' */ -#define MOUSE \ - K_MOUSE,MO_NW, MO_N, MO_NE, XXX, XXX ,XXX, XXX, MO_S_NW,MO_S_N, MO_S_NE,_______, \ - _______,MO_W, MO_CL_M,MO_E, MO_CL_4,XXX ,XXX, MO_CL_5,MO_S_W, MO_CL_M,MO_S_E, _______, \ - _______,MO_SW, MO_S, MO_SE, XXX, XXX ,XXX, XXX, MO_S_SW,MO_S_S, MO_S_SE,K_LOCK , \ - _______,_______,_______,_______,_______,MO_CL_L,MO_CL_R,_______,MO_AC_0,MO_AC_1,MO_AC_2,_______ - -/* Music layer - * ,------------------------------------------------------------------------. - * |.....|.....|.....|.....|.....|.....||.....|.....|.....|.....|.....|.....| - * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| - * |.....|.....|.....|.....|.....|.....||.....|.....|.....|.....|.....|.....| - * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| - * |.....|.....|.....|.....|.....|.....||.....|.....|.....|.....|.....|.....| - * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| - * | togg| rec | stop| play| slow| fast||modes|.....|.....|.....|.....|.....| - * `------------------------------------------------------------------------' - */ -#define MUSIC \ - MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK, \ - MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK, \ - MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK, \ - MU_TOG, MU_REC, MU_STOP,MU_PLAY,MU_SLOW,MU_FAST,MU_MOD, MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK - -#endif diff --git a/users/bbaserdem/config.h b/users/bbaserdem/config.h deleted file mode 100644 index 3dde5772..00000000 --- a/users/bbaserdem/config.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef USERSPACE_CONFIG_H -#define USERSPACE_CONFIG_H - -#ifdef TAP_DANCE_ENABLE - #define TAPPING_TERM 300 - #define TAPPING_TOGGLE 1 -#endif - -#endif // !USERSPACE_CONFIG_H diff --git a/users/bbaserdem/rules.mk b/users/bbaserdem/rules.mk deleted file mode 100644 index 24c98fdc..00000000 --- a/users/bbaserdem/rules.mk +++ /dev/null @@ -1,24 +0,0 @@ -SRC += bbaserdem.c -EXTRAFLAGS += -flto # Used to make code smaller - -# ENABLE -UNICODE_ENABLE = yes # Used for unicode character emulation -EXTRAKEY_ENABLE = yes # OS signals like volume control - -# DISABLE -ifndef BLUETOOTH_ENABLE - BLUETOOTH_ENABLE = no # No bluetooth -endif -COMMAND_ENABLE = no # Some bootmagic thing i dont use -BOOTMAGIC_ENABLE = no # Access to EEPROM settings, not needed -CONSOLE_ENABLE = no # Allows console output with a command -SLEEP_LED_ENABLE = no # Breathes LED's when computer is asleep. Untested. -NKRO_ENABLE = no # Default is 6KRO which is plenty -MIDI_ENABLE = no # Untested feature -FAUXCLICKY_ENABLE = no # Emulates clicks using speaker -KEY_LOCK_ENABLE = no # Allows locking any key. Not used -API_SYSEX_ENABLE = no # Allows OS to send signals. -KEY_LOCK_ENABLE = no # Allows locking any key. Not used - -# Disabling this makes it compile, i dont know why -# VARIABLE_TRACE = no # Allows debugging variables diff --git a/users/bcat/bcat.c b/users/bcat/bcat.c deleted file mode 100644 index bea64dba..00000000 --- a/users/bcat/bcat.c +++ /dev/null @@ -1,6 +0,0 @@ -#include "quantum.h" - -#if defined(RGBLIGHT_ENABLE) - /* Adjust RGB static hue ranges for shorter gradients than default. */ - const uint8_t RGBLED_GRADIENT_RANGES[] PROGMEM = {255, 127, 63, 31, 15}; -#endif diff --git a/users/bcat/config.h b/users/bcat/config.h deleted file mode 100644 index da74cb0a..00000000 --- a/users/bcat/config.h +++ /dev/null @@ -1,90 +0,0 @@ -/* Wait between tap_code register and unregister to fix flaky media keys. */ -#undef TAP_CODE_DELAY - -#define TAP_CODE_DELAY 20 - -/* - * Force the default tapping term since some keyboards make it way too short - * (*cough*Lily58*cough*). - */ -#undef TAPPING_TERM - -#define TAPPING_TERM 200 - -/* - * Treat mod-tap keys as holds even if the mod-tap key and the key being - * modified are both relased within TAPPING_TERM. This assumes the mod-tap key - * isn't usually pressed in quick succession with other tapped keys, which is - * good when the tap keycode is something like KC_ESC rather than a letter. - */ -#define PERMISSIVE_HOLD - -/* - * Turn off key repeat support of the tap keycode for tap-hold keys, enabling - * holds to work correctly in quick succession after taps. - */ -#define TAPPING_FORCE_HOLD - -#if defined(RGB_MATRIX_ENABLE) - /* Turn off per-key RGB when the host goes to sleep. */ - #define RGB_DISABLE_WHEN_USB_SUSPENDED true - - /* Keep per-key RGB increments consistent across keyboards. */ - #undef RGB_MATRIX_HUE_STEP - #undef RGB_MATRIX_SAT_STEP - #undef RGB_MATRIX_VAL_STEP - #undef RGB_MATRIX_SPD_STEP - - #define RGB_MATRIX_HUE_STEP 8 - #define RGB_MATRIX_SAT_STEP 17 - #define RGB_MATRIX_VAL_STEP 17 - #define RGB_MATRIX_SPD_STEP 17 - - /* Turn on additional RGB animations. */ - #define RGB_MATRIX_FRAMEBUFFER_EFFECTS - #define RGB_MATRIX_KEYPRESSES -#endif - -#if defined(RGBLIGHT_ENABLE) - /* Turn off RGB underglow when the host goes to sleep. */ - #define RGBLIGHT_SLEEP - - /* Keep RGB underglow level increments consistent across keyboards. */ - #undef RGBLIGHT_HUE_STEP - #undef RGBLIGHT_SAT_STEP - #undef RGBLIGHT_VAL_STEP - - #define RGBLIGHT_HUE_STEP 8 - #define RGBLIGHT_SAT_STEP 17 - #define RGBLIGHT_VAL_STEP 17 -#endif - -#if defined(BACKLIGHT_ENABLE) - /* Enable backlight breathing across the board. */ - #define BACKLIGHT_BREATHING - - /* Keep backlight level increments consistent across keyboards. */ - #undef BACKLIGHT_LEVELS - - #define BACKLIGHT_LEVELS 7 -#endif - -#if defined(MOUSEKEY_ENABLE) - /* Make mouse operation smoother. */ - #undef MOUSEKEY_DELAY - #undef MOUSEKEY_INTERVAL - - #define MOUSEKEY_DELAY 0 - #define MOUSEKEY_INTERVAL 16 - - /* Lower mouse speed to adjust for reduced MOUSEKEY_INTERVAL. */ - #undef MOUSEKEY_MAX_SPEED - #undef MOUSEKEY_TIME_TO_MAX - #undef MOUSEKEY_WHEEL_MAX_SPEED - #undef MOUSEKEY_WHEEL_TIME_TO_MAX - - #define MOUSEKEY_MAX_SPEED 7 - #define MOUSEKEY_TIME_TO_MAX 150 - #define MOUSEKEY_WHEEL_MAX_SPEED 3 - #define MOUSEKEY_WHEEL_TIME_TO_MAX 150 -#endif diff --git a/users/bcat/rules.mk b/users/bcat/rules.mk deleted file mode 100644 index 6d3444b2..00000000 --- a/users/bcat/rules.mk +++ /dev/null @@ -1,23 +0,0 @@ -SRC += bcat.c - -# Enable Bootmagic Lite to consistently reset to bootloader and clear EEPROM. -BOOTMAGIC_ENABLE = lite - -# Enable mouse and media keys on all keyboards. -EXTRAKEY_ENABLE = yes -MOUSEKEY_ENABLE = yes - -# Disable some unwanted features on all keyboards. -API_SYSEX_ENABLE = no -COMMAND_ENABLE = no -CONSOLE_ENABLE = no -FAUXCLICKY_ENABLE = no -MIDI_ENABLE = no -NKRO_ENABLE = no -SLEEP_LED_ENABLE = no -UCIS_ENABLE = no -UNICODE_ENABLE = no -UNICODEMAP_ENABLE = no - -# Enable link-time optimization to reduce binary size. -LINK_TIME_OPTIMIZATION_ENABLE = yes diff --git a/users/billypython/billypython.c b/users/billypython/billypython.c deleted file mode 100644 index 7bdfe33a..00000000 --- a/users/billypython/billypython.c +++ /dev/null @@ -1,32 +0,0 @@ -#include "billypython.h" - -__attribute__((weak)) -bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { - return true; -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - if (!process_record_keymap(keycode, record)) { - return false; - } - - switch (keycode) { - case CLEAR: - if (record->event.pressed) { - SEND_STRING(SS_LCTRL("a") SS_TAP(X_DELETE)); - } - return false; - - default: - return true; - } -} - -__attribute__((weak)) -uint32_t layer_state_set_keymap(uint32_t state) { - return state; -} - -uint32_t layer_state_set_user(uint32_t state) { - return layer_state_set_keymap(state); -} diff --git a/users/billypython/billypython.h b/users/billypython/billypython.h deleted file mode 100644 index 4a444e97..00000000 --- a/users/billypython/billypython.h +++ /dev/null @@ -1,34 +0,0 @@ -#pragma once - -#include "quantum.h" - -#ifdef TAP_DANCE_ENABLE - #include "tap_dance.h" -#endif - -#ifdef LAYER_FN - #define FN MO(L_FN) - #define FN_CAPS LT(L_FN, KC_CAPS) - #define FN_FNLK TT(L_FN) -#endif - -#define TOP LCTL(KC_HOME) -#define BOTTOM LCTL(KC_END) - -enum keycodes_user { - CLEAR = SAFE_RANGE, - - RANGE_KEYMAP, -}; - -enum layers_user { - L_BASE, -#ifdef LAYER_FN - L_FN, -#endif - - L_RANGE_KEYMAP, -}; - -bool process_record_keymap(uint16_t keycode, keyrecord_t *record); -uint32_t layer_state_set_keymap(uint32_t state); diff --git a/users/billypython/config.h b/users/billypython/config.h deleted file mode 100644 index 4609adbb..00000000 --- a/users/billypython/config.h +++ /dev/null @@ -1,17 +0,0 @@ -#pragma once - -#define FORCE_NKRO - -#define MOUSEKEY_DELAY 50 -#define MOUSEKEY_INTERVAL 15 -#define MOUSEKEY_MAX_SPEED 4 -#define MOUSEKEY_TIME_TO_MAX 50 -#define MOUSEKEY_WHEEL_MAX_SPEED 1 -#define MOUSEKEY_WHEEL_TIME_TO_MAX 50 - -#define NO_ACTION_FUNCTION -#define NO_ACTION_MACRO - -#define PERMISSIVE_HOLD -#define TAPPING_TERM 200 -#define TAPPING_TOGGLE 2 diff --git a/users/billypython/rules.mk b/users/billypython/rules.mk deleted file mode 100644 index 915323b4..00000000 --- a/users/billypython/rules.mk +++ /dev/null @@ -1,6 +0,0 @@ -SRC += billypython.c -ifeq ($(strip $(TAP_DANCE_ENABLE)), yes) - SRC += tap_dance.c -endif - -EXTRAFLAGS += -flto diff --git a/users/billypython/tap_dance.c b/users/billypython/tap_dance.c deleted file mode 100644 index 74ae1663..00000000 --- a/users/billypython/tap_dance.c +++ /dev/null @@ -1,33 +0,0 @@ -#include "tap_dance.h" - -#define ACTION_TAP_DANCE_DOUBLE_MODS(mod1, mod2) { \ - .fn = { td_double_mods_each, NULL, td_double_mods_reset }, \ - .user_data = &(qk_tap_dance_pair_t){ mod1, mod2 }, \ - } - -void td_double_mods_each(qk_tap_dance_state_t *state, void *user_data) { - qk_tap_dance_pair_t *mods = (qk_tap_dance_pair_t *)user_data; - // Single tap → mod1, double tap → mod2, triple tap etc. → mod1+mod2 - if (state->count == 1 || state->count == 3) { - register_code(mods->kc1); - } else if (state->count == 2) { - unregister_code(mods->kc1); - register_code(mods->kc2); - } - // Prevent tap dance from sending kc1 and kc2 as weak mods - state->weak_mods &= ~(MOD_BIT(mods->kc1) | MOD_BIT(mods->kc2)); -} - -void td_double_mods_reset(qk_tap_dance_state_t *state, void *user_data) { - qk_tap_dance_pair_t *mods = (qk_tap_dance_pair_t *)user_data; - if (state->count == 1 || state->count >= 3) { - unregister_code(mods->kc1); - } - if (state->count >= 2) { - unregister_code(mods->kc2); - } -} - -qk_tap_dance_action_t tap_dance_actions[] = { - [TD_RSF_RCT] = ACTION_TAP_DANCE_DOUBLE_MODS(KC_RSFT, KC_RCTL), -}; diff --git a/users/billypython/tap_dance.h b/users/billypython/tap_dance.h deleted file mode 100644 index 25819814..00000000 --- a/users/billypython/tap_dance.h +++ /dev/null @@ -1,9 +0,0 @@ -#pragma once - -#include "quantum.h" - -#define RSF_RCT TD(TD_RSF_RCT) - -enum tap_dance { - TD_RSF_RCT, -}; diff --git a/users/bocaj/bocaj.c b/users/bocaj/bocaj.c deleted file mode 100644 index 689dbe7b..00000000 --- a/users/bocaj/bocaj.c +++ /dev/null @@ -1,189 +0,0 @@ -/* -Copyright 2018 Jacob Jerrell @JacobJerrell - -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 "bocaj.h" - -userspace_config_t userspace_config; -#if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE)) - #define BOCAJ_UNICODE_MODE UC_OSX -#else - // set to 2 for UC_WIN, set to 4 for UC_WINC - #define BOCAJ_UNICODE_MODE 2 -#endif - -void tap(uint16_t keycode){ register_code(keycode); unregister_code(keycode); }; - -// Add reconfigurable functions here, for keymap customization -// This allows for a global, userspace functions, and continued -// customization of the keymap. Use _keymap instead of _user -// functions in the keymaps -__attribute__ ((weak)) -void matrix_init_keymap(void) {} - -__attribute__ ((weak)) -void startup_keymap(void) {} - -__attribute__ ((weak)) -void suspend_power_down_keymap(void) {} - -__attribute__ ((weak)) -void suspend_wakeup_init_keymap(void) {} - -__attribute__ ((weak)) -void matrix_scan_keymap(void) {} - -__attribute__ ((weak)) -bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { - return true; -} - -__attribute__ ((weak)) -void matrix_scan_secrets(void) {} - -__attribute__ ((weak)) -uint32_t layer_state_set_keymap (uint32_t state) { - return state; -} - -__attribute__ ((weak)) -uint32_t default_layer_state_set_keymap (uint32_t state) { - return state; -} - -__attribute__ ((weak)) -void led_set_keymap(uint8_t usb_led) {} - -// Call user matrix init, set default RGB colors and then -// call the keymap's init function -void matrix_init_user(void) { - userspace_config.raw = eeconfig_read_user(); - - #if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE)) - set_unicode_input_mode(BOCAJ_UNICODE_MODE); - get_unicode_input_mode(); - #endif //UNICODE_ENABLE - - - matrix_init_keymap(); -} - -void startup_user (void) { - startup_keymap(); -} - -void suspend_power_down_user(void) -{ - suspend_power_down_keymap(); -} - -void suspend_wakeup_init_user(void) -{ - suspend_wakeup_init_keymap(); - #ifdef KEYBOARD_ergodox_ez - wait_ms(10); - #endif -} - -void eeconfig_init_user(void) { - userspace_config.raw = 0; - eeconfig_update_user(userspace_config.raw); - #if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE)) - set_unicode_input_mode(BOCAJ_UNICODE_MODE); - get_unicode_input_mode(); - #else - eeprom_update_byte(EECONFIG_UNICODEMODE, BOCAJ_UNICODE_MODE); - #endif -} - -LEADER_EXTERNS(); -// No global matrix scan code, so just run keymap's matrix -// scan function -void matrix_scan_user(void) { - static bool has_ran_yet; - if (!has_ran_yet) { - has_ran_yet = true; - startup_user(); - } - LEADER_DICTIONARY() { - leading = false; - leader_end(); - - // Mac Save (Leader -> s) - SEQ_ONE_KEY(KC_S) { - SEND_STRING(SS_LGUI("s")); - } - - // Mac copy line down (Leader -> d, d) - SEQ_TWO_KEYS(KC_D, KC_D) { - register_code(KC_LSHIFT); - register_code(KC_HOME); - unregister_code(KC_HOME); - unregister_code(KC_LSHIFT); - SEND_STRING(SS_LGUI("c")); - tap(KC_END); - tap(KC_ENTER); - SEND_STRING(SS_LGUI("v")); - } - - // Mac copy line up (Leader -> u, u) - SEQ_TWO_KEYS(KC_U, KC_U) { - register_code(KC_LSHIFT); - register_code(KC_HOME); - unregister_code(KC_HOME); - unregister_code(KC_LSHIFT); - SEND_STRING(SS_LGUI("c")); - tap(KC_UP); - tap(KC_END); - tap(KC_ENTER); - SEND_STRING(SS_LGUI("v")); - } - - // Mac VS Debug - SEQ_ONE_KEY(KC_D) { - tap(KC_F5); - } - - // Mac VS Stop Debug - SEQ_TWO_KEYS(KC_S, KC_D) { - register_code(KC_LSHIFT); - tap(KC_F5); - unregister_code(KC_LSHIFT); - } - - // Start Diablo 3 - SEQ_ONE_KEY(KC_3) { - SEND_STRING(SS_LCTRL(" ")); - SEND_STRING("Diablo"); - tap(KC_ENTER); - } - - SEQ_ONE_KEY(KC_B) { - SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION " "); - tap(KC_ENTER); - SEND_STRING ("Built at: " QMK_BUILDDATE); - } -#ifndef NO_SECRETS - matrix_scan_secrets(); -#endif // !NO_SECRETS - } - -#ifdef TAP_DANCE_ENABLE // Run Diablo 3 macro checking code. - run_diablo_macro_check(); -#endif // TAP_DANCE_ENABLE - - matrix_scan_keymap(); -} diff --git a/users/bocaj/bocaj.h b/users/bocaj/bocaj.h deleted file mode 100644 index 04991a01..00000000 --- a/users/bocaj/bocaj.h +++ /dev/null @@ -1,85 +0,0 @@ -/* -Copyright 2018 Jacob Jerrell @JacobJerrell - -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 . -*/ - -#pragma once -#include "quantum.h" -#include "version.h" -#include "eeprom.h" -#include "wrappers.h" -#include "process_records.h" -#ifdef TAP_DANCE_ENABLE - #include "tap_dances.h" -#endif // TAP_DANCE_ENABLE - -/* Layer Names */ -enum userspace_layers { - _WORKMAN = 0, - _WINWORKMAN, - _QWERTY, - _LOWER, - _ADJUST, - _DIABLO, -}; - -#if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE)) - #define BOCAJ_UNICODE_MODE UC_OSX -#else - // set to 2 for UC_WIN, set to 4 for UC_WINC - #define BOCAJ_UNICODE_MODE 2 -#endif - -/* -define modifiers here, since MOD_* doesn't seem to work for these - */ -#define MODS_SHIFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) -#define MODS_CTRL_MASK (MOD_BIT(KC_LCTL)|MOD_BIT(KC_RCTRL)) -#define MODS_ALT_MASK (MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT)) -#define MODS_GUI_MASK (MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) - -bool mod_key_press_timer (uint16_t code, uint16_t mod_code, bool pressed); -bool mod_key_press (uint16_t code, uint16_t mod_code, bool pressed, uint16_t this_timer); -bool send_game_macro(const char *str, keyrecord_t *record, bool override); -void matrix_init_keymap(void); -void shutdown_keymap(void); -void suspend_power_down_keymap(void); -void suspend_wakeup_init_keymap(void); -void matrix_scan_keymap(void); -uint32_t layer_state_set_keymap (uint32_t state); -uint32_t default_layer_state_set_keymap (uint32_t state); -void led_set_keymap(uint8_t usb_led); -void eeconfig_init_keymap(void); -void tap(uint16_t keycode); - -typedef union { - uint8_t raw; -} userspace_config_t; - -extern userspace_config_t userspace_config; - -// If Tap Dancing is enabled, we manage that here. -// If it is not, then we define the KC_D3_# codes gracefully -#ifdef TAP_DANCE_ENABLE - #define KC_D3_1 TD(TD_D3_1) - #define KC_D3_2 TD(TD_D3_2) - #define KC_D3_3 TD(TD_D3_3) - #define KC_D3_4 TD(TD_D3_4) -#else // !TAP_DANCE_ENABLE - #define KC_D3_1 KC_1 - #define KC_D3_2 KC_2 - #define KC_D3_3 KC_3 - #define KC_D3_4 KC_4 -#endif // TAP_DANCE_ENABLE diff --git a/users/bocaj/config.h b/users/bocaj/config.h deleted file mode 100644 index 1956ea6d..00000000 --- a/users/bocaj/config.h +++ /dev/null @@ -1,33 +0,0 @@ -#pragma once - -#ifndef QMK_KEYS_PER_SCAN - #define QMK_KEYS_PER_SCAN 4 -#endif // QMK KEYS PER SCAN - -// this makes it possible to do rolling combos (zx) with keys that -// convert to other keys on hold (z becomes ctrl when you hold it, -// and when this option isn't enabled, z rapidly followed by x -// actually sends Ctrl-x. That's bad.) -#define IGNORE_MOD_TAP_INTERRUPT -#undef PERMISSIVE_HOLD -#define PREVENT_STUCK_MODIFIERS - -#ifdef TAPPING_TERM -#undef TAPPING_TERM -#endif // TAPPING_TERM -#define TAPPING_TERM 175 - -#define RETRO_TAPPING - -// Disable action_get_macro and fn_actions, since we don't use these -// and it saves on space in the firmware. -#ifndef NO_DEBUG -#define NO_DEBUG -#endif // !NO_DEBUG -#if !defined(NO_PRINT) && !defined(CONSOLE_ENABLE) -#define NO_PRINT -#endif // !NO_PRINT -#define NO_ACTION_MACRO -#define NO_ACTION_FUNCTION - -#define MACRO_TIMER 5 diff --git a/users/bocaj/process_records.c b/users/bocaj/process_records.c deleted file mode 100644 index c36683f8..00000000 --- a/users/bocaj/process_records.c +++ /dev/null @@ -1,149 +0,0 @@ -#include "bocaj.h" -#include QMK_KEYBOARD_H - -uint16_t copy_paste_timer; -uint16_t grave_layer_timer; -uint16_t heal_layer_timer; - -__attribute__ ((weak)) -bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { - return true; -} - -// Defines actions tor my global custom keycodes. Defined in bocaj.h file -// Then runs the _keymap's record handler if not processed here -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case KC_MWRK: - if (!record->event.pressed) { - set_single_persistent_default_layer(_WORKMAN); - #if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE)) - set_unicode_input_mode(0); - #endif - layer_move(0); - ergodox_blink_all_leds(); - } - break; - case KC_WWRK: - if (!record->event.pressed) { - set_single_persistent_default_layer(_WINWORKMAN); - #if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE)) - set_unicode_input_mode(4); - #endif - layer_move(0); - ergodox_blink_all_leds(); - } - break; - case KC_MQWR: - if (!record->event.pressed) { - set_single_persistent_default_layer(_QWERTY); - #if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE)) - set_unicode_input_mode(0); - #endif - layer_move(0); - ergodox_blink_all_leds(); - } - break; - case MC_LOCK: - if (!record->event.pressed) { - layer_move(0); - SEND_STRING(SS_LCTRL(SS_LGUI("q"))); - } - break; - case KC_MAKE: // Compiles the firmware, and adds the flash command based on keyboard bootloader - if (!record->event.pressed) { - uint8_t temp_mod = get_mods(); - uint8_t temp_osm = get_oneshot_mods(); - clear_mods(); - clear_oneshot_mods(); - if (biton32(default_layer_state) == _WINWORKMAN) { - send_string_with_delay_P(PSTR("make " QMK_KEYBOARD ":" QMK_KEYMAP), 10); - } else { - send_string_with_delay_P(PSTR("util/docker_build.sh " QMK_KEYBOARD ":" QMK_KEYMAP), 10); - } - if (temp_mod & MODS_SHIFT_MASK) { - send_string_with_delay_P(PSTR(":teensy"), 10); - } - if (temp_mod & MODS_CTRL_MASK) { - send_string_with_delay_P(PSTR(" -j8 --output-sync"), 10); - } - send_string_with_delay_P(PSTR(SS_TAP(X_ENTER)), 10); - set_mods(temp_mod); - layer_move(0); - } - break; - case KC_DCLR: // reset all Diablo timers, disabling them -#ifdef TAP_DANCE_ENABLE - if (record->event.pressed) { - uint8_t dtime; - for (dtime = 0; dtime < 4; dtime++) { - diablo_key_time[dtime] = diablo_times[0]; - } - } -#endif // TAP_DANCE_ENABLE - break; - case JJ_ARRW: - if (!record->event.pressed) { - SEND_STRING("->"); - } - return false; - break; - case LM_GRAVE: - if (record->event.pressed) { - grave_layer_timer = timer_read(); - } else { - if (timer_elapsed(grave_layer_timer) < TAPPING_TERM) { - uint8_t temp_mod = get_mods(); - uint8_t one_shot = get_oneshot_mods(); - clear_mods(); - if (temp_mod & MODS_SHIFT_MASK || one_shot & MODS_SHIFT_MASK) { - register_code(KC_LSFT); - tap(KC_GRAVE); - unregister_code(KC_LSFT); - } else { - tap(KC_GRAVE); - } - set_mods(temp_mod); - } else { - layer_move(0); - } - } - return false; - break; - case KC_CCCV: - if (record->event.pressed) { - copy_paste_timer = timer_read(); - } else { - if (timer_elapsed(copy_paste_timer) > TAPPING_TERM) { // Hold, copy - SEND_STRING(SS_LGUI("c")); - } else { - SEND_STRING(SS_LGUI("v")); - } - } - return false; - break; -#ifdef UNICODE_ENABLE - case UC_FLIP: // (ノಠ痊ಠ)ノ彡┻━┻ - if (record->event.pressed) { - send_unicode_hex_string("0028 30CE 0CA0 75CA 0CA0 0029 30CE 5F61 253B 2501 253B"); - } - break; - case UC_TABL: // ┬─┬ノ( º _ ºノ) - if (record->event.pressed) { - send_unicode_hex_string("252C 2500 252C 30CE 0028 0020 00BA 0020 005F 0020 00BA 30CE 0029"); - } - break; - case UC_SHRG: // ¯\_(ツ)_/¯ - if (record->event.pressed) { - send_unicode_hex_string("00AF 005C 005F 0028 30C4 0029 005F 002F 00AF"); - } - break; - case UC_DISA: // ಠ_ಠ - if (record->event.pressed) { - send_unicode_hex_string("0CA0 005F 0CA0"); - } - break; -#endif - } - return process_record_keymap(keycode, record); -} diff --git a/users/bocaj/process_records.h b/users/bocaj/process_records.h deleted file mode 100644 index 5c55df35..00000000 --- a/users/bocaj/process_records.h +++ /dev/null @@ -1,50 +0,0 @@ -#pragma once -#include "bocaj.h" - -#if defined(KEYMAP_SAFE_RANGE) - #define PLACEHOLDER_SAFE_RANGE KEYMAP_SAFE_RANGE -#else - #define PLACEHOLDER_SAFE_RANGE SAFE_RANGE -#endif - -enum userspace_custom_keycodes { - KC_EPRM = PLACEHOLDER_SAFE_RANGE, // can always be here - KC_MWRK, - KC_WWRK, - KC_MQWR, - KC_VRSN, - LM_GRAVE, // Shift if held, layer change if tapped - JJ_COPY, - JJ_PSTE, - JJ_ARRW, - KC_CCCV, - MC_LOCK, - KC_DCLR, - KC_MAKE, - UC_FLIP, // (ಠ痊ಠ)┻━┻ - UC_TABL, // ┬─┬ノ( º _ ºノ) - UC_SHRG, // ¯\_(ツ)_/¯ - UC_DISA, // ಠ_ಠ - NEW_SAFE_RANGE //use "NEWPLACEHOLDER for keymap specific codes -}; - -bool process_record_keymap(uint16_t keycode, keyrecord_t *record); - -// One Shot -#define OS_LSFT OSM(MOD_LSFT) - -// Space Cadet Hyper/Meh and [/] -#define HYP_LBK ALL_T(KC_LBRACKET) -#define MEH_RBK MEH_T(KC_RBRACKET) - -#define GUI_CTR(os, kc) MT( (os == 0) ? (MOD_LGUI) : (MOD_LCTL), kc ) - -// Layout beauti-/simpli-fication -#define KC_LWEN LT(_LOWER, KC_ENTER) -#define KC_ADJS TT(_ADJUST) -#define KC_NUMS TT(_LOWER) -#define KC_GAME TT(_DIABLO) - -// Other Keycodes -#define KC_RST RESET -#define KC_BS KC_BSLASH diff --git a/users/bocaj/readme.md b/users/bocaj/readme.md deleted file mode 100644 index 669299cb..00000000 --- a/users/bocaj/readme.md +++ /dev/null @@ -1,102 +0,0 @@ -# Overview - -My personal QMK userspace. First, I must say that the credit for a majority of the code found here belongs to Drashna and/or the people he derived his code from. My Ergodox layout is briefly described in its respective folder. As for explaining this userspace, you could honestly go to Drashna's userspace and read his well put together readme. Regardless, I am mostly writing this as an excercise for myself to better understand what is going on, and where applicable, describe things that I innovated on my own. - -## Bocaj.c - -### Unicode - -I've always had difficulty implementing unicode in QMK, all of this code is literally copy/pasted from Drashna's userspace and lies dormant here until I can take the time to figure it out. - -Update: Got it to work in Mac OS which is more important to me than Windows (probably pretty easy to figure out at this point). So I'm a happy table flipping person now! - -(ノಠ痊ಠ)ノ彡┻━┻ - -┬─┬ノ( º _ ºノ) - -### Tap Macro - -Not sure why this doesn't exist in QMK already (maybe it does?) - -```c -void tap(uint16_t keycode){ register_code(keycode); unregister_code(keycode); }; -``` - -### *_keymap functions - -We're running *_user functions in the userspace, that way we can add to or reconfigure at the keyboard level. Any *_user functions should call the equivalent *_keymap function at the end. If the *_keymap function isn't defined in the keymap, the `__attribute__ ((weak))` will prevent build problems. - -### Startup/Suspend/Shutdown Functions - -I have no idea what these do. Non-Ergodox keyboard functions? - -### Matrix Scan User - -Leader key defines, Diablo macro ancillary function, run matrix_scan_keymap. - -#### Leader Key - -I've always been interested in this feature, but I've had 0 experience with applications that have similar behavior. My implementation seeks to implement features that I feel VS2017 lacks - -## Secrets - -Hacked Drashna's secret macro implementation to work with the leader key instead. -TODO: Finish documentation - -## Bocaj.h - -Layer defines, some macro ancillary defines, setup Diablo macros and failsafe - -## Process_Records.c/.h - -Again, taking ideas from Drashna to make maintenance simpler. A couple of things that I'm proud of here, but nothing really ground breaking. - -* Features - * Change default layer - * KC_MWRK, KC_WWRK, KC_MQWR - * MacOS Lock Screen Macro - * Make macro (Credit: Drashna) - * Need to reconfigure so it runs the docker command if one of the Mac OS layers are default because the AVR install fails on the corporate laptop - * Arrow macro (->) because I find myself telling people how to get to something quite frequently and typing this manually requires moving the right hand to the top-left of the ergodox and then to the bottom right, which feels unnatural. - * LM_GRAVE - * While combining _NUMS and _LOWER, I also needed a place to put F1-12 keys. This required me to relocate the grave key. The most comfortable place to put it was over a key that I frequently use to toggle the numpad. I do have other ways to get to/from this layer but my mind has been wired to use them for different workflows, so I would sit here frozen for a moment trying to tell my fingers where to go - * How it works - * A timer starts when pressed down - * If the timer at release was less than the TAPPING_TERM define - * Get mods - * If Shift was held or one-shot shift was active - * Send `~` - * Else - * Send ` - * Else (timer at released was greater than the TAPPING_TERM define) - * Move to the default layer - * KC_CCCV - * Another neat idea I found in Drashna's userspace... highly underutilized in my layout but the inspiration for LM_GRAVE was obviously derived from this code - * Unicode stuff - * All I've ever wanted was a table-flip macro... I managed to get about half of it to work before I gave up and disabled it - -## Send_Unicode.c/.h - -I have some basic understanding of this, Drashna may already have it documented in his userspace. I'll put it in my own words when I get around to making it work and understanding it better. - -## Tap_Dances.c/h - -Again, building on Drashna's userspace organization to simplify maintenance of a heavily configured layout. This is all the stuff for the Diablo 3 macros that spam a given skill (1-4) every ~1 second - -## Wrappers.h - -Traditionally, you would put all of this into the \.h file. But I liked the idea of separating it to simplify modification in the future. - -### GUI_CTR(os, kc) - -A notable mention in this file is the GUI_CTR(os, kc) custom keycode defined in process_records.h as: - -```c -#define GUI_CTR(os, kc) MT( (os == 0) ? (MOD_LGUI) : (MOD_LCTL), kc ) -``` - -I tried several things before coming to this one-liner conclusion. I believe it is quite elegant and it definitely solves the problem I had (separate wrappers for Windows/MacOS layers). But I would love to make this into something more intuitive, like a macro that detects which layer you're on and sends the applicable hotkey when held, or keycode when tapped. Ultimately, I was too tired of thinking about it to come up with a solution like that at this time. - -Anyhow, if you set `os == 1`, it sends the Windows CTRL hotkey when held. If you set `os == 0`, it sends the Mac OS GUI hotkey when held. If tapped, it sends the keycode. - -This is effectively a slightly more advanced `MOD_T(kc)` keycode. diff --git a/users/bocaj/rules.mk b/users/bocaj/rules.mk deleted file mode 100644 index 9ed8c250..00000000 --- a/users/bocaj/rules.mk +++ /dev/null @@ -1,33 +0,0 @@ -SRC += bocaj.c \ - process_records.c - -ifneq ("$(wildcard $(USER_PATH)/secrets.c)","") - SRC += secrets.c -endif - -ifeq ($(strip $(TAP_DANCE_ENABLE)), yes) - SRC += tap_dances.c -endif - -# Caused problems when building via docker on Mac OS -# EXTRAFLAGS += -flto - -ifeq ($(strip $(NO_SECRETS)), yes) - OPT_DEFS += -DNO_SECRETS -endif - -ifeq ($(strip $(MACROS_ENABLED)), yes) - OPT_DEFS += -DMACROS_ENABLED -endif - -ifeq ($(strip $(UCIS_ENABLE)), yes) - SRC += send_unicode.c -endif - -ifeq ($(strip $(UNICODEMAP_ENABLE)), yes) - SRC += send_unicode.c -endif - -ifeq ($(strip $(UNICODE_ENABLE)), yes) - SRC += send_unicode.c -endif diff --git a/users/bocaj/send_unicode.c b/users/bocaj/send_unicode.c deleted file mode 100644 index b1290f63..00000000 --- a/users/bocaj/send_unicode.c +++ /dev/null @@ -1,106 +0,0 @@ -// Written by konstantin: vomindoraan -#include "send_unicode.h" -#include -#include - -__attribute__((weak)) -void send_unicode_hex_string(const char* str) { - if (!str) { return; } // Safety net - - while (*str) { - // Find the next code point (token) in the string - for (; *str == ' '; str++); - size_t n = strcspn(str, " "); // Length of the current token - char code_point[n+1]; - strncpy(code_point, str, n); - code_point[n] = '\0'; // Make sure it's null-terminated - - // Normalize the code point: make all hex digits lowercase - for (char *p = code_point; *p; p++) { - *p = tolower((unsigned char)*p); - } - - // Send the code point as a Unicode input string - unicode_input_start(); - send_string(code_point); - unicode_input_finish(); - - str += n; // Move to the first ' ' (or '\0') after the current token - } -} - -// (ノಠ痊ಠ)ノ彡┻━┻ -// send_unicode_hex_string("0028 30CE 0CA0 75CA 0CA0 0029 30CE 5F61 253B 2501 253B"); - -//Old code -// (╯°□°)╯ ︵ ┻━┻ - #if 0 - register_code(KC_RSFT); - tap(KC_9); - unregister_code(KC_RSFT); - process_unicode((0x256F | QK_UNICODE), record); // Arm - process_unicode((0x00B0 | QK_UNICODE), record); // Eye - process_unicode((0x25A1 | QK_UNICODE), record); // Mouth - process_unicode((0x00B0 | QK_UNICODE), record); // Eye - register_code(KC_RSFT); - tap(KC_0); - unregister_code(KC_RSFT); - process_unicode((0x256F | QK_UNICODE), record); // Arm - tap(KC_SPC); - process_unicode((0x0361 | QK_UNICODE), record); // Flippy - tap(KC_SPC); - process_unicode((0x253B | QK_UNICODE), record); // Table - process_unicode((0x2501 | QK_UNICODE), record); // Table - process_unicode((0x253B | QK_UNICODE), record); // Table - #endif - - -// If you need a good converter: https://r12a.github.io/app-conversion/ -uint8_t saved_mods; - -void unicode_input_start (void) { - // save current mods - saved_mods = get_mods(); // Save current mods - clear_mods(); // Unregister mods to start from a clean state - - switch(get_unicode_input_mode()) { - case UC_OSX: - register_code(KC_LALT); - break; - case UC_LNX: - register_code(KC_LCTL); - register_code(KC_LSFT); - register_code(KC_U); - unregister_code(KC_U); - unregister_code(KC_LSFT); - unregister_code(KC_LCTL); - break; - case UC_WIN: - register_code(KC_LALT); - register_code(KC_PPLS); - unregister_code(KC_PPLS); - break; - case UC_WINC: - register_code(KC_RALT); - unregister_code(KC_RALT); - register_code(KC_U); - unregister_code(KC_U); - break; - } - wait_ms(UNICODE_TYPE_DELAY); -} - -void unicode_input_finish (void) { - switch(get_unicode_input_mode()) { - case UC_OSX: - case UC_WIN: - unregister_code(KC_LALT); - break; - case UC_LNX: - register_code(KC_SPC); - unregister_code(KC_SPC); - break; - } - - set_mods(saved_mods); // Reregister previously set mods -} diff --git a/users/bocaj/send_unicode.h b/users/bocaj/send_unicode.h deleted file mode 100644 index 818b6e57..00000000 --- a/users/bocaj/send_unicode.h +++ /dev/null @@ -1,71 +0,0 @@ -#pragma once - -#include "quantum.h" - -void send_unicode_hex_string(const char* str); - -/* use X(n) to call the */ -#ifdef UNICODEMAP_ENABLE -enum unicode_name { - THINK, // thinking face 🤔 - GRIN, // grinning face 😊 - SMRK, // smirk 😏 - WEARY, // good shit 😩 - UNAMU, // unamused 😒 - - SNEK, // snke 🐍 - PENGUIN, // 🐧 - DRAGON, // 🐉 - MONKEY, // 🐒 - CHICK, // 🐥 - BOAR, // 🐗 - - OKOK, // 👌 - EFFU, // 🖕 - INUP, // 👆 - THUP, // 👍 - THDN, // 👎 - - BBB, // dat B 🅱 - POO, // poop 💩 - HUNDR, // 100 💯 - EGGPL, // EGGPLANT 🍆 - WATER, // wet 💦 - TUMBLER, // 🥃 - - LIT, // fire 🔥 - BANG, // ‽ - IRONY, // ⸮ - DEGREE // ° -}; - - -const uint32_t PROGMEM unicode_map[] = { - [THINK] = 0x1F914, - [GRIN] = 0x1F600, - [BBB] = 0x1F171, - [POO] = 0x1F4A9, - [HUNDR] = 0x1F4AF, - [SMRK] = 0x1F60F, - [WEARY] = 0x1F629, - [EGGPL] = 0x1F346, - [WATER] = 0x1F4A6, - [LIT] = 0x1F525, - [UNAMU] = 0x1F612, - [SNEK] = 0x1F40D, - [PENGUIN] = 0x1F427, - [BOAR] = 0x1F417, - [MONKEY] = 0x1F412, - [CHICK] = 0x1F425, - [DRAGON] = 0x1F409, - [OKOK] = 0x1F44C, - [EFFU] = 0x1F595, - [INUP] = 0x1F446, - [THDN] = 0x1F44E, - [THUP] = 0x1F44D, - [TUMBLER] = 0x1F943, - [BANG] = 0x0203D, - [IRONY] = 0x02E2E, - [DEGREE] = 0x000B0 - }; -#endif // UNICODEMAP_ENABLE diff --git a/users/bocaj/tap_dances.c b/users/bocaj/tap_dances.c deleted file mode 100644 index a9628a34..00000000 --- a/users/bocaj/tap_dances.c +++ /dev/null @@ -1,64 +0,0 @@ -#include "tap_dances.h" - - -//define diablo macro timer variables -uint16_t diablo_timer[4]; -uint8_t diablo_times[] = { 0, 1, 3, 5, 10, 30 }; -uint8_t diablo_key_time[4]; - -// has the correct number of seconds elapsed (as defined by diablo_times) -bool check_dtimer(uint8_t dtimer) { return (timer_elapsed(diablo_timer[dtimer]) < (diablo_key_time[dtimer] * 1000)) ? false : true; }; - -// Cycle through the times for the macro, starting at 0, for disabled. -// Max of six values, so don't exceed -void diablo_tapdance_master(qk_tap_dance_state_t *state, void *user_data, uint8_t diablo_key) { - if (state->count >= 7) { - diablo_key_time[diablo_key] = diablo_times[0]; - reset_tap_dance(state); - } else { - diablo_key_time[diablo_key] = diablo_times[state->count - 1]; - } -} - -// Would rather have one function for all of this, but no idea how to do that... -void diablo_tapdance1(qk_tap_dance_state_t *state, void *user_data) { diablo_tapdance_master(state, user_data, 0); } -void diablo_tapdance2(qk_tap_dance_state_t *state, void *user_data) { diablo_tapdance_master(state, user_data, 1); } -void diablo_tapdance3(qk_tap_dance_state_t *state, void *user_data) { diablo_tapdance_master(state, user_data, 2); } -void diablo_tapdance4(qk_tap_dance_state_t *state, void *user_data) { diablo_tapdance_master(state, user_data, 3); } - -//Tap Dance Definitions -qk_tap_dance_action_t tap_dance_actions[] = { - // tap once to disable, and more to enable timed micros - [TD_D3_1] = ACTION_TAP_DANCE_FN(diablo_tapdance1), - [TD_D3_2] = ACTION_TAP_DANCE_FN(diablo_tapdance2), - [TD_D3_3] = ACTION_TAP_DANCE_FN(diablo_tapdance3), - [TD_D3_4] = ACTION_TAP_DANCE_FN(diablo_tapdance4), -}; - -// Sends the key press to system, but only if on the Diablo layer -void send_diablo_keystroke(uint8_t diablo_key) { - if (biton32(layer_state) == _DIABLO) { - switch (diablo_key) { - case 0: - tap(KC_1); break; - case 1: - tap(KC_2); break; - case 2: - tap(KC_3); break; - case 3: - tap(KC_4); break; - } - } -} - -// Checks each of the 4 timers/keys to see if enough time has elapsed -// Runs the "send string" command if enough time has passed, and resets the timer. -void run_diablo_macro_check(void) { - uint8_t dtime; - for (dtime = 0; dtime < 4; dtime++) { - if (check_dtimer(dtime) && diablo_key_time[dtime]) { - diablo_timer[dtime] = timer_read(); - send_diablo_keystroke(dtime); - } - } -} diff --git a/users/bocaj/tap_dances.h b/users/bocaj/tap_dances.h deleted file mode 100644 index 5b1277ec..00000000 --- a/users/bocaj/tap_dances.h +++ /dev/null @@ -1,19 +0,0 @@ -#pragma once -#include "bocaj.h" - -//define diablo macro timer variables -extern uint16_t diablo_timer[4]; -extern uint8_t diablo_times[]; -extern uint8_t diablo_key_time[4]; - - -void run_diablo_macro_check(void); - -#ifdef TAP_DANCE_ENABLE -enum { - TD_D3_1 = 0, - TD_D3_2, - TD_D3_3, - TD_D3_4 -}; -#endif // TAP_DANCE_ENABLE diff --git a/users/bocaj/wrappers.h b/users/bocaj/wrappers.h deleted file mode 100644 index 379edaad..00000000 --- a/users/bocaj/wrappers.h +++ /dev/null @@ -1,37 +0,0 @@ -#pragma once -#include "bocaj.h" - -#if (!defined(LAYOUT) && defined(KEYMAP)) -#define LAYOUT KEYMAP -#endif - -#define LAYOUT_ergodox_wrapper(...) LAYOUT_ergodox(__VA_ARGS__) -#define LAYOUT_ergodox_pretty_wrapper(...) LAYOUT_ergodox_pretty(__VA_ARGS__) - -#define _________________QWERTY_L1__________________ KC_Q, KC_W, KC_E, KC_R, KC_T -#define _________________QWERTY_L2__________________ KC_A, KC_S, GUI_CTR(0, 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, GUI_CTR(0, KC_K), KC_L, KC_SCLN -#define _________________QWERTY_R3__________________ KC_N, KC_M, KC_COMM, KC_DOT, KC_SLASH - -// Hardware Driven Workman -#define _________________WORKMAN_L1_________________ KC_Q, KC_D, KC_R, KC_W, KC_B -#define _________________WORKMAN_L2_________________ KC_A, KC_S, GUI_CTR(0, KC_H), KC_T, KC_G // GUI_CTR(0, kc) behaves as GUI_T(kc) -#define ________________WWORKMAN_L2_________________ KC_A, KC_S, GUI_CTR(1, KC_H), KC_T, KC_G // GUI_CTR(1, kc) behaves as CTR_T(kc) -#define _________________WORKMAN_L3_________________ KC_Z, KC_X, KC_M, KC_C, KC_V - -#define _________________WORKMAN_R1_________________ KC_J, KC_F, KC_U, KC_P, KC_SCLN -#define _________________WORKMAN_R2_________________ KC_Y, KC_N, GUI_CTR(0, KC_E), KC_O, KC_I // GUI_CTR(0, kc) behaves as GUI_T(kc) -#define ________________WWORKMAN_R2_________________ KC_Y, KC_N, GUI_CTR(1, KC_E), KC_O, KC_I // GUI_CTR(1, kc) behaves as CTR_T(kc) -#define _________________WORKMAN_R3_________________ KC_K, KC_L, KC_COMM, KC_DOT, KC_SLASH - - -#define __________________NUMBER_LEFT_______________ KC_1, KC_2, KC_3, KC_4, KC_5 -#define __________________NUMBER_RIGHT______________ KC_6, KC_7, KC_8, KC_9, KC_0 - -#define __________________FUNCTION_LEFT_____________ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5 -#define __________________FUNCTION_RIGHT____________ KC_F6, KC_F7, KC_F8, KC_F9, KC_F10 - -#define ____________________BLANK___________________ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS diff --git a/users/brett/brett.c b/users/brett/brett.c deleted file mode 100644 index c19c8b4a..00000000 --- a/users/brett/brett.c +++ /dev/null @@ -1,61 +0,0 @@ -#include "brett.h" - -char * get_key(uint16_t keycode) { - switch (keycode) { - case FAT_ARROW: - return "=>"; - case SKINNY_ARROW: - return "->"; - case REVERSE_ARROW: - return "<-"; - case CONCAT: - return "<>"; - case MAP: - return "<$>"; - case MAP_FLIPPED: - return "<#>"; - case FLAP: - return "<@>"; - case PIPE: - return "|>"; - case ALT: - return "<|>"; - case APPLY: - return "<*>"; - case AND: - return "&&"; - case OR: - return "||"; - case BIND: - return ">>="; - case BIND_FLIPPED: - return "=<<"; - case DOUBLE_COLON: - return "::"; - case VOID_LEFT: - return "<$"; - case VOID_RIGHT: - return "$>"; - default: - return ""; - } -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - bool pressed = record->event.pressed; - switch (keycode) { - case FAT_ARROW ... DOUBLE_COLON: - if (pressed) { - send_string(get_key(keycode)); - } - return false; - case FLASH: - if (!pressed) { - SEND_STRING("make -j8 --output-sync " QMK_KEYBOARD ":" QMK_KEYMAP ":flash" SS_TAP(X_ENTER)); - reset_keyboard(); - } - return false; - default: - return true; - } -} diff --git a/users/brett/brett.h b/users/brett/brett.h deleted file mode 100644 index a359c515..00000000 --- a/users/brett/brett.h +++ /dev/null @@ -1,25 +0,0 @@ -#pragma once - -enum userspace_custom_keycodes { - PLACEHOLDER = SAFE_RANGE, // Can always be here - FAT_ARROW, // => - SKINNY_ARROW, // -> - REVERSE_ARROW, // <- - CONCAT, // <> - MAP, // <$> - MAP_FLIPPED, // <#> - FLAP, // <@> - PIPE, // |> - ALT, // <|> - APPLY, // <*> - AND, // && - OR, // || - BIND, // >>= - BIND_FLIPPED, // =<< - VOID_LEFT, // <$ - VOID_RIGHT, // $> - DOUBLE_COLON, // :: - FLASH // Handle keyboard flashing -}; - -bool process_record_keymap(uint16_t keycode, keyrecord_t *record); diff --git a/users/brett/rules.mk b/users/brett/rules.mk deleted file mode 100644 index b186662d..00000000 --- a/users/brett/rules.mk +++ /dev/null @@ -1 +0,0 @@ -SRC += brett.c diff --git a/users/cbbrowne/cbbrowne.c b/users/cbbrowne/cbbrowne.c deleted file mode 100644 index e69de29b..00000000 diff --git a/users/cbbrowne/cbbrowne.h b/users/cbbrowne/cbbrowne.h deleted file mode 100644 index 301636c0..00000000 --- a/users/cbbrowne/cbbrowne.h +++ /dev/null @@ -1,39 +0,0 @@ -#ifndef USERSPACE -#define USERSPACE - -#ifdef BACKLIGHT_ENABLE -#include "backlight.h" -#endif -#include "quantum.h" -#include "config.h" - -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#ifndef NO_DEBUG -#define NO_DEBUG -#endif -#ifndef NO_PRINT -#define NO_PRINT -#endif - -/* cbbrowne user configuration */ - -#define randadd 53 -#define randmul 181 -#define randmod 167 - -/* Filler to make layering a bit clearer * - * borrowed from basic keymap */ - -#define _______ KC_TRNS -#define _____ KC_NO - -#define LEADER_TIMEOUT 300 -#ifndef LIGHT_CONFIG_H -#define BACKLIGHT_BREATHING -#endif - -#endif - -#endif diff --git a/users/cbbrowne/rules.mk b/users/cbbrowne/rules.mk deleted file mode 100644 index 497638cd..00000000 --- a/users/cbbrowne/rules.mk +++ /dev/null @@ -1 +0,0 @@ -SRC += cbbrowne.c diff --git a/users/cjuniet/cjuniet.c b/users/cjuniet/cjuniet.c deleted file mode 100644 index 3b950b1a..00000000 --- a/users/cjuniet/cjuniet.c +++ /dev/null @@ -1,13 +0,0 @@ -#include "cjuniet.h" - -void render_status_bar(void) { - uint8_t modifiers = get_mods(); - led_t led_state = host_keyboard_led_state(); - oled_write_P(PSTR("\325\326"), (modifiers & MOD_MASK_SHIFT)); - oled_write_P(PSTR("\327\330"), (modifiers & MOD_MASK_CTRL)); - oled_write_P(PSTR("\331\332"), (modifiers & MOD_MASK_ALT)); - oled_write_P(PSTR("\333\334"), (modifiers & MOD_MASK_GUI)); - oled_write_P(PSTR(" "), false); - oled_write_P(PSTR("\235\236"), led_state.caps_lock); - oled_write_P(PSTR("\275\276"), led_state.num_lock); -} diff --git a/users/cjuniet/cjuniet.h b/users/cjuniet/cjuniet.h deleted file mode 100644 index adc46d7e..00000000 --- a/users/cjuniet/cjuniet.h +++ /dev/null @@ -1,5 +0,0 @@ -#pragma once - -#include "quantum.h" - -void render_status_bar(void); diff --git a/users/cjuniet/glcdfont.c b/users/cjuniet/glcdfont.c deleted file mode 100644 index 539b0bd9..00000000 --- a/users/cjuniet/glcdfont.c +++ /dev/null @@ -1,230 +0,0 @@ -#include "progmem.h" - -// Online editor: https://helixfonteditor.netlify.com/ - -static const unsigned char font[] PROGMEM = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00, - 0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00, - 0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00, - 0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00, - 0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00, - 0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00, - 0x00, 0x18, 0x3C, 0x18, 0x00, 0x00, - 0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00, - 0x00, 0x18, 0x24, 0x18, 0x00, 0x00, - 0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00, - 0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00, - 0x26, 0x29, 0x79, 0x29, 0x26, 0x00, - 0x40, 0x7F, 0x05, 0x05, 0x07, 0x00, - 0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00, - 0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00, - 0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00, - 0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00, - 0x14, 0x22, 0x7F, 0x22, 0x14, 0x00, - 0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00, - 0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00, - 0x00, 0x66, 0x89, 0x95, 0x6A, 0x00, - 0x60, 0x60, 0x60, 0x60, 0x60, 0x00, - 0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00, - 0x08, 0x04, 0x7E, 0x04, 0x08, 0x00, - 0x10, 0x20, 0x7E, 0x20, 0x10, 0x00, - 0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00, - 0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00, - 0x1E, 0x10, 0x10, 0x10, 0x10, 0x00, - 0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00, - 0x30, 0x38, 0x3E, 0x38, 0x30, 0x00, - 0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x5F, 0x00, 0x00, 0x00, - 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, - 0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00, - 0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00, - 0x23, 0x13, 0x08, 0x64, 0x62, 0x00, - 0x36, 0x49, 0x56, 0x20, 0x50, 0x00, - 0x00, 0x08, 0x07, 0x03, 0x00, 0x00, - 0x00, 0x1C, 0x22, 0x41, 0x00, 0x00, - 0x00, 0x41, 0x22, 0x1C, 0x00, 0x00, - 0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00, - 0x08, 0x08, 0x3E, 0x08, 0x08, 0x00, - 0x00, 0x80, 0x70, 0x30, 0x00, 0x00, - 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, - 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, - 0x20, 0x10, 0x08, 0x04, 0x02, 0x00, - 0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00, - 0x00, 0x42, 0x7F, 0x40, 0x00, 0x00, - 0x72, 0x49, 0x49, 0x49, 0x46, 0x00, - 0x21, 0x41, 0x49, 0x4D, 0x33, 0x00, - 0x18, 0x14, 0x12, 0x7F, 0x10, 0x00, - 0x27, 0x45, 0x45, 0x45, 0x39, 0x00, - 0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00, - 0x41, 0x21, 0x11, 0x09, 0x07, 0x00, - 0x36, 0x49, 0x49, 0x49, 0x36, 0x00, - 0x46, 0x49, 0x49, 0x29, 0x1E, 0x00, - 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, - 0x00, 0x40, 0x34, 0x00, 0x00, 0x00, - 0x00, 0x08, 0x14, 0x22, 0x41, 0x00, - 0x14, 0x14, 0x14, 0x14, 0x14, 0x00, - 0x00, 0x41, 0x22, 0x14, 0x08, 0x00, - 0x02, 0x01, 0x59, 0x09, 0x06, 0x00, - 0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00, - 0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00, - 0x7F, 0x49, 0x49, 0x49, 0x36, 0x00, - 0x3E, 0x41, 0x41, 0x41, 0x22, 0x00, - 0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00, - 0x7F, 0x49, 0x49, 0x49, 0x41, 0x00, - 0x7F, 0x09, 0x09, 0x09, 0x01, 0x00, - 0x3E, 0x41, 0x41, 0x51, 0x73, 0x00, - 0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00, - 0x00, 0x41, 0x7F, 0x41, 0x00, 0x00, - 0x20, 0x40, 0x41, 0x3F, 0x01, 0x00, - 0x7F, 0x08, 0x14, 0x22, 0x41, 0x00, - 0x7F, 0x40, 0x40, 0x40, 0x40, 0x00, - 0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00, - 0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00, - 0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00, - 0x7F, 0x09, 0x09, 0x09, 0x06, 0x00, - 0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00, - 0x7F, 0x09, 0x19, 0x29, 0x46, 0x00, - 0x26, 0x49, 0x49, 0x49, 0x32, 0x00, - 0x03, 0x01, 0x7F, 0x01, 0x03, 0x00, - 0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00, - 0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00, - 0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00, - 0x63, 0x14, 0x08, 0x14, 0x63, 0x00, - 0x03, 0x04, 0x78, 0x04, 0x03, 0x00, - 0x61, 0x59, 0x49, 0x4D, 0x43, 0x00, - 0x00, 0x7F, 0x41, 0x41, 0x41, 0x00, - 0x02, 0x04, 0x08, 0x10, 0x20, 0x00, - 0x00, 0x41, 0x41, 0x41, 0x7F, 0x00, - 0x04, 0x02, 0x01, 0x02, 0x04, 0x00, - 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, - 0x00, 0x03, 0x07, 0x08, 0x00, 0x00, - 0x20, 0x54, 0x54, 0x78, 0x40, 0x00, - 0x7F, 0x28, 0x44, 0x44, 0x38, 0x00, - 0x38, 0x44, 0x44, 0x44, 0x20, 0x00, - 0x38, 0x44, 0x44, 0x28, 0x7F, 0x00, - 0x38, 0x54, 0x54, 0x54, 0x18, 0x00, - 0x00, 0x08, 0x7E, 0x09, 0x02, 0x00, - 0x18, 0xA4, 0xA4, 0x9C, 0x78, 0x00, - 0x7F, 0x08, 0x04, 0x04, 0x78, 0x00, - 0x00, 0x44, 0x7D, 0x40, 0x00, 0x00, - 0x20, 0x40, 0x40, 0x3D, 0x00, 0x00, - 0x7F, 0x10, 0x28, 0x44, 0x00, 0x00, - 0x00, 0x41, 0x7F, 0x40, 0x00, 0x00, - 0x7C, 0x04, 0x78, 0x04, 0x78, 0x00, - 0x7C, 0x08, 0x04, 0x04, 0x78, 0x00, - 0x38, 0x44, 0x44, 0x44, 0x38, 0x00, - 0xFC, 0x18, 0x24, 0x24, 0x18, 0x00, - 0x18, 0x24, 0x24, 0x18, 0xFC, 0x00, - 0x7C, 0x08, 0x04, 0x04, 0x08, 0x00, - 0x48, 0x54, 0x54, 0x54, 0x24, 0x00, - 0x04, 0x04, 0x3F, 0x44, 0x24, 0x00, - 0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00, - 0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00, - 0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00, - 0x44, 0x28, 0x10, 0x28, 0x44, 0x00, - 0x4C, 0x90, 0x90, 0x90, 0x7C, 0x00, - 0x44, 0x64, 0x54, 0x4C, 0x44, 0x00, - 0x00, 0x08, 0x36, 0x41, 0x00, 0x00, - 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, - 0x00, 0x41, 0x36, 0x08, 0x00, 0x00, - 0x02, 0x01, 0x02, 0x04, 0x02, 0x00, - 0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x40, 0x40, 0x40, 0xF0, 0xF8, 0xF8, - 0xFF, 0x38, 0xFF, 0xF8, 0xF8, 0x3F, - 0xF8, 0xF8, 0xFF, 0x38, 0xFF, 0xF8, - 0xF8, 0xF0, 0x40, 0x40, 0x40, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0xC0, 0xC0, 0xC0, 0x80, 0x00, 0x00, - 0xC0, 0xC0, 0x80, 0x00, 0x00, 0x00, - 0x80, 0xC0, 0xC0, 0x00, 0xC0, 0xC0, - 0x00, 0x00, 0x80, 0xC0, 0xC0, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xC0, 0xC0, - 0xC0, 0xC0, 0xC0, 0x00, 0xC0, 0xC0, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xE0, 0xF0, 0xF0, 0xF0, 0xE0, 0xEC, - 0xEE, 0xF7, 0xF3, 0x70, 0x20, 0x00, - 0x7C, 0x7C, 0x7C, 0x7E, 0x00, 0x7E, - 0x7E, 0x7E, 0x7F, 0x7F, 0x7F, 0x00, - 0x00, 0x80, 0xC0, 0xE0, 0x7E, 0x5B, - 0x4F, 0x5B, 0xFE, 0xC0, 0x00, 0x00, - 0xC0, 0x00, 0xDC, 0xD7, 0xDE, 0xDE, - 0xDE, 0xD7, 0xDC, 0x00, 0xC0, 0x00, - 0x00, 0x00, 0x00, 0x04, 0xFA, 0xA1, - 0xFA, 0x04, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x49, 0x49, 0x49, 0xFF, 0xFF, 0xFF, - 0xFF, 0xE0, 0xDF, 0xBF, 0xBF, 0x00, - 0xBF, 0xBF, 0xDF, 0xE0, 0xFF, 0xFF, - 0xFF, 0xFF, 0x49, 0x49, 0x49, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x1F, 0x3F, - 0x60, 0x60, 0xE0, 0xBF, 0x1F, 0x00, - 0x7F, 0x7F, 0x07, 0x1E, 0x38, 0x1E, - 0x07, 0x7F, 0x7F, 0x00, 0x7F, 0x7F, - 0x0E, 0x1F, 0x3B, 0x71, 0x60, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x7F, 0x7F, - 0x0C, 0x0C, 0x0C, 0x00, 0x7E, 0x7E, - 0x00, 0x7F, 0x7E, 0x03, 0x03, 0x00, - 0x7F, 0x7E, 0x03, 0x03, 0x7E, 0x7E, - 0x03, 0x03, 0x7F, 0x7E, 0x00, 0x0F, - 0x3E, 0x70, 0x3C, 0x06, 0x3C, 0x70, - 0x3E, 0x0F, 0x00, 0x32, 0x7B, 0x49, - 0x49, 0x3F, 0x7E, 0x00, 0x7F, 0x7E, - 0x03, 0x03, 0x00, 0x1E, 0x3F, 0x69, - 0x69, 0x6F, 0x26, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x0F, 0x1F, 0x3F, 0x7F, 0x7F, 0x7F, - 0x7F, 0x7F, 0x3F, 0x1E, 0x0C, 0x00, - 0x1F, 0x1F, 0x1F, 0x3F, 0x00, 0x3F, - 0x3F, 0x3F, 0x7F, 0x7F, 0x7F, 0x00, - 0x30, 0x7B, 0x7F, 0x78, 0x30, 0x20, - 0x20, 0x30, 0x78, 0x7F, 0x3B, 0x00, - 0x03, 0x00, 0x0F, 0x7F, 0x0F, 0x0F, - 0x0F, 0x7F, 0x0F, 0x00, 0x03, 0x00, - 0x00, 0x00, 0x00, 0xFC, 0x87, 0x95, - 0xB5, 0x87, 0xFC, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x01, 0x01, 0x01, 0x07, 0x0F, 0x0F, - 0x7F, 0x0F, 0x7F, 0x0F, 0x0F, 0x7E, - 0x0F, 0x0F, 0x7F, 0x0F, 0x7F, 0x0F, - 0x0F, 0x07, 0x01, 0x01, 0x01, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x08, 0x74, 0x42, - 0x74, 0x08, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x10, 0x18, 0x0C, 0x06, - 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x04, 0x04, 0x08, 0x10, - 0x24, 0x24, 0x24, 0x24, 0x00, 0x00, - 0x00, 0x00, 0xE7, 0xA5, 0xFF, 0x24, - 0x24, 0xFF, 0xA5, 0xE7, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; diff --git a/users/cjuniet/readme.md b/users/cjuniet/readme.md deleted file mode 100644 index 16dff446..00000000 --- a/users/cjuniet/readme.md +++ /dev/null @@ -1,14 +0,0 @@ -Copyright 2020 Christophe Juniet - -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 . diff --git a/users/cjuniet/rules.mk b/users/cjuniet/rules.mk deleted file mode 100644 index 0f0859ba..00000000 --- a/users/cjuniet/rules.mk +++ /dev/null @@ -1 +0,0 @@ -SRC += cjuniet.c diff --git a/users/csc027/csc027.c b/users/csc027/csc027.c deleted file mode 100644 index de1bad6f..00000000 --- a/users/csc027/csc027.c +++ /dev/null @@ -1,53 +0,0 @@ -#include "csc027.h" - -// Declare the strings in PROGMEM using the convenience macro -CUSTOM_MACROS(CUSTOM_DEF, CUSTOM_MACRO_STRING, SEMI_DELIM); - -static const char* const custom_macros[] PROGMEM = { - // Declare the pointer to the strings in PROGMEM - CUSTOM_MACROS(CUSTOM_VAR, DROP, COMMA_DELIM) -}; - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch(keycode) { - case LOWER: - if(record->event.pressed) { - layer_on(_LW); - } else { - layer_off(_LW); - } - update_tri_layer(_LW, _RS, _MS); - return false; - case RAISE: - if(record->event.pressed) { - layer_on(_RS); - } else { - layer_off(_RS); - } - update_tri_layer(_LW, _RS, _MS); - return false; - case (MC_first + 1)...(MC_last - 1): - if(record->event.pressed) { - send_string_P( -#if defined(__AVR__) - // The accessor here first reads from the pointer array that is located - // in PROGMEM. The pointer is taken and passed to the send_string_P - // function, which is aware of the difference between RAM and PROGMEM - // pointers. - (char*)pgm_read_word(&custom_macros[keycode - MC_first - 1]) -#else - // For non-AVR MCUs, the PROGMEM macro is defined as nothing. So, the strings are - // declared in RAM instead of flash. The send_string_P function, when compiled for - // non-AVR targets, uses a different definition of pgm_read_byte internally. This - // definition uses RAM pointers instead. This is why the raw pointer is passed for - // non-AVR MCUs. - custom_macros[keycode - MC_first - 1] -#endif - ); - return true; - } - return false; - default: - return true; - } -} diff --git a/users/csc027/csc027.h b/users/csc027/csc027.h deleted file mode 100644 index 96bf7dc0..00000000 --- a/users/csc027/csc027.h +++ /dev/null @@ -1,29 +0,0 @@ -#pragma once - -#include "quantum.h" -#include "defines.h" - -enum custom_keycodes { - // Layer Keycodes - LOWER = SAFE_RANGE, - RAISE, - - - MC_first, - - // Macro Keycodes - CUSTOM_MACROS(CUSTOM_ENUM, DROP, COMMA_DELIM), - - MC_last -}; - -enum custom_layers { - _QW = 0, // Qwerty - _RS, // Raise - _LW, // Lower - _MS, // Mouse - _GT, // Git - _CN, // Convenience - _GW, // Guild Wars 2 - _CS // Counter-Strike: Global Offensive -}; diff --git a/users/csc027/custom_audio.c b/users/csc027/custom_audio.c deleted file mode 100644 index 96e0e660..00000000 --- a/users/csc027/custom_audio.c +++ /dev/null @@ -1,17 +0,0 @@ -#include "csc027.h" -#include "custom_audio.h" - -#if defined(AUDIO_ENABLE) - -float tone_on[][2] = SONG(E__NOTE(_G6)); -float tone_off[][2] = SONG(E__NOTE(_D5)); - -void on_usb_led_off(void) { - PLAY_SONG(tone_off); -} - -void on_usb_led_on(void) { - PLAY_SONG(tone_on); -} - -#endif diff --git a/users/csc027/custom_audio.h b/users/csc027/custom_audio.h deleted file mode 100644 index daea1e65..00000000 --- a/users/csc027/custom_audio.h +++ /dev/null @@ -1,8 +0,0 @@ -#pragma once - -#if defined(AUDIO_ENABLE) - -void on_usb_led_off(void); -void on_usb_led_on(void); - -#endif diff --git a/users/csc027/custom_rgb.c b/users/csc027/custom_rgb.c deleted file mode 100644 index 000483b2..00000000 --- a/users/csc027/custom_rgb.c +++ /dev/null @@ -1,25 +0,0 @@ -#include "csc027.h" -#include "custom_rgb.h" - -#if defined(RGBLIGHT_ENABLE) - -void keyboard_post_init_user(void) { - rgblight_enable_noeeprom(); - rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); - uint16_t user_hue = rgblight_get_hue(); - for (uint16_t i = 0; i < 256; ++i) { - rgblight_sethsv_noeeprom((i + user_hue) % 256, 255, 255); - wait_ms(5); - } - rgblight_sethsv_noeeprom(0, 0, 0); -} - -void on_usb_led_off(void) { - rgblight_sethsv_noeeprom(0, 0, rgblight_get_val() - 85); -} - -void on_usb_led_on(void) { - rgblight_sethsv_noeeprom(0, 0, rgblight_get_val() + 85); -} - -#endif diff --git a/users/csc027/custom_rgb.h b/users/csc027/custom_rgb.h deleted file mode 100644 index 47fdeb7b..00000000 --- a/users/csc027/custom_rgb.h +++ /dev/null @@ -1,9 +0,0 @@ -#pragma once - -#if defined(RGBLIGHT_ENABLE) - -void keyboard_post_init_user(void); -void on_usb_led_off(void); -void on_usb_led_on(void); - -#endif diff --git a/users/csc027/defines.h b/users/csc027/defines.h deleted file mode 100644 index 4f52938f..00000000 --- a/users/csc027/defines.h +++ /dev/null @@ -1,270 +0,0 @@ -#pragma once -#include "csc027.h" - -#define MC_RSFE RSFT_T(KC_ENT) // Right Shift on hold, Enter on tap -#define MC_LSEC LSFT_T(KC_ESC) // Left Shift on hold, Escape on tap - -#define ________________ KC_TRNS - -/* QWERTY Layer - * - * The basic layer of this keymap is a QWERTY layer. - * - * - Modifier keys more closely resemble a standard keyboard's layout. - * - There is a "Nxt L" function that cycles through the QWERTY and - * game layers. This has been implemented by hard coding the jump to the - * next layer in each of the layers using the TO() macro. Currently, the - * "Nxt L" function skips over the momentary layers (i.e., Mouse, Git, - * Lower, Raise, and Convenience layers). - * - There is a "Rst L" function that resets the current layer to the - * QWERTY layer. - * - The "Git" one shot function goes to the macro layer which has Git - * commands implemented. - * - The "Convc" momentary function goes to the Convenience layer which has a - * tenkey. Note: The tenkey will operate using the secondary functions if - * the Number Lock is not enabled (e.g., Left and Right instead of 4 and - * 6). - * - The Right Shift key also doubles as an Enter key if it is tapped rather - * than held. - * - * ,-----------------------------------. ,-----------------------------------. - * | Tab | Q | W | E | R | T | | Y | U | I | O | P |BkSpc| - * |-----------------------------------| |-----------------------------------| - * | Esc | A | S | D | F | G | | H | J | K | L | ; | ' | - * |-----------------------------------| |-----------------------------------| - * |Shift| Z | X | C | V | B | | N | M | , | . | / |Sf/En| - * |-----------------------------------| |-----------------------------------| - * |Cntrl|Super| Alt |Convc|Lower|Space| |Space|Raise| \ | Git |Nxt L|Rst L| - * `-----------------------------------' `-----------------------------------' - */ - -#define _____________________QWERTY_L1_____________________ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T -#define _____________________QWERTY_L2_____________________ KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G -#define _____________________QWERTY_L3_____________________ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B -#define _____________________QWERTY_L4_____________________ KC_LCTL, KC_LGUI, KC_LALT, MO(_CN), LOWER, KC_SPC - -#define _____________________QWERTY_R1_____________________ KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC -#define _____________________QWERTY_R2_____________________ KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT -#define _____________________QWERTY_R3_____________________ KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MC_RSFE -#define _____________________QWERTY_R4_____________________ KC_SPC, RAISE, KC_BSLS, OSL(_GT), TO(_GW), XXXXXXX - -/* Raise Layer - * - * The Raise layer accommodates the Home, End, Page Up, and Page Down keys - * in what would be the Vim arrow keys positions. This is done as opposed - * to using C-D, C-U, 0, $, and ^, because it would require a separate layer. - * - * - The top row has the shifted versions of the number row, rather than the - * numbers themselves. This is a change to have a mnemonic where shifted - * elements are on the Raise layer. This also makes it easy to use some of - * Vim style movement controls (e.g. $, %), but makes it harder for others - * (e.g. ^, (, )). Consider swapping the number row with the shifted number - * row if you do not care about the mnemonic. - * - The Left Brace, Right Brace, Underscore, and Plus keys have been moved - * from the right side to the left side. This will take some getting used - * to, as these keys are normally on the right side of the keyboard. An - * alternative would be to keep the keys on the right hand side just under - * the Parentheses. This would prevent the use of Vim arrow keys however. - * - The F keys have been laid across the bottom in the Raise layer, rather - * than the Lower layer to allow easy access to the Alt-F4 chord for - * Windows. When the F keys were put in the Lower layer, it made it hard - * to use this chord, as the Lower key, the Alt key, and the F4 key were - * all right next to each other. - * - A Delete key has been added in this layer to allow easy access to the - * Control-Alt-Delete login chord for Windows. - * - * ,-----------------------------------. ,-----------------------------------. - * | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | Del | - * |-----------------------------------| |-----------------------------------| - * | | _ | + | { | } | Caps| | Home| PgDn| PgUp| End | | | - * |-----------------------------------| |-----------------------------------| - * | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | | - * |-----------------------------------| |-----------------------------------| - * | | | | | | | | | | | | | | - * `-----------------------------------' `-----------------------------------' - */ - -#define ______________________RAISE_L1_____________________ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC -#define ______________________RAISE_L2_____________________ _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_CAPS -#define ______________________RAISE_L3_____________________ _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5 -#define ______________________RAISE_L4_____________________ _______, _______, _______, _______, _______, _______ - -#define ______________________RAISE_R1_____________________ KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DELT -#define ______________________RAISE_R2_____________________ KC_HOME, KC_PGDN, KC_PGUP, KC_END, XXXXXXX, XXXXXXX -#define ______________________RAISE_R3_____________________ KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______ -#define ______________________RAISE_R4_____________________ _______, _______, _______, _______, XXXXXXX, XXXXXXX - -/* Lower Layer - * - * The lower layout scheme accommodates the Vim style arrow keys. - * - * - The arrow keys are in the normal Vim positions. - * - The Left Square Bracket, Right Square Bracket, Minus, and Equal keys - * have been moved from the right side to the left side. This will take - * some getting used to, as it is on the left rather than the right. - * - A Delete key has been added in this layer to allow easy access to the - * Control-Alt-Delete login chord for Windows. - * - The remaining F keys are in this layer. - * - * ,-----------------------------------. ,-----------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | - * |-----------------------------------| |-----------------------------------| - * | | - | = | [ | ] | | | Left| Down| Up |Right| | | - * |-----------------------------------| |-----------------------------------| - * | | F11 | F12 | | | | | | | | | | | - * |-----------------------------------| |-----------------------------------| - * | | | | | | | | | | | | | | - * `-----------------------------------' `-----------------------------------' - */ - -#define ______________________LOWER_L1_____________________ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5 -#define ______________________LOWER_L2_____________________ _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, XXXXXXX -#define ______________________LOWER_L3_____________________ _______, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX -#define ______________________LOWER_L4_____________________ _______, _______, _______, _______, _______, _______ - -#define ______________________LOWER_R1_____________________ KC_6, KC_7, KC_8, KC_9, KC_0, KC_DELT -#define ______________________LOWER_R2_____________________ KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, XXXXXXX -#define ______________________LOWER_R3_____________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______ -#define ______________________LOWER_R4_____________________ _______, _______, _______, _______, XXXXXXX, XXXXXXX - - -/* MIT Layout (Mouse) - * - * The mouse layer adds keys to use the keyboard like a mouse. - * - * ,-----------------------------------. ,-----------------------------------. - * | | | | | | | | | | | | | | - * |-----------------------------------| |-----------------------------------| - * | | | |Ms-Lc|Ms-Rc| | | Ms-L| Ms-D| Ms-U| Ms-R| | | - * |-----------------------------------| |-----------------------------------| - * | | | | | | | | | | | | | | - * |-----------------------------------| |-----------------------------------| - * | | | | | | | | | | | | | | - * `-----------------------------------' `-----------------------------------' - */ - -#define ______________________MOUSE_L1_____________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX -#define ______________________MOUSE_L2_____________________ _______, XXXXXXX, XXXXXXX, KC_BTN1, KC_BTN2, XXXXXXX -#define ______________________MOUSE_L3_____________________ _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX -#define ______________________MOUSE_L4_____________________ _______, _______, _______, _______, _______, _______ - -#define ______________________MOUSE_R1_____________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX -#define ______________________MOUSE_R2_____________________ KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, XXXXXXX, XXXXXXX -#define ______________________MOUSE_R3_____________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______ -#define ______________________MOUSE_R4_____________________ _______, _______, _______, _______, XXXXXXX, XXXXXXX - -/* MIT Layout (Git) - * - * The macro layer that has common git commands. - * - * ,-----------------------------------. ,-----------------------------------. - * | |Chery| Show|Rebas|Reset| Tag | | | Pull| Init|Rmote| Push| | - * |-----------------------------------| |-----------------------------------| - * | | Add |Sttus| Diff|Fetch| Grep| |Stash| |ChkOt| Log | | | - * |-----------------------------------| |-----------------------------------| - * | | | |Comit| Move|Brnch| | |Merge| | | | | - * |-----------------------------------| |-----------------------------------| - * | | | | | | | | | | | | | | - * `-----------------------------------' `-----------------------------------' - */ - -#define _______________________GIT_L1______________________ XXXXXXX, MC_cherrypick, MC_show, MC_rebase, MC_reset, MC_tag -#define _______________________GIT_L2______________________ _______, MC_add, MC_status, MC_diff, MC_fetch, MC_grep -#define _______________________GIT_L3______________________ _______, XXXXXXX, XXXXXXX, MC_commit, MC_mv, MC_branch -#define _______________________GIT_L4______________________ _______, _______, _______, _______, _______, _______ - -#define _______________________GIT_R1______________________ XXXXXXX, MC_pull, MC_init, MC_remote, MC_push, XXXXXXX -#define _______________________GIT_R2______________________ MC_stash, XXXXXXX, MC_checkout, MC_log, XXXXXXX, XXXXXXX -#define _______________________GIT_R3______________________ XXXXXXX, MC_merge, XXXXXXX, XXXXXXX, XXXXXXX, _______ -#define _______________________GIT_R4______________________ _______, _______, _______, _______, XXXXXXX, XXXXXXX - - -/* MIT Layout (Convenience) - * - * The Convenience layer adds miscellaneous chords to the keyboard. - * - * - The Number Lock key is physically in the same spot as the Caps Lock key - * in the raise layer. - * - There is also a Backspace Key for convenience. - * - There is a convenience macro to type the Control-Alt-Delete login chord for Windows. - * - There is a convenience macro to switch context from the Remote Desktop to the local - * machine in Windows. - * - There are convenience macros to switch between virtual desktops in Windows. - * - There are convenience macros to create and delete virtual desktops in Windows. - * - * ,-----------------------------------. ,-----------------------------------. - * | | |Insrt|ScrLk|PrtSc| | | | | | | |BkSpc| - * |-----------------------------------| |-----------------------------------| - * | | | App | LCAD|MRDCC|NmLck| |MVTDL|MVTDC|MVTDN|MVTDR| | | - * |-----------------------------------| |-----------------------------------| - * | | | | | | | | | | | | | | - * |-----------------------------------| |-----------------------------------| - * | | | | | | | | | | | | | | - * `-----------------------------------' `-----------------------------------' - */ - -#define ___________________CONVENIENCE_L1__________________ XXXXXXX, XXXXXXX, KC_INS, KC_SLCK, KC_PSCR, XXXXXXX -#define ___________________CONVENIENCE_L2__________________ _______, XXXXXXX, KC_APP, MC_lcad, MC_rdcc, KC_NLCK -#define ___________________CONVENIENCE_L3__________________ _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX -#define ___________________CONVENIENCE_L4__________________ _______, _______, _______, _______, _______, _______ - -#define ___________________CONVENIENCE_R1__________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BSPC -#define ___________________CONVENIENCE_R2__________________ MC_vtdl, MC_vtdc, MC_vtdn, MC_vtdr, XXXXXXX, XXXXXXX -#define ___________________CONVENIENCE_R3__________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______ -#define ___________________CONVENIENCE_R4__________________ _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX - -/* Convenience macros - * - * These are accelerator macros for simplifying declaration of PROGMEM strings - */ - -// Declare variable name -#define CUSTOM_VAR(VAR) mc_##VAR - -// Declare PROGMEM string using the variable name -#define CUSTOM_DEF(VAR) const char CUSTOM_VAR(VAR)[] PROGMEM = - -// Declare enum name -#define CUSTOM_ENUM(VAR) MC_##VAR - -#define CUSTOM_MACRO_STRING(X) X - -#define COMMA_DELIM(...) , -#define SEMI_DELIM(...) ; - -#define DROP(...) - -/* Keycode synchronization macros - * - * These macros help synchronize the keycodes between the string declaration, string pointer declaration, and enum order. - */ - - -#define CUSTOM_MACROS(CUSTOM_NAME, CUSTOM_STRING, CUSTOM_DELIM) \ - CUSTOM_NAME(add) CUSTOM_STRING("git add ") CUSTOM_DELIM() \ - CUSTOM_NAME(branch) CUSTOM_STRING("git branch ") CUSTOM_DELIM() \ - CUSTOM_NAME(checkout) CUSTOM_STRING("git checkout ") CUSTOM_DELIM() \ - CUSTOM_NAME(cherrypick) CUSTOM_STRING("git cherry-pick ") CUSTOM_DELIM() \ - CUSTOM_NAME(commit) CUSTOM_STRING("git commit -m \"\""SS_TAP(X_LEFT)) CUSTOM_DELIM() \ - CUSTOM_NAME(diff) CUSTOM_STRING("git diff ") CUSTOM_DELIM() \ - CUSTOM_NAME(fetch) CUSTOM_STRING("git fetch ") CUSTOM_DELIM() \ - CUSTOM_NAME(grep) CUSTOM_STRING("git grep ") CUSTOM_DELIM() \ - CUSTOM_NAME(log) CUSTOM_STRING("git log --decorate --oneline --graph ") CUSTOM_DELIM() \ - CUSTOM_NAME(init) CUSTOM_STRING("git init ") CUSTOM_DELIM() \ - CUSTOM_NAME(mv) CUSTOM_STRING("git mv ") CUSTOM_DELIM() \ - CUSTOM_NAME(merge) CUSTOM_STRING("git merge ") CUSTOM_DELIM() \ - CUSTOM_NAME(push) CUSTOM_STRING("git push ") CUSTOM_DELIM() \ - CUSTOM_NAME(pull) CUSTOM_STRING("git pull ") CUSTOM_DELIM() \ - CUSTOM_NAME(rebase) CUSTOM_STRING("git rebase ") CUSTOM_DELIM() \ - CUSTOM_NAME(remote) CUSTOM_STRING("git remote ") CUSTOM_DELIM() \ - CUSTOM_NAME(reset) CUSTOM_STRING("git reset ") CUSTOM_DELIM() \ - CUSTOM_NAME(show) CUSTOM_STRING("git show ") CUSTOM_DELIM() \ - CUSTOM_NAME(stash) CUSTOM_STRING("git stash ") CUSTOM_DELIM() \ - CUSTOM_NAME(status) CUSTOM_STRING("git status ") CUSTOM_DELIM() \ - CUSTOM_NAME(tag) CUSTOM_STRING("git tag ") CUSTOM_DELIM() \ - CUSTOM_NAME(rdcc) CUSTOM_STRING(SS_LCTL(SS_LALT(SS_TAP(X_HOME)))) CUSTOM_DELIM() \ - CUSTOM_NAME(lcad) CUSTOM_STRING(SS_LCTL(SS_LALT(SS_TAP(X_DELETE)))) CUSTOM_DELIM() \ - CUSTOM_NAME(vtdl) CUSTOM_STRING(SS_LCTL(SS_LGUI(SS_TAP(X_LEFT)))) CUSTOM_DELIM() \ - CUSTOM_NAME(vtdc) CUSTOM_STRING(SS_LCTL(SS_LGUI(SS_TAP(X_F4)))) CUSTOM_DELIM() \ - CUSTOM_NAME(vtdn) CUSTOM_STRING(SS_LCTL(SS_LGUI("d"))) CUSTOM_DELIM() \ - CUSTOM_NAME(vtdr) CUSTOM_STRING(SS_LCTL(SS_LGUI(SS_TAP(X_RIGHT)))) diff --git a/users/csc027/rules.mk b/users/csc027/rules.mk deleted file mode 100644 index 7e5d44e1..00000000 --- a/users/csc027/rules.mk +++ /dev/null @@ -1,11 +0,0 @@ -SRC += csc027.c - -ifeq ($(strip $(RGBLIGHT_ENABLE)), yes) - SRC += custom_rgb.c - SRC += usb_led.c -endif - -ifeq ($(strip $(AUDIO_ENABLE)), yes) - SRC += custom_audio.c - SRC += usb_led.c -endif diff --git a/users/csc027/usb_led.c b/users/csc027/usb_led.c deleted file mode 100644 index 1418e32c..00000000 --- a/users/csc027/usb_led.c +++ /dev/null @@ -1,32 +0,0 @@ -#include "csc027.h" -#include "usb_led.h" -#include "led.h" - -#if defined(RGBLIGHT_ENABLE) -# include "custom_rgb.h" -#elif defined(AUDIO_ENABLE) -# include "custom_audio.h" -#endif - -#if defined(AUDIO_ENABLE) || defined(RGBLIGHT_ENABLE) - -bool led_update_user(led_t usb_led) { - static led_t old_usb_led = { - .num_lock = false, - .caps_lock = false, - .scroll_lock = false - }; - - if(old_usb_led.caps_lock != usb_led.caps_lock) { - usb_led.caps_lock ? on_usb_led_on() : on_usb_led_off(); - } else if(old_usb_led.num_lock != usb_led.num_lock) { - usb_led.num_lock ? on_usb_led_on() : on_usb_led_off(); - } else if(old_usb_led.scroll_lock != usb_led.scroll_lock) { - usb_led.scroll_lock ? on_usb_led_on() : on_usb_led_off(); - } - old_usb_led = usb_led; - - return true; -} - -#endif diff --git a/users/csc027/usb_led.h b/users/csc027/usb_led.h deleted file mode 100644 index 7451b469..00000000 --- a/users/csc027/usb_led.h +++ /dev/null @@ -1,3 +0,0 @@ -#pragma once - -bool led_update_user(led_t usb_led); diff --git a/users/curry/.gitignore b/users/curry/.gitignore deleted file mode 100644 index c6df8c01..00000000 --- a/users/curry/.gitignore +++ /dev/null @@ -1 +0,0 @@ -secrets.c diff --git a/users/curry/LICENSE b/users/curry/LICENSE deleted file mode 100644 index 198ae45b..00000000 --- a/users/curry/LICENSE +++ /dev/null @@ -1,14 +0,0 @@ -Copyright 2020 Akaash Suresh casa.akaash@gmail.com @CurryFurious - -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 . diff --git a/users/curry/README.md b/users/curry/README.md deleted file mode 100644 index 70d6262d..00000000 --- a/users/curry/README.md +++ /dev/null @@ -1,30 +0,0 @@ -# Information - -These is my userspace files, heavily influenced by @drashna's userspace structure. - -# Keyboards - -Main uses are for corne & lily58, supporting dfu bootloader (elite-c) - -## Split Common -Is compatible with split_common when the previous two keyboards update to them. - -If you want to use these keymaps with split common code, they are on my personal github fork: [CurryFurious/qmk_firmware](https://github.com/CurryFurious/qmk_firmware) - -Referenced PRs: #6260, #5998, #6001 - -## Keymaps -Keymap layout is similar between the two keyboards. Lily58 has a lot of open keys for custom keys as well. Keymap formatting is set up in the physical layout of the keyboard, so mapping keys should be easier. - -## Tap Dances - -Tap dances are enabled but none are defined, you can add them to [tapdances.c](tapdances.c). If not using tapdances, you can disable them in the keymaps. - -## RGB -RGB is implemented pretty much the same as @drashna. Only change is that I added the RGB code from the drashna's corne [keymap.c](../../keyboards/crkbd/keymaps/drashna/keymap.c), lines 313-383 into rgb_stuff.c. - -## OLED -Similarly to RGB, I moved all OLED code into [oled.c](oled.c) to better clear up the keymap.c file. I haven't experimented with the kyria's 128x64 pixel screen so it probably won't work as well with it yet. - -## Wrappers -Have implemented QWERTY, COLEMAK Mod DH, and DVORAK. Other macros are defined, some modified from drashna's. Drashna's [wrappers.h](../drashna/wrappers.h) has other layouts that you can copy in as you see fit, make sure to add them to the userspace_layers enum in [curry.h](curry.h) diff --git a/users/curry/config.h b/users/curry/config.h deleted file mode 100644 index b982dab0..00000000 --- a/users/curry/config.h +++ /dev/null @@ -1,111 +0,0 @@ -#pragma once - -// Use custom magic number so that when switching branches, EEPROM always gets reset -#define EECONFIG_MAGIC_NUMBER (uint16_t)0x420 - -/* Set Polling rate to 1000Hz */ -#define USB_POLLING_INTERVAL_MS 1 - -#if defined(RGBLIGHT_ENABLE) -# undef RGBLIGHT_ANIMATIONS -# define RGBLIGHT_SLEEP -# define RGBLIGHT_EFFECT_BREATHING -# define RGBLIGHT_EFFECT_SNAKE -# define RGBLIGHT_EFFECT_KNIGHT -#endif // RGBLIGHT_ENABLE - -#if defined(RGB_MATRIX_ENABLE) -# define RGB_MATRIX_KEYPRESSES -# define RGB_MATRIX_FRAMEBUFFER_EFFECTS -# define RGB_DISABLE_WHEN_USB_SUSPENDED true - -# define DISABLE_RGB_MATRIX_ALPHAS_MODS -# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -# define DISABLE_RGB_MATRIX_BREATHING -# define DISABLE_RGB_MATRIX_BAND_SAT -# define DISABLE_RGB_MATRIX_BAND_VAL -# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL -# define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT -# define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL -# define DISABLE_RGB_MATRIX_CYCLE_ALL -# define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT -# define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN -# define DISABLE_RGB_MATRIX_CYCLE_OUT_IN -// # define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL -# define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON -# define DISABLE_RGB_MATRIX_DUAL_BEACON -# define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL -# define DISABLE_RGB_MATRIX_CYCLE_SPIRAL -# define DISABLE_RGB_MATRIX_RAINBOW_BEACON -# define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS -# define DISABLE_RGB_MATRIX_RAINDROPS -# define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS -// # define DISABLE_RGB_MATRIX_TYPING_HEATMAP -# define DISABLE_RGB_MATRIX_DIGITAL_RAIN -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -# define DISABLE_RGB_MATRIX_SPLASH -# define DISABLE_RGB_MATRIX_MULTISPLASH -# define DISABLE_RGB_MATRIX_SOLID_SPLASH -# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH -#endif // RGB_MATRIX_ENABLE - -#if !defined(ONESHOT_TAP_TOGGLE) -# define ONESHOT_TAP_TOGGLE 2 -#endif // !ONESHOT_TAP_TOGGLE - -#if !defined(ONESHOT_TIMEOUT) -# define ONESHOT_TIMEOUT 3000 -#endif // !ONESHOT_TIMEOUT - -#if !defined(QMK_KEYS_PER_SCAN) -# define QMK_KEYS_PER_SCAN 4 -#endif // !QMK_KEYS_PER_SCAN - -#define IGNORE_MOD_TAP_INTERRUPT -#undef PERMISSIVE_HOLD - -#define FORCE_NKRO - -#if !defined(TAPPING_TOGGLE) -# define TAPPING_TOGGLE 1 -#endif - -#if defined(TAPPING_TERM) -# undef TAPPING_TERM -#endif // TAPPING_TERM - -#if defined(KEYBOARD_ergodox_ez) -# define TAPPING_TERM 185 -#elif defined(KEYBOARD_crkbd) -# define TAPPING_TERM 200 -#else -# define TAPPING_TERM 175 -#endif - -#define TAP_CODE_DELAY 5 - -#define LEADER_TIMEOUT 250 -#define LEADER_PER_KEY_TIMING - -/* Disable unused and unneeded features to reduce on firmware size */ -#if defined(LOCKING_SUPPORT_ENABLE) -# undef LOCKING_SUPPORT_ENABLE -#endif - -#if defined(LOCKING_RESYNC_ENABLE) -# undef LOCKING_RESYNC_ENABLE -#endif - -#if defined(OLED_FONT_H) -# undef OLED_FONT_H -#endif - -#define OLED_FONT_H "users/curry/glcdfont.c" diff --git a/users/curry/curry.c b/users/curry/curry.c deleted file mode 100644 index 03535535..00000000 --- a/users/curry/curry.c +++ /dev/null @@ -1,130 +0,0 @@ -#include "curry.h" - -userspace_config_t userspace_config; - -#define CURRY_UNICODE_MODE 1 - -void bootmagic_lite(void) { - matrix_scan(); -#if defined(DEBOUNCING_DELAY) && DEBOUNCING_DELAY > 0 - wait_ms(DEBOUNCING_DELAY * 2); -#elif defined(DEBOUNCE) && DEBOUNCE > 0 - wait_ms(DEBOUNCE * 2); -#else - wait_ms(30); -#endif - matrix_scan(); - if (matrix_get_row(BOOTMAGIC_LITE_ROW) & (1 << BOOTMAGIC_LITE_COLUMN)) { - bootloader_jump(); - } -} - -__attribute__((weak)) void keyboard_pre_init_keymap(void) {} - -void keyboard_pre_init_user(void) { - userspace_config.raw = eeconfig_read_user(); - keyboard_pre_init_keymap(); -} - -__attribute__((weak)) void matrix_init_keymap(void) {} - -// Call user matrix init, set default RGB colors and then -// call the keymap's init function -void matrix_init_user(void) { -#if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE)) - set_unicode_input_mode(CURRY_UNICODE_MODE); - get_unicode_input_mode(); -#endif // UNICODE_ENABLE - matrix_init_keymap(); -} - -__attribute__((weak)) void keyboard_post_init_keymap(void) {} - -void keyboard_post_init_user(void) { -#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) - keyboard_post_init_rgb(); -#endif - keyboard_post_init_keymap(); -} - -__attribute__((weak)) void shutdown_keymap(void) {} - -void rgb_matrix_update_pwm_buffers(void); - -// On RESET, set all RGB to red, shutdown the keymap. -void shutdown_user(void) { -#if defined(RGBLIGHT_ENABLE) - rgblight_enable_noeeprom(); - rgblight_mode_noeeprom(1); - rgblight_setrgb_red(); -#endif - -#if defined(RGB_MATRIX_ENABLE) - rgb_matrix_set_color_all(0xFF, 0x00, 0x00); - rgb_matrix_update_pwm_buffers(); -#endif - shutdown_keymap(); -} - -__attribute__((weak)) void suspend_power_down_keymap(void) {} - -void suspend_power_down_user(void) { suspend_power_down_keymap(); } - -__attribute__((weak)) void suspend_wakeup_init_keymap(void) {} - -void suspend_wakeup_init_user(void) { suspend_wakeup_init_keymap(); } - -__attribute__((weak)) void matrix_scan_keymap(void) {} - -// No global matrix scan code, so just run keymap's matrix -// scan function -__attribute__((weak)) void matrix_scan_user(void) { - static bool has_ran_yet; - if (!has_ran_yet) { - has_ran_yet = true; - startup_user(); - } - -#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) - matrix_scan_rgb(); -#endif // RGBLIGHT_ENABLE - - matrix_scan_keymap(); -} - -__attribute__((weak)) layer_state_t layer_state_set_keymap(layer_state_t state) { return state; } - -// On Layer change, run keymap's layer change check -layer_state_t layer_state_set_user(layer_state_t state) { - state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST); -#if defined(RGBLIGHT_ENABLE) - state = layer_state_set_rgb(state); -#endif - return layer_state_set_keymap(state); -} - -__attribute__((weak)) layer_state_t default_layer_state_set_keymap(layer_state_t state) { return state; } - -// Runs state check and changes underglow color and animation -layer_state_t default_layer_state_set_user(layer_state_t state) { return default_layer_state_set_keymap(state); } - -__attribute__((weak)) void led_set_keymap(uint8_t usb_led) {} - -// Any custom LED code goes here. -void led_set_user(uint8_t usb_led) { led_set_keymap(usb_led); } - -__attribute__((weak)) void eeconfig_init_keymap(void) {} - -void eeconfig_init_user(void) { - userspace_config.raw = 0; - userspace_config.rgb_layer_change = true; - eeconfig_update_user(userspace_config.raw); -#if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE)) - set_unicode_input_mode(CURRY_UNICODE_MODE); - get_unicode_input_mode(); -#else - eeprom_update_byte(EECONFIG_UNICODEMODE, CURRY_UNICODE_MODE); -#endif - eeconfig_init_keymap(); - keyboard_init(); -} diff --git a/users/curry/curry.h b/users/curry/curry.h deleted file mode 100644 index ee4a7368..00000000 --- a/users/curry/curry.h +++ /dev/null @@ -1,59 +0,0 @@ -#pragma once - -#include QMK_KEYBOARD_H -#include "version.h" -#include "eeprom.h" -#include "wrappers.h" -#include "process_records.h" - -#if defined(TAP_DANCE_ENABLE) -# include "tap_dances.h" -#endif // TAP_DANCE_ENABLE - -#if defined(RGB_MATRIX_ENABLE) -# include "rgb_matrix_user.h" -#endif - -#if defined(RGBLIGHT_ENABLE) -# include "rgb_lighting_user.h" -#endif - -#if defined(KEYBOARD_lily58_rev1) & defined(PROTOCOL_LUFA) -# include "lufa.h" -# include "split_util.h" -#endif - -/* Define layer names */ -enum userspace_layers { - _QWERTY = 0, - _COLEMAK, - _DVORAK, - _WORKMAN, - _MODS, - _LOWER, - _RAISE, - _ADJUST, -}; - -void matrix_init_keymap(void); -void shutdown_keymap(void); -void suspend_power_down_keymap(void); -void suspend_wakeup_init_keymap(void); -void matrix_scan_keymap(void); -layer_state_t layer_state_set_keymap(layer_state_t state); -layer_state_t default_layer_state_set_keymap(layer_state_t state); -void led_set_keymap(uint8_t usb_led); -void eeconfig_init_keymap(void); - -// clang-format off -typedef union { - uint32_t raw; - struct { - bool rgb_layer_change :1; - bool nuke_switch :1; - bool rgb_matrix_idle_anim :1; - }; -} userspace_config_t; -// clang-format on - -extern userspace_config_t userspace_config; diff --git a/users/curry/glcdfont.c b/users/curry/glcdfont.c deleted file mode 100644 index 10ce3b34..00000000 --- a/users/curry/glcdfont.c +++ /dev/null @@ -1,232 +0,0 @@ -#include "progmem.h" - -// Corne 8x6 font with QMK Firmware Logo -// Online editor: https://helixfonteditor.netlify.com/ - -// clang-format off -const unsigned char font[] PROGMEM = { -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00, -0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00, -0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00, -0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00, -0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00, -0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00, -0x00, 0x18, 0x3C, 0x18, 0x00, 0x00, -0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00, -0x00, 0x18, 0x24, 0x18, 0x00, 0x00, -0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00, -0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00, -0x26, 0x29, 0x79, 0x29, 0x26, 0x00, -0x40, 0x7F, 0x05, 0x05, 0x07, 0x00, -0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00, -0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00, -0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00, -0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00, -0x14, 0x22, 0x7F, 0x22, 0x14, 0x00, -0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00, -0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00, -0x00, 0x66, 0x89, 0x95, 0x6A, 0x00, -0x60, 0x60, 0x60, 0x60, 0x60, 0x00, -0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00, -0x08, 0x04, 0x7E, 0x04, 0x08, 0x00, -0x10, 0x20, 0x7E, 0x20, 0x10, 0x00, -0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00, -0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00, -0x1E, 0x10, 0x10, 0x10, 0x10, 0x00, -0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00, -0x30, 0x38, 0x3E, 0x38, 0x30, 0x00, -0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x5F, 0x00, 0x00, 0x00, -0x00, 0x07, 0x00, 0x07, 0x00, 0x00, -0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00, -0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00, -0x23, 0x13, 0x08, 0x64, 0x62, 0x00, -0x36, 0x49, 0x56, 0x20, 0x50, 0x00, -0x00, 0x08, 0x07, 0x03, 0x00, 0x00, -0x00, 0x1C, 0x22, 0x41, 0x00, 0x00, -0x00, 0x41, 0x22, 0x1C, 0x00, 0x00, -0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00, -0x08, 0x08, 0x3E, 0x08, 0x08, 0x00, -0x00, 0x80, 0x70, 0x30, 0x00, 0x00, -0x08, 0x08, 0x08, 0x08, 0x08, 0x00, -0x00, 0x00, 0x60, 0x60, 0x00, 0x00, -0x20, 0x10, 0x08, 0x04, 0x02, 0x00, -0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00, -0x00, 0x42, 0x7F, 0x40, 0x00, 0x00, -0x72, 0x49, 0x49, 0x49, 0x46, 0x00, -0x21, 0x41, 0x49, 0x4D, 0x33, 0x00, -0x18, 0x14, 0x12, 0x7F, 0x10, 0x00, -0x27, 0x45, 0x45, 0x45, 0x39, 0x00, -0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00, -0x41, 0x21, 0x11, 0x09, 0x07, 0x00, -0x36, 0x49, 0x49, 0x49, 0x36, 0x00, -0x46, 0x49, 0x49, 0x29, 0x1E, 0x00, -0x00, 0x00, 0x14, 0x00, 0x00, 0x00, -0x00, 0x40, 0x34, 0x00, 0x00, 0x00, -0x00, 0x08, 0x14, 0x22, 0x41, 0x00, -0x14, 0x14, 0x14, 0x14, 0x14, 0x00, -0x00, 0x41, 0x22, 0x14, 0x08, 0x00, -0x02, 0x01, 0x59, 0x09, 0x06, 0x00, -0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00, -0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00, -0x7F, 0x49, 0x49, 0x49, 0x36, 0x00, -0x3E, 0x41, 0x41, 0x41, 0x22, 0x00, -0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00, -0x7F, 0x49, 0x49, 0x49, 0x41, 0x00, -0x7F, 0x09, 0x09, 0x09, 0x01, 0x00, -0x3E, 0x41, 0x41, 0x51, 0x73, 0x00, -0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00, -0x00, 0x41, 0x7F, 0x41, 0x00, 0x00, -0x20, 0x40, 0x41, 0x3F, 0x01, 0x00, -0x7F, 0x08, 0x14, 0x22, 0x41, 0x00, -0x7F, 0x40, 0x40, 0x40, 0x40, 0x00, -0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00, -0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00, -0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00, -0x7F, 0x09, 0x09, 0x09, 0x06, 0x00, -0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00, -0x7F, 0x09, 0x19, 0x29, 0x46, 0x00, -0x26, 0x49, 0x49, 0x49, 0x32, 0x00, -0x03, 0x01, 0x7F, 0x01, 0x03, 0x00, -0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00, -0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00, -0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00, -0x63, 0x14, 0x08, 0x14, 0x63, 0x00, -0x03, 0x04, 0x78, 0x04, 0x03, 0x00, -0x61, 0x59, 0x49, 0x4D, 0x43, 0x00, -0x00, 0x7F, 0x41, 0x41, 0x41, 0x00, -0x02, 0x04, 0x08, 0x10, 0x20, 0x00, -0x00, 0x41, 0x41, 0x41, 0x7F, 0x00, -0x04, 0x02, 0x01, 0x02, 0x04, 0x00, -0x40, 0x40, 0x40, 0x40, 0x40, 0x00, -0x00, 0x03, 0x07, 0x08, 0x00, 0x00, -0x20, 0x54, 0x54, 0x78, 0x40, 0x00, -0x7F, 0x28, 0x44, 0x44, 0x38, 0x00, -0x38, 0x44, 0x44, 0x44, 0x28, 0x00, -0x38, 0x44, 0x44, 0x28, 0x7F, 0x00, -0x38, 0x54, 0x54, 0x54, 0x18, 0x00, -0x00, 0x08, 0x7E, 0x09, 0x02, 0x00, -0x18, 0x24, 0x24, 0x1C, 0x78, 0x00, -0x7F, 0x08, 0x04, 0x04, 0x78, 0x00, -0x00, 0x44, 0x7D, 0x40, 0x00, 0x00, -0x20, 0x40, 0x40, 0x3D, 0x00, 0x00, -0x7F, 0x10, 0x28, 0x44, 0x00, 0x00, -0x00, 0x41, 0x7F, 0x40, 0x00, 0x00, -0x7C, 0x04, 0x78, 0x04, 0x78, 0x00, -0x7C, 0x08, 0x04, 0x04, 0x78, 0x00, -0x38, 0x44, 0x44, 0x44, 0x38, 0x00, -0x7C, 0x18, 0x24, 0x24, 0x18, 0x00, -0x18, 0x24, 0x24, 0x18, 0x7C, 0x00, -0x7C, 0x08, 0x04, 0x04, 0x08, 0x00, -0x48, 0x54, 0x54, 0x54, 0x24, 0x00, -0x04, 0x04, 0x3F, 0x44, 0x24, 0x00, -0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00, -0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00, -0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00, -0x44, 0x28, 0x10, 0x28, 0x44, 0x00, -0x4C, 0x90, 0x90, 0x90, 0x7C, 0x00, -0x44, 0x64, 0x54, 0x4C, 0x44, 0x00, -0x00, 0x08, 0x36, 0x41, 0x00, 0x00, -0x00, 0x00, 0x77, 0x00, 0x00, 0x00, -0x00, 0x41, 0x36, 0x08, 0x00, 0x00, -0x02, 0x01, 0x02, 0x04, 0x02, 0x00, -0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0xC0, 0xE0, -0xF0, 0xF8, 0xF8, 0x18, 0x00, 0xC0, -0xF0, 0xFC, 0xFE, 0xFF, 0xFF, 0xFF, -0xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x80, 0xC0, 0xE0, 0xE0, -0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, -0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, -0x80, 0xC0, 0xE0, 0xE0, 0xE0, 0xE0, -0xE0, 0xE0, 0xE0, 0xE0, 0xC0, 0x80, -0x00, 0x00, 0x00, 0xE0, 0xE0, 0xC0, -0xC0, 0xE0, 0xE0, 0xE0, 0xE0, 0x00, -0x00, 0xE0, 0xE0, 0xC0, 0xC0, 0xE0, -0xE0, 0xE0, 0xE0, 0xE0, 0xC0, 0x80, -0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, -0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, -0xE0, 0xE0, 0xC0, 0x80, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0xE0, 0xF0, 0xF0, 0xF0, 0xE0, 0xEC, -0xEE, 0xF7, 0xF3, 0x70, 0x20, 0x00, -0x7C, 0x7C, 0x7C, 0x7E, 0x00, 0x7E, -0x7E, 0x7E, 0x7F, 0x7F, 0x7F, 0x00, -0x00, 0x80, 0xC0, 0xE0, 0x7E, 0x5B, -0x4F, 0x5B, 0xFE, 0xC0, 0x00, 0x00, -0xC0, 0x00, 0xDC, 0xD7, 0xDE, 0xDE, -0xDE, 0xD7, 0xDC, 0x00, 0xC0, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0xF8, 0xFC, 0xFE, -0xFF, 0xE0, 0x00, 0xFF, 0xFF, 0xFF, -0xFF, 0xFF, 0xFF, 0x80, 0xFF, 0xFF, -0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, -0xFF, 0x1F, 0x07, 0x01, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0xFF, 0xFF, 0xFF, 0x81, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x81, -0xC3, 0xC3, 0xC3, 0x00, 0x00, 0xFF, -0xFF, 0xFF, 0x81, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x81, 0xFF, 0xFF, -0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, -0x01, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0xFF, 0xFF, 0xFF, 0x01, 0x00, -0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, -0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, -0x9D, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, -0x1C, 0x9D, 0xDF, 0xDF, 0xDF, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x0F, 0x1F, 0x3F, 0x7F, 0x7F, 0x7F, -0x7F, 0x7F, 0x3F, 0x1E, 0x0C, 0x00, -0x1F, 0x1F, 0x1F, 0x3F, 0x00, 0x3F, -0x3F, 0x3F, 0x7F, 0x7F, 0x7F, 0x00, -0x30, 0x7B, 0x7F, 0x78, 0x30, 0x20, -0x20, 0x30, 0x78, 0x7F, 0x3B, 0x00, -0x03, 0x00, 0x0F, 0x7F, 0x0F, 0x0F, -0x0F, 0x7F, 0x0F, 0x00, 0x03, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x03, 0x0F, 0x1F, -0x3F, 0x3F, 0x3F, 0x3F, 0x1F, 0x1F, -0x3F, 0x3F, 0x7F, 0x7F, 0x7F, 0x3F, -0x3F, 0x1F, 0x3F, 0x7F, 0x7F, 0x7F, -0x7F, 0x7C, 0x78, 0x78, 0x38, 0x1C, -0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x01, 0x03, 0x07, 0x07, -0x07, 0x07, 0x07, 0x07, 0x07, 0x07, -0x03, 0x01, 0x00, 0x00, 0x00, 0x00, -0x01, 0x03, 0x07, 0x07, 0x07, 0x07, -0x07, 0x07, 0x07, 0x07, 0x03, 0x01, -0x00, 0x00, 0x00, 0x07, 0x07, 0x07, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x07, 0x07, 0x07, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x07, 0x07, -0x07, 0x00, 0x00, 0x00, 0x01, 0x03, -0x07, 0x07, 0x07, 0x07, 0x07, 0x07, -0x07, 0x07, 0x03, 0x01, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; diff --git a/users/curry/leader.c b/users/curry/leader.c deleted file mode 100644 index 3fca6a2e..00000000 --- a/users/curry/leader.c +++ /dev/null @@ -1,24 +0,0 @@ -#include "curry.h" -#include "leader.h" - -LEADER_EXTERNS(); - -void matrix_scan_user(void) { - static bool has_ran_yet; - if (!has_ran_yet) { - has_ran_yet = true; - startup_user(); - } - -#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) - matrix_scan_rgb(); -#endif // RGBLIGHT_ENABLE - LEADER_DICTIONARY() { - leading = false; - leader_end(); - SEQ_ONE_KEY(KC_F) { SEND_STRING(SS_LCTL("akf")); } // Select all and format - SEQ_ONE_KEY(KC_P) { SEND_STRING(SS_LCTL(SS_LSFT("4"))); } // Screenshot region - SEQ_TWO_KEYS(KC_D, KC_D) { SEND_STRING(SS_LCTL("ac")); } // Copy all - } - matrix_scan_keymap(); -} diff --git a/users/curry/leader.h b/users/curry/leader.h deleted file mode 100644 index f215893b..00000000 --- a/users/curry/leader.h +++ /dev/null @@ -1,3 +0,0 @@ -#pragma once - -void matrix_scan_user(void); diff --git a/users/curry/oled.c b/users/curry/oled.c deleted file mode 100644 index fc87a46e..00000000 --- a/users/curry/oled.c +++ /dev/null @@ -1,163 +0,0 @@ -#include "curry.h" - -#define KEYLOGGER_LENGTH 5 -static uint32_t oled_timer = 0; -static char keylog_str[KEYLOGGER_LENGTH + 1] = {"\n"}; -static uint16_t log_timer = 0; -// clang-format off -static const char PROGMEM code_to_name[0xFF] = { -// 0 1 2 3 4 5 6 7 8 9 A B c D E F - ' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', // 0x - 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '1', '2', // 1x - '3', '4', '5', '6', '7', '8', '9', '0', 20, 19, 27, 26, 22, '-', '=', '[', // 2x - ']','\\', '#', ';','\'', '`', ',', '.', '/', 128, ' ', ' ', ' ', ' ', ' ', ' ', // 3x - ' ', ' ', ' ', ' ', ' ', ' ', 'P', 'S', ' ', ' ', ' ', ' ', 16, ' ', ' ', ' ', // 4x - ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 5x - ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 6x - ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 7x - ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 8x - ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 9x - ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Ax - ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Bx - ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Cx - ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Dx - 'C', 'S', 'A', 'C', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Ex - ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' // Fx -}; - -// clang-format on -void add_keylog(uint16_t keycode); - -oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; } - -void add_keylog(uint16_t keycode) { - if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX) || (keycode >= QK_MODS && keycode <= QK_MODS_MAX)) { - keycode = keycode & 0xFF; - } else if (keycode > 0xFF) { - keycode = 0; - } - - for (uint8_t i = (KEYLOGGER_LENGTH - 1); i > 0; --i) { - keylog_str[i] = keylog_str[i - 1]; - } - - if (keycode < (sizeof(code_to_name) / sizeof(char))) { - keylog_str[0] = pgm_read_byte(&code_to_name[keycode]); - } - - log_timer = timer_read(); -} - -void render_keylogger_status(void) { - oled_write_P(PSTR("Keys:"), false); - oled_write(keylog_str, false); -} - -void render_default_layer_state(void) { - oled_write_P(PSTR("Lyout"), false); - switch (get_highest_layer(default_layer_state)) { - case _QWERTY: - oled_write_P(PSTR(" QRTY"), false); - break; - case _COLEMAK: - oled_write_P(PSTR(" COLE"), false); - break; - case _DVORAK: - oled_write_P(PSTR(" DVRK"), false); - break; - case _WORKMAN: - oled_write_P(PSTR(" WRKM"), false); - break; - } -} - -void render_layer_state(void) { - oled_write_P(PSTR("LAYER"), false); - oled_write_P(PSTR("Lower"), layer_state_is(_LOWER)); - oled_write_P(PSTR("Raise"), layer_state_is(_RAISE)); - oled_write_P(PSTR(" Mods"), layer_state_is(_MODS)); -} - -void render_keylock_status(uint8_t led_usb_state) { - oled_write_P(PSTR("Lock:"), false); - oled_write_P(PSTR(" "), false); - oled_write_P(PSTR("N"), led_usb_state & (1 << USB_LED_NUM_LOCK)); - oled_write_P(PSTR("C"), led_usb_state & (1 << USB_LED_CAPS_LOCK)); - oled_write_ln_P(PSTR("S"), led_usb_state & (1 << USB_LED_SCROLL_LOCK)); -} - -void render_mod_status(uint8_t modifiers) { - oled_write_P(PSTR("Mods:"), false); - oled_write_P(PSTR(" "), false); - oled_write_P(PSTR("S"), (modifiers & MOD_MASK_SHIFT)); - oled_write_P(PSTR("C"), (modifiers & MOD_MASK_CTRL)); - oled_write_P(PSTR("A"), (modifiers & MOD_MASK_ALT)); - oled_write_P(PSTR("G"), (modifiers & MOD_MASK_GUI)); -} - -void render_bootmagic_status(void) { - /* Show Ctrl-Gui Swap options */ - static const char PROGMEM logo[][2][3] = { - {{0x97, 0x98, 0}, {0xb7, 0xb8, 0}}, - {{0x95, 0x96, 0}, {0xb5, 0xb6, 0}}, - }; - oled_write_P(PSTR("BTMGK"), false); - oled_write_P(PSTR(" "), false); - oled_write_P(logo[0][0], !keymap_config.swap_lctl_lgui); - oled_write_P(logo[1][0], keymap_config.swap_lctl_lgui); - oled_write_P(PSTR(" "), false); - oled_write_P(logo[0][1], !keymap_config.swap_lctl_lgui); - oled_write_P(logo[1][1], keymap_config.swap_lctl_lgui); - oled_write_P(PSTR(" NKRO"), keymap_config.nkro); -} - -void render_user_status(void) { - oled_write_P(PSTR("USER:"), false); - oled_write_P(PSTR(" Anim"), userspace_config.rgb_matrix_idle_anim); - oled_write_P(PSTR(" Layr"), userspace_config.rgb_layer_change); - oled_write_P(PSTR(" Nuke"), userspace_config.nuke_switch); -} - -void render_status_main(void) { - /* Show Keyboard Layout */ - render_default_layer_state(); - render_keylock_status(host_keyboard_leds()); - render_bootmagic_status(); - render_user_status(); - - render_keylogger_status(); -} - -void render_status_secondary(void) { - /* Show Keyboard Layout */ - render_default_layer_state(); - render_layer_state(); - render_mod_status(get_mods() | get_oneshot_mods()); - - render_keylogger_status(); -} - -void oled_task_user(void) { - if (timer_elapsed32(oled_timer) > 30000) { - oled_off(); - return; - } -#if !defined(SPLIT_KEYBOARD) - else { - oled_on(); - } -#endif - if (is_keyboard_master()) { - render_status_main(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) - } else { - render_status_secondary(); - } -} - -bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { - if (record->event.pressed) { - oled_timer = timer_read32(); - add_keylog(keycode); - } - return true; -} diff --git a/users/curry/process_records.c b/users/curry/process_records.c deleted file mode 100644 index fd58ea18..00000000 --- a/users/curry/process_records.c +++ /dev/null @@ -1,76 +0,0 @@ -#include "curry.h" - -uint16_t copy_paste_timer; - -__attribute__((weak)) bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { return true; } - -__attribute__((weak)) bool process_record_secrets(uint16_t keycode, keyrecord_t *record) { return true; } - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - xprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed); - switch (keycode) { - case KC_QWERTY ... KC_WORKMAN: - if (record->event.pressed) { - set_single_persistent_default_layer(keycode - KC_QWERTY); - } - break; - case KC_MAKE: - if (!record->event.pressed) { - uint8_t temp_mod = mod_config(get_mods()); - uint8_t temp_osm = mod_config(get_oneshot_mods()); - clear_mods(); - clear_oneshot_mods(); - send_string_with_delay_P(PSTR("make " QMK_KEYBOARD ":" QMK_KEYMAP), TAP_CODE_DELAY); - if ((temp_mod | temp_osm) & MOD_MASK_SHIFT) { - send_string_with_delay_P(PSTR(":flash"), TAP_CODE_DELAY); - } - send_string_with_delay_P(PSTR(" -j8 --output-sync\n"), TAP_CODE_DELAY); - } - break; - - case VRSN: // Prints firmware version - if (record->event.pressed) { - send_string_with_delay_P(PSTR(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION ", Built on: " QMK_BUILDDATE), TAP_CODE_DELAY); - } - break; - - case KC_CCCV: // One key copy/paste - if (record->event.pressed) { - copy_paste_timer = timer_read(); - } else { - if (timer_elapsed(copy_paste_timer) > TAPPING_TERM) { // Hold, copy - tap_code16(LCTL(KC_C)); - } else { // Tap, paste - tap_code16(LCTL(KC_V)); - } - } - break; -#if defined(UNICODE_ENABLE) - case UC_FLIP: // (ノಠ痊ಠ)ノ彡┻━┻ - if (record->event.pressed) { - send_unicode_hex_string("0028 30CE 0CA0 75CA 0CA0 0029 30CE 5F61 253B 2501 253B"); - } - break; - case UC_TABL: // ┬─┬ノ( º _ ºノ) - if (record->event.pressed) { - send_unicode_hex_string("252C 2500 252C 30CE 0028 0020 00BA 0020 005F 0020 00BA 30CE 0029"); - } - break; - case UC_SHRG: // ¯\_(ツ)_/¯ - if (record->event.pressed) { - send_unicode_hex_string("00AF 005C 005F 0028 30C4 0029 005F 002F 00AF"); - } - break; - case UC_DISA: // ಠ_ಠ - if (record->event.pressed) { - send_unicode_hex_string("0CA0 005F 0CA0"); - } - break; -#endif - } - return process_record_keymap(keycode, record) && -#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) - process_record_user_rgb(keycode, record) && -#endif // RGBLIGHT_ENABLE - process_record_secrets(keycode, record); -} diff --git a/users/curry/process_records.h b/users/curry/process_records.h deleted file mode 100644 index 0aa87364..00000000 --- a/users/curry/process_records.h +++ /dev/null @@ -1,86 +0,0 @@ -#pragma once - -enum userspace_custom_keycodes { - VRSN = SAFE_RANGE, // Prints QMK Firmware and board info - KC_QWERTY, // Sets default layer to QWERTY - KC_COLEMAK, // Sets default layer to COLEMAK - KC_DVORAK, // Sets default layer to DVORAK - KC_WORKMAN, // Sets default layer to WORKMAN - KC_MAKE, // Run keyboard's customized make command - KC_RGB_T, // Toggles RGB Layer Indication mode - RGB_IDL, // RGB Idling animations - KC_SECRET_1, // test1 - KC_SECRET_2, // test2 - KC_SECRET_3, // test3 - KC_SECRET_4, // test4 - KC_SECRET_5, // test5 - KC_CCCV, // Hold to copy, tap to paste - UC_FLIP, // (ಠ痊ಠ)┻━┻ - UC_TABL, // ┬─┬ノ( º _ ºノ) - UC_SHRG, // ¯\_(ツ)_/¯ - UC_DISA, // ಠ_ಠ - KC_DT1, - KC_DT2, - KC_DT3, - KC_DT4, - NEW_SAFE_RANGE // use "NEWPLACEHOLDER for keymap specific codes -}; - -bool process_record_secrets(uint16_t keycode, keyrecord_t *record); -bool process_record_keymap(uint16_t keycode, keyrecord_t *record); - -#define LOWER MO(_LOWER) -#define RAISE MO(_RAISE) -#define ADJUST MO(_ADJUST) -#define TG_MODS TG(_MODS) -#define OS_LWR OSL(_LOWER) -#define OS_RSE OSL(_RAISE) - -#define KC_SEC1 KC_SECRET_1 -#define KC_SEC2 KC_SECRET_2 -#define KC_SEC3 KC_SECRET_3 -#define KC_SEC4 KC_SECRET_4 -#define KC_SEC5 KC_SECRET_5 - -#define QWERTY KC_QWERTY -#define DVORAK KC_DVORAK -#define COLEMAK KC_COLEMAK -#define WORKMAN KC_WORKMAN - -#define KC_RST RESET - -#if defined(SWAP_HANDS_ENABLE) -# define KC_C1R3 SH_T(KC_TAB) -#else // SWAP_HANDS_ENABLE -# define KC_C1R3 KC_TAB -#endif // SWAP_HANDS_ENABLE - -#define SP_LWER LT(_LOWER, KC_SPC) -#define ET_RAIS LT(_RAISE, KC_ENTER) - -/* OSM keycodes, to keep things clean and easy to change */ -#define OS_LGUI OSM(MOD_LGUI) -#define OS_RGUI OSM(MOD_RGUI) -#define OS_LSFT OSM(MOD_LSFT) -#define OS_RSFT OSM(MOD_RSFT) -#define OS_LCTL OSM(MOD_LCTL) -#define OS_RCTL OSM(MOD_RCTL) -#define OS_LALT OSM(MOD_LALT) -#define OS_RALT OSM(MOD_RALT) -#define OS_MEH OSM(MOD_MEH) -#define OS_HYPR OSM(MOD_HYPR) - -#define MT_TAB MT(MOD_LCTL, KC_TAB) - -#define ALT_APP ALT_T(KC_APP) - -#define MG_NKRO MAGIC_TOGGLE_NKRO - -#define UC_IRNY UC(0x2E2E) -#define UC_CLUE UC(0x203D) - -// KWin Window Switching -#define KC_DT1 LCTL(KC_F1) -#define KC_DT2 LCTL(KC_F2) -#define KC_DT3 LCTL(KC_F3) -#define KC_DT4 LCTL(KC_F4) diff --git a/users/curry/rgb_lighting_user.h b/users/curry/rgb_lighting_user.h deleted file mode 100644 index 91d7a706..00000000 --- a/users/curry/rgb_lighting_user.h +++ /dev/null @@ -1,19 +0,0 @@ -#pragma once - -typedef struct { - bool enabled; - uint8_t hue; - uint16_t timer; - uint8_t life; -} rgblight_fadeout; - -bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record); -void keyboard_post_init_rgb(void); -void matrix_scan_rgb(void); -layer_state_t layer_state_set_rgb(layer_state_t state); -layer_state_t default_layer_state_set_rgb(layer_state_t state); -void rgblight_sethsv_default_helper(uint8_t index); - -#if defined(RGBLIGHT_TWINKLE) -void scan_rgblight_fadeout(void); -#endif diff --git a/users/curry/rgb_matrix_user.c b/users/curry/rgb_matrix_user.c deleted file mode 100644 index d1698b08..00000000 --- a/users/curry/rgb_matrix_user.c +++ /dev/null @@ -1,144 +0,0 @@ -#include "curry.h" -#include "rgb_matrix_user.h" -#include "lib/lib8tion/lib8tion.h" - -static uint32_t hypno_timer; -extern led_config_t g_led_config; - -#define RGB_MATRIX_REST_MODE RGB_MATRIX_CYCLE_OUT_IN_DUAL - -void suspend_power_down_keymap(void) { rgb_matrix_set_suspend_state(true); } - -void suspend_wakeup_init_keymap(void) { rgb_matrix_set_suspend_state(false); } - -void check_default_layer(uint8_t mode, uint8_t type) { - switch (get_highest_layer(default_layer_state)) { - case _QWERTY: - rgb_matrix_layer_helper(HSV_CYAN, mode, rgb_matrix_config.speed, type); - break; - case _COLEMAK: - rgb_matrix_layer_helper(HSV_MAGENTA, mode, rgb_matrix_config.speed, type); - break; - case _DVORAK: - rgb_matrix_layer_helper(HSV_SPRINGGREEN, mode, rgb_matrix_config.speed, type); - break; - case _WORKMAN: - rgb_matrix_layer_helper(HSV_GOLDENROD, mode, rgb_matrix_config.speed, type); - break; - } -} - -void rgb_matrix_indicators_user(void) { - if (userspace_config.rgb_layer_change && !g_suspend_state && rgb_matrix_config.enable) { - switch (get_highest_layer(layer_state)) { - case _RAISE: - rgb_matrix_layer_helper(HSV_YELLOW, 0, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW); - break; - case _LOWER: - rgb_matrix_layer_helper(HSV_GREEN, 0, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW); - break; - case _ADJUST: - rgb_matrix_layer_helper(HSV_RED, 0, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW); - break; - default: { - check_default_layer(IS_LAYER_ON(_MODS), LED_FLAG_UNDERGLOW); - break; - } - } - check_default_layer(0, LED_FLAG_MODIFIER); - } -} - -bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record) { - uint16_t temp_keycode = keycode; - // Filter out the actual keycode from MT and LT keys. - if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX)) { - temp_keycode &= 0xFF; - } - - hypno_timer = timer_read32(); - if (userspace_config.rgb_matrix_idle_anim && rgb_matrix_get_mode() == RGB_MATRIX_REST_MODE) { - rgb_matrix_mode_noeeprom(RGB_MATRIX_TYPING_HEATMAP); - } - - switch (temp_keycode) { - case KC_RGB_T: // This allows me to use underglow as layer indication, or as normal - if (record->event.pressed) { - userspace_config.rgb_layer_change ^= 1; - dprintf("rgblight layer change [EEPROM]: %u\n", userspace_config.rgb_layer_change); - eeconfig_update_user(userspace_config.raw); - if (userspace_config.rgb_layer_change) { - layer_state_set(layer_state); // This is needed to immediately set the layer color (looks better) - } - } - break; - case RGB_IDL: // This allows me to use underglow as layer indication, or as normal - if (record->event.pressed) { - userspace_config.rgb_matrix_idle_anim ^= 1; - dprintf("RGB Matrix Idle Animation [EEPROM]: %u\n", userspace_config.rgb_matrix_idle_anim); - eeconfig_update_user(userspace_config.raw); - if (userspace_config.rgb_matrix_idle_anim) { - rgb_matrix_mode_noeeprom(RGB_MATRIX_TYPING_HEATMAP); - } - } - break; - case RGB_MODE_FORWARD ... RGB_MODE_GRADIENT: // quantum_keycodes.h L400 for definitions - if (record->event.pressed) { - bool is_eeprom_updated = false; - if (userspace_config.rgb_matrix_idle_anim) { - userspace_config.rgb_matrix_idle_anim = false; - dprintf("RGB Matrix Idle Animation [EEPROM]: %u\n", userspace_config.rgb_matrix_idle_anim); - is_eeprom_updated = true; - } - if (is_eeprom_updated) { - eeconfig_update_user(userspace_config.raw); - } - } - break; - } - return true; -} - -void keyboard_post_init_rgb(void) { - if (userspace_config.rgb_matrix_idle_anim) { - rgb_matrix_mode_noeeprom(RGB_MATRIX_REST_MODE); - } -} - -void matrix_scan_rgb(void) { - if (userspace_config.rgb_matrix_idle_anim && rgb_matrix_get_mode() == RGB_MATRIX_TYPING_HEATMAP && timer_elapsed32(hypno_timer) > 15000) { - rgb_matrix_mode_noeeprom(RGB_MATRIX_REST_MODE); - } -} - -void rgb_matrix_layer_helper(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode, uint8_t speed, uint8_t led_type) { - HSV hsv = {hue, sat, val}; - if (hsv.v > rgb_matrix_config.hsv.v) { - hsv.v = rgb_matrix_config.hsv.v; - } - - switch (mode) { - case 1: // breathing - { - uint16_t time = scale16by8(g_rgb_counters.tick, speed / 8); - hsv.v = scale8(abs8(sin8(time) - 128) * 2, hsv.v); - RGB rgb = hsv_to_rgb(hsv); - for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) { - if (HAS_FLAGS(g_led_config.flags[i], led_type)) { - rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); - } - } - break; - } - default: // Solid Color - { - RGB rgb = hsv_to_rgb(hsv); - for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) { - if (HAS_FLAGS(g_led_config.flags[i], led_type)) { - rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); - } - } - break; - } - } -} diff --git a/users/curry/rules.mk b/users/curry/rules.mk deleted file mode 100644 index 87d3b38e..00000000 --- a/users/curry/rules.mk +++ /dev/null @@ -1,71 +0,0 @@ -SRC += curry.c \ - process_records.c - -# Common flags -SPACE_CADET_ENABLE = no -LTO_ENABLE = yes -EXTRAKEY_ENABLE = yes -UNICODE_ENABLE = yes -NKRO_ENABLE = yes -EXTRAKEY_ENABLE = yes -LEADER_ENABLE = yes -TAP_DANCE_ENABLE = no - -ifneq ($(strip $(NO_SECRETS)), yes) - ifneq ("$(wildcard $(USER_PATH)/secrets.c)","") - SRC += secrets.c - endif - ifeq ($(strip $(NO_SECRETS)), lite) - OPT_DEFS += -DNO_SECRETS - endif -endif - -ifeq ($(strip $(TAP_DANCE_ENABLE)), yes) - SRC += tap_dances.c -endif - -ifeq ($(strip $(OLED_DRIVER_ENABLE)), yes) - SRC += oled.c -endif - -ifeq ($(strip $(LEADER_ENABLE)), yes) - SRC += leader.c -endif - -ifeq ($(strip $(RGBLIGHT_ENABLE)), yes) - SRC += rgb_lighting_user.c - ifeq ($(strip $(INDICATOR_LIGHTS)), yes) - OPT_DEFS += -DINDICATOR_LIGHTS - endif - ifeq ($(strip $(RGBLIGHT_TWINKLE)), yes) - OPT_DEFS += -DRGBLIGHT_TWINKLE - endif - ifeq ($(strip $(RGBLIGHT_NOEEPROM)), yes) - OPT_DEFS += -DRGBLIGHT_NOEEPROM - endif - ifeq ($(strip $(RGBLIGHT_STARTUP_ANIMATION)), yes) - OPT_DEFS += -DRGBLIGHT_STARTUP_ANIMATION - endif -endif - -RGB_MATRIX_ENABLE ?= no -ifneq ($(strip $(RGB_MATRIX_ENABLE)), no) - SRC += rgb_matrix_user.c -endif - -ifdef CONSOLE_ENABLE - ifeq ($(strip $(KEYLOGGER_ENABLE)), yes) - OPT_DEFS += -DKEYLOGGER_ENABLE - endif -endif - -ifeq ($(strip $(MAKE_BOOTLOADER)), yes) - OPT_DEFS += -DMAKE_BOOTLOADER -endif - -# At least until build.mk or the like drops, this is here to prevent -# VUSB boards from enabling NKRO, as they do not support it. Ideally -# this should be handled per keyboard, but until that happens ... -ifeq ($(strip $(PROTOCOL)), VUSB) - NKRO_ENABLE = no -endif diff --git a/users/curry/tap_dances.c b/users/curry/tap_dances.c deleted file mode 100644 index 166ea2c6..00000000 --- a/users/curry/tap_dances.c +++ /dev/null @@ -1,4 +0,0 @@ -#include "tap_dances.h" -#include "curry.h" - -qk_tap_dance_action_t tap_dance_actions[] = {}; diff --git a/users/curry/tap_dances.h b/users/curry/tap_dances.h deleted file mode 100644 index 6f70f09b..00000000 --- a/users/curry/tap_dances.h +++ /dev/null @@ -1 +0,0 @@ -#pragma once diff --git a/users/curry/wrappers.h b/users/curry/wrappers.h deleted file mode 100644 index dbc73687..00000000 --- a/users/curry/wrappers.h +++ /dev/null @@ -1,88 +0,0 @@ -#pragma once -#include "curry.h" -/* -Since our quirky block definitions are basically a list of comma separated -arguments, we need a wrapper in order for these definitions to be -expanded before being used as arguments to the LAYOUT_xxx macro. -*/ -#if (!defined(LAYOUT) && defined(KEYMAP)) -# define LAYOUT KEYMAP -#endif - -// clang-format off -#define KEYMAP_wrapper(...) LAYOUT(__VA_ARGS__) -#define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__) -#define LAYOUT_ortho_4x12_wrapper(...) LAYOUT_ortho_4x12(__VA_ARGS__) -#define LAYOUT_ortho_5x12_wrapper(...) LAYOUT_ortho_5x12(__VA_ARGS__) - -#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_SLASH - -#define _________________COLEMAK_L1________________ KC_Q, KC_W, KC_F, KC_P, KC_B -#define _________________COLEMAK_L2________________ KC_A, KC_R, KC_S, KC_T, KC_G -#define _________________COLEMAK_L3________________ KC_Z, KC_X, KC_C, KC_D, KC_V - -#define _________________COLEMAK_R1________________ KC_J, KC_L, KC_U, KC_Y, KC_SCLN -#define _________________COLEMAK_R2________________ KC_M, KC_N, KC_E, KC_I, KC_O -#define _________________COLEMAK_R3________________ KC_K, KC_H, KC_COMM, KC_DOT, KC_SLASH - -#define _________________DVORAK_L1_________________ KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y -#define _________________DVORAK_L2_________________ KC_A, KC_O, KC_E, KC_U, KC_I -#define _________________DVORAK_L3_________________ KC_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, KC_S -#define _________________DVORAK_R3_________________ KC_B, KC_M, KC_W, KC_V, KC_Z - -#define _________________WORKMAN_L1________________ KC_Q, KC_D, KC_R, KC_W, KC_B -#define _________________WORKMAN_L2________________ KC_A, KC_S, KC_H, KC_T, KC_G -#define _________________WORKMAN_L3________________ KC_Z, KC_X, KC_M, KC_C, KC_V - -#define _________________WORKMAN_R1________________ KC_J, KC_F, KC_U, KC_P, KC_SCLN -#define _________________WORKMAN_R2________________ KC_Y, KC_N, KC_E, KC_O, KC_I -#define _________________WORKMAN_R3________________ KC_K, KC_L, KC_COMM, KC_DOT, KC_SLASH - - -#define ________________NUMBER_LEFT________________ KC_1, KC_2, KC_3, KC_4, KC_5 -#define ________________NUMBER_RIGHT_______________ KC_6, KC_7, KC_8, KC_9, KC_0 - -#define _________________FUNC_LEFT_________________ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5 -#define _________________FUNC_RIGHT________________ KC_F6, KC_F7, KC_F8, KC_F9, KC_F10 - -#define _________________SYM_LEFT__________________ KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC -#define _________________SYM_RIGHT_________________ KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN - - -#define ___________________BLANK___________________ _______, _______, _______, _______, _______ - - -#define _________________LOWER_L1__________________ _________________FUNC_LEFT_________________ -#define _________________LOWER_L2__________________ _________________SYM_LEFT__________________ -#define _________________LOWER_L3__________________ KC_DT1, KC_DT2, KC_DT3, KC_DT4, KC_CCCV - -#define _________________LOWER_R1__________________ _________________FUNC_RIGHT________________ -#define _________________LOWER_R2__________________ _________________SYM_RIGHT_________________ -#define _________________LOWER_R3__________________ KC_DQUO, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR - -#define _________________RAISE_L1__________________ ________________NUMBER_LEFT________________ -#define _________________RAISE_L2__________________ KC_PGUP, KC_PGDN, KC_HOME, KC_END, _______ -#define _________________RAISE_L3__________________ UC_FLIP, UC_TABL, UC_SHRG, UC_DISA, _______ - -#define _________________RAISE_R1__________________ ________________NUMBER_RIGHT_______________ -#define _________________RAISE_R2__________________ KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______ -#define _________________RAISE_R3__________________ KC_QUOT, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC - -#define _________________ADJUST_L1_________________ RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_TOG -#define _________________ADJUST_L2_________________ MU_TOG , CK_TOGG, AU_ON, AU_OFF, CG_NORM -#define _________________ADJUST_L3_________________ RGB_RMOD,RGB_HUD,RGB_SAD, RGB_VAD, KC_RGB_T - -#define _________________ADJUST_R1_________________ KC_SEC1, KC_SEC2, KC_SEC3, KC_SEC4, KC_SEC5 -#define _________________ADJUST_R2_________________ CG_SWAP, QWERTY, COLEMAK, DVORAK, WORKMAN -#define _________________ADJUST_R3_________________ MG_NKRO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT - -// clang-format on diff --git a/users/d4mation/config.h b/users/d4mation/config.h deleted file mode 100644 index 3140a036..00000000 --- a/users/d4mation/config.h +++ /dev/null @@ -1 +0,0 @@ -#define FORCE_NKRO \ No newline at end of file diff --git a/users/d4mation/d4mation.c b/users/d4mation/d4mation.c deleted file mode 100644 index 5aa58a9f..00000000 --- a/users/d4mation/d4mation.c +++ /dev/null @@ -1,37 +0,0 @@ -#include "d4mation.h" - -__attribute__ ((weak)) -bool process_record_keymap( uint16_t keycode, keyrecord_t *record ) { - /* If you want macros specific to your keymap, you need to define this function in your keymap */ - return true; -} - -__attribute__ ((weak)) -void matrix_init_keymap() { - /* If you want a matrix init specific to your keymap, you need to define this function in your keymap */ -} - -__attribute__ ((weak)) -void matrix_scan_keymap() { - /* If you want a matrix scan specific to your keymap, you need to define this function in your keymap */ -} - -__attribute__((weak)) -void eeconfig_init_keymap( void ) {} - -/* process_record_user() is called in macros.c */ - -void matrix_init_user( void ) { - matrix_init_keymap(); -} - -void matrix_scan_user( void ) { - matrix_scan_keymap(); -} - -void eeconfig_init_user( void ) { - - eeconfig_init_keymap(); - keyboard_init(); - -} \ No newline at end of file diff --git a/users/d4mation/d4mation.h b/users/d4mation/d4mation.h deleted file mode 100644 index 94c63526..00000000 --- a/users/d4mation/d4mation.h +++ /dev/null @@ -1,17 +0,0 @@ -#pragma once - -#include "quantum.h" - -#ifdef UNICODE_ENABLE -#include "macros.h" -#endif - -#ifdef TAP_DANCE_ENABLE -#include "tap-dance.h" -#endif - -bool process_record_keymap( uint16_t keycode, keyrecord_t *record ); - -void matrix_init_keymap( void ); - -void matrix_scan_keymap( void ); \ No newline at end of file diff --git a/users/d4mation/macros.c b/users/d4mation/macros.c deleted file mode 100644 index 3c115d7e..00000000 --- a/users/d4mation/macros.c +++ /dev/null @@ -1,160 +0,0 @@ -#include "d4mation.h" -#include "tap-hold.h" -#include "zalgo.h" -#include "macros.h" - -bool zalgo_enabled = false; - -bool process_record_user( uint16_t keycode, keyrecord_t *record ) { - - switch ( keycode ) { - - case _GRAVE_ESC: - - /* Send ` on Tap, Esc on Hold */ - tap_or_hold( record, KC_GRAVE, KC_ESC ); - - return false; - break; - - case PHPOPEN: - - if ( record->event.pressed ) { - - tap_code16( S( KC_COMMA ) ); - tap_code16( S( KC_SLASH ) ); - - tap_code( KC_P ); - tap_code( KC_H ); - tap_code( KC_P ); - - } - - return false; - break; - - case PHPCLSE: - - if ( record->event.pressed ) { - tap_code16( S( KC_SLASH ) ); - tap_code16( S( KC_DOT ) ); - } - - return false; - break; - - #ifdef UNICODE_ENABLE - - case AMENO: /* ༼ つ ◕_◕ ༽つ */ - - if ( record->event.pressed ) { - - send_unicode_hex_string( "0F3C 0020 3064 0020 25D5 005F 25D5 0020 0F3D 3064" ); - - } - - return false; - break; - - case MAGIC: /* (∩ ͡° ͜ʖ ͡°)⊃━☆゚. * */ - - if ( record->event.pressed ) { - - send_unicode_hex_string( "0028 2229 0020 0361 00B0 0020 035C 0296 0020 0361 00B0 0029 2283 2501 2606 FF9F 002E 0020 002A" ); - - } - - return false; - break; - - case LENNY: /* ( ͡° ͜ʖ ͡°) */ - - if ( record->event.pressed ) { - - send_unicode_hex_string( "0028 0020 0361 00B0 0020 035C 0296 0020 0361 00b0 0029" ); - - } - - return false; - break; - - case DISFACE: /* ಠ_ಠ */ - - if ( record->event.pressed ) { - send_unicode_hex_string( "0CA0 005F 0CA0" ); - } - - return false; - break; - - case TFLIP: /* (╯°□°)╯ ︵ ┻━┻ */ - - if ( record->event.pressed ) { - - send_unicode_hex_string( "0028 256F 00b0 25A1 00B0 0029 256F FE35 253B 2501 253B" ); - - } - - return false; - break; - - case TPUT: /* ┬──┬ ノ( ゜-゜ノ) */ - - if ( record->event.pressed ) { - - send_unicode_hex_string( "252C 2500 2500 252C 0020 30CE 0028 0020 309C 002D 309C 30CE 0029" ); - - } - - return false; - break; - - case SHRUG: /* ¯\_(ツ)_/¯ */ - - if ( record->event.pressed ) { - - send_unicode_hex_string( "00AF 005C 005F 0028 30C4 0029 005F 002F 00AF" ); - - } - - return false; - break; - - case ZALGO: /* Toggles Zalgo Text mode */ - - if ( record->event.pressed ) { - zalgo_enabled = ! zalgo_enabled; - } - - return false; - break; - - #endif - - default: - - #ifdef UNICODE_ENABLE - - if ( zalgo_enabled ) { - - if ( keycode < KC_A || ( keycode > KC_0 && keycode < KC_MINUS ) || keycode > KC_SLASH ) { - process_record_keymap( keycode, record ); - return true; - } - - if ( record->event.pressed ) { - zalgo_text( keycode ); - } - - return false; - } - - #endif - - break; - } - - process_record_keymap( keycode, record ); - return true; - -}; \ No newline at end of file diff --git a/users/d4mation/macros.h b/users/d4mation/macros.h deleted file mode 100644 index e69d30de..00000000 --- a/users/d4mation/macros.h +++ /dev/null @@ -1,23 +0,0 @@ -#pragma once - -#include "quantum.h" -#include "tap-hold.h" -#include "zalgo.h" - -#define SCRGB LCTL( LSFT( LGUI( KC_4 ) ) ) /* Mac Screen Area Grab shortcut (Puts into Clipboard) */ -#define SLEEP LALT( LGUI( KC_SYSTEM_POWER ) ) /* Instant sleep on Mac, rather than having to hold down the button */ - -enum custom_keycodes { - _GRAVE_ESC = SAFE_RANGE, /* Prefixed with underscore to prevent conflicts */ - PHPOPEN, /* */ - AMENO, - MAGIC, - LENNY, - DISFACE, - TFLIP, - TPUT, - SHRUG, - ZALGO, - NEW_SAFE_RANGE -}; \ No newline at end of file diff --git a/users/d4mation/rules.mk b/users/d4mation/rules.mk deleted file mode 100644 index 3d65a224..00000000 --- a/users/d4mation/rules.mk +++ /dev/null @@ -1,15 +0,0 @@ -SRC += d4mation.c \ - tap-hold.c \ - macros.c - -BOOTMAGIC_ENABLE = no -LTO_ENABLE = yes -MOUSEKEY_ENABLE = no - -ifeq ($(strip $(UNICODE_ENABLE)), yes) - SRC += zalgo.c -endif - -ifeq ($(strip $(TAP_DANCE_ENABLE)), yes) - SRC += tap-dance.c -endif \ No newline at end of file diff --git a/users/d4mation/tap-dance.c b/users/d4mation/tap-dance.c deleted file mode 100644 index 46f2274f..00000000 --- a/users/d4mation/tap-dance.c +++ /dev/null @@ -1,6 +0,0 @@ -#include "tap-dance.h" - -qk_tap_dance_action_t tap_dance_actions[] = { - /* Tap once/hold for Shift, tap twice for Caps Lock */ - [SHIFT_CAPS] = ACTION_TAP_DANCE_DOUBLE( KC_LSHIFT, KC_CAPS ) -}; \ No newline at end of file diff --git a/users/d4mation/tap-dance.h b/users/d4mation/tap-dance.h deleted file mode 100644 index 0087c4a6..00000000 --- a/users/d4mation/tap-dance.h +++ /dev/null @@ -1,7 +0,0 @@ -#pragma once - -#include "quantum.h" - -enum tap_dance { - SHIFT_CAPS = 0 -}; \ No newline at end of file diff --git a/users/d4mation/tap-hold.c b/users/d4mation/tap-hold.c deleted file mode 100644 index 0c5119f9..00000000 --- a/users/d4mation/tap-hold.c +++ /dev/null @@ -1,28 +0,0 @@ -#include "tap-hold.h" - -#ifndef TAP_HOLD_TIME -#define TAP_HOLD_TIME 200 -#endif - -uint16_t tap_hold_timer; - -void tap_or_hold( keyrecord_t *record, uint16_t tap, uint16_t hold ) { - - if ( record->event.pressed ) { - tap_hold_timer = timer_read(); - } else { - - if ( tap_hold_timer && - timer_elapsed( tap_hold_timer ) > TAP_HOLD_TIME ) { - /* Held down then released */ - tap_code( hold ); - } else { - /* Quickly Tapped */ - tap_code( tap ); - } - - tap_hold_timer = 0; - - } - -} \ No newline at end of file diff --git a/users/d4mation/tap-hold.h b/users/d4mation/tap-hold.h deleted file mode 100644 index 52dc0830..00000000 --- a/users/d4mation/tap-hold.h +++ /dev/null @@ -1,5 +0,0 @@ -#pragma once - -#include "quantum.h" - -void tap_or_hold( keyrecord_t *record, uint16_t tap, uint16_t hold ); \ No newline at end of file diff --git a/users/d4mation/zalgo.c b/users/d4mation/zalgo.c deleted file mode 100644 index 3a1688e0..00000000 --- a/users/d4mation/zalgo.c +++ /dev/null @@ -1,21 +0,0 @@ -#include "zalgo.h" - -void zalgo_text( uint16_t keycode ) { - - tap_code( keycode ); - - int number = ( rand() % ( 8 + 1 - 2 ) ) + 2; - unsigned int index; - - unicode_input_start(); - - for ( index = 0; index < number; index++ ) { - - uint16_t hex = ( rand() % ( 0x036F + 1 - 0x0300 ) ) + 0x0300; - register_hex( hex ); - - } - - unicode_input_finish(); - -} \ No newline at end of file diff --git a/users/d4mation/zalgo.h b/users/d4mation/zalgo.h deleted file mode 100644 index f59fc035..00000000 --- a/users/d4mation/zalgo.h +++ /dev/null @@ -1,5 +0,0 @@ -#pragma once - -#include "quantum.h" - -void zalgo_text( uint16_t keycode ); \ No newline at end of file diff --git a/users/danielo515/alt_tab.c b/users/danielo515/alt_tab.c deleted file mode 100644 index 1602ee6f..00000000 --- a/users/danielo515/alt_tab.c +++ /dev/null @@ -1,38 +0,0 @@ -#include "danielo515.h" -#include "alt_tab.h" - -bool altPressed = false; -__attribute__((weak)) void alt_tab_activated(void){}; -__attribute__((weak)) void alt_tab_deactivated(void){}; -extern bool onMac; - -// =============== ALT_TAB single key handling -bool process_alt_tab(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case ALT_TAB: - if (!record->event.pressed) { - return false; - } - if (altPressed) { - tap_code(KC_TAB); - } else { - altPressed = true; - onMac ? register_code(KC_LGUI) : register_code(KC_LALT); - tap_code(KC_TAB); - alt_tab_activated(); - } - // avoid alt releasing if the key is of movement - case KC_RIGHT ... KC_UP: - if (altPressed) { - return true; // yes QMK, do your stuff - } - } - // Reset sticky alt tab when any other key is pressed - if (altPressed) { - onMac ? unregister_code(KC_LGUI) : unregister_code(KC_LALT); - altPressed = false; - alt_tab_deactivated(); - return false; - } - return true; -}; diff --git a/users/danielo515/alt_tab.h b/users/danielo515/alt_tab.h deleted file mode 100644 index f84350c2..00000000 --- a/users/danielo515/alt_tab.h +++ /dev/null @@ -1,4 +0,0 @@ -#pragma once -#include "quantum.h" - -bool process_alt_tab(uint16_t keycode, keyrecord_t *record); diff --git a/users/danielo515/combo.c b/users/danielo515/combo.c deleted file mode 100644 index 1c841437..00000000 --- a/users/danielo515/combo.c +++ /dev/null @@ -1,36 +0,0 @@ -#include "combo.h" - -enum combos { - JK_ESC, - YU_COM, - UI_COM, - IO_COM, - QW_COM, - COM_SLS, - COM_DOT, - M_COMM, - N_M, - OP_COM, -}; - -const uint16_t PROGMEM ui_combo[] = {KC_U, KC_I, COMBO_END}; -const uint16_t PROGMEM jk_combo[] = {KC_J, KC_K, COMBO_END}; -const uint16_t PROGMEM yu_combo[] = {KC_Y, KC_U, COMBO_END}; -const uint16_t PROGMEM io_combo[] = {KC_I, KC_O, COMBO_END}; -const uint16_t PROGMEM qw_combo[] = {KC_Q, KC_W, COMBO_END}; -const uint16_t PROGMEM com_sls[] = {KC_COMMA, KC_SLSH, COMBO_END}; -const uint16_t PROGMEM com_dot[] = {KC_COMMA, KC_DOT, COMBO_END}; -const uint16_t PROGMEM m_comm[] = {KC_M,KC_COMMA, COMBO_END}; -const uint16_t PROGMEM n_m[] = {KC_N, KC_M,COMBO_END}; - -combo_t key_combos[COMBO_COUNT] = { - [JK_ESC] = COMBO(jk_combo, KC_ESC), - [YU_COM] = COMBO(yu_combo, KC_CIRC), - [UI_COM] = COMBO(ui_combo, KC_DLR), - [IO_COM] = COMBO(io_combo, KC_TILD), - [QW_COM] = COMBO(qw_combo, KC_AT), - [COM_SLS] = COMBO(com_sls, KC_QUES), - [COM_DOT] = COMBO(com_dot, KC_QUES), - [M_COMM] = COMBO(m_comm, KC_ESC), - [N_M] = COMBO(n_m, KC_DLR), -}; diff --git a/users/danielo515/combo.h b/users/danielo515/combo.h deleted file mode 100644 index 010d4b13..00000000 --- a/users/danielo515/combo.h +++ /dev/null @@ -1,2 +0,0 @@ -#pragma once -#include "quantum.h" diff --git a/users/danielo515/config.h b/users/danielo515/config.h deleted file mode 100644 index fb247264..00000000 --- a/users/danielo515/config.h +++ /dev/null @@ -1,10 +0,0 @@ -#pragma once - -#if defined(COMBO_ENABLE) - #define COMBO_COUNT 9 - #define COMBO_TERM 40 -#endif // !COMBO_ENABLE -// Timeout settings for leader key -#undef LEADER_TIMEOUT -#define LEADER_TIMEOUT 350 -#define LEADER_PER_KEY_TIMING diff --git a/users/danielo515/danielo515.c b/users/danielo515/danielo515.c deleted file mode 100644 index f0836502..00000000 --- a/users/danielo515/danielo515.c +++ /dev/null @@ -1,87 +0,0 @@ -#include "danielo515.h" - -bool onMac = true; - -//**************** LEADER *********************// -#ifdef LEADER_ENABLE -LEADER_EXTERNS(); -# ifdef RGBLIGHT_ENABLE - -void leader_start() { rgblight_setrgb_range(5, 100, 199, 10, 15); }; - -void leader_end() { rgblight_setrgb_range(200, 200, 255, 10, 15); }; -# endif - -void matrix_scan_user(void) { - if (leading && leader_sequence_size > 0 && timer_elapsed(leader_time) > LEADER_TIMEOUT) { - leading = false; - SEQ_ONE_KEY(KC_T) { SEND_STRING("``" SS_TAP(X_LEFT)); } - // Triple ticks - SEQ_TWO_KEYS(KC_T, KC_T) { SEND_STRING("```" SS_TAP(X_ENTER) SS_TAP(X_ENTER) "```" SS_TAP(X_UP)); } - // ==== International spanish accent vowels ==== - SEQ_ONE_KEY(KC_A) { SEND_STRING(SS_LALT("e") "a"); } - SEQ_ONE_KEY(KC_E) { SEND_STRING(SS_LALT("e") "e"); } - SEQ_ONE_KEY(KC_I) { SEND_STRING(SS_LALT("e") "i"); } - SEQ_ONE_KEY(KC_O) { SEND_STRING(SS_LALT("e") "o"); } - SEQ_ONE_KEY(KC_U) { SEND_STRING(SS_LALT("e") "u"); } - SEQ_ONE_KEY(KC_N) { SEND_STRING(SS_LALT("n") "n"); } - // ==== MACROS === - SEQ_ONE_KEY(KC_G) { SEND_STRING(" | grep "); } - SEQ_ONE_KEY(KC_K) { onMac ? SEND_STRING(SS_LCTRL(" ")) : SEND_STRING(SS_LCTRL("f")); } - // vim delete all - SEQ_TWO_KEYS(KC_D, KC_G) { - if (onMac) { - SEND_STRING(SS_LGUI("a") SS_TAP(X_D)); - } else { - SEND_STRING(SS_LCTRL("a") SS_TAP(X_D)); - } - } - // tripe delete! - SEQ_ONE_KEY(KC_BSPACE) { SEND_STRING(SS_TAP(X_BSPACE) SS_TAP(X_BSPACE) SS_TAP(X_BSPACE)); } - SEQ_TWO_KEYS(KC_P, KC_G) { SEND_STRING("ps -ef | grep "); } - SEQ_TWO_KEYS(KC_J, KC_A) { SEND_STRING("() => {}" SS_TAP(X_LEFT) SS_TAP(X_LEFT) SS_TAP(X_LEFT) SS_TAP(X_LEFT) SS_TAP(X_LEFT) SS_TAP(X_LEFT) SS_TAP(X_LEFT)); } - // this is a pain to type - SEQ_TWO_KEYS(KC_S, KC_S) { SEND_STRING("~/.ssh/ "); } - SEQ_TWO_KEYS(KC_F, KC_T) { SEND_STRING("feat():" SS_TAP(X_LEFT) SS_TAP(X_LEFT)); } - // ### LAYER CHANGE - SEQ_ONE_KEY(KC_1) { layer_on(1); } - // control enter, because yes - SEQ_ONE_KEY(KC_H) { SEND_STRING(SS_DOWN(X_LCTRL) SS_TAP(X_ENTER) SS_UP(X_LCTRL)); } - // paste all - SEQ_ONE_KEY(KC_P) { - if (onMac) { - SEND_STRING(SS_LGUI("a") SS_LGUI("v")); - } else { - SEND_STRING(SS_LCTRL("a") SS_LCTRL("v")); - } - } - SEQ_THREE_KEYS(KC_M, KC_A, KC_C) { - onMac = true; -# ifdef RGBLIGHT_ENABLE - rgblight_setrgb(255, 255, 255); -# endif - } - SEQ_THREE_KEYS(KC_W, KC_I, KC_N) { - onMac = false; -# ifdef RGBLIGHT_ENABLE - rgblight_setrgb(255, 255, 0); -# endif - } - /* Copy all */ - SEQ_ONE_KEY(KC_Y) { - if (onMac) { - SEND_STRING(SS_LGUI("a") SS_LGUI("c")); - } else { - SEND_STRING(SS_LCTRL("a") SS_LCTRL("c")); - } - } - // emoji bar - SEQ_TWO_KEYS(KC_E, KC_E) { SEND_STRING(SS_DOWN(X_LGUI) SS_LCTRL(" ") SS_UP(X_LGUI)); } - - SEQ_TWO_KEYS(KC_F, KC_F) { SEND_STRING("ps -ef | grep "); } - SEQ_TWO_KEYS(KC_H, KC_T) { SEND_STRING("https://"); } - - leader_end(); - } -} -#endif // LEADER diff --git a/users/danielo515/danielo515.h b/users/danielo515/danielo515.h deleted file mode 100644 index 715e8132..00000000 --- a/users/danielo515/danielo515.h +++ /dev/null @@ -1,7 +0,0 @@ -#pragma once -#include "quantum.h" -#include "process_records.h" - -#ifdef TAP_DANCE_ENABLE - #include "tap_dance.h" -#endif diff --git a/users/danielo515/process_records.c b/users/danielo515/process_records.c deleted file mode 100644 index b1a8b925..00000000 --- a/users/danielo515/process_records.c +++ /dev/null @@ -1,167 +0,0 @@ -#include "process_records.h" -#include "alt_tab.h" -extern bool onMac; -// ======== INCREMENTAL MACROS STUFF ============= -#define MAX_INCREMENTAL_MACRO 20 -#define TAP_ROTATION_TIMEOUT 400 -uint16_t latest_kc = 0; -uint16_t latest_rotation = 0; -int key_count = 0; - -const char incremental_macros[][MAX_INCREMENTAL_MACRO] = { "String1"SS_TAP(X_HOME)"X-", "String2"SS_TAP(X_HOME) }; - -bool process_incremental_macro(uint16_t kc) { - if (kc < INC_MACROS_START || kc > INC_MACROS_END) { - return false; - } - int macro_idx = (int)(kc - INC_MACROS_START) - 1; - char tempstring[3] = {0}; - tempstring[0] = incremental_macros[macro_idx][key_count]; - // Special cases of SS_TAP SS_UP and SS_DOWN, they require two characters so get both once and skip on next iteration - if (tempstring[0] == '\1' || tempstring[0] == '\2' || tempstring[0] == '\3') { - tempstring[1] = incremental_macros[macro_idx][++key_count]; - } - if (tempstring[0] == '\0') { - key_count = 0; - } - send_string(tempstring); - - return true; -}; - -void refresh_incremental_macros(uint16_t kc) { - if (kc == latest_kc) { - if ((timer_elapsed(latest_rotation) > TAP_ROTATION_TIMEOUT) || (key_count >= MAX_INCREMENTAL_MACRO)) - key_count = 0; - else - key_count++; - } else { - key_count = 0; - latest_kc = kc; - } - - latest_rotation = timer_read(); -} -// Send control or GUI depending if we are on windows or mac -bool CMD(uint16_t kc) { - if(onMac){ tap_code16(LGUI(kc)); } else { tap_code16(LCTL(kc)); } - return false; -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - bool pressed = record->event.pressed; - if(pressed){ - refresh_incremental_macros(keycode); - if(process_incremental_macro(keycode)){ - return false; - } - switch (keycode) { - case MAC_TGL: - onMac = !onMac; - onMac ? SEND_STRING("On mac") : SEND_STRING("Not on MAC"); - return false; - } - } - - switch (keycode) { - case QWERTY: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_SONG(tone_qwerty); - #endif - layer_on(_QWERTY); - } - return false; - case LOWER: - if (record->event.pressed) { - layer_on(_LOWER); - } else { - layer_off(_LOWER); - } - return false; - case RAISE: - if (record->event.pressed) { - layer_on(_RAISE); - } else { - layer_off(_RAISE); - } - return false; - case ADJUST: - if (record->event.pressed) { - layer_on(_ADJUST); - } else { - layer_off(_ADJUST); - } - return false; - // == Macros START === - case IARROW: if (record->event.pressed) SEND_STRING("<-"); return false; - case ARROW: if (record->event.pressed) SEND_STRING("->"); return false; - case F_ARROW: if (record->event.pressed) SEND_STRING("=>"); return false; - case GREP: if (record->event.pressed) SEND_STRING(" | grep "); return false; - case CLN_EQ: if (record->event.pressed) SEND_STRING(":="); return false; - // == Macros END === - // == Multi Os START === - case KC_HOME:// make the home behave the same on OSX - if (record->event.pressed && onMac) { - SEND_STRING(SS_LCTRL("a")); - return false; - } - case KC_END:// make the end behave the same on OSX - if (record->event.pressed && onMac) { - tap_code16(C(KC_E)); - return false; - } - case AC_A:// Accent á - if (record->event.pressed) SEND_STRING(SS_LALT("e") "a"); return false; - case AC_E:// Accent é - if (record->event.pressed) SEND_STRING(SS_LALT("e") "e"); return false; - case AC_I:// Accent í - if (record->event.pressed) SEND_STRING(SS_LALT("e") "i"); return false; - case AC_O:// Accent ó - if (record->event.pressed) SEND_STRING(SS_LALT("e") "o"); return false; - case CUT: if (record->event.pressed) return CMD(KC_X); - case COPY: - if (record->event.pressed) { - onMac ? SEND_STRING(SS_LGUI("c")) : SEND_STRING(SS_LCTRL("c")); - } - return false; - case PASTE: - if (record->event.pressed) { - onMac ? SEND_STRING(SS_LGUI("v")) : SEND_STRING(SS_LCTRL("v")); - } - return false; - case SAVE: - if (record->event.pressed) { - onMac ? SEND_STRING(SS_LGUI("s")) : SEND_STRING(SS_LCTRL("s")); - } - return false; - case UNDO: - if (record->event.pressed) { - onMac ? SEND_STRING(SS_LGUI("z")) : SEND_STRING(SS_LCTRL("z")); - } - return false; - case FIND: - if (record->event.pressed) { - onMac ? SEND_STRING(SS_LGUI("f")) : SEND_STRING(SS_LCTRL("f")); - } - return false; - case CHG_LAYOUT: - if (record->event.pressed) { - onMac ? SEND_STRING(SS_LCTRL(" ")) : SEND_STRING(SS_LCTRL("f")); - } - return false; - // == Multi Os END === -#ifdef RGBLIGHT_ENABLE - case RGB_SLD: - if (record->event.pressed) { rgblight_mode(1); } - return false; - break; - //First time alt + tab, and alt stays sticky. Next press we just send tab. Any other key releases the alt -#endif - } -// =============== ALT_TAB single key handling - return process_alt_tab(keycode, record); -}; - - - diff --git a/users/danielo515/process_records.h b/users/danielo515/process_records.h deleted file mode 100644 index c994511a..00000000 --- a/users/danielo515/process_records.h +++ /dev/null @@ -1,104 +0,0 @@ -#pragma once -#include "quantum.h" - -enum custom_keycodes -{ - EPRM = SAFE_RANGE, - RGB_SLD, - ALT_TAB, - QWERTY, - SYM, - NAV, - ADJUST, -// Macros - ARROW, - IARROW, - CLN_EQ, - F_ARROW, - GREP, -// Accented characters - AC_A, - AC_E, - AC_I, - AC_O, -// Custom multi-os key-codes - CUT, - COPY, - PASTE, - SAVE, - UNDO, - CHG_LAYOUT, - FIND, -// OTHER OLD STUFF - LOWER, - RAISE, - MAC_TGL, - INC_MACROS_START, - INC_MACROS_END, -}; - -//**************** KEYCODES *********************// -enum layers { - _QWERTY, - _SYMB, - _NAV, - _ADJUST, - _F, - _D, - _S, - _A, - _J, - _K, - // iris specific - TBD - _LOWER, - _RAISE, - _MACROS, - _SAFE_LAYER -}; - -//===== Function letters -# define FN_F LT(_F,KC_F) -# define FN_D LT(_D,KC_D) -# define FN_S LT(_S,KC_S) -# define FN_A LT(_A,KC_A) -# define FN_K LT(_K,KC_K) -# define FN_J LT(_J,KC_J) -# define KC_FN_D FN_D -# define KC_FN_S FN_S -# define KC_FN_F FN_F - -# define KC_MACROS OSL(_MACROS) - - -# define KC_E_COLN LSFT(KC_DOT) -# define KC_E_EQL ES_EQL -# define KC_GUI OSM(MOD_RGUI) -# define KC_R_NUB S(KC_NUBS) -# define KC_E_LT KC_NUBS -# define KC_E_GT S(KC_NUBS) -# define KC_E_TILD ES_TILD -# define KC_E_MINS ES_MINS -# define KC_E_OVRR ES_OVRR -# define KC_E_APOS ES_APOS -# define KC_E_IEXL ES_IEXL -//========== Short hand for complex key combinations -# define WIN_LEFT_HALF LALT(LGUI(KC_LEFT)) -# define WIN_RIGHT_HALF LALT(LGUI(KC_RIGHT)) -# define WIN_TO_LEFT LALT(LSFT( LGUI(KC_LEFT) )) -# define WIN_TO_RIGHT LALT(LSFT( LGUI(KC_RIGHT) )) -# define ALL_WIN LCTL(KC_DOWN) -# define EXPOSE LGUI(KC_DOWN) -// ========== Modifiers!! -# define SHIFT OSM(MOD_LSFT) -//=============== tap for key hold for mod -# define HYPR_H HYPR_T(KC_H) -# define CTL_K RCTL_T(KC_K) -# define ALT_J ALT_T(KC_J) -# define SFT_MINS LSFT_T(KC_MINS) // tap - hold shift -# define CMD_QUOT GUI_T(KC_QUOTE) // tap ' hold cmd -//=============== Movement modified -# define CTL_LEFT LCTL(KC_LEFT) -# define CTL_RIGHT LCTL(KC_RIGHT) - -# define SFT_LEFT LSFT(KC_LEFT) -# define SFT_RIGHT LSFT(KC_RIGHT) diff --git a/users/danielo515/readme.md b/users/danielo515/readme.md deleted file mode 100644 index 1343df97..00000000 --- a/users/danielo515/readme.md +++ /dev/null @@ -1,14 +0,0 @@ -Copyright 2017 Daniel Rodriguez @ danielo515 - -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 . diff --git a/users/danielo515/rules.mk b/users/danielo515/rules.mk deleted file mode 100644 index c77e2f01..00000000 --- a/users/danielo515/rules.mk +++ /dev/null @@ -1,11 +0,0 @@ -SRC += danielo515.c \ - alt_tab.c \ - process_records.c - -ifeq ($(strip $(COMBO_ENABLE)), yes) - SRC += combo.c -endif - -ifeq ($(strip $(TAP_DANCE_ENABLE)), yes) - SRC += tap_dance.c -endif diff --git a/users/danielo515/tap_dance.c b/users/danielo515/tap_dance.c deleted file mode 100644 index 7ddb55c2..00000000 --- a/users/danielo515/tap_dance.c +++ /dev/null @@ -1,139 +0,0 @@ -#include "tap_dance.h" -//**************** Definitions needed for quad function to work *********************// -#ifdef QUAD_DANCE -int cur_dance(qk_tap_dance_state_t *state) -{ - if (state->count == 1) - { - //If count = 1, and it has been interrupted - it doesn't matter if it is pressed or not: Send SINGLE_TAP - if (state->interrupted || state->pressed == 0) - return SINGLE_TAP; - else - return SINGLE_HOLD; - } - //If count = 2, and it has been interrupted - assume that user is trying to type the letter associated - //with single tap. In example below, that means to send `xx` instead of `Escape`. - else if (state->count == 2) - { - if (state->interrupted) - return DOUBLE_SINGLE_TAP; - else if (state->pressed) - return DOUBLE_HOLD; - else - return DOUBLE_TAP; - } - else - return 6; //magic number. At some point this method will expand to work for more presses -}; - -//**************** Definitions needed for quad function to work *********************// -# endif - -// Slightly better tap dance double: interruption sends double single and any number over double sends the single that number of times -void qk_tap_dance_pair_finished_safe(qk_tap_dance_state_t *state, void *user_data) { - qk_tap_dance_pair_t *pair = (qk_tap_dance_pair_t *)user_data; - int count = state->count; - if (state->count == 2) { - if (state->interrupted){ - tap_code16(pair->kc1);register_code16 (pair->kc1); - state->count = 1; // Reset the counter as we are using the first key - } else register_code16 (pair->kc2); - return; - } - register_code16 (pair->kc1); - while(--count){ - unregister_code16(pair->kc1); - register_code16 (pair->kc1); - } -} - -void qk_tap_dance_pair_reset_safe(qk_tap_dance_state_t *state, void *user_data) { - qk_tap_dance_pair_t *pair = (qk_tap_dance_pair_t *)user_data; - if (state->count == 2) { - unregister_code16 (pair->kc2); - return; - } - unregister_code16(pair->kc1); -} - -//**************** Tap dance functions *********************// - -qk_tap_dance_action_t tap_dance_actions[] = { - [COPY_CUT] = ACTION_TAP_DANCE_FN(td_copy_cut), - [PASTE_DANCE] = ACTION_TAP_DANCE_FN(td_paste), - [_TD_F1] = ACTION_TAP_DANCE_DOUBLE(KC_1, KC_F1), - [_TD_F2] = ACTION_TAP_DANCE_DOUBLE(KC_2, KC_F2), - [_TD_F3] = ACTION_TAP_DANCE_DOUBLE(KC_3, KC_F3), - [_TD_F4] = ACTION_TAP_DANCE_DOUBLE(KC_4, KC_F4), - [_TD_F5] = ACTION_TAP_DANCE_DOUBLE(KC_5, KC_F5), - [_TD_F6] = ACTION_TAP_DANCE_DOUBLE(KC_6, KC_F6), - [_TD_F7] = ACTION_TAP_DANCE_DOUBLE(KC_7, KC_F7), - [_TD_F8] = ACTION_TAP_DANCE_DOUBLE(KC_8, KC_F8), - [_TD_F9] = ACTION_TAP_DANCE_DOUBLE(KC_9, KC_F9), - [_TD_F10] = ACTION_TAP_DANCE_DOUBLE(KC_0, KC_F10), - [_TD_F11] = ACTION_TAP_DANCE_DOUBLE(KC_MINS, KC_F11), - [_TD_F12] = ACTION_TAP_DANCE_DOUBLE(KC_EQL, KC_F12), - [_TD_H_ENTER] = ACTION_TAP_DANCE_DOUBLE(KC_H, KC_ENT), - [_TD_CLN] = ACTION_TAP_DANCE_DOUBLE(KC_SCLN, KC_COLON), - [_TD_SLASH] = ACTION_TAP_DANCE_DOUBLE(KC_SLASH, KC_BSLASH), - // OLD ONES - [LEFT_HOME] = ACTION_TAP_DANCE_DOUBLE(KC_LEFT, KC_HOME), - [RGT_HOME] = ACTION_TAP_DANCE_DOUBLE_SAFE(KC_RGHT, KC_END), - [J_ENT] = ACTION_TAP_DANCE_DOUBLE_SAFE(KC_J,KC_ENT), - [H_MINS] = ACTION_TAP_DANCE_DOUBLE_SAFE(KC_H,KC_SLASH), - [_TD_COPY] = ACTION_TAP_DANCE_FN(dance_copy), - [_TD_CUT] = ACTION_TAP_DANCE_FN(dance_cut), - [_TD_PASTE] = ACTION_TAP_DANCE_FN(dance_paste) -}; - -void td_copy_cut(qk_tap_dance_state_t *state, void *user_data) -{ - if (state->count == 2) - { - onMac ? SEND_STRING(SS_LGUI("x")) : SEND_STRING(SS_LCTRL("x")); - } - else - { - onMac ? SEND_STRING(SS_LGUI("c")) : SEND_STRING(SS_LCTRL("c")); - } - reset_tap_dance(state); -}; - -void td_paste(qk_tap_dance_state_t *state, void *user_data) -{ - if (state->count == 2) - { - onMac ? SEND_STRING(SS_DOWN(X_RSHIFT) SS_LGUI("v") SS_UP(X_RSHIFT)) : SEND_STRING(SS_DOWN(X_RSHIFT) SS_LCTRL("v") SS_UP(X_RSHIFT)); - } - else - { - onMac ? SEND_STRING(SS_LGUI("v")) : SEND_STRING(SS_LCTRL("v")); - } - reset_tap_dance(state); -}; - -//===== The awesome tap dance for CUT, COPY and PASTE letters -void dance_copy (qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 1) { tap_code16(KC_C); } - else - if (state->interrupted) { tap_code16(KC_C);tap_code16(KC_C);} - else CMD(KC_C); - - reset_tap_dance (state); -} - -void dance_cut (qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 1) { tap_code16(KC_X); } - else { CMD(KC_X); } - reset_tap_dance (state); -} - -void dance_paste (qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 1) { - tap_code16(KC_V); - } - else { - CMD(KC_V); - } - reset_tap_dance (state); -} diff --git a/users/danielo515/tap_dance.h b/users/danielo515/tap_dance.h deleted file mode 100644 index 880ad525..00000000 --- a/users/danielo515/tap_dance.h +++ /dev/null @@ -1,81 +0,0 @@ -#include "quantum.h" -extern bool CMD(uint16_t kc); -extern bool onMac; - - -#define ACTION_TAP_DANCE_DOUBLE_SAFE(kc1, kc2) { \ - .fn = { NULL, qk_tap_dance_pair_finished_safe, qk_tap_dance_pair_reset_safe }, \ - .user_data = (void *)&((qk_tap_dance_pair_t) { kc1, kc2 }), \ - } - -#ifdef QUAD_DANCE -//Enums used to clearly convey the state of the tap dance -enum { - SINGLE_TAP = 1, - SINGLE_HOLD = 2, - DOUBLE_TAP = 3, - DOUBLE_HOLD = 4, - DOUBLE_SINGLE_TAP = 5 //send SINGLE_TAP twice - NOT DOUBLE_TAP - // Add more enums here if you want for triple, quadruple, etc. -}; -int cur_dance (qk_tap_dance_state_t *state); -# endif - -enum tap_dance { - COPY_CUT, - PASTE_DANCE, - _TD_F1, - _TD_F2, - _TD_F3, - _TD_F4, - _TD_F5, - _TD_F6, - _TD_F7, - _TD_F8, - _TD_F9, - _TD_F10, - _TD_F11, - _TD_F12, - _TD_H_ENTER, - _TD_CLN, - _TD_SLASH, - // old ones - LEFT_HOME, - J_ENT, - H_MINS, - RGT_HOME, - _TD_COPY, - _TD_CUT, - _TD_PASTE, -}; -void qk_tap_dance_pair_finished_safe(qk_tap_dance_state_t *state, void *user_data); -void qk_tap_dance_pair_reset_safe(qk_tap_dance_state_t *state, void *user_data); -void td_copy_cut (qk_tap_dance_state_t *state, void *user_data); -void td_paste(qk_tap_dance_state_t *state, void *user_data); -int cur_dance (qk_tap_dance_state_t *state); -void dance_cut (qk_tap_dance_state_t *state, void *user_data); -void dance_copy (qk_tap_dance_state_t *state, void *user_data); -void dance_paste (qk_tap_dance_state_t *state, void *user_data); - -// Ready to use Tap dance definitions, just put them on your layout -#define TD_COPY TD(_TD_COPY) -#define TD_CUT TD(_TD_CUT) -#define KC_TD_COPY TD(_TD_COPY) // Declarations for macros that add KC_ -#define KC_TD_CUT TD(_TD_CUT) -#define KC_TD_PASTE TD(_TD_PASTE) -#define KC_E_GRV ES_GRV -#define TD_F1 TD(_TD_F1) -#define TD_F2 TD(_TD_F2) -#define TD_F3 TD(_TD_F3) -#define TD_F4 TD(_TD_F4) -#define TD_F5 TD(_TD_F5) -#define TD_F6 TD(_TD_F6) -#define TD_F7 TD(_TD_F7) -#define TD_F8 TD(_TD_F8) -#define TD_F9 TD(_TD_F9) -#define TD_F10 TD(_TD_F10) -#define TD_F11 TD(_TD_F11) -#define TD_F12 TD(_TD_F12) -#define H_ENTER TD(_TD_H_ENTER) -#define TD_CLN TD(_TD_CLN) -#define TD_SLASH TD(_TD_SLASH) diff --git a/users/datagrok/README.md b/users/datagrok/README.md deleted file mode 100644 index 0d58c04e..00000000 --- a/users/datagrok/README.md +++ /dev/null @@ -1,63 +0,0 @@ -# datagrok's QMK user-space code - -## cdeq "comma dot exclamation question" - -This is a hack to place `question mark` on `shift-comma` and `exclamation mark` on `shift-period`. - -When using an operating system configured for a US/qwerty layout this replaces the angle brackets `<` `>` with `?` `!`. This helps on small keyboards to keep symbols for prose co-located in one layer, and symbols for programming in another. - -It's a "hack" because the "proper" way to accomplish this would be to edit the operating system's keymap. - -### setup - -in your `keymap.c`: - - #include "feature_cdeq.h" - - bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return process_record_cdeq(keycode, record); - } - -in your `rules.mk`, - - SRC += feature_cdeq.c - -### examples - -- atreus:datagrok -- bm43a:datagrok -- mitosis:datagrok - -## base layer selector - -Defines a keycode `KF_LAYO` to rotate between available default layers. - -`Shift`+`KF_LAYO` makes the currently selected one persistent across reboots. - -This is useful if you'd like your keyboard to support and toggle between QWERTY, Dvorak, Colemak, Workman, and other layouts while keeping a common arrangement of modifier and function keys. - -Since toggling layouts seems like something one does infrequently, I wanted to be able to operate this feature with a single key, instead of one for each layer like planck:default or bootmagic. - -### setup - -in your `keymap.c`: - - #define KF_LAYO SAFE_RANGE - #include "feature_default_layers_selector.h" - const uint8_t highest_base_layer = 4; - - bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return \ - process_record_save_default_layer(keycode, record) && \ - process_record_select_default_layer(keycode, record); - } - -in your `rules.mk`, - - SRC += feature_default_layers_selector.c - -### examples - -- atreus:datagrok -- bm43a:datagrok -- mitosis:datagrok diff --git a/users/datagrok/feature_cdeq.c b/users/datagrok/feature_cdeq.c deleted file mode 100644 index c1796ab2..00000000 --- a/users/datagrok/feature_cdeq.c +++ /dev/null @@ -1,47 +0,0 @@ -// This is a hack to place on and on , when using an operating system configured for a -// US/qwerty layout. -// -// cdeq = "comma dot exclamation question" - -#include QMK_KEYBOARD_H - -bool comm_shifted = false; -bool ques_shifted = false; - -bool process_record_cdeq(uint16_t keycode, keyrecord_t *record) { - uint8_t shifted; - uint16_t s_keycode; - bool *k_shifted; - - switch (keycode) { - case KC_COMM: - s_keycode = KC_SLSH; - k_shifted = &comm_shifted; - break; - case KC_DOT: - s_keycode = KC_1; - k_shifted = &ques_shifted; - break; - default: - return true; - } - - shifted = get_mods() & (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)); - - // Keydown. If shift is currently pressed, register its alternate keycode. - if (record->event.pressed && shifted) { - *k_shifted = true; - register_code(s_keycode); - return false; - // Keyup. If shift was pressed back when the key was pressed, unregister - // its alternate keycode. - } else if (!(record->event.pressed) && *k_shifted) { - *k_shifted = false; - unregister_code(s_keycode); - return false; - // Otherwise, behave as normal. - } else { - return true; - } -} diff --git a/users/datagrok/feature_cdeq.h b/users/datagrok/feature_cdeq.h deleted file mode 100644 index ff3509b4..00000000 --- a/users/datagrok/feature_cdeq.h +++ /dev/null @@ -1,2 +0,0 @@ -#include QMK_KEYBOARD_H -bool process_record_cdeq(uint16_t keycode, keyrecord_t *record); diff --git a/users/datagrok/feature_default_layers_selector.c b/users/datagrok/feature_default_layers_selector.c deleted file mode 100644 index c83c773f..00000000 --- a/users/datagrok/feature_default_layers_selector.c +++ /dev/null @@ -1,46 +0,0 @@ -#include "feature_default_layers_selector.h" - -#ifdef AUDIO_ENABLE -#include "audio.h" -#ifdef DEFAULT_LAYER_SONGS -extern float default_layer_songs[][16][2]; -#endif -#endif - -bool process_record_save_default_layer(uint16_t keycode, keyrecord_t *record) { - -#if defined(AUDIO_ENABLE) - float saved_song[][2] = SONG(COIN_SOUND); -#endif - - if (!(keycode == KF_LAYO - && record->event.pressed - && get_mods() & (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)))) { - return true; - } - - eeconfig_update_default_layer(default_layer_state); -#if defined(AUDIO_ENABLE) - PLAY_SONG(saved_song); -#endif - return false; -} - -bool process_record_select_default_layer(uint16_t keycode, keyrecord_t *record) { - if (!(keycode == KF_LAYO - && record->event.pressed)) { - return true; - } - if (!default_layer_state) { - default_layer_set(2); - } else { - default_layer_set( - (((1U<<(highest_base_layer+1))-1) & (default_layer_state<<1)) - | (default_layer_state>>highest_base_layer)); - } - led_set(host_keyboard_leds()); -#if defined(AUDIO_ENABLE) && defined(DEFAULT_LAYER_SONGS) - PLAY_SONG(default_layer_songs[get_highest_layer(default_layer_state)]); -#endif - return false; -} diff --git a/users/datagrok/feature_default_layers_selector.h b/users/datagrok/feature_default_layers_selector.h deleted file mode 100644 index 37d82de8..00000000 --- a/users/datagrok/feature_default_layers_selector.h +++ /dev/null @@ -1,69 +0,0 @@ -#include QMK_KEYBOARD_H - -/* - Define a keycode KF_LAYO to rotate between available default layers. - Shift+KF_LAYO makes the current one persistent. - - To use: - - in your keymap.c, define KF_LAYO so it does not conflict with anything else. - then include this header and set highest_base_layer. - - #define KF_LAYO SAFE_RANGE - #include "feature_default_layers_selector.h" - - const uint8_t highest_base_layer = 4; // the index - - and in your rules.mk, - - SRC += feature_default_layers_selector.c -*/ - -/* - See https://docs.qmk.fm/#/keymap for docs about layers including the concept - of "base" or "default" layers. - - This is broken into two functions so that: - - - If you don't want to store the default layer state in eeprom, don't call - process_record_save_default_layer. - - - If you have your own mechanism for setting the default layer state (to one - or multiple layers), do that instead of process_record_select_default_layer. - - If you call both functions, call process_record_save_default_layer first. - - The QMK docs seem to assume that you will have only one layer as your - default layer at any time, but the source code actually supports an arbitrary - default_layer_state (composition of layers) - - quantum has "set_single_persistent_default_layer" but that writes to eeprom - every time you change your default layer preference. i wanted a behavior - instead which lets you switch default layers all you want, then store the - current configuration once you're happy with it. that way if you get into an - unusable state you can just unplug and replug your keyboard to escape from it. - - this code assumes: - - 1. each default layer state that you would select among consists of a single - layer, which we will call a "base" layer. - - 2. all your "base" layers are stored contiguously at the bottom of your - keymaps[] stack, and there are no non-"base" layers mixed in. - - 3. you have a maximum of 8 "base" layers. that is, the highest base layer is - index 7. - - while 16 and 32 bit platforms might allow default_layer_state to include more - and higher-numbered layers, eeconfig_update_default_layer saves only the first - 8 bits of default_layer_state to eeprom. - -*/ - -#ifndef KF_LAYO -#define KF_LAYO SAFE_RANGE -#endif - -const uint8_t highest_base_layer; -bool process_record_save_default_layer(uint16_t keycode, keyrecord_t *record); -bool process_record_select_default_layer(uint16_t keycode, keyrecord_t *record); diff --git a/users/dhertz/config.h b/users/dhertz/config.h deleted file mode 100644 index 3f7762e6..00000000 --- a/users/dhertz/config.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef USERSPACE_CONFIG_H -#define USERSPACE_CONFIG_H - -#ifdef TAPPING_TERM -#undef TAPPING_TERM -#endif // TAPPING_TERM -#define TAPPING_TERM 200 - -#endif // !USERSPACE_CONFIG_H diff --git a/users/dhertz/dhertz.c b/users/dhertz/dhertz.c deleted file mode 100644 index 9aae0125..00000000 --- a/users/dhertz/dhertz.c +++ /dev/null @@ -1,101 +0,0 @@ -#include "dhertz.h" - -// Add reconfigurable functions here, for keymap customization -// This allows for a global, userspace functions, and continued -// customization of the keymap. Use _keymap instead of _user -// functions in the keymaps -__attribute__ ((weak)) -void matrix_init_keymap(void) {} - -__attribute__ ((weak)) -void matrix_scan_keymap(void) {} - -__attribute__ ((weak)) -bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { - return true; -} -__attribute__ ((weak)) -uint32_t layer_state_set_keymap (uint32_t state) { - return state; -} -__attribute__ ((weak)) -void led_set_keymap(uint8_t usb_led) {} - -__attribute__ ((weak)) -void action_function_keymap(keyrecord_t *record, uint8_t id, uint8_t opt) {} - -// Call user matrix init, then call the keymap's init function -void matrix_init_user(void) { - matrix_init_keymap(); -} - -// No global matrix scan code, so just run keymap's matix -// scan function -void matrix_scan_user(void) { - matrix_scan_keymap(); -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch(keycode) { - case CMD_TAB_CMD: - mod_or_mod_with_macro(record, KC_LGUI, SS_TAP(X_TAB)); - return false; - case CMD_GRV_CMD: - mod_or_mod_with_macro(record, KC_RGUI, SS_TAP(X_GRAVE)); - return false; - } - - if (record->event.pressed) { - switch(keycode) { - case HSH_TLD: - if (get_mods()&(MOD_BIT(KC_LSFT)|MOD_BIT(KC_RSFT))) { - SEND_STRING(SS_TAP(X_NONUS_BSLASH)); - } else { - SEND_STRING(SS_LALT("3")); - } - break; - case CTRL_A: - SEND_STRING(SS_LCTRL("a")); - break; - case CMD_ALT_C: - SEND_STRING(SS_LGUI(SS_LALT("c"))); - break; - case CMD_SFT_L: - SEND_STRING(SS_LGUI("L")); - break; - case ISO_COUNTRY_CODE: - SEND_STRING("country_iso_alpha2_code"); - break; - default: - return process_record_keymap(keycode, record); - } - return false; - } - return process_record_keymap(keycode, record); -} - -static uint16_t sunds_timer; - -void mod_or_mod_with_macro(keyrecord_t *record, uint16_t kc_mod, char* macro) { - if (record->event.pressed) { - sunds_timer = timer_read(); - register_code(kc_mod); - } else { - if (timer_elapsed(sunds_timer) < TAPPING_TERM) { - send_string(macro); - } - unregister_code(kc_mod); - } -} - -// Runs state check and changes underglow color and animation -// on layer change, no matter where the change was initiated -// Then runs keymap's layer change check -uint32_t layer_state_set_user (uint32_t state) { - return layer_state_set_keymap (state); -} - -void led_set_user(uint8_t usb_led) { - led_set_keymap(usb_led); -} - diff --git a/users/dhertz/dhertz.h b/users/dhertz/dhertz.h deleted file mode 100644 index aef613f5..00000000 --- a/users/dhertz/dhertz.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef USERSPACE -#define USERSPACE - -#include "quantum.h" - -#define SRCH_CTL CTL_T(KC_F19) -#define LYR_SPC LT(1, KC_SPC) -#define NC_CTL CTL_T(KC_F18) - -enum custom_keycodes { - HSH_TLD = SAFE_RANGE, - CTRL_A, - CMD_ALT_C, - CMD_SFT_L, - ISO_COUNTRY_CODE, - CMD_TAB_CMD, - CMD_GRV_CMD, - NEW_SAFE_RANGE, -}; - -void mod_or_mod_with_macro(keyrecord_t *record, uint16_t kc_mod, char* cmd_or_macro); - -#endif diff --git a/users/dhertz/rules.mk b/users/dhertz/rules.mk deleted file mode 100644 index 0643edfa..00000000 --- a/users/dhertz/rules.mk +++ /dev/null @@ -1 +0,0 @@ -SRC += dhertz.c diff --git a/users/doogle999/doogle999.c b/users/doogle999/doogle999.c deleted file mode 100644 index 320de7cf..00000000 --- a/users/doogle999/doogle999.c +++ /dev/null @@ -1,460 +0,0 @@ -#include "doogle999.h" - -static unsigned char inputLocation = 0; // Current index in text input - -static double calc(const char input[CALC_BUFFER_SIZE +1]) // Finds value of input char array, relatively small and fast I think -{ - char inputToken[CALC_BUFFER_SIZE + 1]; // Input buffer, used when a single token (generally a number) takes up more - unsigned char inputTokenLocation = 0, inputLocation = 0; // Keep track of indices - - struct Token tokens[CALC_BUFFER_SIZE + 1]; // Input, converted to tokens, one extra large to accomodate for possible negative sign then open parenthesis as first character - unsigned char tokenCount = 0; // Keep track of index - - bool dashAsMinus = false; // Kind of a hacky solution to determining whether to treat a dash as a minus sign or a negative sign - - while(inputLocation < CALC_BUFFER_SIZE + 1) - { - char digit = input[inputLocation]; - - if(inputLocation == 0 && input[inputLocation] == CALC_CHAR_SUB && input[inputLocation + 1] == CALC_CHAR_BEG) - { - tokens[tokenCount].raw.num = 0; - tokens[tokenCount].isNum = true; - - tokenCount++; - dashAsMinus = true; - } - - if ((digit >= '0' && digit <= '9') || /* valid digit */ - (inputTokenLocation != 0 && input[inputLocation] == CALC_CHAR_DEC) || /* valid floating point */ - (!dashAsMinus && inputTokenLocation == 0 && input[inputLocation] == CALC_CHAR_SUB)) /* - is negative sign */ - { - inputToken[inputTokenLocation] = input[inputLocation]; - inputTokenLocation++; - inputLocation++; - continue; - } - - if(inputTokenLocation != 0) - { - // sscanf(inputToken, "%lf", &tokens[tokenCount].raw.num); // I would like to use sscanf here, but the small version of stdio.h on the chip doesn't allow sscanf or its sister functions to be used to process floats - tokens[tokenCount].raw.num = atof(inputToken); - tokens[tokenCount].isNum = true; - for(unsigned char i = 0; i < inputTokenLocation + 1; i++) - { - inputToken[i] = '\0'; - } - inputTokenLocation = 0; - tokenCount++; - dashAsMinus = true; - continue; - } - - /* inputTokenLocation == 0 */ - tokens[tokenCount].isNum = false; - tokens[tokenCount].raw.op.c = input[inputLocation]; - tokens[tokenCount].raw.op.priority = 0; - tokens[tokenCount].raw.op.ltr = true; - dashAsMinus = false; - - switch(input[inputLocation]) - { - case CALC_CHAR_BEG: - break; - case CALC_CHAR_END: - dashAsMinus = true; - break; - case CALC_CHAR_ADD: - tokens[tokenCount].raw.op.priority = CALC_PRIO_ADD; - break; - case CALC_CHAR_SUB: - tokens[tokenCount].raw.op.priority = CALC_PRIO_SUB; - break; - case CALC_CHAR_MUL: - tokens[tokenCount].raw.op.priority = CALC_PRIO_MUL; - break; - case CALC_CHAR_DIV: - tokens[tokenCount].raw.op.priority = CALC_PRIO_DIV; - break; - case CALC_CHAR_EXP: - tokens[tokenCount].raw.op.priority = CALC_PRIO_EXP; - tokens[tokenCount].raw.op.ltr = false; - break; - case CALC_CHAR_SIN: - case CALC_CHAR_COS: - case CALC_CHAR_TAN: - case CALC_CHAR_ASN: - case CALC_CHAR_ACS: - case CALC_CHAR_ATN: - case CALC_CHAR_LGE: - case CALC_CHAR_LOG: - case CALC_CHAR_SQT: - break; - case CALC_CHAR_EUL: - tokens[tokenCount].isNum = true; - tokens[tokenCount].raw.num = CALC_VALU_EUL; - dashAsMinus = true; - break; - case CALC_CHAR_PI: - tokens[tokenCount].isNum = true; - tokens[tokenCount].raw.num = CALC_VALU_PI; - dashAsMinus = true; - break; - case '\0': - tokenCount--; - inputLocation = CALC_BUFFER_SIZE; - break; - default: - tokenCount--; - break; - } - tokenCount++; - inputLocation++; - } - - struct Token output[CALC_BUFFER_SIZE + 1]; // Final output tokens before evaluation - struct Token opstack[CALC_BUFFER_SIZE + 1]; // Stack of operators - unsigned char outputLocation = 0, opstackLocation = 0; // Keep track of indices - - unsigned char numBrackets = 0; // The number of parenthesis - - for(unsigned char i = 0; i < tokenCount; i++) - { - if(tokens[i].isNum) - { - output[outputLocation] = tokens[i]; - outputLocation++; - } - else if(tokens[i].raw.op.c == CALC_CHAR_BEG) - { - opstack[opstackLocation] = tokens[i]; - opstackLocation++; - } - else if(tokens[i].raw.op.c == CALC_CHAR_END) - { - while(opstack[opstackLocation - 1].raw.op.c != CALC_CHAR_BEG) - { - output[outputLocation] = opstack[opstackLocation - 1]; - outputLocation++; - opstackLocation--; - } - opstackLocation--; - - numBrackets += 2; - } - else if(tokens[i].raw.op.priority == 0) - { - opstack[opstackLocation] = tokens[i]; - opstackLocation++; - } - else - { - while(opstackLocation != 0 - && (opstack[opstackLocation - 1].raw.op.priority == 0 - || tokens[i].raw.op.priority < opstack[opstackLocation - 1].raw.op.priority - || (tokens[i].raw.op.priority == opstack[opstackLocation - 1].raw.op.priority && opstack[opstackLocation - 1].raw.op.ltr)) - && opstack[opstackLocation - 1].raw.op.c != CALC_CHAR_BEG) - { - output[outputLocation] = opstack[opstackLocation - 1]; - outputLocation++; - opstackLocation--; - } - opstack[opstackLocation] = tokens[i]; - opstackLocation++; - } - } - - tokenCount -= numBrackets; - - for(signed char i = opstackLocation - 1; i >= 0; i--) - { - output[outputLocation] = opstack[i]; - outputLocation++; - opstackLocation--; - } - - double answer[CALC_BUFFER_SIZE]; - unsigned char answerLocation = 0; - - for(unsigned char i = 0; i < tokenCount; i++) - { - if(output[i].isNum) - { - answer[answerLocation] = output[i].raw.num; - answerLocation++; - continue; - } - - if(output[i].raw.op.priority == 0) - { - if (answerLocation < 1) { /* not handled here -- ERROR? */ } else - if(answerLocation >= 1) - { - double (*op)(double); - switch(output[i].raw.op.c) - { - case CALC_CHAR_SIN: - op = sin; - break; - case CALC_CHAR_COS: - op = cos; - break; - case CALC_CHAR_TAN: - op = tan; - break; - case CALC_CHAR_ASN: - op = asin; - break; - case CALC_CHAR_ACS: - op = acos; - break; - case CALC_CHAR_ATN: - op = atan; - break; - case CALC_CHAR_LGE: - op = log; - break; - case CALC_CHAR_LOG: - op = log10; - break; - case CALC_CHAR_SQT: - op = sqrt; - break; - default: - continue; /* invalid input */ - } - answer[answerLocation - 1] = op(answer[answerLocation - 1]); - } - } - /* priority != 0 */ - else if(answerLocation >= 2) - { - switch(output[i].raw.op.c) - { - case CALC_CHAR_ADD: - answer[answerLocation - 2] += answer[answerLocation - 1]; - break; - case CALC_CHAR_SUB: - answer[answerLocation - 2] -= answer[answerLocation - 1]; - break; - case CALC_CHAR_MUL: - answer[answerLocation - 2] *= answer[answerLocation - 1]; - break; - case CALC_CHAR_DIV: - answer[answerLocation - 2] /= answer[answerLocation - 1]; - break; - case CALC_CHAR_EXP: - answer[answerLocation - 2] = pow(answer[answerLocation - 2], answer[answerLocation - 1]); - break; - } - - answerLocation--; - } - } - - return answer[0]; -} - -/* - * @returns 0 when nothing should happen and QMK should work as usual - * @returns -1 when invalid input was given, QMK should ignore it - * @returns -2 when BSP should be done - * @returns -3 when CALC should be done - * @returns -4 when ENDCALC should be done - * @returns positive value of CALC_* when normal input was processed - */ -static int process_input(const uint16_t keycode, const uint8_t mods, const keyevent_t event) -{ - /* handle even when no key was pressed */ - if(!event.pressed) - { - switch(keycode) - { - /* QMK should handle those */ - case KC_RSFT: - case KC_LSFT: - return 0; - break; - } - /* ??? ignore */ - return -1; - } - - /* when shift key is pressed handle characters differently */ - char characterPressed; - if((get_mods() & MODS_SHIFT_MASK)) - { - switch(keycode) - { - case KC_9: - characterPressed = CALC_CHAR_BEG; - break; - case KC_0: - characterPressed = CALC_CHAR_END; - break; - case KC_EQUAL: - characterPressed = CALC_CHAR_ADD; - break; - case KC_KP_PLUS: - characterPressed = CALC_CHAR_ADD; - break; - case KC_6: - characterPressed = CALC_CHAR_EXP; - break; - case KC_8: - characterPressed = CALC_CHAR_MUL; - break; - case KC_KP_ASTERISK: - characterPressed = CALC_CHAR_MUL; - break; - case KC_S: - characterPressed = CALC_CHAR_ASN; - break; - case KC_C: - characterPressed = CALC_CHAR_ACS; - break; - case KC_T: - characterPressed = CALC_CHAR_ATN; - break; - case KC_L: - characterPressed = CALC_CHAR_LOG; - break; - default: - return -1; - break; - } - return characterPressed; - } - - /* normal key handling: shift not pressed */ - - /* digits */ - if (keycode == KC_KP_0 || keycode == KC_0) { - return '0'; - } else if (keycode >= KC_KP_1 && keycode <= KC_KP_9) { - return keycode - KC_KP_1 +1 + '0'; - } else if (keycode >= KC_1 && keycode <= KC_9) { - return keycode - KC_1 +1 + '0'; - } - - /* other tokens */ - switch (keycode) { - case KC_MINUS: - case KC_KP_MINUS: - return characterPressed = CALC_CHAR_SUB; - case KC_SLASH: - case KC_KP_SLASH: - return characterPressed = CALC_CHAR_DIV; - case KC_S: - return characterPressed = CALC_CHAR_SIN; - case KC_C: - return characterPressed = CALC_CHAR_COS; - case KC_T: - return characterPressed = CALC_CHAR_TAN; - case KC_Q: - return characterPressed = CALC_CHAR_SQT; - case KC_L: - return characterPressed = CALC_CHAR_LGE; - case KC_DOT: - case KC_KP_DOT: - return characterPressed = CALC_CHAR_DEC; - case KC_P: - return characterPressed = CALC_CHAR_PI; - case KC_E: - return characterPressed = CALC_CHAR_EUL; - case KC_BSPC: - return -2; - case KC_RSFT: - return 0; - case KC_LSFT: - return 0; - case CALC: - return -3; - case ENDCALC: - return -4; - default: - return -1; - } -} - -bool process_record_user(uint16_t keycode, keyrecord_t* record) -{ - static char text[CALC_BUFFER_SIZE + 1]; // Used to store input and then output when ready to print - static char backspaceText[CALC_BUFFER_SIZE + 1]; // Pretty dumb waste of memory because only backspace characters, used with send_string to backspace and remove input - - if((biton32(layer_state) == CALC_LAYER && CALC_FORCE_NUM_LOCK_INSIDE_CALC) || (biton32(layer_state) != CALC_LAYER && CALC_FORCE_NUM_LOCK_OUTSIDE_CALC)) - { - bool numpadKeyPressed = record->event.pressed && - !(get_mods() & MODS_SHIFT_MASK) && - /* KC_KP_1, KC_KP_2, ..., KC_KP_0, KC_KP_DOT */ - (keycode >= KC_KP_1 && keycode <= KC_KP_DOT); - - if(numpadKeyPressed && !(host_keyboard_leds() & (1 << USB_LED_NUM_LOCK))) - { - add_key(KC_NLCK); - send_keyboard_report(); - del_key(KC_NLCK); - } - } - - if(biton32(layer_state) != CALC_LAYER) { return true; } - - int action = process_input(keycode, get_mods(), record->event); - switch(action) - { - case 0: - return true; - case -1: - return false; - case -2: - if(inputLocation > 0) - { - inputLocation--; - text[inputLocation] = '\0'; - backspaceText[0] = (char)8; - backspaceText[1] = '\0'; - send_string(backspaceText); - } - return false; - case -3: - for(int i = 0; i < inputLocation; i++) - { - backspaceText[i] = (char)8; - } - send_string(backspaceText); - dtostrf(calc(text), CALC_PRINT_SIZE, CALC_PRINT_SIZE, text); - send_string(text); - for(unsigned char i = 0; i < CALC_BUFFER_SIZE; i++) - { - text[i] = '\0'; - backspaceText[i] = '\0'; - } - inputLocation = 0; - return false; - case -4: - for(unsigned char i = 0; i < CALC_BUFFER_SIZE; i++) - { - text[i] = '\0'; - backspaceText[i] = '\0'; - } - inputLocation = 0; - layer_off(CALC_LAYER); - return false; - default: - break; - } - char characterPressed = (char)action; - - if(inputLocation < CALC_BUFFER_SIZE) - { - text[inputLocation] = characterPressed; - inputLocation++; - - char characterToSend[2]; - characterToSend[0] = characterPressed; - characterToSend[1] = '\0'; - - send_string(characterToSend); - } - return false; -} \ No newline at end of file diff --git a/users/doogle999/doogle999.h b/users/doogle999/doogle999.h deleted file mode 100644 index 7ed38fbc..00000000 --- a/users/doogle999/doogle999.h +++ /dev/null @@ -1,99 +0,0 @@ -#ifndef USERSPACE -#define USERSPACE - -#include "quantum.h" - -#define NO_ACTION_ONESHOT -#define NO_ACTION_MACRO - -#define MODS_SHIFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) - -// Layer the calculator is on -#define CALC_LAYER 2 - -// Inside is whether when you are in calc mode it should automatically force numlock, outside is whether it should do it outside of calculator mode -#define CALC_FORCE_NUM_LOCK_INSIDE_CALC true -#define CALC_FORCE_NUM_LOCK_OUTSIDE_CALC true - -// Maximum number of characters the calculator can have -#define CALC_BUFFER_SIZE 32 - -// Minimum width of the printed text / the number of decimal places -#define CALC_PRINT_SIZE 6 - -/*----- - Special ------*/ -#define CALC_CHAR_BEG '(' -#define CALC_CHAR_END ')' -#define CALC_CHAR_DEC '.' - -/*----- - Operators - Can add more here such as modulo %, factorial ! ------*/ -#define CALC_CHAR_ADD '+' -#define CALC_PRIO_ADD 1 - -#define CALC_CHAR_SUB '-' -#define CALC_PRIO_SUB 1 - -#define CALC_CHAR_MUL '*' -#define CALC_PRIO_MUL 2 - -#define CALC_CHAR_DIV '/' -#define CALC_PRIO_DIV 2 - -#define CALC_CHAR_EXP '^' -#define CALC_PRIO_EXP 3 - -/*----- - Functions ------*/ -#define CALC_CHAR_SIN 's' -#define CALC_CHAR_COS 'c' -#define CALC_CHAR_TAN 't' - -#define CALC_CHAR_ASN 'S' -#define CALC_CHAR_ACS 'C' -#define CALC_CHAR_ATN 'T' - -#define CALC_CHAR_LGE 'l' -#define CALC_CHAR_LOG 'L' - -#define CALC_CHAR_SQT 'q' - -/*----- - Constants ------*/ -#define CALC_CHAR_EUL 'e' -#define CALC_VALU_EUL 2.71828182845904523536 - -#define CALC_CHAR_PI 'p' -#define CALC_VALU_PI 3.14159265358979323846 - -struct OP // Operator/function -{ - char c; - unsigned char priority; - bool ltr; -}; - -union TokenRaw // A token after the input has been processed, can either be a number or an operator/function -{ - double num; - struct OP op; -}; - -struct Token // Encapsulator -{ - bool isNum; - union TokenRaw raw; -}; - -enum CalcFunctions // Hardware calculator key functionality -{ - CALC = SAFE_RANGE, - ENDCALC -}; - -#endif diff --git a/users/doogle999/readme.md b/users/doogle999/readme.md deleted file mode 100644 index e108555b..00000000 --- a/users/doogle999/readme.md +++ /dev/null @@ -1,41 +0,0 @@ -Copyright 2018 @doogle999 - -Overview -======== - -This folder is just for some calculator code for my keyboards. - -Making Your Keyboard Into A Calculator --------------------------------------- - -If you'd like to make your keyboard into a calculator, you can do it with this userspace (hopefully!) - -You can make a keymap for your keyboard of choice named doogle999 and then you can make it regularly. - -You should make one layer that is just the functionality for your calculator, so it just has the keys you need (numbers, symbols, some letters for functions). It should also have END_CALC and CALC somewhere. END_CALC gets you out of calculator mode, and CALC evaluates the calculation. - -On one of your other keymaps you should make a key that is TO(layer of calculator). This is how you will activate the calculator. You should also define the layer your calculator is on with the define CALC_LAYER in doogle999.h (this means that for all your keyboards, your calculator layer has to be the same layer). - -You can change what characters coorespond to what operators and functions and you can add more functions in doogle999.h and doogle999.c, you can also change which characters are sued for which keys. However, as of now standard keys should be used for operations. By that I mean if you want your multiplication sign to be an x, you should change the CALC_CHAR_MUL to an x but you should keep your multiplication keycode on the keymap either as KC_8 (shifted) or KC_KP_ASTERISK. This might be changed in the future so there are custom keycodes so this is less of a pain and more intuitive. - -You can look at my dz60 keymap doogle999 for an example. - -Issues ------- -Unfortunately the chip onboard my dz60 only does single precision floating point numbers, but I have everything set up as double so if your chip supports doubles it should work for you. - -This Was Here When I Made The ReadMe ------------------------------------- - -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 . \ No newline at end of file diff --git a/users/doogle999/rules.mk b/users/doogle999/rules.mk deleted file mode 100644 index 12698a27..00000000 --- a/users/doogle999/rules.mk +++ /dev/null @@ -1,14 +0,0 @@ -SRC += doogle999.c - -CFLAGS += -fstrict-aliasing -ftree-vrp - -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -AUDIO_ENABLE = no -RGBLIGHT_ENABLE = yes diff --git a/users/drashna/config.h b/users/drashna/config.h index 6fafff86..64b4b64a 100644 --- a/users/drashna/config.h +++ b/users/drashna/config.h @@ -1,7 +1,7 @@ #pragma once // Use custom magic number so that when switching branches, EEPROM always gets reset -#define EECONFIG_MAGIC_NUMBER (uint16_t)0x1337 +#define EECONFIG_MAGIC_NUMBER (uint16_t)0x1338 /* Set Polling rate to 1000Hz */ #define USB_POLLING_INTERVAL_MS 1 @@ -21,7 +21,7 @@ # define AUDIO_CLICKY_FREQ_RANDOMNESS 1.5f -# define UNICODE_SONG_OSX SONG(RICK_ROLL) +# define UNICODE_SONG_MAC SONG(RICK_ROLL) # define UNICODE_SONG_LNX SONG(RICK_ROLL) # define UNICODE_SONG_WIN SONG(RICK_ROLL) # define UNICODE_SONG_BSD SONG(RICK_ROLL) @@ -52,6 +52,7 @@ # if defined(__AVR__) && !defined(__AVR_AT90USB1286__) # define DISABLE_RGB_MATRIX_ALPHAS_MODS # define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define DISABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT # define DISABLE_RGB_MATRIX_BREATHING # define DISABLE_RGB_MATRIX_BAND_SAT # define DISABLE_RGB_MATRIX_BAND_VAL diff --git a/users/drashna/drashna.c b/users/drashna/drashna.c index 1a4ee9b4..ba19d480 100644 --- a/users/drashna/drashna.c +++ b/users/drashna/drashna.c @@ -18,12 +18,6 @@ along with this program. If not, see . #include "drashna.h" userspace_config_t userspace_config; -#if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE)) -# define DRASHNA_UNICODE_MODE UC_WIN -#else -// set to 2 for UC_WIN, set to 4 for UC_WINC -# define DRASHNA_UNICODE_MODE 2 -#endif bool mod_key_press_timer(uint16_t code, uint16_t mod_code, bool pressed) { static uint16_t this_timer; @@ -93,19 +87,17 @@ void matrix_init_user(void) { DDRB &= ~(1 << 0); PORTB &= ~(1 << 0); #endif - -#if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE)) - set_unicode_input_mode(DRASHNA_UNICODE_MODE); - get_unicode_input_mode(); -#endif // UNICODE_ENABLE matrix_init_keymap(); } __attribute__((weak)) void keyboard_post_init_keymap(void) {} void keyboard_post_init_user(void) { -#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) - keyboard_post_init_rgb(); +#if defined(RGBLIGHT_ENABLE) + keyboard_post_init_rgb_light(); +#endif +#if defined(RGB_MATRIX_ENABLE) + keyboard_post_init_rgb_matrix(); #endif keyboard_post_init_keymap(); } @@ -155,9 +147,12 @@ void matrix_scan_user(void) { run_diablo_macro_check(); #endif // TAP_DANCE_ENABLE -#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) - matrix_scan_rgb(); +#if defined(RGBLIGHT_ENABLE) + matrix_scan_rgb_light(); #endif // RGBLIGHT_ENABLE +#if defined(RGB_MATRIX_ENABLE) + matrix_scan_rgb_matrix(); +#endif matrix_scan_keymap(); } @@ -168,8 +163,8 @@ __attribute__((weak)) layer_state_t layer_state_set_keymap(layer_state_t state) // Then runs keymap's layer change check layer_state_t layer_state_set_user(layer_state_t state) { state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST); -#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) - state = layer_state_set_rgb(state); +#if defined(RGBLIGHT_ENABLE) + state = layer_state_set_rgb_light(state); #endif // RGBLIGHT_ENABLE return layer_state_set_keymap(state); } @@ -200,12 +195,6 @@ void eeconfig_init_user(void) { userspace_config.raw = 0; userspace_config.rgb_layer_change = true; eeconfig_update_user(userspace_config.raw); -#if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE)) - set_unicode_input_mode(DRASHNA_UNICODE_MODE); - get_unicode_input_mode(); -#else - eeprom_update_byte(EECONFIG_UNICODEMODE, DRASHNA_UNICODE_MODE); -#endif eeconfig_init_keymap(); keyboard_init(); } diff --git a/users/drashna/drashna.h b/users/drashna/drashna.h index 0ba18176..c10ea511 100644 --- a/users/drashna/drashna.h +++ b/users/drashna/drashna.h @@ -25,9 +25,15 @@ along with this program. If not, see . #ifdef TAP_DANCE_ENABLE # include "tap_dances.h" #endif // TAP_DANCE_ENABLE -#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) +#if defined(RGBLIGHT_ENABLE) # include "rgb_stuff.h" #endif +#if defined(RGB_MATRIX_ENABLE) +# include "rgb_matrix_stuff.h" +#endif +#if defined(OLED_DRIVER_ENABLE) +# include "oled_stuff.h" +#endif /* Define layer names */ enum userspace_layers { @@ -70,7 +76,6 @@ typedef union { bool rgb_layer_change :1; bool is_overwatch :1; bool nuke_switch :1; - uint8_t unicode_mod :4; bool swapped_numbers :1; bool rgb_matrix_idle_anim :1; }; diff --git a/users/drashna/oled_stuff.c b/users/drashna/oled_stuff.c new file mode 100644 index 00000000..7580de1d --- /dev/null +++ b/users/drashna/oled_stuff.c @@ -0,0 +1,278 @@ +#include "drashna.h" + +extern uint8_t is_master; + +#ifndef KEYLOGGER_LENGTH +// # ifdef OLED_DISPLAY_128X64 +# define KEYLOGGER_LENGTH ((int)(OLED_DISPLAY_HEIGHT / OLED_FONT_WIDTH)) +// # else +// # define KEYLOGGER_LENGTH (uint8_t *(OLED_DISPLAY_WIDTH / OLED_FONT_HEIGHT)) +// # endif +#endif + +static uint32_t oled_timer = 0; +static char keylog_str[KEYLOGGER_LENGTH + 1] = {"\n"}; +static uint16_t log_timer = 0; + +// clang-format off +static const char PROGMEM code_to_name[0xFF] = { +// 0 1 2 3 4 5 6 7 8 9 A B c D E F + ' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', // 0x + 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '1', '2', // 1x + '3', '4', '5', '6', '7', '8', '9', '0', 20, 19, 27, 26, 22, '-', '=', '[', // 2x + ']','\\', '#', ';','\'', '`', ',', '.', '/', 128, ' ', ' ', ' ', ' ', ' ', ' ', // 3x + ' ', ' ', ' ', ' ', ' ', ' ', 'P', 'S', ' ', ' ', ' ', ' ', 16, ' ', ' ', ' ', // 4x + ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 5x + ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 6x + ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 7x + ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 8x + ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 9x + ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Ax + ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Bx + ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Cx + ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Dx + 'C', 'S', 'A', 'C', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Ex + ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' // Fx +}; +// clang-format on + +void add_keylog(uint16_t keycode) { + if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX) || (keycode >= QK_MODS && keycode <= QK_MODS_MAX)) { + keycode = keycode & 0xFF; + } else if (keycode > 0xFF) { + keycode = 0; + } + + for (uint8_t i = (KEYLOGGER_LENGTH - 1); i > 0; --i) { + keylog_str[i] = keylog_str[i - 1]; + } + + if (keycode < (sizeof(code_to_name) / sizeof(char))) { + keylog_str[0] = pgm_read_byte(&code_to_name[keycode]); + } + + log_timer = timer_read(); +} + +bool process_record_user_oled(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { +#ifdef OLED_DRIVER_ENABLE + oled_timer = timer_read32(); + add_keylog(keycode); +#endif + } + return true; +} + +void update_log(void) { + if (timer_elapsed(log_timer) > 750) { + // add_keylog(0); + } +} + +void render_keylogger_status(void) { + oled_write_P(PSTR(OLED_RENDER_KEYLOGGER), false); + oled_write(keylog_str, false); +} + +void render_default_layer_state(void) { + oled_write_P(PSTR(OLED_RENDER_LAYOUT_NAME), false); + switch (get_highest_layer(default_layer_state)) { + case _QWERTY: + oled_write_P(PSTR(OLED_RENDER_LAYOUT_QWERTY), false); + break; + case _COLEMAK: + oled_write_P(PSTR(OLED_RENDER_LAYOUT_COLEMAK), false); + break; + case _DVORAK: + oled_write_P(PSTR(OLED_RENDER_LAYOUT_DVORAK), false); + break; + case _WORKMAN: + oled_write_P(PSTR(OLED_RENDER_LAYOUT_WORKMAN), false); + break; + case _NORMAN: + oled_write_P(PSTR(OLED_RENDER_LAYOUT_NORMAN), false); + break; + case _MALTRON: + oled_write_P(PSTR(OLED_RENDER_LAYOUT_MALTRON), false); + break; + case _EUCALYN: + oled_write_P(PSTR(OLED_RENDER_LAYOUT_EUCALYN), false); + break; + case _CARPLAX: + oled_write_P(PSTR(OLED_RENDER_LAYOUT_CARPLAX), false); + break; + } +#ifdef OLED_DISPLAY_128X64 + oled_advance_page(true); +#endif +} + +void render_layer_state(void) { + oled_write_P(PSTR(OLED_RENDER_LAYER_NAME), false); +#ifdef OLED_DISPLAY_128X64 + oled_write_P(PSTR(" "), false); +#endif + oled_write_P(PSTR(OLED_RENDER_LAYER_LOWER), layer_state_is(_LOWER)); +#ifdef OLED_DISPLAY_128X64 + oled_write_P(PSTR(" "), false); +#endif + oled_write_P(PSTR(OLED_RENDER_LAYER_RAISE), layer_state_is(_RAISE)); +#if _MODS +# ifdef OLED_DISPLAY_128X64 + oled_write_P(PSTR(" "), false); +# endif + oled_write_P(PSTR(OLED_RENDER_LAYER_MODS), layer_state_is(_MODS)); +#endif +#ifdef OLED_DISPLAY_128X64 + oled_advance_page(true); +#endif +} + +void render_keylock_status(uint8_t led_usb_state) { + oled_write_P(PSTR(OLED_RENDER_LOCK_NAME), false); + oled_write_P(PSTR(" "), false); + oled_write_P(PSTR(OLED_RENDER_LOCK_NUML), led_usb_state & (1 << USB_LED_NUM_LOCK)); +#ifdef OLED_DISPLAY_128X64 + oled_write_P(PSTR(" "), false); +#endif + oled_write_P(PSTR(OLED_RENDER_LOCK_CAPS), led_usb_state & (1 << USB_LED_CAPS_LOCK)); +#ifdef OLED_DISPLAY_128X64 + oled_write_P(PSTR(" "), false); +#endif + oled_write_P(PSTR(OLED_RENDER_LOCK_SCLK), led_usb_state & (1 << USB_LED_SCROLL_LOCK)); +#ifndef OLED_DISPLAY_128X64 + oled_advance_page(true); +#endif +} + +void render_mod_status(uint8_t modifiers) { + oled_write_P(PSTR(OLED_RENDER_MODS_NAME), false); + oled_write_P(PSTR(OLED_RENDER_MODS_SFT), (modifiers & MOD_MASK_SHIFT)); +#ifdef OLED_DISPLAY_128X64 + oled_write_P(PSTR(" "), false); +#endif + oled_write_P(PSTR(OLED_RENDER_MODS_CTL), (modifiers & MOD_MASK_CTRL)); +#ifdef OLED_DISPLAY_128X64 + oled_write_P(PSTR(" "), false); +#endif + oled_write_P(PSTR(OLED_RENDER_MODS_ALT), (modifiers & MOD_MASK_ALT)); +#ifdef OLED_DISPLAY_128X64 + oled_write_P(PSTR(" "), false); +#endif + oled_write_P(PSTR(OLED_RENDER_MODS_GUI), (modifiers & MOD_MASK_GUI)); +} + +void render_bootmagic_status(void) { + /* Show Ctrl-Gui Swap options */ + static const char PROGMEM logo[][2][3] = { + {{0x97, 0x98, 0}, {0xb7, 0xb8, 0}}, + {{0x95, 0x96, 0}, {0xb5, 0xb6, 0}}, + }; + + oled_write_P(PSTR(OLED_RENDER_BOOTMAGIC_NAME), false); +#ifdef OLED_DISPLAY_128X64 + if (keymap_config.swap_lctl_lgui) +#else + oled_write_P(PSTR(" "), false); +#endif + { + oled_write_P(logo[1][0], false); +#ifdef OLED_DISPLAY_128X64 + } else { +#endif + oled_write_P(logo[0][0], false); + } + oled_write_P(PSTR(" "), false); +#ifdef OLED_DISPLAY_128X64 + oled_write_P(PSTR(OLED_RENDER_BOOTMAGIC_NKRO), keymap_config.nkro); + oled_write_P(PSTR(" "), false); + oled_write_ln_P(PSTR(OLED_RENDER_BOOTMAGIC_NOGUI), !keymap_config.no_gui); + oled_write_P(PSTR("Magic "), false); + if (keymap_config.swap_lctl_lgui) +#endif + { + oled_write_P(logo[1][1], false); +#ifdef OLED_DISPLAY_128X64 + } else { +#endif + oled_write_P(logo[0][1], false); + } + oled_write_P(PSTR(" "), false); +#ifdef OLED_DISPLAY_128X64 + oled_write_P(PSTR(OLED_RENDER_BOOTMAGIC_GRV), keymap_config.swap_grave_esc); + oled_write_P(PSTR(" "), false); + oled_write_P(PSTR(OLED_RENDER_BOOTMAGIC_CAPS), keymap_config.swap_control_capslock); + oled_advance_page(true); +#else + oled_write_P(PSTR(OLED_RENDER_BOOTMAGIC_NKRO), keymap_config.nkro); +#endif +} + +void render_user_status(void) { + oled_write_P(PSTR(OLED_RENDER_USER_NAME), false); + oled_write_P(PSTR(" "), false); + oled_write_P(PSTR(OLED_RENDER_USER_ANIM), userspace_config.rgb_matrix_idle_anim); + oled_write_P(PSTR(" "), false); + oled_write_P(PSTR(OLED_RENDER_USER_LAYR), userspace_config.rgb_layer_change); + oled_write_P(PSTR(" "), false); + oled_write_P(PSTR(OLED_RENDER_USER_NUKE), userspace_config.nuke_switch); +#ifdef OLED_DISPLAY_128X64 + oled_advance_page(true); +#endif +} + +__attribute__((weak)) void oled_driver_render_logo(void) { + // clang-format off + static const char PROGMEM qmk_logo[] = { + 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, + 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, + 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0}; + // clang-format on + oled_write_P(qmk_logo, false); +} + +void render_status_secondary(void) { +#if !defined(SPLIT_TRANSPORT_MIRROR) || defined(OLED_DRIVER_128x64) + oled_driver_render_logo(); +#endif +#ifdef SPLIT_TRANSPORT_MIRROR + /* Show Keyboard Layout */ + render_default_layer_state(); + render_layer_state(); + render_mod_status(get_mods() | get_oneshot_mods()); + render_keylogger_status(); + +#endif +} +// clang-format on + +void render_status_main(void) { + /* Show Keyboard Layout */ + render_default_layer_state(); + render_keylock_status(host_keyboard_leds()); + render_bootmagic_status(); + render_user_status(); + + render_keylogger_status(); +} + +void oled_task_user(void) { + if (timer_elapsed32(oled_timer) > 30000) { + oled_off(); + return; + } +#ifndef SPLIT_KEYBOARD + else { + oled_on(); + } +#endif + + update_log(); + + if (is_master) { + render_status_main(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) + } else { + render_status_secondary(); + } +} diff --git a/users/drashna/oled_stuff.h b/users/drashna/oled_stuff.h new file mode 100644 index 00000000..662e206b --- /dev/null +++ b/users/drashna/oled_stuff.h @@ -0,0 +1,91 @@ +#pragma once + +#include "quantum.h" +#include "oled_driver.h" + +void oled_driver_render_logo(void); +bool process_record_user_oled(uint16_t keycode, keyrecord_t *record); + +#ifdef OLED_DISPLAY_128X64 +# define OLED_RENDER_KEYLOGGER "Keylogger: " + +# define OLED_RENDER_LAYOUT_NAME "Layout: " +# define OLED_RENDER_LAYOUT_QWERTY "Qwerty" +# define OLED_RENDER_LAYOUT_COLEMAK "Colemak" +# define OLED_RENDER_LAYOUT_DVORAK "Dvorak" +# define OLED_RENDER_LAYOUT_WORKMAN "Workman" +# define OLED_RENDER_LAYOUT_NORMAN "Norman" +# define OLED_RENDER_LAYOUT_MALTRON "Matron" +# define OLED_RENDER_LAYOUT_EUCALYN "Eucalyn" +# define OLED_RENDER_LAYOUT_CARPLAX "Carplax" + +# define OLED_RENDER_LAYER_NAME "Layer:\n" +# define OLED_RENDER_LAYER_LOWER "Lower" +# define OLED_RENDER_LAYER_RAISE "Raise" +# define OLED_RENDER_LAYER_ADJUST "Adjust" +# define OLED_RENDER_LAYER_MODS "Mods" + +# define OLED_RENDER_LOCK_NAME "Lock: " +# define OLED_RENDER_LOCK_NUML "NUML" +# define OLED_RENDER_LOCK_CAPS "CAPS" +# define OLED_RENDER_LOCK_SCLK "SCLK" + +# define OLED_RENDER_MODS_NAME "Mods: " +# define OLED_RENDER_MODS_SFT "Sft" +# define OLED_RENDER_MODS_CTL "Ctl" +# define OLED_RENDER_MODS_ALT "Alt" +# define OLED_RENDER_MODS_GUI "GUI" + +# define OLED_RENDER_BOOTMAGIC_NAME "Boot " +# define OLED_RENDER_BOOTMAGIC_NKRO "NKRO" +# define OLED_RENDER_BOOTMAGIC_NOGUI "nGUI" +# define OLED_RENDER_BOOTMAGIC_GRV "GRV" +# define OLED_RENDER_BOOTMAGIC_CAPS "CAPS" + +# define OLED_RENDER_USER_NAME "USER:" +# define OLED_RENDER_USER_ANIM "Anim" +# define OLED_RENDER_USER_LAYR "Layr" +# define OLED_RENDER_USER_NUKE "Nuke" + +#else +# define OLED_RENDER_KEYLOGGER "KLogr" + +# define OLED_RENDER_LAYOUT_NAME "Lyout" +# define OLED_RENDER_LAYOUT_QWERTY " QRTY" +# define OLED_RENDER_LAYOUT_COLEMAK " COLE" +# define OLED_RENDER_LAYOUT_DVORAK " DVRK" +# define OLED_RENDER_LAYOUT_WORKMAN " WKMN" +# define OLED_RENDER_LAYOUT_NORMAN " NORM" +# define OLED_RENDER_LAYOUT_MALTRON " MLTN" +# define OLED_RENDER_LAYOUT_EUCALYN " ECLN" +# define OLED_RENDER_LAYOUT_CARPLAX " CRPX" + +# define OLED_RENDER_LAYER_NAME "LAYER" +# define OLED_RENDER_LAYER_LOWER "Lower" +# define OLED_RENDER_LAYER_RAISE "Raise" +# define OLED_RENDER_LAYER_ADJUST "Adjst" +# define OLED_RENDER_LAYER_MODS " Mods" + +# define OLED_RENDER_LOCK_NAME "Lock:" +# define OLED_RENDER_LOCK_NUML "N" +# define OLED_RENDER_LOCK_CAPS "C" +# define OLED_RENDER_LOCK_SCLK "S" + +# define OLED_RENDER_MODS_NAME "Mods: " +# define OLED_RENDER_MODS_SFT "S" +# define OLED_RENDER_MODS_CTL "C" +# define OLED_RENDER_MODS_ALT "A" +# define OLED_RENDER_MODS_GUI "G" + +# define OLED_RENDER_BOOTMAGIC_NAME "BTMGK" +# define OLED_RENDER_BOOTMAGIC_NKRO "NKRO" +# define OLED_RENDER_BOOTMAGIC_NOGUI "nGUI" +# define OLED_RENDER_BOOTMAGIC_GRV "GRV" +# define OLED_RENDER_BOOTMAGIC_CAPS "CAPS" + +# define OLED_RENDER_USER_NAME "USER:" +# define OLED_RENDER_USER_ANIM "Anim" +# define OLED_RENDER_USER_LAYR "Layr" +# define OLED_RENDER_USER_NUKE "Nuke" + +#endif diff --git a/users/drashna/process_records.c b/users/drashna/process_records.c index af3ee9cf..101b3d95 100644 --- a/users/drashna/process_records.c +++ b/users/drashna/process_records.c @@ -17,101 +17,308 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { xprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed); # endif #endif // KEYLOGGER_ENABLE +#ifdef OLED_DRIVER_ENABLE + process_record_user_oled(keycode, record); +#endif // OLED - switch (keycode) { - case KC_QWERTY ... KC_WORKMAN: - if (record->event.pressed) { - uint8_t mods = mod_config(get_mods() | get_oneshot_mods()); - if (!mods) { - set_single_persistent_default_layer(keycode - KC_QWERTY); - } else if (mods & MOD_MASK_SHIFT) { - set_single_persistent_default_layer(keycode - KC_QWERTY + 4); - } else if (mods & MOD_MASK_CTRL) { - set_single_persistent_default_layer(keycode - KC_QWERTY + 8); - } - } - break; - - case KC_MAKE: // Compiles the firmware, and adds the flash command based on keyboard bootloader - if (!record->event.pressed) { - uint8_t temp_mod = mod_config(get_mods()); - uint8_t temp_osm = mod_config(get_oneshot_mods()); - clear_mods(); - clear_oneshot_mods(); - send_string_with_delay_P(PSTR("make " QMK_KEYBOARD ":" QMK_KEYMAP), TAP_CODE_DELAY); -#ifndef MAKE_BOOTLOADER - if ((temp_mod | temp_osm) & MOD_MASK_SHIFT) + if (process_record_keymap(keycode, record) && process_record_secrets(keycode, record) +#ifdef RGB_MATRIX_ENABLE + && process_record_user_rgb_matrix(keycode, record) #endif - { - send_string_with_delay_P(PSTR(":flash"), TAP_CODE_DELAY); - } - if ((temp_mod | temp_osm) & MOD_MASK_CTRL) { - send_string_with_delay_P(PSTR(" -j8 --output-sync"), TAP_CODE_DELAY); +#ifdef RGBLIGHT_ENABLE + && process_record_user_rgb_light(keycode, record) +#endif + ) { + switch (keycode) { + case KC_QWERTY ... KC_WORKMAN: + if (record->event.pressed) { + uint8_t mods = mod_config(get_mods() | get_oneshot_mods()); + if (!mods) { + set_single_persistent_default_layer(keycode - KC_QWERTY); + } else if (mods & MOD_MASK_SHIFT) { + set_single_persistent_default_layer(keycode - KC_QWERTY + 4); + } else if (mods & MOD_MASK_CTRL) { + set_single_persistent_default_layer(keycode - KC_QWERTY + 8); + } } + break; + + case KC_MAKE: // Compiles the firmware, and adds the flash command based on keyboard bootloader + if (!record->event.pressed) { +#ifndef MAKE_BOOTLOADER + uint8_t temp_mod = mod_config(get_mods()); + uint8_t temp_osm = mod_config(get_oneshot_mods()); + clear_mods(); + clear_oneshot_mods(); +#endif + send_string_with_delay_P(PSTR("bin/qmk"), TAP_CODE_DELAY); +#ifndef MAKE_BOOTLOADER + if ((temp_mod | temp_osm) & MOD_MASK_SHIFT) +#endif + { + send_string_with_delay_P(PSTR(" flash "), TAP_CODE_DELAY); +#ifndef MAKE_BOOTLOADER + } else { + send_string_with_delay_P(PSTR(" compile "), TAP_CODE_DELAY); +#endif + } + send_string_with_delay_P(PSTR("-kb " QMK_KEYBOARD " -km " QMK_KEYMAP), TAP_CODE_DELAY); #ifdef RGB_MATRIX_SPLIT_RIGHT - send_string_with_delay_P(PSTR(" RGB_MATRIX_SPLIT_RIGHT=yes"), TAP_CODE_DELAY); + send_string_with_delay_P(PSTR(" RGB_MATRIX_SPLIT_RIGHT=yes"), TAP_CODE_DELAY); # ifndef OLED_DRIVER_ENABLE - send_string_with_delay_P(PSTR(" OLED_DRIVER_ENABLE=no"), TAP_CODE_DELAY); + send_string_with_delay_P(PSTR(" OLED_DRIVER_ENABLE=no"), TAP_CODE_DELAY); # endif #endif - send_string_with_delay_P(PSTR(SS_TAP(X_ENTER)), TAP_CODE_DELAY); - } + send_string_with_delay_P(PSTR(SS_TAP(X_ENTER)), TAP_CODE_DELAY); + } - break; + break; - case VRSN: // Prints firmware version - if (record->event.pressed) { - send_string_with_delay_P(PSTR(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION ", Built on: " QMK_BUILDDATE), TAP_CODE_DELAY); - } - break; + case VRSN: // Prints firmware version + if (record->event.pressed) { + send_string_with_delay_P(PSTR(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION ", Built on: " QMK_BUILDDATE), TAP_CODE_DELAY); + } + break; - case KC_DIABLO_CLEAR: // reset all Diablo timers, disabling them + case KC_DIABLO_CLEAR: // reset all Diablo timers, disabling them #ifdef TAP_DANCE_ENABLE - if (record->event.pressed) { - for (uint8_t index = 0; index < 4; index++) { - diablo_timer[index].key_interval = 0; + if (record->event.pressed) { + for (uint8_t index = 0; index < 4; index++) { + diablo_timer[index].key_interval = 0; + } } - } #endif // TAP_DANCE_ENABLE - break; + break; - case KC_CCCV: // One key copy/paste - if (record->event.pressed) { - copy_paste_timer = timer_read(); - } else { - if (timer_elapsed(copy_paste_timer) > TAPPING_TERM) { // Hold, copy - tap_code16(LCTL(KC_C)); - } else { // Tap, paste - tap_code16(LCTL(KC_V)); + case KC_CCCV: // One key copy/paste + if (record->event.pressed) { + copy_paste_timer = timer_read(); + } else { + if (timer_elapsed(copy_paste_timer) > TAPPING_TERM) { // Hold, copy + tap_code16(LCTL(KC_C)); + } else { // Tap, paste + tap_code16(LCTL(KC_V)); + } } - } - break; + break; #ifdef UNICODE_ENABLE - case UC_FLIP: // (ノಠ痊ಠ)ノ彡┻━┻ - if (record->event.pressed) { - send_unicode_hex_string("0028 30CE 0CA0 75CA 0CA0 0029 30CE 5F61 253B 2501 253B"); - } - break; - case UC_TABL: // ┬─┬ノ( º _ ºノ) - if (record->event.pressed) { - send_unicode_hex_string("252C 2500 252C 30CE 0028 0020 00BA 0020 005F 0020 00BA 30CE 0029"); - } - break; - case UC_SHRG: // ¯\_(ツ)_/¯ - if (record->event.pressed) { - send_unicode_hex_string("00AF 005C 005F 0028 30C4 0029 005F 002F 00AF"); - } - break; - case UC_DISA: // ಠ_ಠ - if (record->event.pressed) { - send_unicode_hex_string("0CA0 005F 0CA0"); - } - break; + case UC_FLIP: // (ノಠ痊ಠ)ノ彡┻━┻ + if (record->event.pressed) { + send_unicode_string("(ノಠ痊ಠ)ノ彡┻━┻"); + } + break; + case UC_TABL: // ┬─┬ノ( º _ ºノ) + if (record->event.pressed) { + send_unicode_string("┬─┬ノ( º _ ºノ)"); + } + break; + case UC_SHRG: // ¯\_(ツ)_/¯ + if (record->event.pressed) { + send_unicode_string("¯\\_(ツ)_/¯"); + } + break; + case UC_DISA: // ಠ_ಠ + if (record->event.pressed) { + send_unicode_string("ಠ_ಠ"); + } + break; #endif - } - return process_record_keymap(keycode, record) && + case KC_RGB_T: // This allows me to use underglow as layer indication, or as normal #if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) - process_record_user_rgb(keycode, record) && + if (record->event.pressed) { + userspace_config.rgb_layer_change ^= 1; + dprintf("rgblight layer change [EEPROM]: %u\n", userspace_config.rgb_layer_change); + eeconfig_update_user(userspace_config.raw); + if (userspace_config.rgb_layer_change) { +# if defined(RGBLIGHT_ENABLE) && defined(RGB_MATRIX_ENABLE) + rgblight_enable_noeeprom(); +# endif + layer_state_set(layer_state); // This is needed to immediately set the layer color (looks better) +# if defined(RGBLIGHT_ENABLE) && defined(RGB_MATRIX_ENABLE) + } else { + rgblight_disable_noeeprom(); +# endif + } + } #endif // RGBLIGHT_ENABLE - process_record_secrets(keycode, record); + break; + +#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) + case RGB_TOG: + // Split keyboards need to trigger on key-up for edge-case issue +# ifndef SPLIT_KEYBOARD + if (record->event.pressed) { +# else + if (!record->event.pressed) { +# endif +# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) + rgblight_toggle(); +# endif +# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) + rgb_matrix_toggle(); +# endif + } + return false; + break; + case RGB_MODE_FORWARD ... RGB_MODE_GRADIENT: // quantum_keycodes.h L400 for definitions + if (record->event.pressed) { + bool is_eeprom_updated; +# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) + // This disables layer indication, as it's assumed that if you're changing this ... you want that disabled + if (userspace_config.rgb_layer_change) { + userspace_config.rgb_layer_change = false; + dprintf("rgblight layer change [EEPROM]: %u\n", userspace_config.rgb_layer_change); + is_eeprom_updated = true; + } +# endif +# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) + if (userspace_config.rgb_matrix_idle_anim) { + userspace_config.rgb_matrix_idle_anim = false; + dprintf("RGB Matrix Idle Animation [EEPROM]: %u\n", userspace_config.rgb_matrix_idle_anim); + is_eeprom_updated = true; + } +# endif + if (is_eeprom_updated) { + eeconfig_update_user(userspace_config.raw); + } + } + +# if defined(RGBLIGHT_DISABLE_KEYCODES) || defined(RGB_MATRIX_DISABLE_KEYCODES) + if (keycode == RGB_MODE_FORWARD && record->event.pressed) { + uint8_t shifted = get_mods() & (MOD_MASK_SHIFT); + if (shifted) { +# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) + rgblight_step_reverse(); +# endif +# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) + rgb_matrix_step_reverse(); +# endif + } else { +# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) + rgblight_step(); +# endif +# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) + rgb_matrix_step(); +# endif + } + } else if (keycode == RGB_MODE_REVERSE && record->event.pressed) { + uint8_t shifted = get_mods() & (MOD_MASK_SHIFT); + if (shifted) { +# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) + rgblight_step(); +# endif +# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) + rgb_matrix_step(); +# endif + } else { +# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) + rgblight_step_reverse(); +# endif +# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) + rgb_matrix_step_reverse(); +# endif + } + } else if (keycode == RGB_HUI) { +# ifndef SPLIT_KEYBOARD + if (record->event.pressed) { +# else + if (!record->event.pressed) { +# endif +# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) + rgblight_increase_hue(); +# endif +# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) + rgb_matrix_increase_hue(); +# endif + } + } else if (keycode == RGB_HUD) { +# ifndef SPLIT_KEYBOARD + if (record->event.pressed) { +# else + if (!record->event.pressed) { +# endif +# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) + rgblight_decrease_hue(); +# endif +# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) + rgb_matrix_decrease_hue(); +# endif + } + } else if (keycode == RGB_SAI) { +# ifndef SPLIT_KEYBOARD + if (record->event.pressed) { +# else + if (!record->event.pressed) { +# endif +# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) + rgblight_increase_sat(); +# endif +# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) + rgb_matrix_increase_sat(); +# endif + } + } else if (keycode == RGB_SAD) { +# ifndef SPLIT_KEYBOARD + if (record->event.pressed) { +# else + if (!record->event.pressed) { +# endif +# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) + rgblight_decrease_sat(); +# endif +# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) + rgb_matrix_decrease_sat(); +# endif + } + } else if (keycode == RGB_VAI) { +# ifndef SPLIT_KEYBOARD + if (record->event.pressed) { +# else + if (!record->event.pressed) { +# endif +# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) + rgblight_increase_val(); +# endif +# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) + rgb_matrix_increase_val(); +# endif + } + } else if (keycode == RGB_VAD) { +# ifndef SPLIT_KEYBOARD + if (record->event.pressed) { +# else + if (!record->event.pressed) { +# endif +# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) + rgblight_decrease_val(); +# endif +# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) + rgb_matrix_decrease_val(); +# endif + } + } else if (keycode == RGB_SPI) { + if (record->event.pressed) { +# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) + rgblight_increase_speed(); +# endif +# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) + rgb_matrix_increase_speed(); +# endif + } + } else if (keycode == RGB_SPD) { + if (record->event.pressed) { +# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) + rgblight_decrease_speed(); +# endif +# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) + rgb_matrix_decrease_speed(); +# endif + } + } + return false; +# endif +#endif + } + } + return true; } diff --git a/users/drashna/process_records.h b/users/drashna/process_records.h index cb7ec3ec..999882d4 100644 --- a/users/drashna/process_records.h +++ b/users/drashna/process_records.h @@ -34,13 +34,13 @@ enum userspace_custom_keycodes { bool process_record_secrets(uint16_t keycode, keyrecord_t *record); bool process_record_keymap(uint16_t keycode, keyrecord_t *record); -#define LOWER MO(_LOWER) -#define RAISE MO(_RAISE) -#define ADJUST MO(_ADJUST) +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) +#define ADJUST MO(_ADJUST) #define TG_MODS TG(_MODS) #define TG_GAME TG(_GAMEPAD) -#define OS_LWR OSL(_LOWER) -#define OS_RSE OSL(_RAISE) +#define OS_LWR OSL(_LOWER) +#define OS_RSE OSL(_RAISE) #define KC_SEC1 KC_SECRET_1 #define KC_SEC2 KC_SECRET_2 @@ -48,13 +48,13 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record); #define KC_SEC4 KC_SECRET_4 #define KC_SEC5 KC_SECRET_5 -#define QWERTY KC_QWERTY -#define DVORAK KC_DVORAK +#define QWERTY KC_QWERTY +#define DVORAK KC_DVORAK #define COLEMAK KC_COLEMAK #define WORKMAN KC_WORKMAN #define KC_RESET RESET -#define KC_RST KC_RESET +#define KC_RST KC_RESET #ifdef SWAP_HANDS_ENABLE # define KC_C1R3 SH_T(KC_TAB) @@ -81,7 +81,7 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record); #define OS_RCTL OSM(MOD_RCTL) #define OS_LALT OSM(MOD_LALT) #define OS_RALT OSM(MOD_RALT) -#define OS_MEH OSM(MOD_MEH) +#define OS_MEH OSM(MOD_MEH) #define OS_HYPR OSM(MOD_HYPR) #define ALT_APP ALT_T(KC_APP) diff --git a/users/drashna/rgb_matrix_stuff.c b/users/drashna/rgb_matrix_stuff.c new file mode 100644 index 00000000..0914aab1 --- /dev/null +++ b/users/drashna/rgb_matrix_stuff.c @@ -0,0 +1,86 @@ +#include "drashna.h" + +#include "lib/lib8tion/lib8tion.h" +extern led_config_t g_led_config; + +static uint32_t hypno_timer; +#if defined(SPLIT_KEYBOARD) || defined(KEYBOARD_ergodox_ez) || defined(KEYBOARD_crkbd) +# define RGB_MATRIX_REST_MODE RGB_MATRIX_CYCLE_OUT_IN_DUAL +#else +# define RGB_MATRIX_REST_MODE RGB_MATRIX_CYCLE_OUT_IN +#endif + +void rgb_matrix_layer_helper(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode, uint8_t speed, uint8_t led_type) { + HSV hsv = {hue, sat, val}; + if (hsv.v > rgb_matrix_config.hsv.v) { + hsv.v = rgb_matrix_config.hsv.v; + } + + switch (mode) { + case 1: // breathing + { + uint16_t time = scale16by8(g_rgb_counters.tick, speed / 8); + hsv.v = scale8(abs8(sin8(time) - 128) * 2, hsv.v); + RGB rgb = hsv_to_rgb(hsv); + for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) { + if (HAS_FLAGS(g_led_config.flags[i], led_type)) { + rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); + } + } + break; + } + default: // Solid Color + { + RGB rgb = hsv_to_rgb(hsv); + for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) { + if (HAS_FLAGS(g_led_config.flags[i], led_type)) { + rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); + } + } + break; + } + } +} + +__attribute__((weak)) void rgb_matrix_indicator_keymap(void) {} + +void matrix_scan_rgb_matrix(void) { +#if defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) + if (userspace_config.rgb_matrix_idle_anim && rgb_matrix_get_mode() == RGB_MATRIX_TYPING_HEATMAP && timer_elapsed32(hypno_timer) > 15000) { + rgb_matrix_mode_noeeprom(RGB_MATRIX_REST_MODE); + } +#endif + rgb_matrix_indicator_keymap(); +} + +void keyboard_post_init_rgb_matrix(void) { +#if defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) + if (userspace_config.rgb_matrix_idle_anim) { + rgb_matrix_mode_noeeprom(RGB_MATRIX_REST_MODE); + } +#endif +} + +bool process_record_user_rgb_matrix(uint16_t keycode, keyrecord_t *record) { +#if defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) + hypno_timer = timer_read32(); + if (userspace_config.rgb_matrix_idle_anim && rgb_matrix_get_mode() == RGB_MATRIX_REST_MODE) { + rgb_matrix_mode_noeeprom(RGB_MATRIX_TYPING_HEATMAP); + } +#endif + switch (keycode) { + case RGB_IDL: // This allows me to use underglow as layer indication, or as normal +#if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) + if (record->event.pressed) { + userspace_config.rgb_matrix_idle_anim ^= 1; + dprintf("RGB Matrix Idle Animation [EEPROM]: %u\n", userspace_config.rgb_matrix_idle_anim); + eeconfig_update_user(userspace_config.raw); + if (userspace_config.rgb_matrix_idle_anim) { + rgb_matrix_mode_noeeprom(RGB_MATRIX_TYPING_HEATMAP); + } + } +#endif + break; + } + return true; +} diff --git a/users/curry/rgb_matrix_user.h b/users/drashna/rgb_matrix_stuff.h similarity index 53% rename from users/curry/rgb_matrix_user.h rename to users/drashna/rgb_matrix_stuff.h index d7db29bf..35b01047 100644 --- a/users/curry/rgb_matrix_user.h +++ b/users/drashna/rgb_matrix_stuff.h @@ -1,7 +1,9 @@ #pragma once +#include "quantum.h" + +bool process_record_user_rgb_matrix(uint16_t keycode, keyrecord_t *record); +void keyboard_post_init_rgb_matrix(void); +void matrix_scan_rgb_matrix(void); -bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record); -void keyboard_post_init_rgb(void); -void matrix_scan_rgb(void); void rgb_matrix_set_color_all(uint8_t red, uint8_t green, uint8_t blue); void rgb_matrix_layer_helper(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode, uint8_t speed, uint8_t led_type); diff --git a/users/drashna/rgb_stuff.c b/users/drashna/rgb_stuff.c index e7247f75..06b1e3c0 100644 --- a/users/drashna/rgb_stuff.c +++ b/users/drashna/rgb_stuff.c @@ -2,89 +2,77 @@ #include "rgb_stuff.h" #include "eeprom.h" -#if defined(RGBLIGHT_ENABLE) extern rgblight_config_t rgblight_config; bool has_initialized; void rgblight_sethsv_default_helper(uint8_t index) { rgblight_sethsv_at(rgblight_config.hue, rgblight_config.sat, rgblight_config.val, index); } -#endif // RGBLIGHT_ENABLE - -#if defined(RGB_MATRIX_ENABLE) -static uint32_t hypno_timer; -# if defined(SPLIT_KEYBOARD) || defined(KEYBOARD_ergodox_ez) || defined(KEYBOARD_crkbd) -# define RGB_MATRIX_REST_MODE RGB_MATRIX_CYCLE_OUT_IN_DUAL -# else -# define RGB_MATRIX_REST_MODE RGB_MATRIX_CYCLE_OUT_IN -# endif -#endif /* Custom indicators for modifiers. * This allows for certain lights to be lit up, based on what mods are active, giving some visual feedback. * This is especially useful for One Shot Mods, since it's not always obvious if they're still lit up. */ -#ifdef RGBLIGHT_ENABLE -# ifdef INDICATOR_LIGHTS +#ifdef INDICATOR_LIGHTS void set_rgb_indicators(uint8_t this_mod, uint8_t this_led, uint8_t this_osm) { if (userspace_config.rgb_layer_change && get_highest_layer(layer_state) == 0) { if ((this_mod | this_osm) & MOD_MASK_SHIFT || this_led & (1 << USB_LED_CAPS_LOCK)) { -# ifdef SHFT_LED1 +# ifdef SHFT_LED1 rgblight_sethsv_at(120, 255, 255, SHFT_LED1); -# endif // SHFT_LED1 -# ifdef SHFT_LED2 +# endif // SHFT_LED1 +# ifdef SHFT_LED2 rgblight_sethsv_at(120, 255, 255, SHFT_LED2); -# endif // SHFT_LED2 +# endif // SHFT_LED2 } else { -# ifdef SHFT_LED1 +# ifdef SHFT_LED1 rgblight_sethsv_default_helper(SHFT_LED1); -# endif // SHFT_LED1 -# ifdef SHFT_LED2 +# endif // SHFT_LED1 +# ifdef SHFT_LED2 rgblight_sethsv_default_helper(SHFT_LED2); -# endif // SHFT_LED2 +# endif // SHFT_LED2 } if ((this_mod | this_osm) & MOD_MASK_CTRL) { -# ifdef CTRL_LED1 +# ifdef CTRL_LED1 rgblight_sethsv_at(0, 255, 255, CTRL_LED1); -# endif // CTRL_LED1 -# ifdef CTRL_LED2 +# endif // CTRL_LED1 +# ifdef CTRL_LED2 rgblight_sethsv_at(0, 255, 255, CTRL_LED2); -# endif // CTRL_LED2 +# endif // CTRL_LED2 } else { -# ifdef CTRL_LED1 +# ifdef CTRL_LED1 rgblight_sethsv_default_helper(CTRL_LED1); -# endif // CTRL_LED1 -# ifdef CTRL_LED2 +# endif // CTRL_LED1 +# ifdef CTRL_LED2 rgblight_sethsv_default_helper(CTRL_LED2); -# endif // CTRL_LED2 +# endif // CTRL_LED2 } if ((this_mod | this_osm) & MOD_MASK_GUI) { -# ifdef GUI_LED1 +# ifdef GUI_LED1 rgblight_sethsv_at(51, 255, 255, GUI_LED1); -# endif // GUI_LED1 -# ifdef GUI_LED2 +# endif // GUI_LED1 +# ifdef GUI_LED2 rgblight_sethsv_at(51, 255, 255, GUI_LED2); -# endif // GUI_LED2 +# endif // GUI_LED2 } else { -# ifdef GUI_LED1 +# ifdef GUI_LED1 rgblight_sethsv_default_helper(GUI_LED1); -# endif // GUI_LED1 -# ifdef GUI_LED2 +# endif // GUI_LED1 +# ifdef GUI_LED2 rgblight_sethsv_default_helper(GUI_LED2); -# endif // GUI_LED2 +# endif // GUI_LED2 } if ((this_mod | this_osm) & MOD_MASK_ALT) { -# ifdef ALT_LED1 +# ifdef ALT_LED1 rgblight_sethsv_at(240, 255, 255, ALT_LED1); -# endif // ALT_LED1 -# ifdef GUI_LED2 +# endif // ALT_LED1 +# ifdef GUI_LED2 rgblight_sethsv_at(240, 255, 255, ALT_LED2); -# endif // GUI_LED2 +# endif // GUI_LED2 } else { -# ifdef GUI_LED1 +# ifdef GUI_LED1 rgblight_sethsv_default_helper(ALT_LED1); -# endif // GUI_LED1 -# ifdef GUI_LED2 +# endif // GUI_LED1 +# ifdef GUI_LED2 rgblight_sethsv_default_helper(ALT_LED2); -# endif // GUI_LED2 +# endif // GUI_LED2 } } } @@ -95,9 +83,9 @@ void matrix_scan_indicator(void) { set_rgb_indicators(get_mods(), host_keyboard_leds(), get_oneshot_mods()); } } -# endif // INDICATOR_LIGHTS +#endif // INDICATOR_LIGHTS -# ifdef RGBLIGHT_TWINKLE +#ifdef RGBLIGHT_TWINKLE static rgblight_fadeout lights[RGBLED_NUM]; __attribute__((weak)) bool rgblight_twinkle_is_led_used_keymap(uint8_t index) { return false; } @@ -105,40 +93,40 @@ __attribute__((weak)) bool rgblight_twinkle_is_led_used_keymap(uint8_t index) { /* This function checks for used LEDs. This way, collisions don't occur and cause weird rendering */ bool rgblight_twinkle_is_led_used(uint8_t index) { switch (index) { -# ifdef INDICATOR_LIGHTS -# ifdef SHFT_LED1 +# ifdef INDICATOR_LIGHTS +# ifdef SHFT_LED1 case SHFT_LED1: return true; -# endif // SHFT_LED1 -# ifdef SHFT_LED2 +# endif // SHFT_LED1 +# ifdef SHFT_LED2 case SHFT_LED2: return true; -# endif // SHFT_LED2 -# ifdef CTRL_LED1 +# endif // SHFT_LED2 +# ifdef CTRL_LED1 case CTRL_LED1: return true; -# endif // CTRL_LED1 -# ifdef CTRL_LED2 +# endif // CTRL_LED1 +# ifdef CTRL_LED2 case CTRL_LED2: return true; -# endif // CTRL_LED2 -# ifdef GUI_LED1 +# endif // CTRL_LED2 +# ifdef GUI_LED1 case GUI_LED1: return true; -# endif // GUI_LED1 -# ifdef GUI_LED2 +# endif // GUI_LED1 +# ifdef GUI_LED2 case GUI_LED2: return true; -# endif // GUI_LED2 -# ifdef ALT_LED1 +# endif // GUI_LED2 +# ifdef ALT_LED1 case ALT_LED1: return true; -# endif // ALT_LED1 -# ifdef ALT_LED2 +# endif // ALT_LED1 +# ifdef ALT_LED2 case ALT_LED2: return true; -# endif // ALT_LED2 -# endif // INDICATOR_LIGHTS +# endif // ALT_LED2 +# endif // INDICATOR_LIGHTS default: return rgblight_twinkle_is_led_used_keymap(index); } @@ -213,23 +201,15 @@ void start_rgb_light(void) { rgblight_sethsv_at(light->hue, 255, light->life, light_index); } -# endif -#endif // RGBLIGHT_ENABLE +#endif -bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record) { +bool process_record_user_rgb_light(uint16_t keycode, keyrecord_t *record) { uint16_t temp_keycode = keycode; // Filter out the actual keycode from MT and LT keys. if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX)) { temp_keycode &= 0xFF; } -#if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) - hypno_timer = timer_read32(); - if (userspace_config.rgb_matrix_idle_anim && rgb_matrix_get_mode() == RGB_MATRIX_REST_MODE) { - rgb_matrix_mode_noeeprom(RGB_MATRIX_TYPING_HEATMAP); - } -#endif - switch (temp_keycode) { #ifdef RGBLIGHT_TWINKLE case KC_A ... KC_SLASH: @@ -242,228 +222,19 @@ bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record) { start_rgb_light(); } break; -#endif // RGBLIGHT_TWINKLE - case KC_RGB_T: // This allows me to use underglow as layer indication, or as normal -#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) - if (record->event.pressed) { - userspace_config.rgb_layer_change ^= 1; - dprintf("rgblight layer change [EEPROM]: %u\n", userspace_config.rgb_layer_change); - eeconfig_update_user(userspace_config.raw); - if (userspace_config.rgb_layer_change) { -# if defined(RGBLIGHT_ENABLE) && defined(RGB_MATRIX_ENABLE) - rgblight_enable_noeeprom(); -# endif - layer_state_set(layer_state); // This is needed to immediately set the layer color (looks better) -# if defined(RGBLIGHT_ENABLE) && defined(RGB_MATRIX_ENABLE) - } else { - rgblight_disable_noeeprom(); -# endif - } - } -#endif // RGBLIGHT_ENABLE - break; - case RGB_IDL: // This allows me to use underglow as layer indication, or as normal -#if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) - if (record->event.pressed) { - userspace_config.rgb_matrix_idle_anim ^= 1; - dprintf("RGB Matrix Idle Animation [EEPROM]: %u\n", userspace_config.rgb_matrix_idle_anim); - eeconfig_update_user(userspace_config.raw); - if (userspace_config.rgb_matrix_idle_anim) { - rgb_matrix_mode_noeeprom(RGB_MATRIX_TYPING_HEATMAP); - } - } -#endif - break; -#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) - case RGB_TOG: - // Split keyboards need to trigger on key-up for edge-case issue -# ifndef SPLIT_KEYBOARD - if (record->event.pressed) { -# else - if (!record->event.pressed) { -# endif -# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) - rgblight_toggle(); -# endif -# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) - rgb_matrix_toggle(); -# endif - } - return false; - break; - case RGB_MODE_FORWARD ... RGB_MODE_GRADIENT: // quantum_keycodes.h L400 for definitions - if (record->event.pressed) { - bool is_eeprom_updated; -# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) - // This disables layer indication, as it's assumed that if you're changing this ... you want that disabled - if (userspace_config.rgb_layer_change) { - userspace_config.rgb_layer_change = false; - dprintf("rgblight layer change [EEPROM]: %u\n", userspace_config.rgb_layer_change); - is_eeprom_updated = true; - } -# endif -# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) - if (userspace_config.rgb_matrix_idle_anim) { - userspace_config.rgb_matrix_idle_anim = false; - dprintf("RGB Matrix Idle Animation [EEPROM]: %u\n", userspace_config.rgb_matrix_idle_anim); - is_eeprom_updated = true; - } -# endif - if (is_eeprom_updated) { - eeconfig_update_user(userspace_config.raw); - } - } - -# if defined(RGBLIGHT_DISABLE_KEYCODES) || defined(RGB_MATRIX_DISABLE_KEYCODES) - if (keycode == RGB_MODE_FORWARD && record->event.pressed) { - uint8_t shifted = get_mods() & (MOD_MASK_SHIFT); - if (shifted) { -# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) - rgblight_step_reverse(); -# endif -# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) - rgb_matrix_step_reverse(); -# endif - } else { -# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) - rgblight_step(); -# endif -# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) - rgb_matrix_step(); -# endif - } - } else if (keycode == RGB_MODE_REVERSE && record->event.pressed) { - uint8_t shifted = get_mods() & (MOD_MASK_SHIFT); - if (shifted) { -# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) - rgblight_step(); -# endif -# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) - rgb_matrix_step(); -# endif - } else { -# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) - rgblight_step_reverse(); -# endif -# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) - rgb_matrix_step_reverse(); -# endif - } - } else if (keycode == RGB_HUI) { -# ifndef SPLIT_KEYBOARD - if (record->event.pressed) { -# else - if (!record->event.pressed) { -# endif -# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) - rgblight_increase_hue(); -# endif -# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) - rgb_matrix_increase_hue(); -# endif - } - } else if (keycode == RGB_HUD) { -# ifndef SPLIT_KEYBOARD - if (record->event.pressed) { -# else - if (!record->event.pressed) { -# endif -# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) - rgblight_decrease_hue(); -# endif -# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) - rgb_matrix_decrease_hue(); -# endif - } - } else if (keycode == RGB_SAI) { -# ifndef SPLIT_KEYBOARD - if (record->event.pressed) { -# else - if (!record->event.pressed) { -# endif -# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) - rgblight_increase_sat(); -# endif -# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) - rgb_matrix_increase_sat(); -# endif - } - } else if (keycode == RGB_SAD) { -# ifndef SPLIT_KEYBOARD - if (record->event.pressed) { -# else - if (!record->event.pressed) { -# endif -# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) - rgblight_decrease_sat(); -# endif -# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) - rgb_matrix_decrease_sat(); -# endif - } - } else if (keycode == RGB_VAI) { -# ifndef SPLIT_KEYBOARD - if (record->event.pressed) { -# else - if (!record->event.pressed) { -# endif -# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) - rgblight_increase_val(); -# endif -# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) - rgb_matrix_increase_val(); -# endif - } - } else if (keycode == RGB_VAD) { -# ifndef SPLIT_KEYBOARD - if (record->event.pressed) { -# else - if (!record->event.pressed) { -# endif -# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) - rgblight_decrease_val(); -# endif -# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) - rgb_matrix_decrease_val(); -# endif - } - } else if (keycode == RGB_SPI) { - if (record->event.pressed) { -# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) - rgblight_increase_speed(); -# endif -# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) - rgb_matrix_increase_speed(); -# endif - } - } else if (keycode == RGB_SPD) { - if (record->event.pressed) { -# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) - rgblight_decrease_speed(); -# endif -# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) - rgb_matrix_decrease_speed(); -# endif - } - } - return false; -# endif -#endif - - break; +#endif // RGBLIGHT_TWINKLE } return true; } -void keyboard_post_init_rgb(void) { -#if defined(RGBLIGHT_ENABLE) -# if defined(RGBLIGHT_STARTUP_ANIMATION) +void keyboard_post_init_rgb_light(void) { +#if defined(RGBLIGHT_STARTUP_ANIMATION) bool is_enabled = rgblight_config.enable; if (userspace_config.rgb_layer_change) { rgblight_enable_noeeprom(); } if (rgblight_config.enable) { - layer_state_set_user(layer_state); + layer_state_set_rgb_light(layer_state); uint16_t old_hue = rgblight_config.hue; rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); for (uint16_t i = 255; i > 0; i--) { @@ -476,17 +247,11 @@ void keyboard_post_init_rgb(void) { rgblight_disable_noeeprom(); } -# endif - layer_state_set_user(layer_state); -#endif -#if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) - if (userspace_config.rgb_matrix_idle_anim) { - rgb_matrix_mode_noeeprom(RGB_MATRIX_REST_MODE); - } #endif + layer_state_set_rgb_light(layer_state); } -void matrix_scan_rgb(void) { +void matrix_scan_rgb_light(void) { #ifdef RGBLIGHT_ENABLE # ifdef RGBLIGHT_TWINKLE scan_rgblight_fadeout(); @@ -496,23 +261,15 @@ void matrix_scan_rgb(void) { matrix_scan_indicator(); # endif #endif - -#if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) - if (userspace_config.rgb_matrix_idle_anim && rgb_matrix_get_mode() == RGB_MATRIX_TYPING_HEATMAP && timer_elapsed32(hypno_timer) > 15000) { - rgb_matrix_mode_noeeprom(RGB_MATRIX_REST_MODE); - } -#endif } -#ifdef RGBLIGHT_ENABLE void rgblight_set_hsv_and_mode(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode) { rgblight_sethsv_noeeprom(hue, sat, val); wait_us(175); // Add a slight delay between color and mode to ensure it's processed correctly rgblight_mode_noeeprom(mode); } -#endif -layer_state_t layer_state_set_rgb(layer_state_t state) { +layer_state_t layer_state_set_rgb_light(layer_state_t state) { #ifdef RGBLIGHT_ENABLE if (userspace_config.rgb_layer_change) { switch (get_highest_layer(state)) { @@ -574,40 +331,3 @@ layer_state_t layer_state_set_rgb(layer_state_t state) { return state; } - -#ifdef RGB_MATRIX_ENABLE -# include "lib/lib8tion/lib8tion.h" -extern led_config_t g_led_config; - -void rgb_matrix_layer_helper(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode, uint8_t speed, uint8_t led_type) { - HSV hsv = {hue, sat, val}; - if (hsv.v > rgb_matrix_config.hsv.v) { - hsv.v = rgb_matrix_config.hsv.v; - } - - switch (mode) { - case 1: // breathing - { - uint16_t time = scale16by8(g_rgb_counters.tick, speed / 8); - hsv.v = scale8(abs8(sin8(time) - 128) * 2, hsv.v); - RGB rgb = hsv_to_rgb(hsv); - for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) { - if (HAS_FLAGS(g_led_config.flags[i], led_type)) { - rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); - } - } - break; - } - default: // Solid Color - { - RGB rgb = hsv_to_rgb(hsv); - for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) { - if (HAS_FLAGS(g_led_config.flags[i], led_type)) { - rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); - } - } - break; - } - } -} -#endif diff --git a/users/drashna/rgb_stuff.h b/users/drashna/rgb_stuff.h index 50b73c1c..98a552db 100644 --- a/users/drashna/rgb_stuff.h +++ b/users/drashna/rgb_stuff.h @@ -1,10 +1,7 @@ #pragma once #include "quantum.h" -#ifdef RGB_MATRIX_ENABLE -# include "rgb_matrix.h" -#endif -#if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_TWINKLE) +#if defined(RGBLIGHT_TWINKLE) typedef struct { bool enabled; uint8_t hue; @@ -13,20 +10,13 @@ typedef struct { } rgblight_fadeout; #endif -bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record); -void keyboard_post_init_rgb(void); -void matrix_scan_rgb(void); -layer_state_t layer_state_set_rgb(layer_state_t state); -layer_state_t default_layer_state_set_rgb(layer_state_t state); +bool process_record_user_rgb_light(uint16_t keycode, keyrecord_t *record); +void keyboard_post_init_rgb_light(void); +void matrix_scan_rgb_light(void); +layer_state_t layer_state_set_rgb_light(layer_state_t state); +layer_state_t default_layer_state_set_rgb_light(layer_state_t state); +void rgblight_sethsv_default_helper(uint8_t index); -#if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_TWINKLE) +#if defined(RGBLIGHT_TWINKLE) void scan_rgblight_fadeout(void); #endif -#if defined(RGBLIGHT_ENABLE) -void rgblight_sethsv_default_helper(uint8_t index); -#endif - -#ifdef RGB_MATRIX_ENABLE -void rgb_matrix_set_color_all(uint8_t red, uint8_t green, uint8_t blue); -void rgb_matrix_layer_helper(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode, uint8_t speed, uint8_t led_type); -#endif diff --git a/users/drashna/rules.mk b/users/drashna/rules.mk index 4d55da80..051368ff 100644 --- a/users/drashna/rules.mk +++ b/users/drashna/rules.mk @@ -2,9 +2,10 @@ SRC += drashna.c \ process_records.c ifneq ($(PLATFORM),CHIBIOS) - LTO_ENABLE = yes + LTO_ENABLE = yes endif SPACE_CADET_ENABLE = no +GRAVE_ESC_ENABLE = no ifneq ($(strip $(NO_SECRETS)), yes) ifneq ("$(wildcard $(USER_PATH)/secrets.c)","") @@ -19,10 +20,6 @@ ifeq ($(strip $(TAP_DANCE_ENABLE)), yes) SRC += tap_dances.c endif - - - - ifeq ($(strip $(RGBLIGHT_ENABLE)), yes) SRC += rgb_stuff.c ifeq ($(strip $(INDICATOR_LIGHTS)), yes) @@ -41,7 +38,7 @@ endif RGB_MATRIX_ENABLE ?= no ifneq ($(strip $(RGB_MATRIX_ENABLE)), no) - SRC += rgb_stuff.c + SRC += rgb_matrix_stuff.c endif @@ -61,3 +58,7 @@ endif ifeq ($(strip $(PROTOCOL)), VUSB) NKRO_ENABLE = no endif + +ifeq ($(strip $(OLED_DRIVER_ENABLE)), yes) + SRC += oled_stuff.c +endif diff --git a/users/dshields/config.h b/users/dshields/config.h deleted file mode 100644 index aa108147..00000000 --- a/users/dshields/config.h +++ /dev/null @@ -1,57 +0,0 @@ -#pragma once - -#define RGB_MATRIX_FRAMEBUFFER_EFFECTS -#define USB_MAX_POWER_CONSUMPTION 100 -#define ONESHOT_TAP_TOGGLE 2 -#define ONESHOT_TIMEOUT 3000 -#define RETRO_TAPPING -#define BACKLIGHT_BREATHING -#define DYNAMIC_MACRO_NO_NESTING - -#define MOUSEKEY_INTERVAL 20 -#define MOUSEKEY_DELAY 0 -#define MOUSEKEY_TIME_TO_MAX 40 -#define MOUSEKEY_MAX_SPEED 7 -#define MOUSEKEY_WHEEL_DELAY 0 - -#define DISABLE_RGB_MATRIX_ALPHAS_MODS -#define DISABLE_RGB_MATRIX_BREATHING -#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL -#define DISABLE_RGB_MATRIX_BAND_SAT -#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT -#define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL -#define DISABLE_RGB_MATRIX_BAND_VAL -#define DISABLE_RGB_MATRIX_CYCLE_ALL -#define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT -#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN -#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL -#define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL -#define DISABLE_RGB_MATRIX_CYCLE_SPIRAL -#define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN -#define DISABLE_RGB_MATRIX_DUAL_BEACON -#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS -#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON -#define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -#define DISABLE_RGB_MATRIX_SOLID_SPLASH -#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH -#define DISABLE_RGB_MATRIX_SOLID_SPLASH -#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH -#define DISABLE_RGB_MATRIX_SPLASH -#define DISABLE_RGB_MATRIX_MULTISPLASH -#define DISABLE_RGB_MATRIX_SPLASH -#define DISABLE_RGB_MATRIX_MULTISPLASH diff --git a/users/dshields/dshields.c b/users/dshields/dshields.c deleted file mode 100644 index 8f432a31..00000000 --- a/users/dshields/dshields.c +++ /dev/null @@ -1,26 +0,0 @@ -#include "quantum.h" -#include "dshields.h" - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - if (keycode == KC_ESC && record->event.pressed) { - bool rc = true; - uint8_t mods = 0; - if ((mods = get_oneshot_mods()) && !has_oneshot_mods_timed_out()) { - clear_oneshot_mods(); - unregister_mods(mods); - rc = false; - } - if ((mods = get_oneshot_locked_mods())) { - clear_oneshot_locked_mods(); - unregister_mods(mods); - rc = false; - } - if (is_oneshot_layer_active()) { - layer_clear(); - rc = false; - } - return rc; - } - return true; -} - diff --git a/users/dshields/dshields.h b/users/dshields/dshields.h deleted file mode 100644 index e1aa07a5..00000000 --- a/users/dshields/dshields.h +++ /dev/null @@ -1,42 +0,0 @@ -#pragma once - -// one-shot layer keys -#define OSL_RSE OSL(RSE) -#define OSL_LWR OSL(LWR) -#define OSL_FUN OSL(FUN) - -// one-shot modifier keys -#define OSMLCTL OSM(MOD_LCTL) -#define OSMRCTL OSM(MOD_RCTL) -#define OSMLALT OSM(MOD_LALT) -#define OSMRALT OSM(MOD_RALT) -#define OSMLSFT OSM(MOD_LSFT) -#define OSMRSFT OSM(MOD_RSFT) - -// mod-tap keys -#define MT_SPC SFT_T(KC_SPC) - -// LED/RGB controls -#ifdef KEYBOARD_planck_light - #define LGT_TOG RGB_TOG - #define LGT_MOD RGB_MOD - #define LGT_BRT _______ - #define LGT_INC RGB_HUI - #define LGT_DEC RGB_HUD -#endif -#ifdef KEYBOARD_planck_rev3 - #define LGT_TOG BL_TOGG - #define LGT_MOD BL_STEP - #define LGT_BRT BL_BRTG - #define LGT_INC BL_INC - #define LGT_DEC BL_DEC -#endif -#ifdef KEYBOARD_planck_rev6 - #define LGT_TOG _______ - #define LGT_MOD _______ - #define LGT_BRT _______ - #define LGT_INC _______ - #define LGT_DEC _______ -#endif - -enum layers { DEF, LWR, RSE, FUN }; diff --git a/users/dshields/rules.mk b/users/dshields/rules.mk deleted file mode 100644 index abfbe5e4..00000000 --- a/users/dshields/rules.mk +++ /dev/null @@ -1,32 +0,0 @@ -SRC += dshields.c - -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -COMMAND_ENABLE = no # Commands for debug and configuration -CONSOLE_ENABLE = no # Console for debug(+400) -EXTRAKEY_ENABLE = no -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -API_SYSEX_ENABLE = no -SPACE_CADET_ENABLE = no -LEADER_ENABLE = no -DYNAMIC_MACRO_ENABLE = yes - -LINK_TIME_OPTIMIZATION_ENABLE = yes - -ifeq ($(strip $(KEYBOARD)), planck/rev3) - AUDIO_ENABLE = no - BACKLIGHT_ENABLE = yes - RGB_MATRIX_ENABLE = no -endif -ifeq ($(strip $(KEYBOARD)), planck/rev6) - CFLAGS += -Wno-error=deprecated - EXTRALDFLAGS = -Wl,--build-id=none - AUDIO_ENABLE = no - BACKLIGHT_ENABLE = no - RGB_MATRIX_ENABLE = no -endif -ifeq ($(strip $(KEYBOARD)), planck/light) - AUDIO_ENABLE = yes - BACKLIGHT_ENABLE = no - RGB_MATRIX_ENABLE = yes -endif - diff --git a/users/dudeofawesome/dudeofawesome.c b/users/dudeofawesome/dudeofawesome.c deleted file mode 100644 index 5a9117b0..00000000 --- a/users/dudeofawesome/dudeofawesome.c +++ /dev/null @@ -1 +0,0 @@ -#include "dudeofawesome.h" diff --git a/users/dudeofawesome/dudeofawesome.h b/users/dudeofawesome/dudeofawesome.h deleted file mode 100644 index 91557925..00000000 --- a/users/dudeofawesome/dudeofawesome.h +++ /dev/null @@ -1,25 +0,0 @@ -#ifndef USERSPACE -#define USERSPACE - -#ifdef TAPPING_TOGGLE -#undef TAPPING_TOGGLE -#endif -#define TAPPING_TOGGLE 2 - -#ifdef AUDIO_ENABLE - #define WORKMAN_SOUND \ - E__NOTE(_GS7), \ - ED_NOTE(_E7), \ - S__NOTE(_REST), \ - E__NOTE(_A6), \ - S__NOTE(_REST), \ - ED_NOTE(_GS6), - - #define NUMPAD_ON_SOUND \ - E__NOTE(_C6), \ - ED_NOTE(_BF5), \ - S__NOTE(_C6), \ - ED_NOTE(_BF5), -#endif - -#endif diff --git a/users/dudeofawesome/rules.mk b/users/dudeofawesome/rules.mk deleted file mode 100644 index b99697b5..00000000 --- a/users/dudeofawesome/rules.mk +++ /dev/null @@ -1 +0,0 @@ -SRC += dudeofawesome.c diff --git a/users/edvorakjp/edvorakjp.c b/users/edvorakjp/edvorakjp.c deleted file mode 100644 index 892ce4be..00000000 --- a/users/edvorakjp/edvorakjp.c +++ /dev/null @@ -1,32 +0,0 @@ -#include "edvorakjp.h" - -void matrix_init_user(void) { - edvorakjp_status_init(); - matrix_init_keymap(); -} - -__attribute__ ((weak)) -void matrix_init_keymap() {} - -uint32_t layer_state_set_user(uint32_t state) { - state = update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); - return layer_state_set_keymap(state); -} - -__attribute__ ((weak)) -uint32_t layer_state_set_keymap(uint32_t state) { - return state; -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return process_record_keymap(keycode, record) &&\ - process_record_edvorakjp_swap_scln(keycode, record) &&\ - process_record_edvorakjp_config(keycode, record) &&\ - process_record_layer(keycode, record) &&\ - process_record_ime(keycode, record); -} - -__attribute__ ((weak)) -bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { - return true; -} diff --git a/users/edvorakjp/edvorakjp.h b/users/edvorakjp/edvorakjp.h deleted file mode 100644 index 688cdeff..00000000 --- a/users/edvorakjp/edvorakjp.h +++ /dev/null @@ -1,70 +0,0 @@ -#ifndef EDVORAKJP -#define EDVORAKJP - -#include "quantum.h" -#include "action_layer.h" - -#define EECONFIG_EDVORAK (uint8_t *)20 - -extern keymap_config_t keymap_config; - -enum edvorakjp_layers { - _EDVORAK = 0, - _LOWER, - _RAISE, - _ADJUST, - _EXTRA, -}; - -enum edvorakjp_keycodes { - EDVORAK = SAFE_RANGE, - LOWER, - RAISE, - KC_MAC, - KC_WIN, - KC_JPN, - KC_ENG, - NEW_SAFE_RANGE -}; - -#define KC_LC(k) LCTL_T(KC_##k) -#define KC_LS(k) LSFT_T(KC_##k) -#define KC_LA(k) LALT_T(KC_##k) -#define KC_LG(k) LGUI_T(KC_##k) -#define KC_RC(k) RCTL_T(KC_##k) -#define KC_RS(k) RSFT_T(KC_##k) -#define KC_RG(k) RGUI_T(KC_##k) -#define KC_RA(k) RALT_T(KC_##k) - -enum tap_dance_code { - TD_LOWER = 0, - TD_RAISE -}; - -// base -void dvorakj_layer_off(void); -void matrix_init_user(void); -void matrix_init_keymap(void); -uint32_t layer_state_set_user(uint32_t state); -uint32_t layer_state_set_keymap(uint32_t state); -bool process_record_user(uint16_t keycode, keyrecord_t *record); -bool process_record_keymap(uint16_t keycode, keyrecord_t *record); - -// status -void edvorakjp_status_init(void); -bool get_enable_kc_lang(void); -void set_enable_kc_lang(bool new_state); -bool get_japanese_mode(void); -void set_japanese_mode(bool new_state); - -/* - * Each process_record_* methods defined here are - * return false if processed, or return true if not processed. - * You can add your original macros in process_record_keymap() in keymap.c. - */ -bool process_record_edvorakjp_swap_scln(uint16_t keycode, keyrecord_t *record); -bool process_record_edvorakjp_config(uint16_t keycode, keyrecord_t *record); -bool process_record_layer(uint16_t keycode, keyrecord_t *record); -bool process_record_ime(uint16_t keycode, keyrecord_t *record); - -#endif // EDVORAKJP diff --git a/users/edvorakjp/edvorakjp_process_record.c b/users/edvorakjp/edvorakjp_process_record.c deleted file mode 100644 index ecc8db93..00000000 --- a/users/edvorakjp/edvorakjp_process_record.c +++ /dev/null @@ -1,89 +0,0 @@ -#include "edvorakjp.h" - -#if TAP_DANCE_ENABLE != yes -static uint16_t time_on_pressed; -#endif -/* - * Each process_record_* methods defined here are - * return false if handle edvorak_keycodes, or return true others. - */ -bool process_record_edvorakjp_swap_scln(uint16_t keycode, keyrecord_t *record) { -#ifdef SWAP_SCLN - static const uint8_t shift_bits = MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT); - static uint8_t last_mods_status; - if (keycode == KC_SCLN) { - if (record->event.pressed) { - last_mods_status = get_mods(); - - // invert shift_bits - if (last_mods_status & shift_bits) { - set_mods(last_mods_status & ~shift_bits); - } else { - set_mods(last_mods_status | MOD_BIT(KC_LSFT)); - } - } else { - set_mods(last_mods_status); - last_mods_status = 0; - } - } -#endif - return true; -} - -bool process_record_edvorakjp_config(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case KC_MAC: - case KC_WIN: - if (record->event.pressed) { - set_enable_kc_lang(keycode == KC_MAC); - } - return false; - } - return true; -} - -bool process_record_layer(uint16_t keycode, keyrecord_t *record) { -#if TAP_DANCE_ENABLE != yes - switch (keycode) { - case LOWER: - if (record->event.pressed) { - layer_on(_LOWER); - time_on_pressed = record->event.time; - } else { - layer_off(_LOWER); - - if (TIMER_DIFF_16(record->event.time, time_on_pressed) < TAPPING_TERM) { - set_japanese_mode(false); - } - time_on_pressed = 0; - } - return false; - case RAISE: - if (record->event.pressed) { - layer_on(_RAISE); - time_on_pressed = record->event.time; - } else { - layer_off(_RAISE); - - if (TIMER_DIFF_16(record->event.time, time_on_pressed) < TAPPING_TERM) { - set_japanese_mode(true); - } - time_on_pressed = 0; - } - return false; - } -#endif - return true; -} - -bool process_record_ime(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case KC_JPN: - case KC_ENG: - if (record->event.pressed) { - set_japanese_mode(keycode == KC_JPN); - } - return false; - } - return true; -} diff --git a/users/edvorakjp/edvorakjp_status.c b/users/edvorakjp/edvorakjp_status.c deleted file mode 100644 index 128fc3bd..00000000 --- a/users/edvorakjp/edvorakjp_status.c +++ /dev/null @@ -1,64 +0,0 @@ -#include "eeprom.h" -#include "edvorakjp.h" - -typedef union { - uint8_t raw; - struct { - bool enable_kc_lang; // for macOS - }; -} edvorakjp_config_t; -static edvorakjp_config_t edvorakjp_config; - -typedef struct { - bool japanese_mode; -} edvorakjp_state_t; -static edvorakjp_state_t edvorakjp_state; - -/* - * private methods - */ -uint8_t eeconfig_read_edvorakjp(void) { - return eeprom_read_byte(EECONFIG_EDVORAK); -} - -void eeconfig_update_edvorakjp(uint8_t val) { - eeprom_update_byte(EECONFIG_EDVORAK, val); -} - -/* - * public methods - */ -void edvorakjp_status_init(void) { - edvorakjp_state.japanese_mode = false; - edvorakjp_config.raw = eeconfig_read_edvorakjp(); -} - -bool get_enable_kc_lang(void) { - return edvorakjp_config.enable_kc_lang; -} - -void set_enable_kc_lang(bool new_state) { - edvorakjp_config.enable_kc_lang = new_state; - eeconfig_update_edvorakjp(edvorakjp_config.raw); -} - -bool get_japanese_mode(void) { - return edvorakjp_state.japanese_mode; -} - -void set_japanese_mode(bool new_state) { - edvorakjp_state.japanese_mode = new_state; - if (edvorakjp_state.japanese_mode) { - if (edvorakjp_config.enable_kc_lang) { - SEND_STRING(SS_TAP(X_LANG1)); - } else { - SEND_STRING(SS_LALT("`")); - } - } else { - if (edvorakjp_config.enable_kc_lang) { - SEND_STRING(SS_TAP(X_LANG2)); - } else { - SEND_STRING(SS_LALT("`")); - } - } -} diff --git a/users/edvorakjp/edvorakjp_tap_dance.c b/users/edvorakjp/edvorakjp_tap_dance.c deleted file mode 100644 index d5369f92..00000000 --- a/users/edvorakjp/edvorakjp_tap_dance.c +++ /dev/null @@ -1,73 +0,0 @@ -#include "edvorakjp.h" -#include "process_keycode/process_tap_dance.h" - -enum tap_state { - NONE = 0, - SINGLE_TAP = 1, - DOUBLE_TAP = 2, - HOLD -}; - -typedef struct { - uint8_t lower; - uint8_t raise; -} td_status_t; -static td_status_t td_status = {NONE, NONE}; - -int cur_dance(qk_tap_dance_state_t *state) { - if (state->interrupted || !state->pressed) { - return state->count == 1 ? SINGLE_TAP : DOUBLE_TAP; - } else { - return HOLD; - } -} - -void td_lower_finished(qk_tap_dance_state_t *state, void *user_data) { - td_status.lower = cur_dance(state); - switch(td_status.lower) { - case SINGLE_TAP: - set_japanese_mode(false); - break; - case DOUBLE_TAP: - set_japanese_mode(false); - register_code(KC_ESC); - break; - case HOLD: - break; - } - layer_on(_LOWER); -} - -void td_lower_reset(qk_tap_dance_state_t *state, void *user_data) { - if (td_status.lower == DOUBLE_TAP) { - unregister_code(KC_ESC); - } - layer_off(_LOWER); - td_status.lower = NONE; -} - -void td_raise_finished(qk_tap_dance_state_t *state, void *user_data) { - td_status.raise = cur_dance(state); - switch(td_status.raise) { - case DOUBLE_TAP: - // same as single - case SINGLE_TAP: - set_japanese_mode(true); - break; - case HOLD: - break; - } - layer_on(_RAISE); -} - -void td_raise_reset(qk_tap_dance_state_t *state, void *user_data) { - layer_off(_RAISE); - td_status.raise = NONE; -} - -qk_tap_dance_action_t tap_dance_actions[] = { - [TD_LOWER] = - ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, td_lower_finished, td_lower_reset, 100), - [TD_RAISE] = - ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, td_raise_finished, td_raise_reset, 100) -}; diff --git a/users/edvorakjp/readme.md b/users/edvorakjp/readme.md deleted file mode 100644 index 679d84b3..00000000 --- a/users/edvorakjp/readme.md +++ /dev/null @@ -1,67 +0,0 @@ -# edvorakjp - -epaew's Enhanced Dvorak layout for Japanese Programmer - -## Layout overview -This is a sample. You can swap any symbol keys and modifier keys. - -- Basic layout (for ansi) -``` - //+----+----+----+----+----+----+----+----+----+----+----+----+----+---------+ - ` , ! , @ , # , $ , % , ^ , & , * , ( , ) , [ , ] , BSPC , - //+----+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+-------+ - TAB , ' , , , . , Y , Q , F , G , R , W , P , / , = , \ , - //+------++---++---++---++---++---++---++---++---++---++---++---++---+-------+ - CAPS , A , O , E , I , U , D , T , N , S , M , - , ENT , - //+-------+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-----------+ - LSFT , : , X , C , V , Z , H , J , K , L , B , RSFT , - //+------+--+---++----++---+----+----+----+----+-+--+---++----++------+------+ - LCTL , LGUI , LALT , SPACE , RALT , RGUI , MENU , RCTL - //+------+------+------+-------------------------+------+------+------+------+ -``` - - And you can see [my iris keyboard layout](../../keyboards/iris/keymaps/edvorakjp/keymap.c) for sample implementation, too. - -## for Japanese - -- 日本語入力用のキーを追加 - - IME 切り替えキー - - 長押しでレイヤー切り替え、短押しでIME切り替え - - macOS(かな/英数)、Windows(Alt+\`)の両方に対応 -- Define some custom keys for typing Japanese - - IME switching - - act as LOWER/RAISE when hold, act as IME switching when tapped - - for macOS(かな/英数), for Windows(Alt+\`) - -## for Programmer - -- Dvorak 配列をベースに、ショートカットでよく利用される XCV は QWERTY 配列の位置を維持 -- 一部にVimユーザ用のキー配置を実施 - - HJKL キーを横並びで配置 - - Shift押下時と非押下時で、";"キーの挙動を入れ替え - (`config.h` 内で `#define SWAP_SCLN` の宣言が必要です) -- デフォルトレイヤーには、数字キーの代わりに記号 `!@#$%^&*()` を配置 - -- mainly based on Dvorak layout, but XCV is available in the same position of QWERTY layout -- for Vim users - - HJKL is lining side by side - - swap the ";" key behavior. i.e. send ":" normally and send ";" when you hold shift. - (need `#define SWAP_SCLN` in your `config.h`) -- we can type `!@#$%^&*()` keys without shift keys in base layer - -## License - -Copyright 2018 Ryo Maeda epaew.333@gmail.com @epaew - -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 . diff --git a/users/edvorakjp/rules.mk b/users/edvorakjp/rules.mk deleted file mode 100644 index 587c3b8d..00000000 --- a/users/edvorakjp/rules.mk +++ /dev/null @@ -1,7 +0,0 @@ -SRC += edvorakjp.c \ - edvorakjp_process_record.c \ - edvorakjp_status.c - -ifeq ($(TAP_DANCE_ENABLE), yes) -SRC += edvorakjp_tap_dance.c -endif diff --git a/users/ericgebhart/config.h b/users/ericgebhart/config.h deleted file mode 100644 index 934c3deb..00000000 --- a/users/ericgebhart/config.h +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef USERSPACE_CONFIG_H -#define USERSPACE_CONFIG_H - -#include "../../config.h" - -// Sets good default for the speed of the mouse. -#undef MOUSEKEY_INTERVAL -#undef MOUSEKEY_DELAY -#undef MOUSEKEY_TIME_TO_MAX -#undef MOUSEKEY_MAX_SPEED - -#define MOUSEKEY_INTERVAL 20 -#define MOUSEKEY_DELAY 100 -#define MOUSEKEY_TIME_TO_MAX 60 -#define MOUSEKEY_MAX_SPEED 7 - -#undef MOUSEKEY_WHEEL_MAX_SPEED -#undef MOUSEKEY_WHEEL_TIME_TO_MAX -#undef MOUSEKEY_WHEEL_DELAY - -#define MOUSEKEY_WHEEL_MAX_SPEED 5 -#define MOUSEKEY_WHEEL_TIME_TO_MAX 60 -#define MOUSEKEY_WHEEL_DELAY 100 - -#undef TAPPING_TOGGLE -#undef TAPPING_TERM -#undef IGNORE_MOD_TAP_INTERRUPT - -#define TAPPING_TOGGLE 1 -#define TAPPING_TERM 200 -#define IGNORE_MOD_TAP_INTERRUPT - -#endif diff --git a/users/ericgebhart/ericgebhart.c b/users/ericgebhart/ericgebhart.c deleted file mode 100644 index 69aa450e..00000000 --- a/users/ericgebhart/ericgebhart.c +++ /dev/null @@ -1,637 +0,0 @@ -/* - Copyright 2018 Eric Gebhart - - 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 "ericgebhart.h" - -#include "quantum.h" -#include "version.h" -#include "action.h" -#include "action_layer.h" -#include "process_keycode/process_tap_dance.h" -#include "keymap_bepo.h" - -float tone_copy[][2] = SONG(SCROLL_LOCK_ON_SOUND); -float tone_paste[][2] = SONG(SCROLL_LOCK_OFF_SOUND); - -static uint16_t copy_paste_timer; -userspace_config_t userspace_config; - -void tap(uint16_t keycode){ register_code(keycode); unregister_code(keycode); }; - - -// Add reconfigurable functions here, for keymap customization -// This allows for a global, userspace functions, and continued -// customization of the keymap. Use _keymap instead of _user -// functions in the keymaps -__attribute__ ((weak)) -void matrix_init_keymap(void) {} - -__attribute__ ((weak)) -void matrix_scan_keymap(void) {} - -__attribute__ ((weak)) -bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { - return true; -} - -__attribute__ ((weak)) -bool process_record_secrets(uint16_t keycode, keyrecord_t *record) { - return true; -} - -__attribute__ ((weak)) -uint32_t layer_state_set_keymap (uint32_t state) { - return state; -} - -__attribute__ ((weak)) -void led_set_keymap(uint8_t usb_led) {} - -// Runs just one time when the keyboard initializes. -void matrix_init_user(void) { - //ACTION_DEFAULT_LAYER_SET(DVORAK) ; -} - -// check default layerstate to see which layer we are on. -// if (biton32(layer_state) == _DIABLO) { --- current layer -// if (biton32(default_layer_state) == _DIABLO) { --- current default layer -// check for left shift on. -// if (mods & MOD_BIT(KC_LSFT)) register_code(KC_LSFT); - -static void switch_default_layer(uint8_t layer) { - default_layer_set(1UL<event.key.col, record->event.key.row, record->event.pressed); -#endif //KEYLOGGER_ENABLE - -// still dont know how to make #&_ And RALT is not ALTGR, That isn't working in the bepo keyboard -// either. No {} either probably for the same reasons. ALtGR is the key to some of these. - switch (keycode) { - // Handle the key translations for Dvorak on bepo. It's best if these are the first - // enums after SAFE_RANGE. - case DB_1: - case DB_2: - case DB_3: - case DB_4: - case DB_5: - case DB_6: - case DB_7: - case DB_8: - case DB_9: - case DB_0: - case DB_GRV: - case DB_SCOLON: - case DB_SLASH: - case DB_BACKSLASH: - case DB_EQL: - case DB_DOT: - case DB_COMM: - case DB_QUOT: - case DB_MINUS: - case DB_LPRN: - case DB_RPRN: - case DB_LBRC: - case DB_RBRC: - if(record->event.pressed) - send_keycode(keycode); - unregister_code(keycode); - break; - - case KC_QWERTY: - if (record->event.pressed) { - set_single_persistent_default_layer(QWERTY); - } - return false; - break; - case KC_COLEMAK: - if (record->event.pressed) { - set_single_persistent_default_layer(COLEMAK); - } - return false; - break; - case KC_DVORAK: - if (record->event.pressed) { - set_single_persistent_default_layer(DVORAK); - } - return false; - break; - case KC_WORKMAN: - if (record->event.pressed) { - set_single_persistent_default_layer(WORKMAN); - } - return false; - break; - - case KC_MAKE: // Compiles the firmware, and adds the flash command based on keyboard bootloader - if (!record->event.pressed) { - SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP -#if (defined(BOOTLOADER_DFU) || defined(BOOTLOADER_LUFA_DFU) || defined(BOOTLOADER_QMK_DFU)) - ":dfu" -#elif defined(BOOTLOADER_HALFKAY) - ":teensy" -#elif defined(BOOTLOADER_CATERINA) - ":avrdude" -#endif // bootloader options - SS_TAP(X_ENTER)); - } - return false; - break; - - - case KC_RESET: // Custom RESET code - if (!record->event.pressed) { - reset_keyboard(); - } - return false; - break; - - - case EPRM: // Resets EEPROM - if (record->event.pressed) { - eeconfig_init(); - default_layer_set(1UL<event.pressed) { - SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION ", Built on: " QMK_BUILDDATE); - } - return false; - break; - - /* Code has been depreciated - case KC_SECRET_1 ... KC_SECRET_5: // Secrets! Externally defined strings, not stored in repo - if (!record->event.pressed) { - clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); - send_string(decoy_secret[keycode - KC_SECRET_1]); - } - return false; - break; - */ - - // These are a serious of gaming macros. - // Only enables for the viterbi, basically, - // to save on firmware space, since it's limited. -#ifdef MACROS_ENABLED - case KC_OVERWATCH: // Toggle's if we hit "ENTER" or "BACKSPACE" to input macros - if (record->event.pressed) { userspace_config.is_overwatch ^= 1; eeprom_update_byte(EECONFIG_USERSPACE, userspace_config.raw); } - return false; break; -#endif // MACROS_ENABLED - - case KC_CCCV: // One key copy/paste - if(record->event.pressed){ - copy_paste_timer = timer_read(); - } else { - if (timer_elapsed(copy_paste_timer) > TAPPING_TERM) { // Hold, copy - register_code(KC_LCTL); - tap(KC_C); - unregister_code(KC_LCTL); -#ifdef AUDIO_ENABLE - PLAY_SONG(tone_copy); -#endif - } else { // Tap, paste - register_code(KC_LCTL); - tap(KC_V); - unregister_code(KC_LCTL); -#ifdef AUDIO_ENABLE - PLAY_SONG(tone_paste); -#endif - } - } - return false; - break; - case CLICKY_TOGGLE: -#ifdef AUDIO_CLICKY - userspace_config.clicky_enable = clicky_enable; - eeprom_update_byte(EECONFIG_USERSPACE, userspace_config.raw); -#endif - break; -#ifdef UNICODE_ENABLE - case UC_FLIP: // (╯°□°)╯ ︵ ┻━┻ - if (record->event.pressed) { - register_code(KC_RSFT); - tap(KC_9); - unregister_code(KC_RSFT); - process_unicode((0x256F | QK_UNICODE), record); // Arm - process_unicode((0x00B0 | QK_UNICODE), record); // Eye - process_unicode((0x25A1 | QK_UNICODE), record); // Mouth - process_unicode((0x00B0 | QK_UNICODE), record); // Eye - register_code(KC_RSFT); - tap(KC_0); - unregister_code(KC_RSFT); - process_unicode((0x256F | QK_UNICODE), record); // Arm - tap(KC_SPC); - process_unicode((0x0361 | QK_UNICODE), record); // Flippy - tap(KC_SPC); - process_unicode((0x253B | QK_UNICODE), record); // Table - process_unicode((0x2501 | QK_UNICODE), record); // Table - process_unicode((0x253B | QK_UNICODE), record); // Table - } - return false; - break; -#endif // UNICODE_ENABLE - -} - -return true; - // return process_record_keymap(keycode, record) && process_record_secrets(keycode, record); -} - -void tap_dance_mouse_btns (qk_tap_dance_state_t *state, void *user_data) { - switch(state->count){ - case 1: - register_code(KC_BTN1); - break; - case 2: - register_code(KC_BTN2); - break; - case 3: - register_code(KC_BTN3); - break; - case 4: - register_code(KC_BTN4); - break; - case 5: - register_code(KC_BTN5); - break; - default: - break; - } - reset_tap_dance(state); -} - -// counting on all the qwerty layers to be less than dvorak_on_bepo -int on_qwerty(){ - uint8_t deflayer = (biton32(default_layer_state)); - return (deflayer < DVORAK_ON_BEPO); -} - -void tap_dance_df_bepo_layers_switch (qk_tap_dance_state_t *state, void *user_data) { - switch(state->count){ - case 1: - switch_default_layer(DVORAK_ON_BEPO); - break; - case 2: - switch_default_layer(BEPO); - break; - case 3: - layer_invert(LAYERS); - break; - default: - break; - } - reset_tap_dance(state); -} - -void tap_dance_layer_switch (qk_tap_dance_state_t *state, void *user_data) { - switch(state->count){ - case 1: - if(on_qwerty()) - layer_invert(SYMB); - else - layer_invert(SYMB_ON_BEPO); - break; - case 2: - layer_invert(MDIA); - break; - case 3: - layer_invert(LAYERS); - default: - break; - } - reset_tap_dance(state); -} - -void tap_dance_default_layer_switch (qk_tap_dance_state_t *state, void *user_data) { - switch(state->count){ - case 1: - switch_default_layer(DVORAK); - break; - case 2: - switch_default_layer(DVORAK_ON_BEPO); - break; - case 3: - switch_default_layer(BEPO); - break; - default: - break; - } - reset_tap_dance(state); -} - -// switch the default layer to another qwerty based layer. -void switch_default_layer_on_qwerty(int count) { - switch(count){ - case 1: - switch_default_layer(DVORAK); - break; - case 2: - switch_default_layer(QWERTY); - break; - case 3: - switch_default_layer(COLEMAK); - break; - case 4: - switch_default_layer(WORKMAN); - break; - case 5: - switch_default_layer(NORMAN); - break; - default: - switch_default_layer(DVORAK); - break; - } -} - -// switch the default layer to another bepo based layer. -void switch_default_layer_on_bepo(int count) { - switch(count){ - case 1: - switch_default_layer(DVORAK_ON_BEPO); - break; - case 2: - switch_default_layer(BEPO); - break; - default: - switch_default_layer(DVORAK_ON_BEPO); - break; - } -} - - -// tap to change the default layer. Distinguishes between layers that are based on -// a qwerty software keyboard and a bepo software keyboard. -// if shifted, choose layers based on the other software keyboard, otherwise choose only -// layers that work on the current software keyboard. -void tap_dance_default_os_layer_switch (qk_tap_dance_state_t *state, void *user_data) { - //uint8_t shifted = (get_mods() & MOD_BIT(KC_LSFT|KC_RSFT)); - bool shifted = ( keyboard_report->mods & (MOD_BIT(KC_LSFT)|MOD_BIT(KC_RSFT)) ); - int qwerty = on_qwerty(); - - - // shifted, choose between layers on the other software keyboard - if(shifted){ - if (qwerty) - switch_default_layer_on_bepo(state->count); - else - switch_default_layer_on_qwerty(state->count); - - // not shifted, choose between layers on the same software keyboard - } else { - if (qwerty) - switch_default_layer_on_qwerty(state->count); - else - switch_default_layer_on_bepo(state->count); - } - - reset_tap_dance(state); -} - - -/* Return an integer that corresponds to what kind of tap dance should be executed. - * - * How to figure out tap dance state: interrupted and pressed. - * - * Interrupted: If the state of a dance dance is "interrupted", that means that another key has been hit - * under the tapping term. This is typically indicitive that you are trying to "tap" the key. - * - * Pressed: Whether or not the key is still being pressed. If this value is true, that means the tapping term - * has ended, but the key is still being pressed down. This generally means the key is being "held". - * - * One thing that is currenlty not possible with qmk software in regards to tap dance is to mimic the "permissive hold" - * feature. In general, advanced tap dances do not work well if they are used with commonly typed letters. - * For example "A". Tap dances are best used on non-letter keys that are not hit while typing letters. - * - * Good places to put an advanced tap dance: - * z,q,x,j,k,v,b, any function key, home/end, comma, semi-colon - * - * Criteria for "good placement" of a tap dance key: - * Not a key that is hit frequently in a sentence - * Not a key that is used frequently to double tap, for example 'tab' is often double tapped in a terminal, or - * in a web form. So 'tab' would be a poor choice for a tap dance. - * Letters used in common words as a double. For example 'p' in 'pepper'. If a tap dance function existed on the - * letter 'p', the word 'pepper' would be quite frustating to type. - * - * For the third point, there does exist the 'DOUBLE_SINGLE_TAP', however this is not fully tested - * - */ -int cur_dance (qk_tap_dance_state_t *state) { - if (state->count == 1) { - if (state->interrupted || !state->pressed) return SINGLE_TAP; - //key has not been interrupted, but they key is still held. Means you want to send a 'HOLD'. - else return SINGLE_HOLD; - } - else if (state->count == 2) { - /* - * DOUBLE_SINGLE_TAP is to distinguish between typing "pepper", and actually wanting a double tap - * action when hitting 'pp'. Suggested use case for this return value is when you want to send two - * keystrokes of the key, and not the 'double tap' action/macro. - */ - if (state->interrupted) return DOUBLE_SINGLE_TAP; - else if (state->pressed) return DOUBLE_HOLD; - else return DOUBLE_TAP; - } - //Assumes no one is trying to type the same letter three times (at least not quickly). - //If your tap dance key is 'KC_W', and you want to type "www." quickly - then you will need to add - //an exception here to return a 'TRIPLE_SINGLE_TAP', and define that enum just like 'DOUBLE_SINGLE_TAP' - if (state->count == 3) { - if (state->interrupted || !state->pressed) return TRIPLE_TAP; - else return TRIPLE_HOLD; - } - else return 8; //magic number. At some point this method will expand to work for more presses -} -//instanalize an instance of 'tap' for the 'x' tap dance. -static tdtap xtap_state = { - .is_press_action = true, - .state = 0 -}; -/* - This so I can have a single key that acts like LGUI in DVORAK no - matter which keymap is my current default. - It also allows for the - shift gui and ctl gui, on the same key, So the same key is Escape, - and the mostcommon modifiers in my xmonad control keymap, while also - insuring that dvorak is active for the xmonad command key - Single tap = ESC - tap and hold = dvorak with L_GUI - double tap = One shot dvorak layer with LSFT LGUI mods - double hold = dvorak with LCTL LGUI - double single tap = esc. -*/ -int get_xmonad_layer(){ - int qwerty = on_qwerty(); - - if (qwerty) - return(XMONAD); - else - return(XMONAD_FR); -} - - -void x_finished (qk_tap_dance_state_t *state, void *user_data) { - int xmonad_layer = get_xmonad_layer(); - xtap_state.state = cur_dance(state); - switch (xtap_state.state) { - case SINGLE_TAP: - register_code(KC_ESC); - break; - case SINGLE_HOLD: - layer_on(xmonad_layer); - set_oneshot_mods (MOD_LGUI); - //set_oneshot_layer (DVORAK, ONESHOT_START); - break; - case DOUBLE_TAP: - set_oneshot_mods ((MOD_LCTL | MOD_LGUI)); - layer_on (xmonad_layer); - set_oneshot_layer (xmonad_layer, ONESHOT_START); - break; - case DOUBLE_HOLD: - set_oneshot_mods (MOD_LSFT | MOD_LGUI); - if (xmonad_layer != -1) - layer_on(xmonad_layer); - break; - case DOUBLE_SINGLE_TAP: - register_code(KC_ESC); - unregister_code(KC_ESC); - register_code(KC_ESC); - //Last case is for fast typing. Assuming your key is `f`: - //For example, when typing the word `buffer`, and you want to make sure that you send `ff` and not `Esc`. - //In order to type `ff` when typing fast, the next character will have to be hit within the `TAPPING_TERM`, which by default is 200ms. - } -} - -void x_reset (qk_tap_dance_state_t *state, void *user_data) { - int xmonad_layer = get_xmonad_layer(); - switch (xtap_state.state) { - case SINGLE_TAP: - unregister_code(KC_ESC); - break; - case SINGLE_HOLD: - layer_off(xmonad_layer); - break; - case DOUBLE_TAP: - set_oneshot_layer (xmonad_layer, ONESHOT_PRESSED); - break; - case DOUBLE_HOLD: - layer_off(xmonad_layer); - break; - case DOUBLE_SINGLE_TAP: - unregister_code(KC_ESC); - } - xtap_state.state = 0; -} - -//Tap Dance Definitions -qk_tap_dance_action_t tap_dance_actions[] = { - //Tap once for Esc, twice for Caps Lock - [TD_ESC_CAPS] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, KC_CAPS), - [TD_TAB_BKTAB] = ACTION_TAP_DANCE_DOUBLE(KC_TAB, LSFT(KC_TAB)), - [TD_MDIA_SYMB] = ACTION_TAP_DANCE_FN(tap_dance_layer_switch), - [TD_DVORAK_BEPO] = ACTION_TAP_DANCE_FN(tap_dance_df_bepo_layers_switch), - [TD_DEF_LAYER_SW] = ACTION_TAP_DANCE_FN(tap_dance_default_layer_switch), - [TD_DEF_OS_LAYER_SW] = ACTION_TAP_DANCE_FN(tap_dance_default_os_layer_switch), - [TD_HOME_END] = ACTION_TAP_DANCE_DOUBLE(KC_HOME, KC_END), - [TD_XMONAD_ESC] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, x_finished, x_reset), - [TD_MOUSE_BTNS] = ACTION_TAP_DANCE_FN(tap_dance_mouse_btns) -}; diff --git a/users/ericgebhart/ericgebhart.h b/users/ericgebhart/ericgebhart.h deleted file mode 100644 index 6eb11ddf..00000000 --- a/users/ericgebhart/ericgebhart.h +++ /dev/null @@ -1,429 +0,0 @@ -/* - Copyright 2018 Eric Gebhart - - 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 - -#ifndef ericgebhart -#define ericgebhart - -#include "quantum.h" -#include "process_keycode/process_tap_dance.h" - - -void tap(uint16_t keycode); -bool process_record_secrets(uint16_t keycode, keyrecord_t *record); - - -#define EECONFIG_USERSPACE (uint8_t *)19 - -typedef union { - uint8_t raw; - struct { - bool clicky_enable :1; - bool rgb_layer_change :1; - bool is_overwatch :1; - bool nuke_switch :1; - }; -} userspace_config_t; - -#define ___ KC_TRNS -#define XXX KC_NO - -// The most portable copy/paste keys (windows (mostly), linux, and some terminal emulators). -#define MK_CUT LSFT(KC_DEL) // shift + delete -#define MK_COPY LCTL(KC_INS) // ctrl + insert -#define MK_PASTE LSFT(KC_INS) // shift + insert - - -#define DVORAK 0 // dvorak layout (default) -#define QWERTY 1 -#define COLEMAK 2 -#define WORKMAN 3 -#define NORMAN 4 -// bepo layers -#define DVORAK_ON_BEPO 6 // dvorak layout (default) -#define BEPO 7 // Bepo -// non-default layers -#define SYMB 8 // symbols and numbers -#define SYMB_ON_BEPO 9 // symbols and numbers -#define MDIA 10 // mouse knd media eys -#define LAYERS 11 // layers and right mousekeys. -#define XMONAD 12 // xmonad ie. dvorak. -#define XMONAD_FR 13 // xmonad ie. dvorak. - - -// for the creation of dvorak keys on an Bepo keyboard at the OS layer. - -// so we can create an array of reasonable size -// for our translation keys. We have to create a -// good range of numbers -#define GR(x) (x-SAFE_RANGE) - -uint8_t gr(uint8_t); -void send_keycode(uint8_t); - -#define MOD_NONE 0x00 - -// indexs for the keycode translation table. -#define UNSHIFTED_KEY(key) key_translations[gr(key)][0][0] -#define UNSHIFTED_MODS(key) key_translations[gr(key)][0][1] -#define SHIFTED_KEY(key) key_translations[gr(key)][1][0] -#define SHIFTED_MODS(key) key_translations[gr(key)][1][1] - - -enum userspace_custom_keycodes { - // keep the keycodes using the send_key function close to SAFE_RANGE - // so the array of keycodes remains a reasonbale size. - DB_1 = SAFE_RANGE, // can always be here - DB_2, - DB_3, - DB_4, - DB_5, - DB_6, - DB_7, - DB_8, - DB_9, - DB_0, - DB_GRV, - DB_SCOLON, - DB_SLASH, - DB_BACKSLASH, - DB_EQL, - DB_DOT, - DB_COMM, - DB_QUOT, - DB_MINUS, - DB_RPRN, - DB_LPRN, - DB_RBRC, - DB_LBRC, - // for symbols layer - DB_HASH, - DB_LCBR, - DB_RCBR, - DB_PIPE, - DB_TILD, - DB_CIRC, - DB_LESS, - DB_GRTR, - // End of dvorak on bepo translation keys. - - EPRM, - VRSN, - KC_DVORAK_ON_BEPO, - KC_BEPO, - KC_NORMAN, - KC_QWERTY, - KC_COLEMAK, - KC_DVORAK, - KC_WORKMAN, - KC_MAKE, - KC_RESET, - KC_RGB_T, - KC_SECRET_1, - KC_SECRET_2, - KC_SECRET_3, - KC_SECRET_4, - KC_SECRET_5, - KC_CCCV -}; - -#define SFTGUI_T(kc) { MT(MOD_LGUI | MOD_LSFT, kc) } -#define SFT_GUI_ESC MT(MOD_LSFT | MOD_LGUI, KC_PGDN) // shift LGUI or Escape. -#define ALT_ENT ALT_T(KC_ENT) // Alt or enter -#define CTL_SPC CTL_T(KC_SPC) // ctrl or space -#define CTL_BSPC CTL_T(KC_BSPC) // ctrl or backspace -#define ALT_DEL ALT_T(KC_DEL) // Alt or delete -#define GUI_ESC GUI_T(KC_ESC) // Gui or escape -#define ALGR_SYMB ALGR_T(TG(SYMB)) // Alt gre or toggle symbol layer - -#define KC_SFT_T_U SFT_T(KC_U) -#define KC_SFT_T_H SFT_T(KC_H) -#define KC_LT_SYMB_I LT(SYMB, KC_I) -#define KC_LT_SYMB_D LT(SYMB, KC_D) - -// for dvorak on bepo -#define BP_SFT_T_U SFT_T(BP_U) -#define BP_SFT_T_H SFT_T(BP_H) -#define BP_LT_SYMB_D LT(SYMB, BP_D) - - -// for bepo on bepo -#define BP_SFT_T_T SFT_T(BP_T) -#define BP_LT_SYMB_C LT(SYMB_ON_BEPO, BP_C) -#define BP_LT_SYMB_I LT(SYMB_ON_BEPO, BP_I) -#define BP_SFT_T_E SFT_T(BP_E) -#define BP_SFT_T_ECRC SFT_T(BP_ECRC) -#define BP_SFT_T_CCED SFT_T(BP_CCED) -#define BP_LT_SYMB_COMM LT(SYMB,BP_COMM) - -// OSM keycodes, to keep things clean and easy to change -#define KC_MLSF OSM(MOD_LSFT) -#define KC_MRSF OSM(MOD_RSFT) -#define OS_LGUI OSM(MOD_LGUI) -#define OS_RGUI OSM(MOD_RGUI) -#define OS_LSFT OSM(MOD_LSFT) -#define OS_RSFT OSM(MOD_RSFT) -#define OS_LCTL OSM(MOD_LCTL) -#define OS_RCTL OSM(MOD_RCTL) -#define OS_LALT OSM(MOD_LALT) -#define OS_RALT OSM(MOD_RALT) -#define ALT_APP ALT_T(KC_APP) - -#define MG_NKRO MAGIC_TOGGLE_NKRO - - -//// TAP DANCE - -typedef struct { - bool is_press_action; - int state; -} tdtap; - -enum { - SINGLE_TAP = 1, - SINGLE_HOLD = 2, - DOUBLE_TAP = 3, - DOUBLE_HOLD = 4, - DOUBLE_SINGLE_TAP = 5, //send two single taps - TRIPLE_TAP = 6, - TRIPLE_HOLD = 7 - }; - - //Tap Dance Declarations - enum { - TD_ESC_CAPS = 0, - TD_TAB_BKTAB = 1, - TD_MDIA_SYMB = 2, - TD_HOME_END = 3, - TD_XMONAD_ESC = 4, - TD_DEF_LAYER_SW = 5, - TD_DEF_OS_LAYER_SW = 6, - TD_MOUSE_BTNS = 7, - TD_DVORAK_BEPO = 8 - }; - - -// Tap dance -#define TAB_BKTAB TD(TD_TAB_BKTAB) // Tab or backtab tapdance. -#define MDIA_SYMB TD(TD_MDIA_SYMB) // MDIA or Symb layer tapdance toggle. -#define DEF_LAYER_SW TD(TD_DEF_LAYER_SW) // dvorak, dvorak_on_bepo, bepo default layer -#define DEF_OS_LAYER_SW TD(TD_DEF_OS_LAYER_SW) // dvorak, dvorak_on_bepo, bepo default layer -#define HOME_END TD(TD_HOME_END) // home or end tapdance. -#define XMONAD_ESC TD(TD_XMONAD_ESC) // Escape, dvorak, media or symb. - tap and hold tap dance. 1-4 -#define DVORAK_ET_BEPO TD(TD_DVORAK_BEPO) // Escape, dvorak, media or symb. - tap and hold tap dance. 1-4 -#define TDMOUSE_BTNS TD(TD_MOUSE_BTNS) // hmmm. 1-5 - - -int on_qwerty(void); -int get_xmonad_layer(void); -int cur_dance (qk_tap_dance_state_t *state); - -//for the x tap dance. Put it here so it can be used in any keymap -void x_finished (qk_tap_dance_state_t *state, void *user_data); -void x_reset (qk_tap_dance_state_t *state, void *user_data); - - -// Blocks for each of the four major keyboard layouts -// Organized so we can quickly adapt and modify all of them -// at once, rather than for each keyboard, one at a time. -// And this allows for much cleaner blocks in the keymaps. -// For instance Tap/Hold for Control on all of the layouts - -// NOTE: These are all the same length. If you do a search/replace -// then you need to add/remove underscores to keep the -// lengths consistent. - -// Since our quirky block definitions are basically a list of comma separated -// arguments, we need a wrapper in order for these definitions to be -// expanded before being used as arguments to the LAYOUT_xxx macro. -#if (!defined(LAYOUT) && defined(KEYMAP)) -#define LAYOUT KEYMAP -#endif - -#define LAYOUT_ergodox_wrapper(...) LAYOUT_ergodox(__VA_ARGS__) -#define LAYOUT_ergodox_pretty_wrapper(...) LAYOUT_ergodox_pretty(__VA_ARGS__) -#define KEYMAP_wrapper(...) LAYOUT(__VA_ARGS__) -#define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__) - -//Dvorak on a qwerty software layer in the OS -#define ___DVORAK_L1___ KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y -#define ___DVORAK_L2___ KC_A, KC_O, KC_E, KC_SFT_T_U, KC_LT_SYMB_I -#define ___DVORAK_L3___ KC_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_LT_SYMB_D, KC_SFT_T_H, KC_T, KC_N, KC_S -#define ___DVORAK_R3___ KC_B, KC_M, KC_W, KC_V, KC_Z - - -// Dvorak on fr-bepo software layer in the OS. -// for dvorak and all the other qwerty like keyboards on bepo -#define ___NUMBER_BEPO_L___ DB_1, DB_2, DB_3, DB_4, DB_5 -#define ___NUMBER_BEPO_R___ DB_6, DB_7, DB_8, DB_9, DB_0 - -#define ___DVORAK_FR_L1___ DB_QUOT, DB_COMM, DB_DOT, BP_P, BP_Y -#define ___DVORAK_FR_L2___ BP_A, BP_O, BP_E, BP_SFT_T_U, BP_LT_SYMB_I -#define ___DVORAK_FR_L3___ DB_SCOLON, BP_Q, BP_J, BP_K, BP_X - -#define ___DVORAK_FR_R1___ BP_F, BP_G, BP_C, BP_R, BP_L -#define ___DVORAK_FR_R2___ BP_LT_SYMB_D, BP_SFT_T_H, BP_T, BP_N, BP_S -#define ___DVORAK_FR_R3___ BP_B, BP_M, BP_W, BP_V, BP_Z - - -// Bepo on fr-bepo software layer -// for bepo on bepo -#define ___SYMBOL_BEPO_L___ /* BP_DLR */ BP_DQOT, BP_LGIL, BP_RGIL, BP_LPRN, BP_RPRN -#define ___SYMBOL_BEPO_R___ BP_AT, BP_PLUS, BP_MINS, BP_SLASH, BP_ASTR /* BP_EQL, BP_PERC */ - -#define ___BEPO_FR_L1___ BP_B, BP_ECUT, BP_P, BP_O, BP_EGRV -#define ___BEPO_FR_L2___ BP_A, BP_U, BP_I, BP_SFT_T_E, BP_LT_SYMB_COMM -#define ___BEPO_FR_L3___ /*BP_ECRC*/ BP_AGRV, BP_Y, BP_X, BP_DOT, BP_K - -#define ___BEPO_FR_R1___ /* BP_DCRC*/ BP_V, BP_D, BP_L, BP_J, BP_Z //, BP_W -#define ___BEPO_FR_R2___ /* BP_C */ BP_SFT_T_T, BP_S, BP_R, BP_N, BP_M //BP_CCED -#define ___BEPO_FR_R3___ BP_APOS, BP_Q, BP_G, BP_H, BP_F - -// the bottom rows for keyboards on bepo. -#define ___ERGODOX_BOTTOM_RIGHT_FR___ KC_UP, KC_DOWN, DB_BACKSLASH, LCTL(BP_V), LCTL(BP_C) -#define ___ERGODOX_BOTTOM_LEFT_FR___ LCTL(BP_C), LCTL(BP_V), KC_INS, KC_LEFT, KC_RIGHT - -// Since we have 7 default layouts (QWERTY, DVORAK, COLEMAK and WORKMAN, NORMAN, -// 2 of them based on a Bepo software keyboard, --- DVORAK_ON_BEPO and BEPO), -// this allows us to quickly modify the bottom row for all of the layouts -// so we don't have to alter it 4 times and hope that we haven't missed -// anything -#define ___ERGODOX_BOTTOM_LEFT___ LCTL(KC_C), LCTL(KC_V), KC_INS, KC_LEFT, KC_RIGHT -#define ___ERGODOX_BOTTOM_RIGHT___ KC_UP, KC_DOWN, KC_BSLASH, LCTL(KC_V), LCTL(KC_C) - -#define ___ERGODOX_THUMB_LEFT___ \ - KC_RALT, ALGR_SYMB, \ - HOME_END, \ - CTL_BSPC, ALT_DEL, XMONAD_ESC - -#define ___ERGODOX_THUMB_RIGHT___ \ - ALGR_SYMB, TD_MOUSE_BTNS, \ - KC_PGUP, \ - KC_PGDN, ALT_ENT, CTL_SPC - -#define ___ERGODOX_TRANS_THUMBS___ \ - ___, ___, \ - ___, \ - ___, ___, ___ \ - -#define ___ERGODOX_TRANS_BOTTOM___ \ - ___,___,___,___,___ - -#define ___ERGODOX_TRANS_6_ROW___ \ - ___,___,___,___,___,___ - - - -// Qwerty based layers that I don't really use. -#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_SLASH - - -#define ___COLEMAK_L1___ KC_Q, KC_W, KC_F, KC_P, KC_G -#define ___COLEMAK_L2___ KC_A, KC_R, KC_S, KC_T, KC_D -#define ___COLEMAK_L3___ KC_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, KC_O -#define ___COLEMAK_R3___ KC_K, KC_M, KC_COMM, KC_DOT, KC_SLASH - - -#define ___COLEMAK_MOD_DH_L1___ KC_Q, KC_W, KC_F, KC_P, KC_B -#define ___COLEMAK_MOD_DH_L2___ KC_A, KC_R, KC_S, KC_T, KC_G -#define ___COLEMAK_MOD_DH_L3___ CTL_T(KC_Z), KC_X, KC_C, KC_D, KC_V - -#define ___COLEMAK_MOD_DH_R1___ KC_J, KC_L, KC_U, KC_Y, KC_SCLN -#define ___COLEMAK_MOD_DH_R2___ KC_M, KC_N, KC_E, KC_I, KC_O -#define ___COLEMAK_MOD_DH_R3___ KC_K, KC_H, KC_COMM, KC_DOT, KC_SLASH - - -#define ___WORKMAN_L1___ KC_Q, KC_D, KC_R, KC_W, KC_B -#define ___WORKMAN_L2___ KC_A, KC_S, KC_H, KC_T, KC_G -#define ___WORKMAN_L3___ KC_Z, KC_X, KC_M, KC_C, KC_V - -#define ___WORKMAN_R1___ KC_J, KC_F, KC_U, KC_P, KC_SCLN -#define ___WORKMAN_R2___ KC_Y, KC_N, KC_E, KC_O, KC_I -#define ___WORKMAN_R3___ KC_K, KC_L, KC_COMM, KC_DOT, KC_SLASH - - -#define ___NORMAN_L1___ KC_Q, KC_W, KC_D, KC_F, KC_K -#define ___NORMAN_L2___ KC_A, KC_S, KC_E, KC_T, KC_G -#define ___NORMAN_L3___ KC_Z, KC_X, KC_C, KC_V, KC_B - -#define ___NORMAN_R1___ KC_J, KC_U, KC_R, KC_L, KC_SCLN -#define ___NORMAN_R2___ KC_Y, KC_N, KC_I, KC_O, KC_U -#define ___NORMAN_R3___ KC_P, KC_M, KC_COMM, KC_DOT, KC_SLASH - - -// For the top rows. Numbers for most things, symbols for Bepo. - -// for everything on qwerty. -#define ___NUMBER_L___ KC_1, KC_2, KC_3, KC_4, KC_5 -#define ___NUMBER_R___ KC_6, KC_7, KC_8, KC_9, KC_0 - -// function key rows, works for everyone. -#define ___FUNC_L___ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5 -#define ___FUNC_R___ KC_F6, KC_F7, KC_F8, KC_F9, KC_F10 - - -// Rows for the auxillary layers. - -// The symbol layer is for qwerty. I need another one for Bepo... - -// the KC_P? codes don't work for me. I don't use those shifted values anyway. -#define ___KEYPAD_1___ KC_7, KC_8, KC_9, KC_PSLS -#define ___KEYPAD_2___ KC_4, KC_5, KC_6, KC_PAST -#define ___KEYPAD_3___ KC_1, KC_2, KC_3, KC_PMNS -#define ___KEYPAD_4___ KC_0, KC_DOT, KC_PEQL, KC_PPLS - -#define ___KEYPAD_1_BP___ DB_7, DB_8, DB_9, BP_SLASH -#define ___KEYPAD_2_BP___ DB_4, DB_5, DB_6, BP_ASTR -#define ___KEYPAD_3_BP___ DB_1, DB_2, DB_3, DB_MINUS -#define ___KEYPAD_4_BP___ DB_0, DB_DOT, DB_EQL, BP_PLUS - -#define ___SYMBOLS_1___ KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE -#define ___SYMBOLS_2___ KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV -#define ___SYMBOLS_3___ KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD - -#define ___SYMBOLS_1_BP___ KC_EXLM, BP_AT, DB_LCBR, DB_RCBR, DB_PIPE -#define ___SYMBOLS_2_BP___ DB_HASH, BP_DLR, DB_LPRN, DB_RPRN, DB_GRV -#define ___SYMBOLS_3_BP___ BP_PERC, DB_CIRC, DB_LBRC, DB_RBRC, DB_TILD - -#define ___MOUSE_LDUR___ KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R -#define ___MWHEEL_LDUR___ KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R -#define ___MOUSE_BTNS_R___ KC_BTN1, KC_BTN2, KC_BTN3, KC_BTN4, KC_BTN5 -#define ___MOUSE_BTNS_L___ KC_BTN5, KC_BTN4, KC_BTN3, KC_BTN2, KC_BTN1 -#define ___MOUSE_ACCL_012___ KC_ACL0, KC_ACL1, KC_ACL2 - -#define ___MUTE_PLAY_STOP___ KC_MUTE, KC_MPLY, KC_MSTP -#define ___VI_ARROWS___ KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT - -#define ___LAYERS_L1___ DF(BEPO), DF(DVORAK_ON_BEPO) -#define ___LAYERS_L2___ DF(COLEMAK), DF(DVORAK) -#define ___LAYERS_L3___ DF(QWERTY), DF(NORMAN), DF(WORKMAN) -#define ___LAYERS_L4___ TO(MDIA), TO(SYMB_ON_BEPO), TO(SYMB) - - -#endif diff --git a/users/ericgebhart/flash-ergodox b/users/ericgebhart/flash-ergodox deleted file mode 100644 index 945b2b60..00000000 --- a/users/ericgebhart/flash-ergodox +++ /dev/null @@ -1 +0,0 @@ -teensy-loader-cli -mmcu=atmega32u4 -w $1 diff --git a/users/ericgebhart/readme.md b/users/ericgebhart/readme.md deleted file mode 100644 index cd57735c..00000000 --- a/users/ericgebhart/readme.md +++ /dev/null @@ -1,124 +0,0 @@ -Overview -======== - -This is my personal userspace. Most of my code exists here. I only have one keymap, and that -is for an ergodox_ez. There are a lot of layers, 7 of them are default layers. I primarily use -dvorak and Bepo. I've been using emacs in vi mode for over 23 years. I also us Xmonad as my -window manager, additionally I've been using a Kinesis advantage keyboard in dvorak for over 20 -years. All of those things tend to color the layouts I have. - -The Bepo layer needs some love. It is true to the layout at Bepo.fr, but I find it a little -cumbersome, and I miss some of my favorite keys. - -There are 2 dvorak layers, one for a qwerty OS keyboard, and one for a Bepo OS keyboard. -There is a symbol/keypad layer for bepo and qwerty. And of course there is a mouse/media layer. -There are 2 Xmonad layers one for qwerty and one for Bepo. Layer selection happens automatically -based on your current default layer. I use 2 tap dance keys for layer selection. - -There are also Qwerty, Colemak, Workman and Norman layers for qwerty. - - -Keyboard Layout Templates -------------------------- - -I borrowed the idea for the keyboard defines and some of the definitions from @drashna. -I think it is an awesome idea, It makes consistency between layout definitions so much easier. -@drashna had this to say about it. - - -This borrows from @jola5's "Not quite neo" code. This allows me to maintain blocks of keymaps in the userspace, so that I can modify the userspace, and this is reflected in all of the keyboards that use it, at once. - -This makes adding tap/hold mods, or other special keycodes or functions to all keyboards super easy, as it's done to all of them at once. - -The caveat here is that the keymap needs a processor/wrapper, as it doesn't like the substitutions. However, this is as simple as just pushing it through a define. For instance: - -`#define LAYOUT_ergodox_wrapper(...) LAYOUT_ergodox(__VA_ARGS__)` - -Once that's been done and you've switched the keymaps to use the "wrapper", it will read the substitution blocks just fine. - -Credit goes to @jola5 for first implementing this awesome idea. - - -Custom Keycodes ---------------- - -Keycodes are defined in the ericgebhart.h file and need to be included in the keymap.c files, so that they can be used there. The keymap.c file has very little in it, the most important thing to see there are the keys that are at the ends of each row, ie. the 1st and last key on each row is defined there. -Everything else is in ericgebhart.h. - -Layer Indication ----------------- - -The ergodox_ez only has 3 leds, layer indication is pretty lame. -Currently the first led lights up if the default layer is not qwerty. The symbol and media layers get -the other 2 leds, and all the leds light up if you are on the "layers" layer. -I hope I can figure out how to make it better, but I just don't see a way with 3 leds and 11 layers. - - -BEPO vs Qwerty Layers ---------------------- - -There are 7 base layers. Dvorak, qwerty, Colemak, Workman, and Norman work on a Qwerty software layer on the OS. Dvorak_on_bepo and Bepo both work on a Bepo software layer on the os. -Dvorak on qwerty is the default. There is a function in ericgebhart.c which will allow the keyboard -to persist it's default layer through power down. It is currently commented out. - -I don't actually use Qwerty, but it seemed like I should have it, -@drashna had it along with Colemak, Workman and Norman so I added them -to my existing dvorak and bepo definitions. - -There are two tap dance functions that allow switching the default layers -and the overlay layers. - -The default layers switch according to the current OS keyboard of the current Default layer. -Shifting the key, causes the selection to use the other OS keyboard selections. ie, -if you are on qwerty, you get dvorak, qwerty, colemak, workman and norman. If you shift it you get -dvorak on bepo and bepo. If you are not on qwerty the unshifted taps get dvorak and bepo on bepo. - -The other tap dance for layers is for the symbol, mouse and layers layers. The layers layer is just a -safety layer, knowing I can get to if I screw something up... - -XMonad ---------------------- - -Additionally there is an advanced tap dance called XMONAD_ESC. One tap is Escape, tap and hold is -LGUI with the proper XMONAD layer, it is essentially dvorak, for the -given OS layer. 2 taps is Shift lgui with xmonad, and 2 taps and hold -is Control LGUI with Xmonad. This allows for the finger patterns for -Xmonad to remain the same regarless of the keyboard in use. The hold -versions allow for secondary menu selection in Xmonad, the 2 tap function -must be for a key that is in the top level keymap of Xmonad. This is how -many people use xmonad so it's not a real problem. There are plenty of -keys combinations to choose from with these choices. The function can -be expanded to 3 taps and 3 tap and hold, and on and on.... - -I have a few other special keys, for momentary symbols or shift on the home row of each hand. - -Also, after using a kinesis for many years I'm very accustomed to the -space, enter, backspace and delete keys on the thumbs. I've added control -and alt as a secondary function. These are also the Control and Alt keys -if held down. - -Tap Dance --------------------- - -Additionally there are other tap dance functions, tab-backtab, home-end as well as I few I'm not actually using. - -Building and flashing ------------------------ - -```make ergodox_z:ericgebhart``` will compile the code. - -I use the teensy-loader cli so that's all I know. There is a script here called flash_ergodox - -Use it like this, - -```flash-ergodox ``` - -then use a paperclip to push the reset button on your keyboard. - -Switching the OS keyboard -------------------------- - -This varies from system to system. I use Arch Linux, so I use ```setxkbmap```. -I've included a helper script which makes it easy to switch between EN and FR Bepo, -called switch-kbd. - diff --git a/users/ericgebhart/rules.mk b/users/ericgebhart/rules.mk deleted file mode 100644 index 2572d211..00000000 --- a/users/ericgebhart/rules.mk +++ /dev/null @@ -1,18 +0,0 @@ -USER_NAME := ericgebhart -SRC += ericgebhart.c - -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -COMMAND_ENABLE = yes # Commands for debug and configuration -NKRO_ENABLE = yes # USB Nkey Rollover - for issues, see github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -SWAP_HANDS_ENABLE= yes # Allow swapping hands of keyboard -KEY_LOCK_ENABLE = yes # Enable the KC_LOCK key -TAP_DANCE_ENABLE = yes # Enable the tap dance feature. -CONSOLE_ENABLE = yes # Console for debug - -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration -UNICODE_ENABLE = no -SLEEP_LED_ENABLE = no -API_SYSEX_ENABLE = no -RGBLIGHT_ENABLE = no -RGBLIGHT_ANIMATION = no diff --git a/users/ericgebhart/switch-kbd b/users/ericgebhart/switch-kbd deleted file mode 100644 index 4401967a..00000000 --- a/users/ericgebhart/switch-kbd +++ /dev/null @@ -1,74 +0,0 @@ -#!/usr/bin/env zsh - -# Switch the keyboard to en-us by default, bepo, or en-dvorak. - -help(){ - print 'switch-kbd - helper for setxkbmap' - print ' ' - print 'Change the keyboard to en-us, fr-bepo, or en-dvorak.' - print 'Uses setxkbmap, so the change only affects the current' - print 'session. This mainly to avoid using a toggle key.' - print ' ' - print ' -b Bepo' - print ' -d Dvorak' - print ' -n do not execute' - print ' -h help text.' - print ' ' - print ' The default is to set the keyboard to en-us.' - exit -} - -layout="-layout us" -variant="" -let "execute = 1" -let "verose = 0" - -# $opt will hold the current option -local opt -while getopts bdnvh opt; do - # loop continues till options finished - # see which pattern $opt matches... - case $opt in - (b) - layout="-layout fr" - variant="-variant bepo" - ;; - - (d) - layout="-layout en" - variant="-variant dvorak" - ;; - (n) - let "execute = 0" - ;; - (v) - let "verbose = 1" - ;; - (h) - help - ;; - # matches a question mark - # (and nothing else, see text) - (\?) - print "Bad option:" $* - print " " - help - return 1 - ;; - esac -done -(( OPTIND > 1 )) && shift $(( OPTIND - 1 )) -##print Remaining arguments are: $* - -mycommand='setxkbmap '${layout}' '${variant} - -if [[ ( $verbose -ne 0 ) ]]; then; - print "setxkbmap Command:" $mycommand -fi - -if [[ ( $execute -ne 0 ) ]] -then; - eval $mycommand -else; - print "did not execute" -fi diff --git a/users/frederik/frederik.c b/users/frederik/frederik.c new file mode 100644 index 00000000..62864b59 --- /dev/null +++ b/users/frederik/frederik.c @@ -0,0 +1,266 @@ +/* +Copyright 2017 Christopher Courtney @drashna + +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 "frederik.h" + +userspace_config_t userspace_config; + +bool mod_key_press_timer(uint16_t code, uint16_t mod_code, bool pressed) { + static uint16_t this_timer; + if (pressed) { + this_timer = timer_read(); + } else { + if (timer_elapsed(this_timer) < TAPPING_TERM) { + tap_code(code); + } else { + register_code(mod_code); + tap_code(code); + unregister_code(mod_code); + } + } + return false; +} + +bool mod_key_press(uint16_t code, uint16_t mod_code, bool pressed, uint16_t this_timer) { + if (pressed) { + this_timer = timer_read(); + } else { + if (timer_elapsed(this_timer) < TAPPING_TERM) { + tap_code(code); + } else { + register_code(mod_code); + tap_code(code); + unregister_code(mod_code); + } + } + return false; +} + +void bootmagic_lite(void) { + matrix_scan(); +#if defined(DEBOUNCING_DELAY) && DEBOUNCING_DELAY > 0 + wait_ms(DEBOUNCING_DELAY * 2); +#elif defined(DEBOUNCE) && DEBOUNCE > 0 + wait_ms(DEBOUNCE * 2); +#else + wait_ms(30); +#endif + matrix_scan(); + if (matrix_get_row(BOOTMAGIC_LITE_ROW) & (1 << BOOTMAGIC_LITE_COLUMN)) { + bootloader_jump(); + } +} + +__attribute__((weak)) void keyboard_pre_init_keymap(void) {} + +void keyboard_pre_init_user(void) { + userspace_config.raw = eeconfig_read_user(); + keyboard_pre_init_keymap(); +} +// Add reconfigurable functions here, for keymap customization +// This allows for a global, userspace functions, and continued +// customization of the keymap. Use _keymap instead of _user +// functions in the keymaps +__attribute__((weak)) void matrix_init_keymap(void) {} + +// Call user matrix init, set default RGB colors and then +// call the keymap's init function +void matrix_init_user(void) { +#if defined(BOOTLOADER_CATERINA) && defined(__AVR__) + DDRD &= ~(1 << 5); + PORTD &= ~(1 << 5); + + DDRB &= ~(1 << 0); + PORTB &= ~(1 << 0); +#endif + matrix_init_keymap(); +} + +__attribute__((weak)) void keyboard_post_init_keymap(void) {} + +void keyboard_post_init_user(void) { +#if defined(RGBLIGHT_ENABLE) + keyboard_post_init_rgb_light(); +#endif +#if defined(RGB_MATRIX_ENABLE) + keyboard_post_init_rgb_matrix(); +#endif + keyboard_post_init_keymap(); +} + +__attribute__((weak)) void shutdown_keymap(void) {} + +void rgb_matrix_update_pwm_buffers(void); + +void shutdown_user(void) { +#ifdef RGBLIGHT_ENABLE + rgblight_enable_noeeprom(); + rgblight_mode_noeeprom(1); + rgblight_setrgb_red(); +#endif // RGBLIGHT_ENABLE +#ifdef RGB_MATRIX_ENABLE +# ifdef __AVR__ + rgb_matrix_set_color_all(0xFF, 0x00, 0x00); + rgb_matrix_update_pwm_buffers(); +# else + rgb_matrix_sethsv_noeeprom(0, 255, 255); + rgb_matrix_mode_noeeprom(1); +# endif +#endif // RGB_MATRIX_ENABLE + shutdown_keymap(); +} + +__attribute__((weak)) void suspend_power_down_keymap(void) {} + +void suspend_power_down_user(void) { suspend_power_down_keymap(); } + +__attribute__((weak)) void suspend_wakeup_init_keymap(void) {} + +void suspend_wakeup_init_user(void) { suspend_wakeup_init_keymap(); } + +__attribute__((weak)) void matrix_scan_keymap(void) {} + +// No global matrix scan code, so just run keymap's matrix +// scan function +void matrix_scan_user(void) { + static bool has_ran_yet; + if (!has_ran_yet) { + has_ran_yet = true; + startup_user(); + } + +#ifdef TAP_DANCE_ENABLE // Run Diablo 3 macro checking code. + run_diablo_macro_check(); +#endif // TAP_DANCE_ENABLE + +#if defined(RGBLIGHT_ENABLE) + matrix_scan_rgb_light(); +#endif // RGBLIGHT_ENABLE +#if defined(RGB_MATRIX_ENABLE) + matrix_scan_rgb_matrix(); +#endif + + matrix_scan_keymap(); +} + +__attribute__((weak)) layer_state_t layer_state_set_keymap(layer_state_t state) { return state; } + +// on layer change, no matter where the change was initiated +// Then runs keymap's layer change check +layer_state_t layer_state_set_user(layer_state_t state) { + state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST); +#if defined(RGBLIGHT_ENABLE) + state = layer_state_set_rgb_light(state); +#endif // RGBLIGHT_ENABLE + return layer_state_set_keymap(state); +} + +__attribute__((weak)) layer_state_t default_layer_state_set_keymap(layer_state_t state) { return state; } + +// Runs state check and changes underglow color and animation +layer_state_t default_layer_state_set_user(layer_state_t state) { + state = default_layer_state_set_keymap(state); +#if 0 +# if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) + state = default_layer_state_set_rgb(state); +# endif // RGBLIGHT_ENABLE +#endif + return state; +} + +__attribute__((weak)) void led_set_keymap(uint8_t usb_led) {} + +// Any custom LED code goes here. +// So far, I only have keyboard specific code, +// So nothing goes here. +void led_set_user(uint8_t usb_led) { led_set_keymap(usb_led); } + +__attribute__((weak)) void eeconfig_init_keymap(void) {} + +void eeconfig_init_user(void) { + userspace_config.raw = 0; + userspace_config.rgb_layer_change = true; + eeconfig_update_user(userspace_config.raw); + eeconfig_init_keymap(); + keyboard_init(); +} + +bool hasAllBitsInMask(uint8_t value, uint8_t mask) { + value &= 0xF; + mask &= 0xF; + + return (value & mask) == mask; +} + +void keyboard_post_init_rgb_light(void) { + rgblight_sethsv(HSV_GOLD); + rgblight_mode(RGBLIGHT_MODE_BREATHING); + // rgblight_mode(RGBLIGHT_MODE_KNIGHT+1); +} + +// Init stuff. +void keyboard_post_init_user(void) { +#if defined(RGBLIGHT_ENABLE) + keyboard_post_init_rgb_light(); +#endif + keyboard_post_init_user_keymap(); +} + + +void matrix_scan_rgb_light(void) { +#ifdef RGBLIGHT_ENABLE + +#endif +} + +void rgblight_set_hsv_and_mode(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode) { + rgblight_sethsv_noeeprom(hue, sat, val); + wait_us(175); // Add a slight delay between color and mode to ensure it's processed correctly + rgblight_mode_noeeprom(mode); +} + +layer_state_t layer_state_set_rgb_light(layer_state_t state) { +#ifdef RGBLIGHT_ENABLE + + switch (get_highest_layer(state)) { + + case _RAISE: + rgblight_set_hsv_and_mode(HSV_YELLOW, RGBLIGHT_MODE_BREATHING + 3); + break; + case _LOWER: + rgblight_set_hsv_and_mode(HSV_GREEN, RGBLIGHT_MODE_BREATHING + 3); + break; + case _ADJUST: + rgblight_set_hsv_and_mode(HSV_RED, RGBLIGHT_MODE_KNIGHT + 2); + break; + default: // for any other layers, or the default layer + { + switch (get_highest_layer(default_layer_state)) { + case _WoW: + rgblight_set_hsv_and_mode(HSV_MAGENTA, RGBLIGHT_MODE_STATIC_LIGHT); + break; + default: + rgblight_set_hsv_and_mode(HSV_CYAN, RGBLIGHT_MODE_STATIC_LIGHT); + break; + } + break; + } + } +#endif // RGBLIGHT_ENABLE + + return state; +} \ No newline at end of file diff --git a/users/frederik/frederik.h b/users/frederik/frederik.h new file mode 100644 index 00000000..a188340f --- /dev/null +++ b/users/frederik/frederik.h @@ -0,0 +1,48 @@ +#pragma once +#include QMK_KEYBOARD_H + +#include "version.h" +#include "eeprom.h" + +#include "rgb_stuff.h" + +enum userspace_layers { + _QWERTY = 0, + _LOWER, + _RAISE, + _NAV, + _ADJUST, + _WoW +}; + +enum custom_keycodes { + KC_CCCV = SAFE_RANGE, + OE, + AA, + AE, + oe, + aa, + ae +}; + +bool process_record_user_rgb_light(uint16_t keycode, keyrecord_t *record); +void keyboard_post_init_rgb_light(void); +void matrix_scan_rgb_light(void); +layer_state_t layer_state_set_rgb_light(layer_state_t state); +layer_state_t default_layer_state_set_rgb_light(layer_state_t state); +void rgblight_sethsv_default_helper(uint8_t index); + +// clang-format off +typedef union { + uint32_t raw; + struct { + bool rgb_layer_change :1; + bool is_overwatch :1; + bool nuke_switch :1; + bool swapped_numbers :1; + bool rgb_matrix_idle_anim :1; + }; +} userspace_config_t; +// clang-format on + +extern userspace_config_t userspace_config; \ No newline at end of file diff --git a/users/curry/rgb_lighting_user.c b/users/frederik/rgb_stuff.c similarity index 83% rename from users/curry/rgb_lighting_user.c rename to users/frederik/rgb_stuff.c index 25e1ce01..cfe98ec0 100644 --- a/users/curry/rgb_lighting_user.c +++ b/users/frederik/rgb_stuff.c @@ -1,5 +1,6 @@ -#include "curry.h" -#include "rgb_lighting_user.h" +#include "frederik.h" +#include "rgb_stuff.h" +#include "eeprom.h" extern rgblight_config_t rgblight_config; bool has_initialized; @@ -10,7 +11,7 @@ void rgblight_sethsv_default_helper(uint8_t index) { rgblight_sethsv_at(rgblight * This allows for certain lights to be lit up, based on what mods are active, giving some visual feedback. * This is especially useful for One Shot Mods, since it's not always obvious if they're still lit up. */ -#if defined(INDICATOR_LIGHTS) +#ifdef INDICATOR_LIGHTS void set_rgb_indicators(uint8_t this_mod, uint8_t this_led, uint8_t this_osm) { if (userspace_config.rgb_layer_change && get_highest_layer(layer_state) == 0) { if ((this_mod | this_osm) & MOD_MASK_SHIFT || this_led & (1 << USB_LED_CAPS_LOCK)) { @@ -84,7 +85,7 @@ void matrix_scan_indicator(void) { } #endif // INDICATOR_LIGHTS -#if defined(RGBLIGHT_TWINKLE) +#ifdef RGBLIGHT_TWINKLE static rgblight_fadeout lights[RGBLED_NUM]; __attribute__((weak)) bool rgblight_twinkle_is_led_used_keymap(uint8_t index) { return false; } @@ -134,6 +135,7 @@ bool rgblight_twinkle_is_led_used(uint8_t index) { /* Handler for fading/twinkling effect */ void scan_rgblight_fadeout(void) { // Don't effing change this function .... rgblight_sethsv is supppppper intensive bool litup = false; + for (uint8_t light_index = 0; light_index < RGBLED_NUM; ++light_index) { if (lights[light_index].enabled && timer_elapsed(lights[light_index].timer) > 10) { rgblight_fadeout *light = &lights[light_index]; @@ -166,6 +168,7 @@ void start_rgb_light(void) { uint8_t indices_count = 0; uint8_t min_life = 0xFF; uint8_t min_life_index = -1; + for (uint8_t index = 0; index < RGBLED_NUM; ++index) { if (rgblight_twinkle_is_led_used(index)) { continue; @@ -200,7 +203,7 @@ void start_rgb_light(void) { } #endif -bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record) { +bool process_record_user_rgb_light(uint16_t keycode, keyrecord_t *record) { uint16_t temp_keycode = keycode; // Filter out the actual keycode from MT and LT keys. if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX)) { @@ -208,7 +211,7 @@ bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record) { } switch (temp_keycode) { -#if defined(RGBLIGHT_TWINKLE) +#ifdef RGBLIGHT_TWINKLE case KC_A ... KC_SLASH: case KC_F1 ... KC_F12: case KC_INSERT ... KC_UP: @@ -219,43 +222,19 @@ bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record) { start_rgb_light(); } break; -#endif // RGBLIGHT_TWINKLE - case KC_RGB_T: // This allows me to use underglow as layer indication, or as normal - if (record->event.pressed) { - userspace_config.rgb_layer_change ^= 1; - dprintf("rgblight layer change [EEPROM]: %u\n", userspace_config.rgb_layer_change); - eeconfig_update_user(userspace_config.raw); - if (userspace_config.rgb_layer_change) { - layer_state_set(layer_state); // This is needed to immediately set the layer color (looks better) - } - } - break; - case RGB_MODE_FORWARD ... RGB_MODE_GRADIENT: // quantum_keycodes.h L400 for definitions - if (record->event.pressed) { - bool is_eeprom_updated = false; - // This disables layer indication, as it's assumed that if you're changing this ... you want that disabled - if (userspace_config.rgb_layer_change) { - userspace_config.rgb_layer_change = false; - dprintf("rgblight layer change [EEPROM]: %u\n", userspace_config.rgb_layer_change); - is_eeprom_updated = true; - } - if (is_eeprom_updated) { - eeconfig_update_user(userspace_config.raw); - } - } - break; +#endif // RGBLIGHT_TWINKLE } return true; } -void keyboard_post_init_rgb(void) { +void keyboard_post_init_rgb_light(void) { #if defined(RGBLIGHT_STARTUP_ANIMATION) bool is_enabled = rgblight_config.enable; if (userspace_config.rgb_layer_change) { rgblight_enable_noeeprom(); } if (rgblight_config.enable) { - layer_state_set_user(layer_state); + layer_state_set_rgb_light(layer_state); uint16_t old_hue = rgblight_config.hue; rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); for (uint16_t i = 255; i > 0; i--) { @@ -269,16 +248,18 @@ void keyboard_post_init_rgb(void) { } #endif - layer_state_set_user(layer_state); + layer_state_set_rgb_light(layer_state); } -void matrix_scan_rgb(void) { -#if defined(RGBLIGHT_TWINKLE) +void matrix_scan_rgb_light(void) { +#ifdef RGBLIGHT_ENABLE +# ifdef RGBLIGHT_TWINKLE scan_rgblight_fadeout(); -#endif // RGBLIGHT_ENABLE +# endif // RGBLIGHT_ENABLE -#if defined(INDICATOR_LIGHTS) +# ifdef INDICATOR_LIGHTS matrix_scan_indicator(); +# endif #endif } @@ -288,9 +269,22 @@ void rgblight_set_hsv_and_mode(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mo rgblight_mode_noeeprom(mode); } -layer_state_t layer_state_set_rgb(layer_state_t state) { +layer_state_t layer_state_set_rgb_light(layer_state_t state) { +#ifdef RGBLIGHT_ENABLE if (userspace_config.rgb_layer_change) { switch (get_highest_layer(state)) { + case _MACROS: + rgblight_set_hsv_and_mode(HSV_ORANGE, userspace_config.is_overwatch ? RGBLIGHT_MODE_SNAKE + 2 : RGBLIGHT_MODE_SNAKE + 3); + break; + case _MEDIA: + rgblight_set_hsv_and_mode(HSV_CHARTREUSE, RGBLIGHT_MODE_KNIGHT + 1); + break; + case _GAMEPAD: + rgblight_set_hsv_and_mode(HSV_ORANGE, RGBLIGHT_MODE_SNAKE + 2); + break; + case _DIABLO: + rgblight_set_hsv_and_mode(HSV_RED, RGBLIGHT_MODE_BREATHING + 3); + break; case _RAISE: rgblight_set_hsv_and_mode(HSV_YELLOW, RGBLIGHT_MODE_BREATHING + 3); break; @@ -313,6 +307,18 @@ layer_state_t layer_state_set_rgb(layer_state_t state) { case _WORKMAN: rgblight_set_hsv_and_mode(HSV_GOLDENROD, mode); break; + case _NORMAN: + rgblight_set_hsv_and_mode(HSV_CORAL, mode); + break; + case _MALTRON: + rgblight_set_hsv_and_mode(HSV_YELLOW, mode); + break; + case _EUCALYN: + rgblight_set_hsv_and_mode(HSV_PINK, mode); + break; + case _CARPLAX: + rgblight_set_hsv_and_mode(HSV_BLUE, mode); + break; default: rgblight_set_hsv_and_mode(HSV_CYAN, mode); break; @@ -321,5 +327,7 @@ layer_state_t layer_state_set_rgb(layer_state_t state) { } } } +#endif // RGBLIGHT_ENABLE + return state; } diff --git a/users/frederik/rgb_stuff.h b/users/frederik/rgb_stuff.h new file mode 100644 index 00000000..98a552db --- /dev/null +++ b/users/frederik/rgb_stuff.h @@ -0,0 +1,22 @@ +#pragma once +#include "quantum.h" + +#if defined(RGBLIGHT_TWINKLE) +typedef struct { + bool enabled; + uint8_t hue; + uint16_t timer; + uint8_t life; +} rgblight_fadeout; +#endif + +bool process_record_user_rgb_light(uint16_t keycode, keyrecord_t *record); +void keyboard_post_init_rgb_light(void); +void matrix_scan_rgb_light(void); +layer_state_t layer_state_set_rgb_light(layer_state_t state); +layer_state_t default_layer_state_set_rgb_light(layer_state_t state); +void rgblight_sethsv_default_helper(uint8_t index); + +#if defined(RGBLIGHT_TWINKLE) +void scan_rgblight_fadeout(void); +#endif diff --git a/users/curry/rgblight_breathe_table.h b/users/frederik/rgblight_breathe_table.h similarity index 100% rename from users/curry/rgblight_breathe_table.h rename to users/frederik/rgblight_breathe_table.h diff --git a/users/gary/gary.c b/users/gary/gary.c deleted file mode 100644 index aa49e7d6..00000000 --- a/users/gary/gary.c +++ /dev/null @@ -1 +0,0 @@ -#include "gary.h" diff --git a/users/gary/gary.h b/users/gary/gary.h deleted file mode 100644 index 10f23315..00000000 --- a/users/gary/gary.h +++ /dev/null @@ -1,43 +0,0 @@ -#include QMK_KEYBOARD_H - -#pragma once -#define USE_SERIAL -#define MASTER_LEFT - -// Layers -// #define BASE 0 // Base layer -// #define FCTN 4 // Function -#define _QWERTY 0 -#define _LOWER 1 -#define _RAISE 2 - -enum custom_keycodes { - QWERTY = SAFE_RANGE, - LOWER, - RAISE, -}; - -#define KC_RST RESET -#define KC_ KC_TRNS - -#define KC_LOWR MO(_LOWER) // Lower layer -#define KC_RASE MO(_RAISE) // Raise layer -#define KC_CTLC C(KC_C) -#define KC_CLTB C(KC_TAB) -#define KC_OPASS G(KC_BSLS) // GUI + Back Slash -#define KC_GARY LT(_RAISE, KC_SPC) // Hold for Raise, Tap for Space - -#define KC_SHOT SCMD(C(KC_4)) // Screenshot to Paste - -// Window Management -#define KC_FULL A(G(KC_F)) // Full Screen -#define KC_CNTR A(G(KC_C)) // Center -#define KC_LHLF A(G(KC_LEFT)) // Left Half -#define KC_RHLF A(G(KC_RGHT)) // Right Half - -#define KC_UPLF C(G(KC_LEFT)) // Upper Left -#define KC_UPRG C(G(KC_RGHT)) // Upper Right -#define KC_DNLF S(C(G(KC_LEFT))) // Lower Left -#define KC_DNRG S(C(G(KC_RGHT))) // Lower Right - -#define KC_NEXT LCAG(KC_LEFT) // Move the Window to next display diff --git a/users/gary/readme.md b/users/gary/readme.md deleted file mode 100644 index a8c22e5a..00000000 --- a/users/gary/readme.md +++ /dev/null @@ -1,14 +0,0 @@ -Copyright 2019 Gary @garyjzhao - -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 . diff --git a/users/gary/rules.mk b/users/gary/rules.mk deleted file mode 100644 index b6aa3490..00000000 --- a/users/gary/rules.mk +++ /dev/null @@ -1 +0,0 @@ -SRC += gary.c diff --git a/users/gordon/gordon.c b/users/gordon/gordon.c deleted file mode 100644 index 3115e1c3..00000000 --- a/users/gordon/gordon.c +++ /dev/null @@ -1,410 +0,0 @@ -#include "gordon.h" -#include "quantum.h" -#include "action.h" -#include "process_keycode/process_tap_dance.h" - -#if (__has_include("secret.h")) -#include "secret.h" -#else -const char secret[][64] = { - "test1", - "test2", - "test3", - "test4", - "test5" -}; -#endif - -void register_hyper (void) { //Helper function to invoke Hyper - register_code (KC_LSFT); - register_code (KC_LCTL); - register_code (KC_LALT); - register_code (KC_LGUI); -} -void unregister_hyper (void) { //Helper function to invoke Hyper - unregister_code (KC_LSFT); - unregister_code (KC_LCTL); - unregister_code (KC_LALT); - unregister_code (KC_LGUI); -} - -void register_ctrl_a (void) { - register_code(KC_LCTL); - register_code(KC_A); -} - -void unregister_ctrl_a (void) { - unregister_code(KC_LCTL); - unregister_code(KC_A); -} - -void register_alt_f7 (void) { - register_code (KC_LALT); - register_code (KC_F7); -} - -void unregister_alt_f7 (void) { - unregister_code (KC_LALT); - unregister_code (KC_F7); -} - -void register_shift_f6 (void) { - register_code (KC_LSFT); - register_code (KC_F6); -} - -void unregister_shift_f6 (void) { - unregister_code (KC_LSFT); - unregister_code (KC_F6); -} - -void register_ctrl_shift (void) { - register_code (KC_LSFT); - register_code (KC_LCTRL); -} - -void unregister_ctrl_shift (void) { - unregister_code (KC_LSFT); - unregister_code (KC_LCTRL); -} - -void register_alt_shift (void) { - register_code (KC_LSFT); - register_code (KC_LALT); -} - -void unregister_alt_shift (void) { - unregister_code (KC_LSFT); - unregister_code (KC_LALT); -} - -// To activate SINGLE_HOLD, you will need to hold for 200ms first. -// This tap dance favors keys that are used frequently in typing like 'f' -int cur_dance (qk_tap_dance_state_t *state) { - if (state->count == 1) { - //If count = 1, and it has been interrupted - it doesn't matter if it is pressed or not: Send SINGLE_TAP - if (state->interrupted) { - // if (!state->pressed) return SINGLE_TAP; - //need "permissive hold" here. - // else return SINsGLE_HOLD; - //If the interrupting key is released before the tap-dance key, then it is a single HOLD - //However, if the tap-dance key is released first, then it is a single TAP - //But how to get access to the state of the interrupting key???? - return SINGLE_TAP; - } - else { - if (!state->pressed) return SINGLE_TAP; - else return SINGLE_HOLD; - } - } - //If count = 2, and it has been interrupted - assume that user is trying to type the letter associated - //with single tap. - else if (state->count == 2) { - if (state->interrupted) return DOUBLE_SINGLE_TAP; - else if (state->pressed) return DOUBLE_HOLD; - else return DOUBLE_TAP; - } - else if ((state->count == 3) && ((state->interrupted) || (!state->pressed))) return TRIPLE_TAP; - else if (state->count == 3) return TRIPLE_HOLD; - else return 8; //magic number. At some point this method will expand to work for more presses -} - -//This works well if you want this key to work as a "fast modifier". It favors being held over being tapped. -int hold_cur_dance (qk_tap_dance_state_t *state) { - if (state->count == 1) { - if (state->interrupted) { - if (!state->pressed) return SINGLE_TAP; - else return SINGLE_HOLD; - } - else { - if (!state->pressed) return SINGLE_TAP; - else return SINGLE_HOLD; - } - } - //If count = 2, and it has been interrupted - assume that user is trying to type the letter associated - //with single tap. - else if (state->count == 2) { - if (state->pressed) return DOUBLE_HOLD; - else return DOUBLE_TAP; - } - else if (state->count == 3) { - if (!state->pressed) return TRIPLE_TAP; - else return TRIPLE_HOLD; - } - else return 8; //magic number. At some point this method will expand to work for more presses -} - - -static xtap htap_state = { - .is_press_action = true, - .state = 0 -}; - -void h_finished (qk_tap_dance_state_t *state, void *user_data) { - htap_state.state = cur_dance(state); - switch (htap_state.state) { - case SINGLE_TAP: register_code(KC_H); break; - case SINGLE_HOLD: layer_on(8); register_code(KC_LALT); break; - case DOUBLE_TAP: layer_invert(8); register_code(KC_LALT); break; - // case DOUBLE_HOLD: register_code(KC_LALT); - case DOUBLE_SINGLE_TAP: register_code(KC_H);unregister_code(KC_H);register_code(KC_H); - } -} - -void h_reset (qk_tap_dance_state_t *state, void *user_data) { - switch (htap_state.state) { - case SINGLE_TAP: unregister_code(KC_H); break; - case SINGLE_HOLD: layer_off(8); unregister_code(KC_LALT); break; - case DOUBLE_TAP: unregister_code(KC_LALT);break; - // case DOUBLE_HOLD: unregister_code(KC_LALT); - case DOUBLE_SINGLE_TAP: unregister_code(KC_H); - } - htap_state.state = 0; -} - - -/**************** QUAD FUNCTION FOR TAB ****************/ -// TAB, ALT + SHIFT, TAB TAB, CTRL + SHIFT -static xtap tab_state = { - .is_press_action = true, - .state = 0 -}; - -void tab_finished (qk_tap_dance_state_t *state, void *user_data) { - tab_state.state = cur_dance(state); - switch (tab_state.state) { - case SINGLE_TAP: register_code(KC_TAB); break; //send tab on single press - case SINGLE_HOLD: register_ctrl_shift(); break; - case DOUBLE_HOLD: register_alt_shift(); break; //alt shift on single hold - case DOUBLE_TAP: register_code(KC_TAB); unregister_code(KC_TAB); register_code(KC_TAB); break; //tab tab - case TRIPLE_TAP: register_code(KC_LSHIFT) ;register_code(KC_ESC); break; - case TRIPLE_HOLD: register_code(KC_LSHIFT); register_code(KC_LGUI); break; - } -} - -void tab_reset (qk_tap_dance_state_t *state, void *user_data) { - switch (tab_state.state) { - case SINGLE_TAP: unregister_code(KC_TAB); break; //unregister tab - case DOUBLE_HOLD: unregister_alt_shift(); break; //let go of alt shift - case DOUBLE_TAP: unregister_code(KC_TAB); break; - case SINGLE_HOLD: unregister_ctrl_shift(); break; - case TRIPLE_TAP: unregister_code(KC_LSHIFT); unregister_code(KC_ESC); break; - case TRIPLE_HOLD: unregister_code(KC_LSHIFT); unregister_code(KC_LGUI); break; - } - tab_state.state = 0; -} -/**************** QUAD FUNCTION FOR TAB ****************/ - -//*************** SUPER COMMA *******************// -// Assumption: we don't care about trying to hit ,, quickly -//*************** SUPER COMMA *******************// -static xtap comma_state = { - .is_press_action = true, - .state = 0 -}; - -void comma_finished (qk_tap_dance_state_t *state, void *user_data) { - comma_state.state = hold_cur_dance(state); //Use the dance that favors being held - switch (comma_state.state) { - case SINGLE_TAP: register_code(KC_COMMA); break; - case SINGLE_HOLD: layer_on(1); break; //turn on symbols layer - case DOUBLE_TAP: layer_invert(4); break; //toggle numbers layer - case DOUBLE_HOLD: layer_on(2); break; - case TRIPLE_TAP: register_code(KC_CALCULATOR); break; - case TRIPLE_HOLD: layer_on(3); - } -} - -void comma_reset (qk_tap_dance_state_t *state, void *user_data) { - switch (comma_state.state) { - case SINGLE_TAP: unregister_code(KC_COMMA); break; //unregister comma - case SINGLE_HOLD: layer_off(1); break; - case DOUBLE_TAP: ;break; - case DOUBLE_HOLD: layer_off(2); break; - case TRIPLE_TAP: unregister_code(KC_CALCULATOR); break; - case TRIPLE_HOLD: layer_off(3); - } - comma_state.state = 0; -} -//*************** SUPER COMMA *******************// -//*************** SUPER COMMA *******************// - - -//*************** F3 TAP DANCE *******************// -//Good example for accessing multiple layers from the same key. -static xtap S1_state = { - .is_press_action = true, - .state = 0 -}; - -void bt_finished (qk_tap_dance_state_t *state, void *user_data) { - S1_state.state = cur_dance(state); - switch (S1_state.state) { - case SINGLE_TAP: register_code(KC_F3); break; - case SINGLE_HOLD: layer_on(_MACROS); break; - case DOUBLE_TAP: layer_invert(_MACROS); break; - case DOUBLE_HOLD: layer_on(5); break; - case DOUBLE_SINGLE_TAP: layer_invert(_MACROS); break; - } -} - -void bt_reset (qk_tap_dance_state_t *state, void *user_data) { - switch (S1_state.state) { - case SINGLE_TAP: unregister_code(KC_F3); break; - case SINGLE_HOLD: layer_off(_MACROS); break; - case DOUBLE_TAP: break; //already inverted. Don't do anything. - case DOUBLE_HOLD: layer_off(5); break; - case DOUBLE_SINGLE_TAP: break; - } - S1_state.state = 0; -} - -// Tap Dance Definitions -qk_tap_dance_action_t tap_dance_actions[] = { - // simple tap dance - [F12ETAPS] = ACTION_TAP_DANCE_DOUBLE(KC_F12,LSFT(LCTL(KC_F10))), - [REFRESH] = ACTION_TAP_DANCE_DOUBLE(KC_R,LCTL(KC_R)), - [ENDESC] = ACTION_TAP_DANCE_DOUBLE(KC_END, KC_ESC), - [Q_ESCAPE] = ACTION_TAP_DANCE_DOUBLE(KC_Q, KC_ESC), - [ENDHOME] = ACTION_TAP_DANCE_DOUBLE(KC_END, KC_HOME), - [CALCCOMP] = ACTION_TAP_DANCE_DOUBLE(KC_CALCULATOR, KC_MY_COMPUTER), - [ALTF4] = ACTION_TAP_DANCE_DOUBLE(KC_F4,LALT(KC_F4)), - [F6F7] = ACTION_TAP_DANCE_DOUBLE(LSFT(KC_F6), LALT(KC_F7)), - [F1F13] = ACTION_TAP_DANCE_DOUBLE(KC_F1, KC_F13), - [F2F14] = ACTION_TAP_DANCE_DOUBLE(KC_F2, KC_F14), - [F5F15] = ACTION_TAP_DANCE_DOUBLE(KC_F5, KC_F15), - [TABCOMBO] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, tab_finished, tab_reset), - [F3D] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, bt_finished, bt_reset), - [COMMA] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, comma_finished, comma_reset), - [HTAB] = ACTION_TAP_DANCE_FN_ADVANCED(NULL,h_finished, h_reset) -}; - -// bool process_record_user(uint16_t keycode, keyrecord_t *record) { -// if (!record->event.pressed) { -// switch (keycode) { - -// case KC_SECRET_1 ... KC_SECRET_5: -// send_string(secret[keycode - KC_SECRET_1]); -// // clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); -// return true; break; - -// case UP_ENTER_RESET: -// register_code(KC_UP); -// unregister_code(KC_UP); -// register_code(KC_ENTER); -// unregister_code(KC_ENTER); -// reset_keyboard(); -// return false; break; - -// case TIL_SLASH: -// SEND_STRING ("~/."); -// return false; break; - -// case DBMS_OUT: -// SEND_STRING ("dbms_output.put_line('');"); -// SEND_STRING (SS_TAP(X_LEFT) SS_TAP(X_LEFT) SS_TAP(X_LEFT)); -// return false; break; - -// case ID_MAN_IP: -// SEND_STRING ("http://dev-1967110238.us-east-1.elb.amazonaws.com"); -// return false; break; - -// case MODRESET: -// clear_mods(); -// return false; break; - -// case DEREF: -// SEND_STRING ("->"); -// return false; break; - -// case EQRIGHT: -// SEND_STRING ("=>"); -// return false; break; - -// case TICK3: -// SEND_STRING ("```"); -// return false; break; - -// case TILD3: -// SEND_STRING ("~~~"); -// return false; break; -// } -// } -// return true; -// }; - - - - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - if (!record->event.pressed) { - switch (keycode) { - case KC_SECRET_1 ... KC_SECRET_5: - send_string(secret[keycode - KC_SECRET_1]); - // clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); - return true; break; - case UP_ENTER_RESET: - SEND_STRING("make ergodox_infinity:gordon:dfu-util"); - register_code(KC_ENTER); - unregister_code(KC_ENTER); - reset_keyboard(); - return false; break; - - case TIL_SLASH: - SEND_STRING ("~/."); - return false; break; - - case DBMS_OUT: - SEND_STRING ("dbms_output.put_line('');"); - SEND_STRING (SS_TAP(X_LEFT) SS_TAP(X_LEFT) SS_TAP(X_LEFT)); - return false; break; - case DIE_1000X_RIGHT: - SEND_STRING (SS_TAP(X_G) SS_TAP(X_G) SS_TAP(X_RIGHT) SS_TAP(X_B) SS_TAP(X_J)); - return false; break; - case DIE_1000X_LEFT: - SEND_STRING (SS_TAP(X_GRAVE) SS_TAP(X_G) SS_TAP(X_LEFT) SS_TAP(X_B) SS_TAP(X_J)); - return false; break; - case ID_MAN_IP: - SEND_STRING ("http://dev-1967110238.us-east-1.elb.amazonaws.com"); - return false; break; - - case MODRESET: - clear_mods(); - return false; break; - - case DEREF: - SEND_STRING ("->"); - return false; break; - - case EQRIGHT: - SEND_STRING ("=>"); - return false; break; - - case TICK3: - SEND_STRING ("```"); - - return false; break; - - case SPRK_TCK: - SEND_STRING ("```"); - SEND_STRING (SS_DOWN(X_LSHIFT) SS_TAP(X_ENTER) SS_UP(X_LSHIFT)); - SEND_STRING (SS_DOWN(X_LSHIFT) SS_TAP(X_ENTER) SS_UP(X_LSHIFT)); - SEND_STRING ("```"); - SEND_STRING (SS_TAP(X_UP)); - return false; break; - - case TILD3: - SEND_STRING ("~~~"); - return false; break; - } - } - else { //On key being pressed - switch (keycode) { - case KC_SECRET_1 ... KC_SECRET_5: - clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); - return false; break; - } - } - return true; -}; - diff --git a/users/gordon/gordon.h b/users/gordon/gordon.h deleted file mode 100644 index 49b4f056..00000000 --- a/users/gordon/gordon.h +++ /dev/null @@ -1,247 +0,0 @@ -#ifndef GORDON -#define GORDON - -#include "quantum.h" -#include "process_keycode/process_tap_dance.h" - - -// Fillers to make layering more clear -#define ________ KC_TRNS -#define _________ KC_TRNS -#define _XXXXXX_ KC_TRNS - -// KC codes that are too long -#define DOLLAR KC_DOLLAR -#define LSQUIGLY KC_LBRACKET -#define RSQUIGLY KC_RBRACKET -#define NUMLOCK KC_NUMLOCK -#define CAPLOCK KC_CAPSLOCK -#define BK_SLASH KC_BSLASH -#define ASTERSK KC_KP_ASTERISK - -// Navigation -#define SNAPLEFT LGUI(KC_LEFT) -#define SNAPRGHT LGUI(KC_RIGHT) -#define SNAPUP LGUI(KC_UP) -#define SNAPDOWN LGUI(KC_DOWN) -#define PREVTAB LCTL(LSFT(KC_TAB)) -#define NEXTTAB LCTL(KC_TAB) -#define WORKRIGHT LCTL(LGUI(KC_RIGHT)) -#define WORKLEFT LCTL(LGUI(KC_LEFT)) - -#define APP_1 LCTL(LGUI(KC_1)) -#define APP_2 LCTL(LGUI(KC_2)) -#define APP_3 LCTL(LGUI(KC_3)) -#define APP_4 LCTL(LGUI(KC_4)) -#define APP_5 LCTL(LGUI(KC_5)) -#define APP_6 LCTL(LGUI(KC_6)) -#define APP_7 LCTL(LGUI(KC_7)) -#define APP_8 LCTL(LGUI(KC_8)) - -// KC/modifier hold -#define CTRL_F CTL_T(KC_F) -#define CTRL_J CTL_T(KC_J) -#define CTRL_Z CTL_T(KC_Z) -#define ALT_V ALT_T(KC_V) -#define ALT_M ALT_T(KC_M) -#define WIN_G GUI_T(KC_G) -#define WIN_H GUI_T(KC_H) -#define HYPER_X ALL_T(KC_X) -#define HYPE_DOT ALL_T(KC_DOT) -#define MEH_S MEH_T(KC_S) -#define MEH_L MEH_T(KC_L) -#define ALT_HOME ALT_T(KC_HOME) - - -// KC/Layer Hold -#define NAV_E LT(_NAV,KC_E) -#define NUMPAD_D LT(_NUMPAD,KC_D) -#define MOUSE_C LT(_MOUSE,KC_C) -#define SYMB_BSP LT(_SYMBOLS,KC_BSPACE) -#define COL_MOUS LT(_MOUSE,KC_SCOLON) -#define SPAC_SYM LT(_SYMBOLS,KC_SPACE) -#define SPAC_TXT LT(_TEXTNAV,KC_SPACE) - -#define APP_SW_I LT(_APPSWITCH,KC_I) -#define APP_SW_K LT(_APPSWITCH,KC_K) - -// #define TLSLSH TIL_SLASH -// #define TILDA_3x TILD3 -// #define _RESET_ UP_ENTER_RESET - - -// Double Modifier ONLY hold -#define ALT_SHFT LSFT(KC_LALT) -#define CTR_SHFT LSFT(KC_LCTL) - -// KC/Double modifier Hold -#define CTR_SH_W MT(MOD_LCTL|MOD_LSFT,KC_W) -#define CTR_AL_R MT(MOD_LCTL|MOD_LALT,KC_R) -#define ALT_SH_R MT(MOD_LSFT|MOD_LALT,KC_R) - -//MISC -#define PRINTSCR KC_PSCREEN -#define CALTDEL LCTL(LALT(KC_DEL)) -#define TSKMGR LCTL(LSFT(KC_ESC)) - - -typedef struct { - bool is_press_action; - int state; -} xtap; - -enum { - SINGLE_TAP = 1, - SINGLE_HOLD = 2, - DOUBLE_TAP = 3, - DOUBLE_HOLD = 4, - DOUBLE_SINGLE_TAP = 5, //send two single taps - TRIPLE_TAP = 6, - TRIPLE_HOLD = 7 -}; - -//Tap dance enums -enum -{ - F12TAP = 0, - F12ETAPS, - CALCCOMP, - REFRESH, //send R, or Control+R if double tapped. - ENDESC, - XESC, //'quad function'. x, control, escape, alt - ALY2, //'quad function': a, Hyper, ctrl+a, layer 2 - PRLOCK, - F6F7, // Shift F6 or Alt F7 - TABCOMBO, - FCTRL, - F3D, - ALTF4, - COMMA, - AT, - HTAB, - F1F13, - F2F14, - F5F15, - ENDHOME, - Q_ESCAPE -}; - -#ifdef TAP_DANCE_ENABLE -#define F1_F13 TD(F1F13) -#define F2_F14 TD(F2F14) -#define F5_F15 TD(F5F15) -#define F4_ALTF4 TD(ALTF4) -#define END_ESC TD(ENDESC) -#define Q_ESC TD(Q_ESCAPE) -#define END_HOME TD(ENDHOME) -#define SHF6_AF7 TD(F6F7) -#define F12_RUN TD(F12ETAPS) -#define COMMA_TD TD(COMMA) -#define CALC_COM TD(CALCCOMP) -#else //just to make things compile -#define F1_F13 KC_1 -#define F2_F14 KC_1 -#define F5_F15 KC_1 -#define F4_ALTF4 KC_1 -#define END_ESC KC_1 -#define END_HOME KC_1 -#define SHF6_AF7 KC_1 -#define F12_RUN KC_1 -#define COMMA_TD KC_1 -#define CALC_COM KC_1 -#endif - -enum gordon_layers -{ - _QWERTY = 0, - _SYMBOLS, // Programming and all other commonlye used symbols - _MOUSE, // Mouse movement and also a few macros - _NUMPAD, // For getting a numpad under the right hand, and a few helpful things under the left - _NAV, // Windows navigation. Windows snapping, changing workspaces, and ARROWS - _MACROS, // Non-text related Macros. - _FUNCTION, // Not sure what I had in mind for this one - _APPSWITCH, // For switching between apps using the `ctrl + Win + [num]` shortcut. - // This allows for toggling windows of the same app with one button. - // Example: Press and hold `I`, then tap `j` multiple times to cycle through all - // Intellij windows (and only Intellij). This requires the app to be pinned to the Windows bar - _ONESHOT, // A layer I use for shortcuts that require multiple modifiers and a button not on my home layer - // Example: If I need to hit `alt + shift + 5` - _TEXTNAV, // Navigate through text - _QWERTY_KIDS, // So my kids can do nothing but type. Could also be a `speed typing` layer with no LT or MTs - _STREET_FIGHTER, // For Street Fighter 5. Die 1000x Deaths!!!! - _DIRNAV, // For navigating to different directories. - _TEXT_MACROS // For text-manipulation macros. Passwords, saved strings, pre-formatting -}; - - - -void register_hyper (void); -void unregister_hyper (void); - -void register_ctrl_a (void); -void unregister_ctrl_a (void); - -void register_alt_f7 (void); -void unregister_alt_f7 (void); - -void register_shift_f6 (void); -void unregister_shift_f6 (void); - -void register_ctrl_shift (void); -void unregister_ctrl_shift (void); - -void register_alt_shift (void); -void unregister_alt_shift (void); - -int cur_dance (qk_tap_dance_state_t *state); -int hold_cur_dance (qk_tap_dance_state_t *state); - -void x_finished (qk_tap_dance_state_t *state, void *user_data); -void x_reset (qk_tap_dance_state_t *state, void *user_data); - -void h_finished (qk_tap_dance_state_t *state, void *user_data); -void h_reset (qk_tap_dance_state_t *state, void *user_data); - -void tab_finished (qk_tap_dance_state_t *state, void *user_data); -void tab_reset (qk_tap_dance_state_t *state, void *user_data); - -void comma_finished (qk_tap_dance_state_t *state, void *user_data); -void comma_reset (qk_tap_dance_state_t *state, void *user_data); - -void bt_finished (qk_tap_dance_state_t *state, void *user_data); -void bt_reset (qk_tap_dance_state_t *state, void *user_data); - -enum secret_strings { - KC_SECRET_1 = SAFE_RANGE, - KC_SECRET_2, - KC_SECRET_3, - KC_SECRET_4, - KC_SECRET_5, - END_SECRET_SAFE_RANGE -}; - - -// Macro Declarations -enum { - INFOQM = END_SECRET_SAFE_RANGE, - MODRESET, - TIL_SLASH, - DEREF, - EQRIGHT, - TILD3, - TICK3, - SPRK_TCK, - ALTTAB_START, - ALTTAB_END, - UP_ENTER_RESET, - DBMS_OUT, - DIE_1000X_RIGHT, - DIE_1000X_LEFT, - ID_MAN_IP -}; - - - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt); - -#endif diff --git a/users/gordon/readme.md b/users/gordon/readme.md deleted file mode 100644 index fdea33b6..00000000 --- a/users/gordon/readme.md +++ /dev/null @@ -1,14 +0,0 @@ -Copyright @ - -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 . \ No newline at end of file diff --git a/users/gordon/rules.mk b/users/gordon/rules.mk deleted file mode 100644 index 19e77b01..00000000 --- a/users/gordon/rules.mk +++ /dev/null @@ -1,4 +0,0 @@ -TAP_DANCE_ENABLE = yes -SRC += gordon.c - -# BOOTMAGIC_ENABLE = yes diff --git a/users/hvp/hvp.c b/users/hvp/hvp.c deleted file mode 100644 index 7e484535..00000000 --- a/users/hvp/hvp.c +++ /dev/null @@ -1,2 +0,0 @@ - -#include "hvp.h" diff --git a/users/hvp/hvp.h b/users/hvp/hvp.h deleted file mode 100644 index 99da258a..00000000 --- a/users/hvp/hvp.h +++ /dev/null @@ -1,12 +0,0 @@ -#pragma once - -#ifdef TAP_DANCE_ENABLE -# include "tap_dances.h" -#endif -#include "quantum.h" - -#define TAPPING_TERM 150 - -// Keys - -#define D_NAVI MT(MOD_LCTL | MOD_LSFT, KC_D) \ No newline at end of file diff --git a/users/hvp/readme.md b/users/hvp/readme.md deleted file mode 100644 index 2d8f9d85..00000000 --- a/users/hvp/readme.md +++ /dev/null @@ -1 +0,0 @@ -Personal user space for hvpcode / cablegore at discord diff --git a/users/hvp/rules.mk b/users/hvp/rules.mk deleted file mode 100644 index 0a7e6796..00000000 --- a/users/hvp/rules.mk +++ /dev/null @@ -1,4 +0,0 @@ -SRC += hvp.c -ifeq ($(strip $(TAP_DANCE_ENABLE)), yes) - SRC += tap_dances.c -endif \ No newline at end of file diff --git a/users/hvp/tap_dances.c b/users/hvp/tap_dances.c deleted file mode 100644 index 1269d5f2..00000000 --- a/users/hvp/tap_dances.c +++ /dev/null @@ -1,103 +0,0 @@ -#include "tap_dances.h" - -// Tap dance function for enable swedish characters on first layer. Unregister to not let tap bleed over to next keypress. -// Tap dance 1 -void dance_1_finished(qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 2) { - tap_code(KC_SCLN); - } else { - tap_code16(ALGR(KC_A)); - } -} - -void dance_1_reset(qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 2) { - unregister_code(KC_SCLN); - } else { - unregister_code16(ALGR(KC_A)); - } -} - -// Tap dance 2 -void dance_2_finished(qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 2) { - tap_code(KC_QUOT); - } else { - tap_code16(ALGR(KC_W)); - } -} - -void dance_2_reset(qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 2) { - unregister_code(KC_QUOT); - } else { - unregister_code16(ALGR(KC_W)); - } -} - -// Tap dance 3 -void dance_3_finished(qk_tap_dance_state_t *state, void *user_data) { - // if (state->count == 2) - if (state->count == 2) { - tap_code(KC_SLSH); - } else { - tap_code16(ALGR(KC_O)); - } -} - -void dance_3_reset(qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 2) { - unregister_code(KC_SLSH); - } else { - unregister_code16(ALGR(KC_O)); - } -} - -// Tap dance 4 -void dance_4_finished(qk_tap_dance_state_t *state, void *user_data) { - // if (state->count == 2) - if (state->count == 2) { - tap_code(KC_DOT); - } else { - tap_code16(ALGR(KC_W)); - } -} - -void dance_4_reset(qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 2) { - unregister_code(KC_DOT); - } else { - unregister_code16(ALGR(KC_W)); - } -} - -// Tap dance 5 -void dance_5_finished(qk_tap_dance_state_t *state, void *user_data) { - // if (state->count == 2) - if (state->count == 2) { - tap_code(KC_DOT); - } else { - tap_code16(ALGR(KC_O)); - } -} - -void dance_5_reset(qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 2) { - unregister_code(KC_DOT); - } else { - unregister_code16(ALGR(KC_O)); - } -} - -// Tap Dance Definitions -qk_tap_dance_action_t tap_dance_actions[] = { - // simple tap dance - [TD1] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_1_finished, dance_1_reset), - - [TD2] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_2_finished, dance_2_reset), - - [TD3] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_3_finished, dance_3_reset), - - [TD4] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_4_finished, dance_4_reset), - - [TD5] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_5_finished, dance_5_reset)}; \ No newline at end of file diff --git a/users/hvp/tap_dances.h b/users/hvp/tap_dances.h deleted file mode 100644 index cad9bd90..00000000 --- a/users/hvp/tap_dances.h +++ /dev/null @@ -1,12 +0,0 @@ -#pragma once -#include "hvp.h" - -// Tap Dance Declarations -enum tapdance_id -{ - TD1 = 0, - TD2, - TD3, - TD4, - TD5 -}; diff --git a/users/ibnuda/combo.c b/users/ibnuda/combo.c deleted file mode 100644 index a48b0aae..00000000 --- a/users/ibnuda/combo.c +++ /dev/null @@ -1 +0,0 @@ -#include "combo.h" diff --git a/users/ibnuda/combo.h b/users/ibnuda/combo.h deleted file mode 100644 index a9fa69d2..00000000 --- a/users/ibnuda/combo.h +++ /dev/null @@ -1,61 +0,0 @@ -#pragma once -#include "quantum.h" - -// enum for combos. -enum combos { - // left hand combinations. - COLON_COMMA, - COMMA_DOT, - DOT_P, - QUOT_Q, - Q_J, - J_K, - - // right hand combinations. - L_R, - R_C, - C_G, - V_W, - W_M, - - // both hands combinations. - J_W, -}; - -// left hand combinations. -const uint16_t PROGMEM colon_comma_combo[] = {KC_SCLN, KC_COMM, COMBO_END}; -const uint16_t PROGMEM comma_dot_combo[] = {KC_COMM, KC_DOT, COMBO_END}; -const uint16_t PROGMEM dot_p_combo[] = {KC_DOT, KC_P, COMBO_END}; -const uint16_t PROGMEM quot_q_combo[] = {KC_QUOT, KC_Q, COMBO_END}; -const uint16_t PROGMEM q_j_combo[] = {KC_Q, KC_J, COMBO_END}; -const uint16_t PROGMEM j_k_combo[] = {KC_J, KC_K, COMBO_END}; - -// right hand combinations. -const uint16_t PROGMEM l_r_combo[] = {KC_L, KC_R, COMBO_END}; -const uint16_t PROGMEM r_c_combo[] = {KC_R, KC_C, COMBO_END}; -const uint16_t PROGMEM c_g_combo[] = {KC_C, KC_G, COMBO_END}; -const uint16_t PROGMEM v_w_combo[] = {KC_V, KC_W, COMBO_END}; -const uint16_t PROGMEM w_m_combo[] = {KC_W, KC_M, COMBO_END}; - -// both hand combinations. -const uint16_t PROGMEM j_w_combo[] = {KC_J, KC_W, COMBO_END}; - -combo_t key_combos[COMBO_COUNT] = { - // left hand combinations. - [COLON_COMMA] = COMBO(colon_comma_combo, KC_TAB), - [COMMA_DOT] = COMBO(comma_dot_combo, KC_QUES), - [DOT_P] = COMBO(dot_p_combo, KC_UNDS), - [QUOT_Q] = COMBO(quot_q_combo, KC_ENT), - [Q_J] = COMBO(q_j_combo, LCTL(KC_W)), - [J_K] = COMBO(j_k_combo, KC_DELT), - - // right hand combinations. - [L_R] = COMBO(l_r_combo, KC_BSPC), - [R_C] = COMBO(r_c_combo, KC_SLSH), - [C_G] = COMBO(c_g_combo, KC_MINS), - [V_W] = COMBO(v_w_combo, KC_APP), - [W_M] = COMBO(w_m_combo, KC_DELT), - - // both hand combinations. - [J_W] = COMBO(j_w_combo, KC_ENT), -}; diff --git a/users/ibnuda/config.h b/users/ibnuda/config.h deleted file mode 100644 index b43679a6..00000000 --- a/users/ibnuda/config.h +++ /dev/null @@ -1,9 +0,0 @@ -#pragma once - -#define COMBO_COUNT 18 -#define COMBO_TERM 100 - -#define IGNORE_MOD_TAP_INTERRUPT -#define PERMISSIVE_HOLD - -#define TAPPING_TERM 200 diff --git a/users/ibnuda/ibnuda.c b/users/ibnuda/ibnuda.c deleted file mode 100644 index 8d5bd04b..00000000 --- a/users/ibnuda/ibnuda.c +++ /dev/null @@ -1 +0,0 @@ -#include "ibnuda.h" diff --git a/users/ibnuda/ibnuda.h b/users/ibnuda/ibnuda.h deleted file mode 100644 index f50949df..00000000 --- a/users/ibnuda/ibnuda.h +++ /dev/null @@ -1,55 +0,0 @@ -#pragma once -#include "quantum.h" - -#include "tapdance.h" -#include "wrapper.h" -//#include "combo.h" - -enum { - _BASE, - _LOWER, - _RAISE, - _ADJUST, -}; - -// thumb keys. -#define ALT_ENT ALT_T(KC_ENT) -#define SFT_ESC SFT_T(KC_ESC) - -// home row mods. -#define CT_O LCTL_T(KC_O) -#define CT_N RCTL_T(KC_N) -#define SH_A LSFT_T(KC_A) -#define SH_S RSFT_T(KC_S) -#define AL_E LALT_T(KC_E) -#define AL_T RALT_T(KC_T) -#define GU_I LGUI_T(KC_I) -#define GU_D RGUI_T(KC_D) - -// layer toggle. -#define LW_I LT(_LOWER, KC_I) -#define LW_BSPC LT(_LOWER, KC_BSPC) -#define RS_SPC LT(_RAISE, KC_SPC) -#define RS_D LT(_RAISE, KC_D) - -// idk, man. not used, i guess. -#define ADDDD MO(_ADJUST) - -// common shortcuts for windows and linux that i use. -#define NXTTAB LCTL(KC_PGDN) -#define PRVTAB LCTL(KC_PGUP) -#define UPTAB LCTL(LSFT(KC_PGUP)) -#define DNTAB LCTL(LSFT(KC_PGDN)) -#define NXTWIN LALT(KC_TAB) -#define PRVWIN LALT(LSFT(KC_TAB)) -#define CALDL LCTL(LALT(KC_DELT)) -#define TSKMGR LCTL(LSFT(KC_ESC)) -#define EXPLR LGUI(KC_E) -#define LCKGUI LGUI(KC_L) -#define CONPST LSFT(KC_INS) -#define CLSGUI LALT(KC_F4) - -// tap dances -#define CTL_DLT TD(TD_DLT_CTLDLT) -#define SM_CLN TD(TD_SCLN_CLN) -#define LFT_TMB TD(TD_LEFT_THUMB) diff --git a/users/ibnuda/readme.md b/users/ibnuda/readme.md deleted file mode 100644 index 24b8d6ba..00000000 --- a/users/ibnuda/readme.md +++ /dev/null @@ -1,14 +0,0 @@ -Copyright 2020 Ibnu D. Aji @ibnuda - -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 . diff --git a/users/ibnuda/rules.mk b/users/ibnuda/rules.mk deleted file mode 100644 index 1cf315eb..00000000 --- a/users/ibnuda/rules.mk +++ /dev/null @@ -1,14 +0,0 @@ -COMBO_ENABLE = yes -COMMAND_ENABLE = yes -CONSOLE_ENABLE = yes -TAP_DANCE_ENABLE = yes - -SRC += ibnuda.c - -ifeq ($(strip $(TAP_DANCE_ENABLE)), yes) - SRC += tapdance.c -endif - -ifeq ($(strip $(COMBO_ENABLE)), yes) - SRC += combo.c -endif diff --git a/users/ibnuda/tapdance.c b/users/ibnuda/tapdance.c deleted file mode 100644 index c0d21925..00000000 --- a/users/ibnuda/tapdance.c +++ /dev/null @@ -1,83 +0,0 @@ -#include "tapdance.h" - -static td_state_t td_state; - -void dance_dlt_finished(qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 1) { - register_code16(KC_DELT); - } else { - register_code16(C(KC_DELT)); - } -} - -void dance_dlt_reset(qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 1) { - unregister_code16(KC_DELT); - } else { - unregister_code16(C(KC_DELT)); - } -} - -void dance_cln_finished(qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 1) { - register_code(KC_LSFT); - } - register_code(KC_SCLN); -} - -void dance_cln_reset(qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 1) { - unregister_code(KC_LSFT); - } - unregister_code(KC_SCLN); -} - -int current_dance(qk_tap_dance_state_t *state) { - if (state->count == 1) { - if (state->interrupted || !state->pressed) { - return SINGLE_TAP; - } else { - return SINGLE_HOLD; - } - } - if (state->count == 2) { - return DOUBLE_TAP; - } else { - return 3; - } -} - -void dance_tmb_finished(qk_tap_dance_state_t *state, void *user_data) { - td_state = current_dance(state); - switch (td_state) { - case SINGLE_TAP: - register_code16(KC_ESC); - break; - case SINGLE_HOLD: - register_mods(MOD_BIT(KC_LSFT)); - break; - case DOUBLE_TAP: - register_code16(KC_DELT); - break; - } -} - -void dance_tmb_reset(qk_tap_dance_state_t *state, void *user_data) { - switch (td_state) { - case SINGLE_TAP: - unregister_code16(KC_ESC); - break; - case SINGLE_HOLD: - unregister_mods(MOD_BIT(KC_LSFT)); - break; - case DOUBLE_TAP: - unregister_code16(KC_DELT); - break; - } -} - -qk_tap_dance_action_t tap_dance_actions[] = { - [TD_DLT_CTLDLT] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_dlt_finished, dance_dlt_reset), - [TD_SCLN_CLN] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_cln_finished, dance_cln_reset), - [TD_LEFT_THUMB] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_tmb_finished, dance_tmb_reset), -}; diff --git a/users/ibnuda/tapdance.h b/users/ibnuda/tapdance.h deleted file mode 100644 index 258321d4..00000000 --- a/users/ibnuda/tapdance.h +++ /dev/null @@ -1,23 +0,0 @@ -#pragma once -#include "ibnuda.h" - -#ifdef TAP_DANCE_ENABLE -typedef enum { - SINGLE_TAP, - SINGLE_HOLD, - DOUBLE_TAP, -} td_state_t; - -int current_dance(qk_tap_dance_state_t *state); - -void dance_tmb_finished(qk_tap_dance_state_t *state, void *user_data); -void dance_tmb_reset(qk_tap_dance_state_t *state, void *user_data); - -// enum for tap dances. -enum { - TD_DLT_CTLDLT = 0, - TD_SCLN_CLN, - TD_LEFT_THUMB, -}; - -#endif // TAP_DANCE_ENABLE diff --git a/users/ibnuda/wrapper.h b/users/ibnuda/wrapper.h deleted file mode 100644 index 34350cf3..00000000 --- a/users/ibnuda/wrapper.h +++ /dev/null @@ -1,46 +0,0 @@ -#pragma once -#include "ibnuda.h" - -/* -Since our quirky block definitions are basically a list of comma separated -arguments, we need a wrapper in order for these definitions to be -expanded before being used as arguments to the LAYOUT_xxx macro. -*/ -#if (!defined(LAYOUT) && defined(KEYMAP)) -# define LAYOUT KEYMAP -#endif - -#define KEYMAP_wrapper(...) LAYOUT(__VA_ARGS__) -#define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__) - -#define ________________DVORAK_L1_______________ KC_SCLN,KC_COMM,KC_DOT, KC_P, KC_Y -#define ________________DVORAK_L2_______________ SH_A, CT_O, AL_E, KC_U, GU_I -#define ________________DVORAK_L3_______________ KC_QUOT,KC_Q, KC_J, KC_K, KC_X - -#define ________________DVORAK_R1_______________ KC_F, KC_G, KC_C, KC_R, KC_L -#define ________________DVORAK_R2_______________ GU_D, KC_H, AL_T, CT_N, SH_S -#define ________________DVORAK_R3_______________ KC_B, KC_M, KC_W, KC_V, KC_Z - -#define ________________RAISE_L1________________ KC_EXLM,KC_AT, KC_UP, KC_LCBR,KC_RCBR -#define ________________RAISE_L2________________ KC_HASH,KC_LEFT,KC_DOWN,KC_RGHT,KC_DLR -#define ________________RAISE_L3________________ KC_LBRC,KC_RBRC,KC_LPRN,KC_RPRN,KC_AMPR - -#define ________________RAISE_R1________________ KC_BSLS,KC_7, KC_8, KC_9, KC_ASTR -#define ________________RAISE_R2________________ KC_EQL, KC_4, KC_5, KC_6, KC_0 -#define ________________RAISE_R3________________ KC_GRV, KC_1, KC_2, KC_3, KC_PLUS - -#define ________________LOWER_L1________________ KC_ESC, KC_QUES,KC_UNDS,KC_F1, KC_F2 -#define ________________LOWER_L2________________ KC_LSFT,KC_TAB, KC_PGUP,KC_F5, KC_F6 -#define ________________LOWER_L3________________ KC_CLCK,KC_SLCK,KC_PGDN,KC_F9, KC_F10 - -#define ________________LOWER_R1________________ KC_F3, KC_F4, KC_MINS,KC_SLSH,KC_BSPC -#define ________________LOWER_R2________________ KC_F7, KC_F8, KC_HOME,KC_LALT,KC_ENT -#define ________________LOWER_R3________________ KC_F11, KC_F12, KC_END, KC_INS, KC_SLSH - -#define ________________ADJUST_L1_______________ _______,EXPLR, KC_UP, PRVTAB, PRVWIN -#define ________________ADJUST_L2_______________ TSKMGR, KC_LEFT,KC_DOWN,KC_RGHT,UPTAB -#define ________________ADJUST_L3_______________ _______,CLSGUI, _______,CONPST, RESET - -#define ________________ADJUST_R1_______________ NXTWIN, NXTTAB, _______,_______,LCKGUI -#define ________________ADJUST_R2_______________ DNTAB, KC_ENT, KC_LGUI,_______,CALDL -#define ________________ADJUST_R3_______________ _______,_______,_______,_______,_______ diff --git a/users/ishtob/config.h b/users/ishtob/config.h deleted file mode 100644 index 1f567f4a..00000000 --- a/users/ishtob/config.h +++ /dev/null @@ -1,75 +0,0 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "config_common.h" - -#ifdef AUDIO_ENABLE - #define STARTUP_SONG SONG(PLANCK_SOUND) - // #define STARTUP_SONG SONG(NO_SOUND) - - #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ - SONG(COLEMAK_SOUND), \ - SONG(DVORAK_SOUND) \ - } -#endif - -//#define LEADER_TIMEOUT 300 -//#define BACKLIGHT_BREATHING -//#define PERMISSIVE_HOLD -// #define QMK_KEYS_PER_SCAN 4 - -//audio clicky - //#define AUDIO_CLICKY - // to enable clicky on startup - //#define AUDIO_CLICKY_ON - //#define AUDIO_CLICKY_FREQ_RANDOMNESS 1.0f - -/* ws2812 RGB LED -#define RGB_DI_PIN B5 -#define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 8 // Number of LEDs -#define RGBLIGHT_HUE_STEP 10 -#define RGBLIGHT_SAT_STEP 17 -*/ -#undef PLANCK_MIT_LAYOUT - -//#define MUON_LEFT - -#undef DEBOUNCE -#define DEBOUNCE 0 - -//rgb-reactive -//#define RGB_MATRIX_KEYPRESSES -//#define EECONFIG_RGB_MATRIX (uint32_t *)16 - -//skip usb startup check -//#define NO_USB_STARTUP_CHECK - - -/* - * MIDI options - */ - -/* Prevent use of disabled MIDI features in the keymap */ -//#define MIDI_ENABLE_STRICT 1 - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 2 - -// Most tactile encoders have detents every 4 stages -#define ENCODER_RESOLUTION 4 - -#endif diff --git a/users/ishtob/ishtob.c b/users/ishtob/ishtob.c deleted file mode 100644 index 1b847d63..00000000 --- a/users/ishtob/ishtob.c +++ /dev/null @@ -1,69 +0,0 @@ -/* -Based on userspace written by @drashna 2017 -Copyright 2018 Hsian Chang @ishtob - -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 "ishtob.h" -#include "action.h" -#include "action_layer.h" -// #include "dynamic_macro.h" -#ifdef AUDIO_ENABLE - #include "audio.h" -#endif - - -// Add reconfigurable functions here, for keymap customization -// This allows for a global, userspace functions, and continued -// customization of the keymap. Use _keymap instead of _user -// functions in the keymaps -__attribute__ ((weak)) -void matrix_init_keymap(void) {} - -__attribute__ ((weak)) -void matrix_scan_keymap(void) {} - -__attribute__ ((weak)) -bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { - return true; -} - -__attribute__ ((weak)) -bool process_record_secrets(uint16_t keycode, keyrecord_t *record) { - return true; -} - -// Call user matrix init, then call the keymap's init function -void matrix_init_user(void) { - matrix_init_keymap(); -} - -// No global matrix scan code, so just run keymap's matix -// scan function -void matrix_scan_user(void) { - matrix_scan_keymap(); -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case DFU: - if (record->event.pressed) { - clear_keyboard(); - reset_keyboard(); - } - return false; - break; - } - return process_record_keymap(keycode, record) && process_record_secrets(keycode, record); -} - diff --git a/users/ishtob/ishtob.h b/users/ishtob/ishtob.h deleted file mode 100644 index 29d6f250..00000000 --- a/users/ishtob/ishtob.h +++ /dev/null @@ -1,237 +0,0 @@ -#ifndef USERSPACE -#define USERSPACE -#include "quantum.h" - -enum userspace_keycodes { - QWERTY = SAFE_RANGE, - COLEMAK, - DVORAK, - PLOVER, - LOWER, - RAISE, - BACKLIT, - EXT_PLV, - DFU, - P_CITRIX, //these macro exsists in macros_private.c, which is excluded from git - P_MPASS, - P_META, - O_DAYRN, - O_RTQ6H, - O_3DRN, - O_AUTODC, - M_EMAIL, - M_EMAIL2 -}; - -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// Layer names don't all need to be of the same length, obviously, and you can also skip them -// entirely and just use numbers. -#define _QWERTY 0 -#define _COLEMAK 1 -#define _DVORAK 2 -#define _LOWER 3 -#define _RAISE 4 -#define _PLOVER 5 -#define _FNLAYER 6 -#define _NUMLAY 7 -#define _MOUSECURSOR 8 -#define _ADJUST 16 - - - -#define LOWER MO(_LOWER) -#define RAISE MO(_RAISE) - -// Custom macros -#define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl -#define CTL_TTAB CTL_T(KC_TAB) // Tap for Esc, hold for Ctrl -#define CTL_ENT CTL_T(KC_ENT) // Tap for Enter, hold for Ctrl -#define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift -// Requires KC_TRNS/_______ for the trigger key in the destination layer -#define LT_FN(kc) LT(_FNLAYER, kc) // L-ayer T-ap Function Layer -#define LT_MC(kc) LT(_MOUSECURSOR, kc) // L-ayer T-ap M-ouse C-ursor -#define LT_RAI(kc) LT(_RAISE, kc) // L-ayer T-ap to Raise -#define TG_NUMLAY TG(_NUMLAY) //Toggle for layer _NUMLAY -/* -enum userspace_layers { - _QWERTY = 0, - _COLEMAK, - _DVORAK, - _LOWER, - _RAISE, - _PLOVER, - _FNLAYER, - _NUMLAY, - _MOUSECURSOR, - _ADJUST -}; -*/ - -/* -Since our quirky block definitions are basically a list of comma separated -arguments, we need a wrapper in order for these definitions to be -expanded before being used as arguments to the LAYOUT_xxx macro. -*/ -#if (!defined(LAYOUT) && defined(KEYMAP)) -#define LAYOUT KEYMAP -#endif - -#define LAYOUT_ergodox_wrapper(...) LAYOUT_ergodox(__VA_ARGS__) -#define LAYOUT_ergodox_pretty_wrapper(...) LAYOUT_ergodox_pretty(__VA_ARGS__) -#define KEYMAP_wrapper(...) LAYOUT(__VA_ARGS__) -#define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__) -#define LAYOUT_ortho_4x12_wrapper(...) LAYOUT_ortho_4x12(__VA_ARGS__) - -/* -Blocks for each of the four major keyboard layouts -Organized so we can quickly adapt and modify all of them -at once, rather than for each keyboard, one at a time. -And this allows for much cleaner blocks in the keymaps. -For instance Tap/Hold for Control on all of the layouts - -NOTE: These are all the same length. If you do a search/replace - then you need to add/remove underscores to keep the - lengths consistent. -*/ - -#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, LT_MC(KC_SCLN) -#define _________________QWERTY_R3_________________ KC_N, KC_M, KC_COMM, KC_DOT, KC_SLASH - - -#define _________________COLEMAK_L1________________ KC_Q, KC_W, KC_F, KC_P, KC_G -#define _________________COLEMAK_L2________________ KC_A, KC_R, KC_S, KC_T, KC_D -#define _________________COLEMAK_L3________________ KC_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, LT_MC(KC_O) -#define _________________COLEMAK_R3________________ KC_K, KC_M, KC_COMM, KC_DOT, KC_SLASH - -#define ______________COLEMAK_MOD_DH_L1____________ KC_Q, KC_W, KC_F, KC_P, KC_B -#define ______________COLEMAK_MOD_DH_L2____________ KC_A, KC_R, KC_S, KC_T, KC_G -#define ______________COLEMAK_MOD_DH_L3____________ KC_Z, KC_X, KC_C, KC_D, KC_V - -#define ______________COLEMAK_MOD_DH_R1____________ KC_J, KC_L, KC_U, KC_Y, KC_SCLN -#define ______________COLEMAK_MOD_DH_R2____________ KC_M, KC_N, KC_E, KC_I, LT_MC(KC_O) -#define ______________COLEMAK_MOD_DH_R3____________ KC_K, KC_H, KC_COMM, KC_DOT, KC_SLASH - - -#define _________________DVORAK_L1_________________ KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y -#define _________________DVORAK_L2_________________ KC_A, KC_O, KC_E, KC_U, KC_I -#define _________________DVORAK_L3_________________ KC_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, LT_MC(KC_S) -#define _________________DVORAK_R3_________________ KC_B, KC_M, KC_W, KC_V, KC_Z - - -#define _________________WORKMAN_L1________________ KC_Q, KC_D, KC_R, KC_W, KC_B -#define _________________WORKMAN_L2________________ KC_A, KC_S, KC_H, KC_T, KC_G -#define _________________WORKMAN_L3________________ KC_Z, KC_X, KC_M, KC_C, KC_V - -#define _________________WORKMAN_R1________________ KC_J, KC_F, KC_U, KC_P, KC_SCLN -#define _________________WORKMAN_R2________________ KC_Y, KC_N, KC_E, KC_O, LT_MC(KC_I) -#define _________________WORKMAN_R3________________ KC_K, KC_L, KC_COMM, KC_DOT, KC_SLASH - - -#define _________________NORMAN_L1_________________ KC_Q, KC_W, KC_D, KC_F, KC_K -#define _________________NORMAN_L2_________________ KC_A, KC_S, KC_E, KC_T, KC_G -#define _________________NORMAN_L3_________________ KC_Z, KC_X, KC_C, KC_V, KC_B - -#define _________________NORMAN_R1_________________ KC_J, KC_U, KC_R, KC_L, KC_SCLN -#define _________________NORMAN_R2_________________ KC_Y, KC_N, KC_I, KC_O, LT_MC(KC_U) -#define _________________NORMAN_R3_________________ KC_P, KC_M, KC_COMM, KC_DOT, KC_SLASH - - -#define _________________MALTRON_L1________________ KC_Q, KC_P, KC_Y, KC_C, KC_B -#define _________________MALTRON_L2________________ KC_A, KC_N, KC_I, KC_S, KC_F -#define _________________MALTRON_L3________________ KC_SCLN, KC_SLSH, KC_J KC_G, KC_COMM - -#define _________________MALTRON_R1________________ KC_V, KC_M, KC_U, KC_Z, KC_L -#define _________________MALTRON_R2________________ KC_D, KC_T, KC_D, KC_O, LT_MC(KC_R) -#define _________________MALTRON_R3________________ KC_DOT, KC_W, KC_K, KC_MINS, KC_X - - -#define _________________EUCALYN_L1________________ KC_SLSH, KC_COMM, KC_DOT, KC_F, KC_Q -#define _________________EUCALYN_L2________________ KC_A, KC_O, KC_E, KC_I, KC_U -#define _________________EUCALYN_L3________________ KC_Z, KC_X, KC_C, KC_V, KC_W - -#define _________________EUCALYN_R1________________ KC_M, KC_R, KC_D, KC_Y, KC_P -#define _________________EUCALYN_R2________________ KC_G, KC_T, KC_K, KC_S, LT_MC(KC_N) -#define _________________EUCALYN_R3________________ KC_B, KC_H, KC_J, KC_L, KC_SCLN - - -#define _____________CARPLAX_QFMLWY_L1_____________ KC_Q, KC_F, KC_M, KC_L, KC_W -#define _____________CARPLAX_QFMLWY_L2_____________ KC_D, KC_S, KC_T, KC_N, KC_R -#define _____________CARPLAX_QFMLWY_L3_____________ KC_Z, KC_V, KC_G, KC_C, KC_X - -#define _____________CARPLAX_QFMLWY_R1_____________ KC_Y, KC_U, KC_O, KC_B, KC_J -#define _____________CARPLAX_QFMLWY_R2_____________ KC_I, KC_A, KC_E, KC_H, LT_MC(KC_SCLN) -#define _____________CARPLAX_QFMLWY_R3_____________ KC_P, KC_K, KC_COMM, KC_DOT, KC_SLSH - - -#define _____________CARPLAX_QGMLWB_L1_____________ KC_Q, KC_G, KC_M, KC_L, KC_W -#define _____________CARPLAX_QGMLWB_L2_____________ KC_D, KC_S, KC_T, KC_N, KC_R -#define _____________CARPLAX_QGMLWB_L3_____________ KC_Z, KC_X, KC_C, KC_F, KC_J - -#define _____________CARPLAX_QGMLWB_R1_____________ KC_B, KC_Y, KC_U, KC_V, KC_SCLN -#define _____________CARPLAX_QGMLWB_R2_____________ KC_I, KC_A, KC_E, KC_O, LT_MC(KC_H) -#define _____________CARPLAX_QGMLWB_R3_____________ KC_K, KC_P, KC_COMM, KC_DOT, KC_SLSH - - -#define _____________CARPLAX_QGMLWY_L1_____________ KC_Q, KC_G, KC_M, KC_L, KC_W -#define _____________CARPLAX_QGMLWY_L2_____________ KC_D, KC_S, KC_T, KC_N, KC_R -#define _____________CARPLAX_QGMLWY_L3_____________ KC_Z, KC_X, KC_C, KC_V, KC_J - -#define _____________CARPLAX_QGMLWY_R1_____________ KC_Y, KC_F, KC_U, KC_B, KC_SCLN -#define _____________CARPLAX_QGMLWY_R2_____________ KC_I, KC_A, KC_E, KC_O, LT_MC(KC_H) -#define _____________CARPLAX_QGMLWY_R3_____________ KC_K, KC_P, KC_COMM, KC_DOT, KC_SLSH - - -#define ________________NUMBER_LEFT________________ KC_1, KC_2, KC_3, KC_4, KC_5 -#define ________________NUMBER_RIGHT_______________ KC_6, KC_7, KC_8, KC_9, KC_0 -#define _________________FUNC_LEFT_________________ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5 -#define _________________FUNC_RIGHT________________ KC_F6, KC_F7, KC_F8, KC_F9, KC_F10 - -#define __________________LONG_FUNC_LEFT___________________ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6 -#define __________________LONG_FUNC_RIGHT__________________ KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12 - -#define ___________________BLANK___________________ _______, _______, _______, _______, _______ - - -#define _________________LOWER_L1__________________ KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC -#define _________________LOWER_L2__________________ _________________FUNC_LEFT_________________ -#define _________________LOWER_L3__________________ _________________FUNC_RIGHT________________ - -#define _________________LOWER_R1__________________ KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN -#define _________________LOWER_R2__________________ _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR -#define _________________LOWER_R3__________________ _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT - - - -#define _________________RAISE_L1__________________ ________________NUMBER_LEFT________________ -#define _________________RAISE_L2__________________ ___________________BLANK___________________ -#define _________________RAISE_L3__________________ ___________________BLANK___________________ - -#define _________________RAISE_R1__________________ ________________NUMBER_RIGHT_______________ -#define _________________RAISE_R2__________________ _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC -#define _________________RAISE_R3__________________ _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END - - - -#define _________________ADJUST_L1_________________ RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_TOG -#define _________________ADJUST_L2_________________ MU_TOG , CK_TOGG, AU_ON, AU_OFF, AG_NORM -#define _________________ADJUST_L3_________________ RGB_RMOD,RGB_HUD,RGB_SAD, RGB_VAD, KC_RGB_T - -#define _________________ADJUST_R1_________________ KC_SEC1, KC_SEC2, KC_SEC3, KC_SEC4, KC_SEC5 -#define _________________ADJUST_R2_________________ AG_SWAP, QWERTY, COLEMAK, DVORAK, WORKMAN -#define _________________ADJUST_R3_________________ MG_NKRO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT - - - -#endif // !USERSPACE diff --git a/users/ishtob/readme.md b/users/ishtob/readme.md deleted file mode 100644 index 5b7064de..00000000 --- a/users/ishtob/readme.md +++ /dev/null @@ -1,87 +0,0 @@ -# Ishtob's userspace - -under developement - -# Secret Macros - -This section is a modified version of what @drashna did in his userspace: https://github.com/qmk/qmk_firmware/tree/master/users/drashna#secret-macros - -`macros_private.c` will be used if it exsists in the userspace folder during compiling. - -To get started, put the following in rules.mk. this will have the compiler include the macros_private.c file if it exsists. -``` -SRC += ishtob.c -ifneq ($(wildcard $(USER_PATH)/macros_private.c),"") - SRC += macros_private.c -endif -ifeq ($(strip $(NO_SECRETS)), yes) - OPT_DEFS += -DNO_SECRETS -endif -``` - -Remember that all macro keycode has to be present in the header file (ishtob.h) to prevent error during compile. - -Next, you setup macros_private.c, ensure the keycodes are defined in ishtob.h (or your keymap.h). -Here is an example of my macros with the sensitive login information removed: -``` -#include "ishtob.h" //replace this with your userspace or keymap -#include "quantum.h" - -#pragma message "secret macros included" //debug line to let me know this file is included in the compile - -//this str is for the monthly password rotation per my workplace's security policy -char my_str[5] = "stuff"; - -bool process_record_secrets(uint16_t keycode, keyrecord_t *record) { - if (record->event.pressed) { - switch(keycode) { - //my login macros - case P_CITRIX: - SEND_STRING("username"SS_TAP(X_TAB)"something"); - send_string(my_str); - return false; - case P_MPASS: - SEND_STRING("something"); - send_string(my_str); - return false; - case P_META: - SEND_STRING("metausername"); - return false; - //my work macros for the meta application - case O_RTQ6H: - SEND_STRING(SS_TAP(X_TAB)"0300"SS_TAP(X_TAB)SS_TAP(X_DOWN)SS_TAP(X_TAB)"0900"SS_TAP(X_TAB)SS_TAP(X_DOWN)SS_TAP(X_TAB)"1500"SS_TAP(X_TAB)SS_TAP(X_DOWN)SS_TAP(X_TAB)"2100"SS_TAP(X_TAB)SS_LALT("o")); - return false; - case O_AUTODC: - SEND_STRING(SS_LALT("v")SS_TAP(X_TAB)SS_TAP(X_TAB)SS_TAP(X_TAB)SS_TAP(X_TAB)SS_TAP(X_TAB)SS_TAP(X_TAB)SS_TAP(X_TAB)SS_TAP(X_TAB)SS_TAP(X_TAB)"T"SS_TAP(X_TAB)"N"SS_LALT("s")); - return false; - case O_DAYRN: - SEND_STRING(SS_TAP(X_TAB)SS_TAP(X_TAB)SS_TAP(X_TAB)SS_TAP(X_TAB)SS_TAP(X_TAB)"1"SS_LALT("s")); - return false; - //Ops macros - case M_EMAIL: - SEND_STRING("privatemail@email.com"); - return false; - case M_EMAIL2: - SEND_STRING("workemail@work.com"); - return false; - } - } - return true; -} -``` - - -Finally, add the following to .git/info/exclude to prevent private macros from being committed to git. -``` -# git ls-files --others --exclude-from=.git/info/exclude -# Lines that start with '#' are comments. -# For a project mostly in C, the following would be a good set of -# exclude patterns (uncomment them if you want to use them): -# *.[oa] -# *~ -/users/ishtob/macros_private.c -``` - -# Special mentions - -special thanks to @drashna for helping me through quite a bit of these codes. \ No newline at end of file diff --git a/users/ishtob/rules.mk b/users/ishtob/rules.mk deleted file mode 100644 index 909502b5..00000000 --- a/users/ishtob/rules.mk +++ /dev/null @@ -1,7 +0,0 @@ -SRC += ishtob.c -ifneq ("$(wildcard $(USER_PATH)/macros_private.c)","") - SRC += macros_private.c -endif -ifeq ($(strip $(NO_SECRETS)), yes) - OPT_DEFS += -DNO_SECRETS -endif diff --git a/users/issmirnov/config.h b/users/issmirnov/config.h deleted file mode 100644 index 664ebfe8..00000000 --- a/users/issmirnov/config.h +++ /dev/null @@ -1,45 +0,0 @@ -#pragma once - -// Allows sending more than one key per scan. Useful for chords. -#define QMK_KEYS_PER_SCAN 4 - -// how long before a tap becomes a hold -#undef TAPPING_TERM -#define TAPPING_TERM 100 - -// makes tap and hold keys work better for fast typers who don't want -// tapping term set above 500 -#define PERMISSIVE_HOLD - -// tap anyway, even after TAPPING_TERM, if there was no other key -// interruption between press and release -#define RETRO_TAPPING - -// how many taps before triggering the toggle -#undef ONESHOT_TAP_TOGGLE -#define ONESHOT_TAP_TOGGLE 2 - -// how long before oneshot modifier key times out (currently only shift) -#undef ONESHOT_TIMEOUT -#define ONESHOT_TIMEOUT 2000 - -// Enable combos for vim -#define COMBO_COUNT 5 // Specify the number of combos used. BE SURE TO INCREMENT AS NEEDED -#define COMBO_TERM 50 // window in milliseconds to trigger combo - -// Allow more than 4 keys to be sent to the system. Useful for gaming. -// #define FORCE_NKRO - -// Save 200 bytes on unused keycodes -#undef LOCKING_SUPPORT_ENABLE -#undef LOCKING_RESYNC_ENABLE - -// Enable HID_listen commands. -#define NO_DEBUG -#undef NO_PRINT -#define USER_PRINT - -// Note: Defining the following does not have any impact on space: -// - NO_ACTION_MACRO -// - NO_ACTION_FUNCTION -// - DISABLE_LEADER diff --git a/users/issmirnov/issmirnov.c b/users/issmirnov/issmirnov.c deleted file mode 100644 index 665afbcf..00000000 --- a/users/issmirnov/issmirnov.c +++ /dev/null @@ -1,43 +0,0 @@ -#include "issmirnov.h" - -enum combo_events { - JK_ESC, - DF_CLN, - SD_SLASH, - XC_COPY, - XV_PASTE -}; - - -const uint16_t PROGMEM jk_combo[] = {KC_J, KC_K, COMBO_END}; -const uint16_t PROGMEM df_combo[] = {KC_D, KC_F, COMBO_END}; -const uint16_t PROGMEM sd_combo[] = {KC_S, KC_D, COMBO_END}; -const uint16_t PROGMEM copy_combo[] = {KC_X, KC_C, COMBO_END}; -const uint16_t PROGMEM paste_combo[] = {KC_X, KC_V, COMBO_END}; - - -// BE SURE TO UPDATE THE CONFIG.H "COMBO_COUNT" value when you add elements here! -combo_t key_combos[COMBO_COUNT] = { - COMBO(jk_combo, KC_ESC), - COMBO(df_combo, KC_COLON), - COMBO(sd_combo, KC_SLASH), - [XC_COPY] = COMBO_ACTION(copy_combo), - [XV_PASTE] = COMBO_ACTION(paste_combo), -}; - - -void process_combo_event(uint8_t combo_index, bool pressed) { - switch(combo_index) { - case XC_COPY: - if (pressed) { - tap_code16(LCTL(KC_C)); - } - break; - - case XV_PASTE: - if (pressed) { - tap_code16(LCTL(KC_V)); - } - break; - } -} diff --git a/users/issmirnov/issmirnov.h b/users/issmirnov/issmirnov.h deleted file mode 100644 index eef80dfc..00000000 --- a/users/issmirnov/issmirnov.h +++ /dev/null @@ -1,35 +0,0 @@ -#pragma once - -#include QMK_KEYBOARD_H - -#include "rows.h" - -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// Layer names don't all need to be of the same length, obviously, and you can also skip them -// entirely and just use numbers -enum { - _QWERTY = 0, - _SYMB, - _NUMP, - _OVERWATCH, - _NAVI -}; - -enum custom_keycodes { - PLACEHOLDER = SAFE_RANGE, - TAP_TOG_LAYER, - CLEAR_EEPROM, - WKSP_LEFT, // Smart key that only activates when we are momentarily in a layer - WKSP_RIGHT, // Smart key that only activates when we are momentarily in a layer -}; - - -#define LOWER MO(_SYMB) -#define RAISE MO(_NUMP) - -#define CTL_SPC MT(MOD_LCTL, KC_SPC) -#define OSMSFT OSM(MOD_LSFT) -#define LOCK LGUI(KC_L) -#define MODSFT LSFT(KC_LGUI) -#define APPS LGUI(KC_SPC) diff --git a/users/issmirnov/rows.h b/users/issmirnov/rows.h deleted file mode 100644 index d35af217..00000000 --- a/users/issmirnov/rows.h +++ /dev/null @@ -1,55 +0,0 @@ -#pragma once - -#include QMK_KEYBOARD_H - -// This wrapper is required in order to expand the row macro inside the keymap configs. -#define LAYOUT_ergodox_wrapper(...) LAYOUT_ergodox(__VA_ARGS__) -#define LAYOUT_ortho_4x12_wrapper(...) LAYOUT_ortho_4x12(__VA_ARGS__) - -// Share common config. We'll skip the mod rows and func rows. -// Note, it's also really neat the way the scoping works. Since we perform the expansion in the keymap.c file -// so we can use our enums for custom keycodes -#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 , TAP_TOG_LAYER -#define _________________QWERTY_R3_________________ KC_N , KC_M , KC_DOT , KC_COMMA , TG(_NUMP) - -#define ___________________BLANK___________________ _______ , _______ , _______ , _______ , _______ -#define ___________________XXXXX___________________ XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX - -#define _________________SYMB_L1___________________ KC_MINS , KC_AT , KC_LCBR , KC_RCBR , KC_GRV -#define _________________SYMB_L2___________________ KC_CIRC , KC_UNDS , KC_LPRN , KC_RPRN , KC_DLR -#define _________________SYMB_L3___________________ KC_LABK , KC_RABK , KC_LBRACKET , KC_RBRACKET , KC_TILD - -#define _________________SYMB_R1___________________ KC_ASTR , KC_EXLM , KC_PIPE , KC_PERC , KC_PLUS -#define _________________SYMB_R2___________________ KC_HASH , KC_EQL , KC_COLN , KC_SCLN , TAP_TOG_LAYER -#define _________________SYMB_R3___________________ KC_AMPR , KC_QUES , KC_SLASH , KC_BSLASH , TG(_NUMP) - - -#define _________________NUMP_L1___________________ KC_NO , KC_NO , LGUI(KC_UP) , XXXXXXX , XXXXXXX -#define _________________NUMP_L2___________________ XXXXXXX , LGUI(KC_LEFT) , LGUI(KC_DOWN) , LGUI(KC_RIGHT) , XXXXXXX -#define _________________NUMP_L3___________________ XXXXXXX , XXXXXXX , XXXXXXX , KC_AUDIO_VOL_DOWN , KC_AUDIO_VOL_UP - -#define _________________NUMP_R1___________________ KC_COMM , KC_7 , KC_8 , KC_9 , XXXXXXX -#define _________________NUMP_R2___________________ KC_0 , KC_4 , KC_5 , KC_6 , TO(_SYMB) -#define _________________NUMP_R3___________________ KC_DOT , KC_1 , KC_2 , KC_3 , TO(_QWERTY) - -// Note: These are 6x1 blocks, since modifiers are also adjusted. -#define ______________OVERWATCH_L1_________________ KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T -#define ______________OVERWATCH_L2_________________ KC_LCTL , KC_A , KC_S , KC_D , KC_F , KC_P -#define ______________OVERWATCH_L3_________________ KC_LSHIFT , KC_Z , KC_X , KC_C , KC_V , KC_GRAVE -// Ergodox only has 5 keys on bottom row: -#define ______________OVERWATCH_L4_________________ KC_LCTL , KC_F9 , KC_PSCREEN , KC_H , KC_R - - - -#define _________________NAVI_L1___________________ XXXXXXX , XXXXXXX , KC_UP , XXXXXXX , XXXXXXX -#define _________________NAVI_L2___________________ XXXXXXX , KC_LEFT , KC_DOWN , KC_RGHT , XXXXXXX -#define _________________NAVI_L3___________________ XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX - -#define _________________NAVI_R1___________________ XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX -#define _________________NAVI_R2___________________ XXXXXXX , KC_LCTL , XXXXXXX , XXXXXXX , XXXXXXX -#define _________________NAVI_R3___________________ XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX diff --git a/users/issmirnov/rules.mk b/users/issmirnov/rules.mk deleted file mode 100644 index 096d7b4c..00000000 --- a/users/issmirnov/rules.mk +++ /dev/null @@ -1,25 +0,0 @@ - -SRC += tap_tog.c -SRC += issmirnov.c - -# https://www.reddit.com/r/olkb/comments/bmpgjm/programming_help/ -# Should shave 2000 bytes -LINK_TIME_OPTIMIZATION_ENABLE = yes - -# Enable debugging only when needed. -CONSOLE_ENABLE = yes # +400 bytes (hid_listen support) - -# Enable combo keys for vim usage. -# https://github.com/qmk/qmk_firmware/blob/master/docs/feature_combo.md -COMBO_ENABLE = yes - -# This allows the keyboard to tell the host OS that up to 248 keys are held down at once -NKRO_ENABLE = no # note: also needs FORCE_NKRO in config.h - -# Disable unused features to save on space -# https://thomasbaart.nl/2018/12/01/reducing-firmware-size-in-qmk/ -MOUSEKEY_ENABLE = no # 2000 bytes -BOOTMAGIC_ENABLE = no -COMMAND_ENABLE = no # https://beta.docs.qmk.fm/features/feature_command -UNICODE_ENABLE = no # Unicode -SWAP_HANDS_ENABLE = no # Allow swapping hands of keyboard diff --git a/users/issmirnov/tap_tog.c b/users/issmirnov/tap_tog.c deleted file mode 100644 index 02cea08b..00000000 --- a/users/issmirnov/tap_tog.c +++ /dev/null @@ -1,52 +0,0 @@ -#include QMK_KEYBOARD_H - -#include "tap_tog.h" - -bool tap_tog_layer_other_key_pressed = false; -bool tap_tog_layer_toggled_on = false; -uint8_t tap_tog_count = 0; - -void process_tap_tog(uint8_t layer, keyrecord_t *record) { - tap_tog_count++; - // press - if (record->event.pressed) { - - // TTL has already been pressed and we are toggled into that layer - // so now we need to leave - if(tap_tog_layer_toggled_on) { - layer_clear(); - tap_tog_layer_toggled_on = false; - } - - // this means we're in our default layer - // so switch the layer immediately - // whether we'll switch back when it's released depends on if a button gets pressed while this is held down - else { - // switch layer - layer_on(layer); - tap_tog_layer_other_key_pressed = false; // if this becomes true before it gets released, it will act as a held modifier - } - } - - // release - else { - // if it was used as a held modifier (like traditional shift) - if(tap_tog_layer_other_key_pressed) { - // switch layer back - layer_clear(); - } - // if it was used as a toggle button - else { - // next time, it will turn layer off - tap_tog_layer_toggled_on = true; - - // If it's been tapped twice, reset the toggle flag. - // Otherwise, we get stuck oscillating between this code block and the - // pressed && TTL_toggled_on block. - if (tap_tog_count >= 4 ) { - tap_tog_count = 0; - tap_tog_layer_toggled_on = false; - } - } - } -} diff --git a/users/issmirnov/tap_tog.h b/users/issmirnov/tap_tog.h deleted file mode 100644 index f59711f0..00000000 --- a/users/issmirnov/tap_tog.h +++ /dev/null @@ -1,10 +0,0 @@ -#pragma once - -#include "issmirnov.h" - -extern bool tap_tog_layer_other_key_pressed; // set to true if any key pressed while TAP_TOG_LAYER held down -extern bool tap_tog_layer_toggled_on; // will become true if no keys are pressed while TTL held down -extern uint8_t tap_tog_count; // number of presses on TAP_TOG_LAYER button. - -// Tap dance analog with momentary toggle when held, switch when tapped -void process_tap_tog(uint8_t layer, keyrecord_t *record); diff --git a/users/jackhumbert/jackhumbert.c b/users/jackhumbert/jackhumbert.c deleted file mode 100644 index 011e0efb..00000000 --- a/users/jackhumbert/jackhumbert.c +++ /dev/null @@ -1 +0,0 @@ -#include "jackhumbert.h" \ No newline at end of file diff --git a/users/jackhumbert/jackhumbert.h b/users/jackhumbert/jackhumbert.h deleted file mode 100644 index 69cfa674..00000000 --- a/users/jackhumbert/jackhumbert.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef USERSPACE -#define USERSPACE - -#include "quantum.h" - -#endif \ No newline at end of file diff --git a/users/jackhumbert/readme.md b/users/jackhumbert/readme.md deleted file mode 100644 index 479a6414..00000000 --- a/users/jackhumbert/readme.md +++ /dev/null @@ -1,14 +0,0 @@ -Copyright 2017 Jack Humbert @jackhumbert - -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 . \ No newline at end of file diff --git a/users/jackhumbert/rules.mk b/users/jackhumbert/rules.mk deleted file mode 100644 index f2981bb7..00000000 --- a/users/jackhumbert/rules.mk +++ /dev/null @@ -1 +0,0 @@ -SRC += jackhumbert.c \ No newline at end of file diff --git a/users/jarred/config.h b/users/jarred/config.h deleted file mode 100644 index e63ec4d9..00000000 --- a/users/jarred/config.h +++ /dev/null @@ -1,51 +0,0 @@ -/* Copyright 2018 Jarred Steenvoorden - * - * 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 . - */ - -#pragma once - -// Sets good default for the speed of the mouse. -#undef MOUSEKEY_INTERVAL -#undef MOUSEKEY_DELAY -#undef MOUSEKEY_TIME_TO_MAX -#undef MOUSEKEY_MAX_SPEED - -#define MOUSEKEY_INTERVAL 16 -#define MOUSEKEY_DELAY 0 -#define MOUSEKEY_TIME_TO_MAX 40 -#define MOUSEKEY_MAX_SPEED 5 - -#undef MOUSEKEY_WHEEL_MAX_SPEED -#undef MOUSEKEY_WHEEL_TIME_TO_MAX -#undef MOUSEKEY_WHEEL_DELAY - -#define MOUSEKEY_WHEEL_MAX_SPEED 4 -#define MOUSEKEY_WHEEL_TIME_TO_MAX 255 -#define MOUSEKEY_WHEEL_DELAY 0 - -#undef TAPPING_TOGGLE -#undef TAPPING_TERM -#undef IGNORE_MOD_TAP_INTERRUPT - -#define PERMISSIVE_HOLD -#define TAPPING_TOGGLE 1 -#define TAPPING_TERM 200 -#define IGNORE_MOD_TAP_INTERRUPT - -#ifdef AUDIO_ENABLE - #define STARTUP_SONG SONG(PLANCK_SOUND) -#endif - -#define MACRO_TIMER 5 diff --git a/users/jarred/jarred.c b/users/jarred/jarred.c deleted file mode 100644 index b37c4cfb..00000000 --- a/users/jarred/jarred.c +++ /dev/null @@ -1,97 +0,0 @@ -/* Copyright 2018 Jarred Steenvoorden - * - * 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 "jarred.h" -#include "version.h" - -__attribute__ ((weak)) -bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { - return true; -} - -bool lowerPressed, raisePressed; - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - - switch (keycode) { - case LOWER: - case RAISE: - // Both lower and raise activate the same layer - if (record->event.pressed) { - layer_on(_LW); - } else { - layer_off(_LW); - } - - // But keep track of each to active adjust layer - if (keycode == LOWER) { - lowerPressed = record->event.pressed; - } else { - raisePressed = record->event.pressed; - } - - // When both are pressed, activate adjust - if (lowerPressed && raisePressed) { - layer_on(_NP); - } else { - layer_off(_NP); - } - - break; - - case NUMPAD: - if (record->event.pressed) { - layer_on(_NP); - } else { - layer_off(_NP); - } - break; - - case NAVI: - if (record->event.pressed) { - layer_on(_NV); - } else { - layer_off(_NV); - - // Release mods set by ALT_TAB and CTL_TAB - unregister_code(KC_LALT); - unregister_code(KC_LCTL); - } - break; - - case VRSN: // Prints firmware version - if (record->event.pressed) { - send_string_with_delay_P(PSTR(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION ", Built on: " QMK_BUILDDATE), MACRO_TIMER); - } - break; - - case ALT_TAB: - if (record->event.pressed) { - register_code(KC_LALT); - tap_code(KC_TAB); - } - break; - - case CTL_TAB: - if (record->event.pressed) { - register_code(KC_LCTL); - tap_code(KC_TAB); - } - break; - } - - return process_record_keymap(keycode, record); -} diff --git a/users/jarred/jarred.h b/users/jarred/jarred.h deleted file mode 100644 index 49b1253b..00000000 --- a/users/jarred/jarred.h +++ /dev/null @@ -1,172 +0,0 @@ -/* Copyright 2018 Jarred Steenvoorden - * - * 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 . - */ - -// TODO: Add Alt-Tab to nav + W layer - -#ifndef USERSPACE -#define USERSPACE - -#include "quantum.h" - -enum userspace_custom_keycodes { - VRSN = SAFE_RANGE, // Prints QMK Firmware and board info - ALT_TAB, - CTL_TAB, - - // Layer keys - NAVI, - LOWER, - RAISE, - NUMPAD -}; - -// Layers -enum { - _QW = 0, - _GAME, - _LW, - _NV, - _NP, - _MS, -}; - -#define MS_A LT(_MS,KC_A) - -#define WIN_Z LGUI_T(KC_Z) -#define CTL_SLH RCTL_T(KC_SLSH) - -// Wrappers -#define LAYOUT_planck_grid_wrapper(...) LAYOUT_planck_grid(__VA_ARGS__) -#define LAYOUT_plaid_grid_wrapper(...) LAYOUT_plaid_grid(__VA_ARGS__) -#define LAYOUT_atreus62_grid_wrapper(...) LAYOUT(__VA_ARGS__) -#define LAYOUT_ergotravel_grid_wrapper(...) LAYOUT(__VA_ARGS__) - -/* Qwerty Layer */ -#define QWERTY_L1 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T -#define QWERTY_L2 NAVI, KC_A, KC_S, KC_D, KC_F, KC_G -#define QWERTY_L3 KC_LSFT, WIN_Z, KC_X, KC_C, KC_V, KC_B -#define QWERTY_L4 KC_LCTL, KC_LGUI, NUMPAD, KC_LALT, LOWER, KC_SPC - -#define QWERTY_R1 KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC -#define QWERTY_R2 KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT -#define QWERTY_R3 KC_N, KC_M, KC_COMM, KC_DOT, CTL_SLH, KC_RSFT -#define QWERTY_R4 KC_ENT, RAISE, KC_RALT, MO(_MS), KC_APP, KC_RCTL - -#define QWERTY_4_DOX KC_LCTL, LOWER, KC_SPC, KC_ENT, RAISE, KC_RALT - -/* Game Layer */ -#define GAME_L1 _______, _______, _______, _______, _______, _______ -#define GAME_L2 _______, _______, _______, _______, _______, _______ -#define GAME_L3 _______, _______, _______, _______, _______, _______ -#define GAME_L4 _______, _______, KC_LALT, LOWER, KC_SPC, KC_SPC - -#define GAME_R1 _______, _______, _______, _______, _______, _______ -#define GAME_R2 _______, _______, _______, _______, _______, _______ -#define GAME_R3 _______, _______, _______, _______, _______, _______ -#define GAME_R4 _______, _______, _______, _______, _______, _______ - -/* Lower / Upper Layer */ -#define LOWER_L1 KC_ESC , KC_1, KC_2, KC_3, KC_4, KC_5 -#define LOWER_L2 _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5 -#define LOWER_L3 _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10 -#define LOWER_L4 _______, _______, _______, _______, _______, _______ - -#define LOWER_R1 KC_6, KC_7, KC_8, KC_9, KC_0, _______ -#define LOWER_R2 KC_F11, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS -#define LOWER_R3 KC_F12, KC_GRV, _______, _______, _______, _______ -#define LOWER_R4 _______, _______, _______, _______, _______, _______ - -#define LOWER_4_DOX _______, _______, _______, _______, _______, _______ - -/* Navigation Layer */ -#define NAV_L1 _______, _______, _______, KC_LGUI, KC_DEL, KC_BSPC -#define NAV_L2 _______, _______, _______, KC_LSFT, KC_LCTL, KC_ENT -#define NAV_L3 _______, _______, _______, _______, _______, _______ -#define NAV_L4 _______, _______, _______, CTL_TAB, ALT_TAB, _______ - -#define NAV_R1 _______, KC_HOME, KC_UP , KC_END , KC_INS, _______ -#define NAV_R2 _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_DEL, _______ -#define NAV_R3 _______, KC_PGUP, KC_PGDN, _______, _______, _______ -#define NAV_R4 _______, KC_APP, _______, _______, _______, _______ - -#define NAV_4_DOX CTL_TAB, ALT_TAB, _______, _______, KC_APP, _______ - -/* Numpad Layer */ -#define NUMPAD_L1 RGB_TOG, RGB_MOD,RGB_RMOD, _______, RGB_HUD, RGB_HUI -#define NUMPAD_L2 BL_TOGG, BL_STEP, BL_BRTG, _______, RGB_SAD, RGB_SAI -#define NUMPAD_L3 _______, _______, _______, _______, RGB_VAD, RGB_VAI -#define NUMPAD_L4 _______, _______, _______, _______, RGB_SPD, RGB_SPI - -#define NUMPAD_R1 DF(_QW),DF(_GAME), _______, _______, _______, RESET -#define NUMPAD_R2 _______, _______, _______, _______, _______, _______ -#define NUMPAD_R3 VRSN, _______, _______, _______, _______, _______ -#define NUMPAD_R4 _______, _______, _______, _______, _______, _______ - -#define NUMPAD_4_DOX _______, _______, _______, _______, _______, _______ - -/* Mouse Layer */ -#define MOUSE_L1 _______, _______, _______, _______, _______, _______ -#define MOUSE_L2 _______, _______, KC_ACL1, KC_ACL0, KC_BTN1, KC_BTN2 -#define MOUSE_L3 _______, _______, _______, _______, _______, _______ -#define MOUSE_L4 _______, _______, _______, _______, _______, KC_BTN1 - -#define MOUSE_R1 _______, KC_WH_U, KC_MS_U, KC_WH_D, _______, _______ -#define MOUSE_R2 _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______ -#define MOUSE_R3 _______, _______, _______, _______, _______, _______ -#define MOUSE_R4 KC_BTN2, _______, _______, _______, _______, _______ - -#define MOUSE_4_DOX _______, _______, _______, _______, _______, _______ - -#define BLANK_12 KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO - -#define QWERTY_1_12 QWERTY_L1, QWERTY_R1 -#define QWERTY_2_12 QWERTY_L2, QWERTY_R2 -#define QWERTY_3_12 QWERTY_L3, QWERTY_R3 -#define QWERTY_4_12 QWERTY_L4, QWERTY_R4 - -#define GAME_1_12 GAME_L1, GAME_R1 -#define GAME_2_12 GAME_L2, GAME_R2 -#define GAME_3_12 GAME_L3, GAME_R3 -#define GAME_4_12 GAME_L4, GAME_R4 - -#define LOWER_1_12 LOWER_L1, LOWER_R1 -#define LOWER_2_12 LOWER_L2, LOWER_R2 -#define LOWER_3_12 LOWER_L3, LOWER_R3 -#define LOWER_4_12 LOWER_L4, LOWER_R4 - -#define NAV_1_12 NAV_L1, NAV_R1 -#define NAV_2_12 NAV_L2, NAV_R2 -#define NAV_3_12 NAV_L3, NAV_R3 -#define NAV_4_12 NAV_L4, NAV_R4 - -#define NUMPAD_1_12 NUMPAD_L1, NUMPAD_R1 -#define NUMPAD_2_12 NUMPAD_L2, NUMPAD_R2 -#define NUMPAD_3_12 NUMPAD_L3, NUMPAD_R3 -#define NUMPAD_4_12 NUMPAD_L4, NUMPAD_R4 - -#define MOUSE_1_12 MOUSE_L1, MOUSE_R1 -#define MOUSE_2_12 MOUSE_L2, MOUSE_R2 -#define MOUSE_3_12 MOUSE_L3, MOUSE_R3 -#define MOUSE_4_12 MOUSE_L4, MOUSE_R4 - -#define QWERTY_4x12 QWERTY_1_12, QWERTY_2_12, QWERTY_3_12, QWERTY_4_12 -#define GAME_4x12 GAME_1_12, GAME_2_12, GAME_3_12, GAME_4_12 -#define LOWER_4x12 LOWER_1_12, LOWER_2_12, LOWER_3_12, LOWER_4_12 -#define NAV_4x12 NAV_1_12, NAV_2_12, NAV_3_12, NAV_4_12 -#define NUMPAD_4x12 NUMPAD_1_12, NUMPAD_2_12, NUMPAD_3_12, NUMPAD_4_12 -#define MOUSE_4x12 MOUSE_1_12, MOUSE_2_12, MOUSE_3_12, MOUSE_4_12 - -#endif diff --git a/users/jarred/readme.md b/users/jarred/readme.md deleted file mode 100644 index 9f19dad1..00000000 --- a/users/jarred/readme.md +++ /dev/null @@ -1,17 +0,0 @@ -# Jarred's user space - -Keymaps: - -- [Ortho 4x12](../../layouts/community/ortho_4x12/jarred/readme.md) - -- [Planck](../../keyboards/planck/keymaps/jarred/readme.md) -- [CRKBD](../../keyboards/crkbd/keymaps/jarred/readme.md) -- [Atreus 62](../../keyboards/ergotravel/keymaps/jarred/readme.md) -- [ErgoTravel](../../keyboards/ergotravel/keymaps/jarred/readme.md) -- [xd75](../../keyboards/xd75/keymaps/jarred/readme.md) - -- [satan](../../keyboards/satan/keymaps/jarred/readme.md) -- [dz60](../../keyboards/dz60/keymaps/jarred/readme.md) -- [org60](../../keyboards/org60/keymaps/jarred/readme.md) -- [Leaf60](../../keyboards/foxlab/leaf60/universal/keymaps/jarred/readme.md) -- [Tada68](../../keyboards/tada68/keymaps/jarred/readme.md) diff --git a/users/jarred/rules.mk b/users/jarred/rules.mk deleted file mode 100644 index 9a00cbf7..00000000 --- a/users/jarred/rules.mk +++ /dev/null @@ -1,16 +0,0 @@ -SRC += jarred.c - -ifneq (,$(findstring planck,$(KEYBOARD))) - # Enable backlight for rev4 planck only - ifneq (,$(findstring rev4,$(KEYBOARD))) - BACKLIGHT_ENABLE = yes - BACKLIGHT_BREATHING = yes - else - BACKLIGHT_ENABLE = no - BACKLIGHT_BREATHING = no - endif - - AUDIO_ENABLE = yes -endif - -MOUSEKEY_ENABLE = no diff --git a/users/kageurufu/config.h b/users/kageurufu/config.h deleted file mode 100644 index 938d43dd..00000000 --- a/users/kageurufu/config.h +++ /dev/null @@ -1,4 +0,0 @@ -#pragma once - -#define NO_ACTION_MACRO -#define NO_ACTION_FUNCTION diff --git a/users/kageurufu/custom_rgb.c b/users/kageurufu/custom_rgb.c deleted file mode 100644 index 8e99129b..00000000 --- a/users/kageurufu/custom_rgb.c +++ /dev/null @@ -1,18 +0,0 @@ -#include "custom_rgb.h" - -#if defined(RGBLIGHT_ENABLE) - extern rgblight_config_t rgblight_config; - rgblight_config_t _pushed_rgblight_config; - #define push_rgb_config() { if (_pushed_rgblight_config.raw == 0) { _pushed_rgblight_config.raw = rgblight_config.raw; } } - #define pop_rgb_config() { if (_pushed_rgblight_config.raw == 0) { rgblight_config.raw = _pushed_rgblight_config.raw; _pushed_rgblight_config.raw = 0; } } -#elif defined(RGB_MATRIX_ENABLE) - extern rgb_config_t rgb_matrix_config; - rgb_config_t _pushed_rgb_matrix_config; - #define push_rgb_config() _pushed_rgb_matrix_config.raw = rgb_matrix_config.raw - #define pop_rgb_config() rgb_matrix_config.raw = _pushed_rgb_matrix_config.raw -#endif - - -bool process_record_rgb(uint16_t keycode, keyrecord_t *record) { - return true; -} diff --git a/users/kageurufu/custom_rgb.h b/users/kageurufu/custom_rgb.h deleted file mode 100644 index 62d64fd4..00000000 --- a/users/kageurufu/custom_rgb.h +++ /dev/null @@ -1,3 +0,0 @@ -#pragma once - -#include "kageurufu.h" diff --git a/users/kageurufu/kageurufu.c b/users/kageurufu/kageurufu.c deleted file mode 100644 index e16af571..00000000 --- a/users/kageurufu/kageurufu.c +++ /dev/null @@ -1,12 +0,0 @@ -#include "kageurufu.h" -#include "quantum.h" -#include "process_records.h" - -#ifdef RGBLIGHT_ENABLE - //Following line allows macro to read current RGB settings - extern rgblight_config_t rgblight_config; - rgblight_config_t backup_rgblight_config; - - __attribute__((weak)) - uint8_t RGBLIGHT_MODS[] = {0}; -#endif diff --git a/users/kageurufu/kageurufu.h b/users/kageurufu/kageurufu.h deleted file mode 100644 index 76a0126f..00000000 --- a/users/kageurufu/kageurufu.h +++ /dev/null @@ -1,5 +0,0 @@ -#pragma once - -#include "quantum.h" -#include "process_records.h" -#include "layouts.h" diff --git a/users/kageurufu/layouts.h b/users/kageurufu/layouts.h deleted file mode 100644 index eccfa070..00000000 --- a/users/kageurufu/layouts.h +++ /dev/null @@ -1,58 +0,0 @@ -#pragma once - - -#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 _________________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_SLASH - - -#define _________________COLEMAK_L1________________ KC_Q, KC_W, KC_F, KC_P, KC_G -#define _________________COLEMAK_L2________________ KC_A, KC_R, KC_S, KC_T, KC_D -#define _________________COLEMAK_L3________________ KC_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, KC_O -#define _________________COLEMAK_R3________________ KC_K, KC_M, KC_COMM, KC_DOT, KC_SLASH - - -#define ______________COLEMAK_MOD_DH_L1____________ KC_Q, KC_W, KC_F, KC_P, KC_B -#define ______________COLEMAK_MOD_DH_L2____________ KC_A, KC_R, KC_S, KC_T, KC_G -#define ______________COLEMAK_MOD_DH_L3____________ KC_Z, KC_X, KC_C, KC_D, KC_V - -#define ______________COLEMAK_MOD_DH_R1____________ KC_J, KC_L, KC_U, KC_Y, KC_SCLN -#define ______________COLEMAK_MOD_DH_R2____________ KC_M, KC_N, KC_E, KC_I, KC_O -#define ______________COLEMAK_MOD_DH_R3____________ KC_K, KC_H, KC_COMM, KC_DOT, KC_SLASH - - -#define ________________FUNCTION_L1________________ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6 -#define ________________FUNCTION_L2________________ _______, KC_PGDN, KC_UP, KC_PGUP, _______, KC_LBRC -#define ________________FUNCTION_L3________________ ADJ, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______ -#define ________________FUNCTION_L4________________ _______, _______, _______, _______, _______, _______ -#define ________________FUNCTION_L5________________ _______, _______, _______, _______, ADJ, _______ - -#define ________________FUNCTION_R1________________ KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12 -#define ________________FUNCTION_R2________________ KC_RBRC, KC_7, KC_UP, KC_9, KC_0, KC_HOME -#define ________________FUNCTION_R3________________ _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_RBRC, KC_END -#define ________________FUNCTION_R4________________ _______, _______, _______, KC_PGDN, KC_PGUP, _______ -#define ________________FUNCTION_R5________________ ADJ, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU - - -#define _________________ADJUST_L1_________________ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6 -#define _________________ADJUST_L2_________________ _______, RGB_SAD, RGB_VAI, RGB_SAI, RESET, _______ -#define _________________ADJUST_L3_________________ _______, RGB_HUD, RGB_VAD, RGB_HUI, RGBRST, _______ -#define _________________ADJUST_L4_________________ _______, _______, _______, _______, _______, _______ -#define _________________ADJUST_L5_________________ _______, _______, _______, _______, _______, _______ - -#define _________________ADJUST_R1_________________ KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12 -#define _________________ADJUST_R2_________________ _______, _______, _______, _______, _______, KC_DEL -#define _________________ADJUST_R3_________________ _______, QWERTY, COLEMAK, CMAK_DH, _______, _______ -#define _________________ADJUST_R4_________________ _______, _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI -#define _________________ADJUST_R5_________________ _______, _______, RGB_RMOD,RGB_HUD, RGB_SAD, RGB_VAD diff --git a/users/kageurufu/process_records.c b/users/kageurufu/process_records.c deleted file mode 100644 index 63dbcff8..00000000 --- a/users/kageurufu/process_records.c +++ /dev/null @@ -1,44 +0,0 @@ -#include "kageurufu.h" - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case QWERTY: - if (record->event.pressed) { - set_single_persistent_default_layer(_QWERTY); - } - return false; - break; - case COLEMAK: - if(record->event.pressed) { - set_single_persistent_default_layer(_COLEMAK); - } - return false; - break; - case RGBRST: - #ifdef RGBLIGHT_ENABLE - if (record->event.pressed) { - eeconfig_update_rgblight_default(); - rgblight_enable(); - } - #endif - break; - } - - - return process_record_keymap(keycode, record) && -#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) - process_record_rgb(keycode, record) && -#endif // RGBLIGHT_ENABLE; - true; -} - -__attribute__ ((weak)) -bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { - return true; -} - - -__attribute__ ((weak)) -bool process_record_rgb(uint16_t keycode, keyrecord_t *record) { - return true; -} diff --git a/users/kageurufu/process_records.h b/users/kageurufu/process_records.h deleted file mode 100644 index d1c50a41..00000000 --- a/users/kageurufu/process_records.h +++ /dev/null @@ -1,27 +0,0 @@ -#pragma once -#include "kageurufu.h" - -#define FN_ESC LT(_FN, KC_ESC) -#define FN MO(_FN) -#define ADJ MO(_ADJ) - -enum layer_number { - _QWERTY = 0, - _COLEMAK, - _COLEMAK_DH, - _FN, - _ADJ, - ADDITIONAL_LAYER -}; - -enum custom_keycodes { - QWERTY = SAFE_RANGE, - COLEMAK, - CMAK_DH, - RGBRST, - KAGEURUFU_SAFE_RANGE -}; - - -bool process_record_keymap(uint16_t keycode, keyrecord_t *record); -bool process_record_rgb(uint16_t keycode, keyrecord_t *record); diff --git a/users/kageurufu/readme.md b/users/kageurufu/readme.md deleted file mode 100644 index 57dd85d6..00000000 --- a/users/kageurufu/readme.md +++ /dev/null @@ -1,14 +0,0 @@ -Copyright 2018- Franklyn Tackitt franklyn@tackitt.net @kageurufu - -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 . diff --git a/users/kageurufu/rules.mk b/users/kageurufu/rules.mk deleted file mode 100644 index df9ae559..00000000 --- a/users/kageurufu/rules.mk +++ /dev/null @@ -1,15 +0,0 @@ -SRC += kageurufu.c \ - process_records.c \ - custom_rgb.c - -# Link time optimization, should save on firmware size -EXTRAFLAGS += -flto - - -# Some usual defaults -MOUSEKEY_ENABLE = no -EXTRAKEY_ENABLE = yes -COMMAND_ENABLE = yes -CONSOLE_ENABLE = yes -RGBLIGHT_ENABLE = no -RGBLIGHT_ANIMATIONS = yes diff --git a/users/konstantin/config.h b/users/konstantin/config.h deleted file mode 100644 index bc1987c3..00000000 --- a/users/konstantin/config.h +++ /dev/null @@ -1,30 +0,0 @@ -#pragma once - -#define FORCE_NKRO - -#define MOUSEKEY_DELAY 50 -#define MOUSEKEY_INTERVAL 15 -#define MOUSEKEY_MAX_SPEED 4 -#define MOUSEKEY_TIME_TO_MAX 50 -#define MOUSEKEY_WHEEL_MAX_SPEED 1 -#define MOUSEKEY_WHEEL_TIME_TO_MAX 50 - -#define NO_ACTION_FUNCTION -#define NO_ACTION_MACRO -#define NO_ACTION_ONESHOT - -#undef RGBLIGHT_ANIMATIONS -#define RGBLIGHT_EFFECT_BREATHING -#define RGBLIGHT_EFFECT_RAINBOW_MOOD -#define RGBLIGHT_EFFECT_RAINBOW_SWIRL -#define RGBLIGHT_EFFECT_SNAKE - -#define PERMISSIVE_HOLD -#define TAPPING_TERM 200 -#define TAPPING_TOGGLE 2 - -#define UNICODE_CYCLE_PERSIST false -#define UNICODE_SELECTED_MODES UC_WINC, UC_WIN, UC_LNX -#define UNICODE_KEY_WINC KC_RGUI - -#define USB_POLLING_INTERVAL_MS 1 diff --git a/users/konstantin/konstantin.c b/users/konstantin/konstantin.c deleted file mode 100644 index 9cee25ac..00000000 --- a/users/konstantin/konstantin.c +++ /dev/null @@ -1,119 +0,0 @@ -#include "konstantin.h" - -__attribute__((weak)) -void keyboard_pre_init_keymap(void) {} - -void keyboard_pre_init_user(void) { - keyboard_pre_init_keymap(); -} - -__attribute__((weak)) -void eeconfig_init_keymap(void) {} - -void eeconfig_init_user(void) { - eeconfig_init_keymap(); -} - -__attribute__((weak)) -void keyboard_post_init_keymap(void) {} - -void keyboard_post_init_user(void) { - keyboard_post_init_keymap(); -} - -__attribute__((weak)) -bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { - return true; -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - if (!process_record_keymap(keycode, record)) { - return false; - } - - switch (keycode) { - uint16_t kc; -#ifdef LAYER_FN - static bool fn_lock = false; - - case FNLK: - if (record->event.pressed) { - fn_lock = !IS_LAYER_ON(L_FN); // Fn layer will be toggled after this - } - break; - - case FN_FNLK: - if (record->event.pressed && record->tap.count == TAPPING_TOGGLE) { - fn_lock = !IS_LAYER_ON(L_FN); - } - break; -#endif - - case KC_ESC: - if (record->event.pressed) { -#ifdef LAYER_NUMPAD // Disable Numpad layer before Fn layer - if (IS_LAYER_ON(L_NUMPAD)) { - layer_off(L_NUMPAD); - return false; - } -#endif -#ifdef LAYER_FN - if (IS_LAYER_ON(L_FN) && fn_lock) { - layer_off(L_FN); - return fn_lock = false; - } -#endif - } - break; - - case CLEAR: - if (record->event.pressed) { - CLEAN_MODS( - SEND_STRING(SS_LCTRL("a") SS_TAP(X_DELETE)); - ) - } - break; - - case DST_P_R: - kc = (get_mods() & DST_MOD_MASK) ? DST_REM : DST_PRV; - CLEAN_MODS( - (record->event.pressed ? register_code16 : unregister_code16)(kc); - ) - break; - - case DST_N_A: - kc = (get_mods() & DST_MOD_MASK) ? DST_ADD : DST_NXT; - CLEAN_MODS( - (record->event.pressed ? register_code16 : unregister_code16)(kc); - ) - break; - } - - return true; -} - -__attribute__((weak)) -uint32_t layer_state_set_keymap(uint32_t state) { - return state; -} - -uint32_t layer_state_set_user(uint32_t state) { - state = layer_state_set_keymap(state); - -#ifdef LAYER_NUMPAD - bool numpad = IS_LAYER_ON_STATE(state, L_NUMPAD); - bool num_lock = IS_HOST_LED_ON(USB_LED_NUM_LOCK); - if (numpad != num_lock) { - tap_code(KC_NLCK); // Toggle Num Lock to match Numpad layer state - } -#endif - - return state; -} - -__attribute__((weak)) -void led_set_keymap(uint8_t usb_led) {} - -void led_set_user(uint8_t usb_led) { - led_set_keymap(usb_led); -} diff --git a/users/konstantin/konstantin.h b/users/konstantin/konstantin.h deleted file mode 100644 index da210583..00000000 --- a/users/konstantin/konstantin.h +++ /dev/null @@ -1,88 +0,0 @@ -#pragma once - -#include "quantum.h" -#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) - #include "rgb.h" -#endif -#ifdef TAP_DANCE_ENABLE - #include "tap_dance.h" -#endif -#if defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) - #include "unicode.h" -#endif - -#ifdef LAYER_FN - #define FN MO(L_FN) - #define FNLK TG(L_FN) - #define FN_CAPS LT(L_FN, KC_CAPS) - #define FN_ESC LT(L_FN, KC_ESC) - #define FN_FNLK TT(L_FN) -#endif - -#ifdef LAYER_NUMPAD - #define NUMPAD TG(L_NUMPAD) -#endif - -#define BREAK LCTL(KC_PAUS) -#define SYSRQ LALT(KC_PSCR) - -#define MV_UP LCTL(KC_UP) -#define MV_DOWN LCTL(KC_DOWN) -#define MV_LEFT LCTL(KC_LEFT) -#define MV_RGHT LCTL(KC_RGHT) -#define TOP LCTL(KC_HOME) -#define BOTTOM LCTL(KC_END) -#define TAB_PRV LCTL(KC_PGUP) -#define TAB_NXT LCTL(KC_PGDN) -#define DEL_PRV LCTL(KC_BSPC) -#define DEL_NXT LCTL(KC_DEL) - -#define DST_ADD LCTL(LGUI(KC_D)) -#define DST_REM LCTL(LGUI(KC_F4)) -#define DST_PRV LCTL(LGUI(KC_LEFT)) -#define DST_NXT LCTL(LGUI(KC_RGHT)) -#ifndef DST_MOD_MASK - #define DST_MOD_MASK MOD_MASK_SHIFT -#endif - -#define LCT_CPS LCTL_T(KC_CAPS) -#define RSF_SLS RSFT_T(KC_SLSH) - -#define IS_LAYER_ON_STATE(state, layer) ( (state) & (1UL << (layer))) -#define IS_LAYER_OFF_STATE(state, layer) (~(state) & (1UL << (layer))) - -// Clear mods, perform action, restore mods -#define CLEAN_MODS(action) { \ - uint8_t mods = get_mods(); \ - clear_mods(); \ - action; \ - set_mods(mods); \ - } - -enum keycodes_user { - CLEAR = SAFE_RANGE, - DST_P_R, - DST_N_A, - - RANGE_KEYMAP, -}; - -enum layers_user { - L_BASE, -#ifdef LAYER_FN - L_FN, -#endif -#ifdef LAYER_NUMPAD - L_NUMPAD, -#endif - - L_RANGE_KEYMAP, -}; - -void keyboard_pre_init_keymap(void); -void eeconfig_init_keymap(void); -void keyboard_post_init_keymap(void); - -bool process_record_keymap(uint16_t keycode, keyrecord_t *record); -uint32_t layer_state_set_keymap(uint32_t state); -void led_set_keymap(uint8_t usb_led); diff --git a/users/konstantin/rgb.c b/users/konstantin/rgb.c deleted file mode 100644 index fffa250f..00000000 --- a/users/konstantin/rgb.c +++ /dev/null @@ -1,26 +0,0 @@ -#include "rgb.h" - -#ifdef RGBLIGHT_EFFECT_BREATHING -const uint8_t PROGMEM RGBLED_BREATHING_INTERVALS[] = { 20, 30, 5, 10 }; -#endif - -#ifdef RGBLIGHT_EFFECT_RAINBOW_MOOD -const uint8_t PROGMEM RGBLED_RAINBOW_MOOD_INTERVALS[] = { 20, 50, 100 }; -#endif - -#ifdef RGBLIGHT_EFFECT_RAINBOW_SWIRL -const uint8_t PROGMEM RGBLED_RAINBOW_SWIRL_INTERVALS[] = { 20, 50, 100 }; -#endif - -#ifdef RGBLIGHT_EFFECT_SNAKE -const uint8_t PROGMEM RGBLED_SNAKE_INTERVALS[] = { 20, 50, 100 }; -#endif - -#ifdef RGBLIGHT_EFFECT_KNIGHT -const uint8_t PROGMEM RGBLED_KNIGHT_INTERVALS[] = { 20, 50, 100 }; -#endif - -const HSV godspeed_blue = { GODSPEED_BLUE }; -const HSV godspeed_yellow = { GODSPEED_YELLOW }; -const HSV modern_dolch_cyan = { MODERN_DOLCH_CYAN }; -const HSV modern_dolch_red = { MODERN_DOLCH_RED }; diff --git a/users/konstantin/rgb.h b/users/konstantin/rgb.h deleted file mode 100644 index cc7d9180..00000000 --- a/users/konstantin/rgb.h +++ /dev/null @@ -1,13 +0,0 @@ -#pragma once - -#include "quantum.h" - -#define GODSPEED_BLUE 198, 68, 255 -#define GODSPEED_YELLOW 27, 153, 255 -#define MODERN_DOLCH_CYAN 110, 255, 108 -#define MODERN_DOLCH_RED 251, 255, 108 - -extern const HSV godspeed_blue; -extern const HSV godspeed_yellow; -extern const HSV modern_dolch_cyan; -extern const HSV modern_dolch_red; diff --git a/users/konstantin/rules.mk b/users/konstantin/rules.mk deleted file mode 100644 index bf0ab979..00000000 --- a/users/konstantin/rules.mk +++ /dev/null @@ -1,16 +0,0 @@ -SRC += konstantin.c -ifeq ($(strip $(RGBLIGHT_ENABLE)), yes) - SRC += rgb.c -endif -RGB_MATRIX_ENABLE ?= no -ifneq ($(strip $(RGB_MATRIX_ENABLE)), no) - SRC += rgb.c -endif -ifeq ($(strip $(TAP_DANCE_ENABLE)), yes) - SRC += tap_dance.c -endif -ifneq (,$(filter yes,$(UNICODE_ENABLE) $(UNICODEMAP_ENABLE))) - SRC += unicode.c -endif - -EXTRAFLAGS += -flto diff --git a/users/konstantin/tap_dance.c b/users/konstantin/tap_dance.c deleted file mode 100644 index 4ec8caa6..00000000 --- a/users/konstantin/tap_dance.c +++ /dev/null @@ -1,119 +0,0 @@ -#include "tap_dance.h" -#include "konstantin.h" - -#define ACTION_TAP_DANCE_DOUBLE_MOD(mod1, mod2) { \ - .fn = { td_double_mod_each, NULL, td_double_mod_reset }, \ - .user_data = &(qk_tap_dance_pair_t){ mod1, mod2 }, \ - } - -void td_double_mod_each(qk_tap_dance_state_t *state, void *user_data) { - qk_tap_dance_pair_t *data = (qk_tap_dance_pair_t *)user_data; - - // Single tap → mod1, double tap → mod2, triple tap etc. → mod1+mod2 - if (state->count == 1 || state->count == 3) { - register_code(data->kc1); - } else if (state->count == 2) { - unregister_code(data->kc1); - register_code(data->kc2); - } - // Prevent tap dance from sending the mods as weak mods - state->weak_mods &= ~(MOD_BIT(data->kc1) | MOD_BIT(data->kc2)); -} - -void td_double_mod_reset(qk_tap_dance_state_t *state, void *user_data) { - qk_tap_dance_pair_t *data = (qk_tap_dance_pair_t *)user_data; - - if (state->count == 1 || state->count >= 3) { - unregister_code(data->kc1); - } - if (state->count >= 2) { - unregister_code(data->kc2); - } -} - -#define ACTION_TAP_DANCE_MOD_LAYER(mod, layer) { \ - .fn = { td_mod_layer_each, NULL, td_mod_layer_reset }, \ - .user_data = &(qk_tap_dance_dual_role_t){ mod, layer }, \ - } - -void td_mod_layer_each(qk_tap_dance_state_t *state, void *user_data) { - qk_tap_dance_dual_role_t *data = (qk_tap_dance_dual_role_t *)user_data; - - // Single tap → mod, double tap → layer, triple tap etc. → mod+layer - if (state->count == 1 || state->count == 3) { - register_code(data->kc); - } else if (state->count == 2) { - unregister_code(data->kc); - // Prevent tap dance from sending the mod as a weak mod - state->weak_mods &= ~MOD_BIT(data->kc); - layer_on(data->layer); - } -} - -void td_mod_layer_reset(qk_tap_dance_state_t *state, void *user_data) { - qk_tap_dance_dual_role_t *data = (qk_tap_dance_dual_role_t *)user_data; - - if (state->count == 1 || state->count >= 3) { - unregister_code(data->kc); - } - if (state->count >= 2) { - layer_off(data->layer); - } -} - -#define ACTION_TAP_DANCE_LAYER_MOD(layer, mod) { \ - .fn = { td_layer_mod_each, NULL, td_layer_mod_reset }, \ - .user_data = &(qk_tap_dance_layer_mod_t){ layer, mod, 0, 0 }, \ - } - -typedef struct { - uint8_t layer; - uint16_t kc; - bool layer_on; // Layer state when tap dance started - bool started; -} qk_tap_dance_layer_mod_t; - -void td_layer_mod_each(qk_tap_dance_state_t *state, void *user_data) { - qk_tap_dance_layer_mod_t *data = (qk_tap_dance_layer_mod_t *)user_data; - if (!data->started) { - data->layer_on = IS_LAYER_ON(data->layer); - data->started = true; - } - - // Single tap → layer, double tap → mod, triple tap etc. → layer+mod - if (state->count == 1 || state->count == 3) { - layer_on(data->layer); - } else if (state->count == 2) { - if (!data->layer_on) { - layer_off(data->layer); - } - register_code(data->kc); - } -} - -void td_layer_mod_reset(qk_tap_dance_state_t *state, void *user_data) { - qk_tap_dance_layer_mod_t *data = (qk_tap_dance_layer_mod_t *)user_data; - - if ((state->count == 1 || state->count >= 3) && !data->layer_on) { - layer_off(data->layer); - } - if (state->count >= 2) { - unregister_code(data->kc); - } - - data->started = false; -} - -qk_tap_dance_action_t tap_dance_actions[] = { - [TD_DST_A_R] = ACTION_TAP_DANCE_DOUBLE(DST_ADD, DST_REM), - - [TD_RAL_RGU] = ACTION_TAP_DANCE_DOUBLE_MOD(KC_RALT, KC_RGUI), - [TD_RCT_RSF] = ACTION_TAP_DANCE_DOUBLE_MOD(KC_RCTL, KC_RSFT), - [TD_RSF_RCT] = ACTION_TAP_DANCE_DOUBLE_MOD(KC_RSFT, KC_RCTL), - -#ifdef LAYER_FN - [TD_LSFT_FN] = ACTION_TAP_DANCE_MOD_LAYER(KC_LSFT, L_FN), - [TD_RCTL_FN] = ACTION_TAP_DANCE_MOD_LAYER(KC_RCTL, L_FN), - [TD_FN_RCTL] = ACTION_TAP_DANCE_LAYER_MOD(L_FN, KC_RCTL), -#endif -}; diff --git a/users/konstantin/tap_dance.h b/users/konstantin/tap_dance.h deleted file mode 100644 index 56889a19..00000000 --- a/users/konstantin/tap_dance.h +++ /dev/null @@ -1,29 +0,0 @@ -#pragma once - -#include "quantum.h" - -#define DST_A_R TD(TD_DST_A_R) - -#define RAL_RGU TD(TD_RAL_RGU) -#define RCT_RSF TD(TD_RCT_RSF) -#define RSF_RCT TD(TD_RSF_RCT) - -#ifdef LAYER_FN - #define LSFT_FN TD(TD_LSFT_FN) - #define RCTL_FN TD(TD_RCTL_FN) - #define FN_RCTL TD(TD_FN_RCTL) -#endif - -enum tap_dance { - TD_DST_A_R, - - TD_RAL_RGU, - TD_RCT_RSF, - TD_RSF_RCT, - -#ifdef LAYER_FN - TD_LSFT_FN, - TD_RCTL_FN, - TD_FN_RCTL, -#endif -}; diff --git a/users/konstantin/unicode.c b/users/konstantin/unicode.c deleted file mode 100644 index 8ef5aaa1..00000000 --- a/users/konstantin/unicode.c +++ /dev/null @@ -1,7 +0,0 @@ -#include "unicode.h" - -#ifdef UNICODEMAP_ENABLE -const uint32_t PROGMEM unicode_map[] = { - FOREACH_UNICODE(UCM_ENTRY) -}; -#endif diff --git a/users/konstantin/unicode.h b/users/konstantin/unicode.h deleted file mode 100644 index b2616d12..00000000 --- a/users/konstantin/unicode.h +++ /dev/null @@ -1,34 +0,0 @@ -#pragma once - -#include "quantum.h" - -#define FOREACH_UNICODE(M) \ - M(COMMA, 0x002C) \ - M(L_PAREN, 0x0028) \ - M(R_PAREN, 0x0029) \ - M(EQUALS, 0x003D) \ - M(TIMES, 0x00D7) \ - M(DIVIDE, 0x00F7) \ - M(MINUS, 0x2212) - -#define UC_KEYCODE(name, code) name = UC(code), - -#define UCM_NAME(name, code) UCM_ ## name, -#define UCM_ENTRY(name, code) [UCM_ ## name] = code, -#define UCM_KEYCODE(name, code) name = X(UCM_ ## name), - -#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 diff --git a/users/kuatsure/kuatsure.c b/users/kuatsure/kuatsure.c deleted file mode 100644 index f935e83c..00000000 --- a/users/kuatsure/kuatsure.c +++ /dev/null @@ -1,139 +0,0 @@ -#include "kuatsure.h" -#include "version.h" - -qk_tap_dance_action_t tap_dance_actions[] = { - [TD_LBRC] = ACTION_TAP_DANCE_DOUBLE(KC_LBRC, KC_LT), - [TD_RBRC] = ACTION_TAP_DANCE_DOUBLE(KC_RBRC, KC_GT) -}; - -__attribute__ ((weak)) -bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { - return true; -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case KB_MAKE: - if (!record->event.pressed) { - SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP SS_TAP(X_ENTER)); - } - return false; - break; - - case KB_VRSN: - if (!record->event.pressed) { - SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); - } - return false; - break; - - case KB_FLSH: - if (!record->event.pressed) { - SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP - #if (defined(BOOTLOADER_DFU) || defined(BOOTLOADER_LUFA_DFU) || defined(BOOTLOADER_QMK_DFU)) - ":dfu " - #elif defined(BOOTLOADER_HALFKAY) - ":teensy " - #elif defined(BOOTLOADER_CATERINA) - ":avrdude " - #endif - SS_TAP(X_ENTER) - ); - - reset_keyboard(); - } - return false; - break; - } - - return process_record_keymap(keycode, record); -} - -void tmux_prefix(void) { - tap_code16(LCTL(KC_SPC)); -} - -void tmux_pane_zoom(void) { - tmux_prefix(); - - SEND_STRING("z"); -} - -LEADER_EXTERNS(); -void matrix_scan_user(void) { - LEADER_DICTIONARY() { - leading = false; - leader_end(); - - // Available seqs - // SEQ_ONE_KEY, SEQ_TWO_KEYS, SEQ_THREE_KEYS - // anything you can do in a macro https://docs.qmk.fm/macros.html - // https://docs.qmk.fm/feature_leader_key.html - - // Stop music and lock computer via alfred - SEQ_ONE_KEY(KC_H) { - SEND_STRING(SS_LGUI(" ") SS_TAP(X_LGUI) "afk" SS_TAP(X_ENTER)); - } - - // Stop music and lock computer via alfred - SEQ_TWO_KEYS(KC_H, KC_H) { - SEND_STRING(SS_LGUI(" ") SS_TAP(X_LGUI) "afk" SS_TAP(X_ENTER) SS_TAP(X_MEDIA_PLAY_PAUSE)); - } - - // Whole Screen Shot - SEQ_ONE_KEY(KC_A) { - SEND_STRING(SS_LGUI(SS_LSFT("3"))); - } - - // Selective Screen Shot - SEQ_ONE_KEY(KC_S) { - SEND_STRING(SS_LGUI(SS_LSFT("4"))); - } - - // TMUX - shift to pane 1 and zoom - SEQ_ONE_KEY(KC_J) { - tmux_prefix(); - SEND_STRING("q1"); - tmux_pane_zoom(); - } - - // TMUX - shift to first window - SEQ_TWO_KEYS(KC_J, KC_J) { - tmux_prefix(); - SEND_STRING("1"); - } - - // TMUX - shift to pane 2 and zoom - SEQ_ONE_KEY(KC_K) { - tmux_prefix(); - SEND_STRING("q2"); - tmux_pane_zoom(); - } - - // TMUX - shift to second window - SEQ_TWO_KEYS(KC_K, KC_K) { - tmux_prefix(); - SEND_STRING("2"); - } - - // TMUX - shift to pane 3 and zoom - SEQ_ONE_KEY(KC_L) { - tmux_prefix(); - SEND_STRING("q3"); - tmux_pane_zoom(); - } - - // TMUX - shift to third window - SEQ_TWO_KEYS(KC_L, KC_L) { - tmux_prefix(); - SEND_STRING("3"); - } - - // TMUX - shift to last pane and zoom - SEQ_ONE_KEY(KC_SCOLON) { - tmux_prefix(); - SEND_STRING(";"); - tmux_pane_zoom(); - } - } -} diff --git a/users/kuatsure/kuatsure.h b/users/kuatsure/kuatsure.h deleted file mode 100644 index 8961d562..00000000 --- a/users/kuatsure/kuatsure.h +++ /dev/null @@ -1,61 +0,0 @@ -#ifndef KUATSURE -#define KUATSURE - -#include "quantum.h" - -enum kuatsure_keycodes { - KB_MAKE = SAFE_RANGE, - KB_FLSH, - KB_VRSN, - - USER_SAFE_RANGE, -}; - -enum { - TD_LBRC = 0, - TD_RBRC, -}; - -#define KT_LBRC TD(TD_LBRC) -#define KT_RBRC TD(TD_RBRC) - -#define TAPPING_TERM 200 - -#define LEADER_TIMEOUT 250 -#define LEADER_PER_KEY_TIMING - -void tmux_prefix(void); -void tmux_pane_zoom(void); - -#define KT_CESC CTL_T(KC_ESC) -#define KT_MTAB MEH_T(KC_TAB) - -#undef LEADER_TIMEOUT -#define LEADER_TIMEOUT 300 - -#define LAYOUT_preonic_grid_wrapper(...) LAYOUT_preonic_grid(__VA_ARGS__) - -#define _________________NUMBER_L1_________________ KC_1, KC_2, KC_3, KC_4, KC_5 -#define _________________NUMBER_R1_________________ KC_6, KC_7, KC_8, KC_9, KC_0 - -#define _________________SYMBOL_L1_________________ KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC -#define _________________SYMBOL_R1_________________ KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN - -#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_SLASH - -#define ____________FUNCTION_1____________ KC_F1, KC_F2, KC_F3, KC_F4 -#define ____________FUNCTION_2____________ KC_F5, KC_F6, KC_F7, KC_F8 -#define ____________FUNCTION_3____________ KC_F9, KC_F10, KC_F11, KC_F12 - -#define ___SQBRACKETS___ KT_LBRC, KT_RBRC -#define _____PARENS_____ KC_LPRN, KC_RPRN -#define ____CRBRACES____ KC_LCBR, KC_RCBR -#define ___ANBRACKETS___ KC_LT, KC_GT - -#endif diff --git a/users/kuatsure/readme.md b/users/kuatsure/readme.md deleted file mode 100644 index b6d10224..00000000 --- a/users/kuatsure/readme.md +++ /dev/null @@ -1,14 +0,0 @@ -Copyright 2018 Jarrett Drouillard jarrett@thestyl.us @kuatsure - -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 . diff --git a/users/kuatsure/rules.mk b/users/kuatsure/rules.mk deleted file mode 100644 index ed7e9290..00000000 --- a/users/kuatsure/rules.mk +++ /dev/null @@ -1,4 +0,0 @@ -CONSOLE_ENABLE = no -TAP_DANCE_ENABLE = yes - -SRC += kuatsure.c diff --git a/users/kuchosauronad0/.gitignore b/users/kuchosauronad0/.gitignore deleted file mode 100644 index 6878d13e..00000000 --- a/users/kuchosauronad0/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -secrets.c -secrets.h -kuchosauronad0_song_list.h diff --git a/users/kuchosauronad0/combo.c b/users/kuchosauronad0/combo.c deleted file mode 100644 index b4e8e84a..00000000 --- a/users/kuchosauronad0/combo.c +++ /dev/null @@ -1,27 +0,0 @@ -#include "combo.h" - -void process_combo_event(uint8_t combo_index, bool pressed){ - switch(combo_index) { - case ZV_COPY: - if (pressed) { - tap_code16(LCTL(KC_C)); - } - break; - case XV_CUT: - if (pressed) { - tap_code16(LCTL(KC_X)); - } - break; - - case CV_PASTE: - if (pressed) { - tap_code16(LCTL(KC_V)); - } - break; - case QP_SLEEP: - if (pressed) { - tap_code16(KC_SYSTEM_SLEEP); - } - break; - } -} diff --git a/users/kuchosauronad0/combo.h b/users/kuchosauronad0/combo.h deleted file mode 100644 index e2ff09ab..00000000 --- a/users/kuchosauronad0/combo.h +++ /dev/null @@ -1,21 +0,0 @@ -#pragma once -#include "quantum.h" -enum combo_events { - ZV_COPY, - XV_CUT, - CV_PASTE, - QP_SLEEP -}; - -const uint16_t PROGMEM copy_combo[] = {KC_Z, KC_V, COMBO_END}; -const uint16_t PROGMEM cut_combo[] = {KC_X, KC_V, COMBO_END}; -const uint16_t PROGMEM paste_combo[] = {KC_C, KC_V, COMBO_END}; -const uint16_t PROGMEM sleep_combo[] = {KC_Q, KC_P, COMBO_END}; - -combo_t key_combos[COMBO_COUNT] = { - [ZV_COPY] = COMBO_ACTION(copy_combo), - [XV_CUT] = COMBO_ACTION(cut_combo), - [CV_PASTE] = COMBO_ACTION(paste_combo), - [QP_SLEEP] = COMBO_ACTION(sleep_combo), -}; - diff --git a/users/kuchosauronad0/config.h b/users/kuchosauronad0/config.h deleted file mode 100644 index b06c9e2c..00000000 --- a/users/kuchosauronad0/config.h +++ /dev/null @@ -1,90 +0,0 @@ -#pragma once - -#ifdef AUDIO_ENABLE -# define DEFAULT_LAYER_SONGS \ - { SONG(QWERTY_SOUND), SONG(COLEMAK_SOUND), SONG(DVORAK_SOUND), SONG(PLOVER_SOUND) } -# define AUDIO_CLICKY -# define STARTUP_SONG SONG(RICK_ROLL) -# define GOODBYE_SONG SONG(SONIC_RING) -# define AUDIO_CLICKY_FREQ_RANDOMNESS 1.5f -# ifndef __arm__ -# undef NOTE_REST -# define NOTE_REST 1.00f -# endif // !__arm__ -# define UNICODE_SONG_OSX SONG(RICK_ROLL) -# define UNICODE_SONG_LNX SONG(RICK_ROLL) -# define UNICODE_SONG_WIN SONG(RICK_ROLL) -# define UNICODE_SONG_BSD SONG(RICK_ROLL) -# define UNICODE_SONG_WINC SONG(RICK_ROLL) -#endif // !AUDIO_ENABLE - -#ifdef RGBLIGHT_ENABLE -# define RGBLIGHT_SLEEP -# undef RGBLIGHT_ANIMATIONS -# define RGBLIGHT_HUE_STEP 16 -# define RGBLIGHT_SAT_STEP 16 -# define RGBLIGHT_VAL_STEP 16 -# define RGBLIGHT_LIMIT_VAL 255 -# define RGBLIGHT_EFFECT_BREATHING -# define RGBLIGHT_EFFECT_STATIC_GRADIENT -//# define RGBLIGHT_EFFECT_KNIGHT -//# define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2 -//# define RGBLIGHT_EFFECT_SNAKE -//# define RGBLIGHT_EFFECT_SNAKE_LENGTH 2 -#endif // !RGBLIGHT_ENABLE - -#ifndef ONESHOT_TAP_TOGGLE -# define ONESHOT_TAP_TOGGLE 2 -#endif // !ONESHOT_TAP_TOGGLE - -#ifndef ONESHOT_TIMEOUT -# define ONESHOT_TIMEOUT 3000 -#endif// !ONESHOT_TIMEOUT - -#ifndef QMK_KEYS_PER_SCAN -# define QMK_KEYS_PER_SCAN 4 -#endif // !QMK_KEYS_PER_SCAN - -#if defined(LEADER_ENABLE) -# define LEADER_PER_KEY_TIMING -# define LEADER_TIMEOUT 250 -#endif // !LEADER_ENABLE - -#if defined(COMBO_ENABLE) -# define COMBO_COUNT 4 -# define COMBO_TERM 150 -#endif // !COMBO_ENABLE - -#if defined(NKRO_ENABLE) -# define FORCE_NKRO -#endif // !NKRO_ENABLE - -// this makes it possible to do rolling combos (zx) with keys that -// convert to other keys on hold (z becomes ctrl when you hold it, -// and when this option isn't enabled, z rapidly followed by x -// actually sends Ctrl-x. That's bad.) -#define IGNORE_MOD_TAP_INTERRUPT -#undef PERMISSIVE_HOLD -//#define TAPPING_FORCE_HOLD -//#define RETRO_TAPPING - -#ifndef TAPPING_TOGGLE -# define TAPPING_TOGGLE 1 -#endif - -#ifdef TAPPING_TERM -# undef TAPPING_TERM -#endif // !TAPPING_TERM -#if defined(KEYBOARD_handwired_kuchosauronad0_planckenstein) -# define TAPPING_TERM 185 -#elif defined(KEYBOARD_c39) -# define TAPPING_TERM 200 -#else -# define TAPPING_TERM 180 -#endif - - -#define TAP_CODE_DELAY 5 - -#define MACRO_TIMER 5 - diff --git a/users/kuchosauronad0/encoder.c b/users/kuchosauronad0/encoder.c deleted file mode 100644 index 06b7b512..00000000 --- a/users/kuchosauronad0/encoder.c +++ /dev/null @@ -1,63 +0,0 @@ -#include "encoder.h" -void encoder_update_user(uint8_t index, bool clockwise) { - static uint16_t kc; - uint8_t temp_mod = get_mods(); - if (index == 0) { /* first encoder */ - if (clockwise) { - //if (temp_mod & MOD_BIT(KC_HYPR)){ // TODO: not how this works, only registers CTRL - if ((temp_mod & MOD_MASK_CTRL) && (temp_mod & MOD_MASK_SHIFT) && (temp_mod & MOD_MASK_ALT) && (temp_mod & MOD_MASK_GUI)) { // HYPER - kc = encoder_actions[0][8]; - } else if ( (temp_mod & MOD_MASK_SHIFT) && (temp_mod & MOD_MASK_ALT) ) { // ALT+SHIFT - kc = encoder_actions[0][7]; - } else if ( (temp_mod & MOD_MASK_SHIFT) && (temp_mod & MOD_MASK_CTRL) ) { // CTRL+SHIFT - kc = encoder_actions[0][6]; - } else if ( (temp_mod & MOD_MASK_CTRL) && (temp_mod & MOD_MASK_ALT) ) { // CTRL+ALT - kc = encoder_actions[0][5]; - } else if (temp_mod & MOD_MASK_GUI) { // GUI - kc = encoder_actions[0][4]; - } else if (temp_mod & MOD_MASK_SHIFT) { // SHIFT - kc = encoder_actions[0][3]; - } else if (temp_mod & MOD_MASK_ALT) { // ALT - kc = encoder_actions[0][2]; - } else if (temp_mod & MOD_MASK_CTRL) { // CTRL - kc = encoder_actions[0][1]; - } else { // None - kc = encoder_actions[0][0]; - } - } else { // Counter Clockwise - if ((temp_mod & MOD_MASK_CTRL) && (temp_mod & MOD_MASK_SHIFT) && (temp_mod & MOD_MASK_ALT) && (temp_mod & MOD_MASK_GUI)) { // HYPER - kc = encoder_actions[1][8]; - } else if ( (temp_mod & MOD_MASK_SHIFT) && (temp_mod & MOD_MASK_ALT) ) { // ALT+SHIFT - kc = encoder_actions[1][7]; - } else if ( (temp_mod & MOD_MASK_SHIFT) && (temp_mod & MOD_MASK_CTRL) ) { // CTRL+SHIFT - kc = encoder_actions[1][6]; - } else if ( (temp_mod & MOD_MASK_CTRL) && (temp_mod & MOD_MASK_ALT) ) { // CTRL+ALT - kc = encoder_actions[1][5]; - } else if (temp_mod & MOD_MASK_GUI) { // GUI - kc = encoder_actions[1][4]; - } else if (temp_mod & MOD_MASK_SHIFT) { // SHIFT - kc = encoder_actions[1][3]; - } else if (temp_mod & MOD_MASK_ALT) { // ALT - kc = encoder_actions[1][2]; - } else if (temp_mod & MOD_MASK_CTRL) { // CTRL - kc = encoder_actions[1][1]; - } else { // None - kc = encoder_actions[1][0]; - } - } - clear_mods(); - tap_code16(kc); - set_mods(temp_mod); - } else if (index == 1){ // second Encoder - if (clockwise) { - tap_code(KC_0); - } else{ - tap_code(KC_1); - } - } -} -const uint16_t PROGMEM encoder_actions[][9] = { \ -// None CTRL ALT SHIFT GUI CTRL+ALT CTRL+SHFT ALT+SHFT HYPER - { KC_PGDN, KC_DOWN, KC_AUDIO_VOL_UP, KC_END, KC_WWW_FORWARD, KC_AUDIO_MUTE, KC_RIGHT, LSFT(KC_TAB), KC_MEDIA_NEXT_TRACK}, \ - { KC_PGUP, KC_UP, KC_AUDIO_VOL_DOWN, KC_HOME, KC_WWW_BACK, KC_MEDIA_PLAY_PAUSE, KC_LEFT, KC_TAB, KC_MEDIA_PREV_TRACK} -}; diff --git a/users/kuchosauronad0/encoder.h b/users/kuchosauronad0/encoder.h deleted file mode 100644 index 2610c967..00000000 --- a/users/kuchosauronad0/encoder.h +++ /dev/null @@ -1,4 +0,0 @@ -#pragma once -#include "quantum.h" -const uint16_t PROGMEM encoder_actions[][9]; -void encoder_update_user(uint8_t index, bool clockwise); diff --git a/users/kuchosauronad0/kuchosauronad0.c b/users/kuchosauronad0/kuchosauronad0.c deleted file mode 100644 index 6c38d0f1..00000000 --- a/users/kuchosauronad0/kuchosauronad0.c +++ /dev/null @@ -1,197 +0,0 @@ -/* -Copyright 2019 Andre Poley - -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 "quantum.h" -#include "kuchosauronad0.h" - -userspace_config_t userspace_config; -#if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE)) -# define KUCHOSAURONAD0_UNICODE_MODE UC_WINC -#else -# define KUCHOSAURONAD0_UNICODE_MODE 2 // set to 2 for UC_WIN, set to 4 for UC_WINC -#endif - - -// Add reconfigurable functions here, for keymap customization -// This allows for a global, userspace functions, and continued -// customization of the keymap. Use _keymap instead of _user -// functions in the keymaps -__attribute__ ((weak)) -void matrix_init_keymap(void) {} - -// Call user matrix init, set default RGB colors and then -// call the keymap's init function -void matrix_init_user(void) { - userspace_config.raw = eeconfig_read_user(); - - #ifdef BOOTLOADER_CATERINA - DDRD &= ~(1<<5); - PORTD &= ~(1<<5); - - DDRB &= ~(1<<0); - PORTB &= ~(1<<0); - #endif - - #if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE)) - set_unicode_input_mode(KUCHOSAURONAD0_UNICODE_MODE); - get_unicode_input_mode(); - #endif //UNICODE_ENABLE - matrix_init_keymap(); -} - -__attribute__((weak)) -void keyboard_post_init_keymap(void){ } - -void keyboard_post_init_user(void){ -#ifdef RGBLIGHT_ENABLE - keyboard_post_init_rgb(); -#endif - keyboard_post_init_keymap(); -} - -__attribute__ ((weak)) -void shutdown_keymap(void) {} - -void shutdown_user (void) { - #ifdef RGBLIGHT_ENABLE - rgblight_enable_noeeprom(); - rgblight_mode_noeeprom(1); - rgblight_setrgb_teal(); - #endif // RGBLIGHT_ENABLE - #ifdef RGB_MATRIX_ENABLE - // uint16_t timer_start = timer_read(); - // rgb_matrix_set_color_all( 0xFF, 0x00, 0x00 ); - // while(timer_elapsed(timer_start) < 250) { wait_ms(1); } - #endif //RGB_MATRIX_ENABLE - shutdown_keymap(); -} - -__attribute__ ((weak)) -void suspend_power_down_keymap(void) {} - -void suspend_power_down_user(void) { - suspend_power_down_keymap(); -} - -__attribute__ ((weak)) -void suspend_wakeup_init_keymap(void) {} - -void suspend_wakeup_init_user(void) { - suspend_wakeup_init_keymap(); -} - - -__attribute__ ((weak)) -void matrix_scan_keymap(void) {} - -__attribute__ ((weak)) -void matrix_scan_user(void){ - static bool has_ran_yet; - if (!has_ran_yet) { - has_ran_yet = true; - startup_user(); - } - -#ifdef TAP_DANCE_ENABLE // Run Diablo 3 macro checking code. -// run_diablo_macro_check(); -#endif // !TAP_DANCE_ENABLE - -#ifdef RGBLIGHT_ENABLE - matrix_scan_rgb(); -#endif // !RGBLIGHT_ENABLE - - matrix_scan_keymap(); -} - -__attribute__ ((weak)) -uint32_t layer_state_set_keymap (uint32_t state) { - return state; -} - -// on layer change, no matter where the change was initiated -// Then runs keymap's layer change check -uint32_t layer_state_set_user(uint32_t state) { - state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST); -#ifdef RGBLIGHT_ENABLE - state = layer_state_set_rgb(state); -#endif // RGBLIGHT_ENABLE - return layer_state_set_keymap (state); -} - - -__attribute__ ((weak)) -uint32_t default_layer_state_set_keymap (uint32_t state) { - return state; -} - -// Runs state check and changes underglow color and animation -uint32_t default_layer_state_set_user(uint32_t state) { - state = default_layer_state_set_keymap(state); -#if 0 -#ifdef RGBLIGHT_ENABLE - state = default_layer_state_set_rgb(state); -#endif // RGBLIGHT_ENABLE -#endif - return state; -} - -__attribute__ ((weak)) -void led_set_keymap(uint8_t usb_led) {} - -// Any custom LED code goes here. -// So far, I only have keyboard specific code, -// So nothing goes here. -void led_set_user(uint8_t usb_led) { - led_set_keymap(usb_led); -} -__attribute__ ((weak)) -void eeconfig_init_keymap(void) {} - -void eeconfig_init_user(void) { - userspace_config.raw = 0; - userspace_config.rgb_layer_change = true; - eeconfig_update_user(userspace_config.raw); - #if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE)) - set_unicode_input_mode(KUCHOSAURONAD0_UNICODE_MODE); - get_unicode_input_mode(); - #else - eeprom_update_byte(EECONFIG_UNICODEMODE, KUCHOSAURONAD0_UNICODE_MODE); - #endif - eeconfig_init_keymap(); - keyboard_init(); -} - -// TMUX stuff -void tmux_prefix(void) { - register_code(KC_LCTL); - tap_code(KC_B); - unregister_code(KC_LCTL); -} - - -void tmux_pane_last(void) { - tmux_prefix(); - tap_code(KC_SCLN); -} - -void tmux_pane_switch_repeat(void) { - tmux_pane_last(); - tap_code(KC_UP); - tap_code(KC_ENT); - tmux_pane_last(); -} - -/* vi: ft=c:tw=80:sw=2:ts=2:sts=2:et */ diff --git a/users/kuchosauronad0/kuchosauronad0.h b/users/kuchosauronad0/kuchosauronad0.h deleted file mode 100644 index da996457..00000000 --- a/users/kuchosauronad0/kuchosauronad0.h +++ /dev/null @@ -1,109 +0,0 @@ -#pragma once - -#include "quantum.h" - -#include "version.h" -#include "eeprom.h" -#include "wrappers.h" -#include "process_records.h" - -#ifdef TAP_DANCE_ENABLE -# include "tap_dances.h" -# define KC_TMX TD(TD_TMX) // tap1: 't' tap2: +b -# define KC_EOL TD(TD_EOL) // tap1: 'e' tap2: +e -# define KC_BOL TD(TD_BOL) // tap1: 'a' tap2: +a -# define KC_NW TD(TD_NW) // tap1: 'f' tap2: +f -# define KC_PW TD(TD_PW) // tap1: 'b' tap2: +b -# define KC_DW TD(TD_DW) // tap1: 'w' tap2: +w -#endif //!TAP_DANCE_ENABLE - -#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) -# include "rgblight_user.h" -#endif - -#if defined(UNICODEMAP_ENABLE) || defined(UNICODE_ENABLE) -# include "unicode.h" -#endif //!UNICODE_ENABLE - -// Keycode aliases -#define TM_X LCTL(KC_B) // Tmux leader key -// Unix QoL macros -#define MC_BOL LCTL(KC_A) // jump to beginning of line -#define MC_EOL LCTL(KC_E) // jump to end of line -#define MC_NW LALT(KC_F) // next word -#define MC_PW LALT(KC_B) // previous word -#define MC_DW LCTL(KC_W) // delete word - -// Define layer names -enum userspace_layers { - _QWERTY = 0, - _NUMLOCK = 0, - _COLEMAK, - _DVORAK, - _WORKMAN, -/* _NORMAN, - _MALTRON, - _EUCALYN, - _CARPLAX, */ - _PLOVER, - _UNICODE, - _MODS, /* layer 8 now 9*/ - _GAMEPAD, - _DIABLO, - _MACROS, - _MEDIA, - _LOWER, - _RAISE, - _ADJUST, -}; - -bool mod_key_press_timer (uint16_t code, uint16_t mod_code, bool pressed); -bool mod_key_press (uint16_t code, uint16_t mod_code, bool pressed, uint16_t this_timer); -bool send_game_macro(const char *str, keyrecord_t *record, bool override); -void matrix_init_keymap(void); -void shutdown_keymap(void); -void suspend_power_down_keymap(void); -void suspend_wakeup_init_keymap(void); -void matrix_scan_keymap(void); -uint32_t layer_state_set_keymap (uint32_t state); -uint32_t default_layer_state_set_keymap (uint32_t state); -void led_set_keymap(uint8_t usb_led); -void eeconfig_init_keymap(void); - -void tmux_prefix(void); -void tmux_pane_zoom(void); -void tmux_pane_last(void); -void tmux_pane_switch_repeat(void); -void tmux_pane_switch(uint16_t keycode); - -typedef union { - uint32_t raw; - struct { - bool rgb_layer_change :1; - bool is_overwatch :1; - bool nuke_switch :1; - uint8_t unicode_mod :4; - bool swapped_numbers :1; - }; -} userspace_config_t; - -extern userspace_config_t userspace_config; - -/* -Custom Keycodes for Diablo 3 layer -But since TD() doesn't work when tap dance is disabled -We use custom codes here, so we can substitute the right stuff -*/ -#ifdef TAP_DANCE_ENABLE -# define KC_D3_1 TD(TD_D3_1) -# define KC_D3_2 TD(TD_D3_2) -# define KC_D3_3 TD(TD_D3_3) -# define KC_D3_4 TD(TD_D3_4) -#else -# define KC_D3_1 KC_1 -# define KC_D3_2 KC_2 -# define KC_D3_3 KC_3 -# define KC_D3_4 KC_4 -#endif // !TAP_DANCE_ENABLE - -/* vi: ft=c:tw=80:sw=2:ts=2:sts=2:et */ diff --git a/users/kuchosauronad0/leader.c b/users/kuchosauronad0/leader.c deleted file mode 100644 index 22674eef..00000000 --- a/users/kuchosauronad0/leader.c +++ /dev/null @@ -1,116 +0,0 @@ -#include "leader.h" -#ifdef RGBLIGHT_ENABLE -extern rgblight_config_t rgblight_config; -#endif -bool leader_succeed; - -LEADER_EXTERNS(); - -void matrix_scan_user(void) { - static bool has_ran_yet; - if (!has_ran_yet) { - has_ran_yet = true; - startup_user(); - } -#ifdef TAP_DANCE_ENABLE // Run Diablo 3 macro checking code. -// run_diablo_macro_check(); -#endif -#ifdef RGBLIGHT_ENABLE - matrix_scan_rgb(); -#endif - LEADER_DICTIONARY() { - leader_succeed = leading = false; - - SEQ_ONE_KEY(KC_W) { - // vim/tmux: Use in command mode in vim: write to file, switch tmux pane in the current session window and repeat the last command - SEND_STRING(":w" SS_TAP(X_ENTER)); - tmux_pane_switch_repeat(); - leader_succeed = true; - } else - SEQ_ONE_KEY(KC_T) { - // Send the Tmux Prefix - tmux_prefix(); - leader_succeed = true; - } else - SEQ_ONE_KEY(KC_A) { - // tmux: Send the prefix and press 'right' arrow - tmux_prefix(); - tap_code(KC_RIGHT); - leader_succeed = true; - } else - SEQ_TWO_KEYS(KC_T, KC_T) { - // tmux: Send the prefix to a nested session - tmux_prefix(); - tmux_prefix(); - leader_succeed = true; - } else - SEQ_TWO_KEYS(KC_T, KC_R) { - // tmux: Switch pane and repeat last action - tmux_pane_switch_repeat(); - leader_succeed = true; - } else - SEQ_TWO_KEYS(KC_V, KC_Z){ - // vim: Zoom pane - tap_code16(LCTL(KC_W)); - tap_code16(LSFT(KC_BSLS)); - leader_succeed = true; - } else - SEQ_TWO_KEYS(KC_V, KC_R) { - // vim: Substitute and place cursor - SEND_STRING(":%s///g" SS_TAP(X_LEFT)); - tap_code(KC_LEFT); - tap_code(KC_LEFT); - leader_succeed = true; - } else - SEQ_TWO_KEYS(KC_V, KC_T) { - // vim: move current pane to new tab - tap_code16(LCTL(KC_W)); - tap_code16(LSFT(KC_T)); - leader_succeed = true; - } else - SEQ_ONE_KEY(KC_R){ - // Toggle RGB Layer indicator - tap_code16(KC_RGB_T); - leader_succeed = true; - } else - SEQ_ONE_KEY(KC_SPC){ - // One Shot Unicode layer -//TODO tap_code16(OS_UNI); - leader_succeed = true; - } else - SEQ_TWO_KEYS(KC_SPC, KC_SPC){ - // Toggle _MODS - tap_code16(TG_MODS); - leader_succeed = true; - } else - SEQ_THREE_KEYS(KC_BSPC, KC_BSPC, KC_BSPC){ - // Reset the keyboard - reset_keyboard(); - leader_succeed = true; - } - leader_end(); - } -// matrix_scan_keymap(); -} - -void leader_start(void) { -#ifdef RGBLIGHT_ENABLE - rgblight_savebase(); - rgblight_mode_noeeprom(1); - rgblight_sethsv_noeeprom_goldenrod(); -#endif -} - -void leader_end(void) { -// pick color depending of success /fail -// fade leader_start from 100 to 0 -// fade new color from 0 to 100 to 0 -// fade old color from 0 to 100 -#ifdef RGBLIGHT_ENABLE - if (leader_succeed) { - fadeflash_leds(HSV_GREEN); - } else { - fadeflash_leds(HSV_RED); - } -#endif -} diff --git a/users/kuchosauronad0/leader.h b/users/kuchosauronad0/leader.h deleted file mode 100644 index ed904f30..00000000 --- a/users/kuchosauronad0/leader.h +++ /dev/null @@ -1,6 +0,0 @@ -#pragma once -#include "kuchosauronad0.h" - -#include "leader.h" - -void matrix_scan_user(void); diff --git a/users/kuchosauronad0/process_records.c b/users/kuchosauronad0/process_records.c deleted file mode 100644 index bec6fa5a..00000000 --- a/users/kuchosauronad0/process_records.c +++ /dev/null @@ -1,244 +0,0 @@ -#include "kuchosauronad0.h" - -uint16_t copy_paste_timer; - -__attribute__ ((weak)) -bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { - return true; -} - -__attribute__ ((weak)) -bool process_record_secrets(uint16_t keycode, keyrecord_t *record) { - return true; -} - -// Defines actions for my global custom keycodes. Defined in kuchosauronad0.h file -// Then runs the _keymap's record handier if not processed here -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - // If console is enabled, it will print the matrix position and status of each key pressed -#ifdef KEYLOGGER_ENABLE - #if defined(KEYBOARD_ergodox_ez) || defined(KEYBOARD_keebio_iris_rev2) - xprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.row, record->event.key.col, record->event.pressed); - #else - xprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed); - #endif -#endif //KEYLOGGER_ENABLE - - switch (keycode) { - case KC_QWERTY ... KC_PLOVER: - if (record->event.pressed) { - set_single_persistent_default_layer(keycode - KC_QWERTY); - } - break; - - case KC_MAKE: // Compiles the firmware, and adds the flash command based on keyboard bootloader - if (!record->event.pressed) { - uint8_t temp_mod = get_mods(); - uint8_t temp_osm = get_oneshot_mods(); - clear_mods(); clear_oneshot_mods(); - send_string_with_delay_P(PSTR("make " QMK_KEYBOARD ":" QMK_KEYMAP), TAP_CODE_DELAY); -#ifndef MAKE_BOOTLOADER - if ( ( temp_mod | temp_osm ) & MOD_MASK_SHIFT ) -#endif - { - #if defined(__arm__) - send_string_with_delay_P(PSTR(":dfu-util"), TAP_CODE_DELAY); - #elif defined(BOOTLOADER_DFU) - send_string_with_delay_P(PSTR(":dfu"), TAP_CODE_DELAY); - #elif defined(BOOTLOADER_HALFKAY) - send_string_with_delay_P(PSTR(":teensy"), TAP_CODE_DELAY); - #elif defined(BOOTLOADER_CATERINA) - send_string_with_delay_P(PSTR(":avrdude"), TAP_CODE_DELAY); - #endif // bootloader options - } - if ( ( temp_mod | temp_osm ) & MOD_MASK_CTRL) { send_string_with_delay_P(PSTR(" -j8 --output-sync"), TAP_CODE_DELAY); } - send_string_with_delay_P(PSTR(SS_TAP(X_ENTER)), TAP_CODE_DELAY); - } - break; -// FLEDERMAUSLAND - case MC_QT1: // "" - if(record->event.pressed){ - SEND_STRING("\"\""); - tap_code(KC_LEFT); - } - break; - case MC_QT2: // '' - if(record->event.pressed){ - SEND_STRING("''"); - tap_code(KC_LEFT); - } - break; - case MC_QT3: // `' - if(record->event.pressed){ - SEND_STRING("`'"); - tap_code(KC_LEFT); - } - break; - case MC_PAR: // Parenthesis - if(record->event.pressed){ - SEND_STRING("()"); - tap_code(KC_LEFT); - } - break; - case MC_CUR: // Curly bracket - if(record->event.pressed){ - SEND_STRING("{}"); - tap_code(KC_LEFT); - } - break; - case MC_SQR: // Square bracket - if(record->event.pressed){ - SEND_STRING("[]"); - tap_code(KC_LEFT); - } - break; - case MC_ABR: // Angle bracket - if(record->event.pressed){ - SEND_STRING("<>"); - tap_code(KC_LEFT); - } - break; - case MCT_NEW: // New Tmux Session - if(record->event.pressed){ - tmux_prefix(); - SEND_STRING(":neww"); - tap_code(KC_ENT); - } - break; - case MCT_SH: // Tmux horizontal split - if(record->event.pressed){ - tmux_prefix(); - SEND_STRING("%"); - } - break; - case MCT_SV: // Tmux vertical split - if(record->event.pressed){ - tmux_prefix(); - SEND_STRING("\""); - } - break; - case MCT_ZM: // Tmux zoom - if(record->event.pressed){ - tmux_prefix(); - tap_code(KC_Z); - } - break; - case MCT_SCR: // Tmux scroll mode - if(record->event.pressed){ - tmux_prefix(); - tap_code(KC_PGUP); - } - break; - case MCT_UP: // Tmux up - break; - case MCT_DW: // Tmux down - break; - case MCT_LFT: // Tmux left - break; - case MCT_RGT: // Tmux right - tmux_prefix(); - tap_code(KC_RIGHT); - break; - case MCV_B: // Vim begin of line - if(record->event.pressed){ - tap_code(KC_0); - } - break; - case MCV_E: // Vim end of line - if(record->event.pressed){ - SEND_STRING(":vsplit"); - tap_code(KC_ENT); - } - break; - case MCT_F: // Vim for loop - if(record->event.pressed){ - SEND_STRING(":help"); - tap_code(KC_ENT); - } - break; - case VRSN: // Prints firmware version - if (record->event.pressed) { - send_string_with_delay_P(PSTR(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION ", Built on: " QMK_BUILDDATE), TAP_CODE_DELAY); - } - break; -// These are a series of gaming macros. -// Only enables for the viterbi, basically, -// to save on firmware space, since it's limited. -#ifdef MACROS_ENABLED - case KC_OVERWATCH: // Toggle's if we hit "ENTER" or "BACKSPACE" to input macros - if (record->event.pressed) { userspace_config.is_overwatch ^= 1; eeconfig_update_user(userspace_config.raw); } -#ifdef RGBLIGHT_ENABLE -// userspace_config.is_overwatch ? rgblight_mode_noeeprom(17) : rgblight_mode_noeeprom(18); -#endif //RGBLIGHT_ENABLE - break; - case KC_SALT: - return send_game_macro("Salt, salt, salt...", record, false); - case KC_MORESALT: - return send_game_macro("Please sir, can I have some more salt?!", record, false); - case KC_SALTHARD: - return send_game_macro("Your salt only makes me harder, and even more aggressive!", record, false); - case KC_GOODGAME: - return send_game_macro("Good game, everyone!", record, false); - case KC_GLHF: - return send_game_macro("Good luck, have fun!!!", record, false); - case KC_SYMM: - return send_game_macro("Left click to win!", record, false); - case KC_JUSTGAME: - return send_game_macro("It may be a game, but if you don't want to actually try, please go play AI, so that people that actually want to take the game seriously and \"get good\" have a place to do so without trolls like you throwing games.", record, false); - case KC_TORB: - return send_game_macro("That was positively riveting!", record, false); - case KC_AIM: - send_game_macro("That aim is absolutely amazing. It's almost like you're a machine!", record, true); - return send_game_macro("Wait! That aim is TOO good! You're clearly using an aim hack! CHEATER!", record, false); - case KC_C9: - return send_game_macro("OMG!!! C9!!!", record, false); - case KC_GGEZ: - return send_game_macro("That was a fantastic game, though it was a bit easy. Try harder next time!", record, false); -#endif // MACROS_ENABLED - - case KC_CCCV: // One key copy/paste - if(record->event.pressed){ - copy_paste_timer = timer_read(); - } else { - if (timer_elapsed(copy_paste_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; - -// Unicode -#ifdef UNICODE_ENABLE - case UC_FLIP: // (ノಠ痊ಠ)ノ彡┻━┻ - if (record->event.pressed) { - send_unicode_hex_string("0028 30CE 0CA0 75CA 0CA0 0029 30CE 5F61 253B 2501 253B"); - } - break; - case UC_TABL: // ┬┬ノ( º _ ºノ) - if (record->event.pressed) { - send_unicode_hex_string("252C 2500 252C 30CE 0028 0020 00BA 0020 005F 0020 00BA 30CE 0029"); - } - break; - case UC_SHRG: // ¯\_(ツ)_/¯ - if (record->event.pressed) { - send_unicode_hex_string("00AF 005C 005F 0028 30C4 0029 005F 002F 00AF"); - } - break; - case UC_DISA: // ಠ_ಠ - if (record->event.pressed) { - send_unicode_hex_string("0CA0 005F 0CA0"); - } - break; -#endif //!Unicode -} - return process_record_keymap(keycode, record) && -#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) - process_record_user_rgb(keycode, record) && -#endif // RGBLIGHT_ENABLE - process_record_secrets(keycode, record); -} diff --git a/users/kuchosauronad0/process_records.h b/users/kuchosauronad0/process_records.h deleted file mode 100644 index d3d4c4fe..00000000 --- a/users/kuchosauronad0/process_records.h +++ /dev/null @@ -1,91 +0,0 @@ -#pragma once -#include "kuchosauronad0.h" - -#if defined(KEYMAP_SAFE_RANGE) -# define PLACEHOLDER_SAFE_RANGE KEYMAP_SAFE_RANGE -#else -# define PLACEHOLDER_SAFE_RANGE SAFE_RANGE -#endif - -enum userspace_custom_keycodes{ - VRSN = PLACEHOLDER_SAFE_RANGE, // Prints QMK Firmware and board info - KC_QWERTY, // Sets default layer to QWERTY - KC_COLEMAK, // Sets default layer to COLEMAK - KC_DVORAK, // Sets default layer to DVORAK - KC_WORKMAN, // Sets default layer to WORKMAN - KC_PLOVER, // Sets default layer to PLOVER - - KC_MAKE, // Run keyboard's customized make command - KC_RGB_T, // Toggles RGB Layer Indication mode - KC_SECRET_1, - KC_SECRET_2, - KC_SECRET_3, - KC_SECRET_4, - KC_SECRET_5, - KC_CCCV, // Hold to copy, tap to paste - KC_NUKE, // NUCLEAR LAUNCH DETECTED!!! - UC_FLIP, // (ಠ痊ಠ)┻━┻ - UC_TABL, // ┬┬ノ( º _ ºノ) - UC_SHRG, // ¯\_(ツ)_/¯ - UC_DISA, // ಠ_ಠ - - MC_QT1, // "" - MC_QT2, // '' - MC_QT3, // `' - MC_PAR, // Parenthesis - MC_CUR, // Curly bracket - MC_SQR, // Square bracket - MC_ABR, // Angle bracket - MCT_NEW, // New Tmux Session - MCT_SH, // Tmux horizontal split - MCT_SV, // Tmux vertical split - MCT_ZM, // Tmux zoom - MCT_SCR, // Tmux scroll mode - MCT_UP, // Tmux up - MCT_DW, // Tmux down - MCT_LFT, // Tmux left - MCT_RGT, // Tmux right - MCV_B, // Vim begin of line - MCV_E, // Vim end of line - MCT_F, // Vim for loop - MCG_A, // Git add - MCG_C, // Git commit - MCG_P, // Git push - MCG_R, // Git revert - MCG_L, // Git log - MCG_S, // Git status - - NEW_SAFE_RANGE //use "NEWPLACEHOLDER for keymap specific codes - }; - -bool process_record_secrets(uint16_t keycode, keyrecord_t *record); -bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record); -bool process_record_keymap(uint16_t keycode, keyrecord_t *record); - -#define LOWER MO(_LOWER) -#define RAISE MO(_RAISE) -#define ADJUST MO(_ADJUST) -#define TG_MODS TG(_MODS) -#define TG_GAME TG(_GAMEPAD) -#define OS_LWR OSL(_LOWER) -#define OS_RSE OSL(_RAISE) -#define OS_UNI OSL(_UNICODE) - -#define SEC1 KC_SECRET_1 -#define SEC2 KC_SECRET_2 -#define SEC3 KC_SECRET_3 -#define SEC4 KC_SECRET_4 -#define SEC5 KC_SECRET_5 -#define SEC6 KC_SECRET_6 - -#define QWERTY KC_QWERTY -#define DVORAK KC_DVORAK -#define COLEMAK KC_COLEMAK -#define WORKMAN KC_WORKMAN -#define PLOVER KC_PLOVER - -#define KC_RESET RESET -#define KC_RST KC_RESET - -#define UC_IRNY UC(0x2E2E) -#define UC_CLUE UC(0x203D) diff --git a/users/kuchosauronad0/readme.md b/users/kuchosauronad0/readme.md deleted file mode 100644 index b577eedb..00000000 --- a/users/kuchosauronad0/readme.md +++ /dev/null @@ -1,217 +0,0 @@ -# Table of Contents -1. [Overview](#overview)[[documentation](https://docs.qmk.fm/#/feature_userspace)] -2. [Keyboard Layout Templates](#keyboard-layout-templates) -3. [Custom Keycodes](#custom-keycodes) [[documentation](https://docs.qmk.fm/#/feature_macros?id=the-new-way-send_string-amp-process_record_user)] -4. [Tap Dances](#tap-dances) [[documentation](https://docs.qmk.fm/#/feature_tap_dance)] -5. [Encoders](#encoders) [[documentation](https://docs.qmk.fm/#/feature_encoders)] -6. [Leader Key](#leader-key) [[documentation](https://docs.qmk.fm/#/feature_leader_key)] -7. [Unicode](#unicode) [[documentation](https://docs.qmk.fm/#/feature_unicode)] -8. [Combo Keys](#combo-keys) [[documentation](https://docs.qmk.fm/#/feature_combo)] -9. [Secret Macros](#secret-macros) [[documentation](https://github.com/qmk/qmk_firmware/blob/master/users/drashna/readme_secrets.md)] - -# [Overview](#overview) -Thanks to [drashna](https://github.com/drashna) and the people of the discord server and everyone else in the qmk_firmware/users/ directory :) - -## [Keyboard Layout Templates](#keyboard-layout-temple) -This borrows from [jola5](https://github.com/jola5)'s "Not quite neo" code. The code of the userspace is shared between all keyboards, so that one can maintain functionality of all keyboards at once by modifying a few files in a central location. - -This makes adding tap/hold mods, or other special keycodes or functions to all keyboards super easy, as it's done to all of them at once. - -The caveat here is that the keymap needs a processor/wrapper, as it doesn't like the substitutions. However, this is as simple as just pushing it through a define. For instance: - -`#define LAYOUT_ergodox_wrapper(...) LAYOUT_ergodox(__VA_ARGS__)` - -Once that's been done and you've switched the keymaps to use the "wrapper", it will read the substitution blocks just fine. - -Credit goes to [jola5](https://github.com/jola5) for first implementing this awesome idea. - -## [Custom Keycodes](#custom-keycodes) -Declared in `process_records.h` and `template.h` and defined in `process_record_user` in template.c - -## [Tap Dances](#tap-dances) -To enable set `TAP_DANCE_ENABLE = yes` in *rules.mk*. See file *tap_dances.{c,h}* - -TODO: Command-line movement stuff is a pain when typing normally - -TODO: Make use of `TD_SPC` and `TD_QT{1..3}` - -## [Leader Key](#leader-key) -To enable set `LEADER_ENABLE = yes` in file *rules.mk* - -|LEADER_DICTIONARY()|program| description | -|---|---|---| -| W |vim/tmux| save file, switch pane and repeat last command | -| T |tmux| send default prefix | -| A |tmux| switch pane| -|T + T|tmux| send default prefix to a nested session | -|T + R|tmux| switch pane and repeat last command | -|V + Z|vim | zoom current split| -|V + R|vim | search and replace| -|V + T|vim | move current split to its own tab| -|3x Backspace|keyboard| Reset Keyboard | - -`LEADER_DICTIONARY()` is defined in *leader.c* - -## [Combo Keys](#combo-keys) -To enable set `COMBO_ENABLE = yes` in file *rules.mk*. -Number of combos and timeout are defined in *config.h* - -Press key chord to use. - -|Combo|description | -|---|---| -| CV | Paste | -| XC | Cut | -| ZV | Copy | -| QP | KC_SLEEP | - -Combos are defined in *combo.h* and *combo.c* - -## [Unicode](#unicode) -To enable set `UNICODE_ENABLE = yes` or `UNICODEMAP_ENABLE = yes` in file *rules.mk* - -## [Encoders](#encoders) -To enable set `ENCODER_ENABLE = yes` in *rules.mk*. - -In the keyboard's *config.h* adjust according to your keyboard: - -```c -// Example ProMicro -#define ENCODERS_PAD_A { F4 } //PIN A3 -#define ENCODERS_PAD_B { F5 } //PIN A2 -``` - -Check the [documentation](https://docs.qmk.fm/#/feature_encoders) for more information -The first rotary encoder is configured such as: - -|Modifier|description| -|---|---| -| None | General navigation. Page up/down | -| SHIFT | Fast navigation. Home/end | -| CTRL | Vertical navigation. Up/down | -| CTRL+SHIFT | Horizontal navigation. Left/right | -| ALT | Audio volume control. | -| GUI | Browser navigation(windows). Forward/backward | -| ALT+SHIFT | Form navigation. Tab up/down | -| ALT+CTRL | Media control. (Play|pause)/mute | -| HYPER | Media navigation. Next/prev track | - -Key codes are stored as `uint16_t encoder_actions[2][9]` in *encoder.c* - - -## Diablo Layer -Currently not in use. -[Back to Top](#table-of-contents) - -# [Secret Macros](#secret-macros) -To enable set `NO_SECRETS = yes` in *rules.mk*. - -With help from gitter and Colinta, this adds the ability to add hidden macros from other users. - -First, I have several files that are hidden/excluded from Git/GitHub. These contain everything needed for the macros. To hide these files, open *.git/info/exclude* and add `secrets.c` and `secrets.h` to that file, below the comments. - -And this requires `KC_SECRET_1` through `KC_SECRET_5` to be defined in your *.h* file to define the keycodes for the new macros. - - -### .git/info/exclude - -```console -# git ls-files --others --exclude-from=.git/info/exclude -# Lines that start with '#' are comments. -# For a project mostly in C, the following would be a good set of -# exclude patterns (uncomment them if you want to use them): -# *.[oa] -# *~ -/users//secrets.c -/users//secrets.h -``` - -Then you can create these files: - -### secrets.c - -```c -#include ".h" // replace with your keymap's "h" file, or whatever file stores the keycodes - -#if (__has_include("secrets.h") && !defined(NO_SECRETS)) -#include "secrets.h" -#else -// `PROGMEM const char secret[][x]` may work better, but it takes up more space in the firmware -// And I'm not familiar enough to know which is better or why... -static const char * const secret[] = { - "test1", - "test2", - "test3", - "test4", - "test5" -}; -#endif - -bool process_record_secrets(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case KC_SECRET_1 ... KC_SECRET_5: // Secrets! Externally defined strings, not stored in repo - if (!record->event.pressed) { - clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); - send_string_with_delay(secret[keycode - KC_SECRET_1], MACRO_TIMER); - } - return false; - break; - } - return true; -} -``` - -### secrets.h - -```c -static const char * const secrets[] = { - "secret1", - "secret2", - "secret3", - "secret4", - "secret5" -}; -``` - -Replacing the strings with the codes that you need. - -### name.c - -In the *.c* file, you will want to add this to the top: - -```c -__attribute__ ((weak)) -bool process_record_secrets(uint16_t keycode, keyrecord_t *record) { - return true; -} -``` - -This is so that the function can be called here, and replaced in the `secrets.c` file, and so it won't error out if it doesn't exist. - -And then, in the `process_record_user` function, assuming you have `return process_record_keymap(keycode, record)` here, you'll want to replace the "final" return with the following. Otherwise, you want to replace the `return true;` with `return process_record_secrets(keycode, record);` - -```c - return process_record_keymap(keycode, record) && process_record_secrets(keycode, record); -} -``` - -### rules.mk - -Here, you want your */users//rules.mk* file to "detect" the existence of the *secrets.c* file, and only add it if the file exists. To do so, add this block: - -```make -ifneq ("$(wildcard $(USER_PATH)/secrets.c)","") - SRC += secrets.c -endif -``` - -Additionally, if you want to make sure that you can disable the function without messing with the file, you need to add this to your */users//rules.mk*, so that it catches the flag: - -```make -ifeq ($(strip $(NO_SECRETS)), yes) - OPT_DEFS += -DNO_SECRETS -endif -``` - -Then, if you run `make keyboard:name NO_SECRETS=yes`, it will default to the test strings in your *.c* file, rather than reading from your file. -[Back to Top](#table-of-contents) diff --git a/users/kuchosauronad0/rgblight_user.c b/users/kuchosauronad0/rgblight_user.c deleted file mode 100644 index 63e412c5..00000000 --- a/users/kuchosauronad0/rgblight_user.c +++ /dev/null @@ -1,156 +0,0 @@ -#include "rgblight_user.h" -extern rgblight_config_t rgblight_config; -bool has_initialized; -uint8_t base_hue; // Hue value of base state -uint8_t base_sat; // Saturation value of base state -uint8_t base_val; // Brightness value of base state -uint8_t base_mod; // Animation mode of the base state - -void rgblight_savebase(void) { // Save the current settings to ram - base_hue = rgblight_config.hue; - base_sat = rgblight_config.sat; - base_val = rgblight_config.val; - base_mod = rgblight_config.mode; -} -void rgblight_loadbase(void) { // Load settings from ram to eeprom - rgblight_mode( base_mod ); - rgblight_sethsv_eeprom_helper(base_hue, base_sat, base_val, true); -} - - - -bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record) { - if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX)) { - keycode = keycode & 0xFF; - } - switch (keycode) { - case KC_RGB_T: // Switch between underglow layer indication and normal qmk behaviour -#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) - if (record->event.pressed) { - userspace_config.rgb_layer_change ^= 1; - xprintf("rgblight layer change [EEPROM]: %u\n", userspace_config.rgb_layer_change); - eeconfig_update_user(userspace_config.raw); - if (userspace_config.rgb_layer_change) { - layer_state_set(layer_state); // Immediately set the layer color (looks better) - } - } -#endif // RGBLIGHT_ENABLE - return false; - break; -#ifdef RGBLIGHT_ENABLE - case RGB_MODE_FORWARD ... RGB_MODE_GRADIENT: // quantum_keycodes.h L400 for definitions - if (record->event.pressed) { // This disables layer indication, as it's assumed that if you're changing this ... you want that disabled - if (userspace_config.rgb_layer_change) { - userspace_config.rgb_layer_change = false; - xprintf("rgblight layer change [EEPROM]: %u\n", userspace_config.rgb_layer_change); - eeconfig_update_user(userspace_config.raw); - } - } - return true; - break; -#endif // RGBLIGHT_ENABLE - } - return true; -} - -void keyboard_post_init_rgb(void) { -# if defined(RGBLIGHT_ENABLE) || defined(RGBLIGHT_STARTUP_ANIMATION) - bool is_enabled = rgblight_config.enable; - if (userspace_config.rgb_layer_change) { - rgblight_enable_noeeprom(); - } - if (rgblight_config.enable) { - layer_state_set_user(layer_state); - uint16_t old_hue = rgblight_config.hue; - rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); - for (uint16_t i = 255; i > 0; i--) { - rgblight_sethsv_noeeprom((i + old_hue) % 255, 255, 255); - wait_ms(5); - } - } - if (!is_enabled) { - rgblight_disable_noeeprom(); - } -# endif // !RGBLIGHT_ENABLE || RGBLIGHT_STARTUP_ANIMATION - layer_state_set_user(layer_state); -} - -void matrix_scan_rgb(void) { -# ifdef INDICATOR_LIGHTS - matrix_scan_indicator(); -# endif -} - -layer_state_t layer_state_set_rgb(layer_state_t state) { -# ifdef RGBLIGHT_ENABLE - if (userspace_config.rgb_layer_change) { - switch (biton32(state)) { // _RAISE, _LOWER and _ADJUST use a custom color and the breathing effect - case _RAISE: - rgblight_sethsv_noeeprom_green(); - rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 3); - break; - case _LOWER: - rgblight_sethsv_noeeprom_red(); - rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 3); - break; - case _ADJUST: - rgblight_sethsv_noeeprom_white(); - rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 2); - break; - default: // Use a solid color for normal layers - switch (biton32(default_layer_state)) { - case _QWERTY: - rgblight_sethsv_noeeprom_magenta(); - break; - case _COLEMAK: - rgblight_sethsv_noeeprom_green(); - break; - case _DVORAK: - rgblight_sethsv_noeeprom_blue(); - break; - case _WORKMAN: - rgblight_sethsv_noeeprom_goldenrod(); - break; - case _PLOVER: - rgblight_sethsv_noeeprom_pink(); - break; - default: - rgblight_sethsv_noeeprom_white(); - break; - } - biton32(state) == _MODS ? rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING) : rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); // if _MODS layer is on, then breath to denote it - break; - } - } -# endif // !RGBLIGHT_ENABLE - return state; -} - -#ifdef INDICATOR_LIGHTS -void matrix_scan_indicator(void) { - if (has_initialized) { - set_rgb_indicators(get_mods(), host_keyboard_leds(), get_oneshot_mods()); - } -} -#endif // !INDICATOR_LIGHTS - -void rgblight_fade_helper(bool direction){ - // true: increase val = fade in - // false: decrease val = fade out - for (uint8_t index = 0; index < RGBLIGHT_VAL_STEP ; index++) { - direction ? rgblight_increase_val() : rgblight_decrease_val(); - wait_ms(5); - } -} -void fadeflash_leds(uint8_t hue, uint8_t sat, uint8_t val){ - // indicate success / fail of a leader sequence - // fade out, set new hue and saturation, fade in, fade out, set old color, fade in - // this is used in leader.c - // TODO: come up with a better name maybe - rgblight_fade_helper(false); - rgblight_sethsv_noeeprom(hue, sat, 0); - rgblight_fade_helper(true); - rgblight_fade_helper(false); - rgblight_sethsv_noeeprom(base_hue, base_sat, 0); - rgblight_fade_helper(true); -} diff --git a/users/kuchosauronad0/rgblight_user.h b/users/kuchosauronad0/rgblight_user.h deleted file mode 100644 index eab15b83..00000000 --- a/users/kuchosauronad0/rgblight_user.h +++ /dev/null @@ -1,23 +0,0 @@ -#pragma once -#include "kuchosauronad0.h" - -typedef struct { - bool enabled; - uint8_t hue; - uint16_t timer; - uint8_t life; -} rgblight_fadeout; -const uint8_t RGBLIGHT_FADE_SPEED[6] PROGMEM; - -layer_state_t layer_state_set_rgb(layer_state_t state); -layer_state_t default_layer_state_set_rgb(layer_state_t state); - -bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record); -void scan_rgblight_fadeout(void); -void keyboard_post_init_rgb(void); -void matrix_scan_rgb(void); -void rgblight_sethsv_default_helper(uint8_t index); -void rgblight_savebase(void); -void rgblight_loadbase(void); -void rgblight_fade_helper(bool direction); -void fadeflash_leds(uint8_t hue, uint8_t sat, uint8_t val); diff --git a/users/kuchosauronad0/rules.mk b/users/kuchosauronad0/rules.mk deleted file mode 100644 index b844d12c..00000000 --- a/users/kuchosauronad0/rules.mk +++ /dev/null @@ -1,49 +0,0 @@ -SRC += kuchosauronad0.c \ - process_records.c - -LINK_TIME_OPTIMIZATION_ENABLE = yes -SPACE_CADET_ENABLE = no - -ifneq ($(strip $(RGBLIGHT_ENABLE)),yes ) - SRC += rgblight_user.c -endif - -ifeq ($(strip $(TAP_DANCE_ENABLE)), yes) - SRC += tap_dances.c -endif - -ifeq ($(strip $(ENCODER_ENABLE)), yes) - SRC += encoder.c -endif - -ifeq ($(strip $(COMBO_ENABLE)), yes) - SRC += combo.c -endif - -ifeq ($(strip $(LEADER_ENABLE)), yes) - SRC += leader.c -endif - -ifneq ("$(wildcard $(USER_PATH)/secrets.c)","") - SRC += secrets.c -endif -ifeq ($(strip $(NO_SECRETS)), yes) - OPT_DEFS += -DNO_SECRETS -endif -ifeq ($(strip $(UNICODEMAP_ENABLE)), yes) - SRC += unicode.c -endif - -ifeq ($(strip $(MACROS_ENABLED)), yes) - OPT_DEFS += -DMACROS_ENABLED -endif - -ifdef CONSOLE_ENABLE - ifeq ($(strip $(KEYLOGGER_ENABLE)), yes) - OPT_DEFS += -DKEYLOGGER_ENABLE - endif -endif - -ifeq ($(strip $(MAKE_BOOTLOADER)), yes) - OPT_DEFS += -DMAKE_BOOTLOADER -endif diff --git a/users/kuchosauronad0/tap_dances.c b/users/kuchosauronad0/tap_dances.c deleted file mode 100644 index 7bdd3d33..00000000 --- a/users/kuchosauronad0/tap_dances.c +++ /dev/null @@ -1,55 +0,0 @@ -#include "tap_dances.h" -void td_parenthesis (qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 1) { -// SEND_STRING ("\("); - tap_code(KC_QUOT); - reset_tap_dance (state); - } - else if (state->count == 2) { - SEND_STRING("()" SS_TAP(X_LEFT)); - reset_tap_dance (state); - } - else if (state->count == 3) { - SEND_STRING("[]" SS_TAP(X_LEFT)); - reset_tap_dance (state); - } - else if (state->count == 4) { - SEND_STRING("{}" SS_TAP(X_LEFT)); - reset_tap_dance (state); - } - else if (state->count >= 5) { - SEND_STRING("<>" SS_TAP(X_LEFT)); - reset_tap_dance (state); - } -} - -void safe_reset(qk_tap_dance_state_t *state, void *user_data) { - if (state->count >= 3) { - // Reset the keyboard if you tap the key more than three times - reset_keyboard(); - reset_tap_dance(state); - } -} - -qk_tap_dance_action_t tap_dance_actions[] = { - [TD_RESET] = ACTION_TAP_DANCE_FN(safe_reset), - [TD_NUM1] = ACTION_TAP_DANCE_DOUBLE(KC_1, KC_4), - [TD_NUM2] = ACTION_TAP_DANCE_DOUBLE(KC_2, KC_5), - [TD_NUM3] = ACTION_TAP_DANCE_DOUBLE(KC_3, KC_6), - [TD_QT1] = ACTION_TAP_DANCE_DOUBLE(KC_QUOT, MC_QT1), - [TD_QT2] = ACTION_TAP_DANCE_DOUBLE(LSFT(KC_QUOT), MC_QT2), - [TD_QT3] = ACTION_TAP_DANCE_DOUBLE(KC_GRV, MC_QT3), - - [TD_TMX] = ACTION_TAP_DANCE_DOUBLE(KC_T, TM_X), - [TD_EOL] = ACTION_TAP_DANCE_DOUBLE(KC_E, MC_EOL), // end of line - [TD_BOL] = ACTION_TAP_DANCE_DOUBLE(KC_A, MC_BOL), // beginning of line - [TD_NW] = ACTION_TAP_DANCE_DOUBLE(KC_F, MC_NW), // next word - [TD_PW] = ACTION_TAP_DANCE_DOUBLE(KC_B, MC_PW), // pevious word - [TD_DW] = ACTION_TAP_DANCE_DOUBLE(KC_W, MC_DW), // pevious word - - [TD_SPC] = ACTION_TAP_DANCE_FN(td_parenthesis), // \(, (), [], {}, <> - [TD_PAR] = ACTION_TAP_DANCE_DOUBLE(KC_LPRN, MC_PAR), // () - [TD_SQR] = ACTION_TAP_DANCE_DOUBLE(KC_LBRC, MC_SQR), // [] - [TD_CUR] = ACTION_TAP_DANCE_DOUBLE(LSFT(KC_LCBR), MC_CUR),// {} - [TD_ABR] = ACTION_TAP_DANCE_DOUBLE(LSFT(KC_COMM), MC_ABR),// -}; diff --git a/users/kuchosauronad0/tap_dances.h b/users/kuchosauronad0/tap_dances.h deleted file mode 100644 index 19da8d69..00000000 --- a/users/kuchosauronad0/tap_dances.h +++ /dev/null @@ -1,26 +0,0 @@ -#pragma once -#include "kuchosauronad0.h" - -#ifdef TAP_DANCE_ENABLE -enum { - TD_RESET = 0, - TD_SPC, // for special function td_parenthesis testing - TD_NUM1, // compact gaming numpad - TD_NUM2, // - TD_NUM3, // - TD_TMX, // tmux control sequence - TD_EOL, // end of line - TD_BOL, // beginning of line - TD_NW, // next word - TD_PW, // pevious word - TD_DW, // delete word - TD_QT1, // single double quote for ' - TD_QT2, // single double quote for " - TD_QT3, // single double quote for ` - TD_PAR, // single double parenthesis - TD_CUR, // single double curly braces - TD_SQR, // single double square brackets - TD_ABR // single double angle brackets -}; -#endif // TAP_DANCE_ENABLE -void td_parenthesis (qk_tap_dance_state_t *state, void *user_data); diff --git a/users/kuchosauronad0/template.c b/users/kuchosauronad0/template.c deleted file mode 100644 index 475e45d3..00000000 --- a/users/kuchosauronad0/template.c +++ /dev/null @@ -1,125 +0,0 @@ -#include "template.h" - - -// Add reconfigurable functions here, for keymap customization -// This allows for a global, userspace functions, and continued -// customization of the keymap. Use _keymap instead of _user -// functions in the keymaps -__attribute__ ((weak)) -void matrix_init_keymap(void) {} - -// Call user matrix init, then call the keymap's init function -void matrix_init_user(void) { - matrix_init_keymap(); -} - - -__attribute__ ((weak)) -void matrix_scan_keymap(void) {} - -// No global matrix scan code, so just run keymap's matix -// scan function -__attribute__ ((weak)) -void matrix_scan_user(void) { - matrix_scan_keymap(); -} - - -__attribute__ ((weak)) -bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { - return true; -} - -// Defines actions tor my global custom keycodes. Defined in drashna.h file -// Then runs the _keymap's recod handier if not processed here, -// And use "NEWPLACEHOLDER" for new safe range -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - - switch (keycode) { - case KC_MAKE: - if (!record->event.pressed) { - SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP -#if (defined(BOOTLOADER_DFU) || defined(BOOTLOADER_LUFA_DFU) || defined(BOOTLOADER_QMK_DFU)) - ":dfu" -#elif defined(BOOTLOADER_HALFKAY) - ":teensy" -#elif defined(BOOTLOADER_CATERINA) - ":avrdude" -#endif - SS_TAP(X_ENTER)); - } - return false; - break; - - case VRSN: - if (record->event.pressed) { - SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); - } - return false; - break; - } - return process_record_keymap(keycode, record); -} - - -__attribute__ ((weak)) -uint32_t layer_state_set_keymap (uint32_t state) { - return state; -} - -uint32_t layer_state_set_user (uint32_t state) { - return layer_state_set_keymap (state); -} - - - -__attribute__ ((weak)) -void led_set_keymap(uint8_t usb_led) {} - -void led_set_user(uint8_t usb_led) { - led_set_keymap(usb_led); -} - - - -__attribute__ ((weak)) -void suspend_power_down_keymap(void) {} - -void suspend_power_down_user(void) -{ - suspend_power_down_keymap(); -} - - - -__attribute__ ((weak)) -void suspend_wakeup_init_keymap(void) {} - -void suspend_wakeup_init_user(void) -{ - suspend_wakeup_init_keymap(); - #ifdef KEYBOARD_ergodox_ez - wait_ms(10); - #endif -} - - - -__attribute__ ((weak)) -void startup_keymap(void) {} - -void startup_user (void) { - #ifdef RGBLIGHT_ENABLE - matrix_init_rgb(); - #endif //RGBLIGHT_ENABLE - startup_keymap(); -} - - - -__attribute__ ((weak)) -void shutdown_keymap(void) {} - -void shutdown_user (void) { - shutdown_keymap(); -} diff --git a/users/kuchosauronad0/template.h b/users/kuchosauronad0/template.h deleted file mode 100644 index dd1c4876..00000000 --- a/users/kuchosauronad0/template.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef USERSPACE -#define USERSPACE - -#include "quantum.h" -#include "version.h" -#include "eeprom.h" - -// Define layer names -#define BASE 0 - -enum custom_keycodes { - VRSN = SAFE_RANGE, // can always be here - KC_MAKE, - KC_RESET, - NEWPLACEHOLDER //use "NEWPLACEHOLDER for keymap specific codes -}; - -#endif diff --git a/users/kuchosauronad0/unicode.c b/users/kuchosauronad0/unicode.c deleted file mode 100644 index 8b312deb..00000000 --- a/users/kuchosauronad0/unicode.c +++ /dev/null @@ -1,62 +0,0 @@ -#include "unicode.h" - -//#ifdef UNICODEMAP_ENABLE -const uint32_t PROGMEM unicode_map[] = { - [BANG] = 0x0203D,// ‽ - [IRONY] = 0x02E2E,// ⸮ - [DEGREE] = 0x000B0,// ° - [THINK] = 0x1F914,// 🤔 - [GRIN] = 0x1F600,// � - [MONOCL] = 0x1F9D0,// 🧐 - [DRUG0] = 0x1F92A,// 🤪 - [DRUG1] = 0x1F974,// 🥴 - [CLOWN] = 0x1F921,// 🤡 - [MNDBLWN] = 0x1F92F,// 🤯 - [MONEY] = 0x1F911,// 🤑 - [SHTUP] = 0x1F910,// 🤐 - [PARTY] = 0x1F973,// 🥳 - [SMRK] = 0x1F60F,// 😏 - [WEARY] = 0x1F629,// 😩 - [UNAMU] = 0x1F612,// 😒 - [SPY] = 0x1F575,//🕵 - [DAFUQ] = 0x1F47A,// 👺 - [FIST0] = 0x1F91B,// 🤛 - [FIST1] = 0x1F91C,// 🤜 - [FIST2] = 0x270A, // ✊ - [FIST3] = 0x1F44A,// 👊 - [WIFIHAND] = 0x1F44B,// 👋 - [OKOK] = 0x1F44C,// 👌 - [EFFU] = 0x1F595,// 🖕 - [SPOCK] = 0x1F596,// 🖖 - [INUP] = 0x1F446,// 👆 - [THDN] = 0x1F44E,// 👎 - [THUP] = 0x1F44D,// 👍 - [TUMBLER] = 0x1F943,// 🥃 - [DRAGON0] = 0x1F409,// 🐉 - [DRAGON1] = 0x1F432,// 🐲 - [TIGER0] = 0x1F405,// 🐅 - [TIGER1] = 0x1F42F,// 🐯 - [COOL] = 0x1F192,// 🆒 - [UCHART] = 0x1F4C8,// 📈 - [DCHART] = 0x1F4C9,// 📉 - [BCHART] = 0x1F4CA,// 📊 - [NOPRCY] = 0x1F572,// 🕲 - [PRCY] = 0x1F571,// 🕱 - [BBB] = 0x1F171,// 🅱 - [POO] = 0x1F4A9,// 💩 - [HUNDR] = 0x1F4AF,// 💯 - [EGGPL] = 0x1F346,// 🍆 - [WATER] = 0x1F4A6,// 💦 - [LIT] = 0x1F525,// 🔥 - [SNEK] = 0x1F40D,// 🐍 - [PENGUIN] = 0x1F427,// 🐧 - [BOAR] = 0x1F417,// 🐗 - [MONKEY] = 0x1F412,// 🐒 - [CHICK] = 0x1F425,// 🐥 - [DASH] = 0x1F4A8,// 💨 - [DIZZY] = 0x1F4AB,// 💫 - [KEEB] = 0x1F5AE,// 🖮 - [HOLE] = 0x1F573,// 🕳 - [SAUCER] = 0x1F6F8// 🛸 - }; -//#endif // UNICODEMAP_ENABLE diff --git a/users/kuchosauronad0/unicode.h b/users/kuchosauronad0/unicode.h deleted file mode 100644 index cb550243..00000000 --- a/users/kuchosauronad0/unicode.h +++ /dev/null @@ -1,67 +0,0 @@ -#pragma once - -#include "quantum.h" - -void send_unicode_hex_string(const char* str); - -/* use X(n) to call the */ -#ifdef UNICODEMAP_ENABLE -enum unicode_name { -OKOK, // -BANG, // ‽ -IRONY, // ⸮ -DEGREE, // ° -THINK, // 🤔 -GRIN, // � -MONOCL, // 🧐 -DRUG0, // 🤪 -DRUG1, // 🥴 -CLOWN, // 🤡 -MNDBLWN, // 🤯 -MONEY, // 🤑 -SHTUP, // 🤐 -PARTY, // 🥳 -SMRK, // 😏 -WEARY, // 😩 -UNAMU, // 😒 -SPY, // 🕵 -DAFUQ, // 👺 -FIST0, // 🤛 -FIST1, // 🤜 -FIST2, // ✊ -FIST3, // 👊 -WIFIHAND, // 👌 -EFFU, // 🖕 -SPOCK, // 🖖 -INUP, // 👆 -THDN, // 👎 -THUP, // 👍 -TUMBLER, // 🥃 -DRAGON0, // 🐉 -DRAGON1, // 🐅 -TIGER0, // 🐅 -TIGER1, // 🐯 -COOL, // 🆒 -UCHART, // 📈 -DCHART, // 📉 -BCHART, // 📊 -NOPRCY, // 🕲 -PRCY, // 🕱 -BBB, // 🅱 -POO, // 💩 -HUNDR, // 💯 -EGGPL, // 🍆 -WATER, // 💦 -LIT, // 🔥 -SNEK, // 🐍 -PENGUIN, // 🐧 -BOAR, // 🐗 -MONKEY, // 🐒 -CHICK, // 🐥 -DASH, // 💨 -DIZZY, // 💫 -KEEB, // 🖮 -HOLE, // 🕳 -SAUCER // 🛸 -}; -#endif diff --git a/users/kuchosauronad0/wrappers.h b/users/kuchosauronad0/wrappers.h deleted file mode 100644 index 6dc19d93..00000000 --- a/users/kuchosauronad0/wrappers.h +++ /dev/null @@ -1,212 +0,0 @@ -#pragma once -#include "kuchosauronad0.h" -/* -Since our quirky block definitions are basically a list of comma separated -arguments, we need a wrapper in order for these definitions to be -expanded before being used as arguments to the LAYOUT_xxx macro. -*/ -#if (!defined(LAYOUT) && defined(KEYMAP)) -# define LAYOUT KEYMAP -#endif - -#define LAYOUT_ergodox_wrapper(...) LAYOUT_ergodox(__VA_ARGS__) -#define LAYOUT_ergodox_pretty_wrapper(...) LAYOUT_ergodox_pretty(__VA_ARGS__) -#define KEYMAP_wrapper(...) LAYOUT(__VA_ARGS__) -#define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__) -#define LAYOUT_ortho_4x12_wrapper(...) LAYOUT_ortho_4x12(__VA_ARGS__) -#define LAYOUT_ortho_5x12_wrapper(...) LAYOUT_ortho_5x12(__VA_ARGS__) - -#define LAYOUT_collide39_base_wrapper(...) LAYOUT_collide39_base(__VA_ARGS__) - -/* -Blocks for each of the four major keyboard layouts -Organized so we can quickly adapt and modify all of them -at once, rather than for each keyboard, one at a time. -And this allows for much cleaner blocks in the keymaps. -For instance Tap/Hold for Control on all of the layouts -NOTE: These are all the same length. If you do a search/replace - then you need to add/remove underscores to keep the - lengths consistent. -*/ - -#define ___________________BLANK___________________ _______, _______, _______, _______, _______ - -#ifdef TAP_DANCE_ENABLE -# define _________________QWERTY_L1_________________ KC_Q, KC_DW, KC_EOL, KC_R, KC_TMX -# define _________________QWERTY_L2_________________ KC_BOL, KC_S, KC_D, KC_NW, KC_G -# define _________________QWERTY_L3_________________ KC_Z, KC_X, KC_C, KC_V, KC_PW -#else -# 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 -#endif - -#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_SLASH - -#define _________________PLOVER_L1_________________ KC_Q, KC_W, KC_E, KC_R, KC_T -#define _________________PLOVER_L2_________________ KC_A, KC_S, KC_D, KC_F, KC_G -#define _________________PLOVER_L3_________________ KC_NO, KC_NO, KC_C, KC_V, KC_NO - -#define _________________PLOVER_R1_________________ KC_Y, KC_U, KC_I, KC_O, KC_P -#define _________________PLOVER_R2_________________ KC_H, KC_J, KC_K, KC_L, KC_SCLN -#define _________________PLOVER_R3_________________ KC_NO, KC_NO, KC_N, KC_M, KC_NO - -#define _________________COLEMAK_L1________________ KC_Q, KC_W, KC_F, KC_P, KC_G -#define _________________COLEMAK_L2________________ KC_A, KC_R, KC_S, KC_T, KC_D -#define _________________COLEMAK_L3________________ KC_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, KC_O -#define _________________COLEMAK_R3________________ KC_K, KC_M, KC_COMM, KC_DOT, KC_SLASH - -#define ______________COLEMAK_MOD_DH_L1____________ KC_Q, KC_W, KC_F, KC_P, KC_B -#define ______________COLEMAK_MOD_DH_L2____________ KC_A, KC_R, KC_S, KC_T, KC_G -#define ______________COLEMAK_MOD_DH_L3____________ KC_Z, KC_X, KC_C, KC_D, KC_V - -#define ______________COLEMAK_MOD_DH_R1____________ KC_J, KC_L, KC_U, KC_Y, KC_SCLN -#define ______________COLEMAK_MOD_DH_R2____________ KC_M, KC_N, KC_E, KC_I, KC_O -#define ______________COLEMAK_MOD_DH_R3____________ KC_K, KC_H, KC_COMM, KC_DOT, KC_SLASH - -#define _________________DVORAK_L1_________________ KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y -#define _________________DVORAK_L2_________________ KC_A, KC_O, KC_E, KC_U, KC_I -#define _________________DVORAK_L3_________________ KC_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, KC_S -#define _________________DVORAK_R3_________________ KC_B, KC_M, KC_W, KC_V, KC_Z - -#define ________________DVORAK_AU_L1_______________ KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y -#define ________________DVORAK_AU_L2_______________ KC_O, KC_A, KC_E, KC_I, KC_U -#define ________________DVORAK_AU_L3_______________ KC_SCLN, KC_Q, KC_J, KC_K, KC_X - -#define ________________DVORAK_AU_R1_______________ KC_F, KC_G, KC_C, KC_R, KC_L -#define ________________DVORAK_AU_R2_______________ KC_D, KC_H, KC_T, KC_N, KC_S -#define ________________DVORAK_AU_R3_______________ KC_B, KC_M, KC_W, KC_V, KC_Z - -#define _________________WORKMAN_L1________________ KC_Q, KC_D, KC_R, KC_W, KC_B -#define _________________WORKMAN_L2________________ KC_A, KC_S, KC_H, KC_T, KC_G -#define _________________WORKMAN_L3________________ KC_Z, KC_X, KC_M, KC_C, KC_V - -#define _________________WORKMAN_R1________________ KC_J, KC_F, KC_U, KC_P, KC_SCLN -#define _________________WORKMAN_R2________________ KC_Y, KC_N, KC_E, KC_O, KC_I -#define _________________WORKMAN_R3________________ KC_K, KC_L, KC_COMM, KC_DOT, KC_SLASH - -#define _________________NORMAN_L1_________________ KC_Q, KC_W, KC_D, KC_F, KC_K -#define _________________NORMAN_L2_________________ KC_A, KC_S, KC_E, KC_T, KC_G -#define _________________NORMAN_L3_________________ KC_Z, KC_X, KC_C, KC_V, KC_B - -#define _________________NORMAN_R1_________________ KC_J, KC_U, KC_R, KC_L, KC_SCLN -#define _________________NORMAN_R2_________________ KC_Y, KC_N, KC_I, KC_O, KC_U -#define _________________NORMAN_R3_________________ KC_P, KC_M, KC_COMM, KC_DOT, KC_SLASH - -#define _________________MALTRON_L1________________ KC_Q, KC_P, KC_Y, KC_C, KC_B -#define _________________MALTRON_L2________________ KC_A, KC_N, KC_I, KC_S, KC_F -#define _________________MALTRON_L3________________ KC_SCLN, KC_SLSH, KC_J, KC_G, KC_COMM - -#define _________________MALTRON_R1________________ KC_V, KC_M, KC_U, KC_Z, KC_L -#define _________________MALTRON_R2________________ KC_D, KC_T, KC_D, KC_O, KC_R -#define _________________MALTRON_R3________________ KC_DOT, KC_W, KC_K, KC_MINS, KC_X - -#define _________________EUCALYN_L1________________ KC_SLSH, KC_COMM, KC_DOT, KC_F, KC_Q -#define _________________EUCALYN_L2________________ KC_A, KC_O, KC_E, KC_I, KC_U -#define _________________EUCALYN_L3________________ KC_Z, KC_X, KC_C, KC_V, KC_W - -#define _________________EUCALYN_R1________________ KC_M, KC_R, KC_D, KC_Y, KC_P -#define _________________EUCALYN_R2________________ KC_G, KC_T, KC_K, KC_S, KC_N -#define _________________EUCALYN_R3________________ KC_B, KC_H, KC_J, KC_L, KC_SCLN - -#define _____________CARPLAX_QFMLWY_L1_____________ KC_Q, KC_F, KC_M, KC_L, KC_W -#define _____________CARPLAX_QFMLWY_L2_____________ KC_D, KC_S, KC_T, KC_N, KC_R -#define _____________CARPLAX_QFMLWY_L3_____________ KC_Z, KC_V, KC_G, KC_C, KC_X - -#define _____________CARPLAX_QFMLWY_R1_____________ KC_Y, KC_U, KC_O, KC_B, KC_J -#define _____________CARPLAX_QFMLWY_R2_____________ KC_I, KC_A, KC_E, KC_H, KC_SCLN -#define _____________CARPLAX_QFMLWY_R3_____________ KC_P, KC_K, KC_COMM, KC_DOT, KC_SLSH - -#define _____________CARPLAX_QGMLWB_L1_____________ KC_Q, KC_G, KC_M, KC_L, KC_W -#define _____________CARPLAX_QGMLWB_L2_____________ KC_D, KC_S, KC_T, KC_N, KC_R -#define _____________CARPLAX_QGMLWB_L3_____________ KC_Z, KC_X, KC_C, KC_F, KC_J - -#define _____________CARPLAX_QGMLWB_R1_____________ KC_B, KC_Y, KC_U, KC_V, KC_SCLN -#define _____________CARPLAX_QGMLWB_R2_____________ KC_I, KC_A, KC_E, KC_O, KC_H -#define _____________CARPLAX_QGMLWB_R3_____________ KC_K, KC_P, KC_COMM, KC_DOT, KC_SLSH - -#define _____________CARPLAX_QGMLWY_L1_____________ KC_Q, KC_G, KC_M, KC_L, KC_W -#define _____________CARPLAX_QGMLWY_L2_____________ KC_D, KC_S, KC_T, KC_N, KC_R -#define _____________CARPLAX_QGMLWY_L3_____________ KC_Z, KC_X, KC_C, KC_V, KC_J - -#define _____________CARPLAX_QGMLWY_R1_____________ KC_Y, KC_F, KC_U, KC_B, KC_SCLN -#define _____________CARPLAX_QGMLWY_R2_____________ KC_I, KC_A, KC_E, KC_O, KC_H -#define _____________CARPLAX_QGMLWY_R3_____________ KC_K, KC_P, KC_COMM, KC_DOT, KC_SLSH - -#ifdef UNICODE_ENABLE -# define _______________UNICODE_L1__________________ UC_DISA,UC_DISA, UC_DISA, UC_DISA, UC_DISA -# define _______________UNICODE_L2__________________ UC_DISA,UC_DISA, UC_DISA, UC_DISA, UC_DISA -# define _______________UNICODE_L3__________________ UC_DISA,UC_DISA, UC_DISA, UC_DISA, UC_DISA - -# define _______________UNICODE_R1__________________ UC_SHRG, UC_SHRG, UC_SHRG, UC_SHRG, UC_SHRG -# define _______________UNICODE_R2__________________ UC_SHRG, UC_SHRG, UC_SHRG, UC_SHRG, UC_SHRG -# define _______________UNICODE_R3__________________ UC_SHRG, UC_SHRG, UC_SHRG, UC_SHRG, UC_SHRG -#endif - -#ifdef UNICODEMAP_ENABLE -# define _______________UNICODE_L1__________________ X(SMRK), X(THINK), X(CLOWN), X(HUNDR), X(BANG) -# define _______________UNICODE_L2__________________ X(GRIN), X(MONKEY), X(OKOK), X(EGGPL), X(LIT) -# define _______________UNICODE_L3__________________ X(WEARY), X(UNAMU), X(EFFU), X(MONOCL), X(IRONY) - -# define _______________UNICODE_R1__________________ X(DRUG0), X(THUP), X(INUP), X(DIZZY), X(COOL) -# define _______________UNICODE_R2__________________ X(FIST0), X(FIST2), X(FIST3), X(FIST1), X(OKOK) -# define _______________UNICODE_R3__________________ X(MNDBLWN), X(THDN), X(SPOCK), X(HOLE), X(DASH) -#endif - -#define ________________NUMBER_LEFT________________ KC_1, KC_2, KC_3, KC_4, KC_5 -#define ________________NUMBER_RIGHT_______________ KC_6, KC_7, KC_8, KC_9, KC_0 -#define _________________FUNC_LEFT_________________ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5 -#define _________________FUNC_RIGHT________________ KC_F6, KC_F7, KC_F8, KC_F9, KC_F10 - -#define _________________MEDIA_RIGHT_______________ KC_MUTE, KC_MPRV, KC_MPLY, KC_MNXT, KC_MSTP -#define _________________MEDIA_LEFT________________ KC_VOLD, KC_VOLD, KC_MUTE, KC_VOLU, KC_VOLU - -#define _________________LOWER_L1__________________ KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC -#define _________________LOWER_L2__________________ ___________________BLANK___________________ -#define _________________LOWER_L3__________________ _______, _______, _______, OS_UNI, TM_X - -#define _________________LOWER_R1__________________ KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN -#define _________________LOWER_R2__________________ _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR -#define _________________LOWER_R3__________________ _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT - -#define _________________RAISE_L1__________________ ________________NUMBER_LEFT________________ -#define _________________RAISE_L2__________________ ___________________BLANK___________________ -#define _________________RAISE_L3__________________ ___________________BLANK___________________ - -#define _________________RAISE_R1__________________ ________________NUMBER_RIGHT_______________ -#define _________________RAISE_R2__________________ _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC -#define _________________RAISE_R3__________________ _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END - -#define _________________ADJUST_L1_________________ QWERTY, COLEMAK, DVORAK, WORKMAN, PLOVER -#define _________________ADJUST_L2_________________ _________________FUNC_LEFT_________________ -#define _________________ADJUST_L3_________________ _________________MEDIA_LEFT________________ - -#define _________________ADJUST_R1_________________ SEC1, SEC2, SEC3, SEC4, SEC5 -#define _________________ADJUST_R2_________________ _________________FUNC_RIGHT________________ -#define _________________ADJUST_R3_________________ _________________MEDIA_RIGHT_______________ - -#define _________________RGB_UP____________________ RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_TOG -#define _________________RGB_CENTER________________ MU_TOG , CK_TOGG, AU_ON, AU_OFF, AG_NORM -#define _________________RGB_DOWN__________________ RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, KC_RGB_T - -#define _________________RGB_R1____________________ RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_TOG -#define _________________RGB_R2____________________ MU_TOG , CK_TOGG, AU_ON, AU_OFF, AG_NORM -#define _________________RGB_R3____________________ RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, KC_RGB_T - -#define __________________GAMEPAD_L1_______________ _______, KC_Q, KC_W, KC_E, _______ -#define __________________GAMEPAD_L2_______________ _______, KC_A, KC_S, KC_D, _______ -#define __________________GAMEPAD_L3_______________ KC_1, KC_2, KC_3, KC_4, KC_5 - -#define __________________GAMEPAD_R1_______________ _______, KC_U, KC_UP, KC_O, _______ -#define __________________GAMEPAD_R2_______________ _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______ -#define __________________GAMEPAD_R3_______________ KC_6, KC_7, KC_8, KC_9, KC_0 -/* vi: ft=c:tw=80:sw=2:ts=2:sts=2:et */ - diff --git a/users/losinggeneration/README.md b/users/losinggeneration/README.md deleted file mode 100644 index 852103fc..00000000 --- a/users/losinggeneration/README.md +++ /dev/null @@ -1,185 +0,0 @@ -losinggeneration's ortholinear layout -============================ - -### Features - -- Main layer(s) - - The left space bar key has been changed to delete to have backspace - & delete on the same main layer. - - Adujst is a tap dance with one tap goes to the Adjust layer, second tap - goes to the Numpad layer, a third tap goes to the Mouse layer. More taps - are an error and disables tapping until you stop and try again. - - Ctrl when tapped once & Ctrl+Alt when tapped twice - - Left Alt when tapped once & Right Alt when tapped twice. - - Left GUI when tapped once & right GUI when tapped twice. This is - because I have a compose key on the right GUI key. - - Left shift is a one shot modifier. - - Enter when tapped Shift when held. - - Esc when tapped Ctrl when held. -- Lower & Raise - - Removed ISO ~, ISO |, ISO #, ISO /, Media Next, & Media Play - - Added PgUp, PgDn, Home, & End under the home row - - Added Mute next to Vol- -- New layers: Workman, Game, Numpad, & Mouse - -## Layouts -These include the 5x12 layout since it's nearly identical to the 4x12 layout. -The only difference is the top row is removed for the 4x12 layout. - -The Adjust layer keyboard specific, so it's described with the specific -keyboard. - -### Qwerty - -``` - ,-----------------------------------------..-----------------------------------------. - | ` | 1 | 2 | 3 | 4 | 5 || 6 | 7 | 8 | 9 | 0 | Del | - |------+------+------+------+------+------||------+------+------+------+------+------| - | Tab | Q | W | E | R | T || Y | U | I | O | P | Bksp | - |------+------+------+------+------+------||------+------+------+------+------+------| - | Esc | A | S | D | F | G || H | J | K | L | ; | " | - |------+------+------+------+------+------||------+------+------+------+------+------| - | Shift| Z | X | C | V | B || N | M | , | . | / |Enter | - |------+------+------+------+------+------||------+------+------+------+------+------| - |Adjust| Ctrl | Alt | GUI |Lower | Bksp ||Space |Raise | Left | Down | Up |Right | - `-----------------------------------------'`-----------------------------------------' -``` - -### Colemak - -``` - ,-----------------------------------------.,-----------------------------------------. - | ` | 1 | 2 | 3 | 4 | 5 || 6 | 7 | 8 | 9 | 0 | Del | - |------+------+------+------+------+------||------+------+------+------+------+------| - | Tab | Q | W | F | P | G || J | L | U | Y | ; | Bksp | - |------+------+------+------+------+------||------+------+------+------+------+------| - | Esc | A | R | S | T | D || H | N | E | I | O | " | - |------+------+------+------+------+------||------+------+------+------+------+------| - | Shift| Z | X | C | V | B || K | M | , | . | / |Enter | - |------+------+------+------+------+------||------+------+------+------+------+------| - |Adjust| Ctrl | Alt | GUI |Lower | Bksp ||Space |Raise | Left | Down | Up |Right | - `-----------------------------------------'`-----------------------------------------' -``` - -### Workman - -``` - ,-----------------------------------------..-----------------------------------------. - | ` | 1 | 2 | 3 | 4 | 5 || 6 | 7 | 8 | 9 | 0 | Del | - |------+------+------+------+------+------||------+------+------+------+------+------| - | Tab | Q | D | R | W | B || J | F | U | P | ; | Bksp | - |------+------+------+------+------+------||------+------+------+------+------+------| - | Esc | A | S | H | T | G || Y | N | E | O | I | " | - |------+------+------+------+------+------||------+------+------+------+------+------| - | Shift| Z | X | M | C | V || K | L | , | . | / |Enter | - |------+------+------+------+------+------||------+------+------+------+------+------| - |Adjust| Ctrl | Alt | GUI |Lower | Bksp ||Space |Raise | Left | Down | Up |Right | - `-----------------------------------------'`-----------------------------------------' -``` - -### Dvorak - -``` - ,-----------------------------------------..-----------------------------------------. - | ` | 1 | 2 | 3 | 4 | 5 || 6 | 7 | 8 | 9 | 0 | Del | - |------+------+------+------+------+------||------+------+------+------+------+------| - | Tab | " | , | . | P | Y || F | G | C | R | L | Bksp | - |------+------+------+------+------+------||------+------+------+------+------+------| - | Esc | A | O | E | U | I || D | H | T | N | S | / | - |------+------+------+------+------+------||------+------+------+------+------+------| - | Shift| ; | Q | J | K | X || B | M | W | V | Z |Enter | - |------+------+------+------+------+------||------+------+------+------+------+------| - |Adjust| Ctrl | Alt | GUI |Lower | Bksp ||Space |Raise | Left | Down | Up |Right | - `-----------------------------------------'`-----------------------------------------' -``` - -### Game (Qwerty without one shot modifiers & tap dancing) - -``` - ,-----------------------------------------..-----------------------------------------. - | ` | 1 | 2 | 3 | 4 | 5 || 6 | 7 | 8 | 9 | 0 | Del | - |------+------+------+------+------+------||------+------+------+------+------+------| - | Tab | Q | W | E | R | T || Y | U | I | O | P | Bksp | - |------+------+------+------+------+------||------+------+------+------+------+------| - | Esc | A | S | D | F | G || H | J | K | L | ; | " | - |------+------+------+------+------+------||------+------+------+------+------+------| - | Shift| Z | X | C | V | B || N | M | , | . | / |Enter | - |------+------+------+------+------+------||------+------+------+------+------+------| - |Adjust| Ctrl | Alt | GUI |Lower |Space ||Space |Raise | Left | Down | Up |Right | - `-----------------------------------------'`-----------------------------------------' -``` - -### Number pad - -``` - ,-----------------------------------------..-----------------------------------------. - | XXX | XXX | XXX | XXX | XXX | XXX || XXX | NLCK | * | / | BKSP | BKSP | - |------+------+------+------+------+------||------+------+------+------+------+------| - | Tab | XXX | XXX | XXX | XXX | XXX || NLCK | 7 | 8 | 9 | - | BKSP | - |------+------+------+------+------+------||------+------+------+------+------+------| - | Esc | XXX | XXX | XXX | XXX | XXX || * | 4 | 5 | 6 | + | BKSP | - |------+------+------+------+------+------||------+------+------+------+------+------| - |Shift | XXX | XXX | XXX | XXX | XXX || / | 1 | 2 | 3 | ENT | XXX | - |------+------+------+------+------+------||------+------+------+------+------+------| - |Adjust| Ctrl | Alt | GUI | XXX |Space ||Space | 0 | 0 | . | ENT | XXX | - `-----------------------------------------''-----------------------------------------' -``` - -### Mouse movement - -* M is short for Mouse -* MW is short for Mouse Wheel -* MB is short for Mouse Button -* MA is short for Mouse Acceleration - -  -* MB\_1 is the left click -* MB\_2 is the right click -* MB\_3 is the middle click - -``` - ,-----------------------------------------..-----------------------------------------. - | XXX | XXX | XXX | XXX | XXX | XXX || XXX | XXX | XXX | XXX | XXX | XXX | - |------+------+------+------+------+------||------+------+------+------+------+------| - | Tab | MB_1 | MB_3 | MB_2 | MB_4 | MB_5 || MA_0 | MB_1 | MB_3 | MB_2 | MB_4 | MB_5 | - |------+------+------+------+------+------||------+------+------+------+------+------| - | Esc | MW_L | MW_U | MW_D | MW_R | XXX || MA_1 | M_LT | M_UP | M_DN | M_RT | XXX | - |------+------+------+------+------+------||------+------+------+------+------+------| - |Shift | MA_0 | MA_1 | MA_2 | XXX | XXX || MA_2 | MW_L | MW_U | MW_D | MW_R | XXX | - |------+------+------+------+------+------||------+------+------+------+------+------| - |Adjust| Ctrl | Alt | GUI | XXX |Space || XXX | XXX | XXX | XXX | XXX | XXX | - `-----------------------------------------''-----------------------------------------' -``` - -### Lower - -``` - ,-----------------------------------------..-----------------------------------------. - | ~ | ! | @ | # | $ | % || ^ | & | * | ( | ) | Del | - |------+------+------+------+------+------||------+------+------+------+------+------| - | ~ | ! | @ | # | $ | % || ^ | & | * | ( | ) | Bksp | - |------+------+------+------+------+------||------+------+------+------+------+------| - | Del | F1 | F2 | F3 | F4 | F5 || F6 | _ | + | | \ | | | - |------+------+------+------+------+------||------+------+------+------+------+------| - | | F7 | F8 | F9 | F10 | F11 || F12 | PgUp | PgDn | Home | End | ⏹ | - |------+------+------+------+------+------||------+------+------+------+------+------| - | | | | | | || | | Mute | Vol- | Vol+ | ⏯ | - `-----------------------------------------'`-----------------------------------------' -``` - -### Raise - -``` - ,-----------------------------------------..-----------------------------------------. - | ` | 1 | 2 | 3 | 4 | 5 || 6 | 7 | 8 | 9 | 0 | Del | - |------+------+------+------+------+------||------+------+------+------+------+------| - | ` | 1 | 2 | 3 | 4 | 5 || 6 | 7 | 8 | 9 | 0 | Bksp | - |------+------+------+------+------+------||------+------+------+------+------+------| - | Del | F1 | F2 | F3 | F4 | F5 || F6 | - | = | [ | ] | \ | - |------+------+------+------+------+------||------+------+------+------+------+------| - | | F7 | F8 | F9 | F10 | F11 || F12 | PgUp | PgDn | Home | End | ⏹ | - |------+------+------+------+------+------||------+------+------+------+------+------| - | | | | | | || | | Mute | Vol- | Vol+ | ⏯ | - `-----------------------------------------''-----------------------------------------' -``` - diff --git a/users/losinggeneration/losinggeneration-common.h b/users/losinggeneration/losinggeneration-common.h deleted file mode 100644 index 857117ca..00000000 --- a/users/losinggeneration/losinggeneration-common.h +++ /dev/null @@ -1,71 +0,0 @@ -#ifndef LOSINGGENERATION_COMMON_H -#define LOSINGGENERATION_COMMON_H - -/* Custom keys & combinations to be shorter for keymaps */ -#define KC_LCA LCA(KC_NO) - -#define OSM_LSFT OSM(MOD_LSFT) -#define TD_CTL TD(TD_CTL_CTLALT) -#define TD_GUI TD(TD_LGUI_RGUI) -#define TD_ALT TD(TD_LALT_RALT) -#define MT_ENT SFT_T(KC_ENT) -#define MT_ESC CTL_T(KC_ESC) - -/* Custom layer movements for keymaps */ -#define TD_ADJ TD(TD_ADJUST) -#define TO_GAME TO(_GAME) -#define TO_MS TO(_MOUSE) -#define TO_NUM TO(_NUMPAD) -#define MO_ADJ MO(_ADJUST) - -/* Mouse keys */ -#define MS_BTN1 KC_MS_BTN1 -#define MS_BTN2 KC_MS_BTN2 -#define MS_BTN3 KC_MS_BTN3 -#define MS_BTN4 KC_MS_BTN4 -#define MS_BTN5 KC_MS_BTN5 -#define MS_LEFT KC_MS_LEFT -#define MS_DOWN KC_MS_DOWN -#define MS_UP KC_MS_UP -#define MS_RGHT KC_MS_RIGHT -#define MW_LEFT KC_MS_WH_LEFT -#define MW_DOWN KC_MS_WH_DOWN -#define MW_UP KC_MS_WH_UP -#define MW_RGHT KC_MS_WH_RIGHT -#define MS_ACL0 KC_MS_ACCEL0 -#define MS_ACL1 KC_MS_ACCEL1 -#define MS_ACL2 KC_MS_ACCEL2 - -/* - * This will expand values sent to it to send to the KEYMAP macro so defines - * can be used by KEYMAP - */ -#define CATMAP(...) LAYOUT(__VA_ARGS__) - -/* - Each layer gets a name for readability, which is then used in the keymap matrix below. - The underscores don't mean anything - you can have a layer called STUFF or any other name. - Layer names don't all need to be of the same length, obviously, and you can also skip them - entirely and just use numbers. -*/ -#define _QWERTY 0 -#define _COLEMAK 1 -#define _WORKMAN 2 -#define _DVORAK 3 -#define _GAME 4 -#define _NUMPAD 5 -#define _MOUSE 6 -#define _LOWER 14 -#define _RAISE 15 -#define _ADJUST 16 - -enum custom_keycodes { - QWERTY = SAFE_RANGE, - COLEMAK, - WORKMAN, - DVORAK, - LOWER, - RAISE, -}; - -#endif diff --git a/users/losinggeneration/losinggeneration-config.h b/users/losinggeneration/losinggeneration-config.h deleted file mode 100644 index e1719aa9..00000000 --- a/users/losinggeneration/losinggeneration-config.h +++ /dev/null @@ -1,29 +0,0 @@ -/* -Copyright 2017 Danny Nguyen -Copyright 2018 Harley Laue - -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 -long with this program. If not, see . -*/ - -#ifndef LOSINGGENERATION_CONFIG_H -#define LOSINGGENERATION_CONFIG_H - -#define MOUSEKEY_DELAY 100 -#define MOUSEKEY_INTERVAL 20 -#define MOUSEKEY_MAX_SPEED 10 -#define MOUSEKEY_TIME_TO_MAX 20 -#define MOUSEKEY_WHEEL_MAX_SPEED 8 -#define MOUSEKEY_WHEEL_TIME_TO_MAX 20 - -#endif diff --git a/users/losinggeneration/losinggeneration-keymap.h b/users/losinggeneration/losinggeneration-keymap.h deleted file mode 100644 index 74170dc3..00000000 --- a/users/losinggeneration/losinggeneration-keymap.h +++ /dev/null @@ -1,379 +0,0 @@ -#ifndef LOSINGGENERATION_KEYMAP_H -#define LOSINGGENERATION_KEYMAP_H - -#include "action_layer.h" -#include "eeconfig.h" -#include "losinggeneration-common.h" - -/* Tap dance keycodes */ -enum tap_dance_keycodes { - TD_CTL_CTLALT = 0, - TD_LGUI_RGUI, - TD_LALT_RALT, - TD_ADJUST, -}; - -/* - Used to indicate a CTRL should be pressed on one press, or CTRL+ALT on - a double tap -*/ -void dance_ctl_ctlalt_each(qk_tap_dance_state_t *state, void *user_data) { - register_code(KC_LCTL); - if(state->count > 1) { - register_code(KC_LALT); - } -} - -/* Used to release CTRL or the double tapped variant CTRL+ALT */ -void dance_ctl_ctlalt_reset(qk_tap_dance_state_t *state, void *user_data) { - unregister_code(KC_LCTL); - if(state->count > 1) { - unregister_code(KC_LALT); - } -} - -/* - Set ADJUST layer on the first press and off after that. - Each is used to make sure ADJUST activates as soon as it's pressed the first - time. -*/ -void dance_adj_each(qk_tap_dance_state_t *state, void *user_data) { - if(state->count == 1) { - layer_on(_ADJUST); - } else { - layer_off(_ADJUST); - } -} - -/* Set NUMPAD layer on second tap and MOUSE layer on 3rd */ -void dance_adj_finish(qk_tap_dance_state_t *state, void *user_data) { - switch(state->count) { - case 1: break; - case 2: - layer_on(_NUMPAD); - break; - case 3: - layer_on(_MOUSE); - break; - default: - reset_tap_dance(state); - break; - } -} - -/* Turn off any layer that may have been tapped on */ -void dance_adj_reset(qk_tap_dance_state_t *state, void *user_data) { - switch(state->count) { - case 1: - layer_off(_ADJUST); - break; - case 2: - layer_off(_NUMPAD); - break; - case 3: - layer_off(_MOUSE); - break; - } -} - -qk_tap_dance_action_t tap_dance_actions[] = { - [TD_CTL_CTLALT] = ACTION_TAP_DANCE_FN_ADVANCED(dance_ctl_ctlalt_each, NULL, dance_ctl_ctlalt_reset), - [TD_LGUI_RGUI] = ACTION_TAP_DANCE_DOUBLE(KC_LGUI, KC_RGUI), - [TD_LALT_RALT] = ACTION_TAP_DANCE_DOUBLE(KC_LALT, KC_RALT), - [TD_ADJUST] = ACTION_TAP_DANCE_FN_ADVANCED(dance_adj_each, dance_adj_finish, dance_adj_reset), -}; - -/* - * ,-----------------------------------------..-----------------------------------------. - * |Adjust| Ctrl | Alt | GUI |Lower | Del ||Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------'`-----------------------------------------' - */ -#define BOTTOM_GRID_ROW \ - TD_ADJ ,TD_CTL , TD_ALT , TD_GUI , LOWER , KC_DEL , KC_SPC , RAISE , KC_LEFT, KC_DOWN, KC_UP , KC_RGHT - -/* - * ,-----------------------------------------..-----------------------------------------. - * |Adjust| Ctrl | Alt | GUI |Lower |Space ||Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------'`-----------------------------------------' - */ -#define BOTTOM_MIT_ROW \ - TD_ADJ ,TD_CTL , TD_ALT , TD_GUI , LOWER , KC_SPC , KC_SPC , RAISE , KC_LEFT, KC_DOWN, KC_UP , KC_RGHT - -#ifdef USE_MIT_LAYOUT -#define BOTTOM_ROW BOTTOM_MIT_ROW - -/* - * ,-----------------------------------------..-----------------------------------------. - * | | F7 | F8 | F9 | F10 | F11 || F12 | PgUp | PgDn | Home | End | ⏹ | - * |------+------+------+------+------+------||------+------+------+------+------+------| - * | | | | | | || | | Mute | Vol- | Vol+ | ⏯ | - * `-----------------------------------------'`-----------------------------------------' - */ -#define BOTTOM_RAISE_LOWER_ROWS \ - _______, KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_PGUP, KC_PGDN, KC_HOME, KC_END , KC_MSTP, \ - _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY - -#else -#define BOTTOM_ROW BOTTOM_GRID_ROW - -/* - * ,-----------------------------------------..-----------------------------------------. - * | | F7 | F8 | F9 | F10 | F11 || F12 | PgUp | PgDn | Home | End | ⏹ | - * |------+------+------+------+------+------||------+------+------+------+------+------| - * | | | | | | || Bksp | | Mute | Vol- | Vol+ | ⏯ | - * `-----------------------------------------'`-----------------------------------------' - */ -#define BOTTOM_RAISE_LOWER_ROWS \ - _______, KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_PGUP, KC_PGDN, KC_HOME, KC_END , KC_MSTP, \ - _______, _______, _______, _______, _______, KC_BSPC, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY -#endif - - -/* - * ,-----------------------------------------..-----------------------------------------. - * | Tab | || | Bksp | - * `-----------------------------------------'`-----------------------------------------' - */ -#define STD_TAB_ROW(...) KC_TAB, __VA_ARGS__, KC_BSPC - -/* - * ,-----------------------------------------..-----------------------------------------. - * | Esc | || | - * `-----------------------------------------'`-----------------------------------------' - */ - -#define STD_ESC_ROW(...) MT_ESC, __VA_ARGS__ - -/* - * ,-----------------------------------------..-----------------------------------------. - * | Shift| || |Enter | - * `-----------------------------------------'`-----------------------------------------' - */ -#define STD_LSFT_ROW(...) OSM_LSFT, __VA_ARGS__, MT_ENT - -/* Qwerty - * ,-----------------------------------------..-----------------------------------------. - * | Tab | Q | W | E | R | T || Y | U | I | O | P | Bksp | - * |------+------+------+------+------+------||------+------+------+------+------+------| - * | Esc | A | S | D | F | G || H | J | K | L | ; | " | - * |------+------+------+------+------+------||------+------+------+------+------+------| - * | Shift| Z | X | C | V | B || N | M | , | . | / |Enter | - * |------+------+------+------+------+------||------+------+------+------+------+------| - * |Adjust| Ctrl | Alt | GUI |Lower | Del ||Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------'`-----------------------------------------' - */ -#define QWERTY_LAYER \ - STD_TAB_ROW( KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P ), \ - STD_ESC_ROW( KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN , KC_QUOT), \ - STD_LSFT_ROW(KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH), \ - BOTTOM_ROW - -/* Colemak - * ,-----------------------------------------.,-----------------------------------------. - * | Tab | Q | W | F | P | G || J | L | U | Y | ; | Bksp | - * |------+------+------+------+------+------||------+------+------+------+------+------| - * | Esc | A | R | S | T | D || H | N | E | I | O | " | - * |------+------+------+------+------+------||------+------+------+------+------+------| - * | Shift| Z | X | C | V | B || K | M | , | . | / |Enter | - * |------+------+------+------+------+------||------+------+------+------+------+------| - * |Adjust| Ctrl | Alt | GUI |Lower | Del ||Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------'`-----------------------------------------' - */ -#define COLEMAK_LAYER \ - STD_TAB_ROW( KC_Q , KC_W , KC_F , KC_P , KC_G , KC_J , KC_L , KC_U , KC_Y , KC_SCLN), \ - STD_ESC_ROW( KC_A , KC_R , KC_S , KC_T , KC_D , KC_H , KC_N , KC_E , KC_I , KC_O , KC_QUOT), \ - STD_LSFT_ROW(KC_Z , KC_X , KC_C , KC_V , KC_B , KC_K , KC_M , KC_COMM, KC_DOT , KC_SLSH), \ - BOTTOM_ROW - -/* Workman - * ,-----------------------------------------..-----------------------------------------. - * | Tab | Q | D | R | W | B || J | F | U | P | ; | Bksp | - * |------+------+------+------+------+------||------+------+------+------+------+------| - * | Esc | A | S | H | T | G || Y | N | E | O | I | " | - * |------+------+------+------+------+------||------+------+------+------+------+------| - * | Shift| Z | X | M | C | V || K | L | , | . | / |Enter | - * |------+------+------+------+------+------||------+------+------+------+------+------| - * |Adjust| Ctrl | Alt | GUI |Lower | Del ||Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------'`-----------------------------------------' - */ -#define WORKMAN_LAYER \ - STD_TAB_ROW( KC_Q , KC_D , KC_R , KC_W , KC_B , KC_J , KC_F , KC_U , KC_P , KC_SCLN), \ - STD_ESC_ROW( KC_A , KC_S , KC_H , KC_T , KC_G , KC_Y , KC_N , KC_E , KC_O , KC_I , KC_QUOT), \ - STD_LSFT_ROW(KC_Z , KC_X , KC_M , KC_C , KC_V , KC_K , KC_L , KC_COMM, KC_DOT , KC_SLSH), \ - BOTTOM_ROW - -/* Dvorak - * ,-----------------------------------------..-----------------------------------------. - * | Tab | " | , | . | P | Y || F | G | C | R | L | Bksp | - * |------+------+------+------+------+------||------+------+------+------+------+------| - * | Esc | A | O | E | U | I || D | H | T | N | S | / | - * |------+------+------+------+------+------||------+------+------+------+------+------| - * | Shift| ; | Q | J | K | X || B | M | W | V | Z |Enter | - * |------+------+------+------+------+------||------+------+------+------+------+------| - * |Adjust| Ctrl | Alt | GUI |Lower | Del ||Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------'`-----------------------------------------' - */ -#define DVORAK_LAYER \ - STD_TAB_ROW( KC_QUOT, KC_COMM, KC_DOT , KC_P , KC_Y , KC_F , KC_G , KC_C , KC_R , KC_L), \ - STD_ESC_ROW( KC_A , KC_O , KC_E , KC_U , KC_I , KC_D , KC_H , KC_T , KC_N , KC_S , KC_SLSH), \ - STD_LSFT_ROW(KC_SCLN, KC_Q , KC_J , KC_K , KC_X , KC_B , KC_M , KC_W , KC_V , KC_Z), \ - BOTTOM_ROW - -/* Game (Qwerty without one shot modifiers & tap dancing) - * ,-----------------------------------------..-----------------------------------------. - * | Tab | Q | W | E | R | T || Y | U | I | O | P | Bksp | - * |------+------+------+------+------+------||------+------+------+------+------+------| - * | Esc | A | S | D | F | G || H | J | K | L | ; | " | - * |------+------+------+------+------+------||------+------+------+------+------+------| - * | Shift| Z | X | C | V | B || N | M | , | . | / |Enter | - * |------+------+------+------+------+------||------+------+------+------+------+------| - * |Adjust| Ctrl | Alt | GUI |Lower |Space ||Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------'`-----------------------------------------' - */ -#define GAME_LAYER \ - KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_BSPC, \ - KC_ESC , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT, \ - KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_ENT , \ - MO_ADJ , KC_LCTL, KC_LALT, KC_LGUI, LOWER , KC_SPC , KC_SPC , RAISE , KC_LEFT, KC_DOWN, KC_UP , KC_RGHT - -/* Number pad - * ,-----------------------------------------..-----------------------------------------. - * | Tab | XXX | XXX | XXX | XXX | XXX || NLCK | 7 | 8 | 9 | - | BKSP | - * |------+------+------+------+------+------||------+------+------+------+------+------| - * | Esc | XXX | XXX | XXX | XXX | XXX || * | 4 | 5 | 6 | + | BKSP | - * |------+------+------+------+------+------||------+------+------+------+------+------| - * |Shift | XXX | XXX | XXX | XXX | XXX || / | 1 | 2 | 3 | ENT | XXX | - * |------+------+------+------+------+------||------+------+------+------+------+------| - * |Adjust| Ctrl | Alt | GUI | XXX |Space ||Space | 0 | 0 | . | ENT | XXX | - * `-----------------------------------------''-----------------------------------------' - */ -#define NUMPAD_LAYER \ - KC_TAB , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_NLCK, KC_P7 , KC_P8 , KC_P9 , KC_PMNS, KC_BSPC, \ - KC_ESC , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PAST, KC_P4 , KC_P5 , KC_P6 , KC_PPLS, KC_BSPC, \ - KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PSLS, KC_P1 , KC_P2 , KC_P3 , KC_PENT, XXXXXXX, \ - TD_ADJ , TD_CTL , TD_ALT , TD_GUI , XXXXXXX, KC_SPC , KC_SPC , KC_P0 , KC_P0 , KC_PDOT, KC_PENT, XXXXXXX - -/* Mouse movement - * ,-----------------------------------------..-----------------------------------------. - * | Tab | MB_1 | MB_3 | MB_2 | MB_4 | MB_5 || MA_0 | MB_1 | MB_3 | MB_2 | MB_4 | MB_5 | - * |------+------+------+------+------+------||------+------+------+------+------+------| - * | Esc | MW_L | MW_U | MW_D | MW_R | XXX || MA_1 | M_LT | M_UP | M_DN | M_RT | XXX | - * |------+------+------+------+------+------||------+------+------+------+------+------| - * |Shift | MA_0 | MA_1 | MA_2 | XXX | XXX || MA_2 | MW_L | MW_U | MW_D | MW_R | XXX | - * |------+------+------+------+------+------||------+------+------+------+------+------| - * |Adjust| Ctrl | Alt | GUI | XXX |Space || XXX | XXX | XXX | XXX | XXX | XXX | - * `-----------------------------------------''-----------------------------------------' - */ -#define MOUSE_LAYER \ - KC_TAB , MS_BTN1, MS_BTN3, MS_BTN2, MS_BTN4, MS_BTN5, MS_ACL0, MS_BTN1, MS_BTN3, MS_BTN2, MS_BTN4, MS_BTN5, \ - KC_ESC , MW_LEFT, MW_DOWN, MW_UP , MW_RGHT, XXXXXXX, MS_ACL1, MS_LEFT, MS_DOWN, MS_UP , MS_RGHT, XXXXXXX, \ - KC_LSFT, MS_ACL0, MS_ACL1, MS_ACL2, XXXXXXX, XXXXXXX, MS_ACL2, MW_LEFT, MW_DOWN, MW_UP , MW_RGHT, XXXXXXX, \ - TD_ADJ , TD_CTL , TD_ALT , TD_GUI , XXXXXXX, KC_SPC , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX - -/* Lower - * ,-----------------------------------------..-----------------------------------------. - * | ~ | ! | @ | # | $ | % || ^ | & | * | ( | ) | Bksp | - * |------+------+------+------+------+------||------+------+------+------+------+------| - * | Del | F1 | F2 | F3 | F4 | F5 || F6 | _ | + | | \ | | | - * |------+------+------+------+------+------||------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 || F12 | PgUp | PgDn | Home | End | ⏹ | - * |------+------+------+------+------+------||------+------+------+------+------+------| - * | | | | | | || | | Mute | Vol- | Vol+ | ⏯ | - * `-----------------------------------------'`-----------------------------------------' - */ -#define LOWER_LAYER \ - KC_TILD, KC_EXLM, KC_AT , KC_HASH, KC_DLR , KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \ - KC_DEL , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ - BOTTOM_RAISE_LOWER_ROWS - -/* Raise - * ,-----------------------------------------..-----------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 || 6 | 7 | 8 | 9 | 0 | Bksp | - * |------+------+------+------+------+------||------+------+------+------+------+------| - * | Del | F1 | F2 | F3 | F4 | F5 || F6 | - | = | [ | ] | \ | - * |------+------+------+------+------+------||------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 || F12 | PgUp | PgDn | Home | End | ⏹ | - * |------+------+------+------+------+------||------+------+------+------+------+------| - * | | | | | | || | | Mute | Vol- | Vol+ | ⏯ | - * `-----------------------------------------''-----------------------------------------' - */ -#define RAISE_LAYER \ - KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_BSPC, \ - KC_DEL , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_MINS, KC_EQL , KC_LBRC, KC_RBRC, KC_BSLS, \ - BOTTOM_RAISE_LOWER_ROWS - -#ifdef AUDIO_ENABLE -float tone_qwerty[][2] = SONG(QWERTY_SOUND); -float tone_dvorak[][2] = SONG(DVORAK_SOUND); -float tone_colemak[][2] = SONG(COLEMAK_SOUND); -float tone_workman[][2] = SONG(PLOVER_SOUND); -#else -float tone_qwerty; -float tone_dvorak; -float tone_colemak; -float tone_workman; -#define PLAY_SONG(tone) -#endif - -void persistent_default_layer_set(uint16_t default_layer) { - layer_state_set(default_layer); - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case QWERTY: - if (record->event.pressed) { - PLAY_SONG(tone_qwerty); - persistent_default_layer_set(1UL<<_QWERTY); - } - return false; - break; - case COLEMAK: - if (record->event.pressed) { - PLAY_SONG(tone_colemak); - persistent_default_layer_set(1UL<<_COLEMAK); - } - return false; - break; - case WORKMAN: - if (record->event.pressed) { - PLAY_SONG(tone_workman); - persistent_default_layer_set(1UL<<_WORKMAN); - } - return false; - break; - case DVORAK: - if (record->event.pressed) { - PLAY_SONG(tone_dvorak); - persistent_default_layer_set(1UL<<_DVORAK); - } - return false; - break; - case LOWER: - if (record->event.pressed) { - layer_on(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - break; - case RAISE: - if (record->event.pressed) { - layer_on(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - break; - } - - return true; -} - -#endif diff --git a/users/losinggeneration/rules.mk b/users/losinggeneration/rules.mk deleted file mode 100644 index 295367fb..00000000 --- a/users/losinggeneration/rules.mk +++ /dev/null @@ -1,13 +0,0 @@ -# Build Options -# Only enable things here that are generic to all keyboards. A yes or no here -# will override keyboard/keymap specific values -# -#BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -#COMMAND_ENABLE = no # Commands for debug and configuration -#CONSOLE_ENABLE = no # Console for debug(+400) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -#NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -TAP_DANCE_ENABLE = yes # Enable tap dancing -#UNICODE_ENABLE = no # Unicode - diff --git a/users/manna-harbour_miryoku/README.org b/users/manna-harbour_miryoku/README.org deleted file mode 100644 index b6caaade..00000000 --- a/users/manna-harbour_miryoku/README.org +++ /dev/null @@ -1 +0,0 @@ -miryoku.org \ No newline at end of file diff --git a/users/manna-harbour_miryoku/config.h b/users/manna-harbour_miryoku/config.h deleted file mode 100644 index 5ac3208c..00000000 --- a/users/manna-harbour_miryoku/config.h +++ /dev/null @@ -1,12 +0,0 @@ -// generated from users/manna-harbour_miryoku/miryoku.org -*- buffer-read-only: t -*- - -#pragma once - -// Prevent normal rollover on alphas from accidentally triggering mods. -#define IGNORE_MOD_TAP_INTERRUPT - -// Enable rapid switch from tap to hold, disables double tap hold auto-repeat. -#define TAPPING_FORCE_HOLD - -// Recommended for heavy chording. -#define QMK_KEYS_PER_SCAN 4 diff --git a/users/manna-harbour_miryoku/manna-harbour_miryoku.c b/users/manna-harbour_miryoku/manna-harbour_miryoku.c deleted file mode 100644 index 8ae38c25..00000000 --- a/users/manna-harbour_miryoku/manna-harbour_miryoku.c +++ /dev/null @@ -1,62 +0,0 @@ -// generated from users/manna-harbour_miryoku/miryoku.org -*- buffer-read-only: t -*- - -#include QMK_KEYBOARD_H - -#define KC_NP KC_NO // key is not present -#define KC_NA KC_NO // present but not available for use -#define KC_NU KC_NO // available but not used - -// non-KC_ keycodes -#define KC_RST RESET -#define KC_TOG RGB_TOG -#define KC_MOD RGB_MOD -#define KC_HUI RGB_HUI -#define KC_SAI RGB_SAI -#define KC_VAI RGB_VAI - -enum layers { BASE, MEDR, NAVR, MOUR, NSSL, NSL, FUNL }; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [BASE] = LAYOUT_miryoku( - KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_QUOT, - LGUI_T(KC_A), LALT_T(KC_R), LCTL_T(KC_S), LSFT_T(KC_T), KC_G, KC_M, LSFT_T(KC_N), LCTL_T(KC_E), LALT_T(KC_I), LGUI_T(KC_O), - KC_Z, ALGR_T(KC_X), KC_C, KC_D, KC_V, KC_K, KC_H, KC_COMM, ALGR_T(KC_DOT), KC_SLSH, - KC_NP, KC_NP, LT(MEDR, KC_ESC), LT(NAVR, KC_SPC), LT(MOUR, KC_TAB), LT(NSSL, KC_ENT), LT(NSL, KC_BSPC), LT(FUNL, KC_DEL), KC_NP, KC_NP - ), - [NAVR] = LAYOUT_miryoku( - KC_RST, KC_NA, KC_NA, KC_NA, KC_NA, KC_AGIN, KC_UNDO, KC_CUT, KC_COPY, KC_PSTE, - KC_LGUI, KC_LALT, KC_LCTL, KC_LSFT, KC_NA, KC_CAPS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, - KC_NA, KC_ALGR, KC_NA, KC_NA, KC_NA, KC_INS, KC_HOME, KC_PGDN, KC_PGUP, KC_END, - KC_NP, KC_NP, KC_NA, KC_NA, KC_NA, KC_ENT, KC_BSPC, KC_DEL, KC_NP, KC_NP - ), - [MOUR] = LAYOUT_miryoku( - KC_RST, KC_NA, KC_NA, KC_NA, KC_NA, KC_NU, KC_NU, KC_NU, KC_NU, KC_NU, - KC_LGUI, KC_LALT, KC_LCTL, KC_LSFT, KC_NA, KC_NU, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, - KC_NA, KC_ALGR, KC_NA, KC_NA, KC_NA, KC_NU, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R, - KC_NP, KC_NP, KC_NA, KC_NA, KC_NA, KC_BTN3, KC_BTN1, KC_BTN2, KC_NP, KC_NP - ), - [MEDR] = LAYOUT_miryoku( - KC_RST, KC_NA, KC_NA, KC_NA, KC_NA, KC_TOG, KC_MOD, KC_HUI, KC_SAI, KC_VAI, - KC_LGUI, KC_LALT, KC_LCTL, KC_LSFT, KC_NA, KC_NU, KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT, - KC_NA, KC_ALGR, KC_NA, KC_NA, KC_NA, KC_NU, KC_NU, KC_NU, KC_NU, KC_NU, - KC_NP, KC_NP, KC_NA, KC_NA, KC_NA, KC_MSTP, KC_MPLY, KC_MUTE, KC_NP, KC_NP - ), - [FUNL] = LAYOUT_miryoku( - KC_F12, KC_F7, KC_F8, KC_F9, KC_PSCR, KC_NA, KC_NA, KC_NA, KC_NA, KC_RST, - KC_F11, KC_F4, KC_F5, KC_F6, KC_SLCK, KC_NA, KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, - KC_F10, KC_F1, KC_F2, KC_F3, KC_PAUS, KC_NA, KC_NA, KC_NA, KC_ALGR, KC_NA, - KC_NP, KC_NP, KC_APP, KC_SPC, KC_TAB, KC_NA, KC_NA, KC_NA, KC_NP, KC_NP - ), - [NSL] = LAYOUT_miryoku( - KC_LBRC, KC_7, KC_8, KC_9, KC_RBRC, KC_NA, KC_NA, KC_NA, KC_NA, KC_RST, - KC_SCLN, KC_4, KC_5, KC_6, KC_EQL, KC_NA, KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, - KC_GRV, KC_1, KC_2, KC_3, KC_BSLS, KC_NA, KC_NA, KC_NA, KC_ALGR, KC_NA, - KC_NP, KC_NP, KC_DOT, KC_0, KC_MINS, KC_NA, KC_NA, KC_NA, KC_NP, KC_NP - ), - [NSSL] = LAYOUT_miryoku( - KC_LCBR, KC_AMPR, KC_ASTR, KC_LPRN, KC_RCBR, KC_NA, KC_NA, KC_NA, KC_NA, KC_RST, - KC_COLN, KC_DLR, KC_PERC, KC_CIRC, KC_PLUS, KC_NA, KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_PIPE, KC_NA, KC_NA, KC_NA, KC_ALGR, KC_NA, - KC_NP, KC_NP, KC_GT, KC_RPRN, KC_UNDS, KC_NA, KC_NA, KC_NA, KC_NP, KC_NP - ) -}; diff --git a/users/manna-harbour_miryoku/miryoku.org b/users/manna-harbour_miryoku/miryoku.org deleted file mode 100644 index 692321d0..00000000 --- a/users/manna-harbour_miryoku/miryoku.org +++ /dev/null @@ -1,705 +0,0 @@ -#+Title: miryoku.org - -[[https://raw.githubusercontent.com/manna-harbour/miryoku/master/kle-miryoku-keycodes.png]] - -The miryoku layout is an ergonomic, minimal, orthogonal layout for ergo or ortho -keyboards, implemented as part of the QMK firmware. The layout is maintained in -emacs org-mode tables and converted to QMK keymap data structures using embedded -python scripts. The layout is mapped onto keyboards with different physical -layouts as a subset without code duplication using the QMK userspace feature and -C macros. Versions of the layout can also be seen outside of the QMK source at -[[https://github.com/manna-harbour/miryoku/]]. - -After making changes here call org-babel-tangle (C-c C-v t). - -* Contents - -- [[#layout][Layout]] -- [[#code-generation][Code Generation]] -- [[#subset-mapping][Subset Mapping]] -- [[#related-documentation][Related Documentation]] - - -* Layout -:PROPERTIES: -:CUSTOM_ID: layout -:END: - -** Info - -*** General Principles - - - Use layers instead of reaching. - - Use both hands instead of contortions. - - Use the home positions as much as possible. - - Make full use of the thumbs. - - Avoid unnecessary complication. - - -*** Specifics - - - 5 columns, 3 rows, 3 thumb keys, 2 hands. - - Can be used on almost any split or non-split ergo or ortho keyboard. - - Includes all keys found on a US layout TKL keyboard, plus media keys and - mouse emulation. - - Home row is the middle row, home thumb key is the middle thumb key. - - Maximum 1-u movement from home position for fingers and thumbs, and only - along one axis (except for the inner index finger column which is - deprioritised compared with the home columns). - - Dual-function modifiers on home row, mirrored on both hands. - - Dual-function layer change on thumbs. - - Layers are designed orthogonally with a single purpose per hand and are - accessed by holding a thumb key on the opposite hand. - - All layers on the same hand are based on the same basic key arrangement. - - Holding layer change and modifiers on one hand combined with a single key - press on the other hand can produce any combination of modifiers and - single keys without any finger contortions. - - Single function mods are also defined on layers on the same hand as the - layer change thumb key so layer change and mods can be held in any order - or simultaneously without race conditions. - - As mods are only enabled on the opposite hand, auto-repeat is available on - the home row on layers for use with cursor and mouse keys. - - Tap-hold auto-repeat is disabled to permit faster tap-hold switching on - thumbs, but thumb tap keys are mirrored onto some layers for use with - auto-repeat. On other layers thumb keys are redefined with important - functions for that layer. - - -** Layers - -The layers are maintained in tables, with the thumb keys on the bottom row. NP -indicates the key is not present and is used to fill in the table around the -thumb keys. The grid arrangement of the tables does not imply a particular -physical layout. - -Basic keycodes are entered without the KC_ prefix. Symbols can be entered as-is -(excepting '"' (DQUO) and '|' (PIPE)). Empty cells are unused. - -The base layer has both halves of the layout joined for convenience. Other -layers are specified as a single hand. - -*** Base (BASE) - - -The base layer is maintained as separate tap and hold tables and are combined -into the corresponding tap-hold keycodes for mods and layer change. RST and -mods will be available on sub layers on the same hand as the layer change thumb -key. Unknown names are considered to be layer names. - -Base layer alphas are Colemak DHm. Thumb keys are backspace, enter, delete on -the right and space, tab, escape on the left. Dot, comma and apostrophe are -included for prose, dot and slash for file and directory names. - -#+NAME: tap -| Q | W | F | P | B | J | L | U | Y | ' | -| A | R | S | T | G | M | N | E | I | O | -| Z | X | C | D | V | K | H | , | . | / | -| NP | NP | ESC | SPC | TAB | ENT | BSPC | DEL | NP | NP | - -#+NAME: hold -| RST | | | | | | | | | RST | -| LGUI | LALT | LCTL | LSFT | | | LSFT | LCTL | LALT | LGUI | -| | ALGR | | | | | | | ALGR | | -| NP | NP | MEDR | NAVR | MOUR | NSSL | NSL | FUNL | NP | NP | - - -*** Navigation (NAVR) - -Primary right-hand layer (left home thumb) is navigation and editing. Cursor -keys are on the home position, line and page movement below, clipboard above, -caps and insert on the inner column. Thumb keys are duplicated from the base -layer to avoid having to layer change mid edit and to enable auto-repeat. - -#+NAME: navr -| AGIN | UNDO | CUT | COPY | PSTE | -| CAPS | LEFT | DOWN | UP | RGHT | -| INS | HOME | PGDN | PGUP | END | -| ENT | BSPC | DEL | NP | NP | - - -*** Mouse (MOUR) - -Secondary RH layer is mouse emulation. Mouse movement mirrors cursor navigation -on home and wheel mirrors line / page movement below. Buttons are on the -thumbs. Mouse movement, click, and drag with modifiers can be performed from -the home position. Unused keys are available for other related functions. - -#+NAME: mour -| | | | | | -| | MS_L | MS_D | MS_U | MS_R | -| | WH_L | WH_D | WH_U | WH_R | -| BTN3 | BTN1 | BTN2 | NP | NP | - - -*** Media (MEDR) - -Tertiary RH layer is media control, with volume up / down and next / prev -mirroring the navigation keys. Pause, stop and mute are on thumbs. RGB control -is on the top row (combine with shift to invert). Unused keys are available for -other related functions. - -#+NAME: medr -| TOG | MOD | HUI | SAI | VAI | -| | MPRV | VOLD | VOLU | MNXT | -| | | | | | -| MSTP | MPLY | MUTE | NP | NP | - - -*** Numerals and Symbols (NSL) - -Primary left-hand layer (right home thumb) is numerals and symbols. Numerals -are in the standard numpad locations with symbols in the remaining positions. -Dot is duplicated from the base layer for convenience. - -#+NAME: nsl -| [ | 7 | 8 | 9 | ] | -| ; | 4 | 5 | 6 | = | -| ` | 1 | 2 | 3 | \ | -| NP | NP | . | 0 | - | - - -*** Shifted Numerals and Symbols (NSSL) - -Secondary LH layer has shifted symbols in the same locations to reduce chording -when using mods with shifted symbols. Automatically generated from unshifted -table. - - -*** Function and System (FUNL) - -Tertiary LH layer has function keys mirroring the numerals on the primary layer -with extras on the pinkie column, plus system keys on the inner column. App -(menu) is on the tertiary thumb key and other thumb keys are duplicated from the -base layer to enable auto-repeat. - - -#+NAME: funl -| F12 | F7 | F8 | F9 | PSCR | -| F11 | F4 | F5 | F6 | SLCK | -| F10 | F1 | F2 | F3 | PAUS | -| NP | NP | APP | SPC | TAB | - - -*** COMMENT Templates - -#+NAME: tem -| | | | | | | | | | | -|------+------+------+------+------+------+------+------+------+------| -| | | | | | | | | | | -| | | | | | | | | | | -| | | | | | | | | | | -| NP | NP | | | | | | | NP | NP | - - -Duplicate base layer tap keys on thumbs rather than trans to enable auto-repeat. - -#+NAME: temr -| | | | | | -|------+------+------+------+------| -| | | | | | -| | | | | | -| | | | | | -| ENT | BSPC | DEL | NP | NP | - -#+NAME: teml -| | | | | | -|------+------+------+------+------| -| | | | | | -| | | | | | -| | | | | | -| NP | NP | ESC | SPC | TAB | - - -* Code Generation -:PROPERTIES: -:CUSTOM_ID: code-generation -:END: - -** Table Conversion Scripts - -*** table-layout-taphold - -Produce base layer from separate tap and hold tables. - -#+NAME: table-layout-taphold -#+BEGIN_SRC python :var tap_table=tap :var hold_table=hold :var symbol_names_table=symbol-names :var mods_list=mods :tangle no :results verbatim -width = 19 -mods_dict = dict.fromkeys(mods_list) -symbol_names_dict = {} -for symbol, name, shifted_symbol, shifted_name in symbol_names_table: - symbol_names_dict[symbol] = name - symbol_names_dict[shifted_symbol] = shifted_name -results = ' [BASE] = LAYOUT_miryoku(\n' -for tap_row, hold_row in map(None, tap_table, hold_table): - results += ' ' - for tap, hold in map(None, tap_row, hold_row): - if tap == '': - code = 'NU' - elif tap in symbol_names_dict: - code = symbol_names_dict[tap] - else: - code = tap - code = 'KC_' + str(code) - if hold in mods_dict: - code = str(hold) + '_T(' + code + ')' - elif hold != '' and hold != 'NP' and hold != 'RST': - code = 'LT(' + str(hold) + ', ' + code + ')' - results += (code + ', ').ljust(width) - results = results.rstrip(' ') + '\n' -results = results.rstrip('\n, ') + '\n )' -return results -#+END_SRC - -#+RESULTS: table-layout-taphold -: [BASE] = LAYOUT_miryoku( -: KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_QUOT, -: LGUI_T(KC_A), LALT_T(KC_R), LCTL_T(KC_S), LSFT_T(KC_T), KC_G, KC_M, LSFT_T(KC_N), LCTL_T(KC_E), LALT_T(KC_I), LGUI_T(KC_O), -: KC_Z, KC_X, KC_C, KC_D, KC_V, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, -: KC_NP, KC_NP, LT(MEDR, KC_ESC), LT(NAVR, KC_SPC), LT(MOUR, KC_TAB), LT(NSSL, KC_ENT), LT(NSL, KC_BSPC), LT(FUNL, KC_DEL), KC_NP, KC_NP -: ) - - -*** table-layout-half - -Produce sub layers given layer name and corresponding table for single hand and -incorporating mods and reset from base layer. Layer names must end with R or L. -A layer with shifted symbols can also be generated. - -#+NAME: table-layout-half -#+BEGIN_SRC python :var hold_table=hold :var layer_name="NSL" :var half_table=nsl :var symbol_names_table=symbol-names :var mods_list=mods :var shift="false" :tangle no :results verbatim -width = 9 -mods_dict = dict.fromkeys(mods_list) -symbol_names_dict = {} -shifted_symbol_names_dict = {} -for symbol, name, shifted_symbol, shifted_name in symbol_names_table: - symbol_names_dict[symbol] = name - symbol_names_dict[shifted_symbol] = shifted_name - shifted_symbol_names_dict[symbol] = shifted_name -length = len(half_table[0]) -mode = layer_name[-1:].lower() -results = ' [' + layer_name + '] = LAYOUT_miryoku(\n' -for half_row, hold_row in map(None, half_table, hold_table): - results += ' ' - hold_row_l, hold_row_r = hold_row[:length], hold_row[length:] - for lr, hold_row_lr in ('l', hold_row_l), ('r', hold_row_r): - if lr == mode: - for half in half_row: - if half == '': - code = 'NU' - elif shift == "true" and half in shifted_symbol_names_dict: - code = shifted_symbol_names_dict[half] - elif half in symbol_names_dict: - code = symbol_names_dict[half] - else: - code = half - results += ('KC_' + str(code) + ', ').ljust(width) - else: - for hold in hold_row_lr: - if hold == '' or hold != 'NP' and hold != 'RST' and hold not in mods_dict: - code = 'NA' - else: - code = hold - results += ('KC_' + str(code) + ', ').ljust(width) - results = results.rstrip(' ') + '\n' -results = results.rstrip('\n, ') + '\n )' -return results -#+END_SRC - -#+RESULTS: table-layout-half -: [NSL] = LAYOUT_miryoku( -: KC_LBRC, KC_7, KC_8, KC_9, KC_RBRC, KC_NA, KC_NA, KC_NA, KC_NA, KC_RST, -: KC_SCLN, KC_4, KC_5, KC_6, KC_EQL, KC_NA, KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, -: KC_GRV, KC_1, KC_2, KC_3, KC_BSLS, KC_NA, KC_NA, KC_NA, KC_NA, KC_NA, -: KC_NP, KC_NP, KC_DOT, KC_0, KC_MINS, KC_NA, KC_NA, KC_NA, KC_NP, KC_NP -: ) - - -*** table-enums - -Produce layer enums from layer names in hold table. - -#+NAME: table-enums -#+BEGIN_SRC python :var hold_table=hold :var mods_list=mods :tangle no -mods_dict = dict.fromkeys(mods_list) -results = 'enum layers { BASE, ' -for hold_row in hold_table: - for hold in hold_row: - if hold not in mods_dict and hold != '' and hold != 'NP' and hold != 'RST': - results += hold + ', ' -results = results.rstrip(', ') + ' };' -return results -#+END_SRC - -#+RESULTS: table-enums -: enum layers { BASE, MEDR, NAVR, MOUR, NSSL, NSL, FUNL }; - - -** Data - -*** symbol-names - -Symbol, name, and shifted symbol mappings for use in tables. - -#+NAME: symbol-names -| ` | GRV | ~ | TILD | -| - | MINS | _ | UNDS | -| = | EQL | + | PLUS | -| [ | LBRC | { | LCBR | -| ] | RBRC | } | RCBR | -| \ | BSLS | PIPE | PIPE | -| ; | SCLN | : | COLN | -| ' | QUOT | DQUO | DQUO | -| , | COMM | < | LT | -| . | DOT | > | GT | -| / | SLSH | ? | QUES | -| 1 | 1 | ! | EXLM | -| 2 | 2 | @ | AT | -| 3 | 3 | # | HASH | -| 4 | 4 | $ | DLR | -| 5 | 5 | % | PERC | -| 6 | 6 | ^ | CIRC | -| 7 | 7 | & | AMPR | -| 8 | 8 | * | ASTR | -| 9 | 9 | ( | LPRN | -| 0 | 0 | ) | RPRN | - - -*** mods - -Modifiers usable in hold table. Need to have the same name for KC_ and _T versions. - -#+NAME: mods -- LSFT -- LCTL -- LALT -- LGUI -- ALGR - - -** Other - -*** header - -Header for tangled src files. - -#+NAME: header -#+BEGIN_SRC C :tangle no -generated from users/manna-harbour_miryoku/miryoku.org -*- buffer-read-only: t -*- -#+END_SRC - - -* Subset Mapping -:PROPERTIES: -:CUSTOM_ID: subset-mapping -:END: - -** Userspace - -The keymap and configuration are shared between keyboards. The keymap is -defined for LAYOUT_miryoku which is 10x4, with the outer 2 positions on the -bottom row unused and the rest of the bottom row are the thumb keys. - - -*** manna-harbour_miryoku.c - -Contains the keymap. Included from keymap.c - -[[./manna-harbour_miryoku.c][users/manna-harbour_miryoku/manna-harbour_miryoku.c]] -#+BEGIN_SRC C :noweb yes :padline no :tangle manna-harbour_miryoku.c -// <
> - -#include QMK_KEYBOARD_H - -#define KC_NP KC_NO // key is not present -#define KC_NA KC_NO // present but not available for use -#define KC_NU KC_NO // available but not used - -// non-KC_ keycodes -#define KC_RST RESET -#define KC_TOG RGB_TOG -#define KC_MOD RGB_MOD -#define KC_HUI RGB_HUI -#define KC_SAI RGB_SAI -#define KC_VAI RGB_VAI - -<> - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -<>, -<>, -<>, -<>, -<>, -<>, -<> -}; -#+END_SRC - - -*** config.h - -Config options. Automatically included. - -[[./config.h][users/manna-harbour_miryoku/config.h]] -#+BEGIN_SRC C :noweb yes :padline no :tangle config.h -// <
> - -#pragma once - -// Prevent normal rollover on alphas from accidentally triggering mods. -#define IGNORE_MOD_TAP_INTERRUPT - -// Enable rapid switch from tap to hold, disables double tap hold auto-repeat. -#define TAPPING_FORCE_HOLD - -// Recommended for heavy chording. -#define QMK_KEYS_PER_SCAN 4 - -#+END_SRC - - -*** rules.mk - -Build options. Automatically included. - -[[./rules.mk][users/manna-harbour_miryoku/rules.mk]] -#+BEGIN_SRC makefile :noweb yes :padline no :tangle rules.mk -# <
> - -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -EXTRAFLAGS += -flto # Link Time Optimization to reduce code size, 31358->28034/28672 - -#+END_SRC - - -** Layouts - -To use the keymap on a keyboard supporting the layouts feature, LAYOUT_miryoku -is defined as a macro mapping onto the layout's own LAYOUT macro, leaving the -unused keys as KC_NO. The userspace keymap is then included. - -*** ergodox - -For the ergodox layout, the main 5x3 alphas are used as usual. The primary and -secondary thumb keys are the inner and outer 2u thumb keys and the tertiary -thumb key is the innermost key of the partial bottom row. The remaining keys -are unused. - -[[../../layouts/community/ergodox/manna-harbour_miryoku/keymap.c][layouts/community/ergodox/manna-harbour_miryoku/keymap.c]] -#+BEGIN_SRC C :noweb yes :padline no :tangle ../../layouts/community/ergodox/manna-harbour_miryoku/keymap.c -// <
> - -#define LAYOUT_miryoku(\ -K00, K01, K02, K03, K04, K05, K06, K07, K08, K09,\ -K10, K11, K12, K13, K14, K15, K16, K17, K18, K19,\ -K20, K21, K22, K23, K24, K25, K26, K27, K28, K29,\ -N30, N31, K32, K33, K34, K35, K36, K37, N38, N39\ -)\ -LAYOUT_ergodox_pretty( \ -KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ -KC_NO, K00, K01, K02, K03, K04, KC_NO, KC_NO, K05, K06, K07, K08, K09, KC_NO, \ -KC_NO, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, KC_NO, \ -KC_NO, K20, K21, K22, K23, K24, KC_NO, KC_NO, K25, K26, K27, K28, K29, KC_NO, \ -KC_NO, KC_NO, KC_NO, KC_NO, K32, K37, KC_NO, KC_NO, KC_NO, KC_NO, \ - KC_NO, KC_NO, KC_NO, KC_NO, \ - KC_NO, KC_NO, \ - K33, K34, KC_NO, KC_NO, K35, K36 \ -) - -#include "manna-harbour_miryoku.c" - -#+END_SRC - -To build for any keyboard using the this layout (ergodone, ergodox_ez, -ergodox_infinity, hotdox) e.g. the ergodox_ez, - -#+BEGIN_SRC sh :tangle no -cd ../.. && make ergodox_ez:manna-harbour_miryoku:teensy -#+END_SRC - - - -*** ortho_4x12 - -For the ortho_4x12 layout, the right half as is as follows: The rightmost column -bottom 3 rows is the pinkie column. The middle 4 columns top 3 rows are for the -remaining fingers. The pinkie column is one row lower than the other columns to -provide some column stagger on ortho keyboards. The bottom row left 3 columns -are the thumb keys. The remaining keys are unused. - -[[../../layouts/community/ortho_4x12/manna-harbour_miryoku/keymap.c][layouts/community/ortho_4x12/manna-harbour_miryoku/keymap.c]] -#+BEGIN_SRC C :noweb yes :padline no :tangle ../../layouts/community/ortho_4x12/manna-harbour_miryoku/keymap.c -// <
> - -#define LAYOUT_miryoku(\ -K00, K01, K02, K03, K04, K05, K06, K07, K08, K09,\ -K10, K11, K12, K13, K14, K15, K16, K17, K18, K19,\ -K20, K21, K22, K23, K24, K25, K26, K27, K28, K29,\ -N30, N31, K32, K33, K34, K35, K36, K37, N38, N39\ -)\ -LAYOUT_ortho_4x12(\ -KC_NO, K01, K02, K03, K04, KC_NO, KC_NO, K05, K06, K07, K08, KC_NO,\ -K00, K11, K12, K13, K14, KC_NO, KC_NO, K15, K16, K17, K18, K09,\ -K10, K21, K22, K23, K24, KC_NO, KC_NO, K25, K26, K27, K28, K19,\ -K20, KC_NO, KC_NO, K32, K33, K34, K35, K36, K37, KC_NO, KC_NO, K29\ -) - -#include "manna-harbour_miryoku.c" - -#+END_SRC - -To build for any keyboard using this layout (4x4, nori, chimera_ls, contra, -divergetm2, jj40, lets_split, lets_split_eh, meira, niu_mini, planck, telophase, -vitamins_included, zinc, zlant, ortho48, kbd4x, levinson, wavelet, plaid) -e.g. the levinson, - -#+BEGIN_SRC sh :tangle no -make keebio/levinson:manna-harbour_miryoku:avrdude -#+END_SRC - - -** Keyboards - -To use the keymap on a keyboard which does not support the layouts feature, -LAYOUT_miryoku is defined as a macro mapping onto the keyboard's own LAYOUT -macro, leaving the unused keys as KC_NO. The userspace keymap is then included. - -*** crkbd - -The outer columns are unused. - -**** keymap.c - -[[../../keyboards/crkbd/keymaps/manna-harbour_miryoku/keymap.c][keyboards/crkbd/keymaps/manna-harbour_miryoku/keymap.c]] -#+BEGIN_SRC C :noweb yes :padline no :tangle ../../keyboards/crkbd/keymaps/manna-harbour_miryoku/keymap.c -// <
> - -#define LAYOUT_miryoku( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, \ - N30, N31, K32, K33, K34, K35, K36, K37, N38, N39 \ -) \ -LAYOUT( \ -KC_NO, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, KC_NO, \ -KC_NO, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, KC_NO, \ -KC_NO, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, KC_NO, \ - K32, K33, K34, K35, K36, K37 \ -) - -#include "manna-harbour_miryoku.c" - - -#ifdef SSD1306OLED - -#include "ssd1306.h" - -void matrix_init_user(void) { - iota_gfx_init(!has_usb()); // turns on the display -} - -// When add source files to SRC in rules.mk, you can use functions. -const char *read_logo(void); - -void matrix_scan_user(void) { - iota_gfx_task(); -} - -void matrix_render_user(struct CharacterMatrix *matrix) { - if (host_keyboard_leds() & (1<display, source->display, sizeof(dest->display))) { - memcpy(dest->display, source->display, sizeof(dest->display)); - dest->dirty = true; - } -} - -void iota_gfx_task_user(void) { - struct CharacterMatrix matrix; - matrix_clear(&matrix); - matrix_render_user(&matrix); - matrix_update(&display, &matrix); -} - -#endif //SSD1306OLED - -#+END_SRC - - -**** config.h - -[[../../keyboards/crkbd/keymaps/manna-harbour_miryoku/config.h][keyboards/crkbd/keymaps/manna-harbour_miryoku/config.h]] -#+BEGIN_SRC C :noweb yes :padline no :tangle ../../keyboards/crkbd/keymaps/manna-harbour_miryoku/config.h -// <
> - -#pragma once - -#define EE_HANDS - -#ifdef RGB_MATRIX_ENABLE -#define RGB_MATRIX_KEYPRESSES // reacts to keypresses -#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended -#define RGB_MATRIX_FRAMEBUFFER_EFFECTS -#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash. -#define RGB_MATRIX_HUE_STEP 8 -#define RGB_MATRIX_SAT_STEP 8 -#define RGB_MATRIX_VAL_STEP 8 -#define RGB_MATRIX_SPD_STEP 10 -#endif - -#define SSD1306OLED // old oled driver - -#+END_SRC - - -**** rules.mk - -[[../../keyboards/crkbd/keymaps/manna-harbour_miryoku/rules.mk][keyboards/crkbd/keymaps/manna-harbour_miryoku/rules.mk]] -#+BEGIN_SRC C :noweb yes :padline no :tangle ../../keyboards/crkbd/keymaps/manna-harbour_miryoku/rules.mk -# <
> - -RGB_MATRIX_ENABLE = WS2812 - -# old oled driver -SRC += ./lib/glcdfont.c \ - ./lib/logo_reader.c - -#+END_SRC - - -To build for this keyboard, - -#+BEGIN_SRC sh :tangle no -cd ../.. && make crkbd:manna-harbour_miryoku:flash -#+END_SRC - - -* Related Documentation -:PROPERTIES: -:CUSTOM_ID: related-documentation -:END: - - -** QMK - -- https://qmk.fm/ -- https://docs.qmk.fm/#/getting_started_introduction -- https://docs.qmk.fm/#/hardware_keyboard_guidelines -- https://docs.qmk.fm/#/config_options -- https://docs.qmk.fm/#/keycodes -- https://docs.qmk.fm/#/feature_advanced_keycodes -- https://docs.qmk.fm/#/feature_layouts -- https://docs.qmk.fm/#/feature_userspace -- https://docs.qmk.fm/#/getting_started_make_guide - - -** Org Mode - -- https://orgmode.org/ -- https://orgmode.org/manual/Tables.html -- https://orgmode.org/manual/Working-with-Source-Code.html diff --git a/users/manna-harbour_miryoku/rules.mk b/users/manna-harbour_miryoku/rules.mk deleted file mode 100644 index a54616b4..00000000 --- a/users/manna-harbour_miryoku/rules.mk +++ /dev/null @@ -1,5 +0,0 @@ -# generated from users/manna-harbour_miryoku/miryoku.org -*- buffer-read-only: t -*- - -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -LTO_ENABLE = yes diff --git a/users/mattly/config.h b/users/mattly/config.h deleted file mode 100644 index 25d37980..00000000 --- a/users/mattly/config.h +++ /dev/null @@ -1,9 +0,0 @@ -#pragma once - -// Most tactile encoders have detents every 4 stages -#define ENCODER_RESOLUTION 4 - -#define IGNORE_MOD_TAP_INTERRUPT -#define PERMISSIVE_HOLD -#define TAPPING_TOGGLE 2 -#define TAPPING_TERM 200 diff --git a/users/mattly/mattly.c b/users/mattly/mattly.c deleted file mode 100644 index 1e61e012..00000000 --- a/users/mattly/mattly.c +++ /dev/null @@ -1,70 +0,0 @@ -#include "mattly.h" - -__attribute__ ((weak)) -layer_state_t layer_state_set_keymap (layer_state_t state) { - return state; -} - -void set_lights_default(void) { - #ifdef RGBLIGHT_ENABLE - if (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) { - rgblight_sethsv_noeeprom(HSV_CAPS); - } else { - rgblight_sethsv_noeeprom(HSV_DEFAULT); - } - #endif -} - -void layer_state_set_rgb(layer_state_t state) { -#ifdef RGBLIGHT_ENABLE - switch (biton32(state)) { - case _QWERTY: - set_lights_default(); - break; - case _SYMBOL: - rgblight_sethsv_noeeprom(HSV_SYMBOL); - break; - case _NAVNUM: - rgblight_sethsv_noeeprom(HSV_NAVNUM); - break; - case _FUNCT: - rgblight_sethsv_noeeprom(HSV_FUNCT); - break; - } -#endif -} - - -layer_state_t layer_state_set_user (layer_state_t state) { - state = update_tri_layer_state(state, _SYMBOL, _NAVNUM, _FUNCT); - layer_state_set_rgb(state); - return layer_state_set_keymap (state); -} - -void on_reset(void) { - #ifdef RGBLIGHT_ENABLE - rgblight_sethsv_noeeprom(HSV_RESET); - #endif -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case KC_CAPS: - #ifdef RGBLIGHT_ENABLE - set_lights_default(); - #endif - return true; - case RESET: - on_reset(); - return true; - default: - return true; - } -} - -void keyboard_post_init_user(void) { -#ifdef RGBLIGHT_ENABLE - rgblight_enable_noeeprom(); - set_lights_default(); -#endif -} diff --git a/users/mattly/mattly.h b/users/mattly/mattly.h deleted file mode 100644 index da09ddcd..00000000 --- a/users/mattly/mattly.h +++ /dev/null @@ -1,98 +0,0 @@ -/* Copyright 2019 Matthew Lyon - * - * 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 . - */ - -#ifndef USERSPACE -#define USERSPACE - -#include "quantum.h" - -enum { - _QWERTY, - _NAVNUM, - _SYMBOL, - _FUNCT, -}; - -// == Thumbs -// left hand -#define ESC_HYP MT(MOD_HYPR, KC_ESC) -#define TAB_NUM LT(_NAVNUM, KC_TAB) -#define SPC_SFT MT(MOD_LSFT, KC_SPC) -#define ENT_SYM LT(_SYMBOL, KC_ENT) - - -// right hand -#define SPC_SFT MT(MOD_LSFT, KC_SPC) -#define BSP_SYM LT(_SYMBOL, KC_BSPC) -#define DEL_WRP MT(MOD_LCTL | MOD_LALT | MOD_LGUI, KC_DEL) - -#define NAVLOCK TG(_NAVNUM) -#define SYMLOCK TG(_SYMBOL) - - -// == QWERTY -// left hand home row -#define A_CTRL MT(MOD_LCTL, KC_A) -#define S_ALT MT(MOD_LALT, KC_S) -#define D_GUI MT(MOD_LGUI, KC_D) -#define F_SHFT MT(MOD_LSFT, KC_F) -// left hand aux -#define W_CTRL MT(MOD_LCTL, KC_W) -#define E_ALT MT(MOD_LALT, KC_E) -#define R_GUI MT(MOD_LGUI, KC_R) - -// right hand home row -#define J_SHFT MT(MOD_RSFT, KC_J) -#define K_GUI MT(MOD_RGUI, KC_K) -#define L_ALT MT(MOD_RALT, KC_L) -#define MINSCTL MT(MOD_RCTL, KC_MINS) -// right hand aux -#define U_GUI MT(MOD_RGUI, KC_U) -#define I_ALT MT(MOD_RALT, KC_I) -#define O_CTRL MT(MOD_RCTL, KC_O) - -// == OS X default keys -// movement by word -#define BWORD LALT(KC_LEFT) -#define FWORD LALT(KC_RIGHT) - -// gui navigation -#define NWIN LGUI(KC_GRV) // Next Window -#define PWIN LGUI(LSFT(KC_GRV)) // Prev Window -#define NTAB LGUI(LSFT(KC_RBRC)) // Next Tab -#define PTAB LGUI(LSFT(KC_LBRC)) // Prev Tab -#define NAVBACK LGUI(KC_LBRC) // Navigate Forward -#define NAVFWD LGUI(KC_RBRC) // Navigate Back - -// my personal mappings to window manager commands -#define XALLWIN HYPR(KC_F14) -#define XDESKTP HYPR(KC_F15) -#define XNXTSPC HYPR(KC_F16) -#define XPRVSPC HYPR(KC_F17) -#define XNOTIFY HYPR(KC_F18) - -// == UNDERGLOW -#ifdef RGBLIGHT_ENABLE -#define HSV_CAPS 60, 255, 255 -#define HSV_DEFAULT 30, 255, 255 -#define HSV_SYMBOL 18, 255, 255 -#define HSV_NAVNUM 250, 255, 255 -#define HSV_FUNCT 238, 255, 255 -#define HSV_RESET 180, 255, 255 -#endif - -#endif - diff --git a/users/mattly/readme.md b/users/mattly/readme.md deleted file mode 100644 index 35699253..00000000 --- a/users/mattly/readme.md +++ /dev/null @@ -1,10 +0,0 @@ -# mattly's layouts - -My layouts are based around: - -* making the most from small layouts on keyboards like the iris or planck -* moving held-modifiers from pinkies to thumbs or home row, giving many keys dual purposes via mod/layer taps -* easy home-row navigation on a layer, using standard keys, available to all programs, not just a specially-configured editor -* easy access to punctuation symbols used in the programming languages I work in - -[Here is an image](https://lyonheart.us/etc/mattly-keymap.png) with an outdated description of my keymap \ No newline at end of file diff --git a/users/mattly/rules.mk b/users/mattly/rules.mk deleted file mode 100644 index 6803d361..00000000 --- a/users/mattly/rules.mk +++ /dev/null @@ -1,2 +0,0 @@ -SRC += mattly.c -MOUSEKEY_ENABLE = yes diff --git a/users/mechmerlin/changelog.md b/users/mechmerlin/changelog.md deleted file mode 100644 index 2f8fa687..00000000 --- a/users/mechmerlin/changelog.md +++ /dev/null @@ -1,31 +0,0 @@ -# Changelog -All notable changes to my userspace will be documented in this file. - -## [0.3.0] - 2020-02-02 -### Changed -- Added the `_CL` layer to all the boards for access to `EEP_RST` and `RESET` keycodes. This was done primarily to avoid triggering `RESET` accidentally. -- Added a placeholder text macro under the custom keycode `KC_MAC`. Currently set to "meow", but will change as needed in the future. - -## [0.2.2] - 2019-04-22 -### Fixed -- `config.h` usage of turning on `RGBLIGHT_ENABLE` when it is not enabled on boards other than my two clueboards were causing issues with boards that didn't have RGB underglow on it. - -## [0.2.1] - 2019-03-01 -### Fixed -- `config.h` usage of `#ifdef RGBLIGHT_ENABLE` caused problems for other of my boards that had `RGBLIGHT_ENABLE`. - -## [0.2.0] - 2019-02-27 -### Changed -- Moved `AUDIO_CLICKY` from community layout `66_ansi` into user space. - -## [0.1.1] - 2018-10-26 -### Added -- Added a changelog, aka THIS VERY FILE! -- Added `config.h` to userspace for `RGBLIGHT_SLEEP` feature. - -### Changed -- Spruced up the readme file to better explain the things I use in my keymap for would be keymap snoopers. Also useful as an example when people ask. -- Use `CTL_T` instead of `MT` for my custom `KC_CTCP` keycode as it was causing issues on some boards. - -## [0.1.0] - 2018-08-31 -Initial usage of userspaces! diff --git a/users/mechmerlin/config.h b/users/mechmerlin/config.h deleted file mode 100644 index 698e237b..00000000 --- a/users/mechmerlin/config.h +++ /dev/null @@ -1,29 +0,0 @@ -#pragma once - -#ifdef RGBLIGHT_ENABLE - #define RGBLIGHT_SLEEP - #define RGBLIGHT_ANIMATIONS -#endif // RGBLIGHT_ENABLE - -#ifdef AUDIO_CLICKY - #define AUDIO_CLICKY_ON - #define AUDIO_CLICKY_FREQ_DEFAULT 261.63f - #define AUDIO_CLICKY_FREQ_MIN 65.41f - #define AUDIO_CLICKY_FREQ_MAX 1046.5f - #define AUDIO_CLICKY_FREQ_FACTOR 1.61803f // golden ratio - #define AUDIO_CLICKY_FREQ_RANDOMNESS 17.0f -#endif - -// Enable features depending on keyboard -#if defined(KEYBOARD_clueboard_66_hotswap_prototype) - #ifndef RGBLIGHT_ENABLE - #define RGBLIGHT_ENABLE - #endif - #ifndef AUDIO_CLICKY - #define AUDIO_CLICKY - #endif -#elif defined(KEYBOARD_clueboard_66_hotswap_gen1) || defined(KEYBOARD_clueboard_66_rev4) - #ifndef AUDIO_CLICKY - #define AUDIO_CLICKY - #endif -#endif diff --git a/users/mechmerlin/mechmerlin.c b/users/mechmerlin/mechmerlin.c deleted file mode 100644 index ad60bd19..00000000 --- a/users/mechmerlin/mechmerlin.c +++ /dev/null @@ -1,26 +0,0 @@ -#include "mechmerlin.h" - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - static uint16_t fnx_layer_timer; - - switch (keycode){ - case KC_FNX: - if(record->event.pressed){ - fnx_layer_timer = timer_read(); - layer_on(_FL); - } else { - layer_off(_FL); - if (timer_elapsed(fnx_layer_timer) < 150) { - layer_invert(_AL); - } - } - break; - case KC_MAC: - if (record->event.pressed) { - SEND_STRING("meow"); - } else { - } - break; - } - return true; -} \ No newline at end of file diff --git a/users/mechmerlin/mechmerlin.h b/users/mechmerlin/mechmerlin.h deleted file mode 100644 index 9802c3ec..00000000 --- a/users/mechmerlin/mechmerlin.h +++ /dev/null @@ -1,19 +0,0 @@ -#pragma once - -#include "quantum.h" - -enum userspace_layers { - _BL = 0, // Base Layer - _FL, // Function Layer - _AL, // Arrow Layer - _CL // Control Layer -}; - -// Enum of custom keycodes defined in process_record_user -enum keycodes { - KC_FNX, // Hold for FN layer, tap to toggle ARROWS layer. - KC_MAC, // Text macro. -}; - -// Custom #defined keycodes -#define KC_CTCP CTL_T(KC_CAPS) diff --git a/users/mechmerlin/readme.md b/users/mechmerlin/readme.md deleted file mode 100644 index 14a86f05..00000000 --- a/users/mechmerlin/readme.md +++ /dev/null @@ -1,53 +0,0 @@ -# MechMerlin's Userspace v0.2.0 - -This is a collection of my most commonly used QMK features. - -A majority of my keyboards are smaller than 75%, ANSI, and staggered. - -## Layers ----- - -### _BL (Base Layer) -Typical standard QWERTY keymap. - -### _FL (Function Layer) -This layer is commonly accessed via `MO(_FL)` on the base layer. It consists of your typical function key F1 through F12 and some RGB and Backlight controls. - -### _AL (Arrow Layer) -This layer is only present on my 60% boards. I habitually use the bottom right modifiers as arrows. - -### _CL (Control Layer) -This layer is used for the `RESET` and `EEP_RST` keycodes. - -## Custom Keycodes ----- - -### KC_FNX (Fn Extended) - -`KC_FNX` functions as a hold for `MO(X)` and tap for `TG(Y)`. Layer X and Y are different layers. - -It is used primarily on my `LAYOUT_60_ansi` boards as my regular toggle (the 1u key to the right of right shift), is not present there. - -### KC_CTCP (Control Caps) - -This is just a wrapper for `CTL_T(KC_CAPS)`. This is a hold for control and tap for caps lock. - -## QMK Features ----- - -### RGBLIGHT_SLEEP - -Ensures that when my computer is in sleep mode, the keyboard underglow lights will also be off. - -### Audio Clicky - -If a board has a speaker, enable beeps and boops per switch actuation. This is currently only available on prototype/gen1 clueboard 66_hotswaps. - -### Velocikey - -[Velocikey](https://github.com/qmk/qmk_firmware/blob/master/docs/feature_velocikey.md) is an RGBLIGHT feature in which the faster you type, the faster the ARE GEE BEES. - -### Macros - -Basic text macro implemented for future use - diff --git a/users/mechmerlin/rules.mk b/users/mechmerlin/rules.mk deleted file mode 100644 index 043c70fb..00000000 --- a/users/mechmerlin/rules.mk +++ /dev/null @@ -1,2 +0,0 @@ -SRC += mechmerlin.c -LTO_ENABLE = yes diff --git a/users/mguterl/config.h b/users/mguterl/config.h deleted file mode 100644 index e69de29b..00000000 diff --git a/users/mguterl/mguterl.c b/users/mguterl/mguterl.c deleted file mode 100644 index 479c8d15..00000000 --- a/users/mguterl/mguterl.c +++ /dev/null @@ -1 +0,0 @@ -#include "mguterl.h" diff --git a/users/mguterl/mguterl.h b/users/mguterl/mguterl.h deleted file mode 100644 index 0b2f3938..00000000 --- a/users/mguterl/mguterl.h +++ /dev/null @@ -1,67 +0,0 @@ -#pragma once -#include "quantum.h" - -#define LOWER MO(_LOWER) -#define RAISE MO(_RAISE) - -/* Tap for Tab, hold for Hyper (Super+Ctrl+Shift+Alt) */ -#define HPR_TAB ALL_T(KC_TAB) - -/* Shift when held, Enter when tapped */ -#define SFT_ENT MT(MOD_RSFT, KC_ENT) - -/* Activate util layer while holding space */ -#define SPC_UTL LT(_UTIL, KC_SPC) - -/* Control when held, Escape when tapped */ -#define ESC_CTL MT(MOD_LCTL, KC_ESC) - -/* Toggle gaming layer */ -#define TG_GAME TG(_GAMING) - -/* - * Make it easy to navigate back and forward in Chrome. - */ -#define GO_BACK LGUI(KC_LBRC) -#define GO_FWD LGUI(KC_RBRC) - -/* - * When using a 40% layout, these keycodes make it easy to change tabs in apps - * like Chrome and VSCode. - */ -#define GUI_1 LGUI(KC_1) -#define GUI_2 LGUI(KC_2) -#define GUI_3 LGUI(KC_3) -#define GUI_4 LGUI(KC_4) -#define GUI_5 LGUI(KC_5) -#define GUI_6 LGUI(KC_6) -#define GUI_7 LGUI(KC_7) -#define GUI_8 LGUI(KC_8) -#define GUI_9 LGUI(KC_9) -#define GUI_0 LGUI(KC_0) - -/* - * Common layers and keycodes that are shared between Planck and Preonic - */ -enum ortho_layers { - _QWERTY, - _GAMING, - _UTIL, - _COLEMAK, - _DVORAK, - _LOWER, - _RAISE, - _PLOVER, - _ADJUST -}; - -enum ortho_keycodes { - QWERTY = SAFE_RANGE, - GAMING, - UTIL, - COLEMAK, - DVORAK, - PLOVER, - BACKLIT, - EXT_PLV -}; diff --git a/users/mguterl/readme.md b/users/mguterl/readme.md deleted file mode 100644 index 9dc1a7eb..00000000 --- a/users/mguterl/readme.md +++ /dev/null @@ -1,14 +0,0 @@ -Copyright 2019 Michael Guterl michael@diminishing.org @mguterl - -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 . diff --git a/users/mguterl/rules.mk b/users/mguterl/rules.mk deleted file mode 100644 index 4ed89c98..00000000 --- a/users/mguterl/rules.mk +++ /dev/null @@ -1 +0,0 @@ -SRC += mguterl.c diff --git a/users/mtdjr/config.h b/users/mtdjr/config.h deleted file mode 100644 index 9769ebc1..00000000 --- a/users/mtdjr/config.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef USERSPACE_CONFIG_H -#define USERSPACE_CONFIG_H - -// Put normal config.h settings here: -#define TAPPING_TERM 250 - -#endif // !USERSPACE_CONFIG_H diff --git a/users/mtdjr/mtdjr.c b/users/mtdjr/mtdjr.c deleted file mode 100644 index c31b077b..00000000 --- a/users/mtdjr/mtdjr.c +++ /dev/null @@ -1,163 +0,0 @@ -#include "mtdjr.h" - -#ifdef SOLENOID_ENABLE - #include "solenoid.h" -#endif - -#ifndef RGB_MODE - #define RGB_MODE 2 -#endif -#ifndef RGB_HUE - #define RGB_HUE 285 -#endif - -// Tap Dance Definitions -qk_tap_dance_action_t tap_dance_actions[] = { - [TD_ESC] = ACTION_TAP_DANCE_DOUBLE(KC_GRV, KC_ESC), - [TD_ALTLOCK] = ACTION_TAP_DANCE_DOUBLE(KC_RALT, LGUI(KC_L)), - [TD_ENDLOCK] = ACTION_TAP_DANCE_DOUBLE(KC_END, LGUI(KC_L)), - [TD_PRINT] = ACTION_TAP_DANCE_DOUBLE(LGUI(LSFT(KC_3)), LGUI(LSFT(KC_4))), -}; - -// Macros -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - if (record->event.pressed) { - switch(id) { - case ROOT: - SEND_STRING("sudo su -\n"); - return false; break; - case PPLY: - SEND_STRING("puppet apply /etc/puppetlabs/code/environments/production/manifests/site.pp\n"); - return false; break; - case PSEF: - SEND_STRING("ps -ef | grep "); - return false; break; - } - } - return MACRO_NONE; -}; - -void matrix_init_user(void) { - #ifdef RGBLIGHT_ENABLE - rgblight_enable_noeeprom(); - rgblight_mode_noeeprom(RGB_MODE); - rgblight_sethsv (RGB_HUE, 255, 255); - #endif - #ifdef SOLENOID_ENABLE - solenoid_setup(); - #endif -} - -void matrix_scan_user(void) { - #ifdef SOLENOID_ENABLE - solenoid_check(); - #endif -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - #ifdef SOLENOID_ENABLE - if (record->event.pressed) { - solenoid_fire(); - } - #endif - switch (keycode) { - case QWERTY: - if (record->event.pressed) { - set_single_persistent_default_layer(_QWERTY); - } - return false; - break; - case LOWER: - if (record->event.pressed) { - layer_on(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - break; - case RAISE: - if (record->event.pressed) { - layer_on(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - break; - case ADJUST: - if (record->event.pressed) { - layer_on(_ADJUST); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_ADJUST); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - break; - case SOLENOID_TOG: - #ifdef SOLENOID_ENABLE - if (record->event.pressed) { - solenoid_toggle(); - } - #endif - break; - case SOLENOID_DWELL_MINUS: - #ifdef SOLENOID_ENABLE - if (record->event.pressed) { - solenoid_dwell_minus(); - } - #endif - break; - case SOLENOID_DWELL_PLUS: - #ifdef SOLENOID_ENABLE - if (record->event.pressed) { - solenoid_dwell_plus(); - } - #endif - break; - case SOLENOID_BUZZ_ON: - #ifdef SOLENOID_ENABLE - if (record->event.pressed) { - solenoid_buzz_on(); - } - #endif - break; - case SOLENOID_BUZZ_OFF: - #ifdef SOLENOID_ENABLE - if (record->event.pressed) { - solenoid_buzz_off(); - } - #endif - break; - } - return true; -}; - -uint32_t layer_state_set_user(uint32_t state) { - switch (biton32(state)) { - case _RAISE: - #ifdef RGBLIGHT_ENABLE - rgblight_sethsv_noeeprom (240, 255, 255); - #endif - break; - case _LOWER: - #ifdef RGBLIGHT_ENABLE - rgblight_sethsv_noeeprom (0, 255, 255); - #endif - break; - case _ADJUST: - #ifdef RGBLIGHT_ENABLE - rgblight_sethsv_noeeprom (0, 0, 255); - #endif - break; - default: - #ifdef RGBLIGHT_ENABLE - rgblight_sethsv_noeeprom (RGB_HUE, 255, 255); - #endif - break; - } - return state; -} diff --git a/users/mtdjr/mtdjr.h b/users/mtdjr/mtdjr.h deleted file mode 100644 index 4d0b046f..00000000 --- a/users/mtdjr/mtdjr.h +++ /dev/null @@ -1,99 +0,0 @@ -#ifndef USERSPACE -#define USERSPACE - -#include "quantum.h" - -// Layers -enum user_enum { - // Layers - QWERTY = SAFE_RANGE, - LOWER, - RAISE, - SUPER, - ADJUST, - // Solenoid - SOLENOID_TOG, - SOLENOID_DWELL_MINUS, - SOLENOID_DWELL_PLUS, - SOLENOID_BUZZ_ON, - SOLENOID_BUZZ_OFF, -}; - -// Macro / Send String -enum user_macros { - ROOT, - PPLY, - PSEF, -}; - -// TapDance -enum user_tapdance { - TD_ENDLOCK, - TD_ALTLOCK, - TD_PRINT, - TD_ESC, -}; - - -// Layers -#define _QWERTY 0 -#define _LOWER 1 -#define _RAISE 2 -#define _SUPER 3 -#define _ADJUST 16 - -// Macros -#define KC_ROOT M(ROOT) -#define KC_PPLY M(PPLY) -#define KC_PSEF M(PSEF) - -// Tapdance -#define KC_EXC TD(TD_ESC) -#define KC_ELCK TD(TD_ENDLOCK) -#define KC_ALCK TD(TD_ALTLOCK) -#define KC_MPNT TD(TD_PRINT) - -// Custom Keycodes -#define KC_ KC_TRNS -#define KC_xxxx KC_NO -#define KC_LOWR LOWER -#define KC_RASE RAISE -#define KC_SUPR SUPER -#define KC_RST RESET - -// Key Combos -#define KC_XCPY LCTL(KC_INS) -#define KC_XINS LSFT(KC_INS) -#define KC_CAD LCTL(LALT(KC_DEL)) -#define KC_XCAD LCTL(LALT(KC_DEL)) -#define KC_XLCK LGUI(KC_L) - -// Solenoid -#define KC_STOG SOLENOID_TOG -#define KC_SDM SOLENOID_DWELL_MINUS -#define KC_SDP SOLENOID_DWELL_PLUS -#define KC_SBON SOLENOID_BUZZ_ON -#define KC_SBOF SOLENOID_BUZZ_OFF - -// RGB and Backlighting -#define KC_RGB RGB_TOG -#define KC_RHUI RGB_HUI -#define KC_RHUD RGB_HUD -#define KC_RSAI RGB_SAI -#define KC_RSAD RGB_SAD -#define KC_RVAI RGB_VAI -#define KC_RVAD RGB_VAD -#define KC_MOD RGB_MOD -#define KC_RMOD RGB_RMOD -#define KC_RPLN RGB_M_P -#define KC_RBTH RGB_M_B -#define KC_BLT BL_TOGG -#define KC_BLS BL_STEP -#define KC_BLI BL_INC -#define KC_BLD BL_DEC -#define KC_BLB BL_BRTG -#define KC_BLON BL_ON -#define KC_BLOF BL_OFF - - -#endif diff --git a/users/mtdjr/readme.md b/users/mtdjr/readme.md deleted file mode 100644 index e795ee23..00000000 --- a/users/mtdjr/readme.md +++ /dev/null @@ -1,14 +0,0 @@ -Copyright 2018 @mtdjr - -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 . diff --git a/users/mtdjr/rules.mk b/users/mtdjr/rules.mk deleted file mode 100644 index 6eec4b5b..00000000 --- a/users/mtdjr/rules.mk +++ /dev/null @@ -1,2 +0,0 @@ -SRC += mtdjr.c -TAP_DANCE_ENABLE = yes diff --git a/users/mtdjr/solenoid.h b/users/mtdjr/solenoid.h deleted file mode 100644 index a911bf79..00000000 --- a/users/mtdjr/solenoid.h +++ /dev/null @@ -1,99 +0,0 @@ -#ifndef SOLENOID_H -#define SOLENOID_H - -#include -#include "pincontrol.h" - - -#define SOLENOID_DEFAULT_DWELL 12 -#define SOLENOID_MAX_DWELL 100 -#define SOLENOID_MIN_DWELL 4 -#ifndef SOLENOID_ACTIVE - #define SOLENOID_ACTIVE false -#endif -#ifndef SOLENOID_PIN - #define SOLENOID_PIN F6 -#endif - - -bool solenoid_enabled = SOLENOID_ACTIVE; -bool solenoid_on = false; -bool solenoid_buzz = false; -bool solenoid_buzzing = false; -uint16_t solenoid_start = 0; -uint8_t solenoid_dwell = SOLENOID_DEFAULT_DWELL; - - -void solenoid_buzz_on(void) { - solenoid_buzz = true; -} - -void solenoid_buzz_off(void) { - solenoid_buzz = false; -} - -void solenoid_dwell_minus(void) { - if (solenoid_dwell > 0) solenoid_dwell--; -} - -void solenoid_dwell_plus(void) { - if (solenoid_dwell < SOLENOID_MAX_DWELL) solenoid_dwell++; -} - -void solenoid_toggle(void) { - solenoid_enabled = !solenoid_enabled; -} - -void solenoid_stop(void) { - digitalWrite(SOLENOID_PIN, PinLevelLow); - solenoid_on = false; - solenoid_buzzing = false; -} - -void solenoid_fire(void) { - if (!solenoid_enabled) return; - - if (!solenoid_buzz && solenoid_on) return; - if (solenoid_buzz && solenoid_buzzing) return; - - solenoid_on = true; - solenoid_buzzing = true; - solenoid_start = timer_read(); - digitalWrite(SOLENOID_PIN, PinLevelHigh); -} - -void solenoid_check(void) { - uint16_t elapsed = 0; - - if (!solenoid_on) return; - - elapsed = timer_elapsed(solenoid_start); - - //Check if it's time to finish this solenoid click cycle - if (elapsed > solenoid_dwell) { - solenoid_stop(); - return; - } - - //Check whether to buzz the solenoid on and off - if (solenoid_buzz) { - if (elapsed / SOLENOID_MIN_DWELL % 2 == 0){ - if (!solenoid_buzzing) { - solenoid_buzzing = true; - digitalWrite(SOLENOID_PIN, PinLevelHigh); - } - } - else { - if (solenoid_buzzing) { - solenoid_buzzing = false; - digitalWrite(SOLENOID_PIN, PinLevelLow); - } - } - } -} - -void solenoid_setup(void) { - pinMode(SOLENOID_PIN, PinDirectionOutput); -} - -#endif diff --git a/users/mverteuil/.gitignore b/users/mverteuil/.gitignore deleted file mode 100644 index 785f649d..00000000 --- a/users/mverteuil/.gitignore +++ /dev/null @@ -1 +0,0 @@ -copyright.h diff --git a/users/mverteuil/mverteuil.c b/users/mverteuil/mverteuil.c deleted file mode 100644 index a3afc417..00000000 --- a/users/mverteuil/mverteuil.c +++ /dev/null @@ -1,2 +0,0 @@ -#include QMK_KEYBOARD_H -#include "mverteuil.h" diff --git a/users/mverteuil/mverteuil.h b/users/mverteuil/mverteuil.h deleted file mode 100644 index 1119b75a..00000000 --- a/users/mverteuil/mverteuil.h +++ /dev/null @@ -1,21 +0,0 @@ -#if AUDIO_ENABLE -# if __has_include("copyright.h") -# include "copyright.h" -# endif - -# define LOWER_SOUND S__NOTE(_EF5), W__NOTE(_REST), Q__NOTE(_E4) -# define NUMPAD_SOUND S__NOTE(_DF5), S__NOTE(_REST), S__NOTE(_C6) -# define RAISE_SOUND S__NOTE(_E4), W__NOTE(_REST), Q__NOTE(_EF5) - -# define AUDIO_ON_SONG SONG(ZELDA_PUZZLE) -# define LAYER_FUNCROW_ON_SONG SONG(COLEMAK_SOUND) -# define LAYER_FUNCROW_OFF_SONG SONG(QWERTY_SOUND) -# define LAYER_NMPAD_SONG SONG(NUMPAD_SOUND) -# define LAYER_LOWER_SONG SONG(LOWER_SOUND) -# define LAYER_RAISE_SONG SONG(RAISE_SOUND) -#else -// No-op version of PLAY_SONG instead of many checks for AUDIO_ENABLED -# ifndef PLAY_SONG -# define PLAY_SONG(ARG) // ARG -# endif -#endif diff --git a/users/mverteuil/rules.mk b/users/mverteuil/rules.mk deleted file mode 100644 index bfc4b1ed..00000000 --- a/users/mverteuil/rules.mk +++ /dev/null @@ -1 +0,0 @@ -SRC += mverteuil.c diff --git a/users/narze/narze.c b/users/narze/narze.c deleted file mode 100644 index 6ec30344..00000000 --- a/users/narze/narze.c +++ /dev/null @@ -1 +0,0 @@ -#include "narze.h" diff --git a/users/narze/narze.h b/users/narze/narze.h deleted file mode 100644 index 036539a9..00000000 --- a/users/narze/narze.h +++ /dev/null @@ -1,9 +0,0 @@ -#pragma once - -#include "quantum.h" -#include "eeconfig.h" -#include "keymap_colemak.h" - -#ifdef COMBO_ENABLE -# include "superduper.h" -#endif diff --git a/users/narze/readme.md b/users/narze/readme.md deleted file mode 100644 index 124b84e6..00000000 --- a/users/narze/readme.md +++ /dev/null @@ -1,18 +0,0 @@ -# TODO -- [ ] Make SuperDuper mode fully-compatible in Windows by swapping GUI with Ctrl - -# LICENSE -Copyright 2019 Manassarn Manoonchai manassarn@gmail.com @narze - -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 . diff --git a/users/narze/rules.mk b/users/narze/rules.mk deleted file mode 100644 index 565a4a7a..00000000 --- a/users/narze/rules.mk +++ /dev/null @@ -1,5 +0,0 @@ -SRC += narze.c - -ifeq ($(strip $(COMBO_ENABLE)), yes) - SRC += superduper.c -endif diff --git a/users/narze/superduper.c b/users/narze/superduper.c deleted file mode 100644 index b497ce2e..00000000 --- a/users/narze/superduper.c +++ /dev/null @@ -1,66 +0,0 @@ -#include "superduper.h" -#include "eeconfig.h" -#include "eeprom.h" -#include "keymap_colemak.h" - -// SuperDuper - -#define SUPERDUPER_COMBO_COUNT 3 -#define EECONFIG_SUPERDUPER_INDEX (uint8_t *) 19 - -enum process_combo_event { - CB_SUPERDUPER, -}; - -enum supported_layers { - _QWERTY, - _COLEMAK, - _QWOC -}; - -const uint16_t PROGMEM superduper_combos[SUPERDUPER_COMBO_COUNT][3] = { - [_QWERTY] = {KC_S, KC_D, COMBO_END}, - [_COLEMAK] = {KC_R, KC_S, COMBO_END}, - [_QWOC] = {CM_S, CM_D, COMBO_END}, -}; - -combo_t key_combos[COMBO_COUNT] = { - [CB_SUPERDUPER] = COMBO_ACTION(superduper_combos[_QWERTY]), -}; - -volatile bool superduper_enabled = true; - -const uint16_t PROGMEM empty_combo[] = {COMBO_END}; - -bool toggle_superduper_mode(void) { - superduper_enabled = !superduper_enabled; - - if (superduper_enabled) { - set_superduper_key_combos(); - } else { - clear_superduper_key_combos(); - } - - return superduper_enabled; -} - -void set_superduper_key_combo_layer(uint16_t layer) { - key_combos[CB_SUPERDUPER].keys = superduper_combos[layer]; - eeprom_update_byte(EECONFIG_SUPERDUPER_INDEX, layer); -} - -void set_superduper_key_combos(void) { - uint8_t layer = eeprom_read_byte(EECONFIG_SUPERDUPER_INDEX); - - switch (layer) { - case _QWERTY: - case _COLEMAK: - case _QWOC: - key_combos[CB_SUPERDUPER].keys = superduper_combos[layer]; - break; - } -} - -void clear_superduper_key_combos(void) { - key_combos[CB_SUPERDUPER].keys = empty_combo; -} diff --git a/users/narze/superduper.h b/users/narze/superduper.h deleted file mode 100644 index f8df2e1a..00000000 --- a/users/narze/superduper.h +++ /dev/null @@ -1,7 +0,0 @@ -#pragma once -#include "narze.h" - -bool toggle_superduper_mode(void); -void set_superduper_key_combo_layer(uint16_t layer); -void set_superduper_key_combos(void); -void clear_superduper_key_combos(void); diff --git a/users/ninjonas/.gitignore b/users/ninjonas/.gitignore deleted file mode 100644 index c6df8c01..00000000 --- a/users/ninjonas/.gitignore +++ /dev/null @@ -1 +0,0 @@ -secrets.c diff --git a/users/ninjonas/README.md b/users/ninjonas/README.md deleted file mode 100644 index f6c2f323..00000000 --- a/users/ninjonas/README.md +++ /dev/null @@ -1,117 +0,0 @@ -# QMK User Configuration for [ninjonas](https://github.com/ninjonas/qmk-yonas) -Tired of copying and pasting the same macros and tap dances for all my keymaps. Utilizing user keymaps functionality. -See: https://docs.qmk.fm/#/feature_userspace - -## [ninjonas.c](ninjonas.c) -- ninjonas [QMK user configuration](https://github.com/qmk/qmk_firmware/blob/master/docs/feature_userspace.md) -- On `keymap.c` include `ninjonas.h` - ```c - #include "ninjonas.h" - ``` - -## Supported Keyboards -- [Crkbd ](../../keyboards/crkbd/keymaps/ninjonas) -- [Hotdox](../../keyboards/hotdox/keymaps/ninjonas) -- [Pinky3](../../keyboards/pinky/3/keymaps/ninjonas) -- [Lily58](../../keyboards/lily58/keymaps/ninjonas) -- [Kyria](../../keyboards/kyria/keymaps/ninjonas) - -## Features -### [Keys](ninjonas.h) -|Code | Description | -|---|---| -|K_LOCK | MacOS shortcut to execute lock command Cmd + CTRL + Q | -|K_CSCN | MacOS shortcut to copy a portion of the screen to the clipboard | -|K_MDSH | MacOS shortcut to get em-dash `–` | -|K_CPRF | Cmd + Shift + M. Used for switching Google Chrome profiles | - -### [Layers](ninjonas.h) -|Code | Description | -|---|---| -|LT_LOW | Tap for ENTER, hold for RAISE | -|LT_RAI | Tap for SPACE, hold for LOWER | - -### [Mod-Taps](ninjonas.h) -|Code | Description | -|---|---| -|MT_DEL | Tap for Delete, hold for ALT + SHIFT | -|MT_EQL | Tap for =, SHIFT | - -### [Layout Blocks](ninjonas.h) -Predefined keyboard layout templates to speed up configuring split keyboards - -|Code | Description | -|---|---| -|QWERTY | Qwerty Layout | -|DVORAK | Dvorak Layout | -|COLEMAK | Colemak Layout | -|NUM | Number Rows | -|FUNC | Function Rows | -|SYM | Symbol Rows \(When holding shift on numbers\) | -|NAV | Navigation Cluster | -|MOUSE | Mouse Cluster | -|MEDIA | Media Cluster | -|MOD | Modifier Cluster | -|NUMPAD | Numpad Cluster | - -### [Macros](process_records.c) -|Code | Description | -|---|---| -|M_PYNV | Macro to activate pyenv with the name `jira` | -|M_MAKE | Macro to send QMK make command to compile keyboard | -|M_MALL | Macro to send QMK make command to all [ninjonas](#Supported%20Keyboards) keyboards | -|M_FLSH | Macro to send QMK make command to compile keyboard with the correct bootloader | -|M_VRSN | Macro to send QMK version | -|M_SHFT | Sends Cmd + alt + shift to a keycode to activate [ShiftIt](https://github.com/fikovnik/ShiftIt) | -|M_CODE | Opens [Visual Studio Code](https://code.visualstudio.com/) on current directory | -|M_TERM | Launches Spotlight and calls Terminal | -|M_XXX1 to M_XXX5 | Reserved for secret macros see [Secrets](#secrets) | - -### [Tap-Dance](tap_dances.h) -|Code | Description | -|---|---| -|T_ESC | Tap once for ESC, double tap for CAPS_LOCK | -|T_LBRC | Tap once for [, double for back browser | -|T_RBRC | Tap once for ], double for forward browser | -|T_TAB | Tap once for TAB, double for CTRL + TAB | -|T_GRV | Tap once for GRV, double for Cmd + GRV | -|T_GUI | Tap once for Cmd, double to open spotlight | -|T_CPAP | Tap for Cmd + V, hold for Cmd + C, double tap to open [Line](https://line.me/en/) app, triple tap for itunes. | -|T_Y | Tap for Y, double tap for NUMPAD layer | - -### [Combos](combos.h) -|Code | Description | -|---|---| -|EQ_QUIT | Press E + Q will trigger Cmd + Q | -|RW_CLOSE | Press R + W will trigger Cmd + W| -|ET_TAB | Press E + T will trigger Cmd + T| -|ZC_COPY | Press Z + C will trigger Cmd + C| -|XV_PASTE | Press X + V will trigger Cmd + V| - -### Secrets -There's times where you have macros you don't want to share like emails, an address you need but you always forget, passwords 😱, & and private strings. Based off [drashna's secret macros](https://github.com/qmk/qmk_firmware/blob/master/users/drashna/readme_secrets.md), it's now possible to do this. All you need to do is create a `secrets.c` file. Below is an example of how this is used. - -```c -// secrets.c -#include "ninjonas.h" - -static const char * const secret[] = { - "BLANK1", - "BLANK2", - "BLANK3", - "BLANK4", - "BLANK5" -}; - -bool process_record_secrets(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case M_XXX1...M_XXX5: - if (record->event.pressed) { - send_string(secret[keycode - M_XXX1]); - } - break; - } - return true; -} - -``` \ No newline at end of file diff --git a/users/ninjonas/combos.c b/users/ninjonas/combos.c deleted file mode 100644 index 9453ba84..00000000 --- a/users/ninjonas/combos.c +++ /dev/null @@ -1,55 +0,0 @@ -#include "ninjonas.h" - -#ifdef COMBO_ENABLE -enum combo_events { - EQ_QUIT, - RW_CLOSE, - QT_TAB, - ZC_COPY, - XV_PASTE -}; - -const uint16_t PROGMEM quit_combo[] = {KC_E, KC_Q, COMBO_END}; -const uint16_t PROGMEM close_combo[] = {KC_R, KC_W, COMBO_END}; -const uint16_t PROGMEM tab_combo[] = {KC_Q, KC_T, COMBO_END}; -const uint16_t PROGMEM copy_combo[] = {KC_Z, KC_C, COMBO_END}; -const uint16_t PROGMEM paste_combo[] = {KC_X, KC_V, COMBO_END}; - -combo_t key_combos[COMBO_COUNT] = { - [EQ_QUIT] = COMBO_ACTION(quit_combo), - [RW_CLOSE] = COMBO_ACTION(close_combo), - [QT_TAB] = COMBO_ACTION(tab_combo), - [ZC_COPY] = COMBO_ACTION(copy_combo), - [XV_PASTE] = COMBO_ACTION(paste_combo), -}; - -void process_combo_event(uint8_t combo_index, bool pressed) { - switch(combo_index) { - case EQ_QUIT: - if (pressed) { - tap_code16(LGUI(KC_Q)); - } - break; - case RW_CLOSE: - if (pressed) { - tap_code16(LGUI(KC_W)); - } - break; - case QT_TAB: - if (pressed) { - tap_code16(LGUI(KC_T)); - } - break; - case ZC_COPY: - if (pressed) { - tap_code16(LGUI(KC_C)); - } - break; - case XV_PASTE: - if (pressed) { - tap_code16(LGUI(KC_V)); - } - break; - } -} -#endif \ No newline at end of file diff --git a/users/ninjonas/config.h b/users/ninjonas/config.h deleted file mode 100644 index 025dbb54..00000000 --- a/users/ninjonas/config.h +++ /dev/null @@ -1,21 +0,0 @@ -#ifdef TAPPING_TERM - #undef TAPPING_TERM - #define TAPPING_TERM 200 -#endif - -// Mouse Settings: Smoothing out mouse movement on keypress -#ifndef MOUSEKEY_INTERVAL - #undef MOUSEKEY_INTERVAL - #define MOUSEKEY_INTERVAL 16 -#endif -#define MOUSEKEY_DELAY 0 -#define MOUSEKEY_TIME_TO_MAX 60 -#define MOUSEKEY_MAX_SPEED 7 -#define MOUSEKEY_WHEEL_DELAY 0 - -#ifdef COMBO_ENABLE - #undef COMBO_COUNT - #undef COMBO_TERM - #define COMBO_COUNT 5 - #define COMBO_TERM 60 -#endif \ No newline at end of file diff --git a/users/ninjonas/encoder.c b/users/ninjonas/encoder.c deleted file mode 100644 index 3d56ff89..00000000 --- a/users/ninjonas/encoder.c +++ /dev/null @@ -1,104 +0,0 @@ -/* Copyright 2020 ninjonas - * - * 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 "ninjonas.h" - -#ifdef ENCODER_ENABLE -void left_encoder_cw(void) { - switch (get_highest_layer(layer_state)) { - case _LOWER: - tap_code16(LGUI(KC_TAB)); - break; - case _RAISE: - tap_code(KC_PGDN); - break; - case _ADJUST: - rgblight_decrease_hue(); - break; - default: - tap_code(KC_BRID); - break; - } -} -void left_encoder_acw(void) { - switch (get_highest_layer(layer_state)) { - case _LOWER: - tap_code16(SGUI(KC_TAB)); - break; - case _RAISE: - tap_code(KC_PGUP); - break; - case _ADJUST: - rgblight_increase_hue(); - break; - default: - tap_code(KC_BRIU); - break; - } -} -void right_encoder_cw(void) { - switch (get_highest_layer(layer_state)) { - case _LOWER: - tap_code(KC_DOWN); - break; - case _RAISE: - tap_code16(LCTL(LSFT(KC_TAB))); - break; - case _ADJUST: - rgblight_decrease_val(); - break; - default: - tap_code(KC_VOLD); - break; - } -} -void right_encoder_acw(void) { - switch (get_highest_layer(layer_state)) { - case _LOWER: - tap_code(KC_UP); - break; - case _RAISE: - tap_code16(LCTL(KC_TAB)); - break; - case _ADJUST: - rgblight_increase_val(); - break; - default: - tap_code(KC_VOLU); - break; - } -} - -void encoder_update_user(uint8_t index, bool clockwise) { - encoder_rotated_timer = timer_read(); - if (index == 0) { - left_encoder_rotated = true; - if (clockwise) { - left_encoder_cw(); - } else { - left_encoder_acw(); - } - } - else if (index == 1) { - right_encoder_rotated = true; - if (clockwise) { - right_encoder_cw(); - } else { - right_encoder_acw(); - } - } -} - -#endif \ No newline at end of file diff --git a/users/ninjonas/ninjonas.c b/users/ninjonas/ninjonas.c deleted file mode 100644 index 7e5afcec..00000000 --- a/users/ninjonas/ninjonas.c +++ /dev/null @@ -1,39 +0,0 @@ -/* Copyright 2019 @ninjonas - * - * 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 "ninjonas.h" - -layer_state_t layer_state_set_user (layer_state_t state) { - return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); -} - -#ifdef RGBLIGHT_ENABLE -extern rgblight_config_t rgblight_config; -#endif -void keyboard_post_init_user() { - #ifdef RGBLIGHT_ENABLE - // Cycles through the entire hue wheel and resetting to default color - uint16_t default_hue = rgblight_config.hue; - rgblight_enable_noeeprom(); - layer_state_set_user(layer_state); - rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); - for (uint16_t i = 255; i > 0; i--) { - rgblight_sethsv_noeeprom((i + default_hue) % 255, rgblight_config.sat, rgblight_config.val); - matrix_scan(); - wait_ms(10); - } - #endif - layer_state_set_user(layer_state); -} \ No newline at end of file diff --git a/users/ninjonas/ninjonas.h b/users/ninjonas/ninjonas.h deleted file mode 100644 index 94b4712a..00000000 --- a/users/ninjonas/ninjonas.h +++ /dev/null @@ -1,148 +0,0 @@ -/* Copyright 2019 @ninjonas - * - * 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 . - */ -#pragma once -#include "quantum.h" -#include "version.h" -#include "eeprom.h" -#include "process_records.h" - -#ifdef TAP_DANCE_ENABLE - #include "tap_dances.h" -#endif -#if defined(KEYBOARD_lily58_rev1) & defined(PROTOCOL_LUFA) - #include "lufa.h" - #include "split_util.h" -#endif - -#ifdef ENCODER_ENABLE -bool left_encoder_rotated; -bool right_encoder_rotated; -uint16_t encoder_rotated_timer; -#endif - -#define _QWERTY 0 -#define _DVORAK 1 -#define _COLEMAK 2 -#define _LOWER 3 -#define _RAISE 4 -#define _ADJUST 5 -#define _NUMPAD 6 - -// Shortcut Keys -#define K_LOCK LGUI(LCTL(KC_Q)) // Locks screen on MacOS -#define K_CSCN LGUI(LCTL(LSFT(KC_4))) // Copy a portion of the screen to the clipboard -#define K_CPRF LGUI(LSFT(KC_M)) // Cmd + Shift + M. Used for switching Google Chrome profiles -#define K_MDSH LSFT(LALT(KC_MINS)) - -// Layer Keys -#define LT_LOW LT(_LOWER, KC_ENT) -#define LT_RAI LT(_RAISE, KC_SPC) - -// Mod-Tap Keys -#define MT_DEL MT(MOD_LALT | MOD_LSFT, KC_DEL) -#define MT_EQL MT(MOD_RSFT, KC_EQL) - -// Layout blocks -#define _____________________QWERTY_L1______________________ T_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T -#define _____________________QWERTY_L2______________________ T_ESC, KC_A, KC_S, KC_D, KC_F, KC_G -#define _____________________QWERTY_L3______________________ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B - -#define _____________________QWERTY_R1______________________ T_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS -#define _____________________QWERTY_R2______________________ KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT -#define _____________________QWERTY_R3______________________ KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MT_EQL - -#define _____________________DVORAK_L1______________________ T_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y -#define _____________________DVORAK_L2______________________ T_ESC, KC_A, KC_O, KC_E, KC_U, KC_I -#define _____________________DVORAK_L3______________________ KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X - -#define _____________________DVORAK_R1______________________ KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSLS -#define _____________________DVORAK_R2______________________ KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH -#define _____________________DVORAK_R3______________________ KC_B, KC_M, KC_W, KC_V, KC_Z, MT_EQL - -#define _____________________COLEMAK_L1_____________________ T_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G -#define _____________________COLEMAK_L2_____________________ T_ESC, KC_A, KC_R, KC_S, KC_T, KC_D -#define _____________________COLEMAK_L3_____________________ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B - -#define _____________________COLEMAK_R1_____________________ KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS -#define _____________________COLEMAK_R2_____________________ KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT -#define _____________________COLEMAK_R3_____________________ KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, MT_EQL - -#define _____________________NUM_LEFT_______________________ T_GRV, KC_1, KC_2, KC_3, KC_4, KC_5 -#define _____________________NUM_RIGHT______________________ KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS - -#define _____________________FUNC_LEFT______________________ KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5 -#define _____________________FUNC_RIGHT_____________________ KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12 - -#define _____________________SYM_LEFT_______________________ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC -#define _____________________SYM_RIGHT______________________ KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_UNDS - -#define _____________________LOWER_L1_______________________ M_XXX2, M_XXX3, _________MEDIA_1_________, K_CSCN -#define _____________________LOWER_L2_______________________ M_XXX4, M_XXX5, _________MEDIA_2_________, XXXXXXX -#define _____________________LOWER_L3_______________________ KC_LSFT, M_SHFT, _________MEDIA_3_________, T_LBRC - -#define _____________________LOWER_R1_______________________ _______________NAV_1______________, XXXXXXX, K_MDSH -#define _____________________LOWER_R2_______________________ _______________NAV_2______________, K_LOCK, XXXXXXX -#define _____________________LOWER_R3_______________________ T_RBRC, KC_M, M_TERM, M_CODE, M_XXX1, M_PYNV - -#define _____________________ADJUST_L1______________________ M_MAKE, EEP_RST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX - -#if defined(RGB_MATRIX_ENABLE) || defined(RGBLIGHT_ENABLE) - #define _____________________ADJUST_L2______________________ M_VRSN, M_MALL, RGB_SPI, RGB_SAI, RGB_HUI, RGB_VAI - #define _____________________ADJUST_L3______________________ M_FLSH, XXXXXXX, RGB_SPD, RGB_SAD, RGB_HUD, RGB_VAD -#else - #define _____________________ADJUST_L2______________________ M_VRSN, M_MALL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX - #define _____________________ADJUST_L3______________________ M_FLSH, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX -#endif - -#if defined(RGB_MATRIX_ENABLE) || defined(RGBLIGHT_ENABLE) - #define _____________________ADJUST_R1______________________ RGB_TOG, XXXXXXX, XXXXXXX, COLEMAK, DVORAK, QWERTY - #define _____________________ADJUST_R3______________________ RGB_MOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX -#else - #define _____________________ADJUST_R1______________________ XXXXXXX, XXXXXXX, XXXXXXX, COLEMAK, DVORAK, QWERTY - #define _____________________ADJUST_R3______________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX -#endif -#define _____________________ADJUST_R2______________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX - -#define _____________________NUMPAD_1_______________________ T_Y, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_PAST -#define _____________________NUMPAD_2_______________________ XXXXXXX, KC_P4, KC_P5, KC_P6, KC_PMNS, KC_PSLS -#define _____________________NUMPAD_3_______________________ KC_P0, KC_P1, KC_P2, KC_P3, KC_PDOT, KC_COLN - -#define _______________NAV_1______________ KC_PGUP, KC_HOME, KC_UP, KC_END -#define _______________NAV_2______________ KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT - -#define _____________MOUSE_1______________ KC_BTN1, KC_MS_U, KC_BTN2, KC_WH_D -#define _____________MOUSE_2______________ KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_U - -#define __________________________________ _______, _______, _______, _______ - -#define _____________MOD_LEFT_____________ KC_LALT, T_GUI, KC_LCTL, LT_RAI -#define _____________MOD_RIGHT____________ LT_LOW, KC_BSPC, MT_DEL, T_CPAP - -#define _________MEDIA_1_________ KC_BRIU, KC_MPLY, KC_MUTE -#define _________MEDIA_2_________ KC_BRID, KC_MFFD, KC__VOLUP -#define _________MEDIA_3_________ XXXXXXX, KC_MRWD, KC__VOLDOWN - -#if defined(KEYBOARD_crkbd_rev1) || defined(KEYBOARD_kyria_rev1) - #define ________MOD_LEFT_________ T_GUI, KC_LCTL, LT_RAI - #define ________MOD_RIGHT________ LT_LOW, KC_BSPC, MT_DEL -#else - #define ________MOD_LEFT_________ KC_LALT, T_GUI, KC_LCTL - #define ________MOD_RIGHT________ KC_BSPC, MT_DEL, T_CPAP -#endif - -// Layout wrappers -#define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__) -#define LAYOUT_ergodox_wrapper(...) LAYOUT_ergodox(__VA_ARGS__) \ No newline at end of file diff --git a/users/ninjonas/oled.c b/users/ninjonas/oled.c deleted file mode 100644 index ffb9eecb..00000000 --- a/users/ninjonas/oled.c +++ /dev/null @@ -1,111 +0,0 @@ -#include QMK_KEYBOARD_H -#include -#include "ninjonas.h" - -#if defined(OLED_DRIVER_ENABLE) & !defined(KEYBOARD_kyria_rev1) - -static uint32_t oled_timer = 0; -extern uint8_t is_master; - -oled_rotation_t oled_init_user(oled_rotation_t rotation) { - if (is_master) { - return OLED_ROTATION_0; - } - return OLED_ROTATION_180; -} - -bool process_record_oled(uint16_t keycode, keyrecord_t *record) { - if (record->event.pressed) { - oled_timer = timer_read32(); - } - return true; -} - -void render_layout_state(void) { - oled_write_P(PSTR("Layout: "), false); - switch (biton32(default_layer_state)) { - case _COLEMAK: - oled_write_P(PSTR("Colemak"), false); - break; - case _DVORAK: - oled_write_P(PSTR("Dvorak"), false); - break; - case _QWERTY: - oled_write_P(PSTR("Qwerty"), false); - break; - default: - oled_write_ln_P(PSTR("Undefined"), false); - } -} - -void oled_white_space(void){ - oled_write_P(PSTR(" "), false); -} - -void render_layer_state(void) { - oled_write_P(PSTR("\nLayer:"), false); - bool lower = layer_state_is(_LOWER) & !layer_state_is(_ADJUST); - bool raise = layer_state_is(_RAISE) & !layer_state_is(_ADJUST); - bool adjust = layer_state_is(_ADJUST); - bool numpad = layer_state_is(_NUMPAD); - - if(lower){ - oled_write_P(PSTR(" Lower "), true); - } else if(raise){ - oled_write_P(PSTR(" Raise "), true); - } else if(adjust){ - oled_write_P(PSTR(" Adjust "), true); - } else if(numpad) { - oled_write_P(PSTR(" Numpad "), true); - } else { - oled_write_P(PSTR(" Default"), false); - } -} - -void render_mod_state(uint8_t modifiers) { - oled_write_P(PSTR("\nMods: "), false); - oled_write_P(PSTR("SHF"), (modifiers & MOD_MASK_SHIFT)); - oled_white_space(); - oled_write_P(PSTR("CTL"), (modifiers & MOD_MASK_CTRL)); - oled_white_space(); - oled_write_P(PSTR("ALT"), (modifiers & MOD_MASK_ALT)); - oled_white_space(); - oled_write_P(PSTR("GUI"), (modifiers & MOD_MASK_GUI)); -} - -void render_status(void){ - render_layout_state(); - oled_write_P(PSTR("\n"), false); - render_layer_state(); - render_mod_state(get_mods()|get_oneshot_mods()); -} - -static void render_logo(void) { - static const char PROGMEM qmk_logo[] = { - 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, - 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, - 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, - 0}; - - oled_write_P(qmk_logo, false); -} - -void oled_task_user(void) { - if (timer_elapsed32(oled_timer) > 15000) { - oled_off(); - return; - } - #ifndef SPLIT_KEYBOARD - else { oled_on(); } - #endif - - if (is_master) { - render_status(); - } else { - render_logo(); - oled_write_P(PSTR("\n"), false); - oled_scroll_left(); - } -} - -#endif \ No newline at end of file diff --git a/users/ninjonas/process_records.c b/users/ninjonas/process_records.c deleted file mode 100644 index a3b84179..00000000 --- a/users/ninjonas/process_records.c +++ /dev/null @@ -1,117 +0,0 @@ -#include "ninjonas.h" - -__attribute__((weak)) -bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { return true; } - -__attribute__((weak)) -bool process_record_secrets(uint16_t keycode, keyrecord_t *record) { return true; } - -#ifdef OLED_DRIVER_ENABLE -__attribute__((weak)) -bool process_record_oled(uint16_t keycode, keyrecord_t *record) { return true; } -#endif - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - - // Sends pyenv to activate 'jira' environment - case M_PYNV: - if (record->event.pressed) { - SEND_STRING("pyenv activate jira\n"); - } - break; - - // Sends Cmd + alt + shift to a keycode to activate shiftit. See: https://github.com/fikovnik/ShiftIt - case M_SHFT: - if (record->event.pressed) { - register_code(KC_LGUI); - register_code(KC_LALT); - register_code(KC_LCTL); - } else { - unregister_code(KC_LGUI); - unregister_code(KC_LALT); - unregister_code(KC_LCTL); - } - break; - - // Sends QMK make command to compile keyboard - case M_MAKE: - if (record->event.pressed) { - SEND_STRING("rm -f *.hex && rm -rf .build/ && make " QMK_KEYBOARD ":" QMK_KEYMAP SS_TAP(X_ENTER)); - } - break; - - // Sends QMK make command to compile all keyboards - case M_MALL: - if (record->event.pressed) { - SEND_STRING("rm -f *.hex && rm -rf .build/ && make crkbd:ninjonas lily58:ninjonas hotdox:ninjonas pinky/3:ninjonas kyria:ninjonas\n"); - } - break; - - // Sends QMK make command with the correct bootloader - case M_FLSH: - if (!record->event.pressed) { - SEND_STRING("rm -f *.hex && rm -rf .build/ && make " QMK_KEYBOARD ":" QMK_KEYMAP - #if (defined(BOOTLOADER_DFU) || defined(BOOTLOADER_LUFA_DFU) || defined(BOOTLOADER_QMK_DFU)) - ":dfu " - #elif defined(BOOTLOADER_CATERINA) - ":avrdude " - #endif - SS_TAP(X_ENTER) - ); - - // Send reset_keyboard command instead of pressing reset button - #if (defined(BOOTLOADER_DFU) || defined(BOOTLOADER_LUFA_DFU) || defined(BOOTLOADER_QMK_DFU)) - reset_keyboard(); - #endif - } - break; - - // Sends QMK version - case M_VRSN: - if (record->event.pressed) { - SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION ", Built on: " QMK_BUILDDATE); - } - break; - - // Opens Visual Studio Code on current directory - case M_CODE: - if (record->event.pressed) { - SEND_STRING("code .\n"); - } - break; - - // Opens Terminal - case M_TERM: - if (record->event.pressed) { - SEND_STRING(SS_DOWN(X_LGUI) SS_TAP(X_SPACE) SS_UP(X_LGUI)); - wait_ms(250); - SEND_STRING("terminal\n"); - } - break; - - // BEGIN: Layer macros - case QWERTY: - if (record->event.pressed) { - set_single_persistent_default_layer(_QWERTY); - } - break; - case DVORAK: - if (record->event.pressed) { - set_single_persistent_default_layer(_DVORAK); - } - break; - case COLEMAK: - if (record->event.pressed) { - set_single_persistent_default_layer(_COLEMAK); - } - break; - // END: Layer macros - } - - return process_record_keymap(keycode, record) && process_record_secrets(keycode, record) - #ifdef OLED_DRIVER_ENABLE - && process_record_oled(keycode, record) - #endif - ; // Close return -} diff --git a/users/ninjonas/process_records.h b/users/ninjonas/process_records.h deleted file mode 100644 index 2e69ca21..00000000 --- a/users/ninjonas/process_records.h +++ /dev/null @@ -1,30 +0,0 @@ -#pragma once -#include "ninjonas.h" - -enum custom_keycodes { - // Layer Macros - QWERTY = SAFE_RANGE, - DVORAK, - COLEMAK, - // Custom Macros - M_PYNV, - M_SHFT, - M_MAKE, - M_MALL, - M_FLSH, - M_VRSN, - M_CODE, - M_TERM, - // Secret Macros - M_XXX1, - M_XXX2, - M_XXX3, - M_XXX4, - M_XXX5, -}; - -bool process_record_secrets(uint16_t keycode, keyrecord_t *record); -bool process_record_keymap(uint16_t keycode, keyrecord_t *record); -#ifdef OLED_DRIVER_ENABLE -bool process_record_oled(uint16_t keycode, keyrecord_t *record); -#endif diff --git a/users/ninjonas/rules.mk b/users/ninjonas/rules.mk deleted file mode 100644 index a5cd0fdd..00000000 --- a/users/ninjonas/rules.mk +++ /dev/null @@ -1,16 +0,0 @@ -BOOTMAGIC_ENABLE = no # Disable Boot Magic (https://beta.docs.qmk.fm/features/feature_bootmagic) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -TAP_DANCE_ENABLE = yes # Enable Tap Dance. -COMBO_ENABLE = yes # Enable Combos - -SRC += ninjonas.c \ - process_records.c \ - tap_dances.c \ - oled.c \ - encoder.c \ - combos.c - -ifneq ("$(wildcard $(USER_PATH)/secrets.c)","") - SRC += secrets.c -endif \ No newline at end of file diff --git a/users/ninjonas/tap_dances.c b/users/ninjonas/tap_dances.c deleted file mode 100644 index 63e4d3ba..00000000 --- a/users/ninjonas/tap_dances.c +++ /dev/null @@ -1,112 +0,0 @@ -#include "ninjonas.h" - -//// BEGIN: Advanced Tap Dances -int cur_dance (qk_tap_dance_state_t *state) { - if (state->count == 1) { - if (state->interrupted || !state->pressed) return SINGLE_TAP; - //key has not been interrupted, but they key is still held. Means you want to send a 'HOLD'. - else return SINGLE_HOLD; - } - else if (state->count == 2) { - /* - * DOUBLE_SINGLE_TAP is to distinguish between typing "pepper", and actually wanting a double tap - * action when hitting 'pp'. Suggested use case for this return value is when you want to send two - * keystrokes of the key, and not the 'double tap' action/macro. - */ - if (state->interrupted) return DOUBLE_SINGLE_TAP; - else if (state->pressed) return DOUBLE_HOLD; - else return DOUBLE_TAP; - } - //Assumes no one is trying to type the same letter three times (at least not quickly). - //If your tap dance key is 'KC_W', and you want to type "www." quickly - then you will need to add - //an exception here to return a 'TRIPLE_SINGLE_TAP', and define that enum just like 'DOUBLE_SINGLE_TAP' - if (state->count == 3) { - if (state->interrupted || !state->pressed) return TRIPLE_TAP; - else return TRIPLE_HOLD; - } - else return 8; //magic number. At some point this method will expand to work for more presses -} - -// BEGIN: Copy, Paste, Apps -// https://beta.docs.qmk.fm/features/feature_tap_dance#example-6-using-tap-dance-for-momentary-layer-switch-and-layer-toggle-keys -static tap copy_paste_app_tap_state = { - .is_press_action = true, - .state = 0 -}; - -void copy_paste_app_finished (qk_tap_dance_state_t *state, void *user_data) { - copy_paste_app_tap_state.state = cur_dance(state); - switch (copy_paste_app_tap_state.state) { - case SINGLE_TAP: - tap_code16(LGUI(KC_V)); // Tap Cmd + V - break; - case SINGLE_HOLD: - tap_code16(LGUI(KC_C)); // Hold Cmd + C - break; - case DOUBLE_TAP: - SEND_STRING(SS_DOWN(X_LGUI) SS_TAP(X_SPACE) SS_UP(X_LGUI)); - wait_ms(250); - SEND_STRING("line\n"); - break; - case TRIPLE_TAP: - SEND_STRING(SS_DOWN(X_LGUI) SS_TAP(X_SPACE) SS_UP(X_LGUI)); - wait_ms(250); - SEND_STRING("itunes\n"); - break; - } -} - -void copy_paste_app_reset (qk_tap_dance_state_t *state, void *user_data) { - copy_paste_app_tap_state.state = 0; -} -// END: Copy, Paste, Apps - -// BEGIN: Y, NUMPAD -static tap y_numpad_tap_state = { - .is_press_action = true, - .state = 0 -}; - -void y_numpad_finished (qk_tap_dance_state_t *state, void *user_data) { - y_numpad_tap_state.state = cur_dance(state); - switch (y_numpad_tap_state.state) { - case SINGLE_TAP: - tap_code(KC_Y); - break; - case SINGLE_HOLD: - register_code16(KC_Y); - break; - case DOUBLE_TAP: - if (layer_state_is(_NUMPAD)) { - layer_off(_NUMPAD); - } else { - layer_on(_NUMPAD); - } - break; - } -} - -void y_numpad_reset (qk_tap_dance_state_t *state, void *user_data) { - switch (y_numpad_tap_state.state) { - case SINGLE_HOLD: - unregister_code16(KC_Y); - break; - } - y_numpad_tap_state.state = 0; -} -// END: Y, NUMPAD - -//// END: Advanced Tap Dances - -qk_tap_dance_action_t tap_dance_actions[] = { - [TD_ESC_CAPS] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, KC_CAPS), - [TD_LBRC_BACK] = ACTION_TAP_DANCE_DOUBLE(KC_LBRC, LGUI(KC_LBRC)), - [TD_RBRC_FWD] = ACTION_TAP_DANCE_DOUBLE(KC_RBRC, LGUI(KC_RBRC)), - [TD_TAB_CTRLTAB] = ACTION_TAP_DANCE_DOUBLE(KC_TAB, LCTL(KC_TAB)), - [TD_GRV_CTRLGRV] = ACTION_TAP_DANCE_DOUBLE(KC_GRV, LGUI(KC_GRV)), - [TD_GUI_GUISPC] = ACTION_TAP_DANCE_DOUBLE(KC_LGUI, LGUI(KC_SPC)), - - // Advanced Tap Dances - [TD_COPY_PASTE_APP] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, copy_paste_app_finished, copy_paste_app_reset, 300), - [TD_Y_NUMPAD] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, y_numpad_finished, y_numpad_reset, 300), -}; \ No newline at end of file diff --git a/users/ninjonas/tap_dances.h b/users/ninjonas/tap_dances.h deleted file mode 100644 index 11f77e71..00000000 --- a/users/ninjonas/tap_dances.h +++ /dev/null @@ -1,37 +0,0 @@ -#pragma once -#include "ninjonas.h" - -typedef struct { - bool is_press_action; - int state; -} tap; - -enum tapdance_types{ - SINGLE_TAP = 1, - SINGLE_HOLD = 2, - DOUBLE_TAP = 3, - DOUBLE_HOLD = 4, - DOUBLE_SINGLE_TAP = 5, //send two single taps - TRIPLE_TAP = 6, - TRIPLE_HOLD = 7 -}; - -enum custom_tapdances{ - TD_ESC_CAPS = 0, - TD_LBRC_BACK, - TD_RBRC_FWD, - TD_TAB_CTRLTAB, - TD_GRV_CTRLGRV, - TD_GUI_GUISPC, - TD_COPY_PASTE_APP, - TD_Y_NUMPAD, -}; - -#define T_ESC TD(TD_ESC_CAPS) // Tap for ESC, double tap for CAPSLOCK -#define T_LBRC TD(TD_LBRC_BACK) // Tap for [, double tap for back browser -#define T_RBRC TD(TD_RBRC_FWD) // Tap for ], double tap for forward browser -#define T_TAB TD(TD_TAB_CTRLTAB) // Tap for TAB, double tap for CTRL + TAB -#define T_GRV TD(TD_GRV_CTRLGRV) // Tap for GRV, double tap for Cmd + GRV -#define T_GUI TD(TD_GUI_GUISPC) // Tap for Cmd, double tap for Cmd + Space -#define T_CPAP TD(TD_COPY_PASTE_APP) // Tap for paste, hold for copy, double tap for Line App -#define T_Y TD(TD_Y_NUMPAD) // Tap for Y, double tap for NUMPAD \ No newline at end of file diff --git a/users/not-quite-neo/nqn-basic-layout.h b/users/not-quite-neo/nqn-basic-layout.h deleted file mode 100644 index d1b9a1c4..00000000 --- a/users/not-quite-neo/nqn-basic-layout.h +++ /dev/null @@ -1,124 +0,0 @@ -#ifndef NQN_BASIC_LAYOUT_H -#define NQN_BASIC_LAYOUT_H - -/* -This is the basic NQN layout - -It consists of a block of 5x3, 5x4, 6x3, or 6x4 for each hand. This allows us -to use these blocks for a variety of keyboards like the planck, preonic and -even splits like the ergodox. - -You can see that we use some quirky preprocessor defines to achive what we -desire. In the future I would like to see qmk taking a more generic approach -like the KLL. - -The naming convention for these blocks is - L__ - - The LAYER is a number following the neo2 manner starting at 1 for the base - layer, 2 is shift, 3 is for special chars etc. - - SIDE is, well either the left or right side/half of a keyboard. - - The ROW is starting from the top, numbering beginning at 1. -*/ - - -#include "nqn-common.h" - - -/* - * - * LEFT RIGHT - * ,----------------------------------. ,----------------------------------. - * 01 | x | v | l | c | w | | k | h | g | f | q | - * |------+------+------+------+------| |------+------+------+------+------| - * 02 | u | i | a | e | o | | s | n | r | t | d | - * |------+------+------+------+------| |------+------+------+------+------| - * 03 | y | < | # | p | z | | b | m | , | . | j | - * `----------------------------------' `----------------------------------' - */ -#define L01_LEFT_01 KC_X, KC_V, KC_L, KC_C, KC_W -#define L01_LEFT_02 KC_U, KC_I, KC_A, KC_E, KC_O -#define L01_LEFT_03 N_Y, N_LT, N_HS, KC_P, N_Z -#define L01_RIGHT_02 KC_S, KC_N, KC_R, KC_T, KC_D -#define L01_RIGHT_01 KC_K, KC_H, KC_G, KC_F, KC_Q -#define L01_RIGHT_03 KC_B, KC_M, KC_COMM, KC_DOT, KC_J - - -/* - * - * LEFT RIGHT - * ,----------------------------------. ,----------------------------------. - * 01 | … | _ | [ | ] | ^ | | ! | < | > | = | & | - * |------+------+------+------+------| |------+------+------+------+------| - * 02 | \ | / | { | } | * | | ? | ( | ) | - | @ | - * |------+------+------+------+------| |------+------+------+------+------| - * 03 | # | $ | | | ~ | ` | | + | % | " | ' | ° | - * `----------------------------------' `----------------------------------' - */ -#define L03_LEFT_01 N_DOTS, N_USC, N_LSQBR, N_RSQBR, N_CIRC -#define L03_LEFT_02 N_BSLS, N_SLSH, N_LCUBR, N_RCUBR, N_ASTR -#define L03_LEFT_03 N_HASH, N_DLR, N_PIPE, N_TILD, N_GRAVE -#define L03_RIGHT_01 N_EXKL, N_LT, N_GT, N_EQ, N_AMP -#define L03_RIGHT_02 N_QUES, N_LPARN, N_RPARN, N_MINS, N_AT -#define L03_RIGHT_03 N_PLUS, N_PERC, N_QUOT, N_SING, N_DEGRE - - -/* - * - * LEFT RIGHT - * ,----------------------------------. ,----------------------------------. - * 01 | PAGEU| BACKS| UP | DELET| PAGED| | / | 7 | 8 | 9 | - | - * |------+------+------+------+------| |------+------+------+------+------| - * 02 | HOME | LEFT | DOWN | RIGHT| END | | * | 4 | 5 | 6 | + | - * |------+------+------+------+------| |------+------+------+------+------| - * 03 | ESC | TAB | INSRT| ENTER| UNDO | | ENTER| 1 | 2 | 3 | , | - * `----------------------------------' `----------------------------------' - */ -#define L04_LEFT_01 KC_PGUP, KC_BSPC, KC_UP, KC_DEL, KC_PGDN -#define L04_LEFT_02 KC_HOME, KC_LEFT, KC_DOWN, KC_RIGHT, KC_END -#define L04_LEFT_03 KC_ESC, KC_TAB, KC_INS, KC_ENTER, N_UNDO -#define L04_RIGHT_01 KC_KP_SLASH, KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_MINUS -#define L04_RIGHT_02 KC_KP_ASTERISK, KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_PLUS -#define L04_RIGHT_03 KC_KP_ENTER, KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_DOT - - -/* - * LEFT RIGHT - * ,----------------------------------. ,----------------------------------. - * 01 | | | | | | | | | | | | - * |------+------+------+------+------| |------+------+------+------+------| - * 02 | ü | | ä | € | ö | | ß | | | | | - * |------+------+------+------+------| |------+------+------+------+------| - * 03 | | | | | | | | µ | | | | - * `----------------------------------' `----------------------------------' - */ -#define L05_LEFT_01 _______, _______, _______, _______, _______ -#define L05_LEFT_02 N_UE, _______, N_AE, N_EURO, N_OE -#define L05_LEFT_03 _______, _______, _______, _______, _______ -#define L05_RIGHT_01 _______, _______, _______, _______, _______ -#define L05_RIGHT_02 N_SS, _______, _______, _______, _______ -#define L05_RIGHT_03 _______, N_MU, _______, _______, _______ - - -/* - * - * LEFT RIGHT - * ,----------------------------------. ,----------------------------------. - * 01 | F1 | F2 | F3 | F4 | | | MAIL | MUSIC| FILES| CALC | PASTE| - * |------+------+------+------+------| |------+------+------+------+------| - * 02 | F5 | F6 | F7 | F8 | | | PREV |PLAY/P| NEXT | STOP | COPY | - * |------+------+------+------+------| |------+------+------+------+------| - * 03 | F9 | F10 | F11 | F12 | | | PRINT| SCROL| PAUSE| NUMLK| CUT | - * `----------------------------------' `----------------------------------' - */ -#define L06_LEFT_01 KC_F1, KC_F2, KC_F3, KC_F4, _______ -#define L06_LEFT_02 KC_F5, KC_F6, KC_F7, KC_F8, _______ -#define L06_LEFT_03 KC_F9, KC_F10, KC_F11, KC_F12, _______ -#define L06_RIGHT_01 KC_MAIL, KC_MSEL, KC_MY_COMPUTER, KC_CALCULATOR, N_PASTE -#define L06_RIGHT_02 KC_MPRV, KC_MPLY, KC_MNXT, KC_MSTP, N_COPY -#define L06_RIGHT_03 KC_PSCR, KC_SLCK, KC_PAUS, KC_NLCK, N_CUT - - -#endif diff --git a/users/not-quite-neo/nqn-common.h b/users/not-quite-neo/nqn-common.h deleted file mode 100644 index bcd79505..00000000 --- a/users/not-quite-neo/nqn-common.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef NQN_COMMON_H -#define NQN_COMMON_H - - -/* -This file holds some commen NQN definitions -*/ - -#endif diff --git a/users/not-quite-neo/nqn-keys-on-quertz-de-latin1.h b/users/not-quite-neo/nqn-keys-on-quertz-de-latin1.h deleted file mode 100644 index 8276cf20..00000000 --- a/users/not-quite-neo/nqn-keys-on-quertz-de-latin1.h +++ /dev/null @@ -1,73 +0,0 @@ -#ifndef NQN_KEYS_ON_QUERTZ_DE_LATIN1_H -#define NQN_KEYS_ON_QUERTZ_DE_LATIN1_H - - -/* -This file defines the desierd NQN keys if you use a software (operating sysetm) -configured for a QUERTZ layout (de-latin1). - -These chars can be created by using ALTGR on linux and a few of them on windows -with a German de-latin1 layout (depending on desktop environment and/or -application). - ′¹²³¼½¬{[]}\¸ - @ł€¶ŧ←↓→øþ¨~ - æſðđŋħ̣ĸł˝^’ - |»«¢„“”µ·…– - -Additionally, there are some common chars that we dit not yet define: - § -*/ - - -#include "nqn-common.h" - - -// NQN key definitions in no particular order -#define N_LT KC_NONUS_BSLASH -#define N_HS KC_NONUS_HASH -#define N_DOTS RALT(KC_DOT) // … -#define N_USC LSFT(KC_SLASH) // _ -#define N_LSQBR RALT(KC_8) // [ -#define N_RSQBR RALT(KC_9) // ] -#define N_CIRC KC_GRAVE // ^ -#define N_EXKL LSFT(KC_1) // ! -#define N_GT LSFT(KC_NONUS_BSLASH) // > -#define N_EQ LSFT(KC_0) // = -#define N_AMP LSFT(KC_6) // & -#define N_BSLS RALT(KC_MINS) // \ backslash -#define N_SLSH LSFT(KC_7) // / -#define N_LCUBR RALT(KC_7) // { -#define N_RCUBR RALT(KC_0) // } -#define N_ASTR LSFT(KC_RBRC) // * -#define N_QUES LSFT(KC_MINS) // ? -#define N_LPARN LSFT(KC_8) // ( -#define N_RPARN LSFT(KC_9) // ) -#define N_MINS KC_SLASH // - -#define N_COLN LSFT(KC_DOT) // : -#define N_HASH KC_BSLASH // # -#define N_DLR LSFT(KC_4) // $ -#define N_PIPE RALT(KC_NONUS_BSLASH) // | -#define N_TILD RALT(KC_RBRC) // ~ -#define N_GRAVE LSFT(KC_EQUAL) // ` -#define N_PLUS KC_RBRC // + -#define N_PERC LSFT(KC_5) // % -#define N_QUOT LSFT(KC_2) // " -#define N_SING LSFT(KC_BSLASH) // ' -#define N_SEMI LSFT(KC_COMM) // ; -#define N_EURO RALT(KC_E) // € -#define N_AT RALT(KC_Q) // @ -#define N_Z KC_Y -#define N_Y KC_Z -#define N_AE KC_QUOTE // ä -#define N_OE KC_SCOLON // ö -#define N_UE KC_LBRACKET // ü -#define N_MU RALT(KC_M) // µ -#define N_SS KC_MINS // ß -#define N_DEGRE LSFT(KC_GRAVE) // ° -#define N_PASTE LCTL(KC_V) // CTRL+V -#define N_COPY LCTL(KC_C) // CTRL+C -#define N_CUT LCTL(KC_X) // CTRL+X -#define N_UNDO LCTL(N_Z) // CTRL+Z - - -#endif diff --git a/users/not-quite-neo/readme.md b/users/not-quite-neo/readme.md deleted file mode 100644 index 85a29ecc..00000000 --- a/users/not-quite-neo/readme.md +++ /dev/null @@ -1,24 +0,0 @@ -# not-quite-neo - -This is my personal take on porting the [neo2 layout](https://www.neo-layout.org/) to support both a ergodox (infinity) and a planck keyboard. Some sacrifices needed to be made, hence this layout is not-quite-neo. - -## Use case -My use case is simple: - -* I want to use neo2 (or a keymap as close as possible) on any computer I can plug my keyboards in. Because installing the neo2 SW driver is often not a acceptable solution. -* Since most computers I work on (colleagues, family, etc.) use a de-DE keymap, I can not use the official neo2 implementation, because it relies on a us layout and I often times do not even posses the administration rights to change that. -* neo2 makes use of most of the keys of a standard 104 key keyboard, especially for supporting the planck I needed to deviate from the original neo2 layout in order to fit everything I wanted. - -Therefore, I put all reusable code in the users/not-quite-neo directory and created a custom not-quite-neo keymap for the planck and the ergodox infinity keyboard respectively. - -## Pitfalls -Mind, since neo2 is a SW driver supported layout it offers a lot of features that are hard to support in hardware (especially the fancy utf stuff with math symbols and greek letters etc.). - -Right now this implementation only incompletely supports neo2 layers 1 to 4. - -The biggest difference is probably the support for the German Umlauts ä, ö, ü and the ß. Since we rely on a smaller number of keys some glyphs needed to be created otherwise. See the implementation in [nqn-basic-layout.h](nqn-basic-layout.h) for details. - -## Keyboards and keymaps - -You can find the *not-quite-neo* keymap for the ergodox infinity under [qmk_firmware/keyboards/ergodox_infinity/keymaps/not-quite-neo/](../../keyboards/ergodox_infinity/keymaps/not-quite-neo/readme.md). Respectively the keymap for the planck resides in [qmk_firmware/keyboards/planck/keymaps/not-quite-neo/](../../keyboards/planck/keymaps/not-quite-neo/readme.md) - . \ No newline at end of file diff --git a/users/nstickney/nstickney.c b/users/nstickney/nstickney.c deleted file mode 100644 index 3e18e5c8..00000000 --- a/users/nstickney/nstickney.c +++ /dev/null @@ -1,44 +0,0 @@ -#include "nstickney.h" - -// Tap Dancing -void dance_layer (qk_tap_dance_state_t *state, void *user_data) { - switch (state -> count) { - case 1: tap_code(KC_APP); break; - case 2: layer_invert(NUMP); break; - case 3: layer_invert(SYMB); break; - case 4: layer_invert(SYSH); break; - default: break; - } -}; - -void dance_lock_finished (qk_tap_dance_state_t *state, void *user_data) { - switch (state->count) { - case 1: register_code(KC_LGUI); break; - case 2: register_code(KC_NLCK); break; - case 3: register_code(KC_CAPS); break; - case 4: register_code(KC_SLCK); break; - default: break; - } -}; - -void dance_lock_reset (qk_tap_dance_state_t *state, void *user_data) { - switch (state->count) { - case 1: unregister_code(KC_LGUI); break; - case 2: unregister_code(KC_NLCK); break; - case 3: register_code(KC_CAPS); break; - case 4: register_code(KC_SLCK); break; - default: break; - } -}; - -qk_tap_dance_action_t tap_dance_actions[] = { - [LOCKS] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_lock_finished, dance_lock_reset), - [LAYERS] = ACTION_TAP_DANCE_FN(dance_layer) -}; - -void eeconfig_init_user (void) { - set_unicode_input_mode(UC_LNX); // Linux - //set_unicode_input_mode(UC_OSX); // Mac OSX - //set_unicode_input_mode(UC_WIN); // Windows (with registry key, see wiki) - //set_unicode_input_mode(UC_WINC); // Windows (with WinCompose, see wiki) -}; \ No newline at end of file diff --git a/users/nstickney/nstickney.h b/users/nstickney/nstickney.h deleted file mode 100644 index d3f5a7c6..00000000 --- a/users/nstickney/nstickney.h +++ /dev/null @@ -1,25 +0,0 @@ -#include QMK_KEYBOARD_H - -#pragma once -#define USE_SERIAL -#define MASTER_LEFT - -#undef UNICODE_SELECTED_MODES -#define UNICODE_SELECTED_MODES UC_OSX, UC_LNX, UC_WINC - -// Layers -#define BASE 0 // Base layer -#define SYMB 1 // Symbols -#define SYSH 2 // Symbols, shifted -#define NUMP 3 // Numpad -#define FCTN 4 // Function - -// Make keymaps more clear -#define CC_ESC LCTL_T(KC_ESC) -#define CC_QUOT RCTL_T(KC_QUOT) -#define AC_SLSH LALT_T(KC_SLSH) -#define AC_EQL RALT_T(KC_EQL) -#define FC_BSLS LT(FCTN, KC_BSLS) -#define FC_MINS LT(FCTN, KC_MINS) - -enum tap_dances {LOCKS = 0, LAYERS = 1}; \ No newline at end of file diff --git a/users/nstickney/rules.mk b/users/nstickney/rules.mk deleted file mode 100644 index f52371c7..00000000 --- a/users/nstickney/rules.mk +++ /dev/null @@ -1,4 +0,0 @@ -SRC += nstickney.c - -TAP_DANCE_ENABLE = yes -UNICODE_ENABLE = yes \ No newline at end of file diff --git a/users/pvinis/config.h b/users/pvinis/config.h deleted file mode 100644 index 8e2efb40..00000000 --- a/users/pvinis/config.h +++ /dev/null @@ -1,10 +0,0 @@ -#pragma once - -#ifdef AUDIO_ENABLE -// #define STARTUP_SONG SONG(SONIC_RING) -// #define DAC_SAMPLE_MAX 65535U // maybe this works for volume? -#endif - -// allow rolling when keys have hold functionality -#define IGNORE_MOD_TAP_INTERRUPT -// #define TAPPING_TERM 150 diff --git a/users/pvinis/pvinis.c b/users/pvinis/pvinis.c deleted file mode 100644 index e97edcb9..00000000 --- a/users/pvinis/pvinis.c +++ /dev/null @@ -1,89 +0,0 @@ -#include "pvinis.h" -#include "version.h" - -#ifdef AUDIO_ENABLE -#include "audio.h" -#endif // AUDIO_ENABLE - - -#ifdef AUDIO_ENABLE -// float tone_katamari_rolling_star[][2] = SONG(KATAMARI_ROLLING_STAR); -#endif // AUDIO_ENABLE - - -// SYMBOL + SYSCTL = KBCTL -uint32_t layer_state_set_user(uint32_t state) { - uint32_t intermediate_state = update_tri_layer_state(state, LR_SYMBOL, LR_SYSCTL, LR_KBCTL); - intermediate_state = layer_state_set_user_local(intermediate_state); - return intermediate_state; -} - - -// functions for the individual keymaps to implement if they need something extra -__attribute__ ((weak)) -bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { - return true; -} - - -// handle my own keycodes -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - - case PV_VRSN: - if (record->event.pressed) { - SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); - } - return false; - - case PV_MAKE: - if (!record->event.pressed) { - SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP -#if (defined(BOOTLOADER_DFU) || defined(BOOTLOADER_LUFA_DFU) || defined(BOOTLOADER_QMK_DFU)) - ":dfu" -#elif defined(BOOTLOADER_HALFKAY) - ":teensy" -#elif defined(BOOTLOADER_CATERINA) - ":avrdude" -#endif - SS_TAP(X_ENTER) - ); - } - return false; - - case PV_FLSH: - reset_keyboard(); - return false; - - case PV_KTMR: - if (record->event.pressed) { -#ifdef AUDIO_ENABLE - // PLAY_SONG(tone_katamari_rolling_star); -#endif - } - return false; - } - return process_record_keymap(keycode, record); -} - - -#ifdef TAP_DANCE_ENABLE -qk_tap_dance_action_t tap_dance_actions[] = { -}; -#endif // TAP_DANCE_ENABLE - - -// init stuff -void keyboard_post_init_user(void) { - keyboard_post_init_user_local(); -} - - -// default functions -__attribute__ ((weak)) -void keyboard_post_init_user_local(void) {} - -__attribute__ ((weak)) -uint32_t layer_state_set_user_local(uint32_t state) { - return state; -} diff --git a/users/pvinis/pvinis.h b/users/pvinis/pvinis.h deleted file mode 100644 index 0c75c6a6..00000000 --- a/users/pvinis/pvinis.h +++ /dev/null @@ -1,152 +0,0 @@ -#pragma once - -#include "quantum.h" - - -// my own keycodes -enum userspace_custom_keycodes { - PV_ = SAFE_RANGE, - - PV_VRSN, // prints firmware version - PV_MAKE, // prints the make command of the keyboard - PV_FLSH, // resets keyboard - PV_KTMR, // play katamari music - - PV_SAFE_RANGE, // used for extra keycodes in the individual keymaps -}; - -enum tap_dance_indexes { - // tap dance - TD_FLSH, // flash keyboard (as if the physical flash key was pressed) -}; - -#define ALLM(kc) LCAG(kc) // easier name for left ctrl-alt-gui -#define PV_ESCC CTL_T(KC_ESC) // esc on tap, ctrl on hold -#define PV_LOCK LCTL(LSFT(KC_PWR)) // lock computer -#define TD_3FLS TD(TD_FLSH) // tap dance 3 times for flash - - -// layers -enum { - LR_BASE = 0, // used for basic keys like the surrounding ctrl, cmd, etc - - LR_QWERTY, - LR_CARPALX, - - LR_SYMBOL, // symbol input (!, @, #, etc) - LR_SYSCTL, // system control (music, volume, keyboard flash, etc) - LR_KBCTL, // keyboard control (version, make, flash, etc) -}; - - -// layer switchers -#define BASE TO(LR_BASE) -#define QWERTY TO(LR_QWERTY) -#define CARPALX TO(LR_CARPALX) - -#define SYMBOL MO(LR_SYMBOL) -#define SYSCTL MO(LR_SYSCTL) -#define KBCTL MO(LR_KBCTL) - - -// layout parts for easy reuse between keyboard keymaps - -// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, -// | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | -// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, -#define ________________NUMBERS_L__________________ KC_1, KC_2, KC_3, KC_4, KC_5 -#define ________________NUMBERS_R__________________ KC_6, KC_7, KC_8, KC_9, KC_0 - -// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, -// | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | -// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, -#define ______________________F_L__________________ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5 -#define ______________________F_R__________________ KC_F6, KC_F7, KC_F8, KC_F9, KC_F10 - -// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, -// | Q | W | E | R | T | | Y | U | I | O | P | -// ,-----+-----+-----x-----x-----, ,-----x-----x-----+-----+-----, -// | A | S | D | F | G | | H | J | K | L | ; | -// ,-----+-----+-----x-----x-----, ,-----x-----x-----+-----+-----, -// | Z | X | C | V | B | | N | M | , | . | / | -// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, -#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 _____________MOD_QWERTY_L2_________________ CTL_T(KC_A), SFT_T(KC_S), GUI_T(KC_D), ALT_T(KC_F), KC_G -#define _____________MOD_QWERTY_R2_________________ KC_H , ALT_T(KC_J), GUI_T(KC_K), SFT_T(KC_L), CTL_T(KC_SCLN) - -// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, -// | Q | G | M | L | W | | Y | F | I | O | P | -// ,-----+-----+-----x-----x-----, ,-----x-----x-----+-----+-----, -// | D | S | T | N | R | | I | A | K | L | ; | -// ,-----+-----+-----x-----x-----, ,-----x-----x-----+-----+-----, -// | Z | X | C | V | J | | K | P | , | . | / | -// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, -#define ________________CARPALX_L1_________________ KC_Q , KC_G , KC_M , KC_L , KC_W -#define ________________CARPALX_L2_________________ KC_D , KC_S , KC_T , KC_N , KC_R -#define ________________CARPALX_L3_________________ KC_Z , KC_X , KC_C , KC_V , KC_J - -#define ________________CARPALX_R1_________________ KC_Y , KC_F , KC_U , KC_B , KC_SCLN -#define ________________CARPALX_R2_________________ KC_I , KC_A , KC_E , KC_O , KC_H -#define ________________CARPALX_R3_________________ KC_K , KC_P , KC_COMM, KC_DOT , KC_SLSH - -// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, -// | ! | @ | { | } | _ | | \ | | ` | | | -// ,-----+-----+-----x-----x-----, ,-----x-----x-----+-----+-----, -// | # | $ | ( | ) | - | | = | & | ' | " | | | -// ,-----+-----+-----x-----x-----, ,-----x-----x-----+-----+-----, -// | % | ^ | [ | ] | + | | * | ~ | < | > | / | -// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, -#define _________________SYMBOL_L1_________________ KC_EXLM, KC_AT , KC_LCBR, KC_RCBR, KC_UNDS -#define _________________SYMBOL_L2_________________ KC_HASH, KC_DLR , KC_LPRN, KC_RPRN, KC_MINS -#define _________________SYMBOL_L3_________________ KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_PLUS - -#define _________________SYMBOL_R1_________________ KC_BSLS, _______, KC_GRV , _______, _______ -#define _________________SYMBOL_R2_________________ KC_EQL , KC_AMPR, KC_QUOT, KC_DQUO, KC_PIPE -#define _________________SYMBOL_R3_________________ KC_ASTR, KC_TILD, KC_LABK, KC_RABK, KC_SLSH - -// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, -// | | | | | | |MUTE |HOME | ^ | END | | -// ,-----+-----+-----x-----x-----, ,-----x-----x-----+-----+-----, -// | | | | | | |VOLUP| < | v | > | | -// ,-----+-----+-----x-----x-----, ,-----x-----x-----+-----+-----, -// | | | | | | |VOLDN|MPREV|MPLAY|MNEXT| | -// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, -#define _________________SYSCTL_L1_________________ -#define _________________SYSCTL_L2_________________ -#define _________________SYSCTL_L3_________________ - -// vol v ctl v -#define _________________SYSCTL_R1_________________ KC_MUTE , KC_HOME , KC_UP , KC_END , PV_LOCK -#define _________________SYSCTL_R2_________________ KC_VOLU , KC_LEFT , KC_DOWN , KC_RGHT /* < arrows */ , KC_SLEP -#define _________________SYSCTL_R3_________________ KC_VOLD , KC_MPRV , KC_MPLY , KC_MNXT /* < music */ , KC_PWR - -// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, -// |XXXXX|XXXXX|XXXXX|XXXXX|XXXXX| |XXXXX|XXXXX|XXXXX|XXXXX|XXXXX| -// ,-----+-----+-----x-----x-----, ,-----x-----x-----+-----+-----, -// |XXXXX|XXXXX|XXXXX|XXXXX|XXXXX| |XXXXX|VERSN|MAKE |FLASH|XXXXX| -// ,-----+-----+-----x-----x-----, ,-----x-----x-----+-----+-----, -// |XXXXX|XXXXX|XXXXX|XXXXX|XXXXX| |XXXXX|XXXXX|XXXXX|XXXXX|XXXXX| -// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, -#define __________________KBCTL_L1_________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX -#define __________________KBCTL_L2_________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX -#define __________________KBCTL_L3_________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX - -#define __________________KBCTL_R1_________________ XXXXXXX, XXXXXXX, XXXXXXX, PV_KTMR, XXXXXXX -#define __________________KBCTL_R2_________________ XXXXXXX, PV_VRSN, PV_MAKE, PV_FLSH, XXXXXXX -#define __________________KBCTL_R3_________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX - -// we need wrappers in order for these definitions, because they need to be expanded before being used as arguments to the LAYOUT_xxx macro -#define LAYOUT_ergodox_pretty_wrapper(...) LAYOUT_ergodox_pretty(__VA_ARGS__) -#define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__) - - -// extra stuff that might be needed -void keyboard_post_init_user_local(void); -uint32_t layer_state_set_user_local(uint32_t state); diff --git a/users/pvinis/rules.mk b/users/pvinis/rules.mk deleted file mode 100644 index da10cc74..00000000 --- a/users/pvinis/rules.mk +++ /dev/null @@ -1,15 +0,0 @@ -# add userspace file -SRC += pvinis.c - -AUDIO_ENABLE = no # piezo speaker sounds -RGBLIGHT_ENABLE = no # rgb leds underlight -TAP_DANCE_ENABLE = yes -BACKLIGHT_ENABLE = no # leds under keycaps -#MOUSEKEY_ENABLE = no -#SLEEP_LED_ENABLE = no # no led blinking while sleeping -#NKRO_ENABLE = yes - -# make firmware smaller -LINK_TIME_OPTIMIZATION_ENABLE = yes -CONSOLE_ENABLE = no -COMMAND_ENABLE = no diff --git a/users/readme.md b/users/readme.md deleted file mode 100644 index d8f14d8b..00000000 --- a/users/readme.md +++ /dev/null @@ -1,3 +0,0 @@ -# User space - -This is a place for users to put code that they might use between keyboards. If you build the keymap `mine`, `/users/mine/rules.mk` will be included in your build, and `/users/mine/` will be in your path - keep these things in mind when naming your files and referencing them from other places. \ No newline at end of file diff --git a/users/replicaJunction/config.h b/users/replicaJunction/config.h deleted file mode 100644 index 4b58b579..00000000 --- a/users/replicaJunction/config.h +++ /dev/null @@ -1,66 +0,0 @@ -#pragma once - - -//////////////////////////////////////////////////////////////////////////////// -// Features That Can Be Enabled -// https://docs.qmk.fm/reference/config-options#features-that-can-be-enabled -//////////////////////////////////////////////////////////////////////////////// - -//////////////////////////////////////////////////////////////////////////////// -// Behaviors That Can Be Configured -// https://docs.qmk.fm/reference/config-options#behaviors-that-can-be-configured -//////////////////////////////////////////////////////////////////////////////// - -// MS the button needs to be held before a tap becomes a hold (default: 200) -#undef TAPPING_TERM -#define TAPPING_TERM 250 - -// Makes it easier for fast typists to use dual-role keys. See additional details here: -// https://docs.qmk.fm/features/advanced-keycodes#permissive-hold -#define PERMISSIVE_HOLD - -// MS after tapping the Leader key to listen for a sequence (default: 300) -#undef LEADER_TIMEOUT -#define LEADER_TIMEOUT 750 - -// This makes it possible to do rolling combos (zx) with keys that convert to other keys on hold -// (for example, if z becomes ctrl when you hold it, when this option isn't enabled, z rapidly -// followed by x actually sends Ctrl-x. That's bad.) -#define IGNORE_MOD_TAP_INTERRUPT - - - -//////////////////////////////////////////////////////////////////////////////// -// Mouse Key Options -// https://docs.qmk.fm/reference/config-options#mouse-key-options -//////////////////////////////////////////////////////////////////////////////// - -#ifdef MOUSEKEY_ENABLE -// Mouse key config - -// Frequency with which cursor movements are sent. Lower means more resolution / DPI. -// Default: 20 -// #undef MOUSEKEY_INTERVAL -// #define MOUSEKEY_INTERVAL 20 - -// MS after pressing the key before initial movement begins. Lower means quicker response. -// Default: 0 -// #undef MOUSEKEY_DELAY -// #define MOUSEKEY_DELAY 0 - -// MS it takes the cursor to accelerate to max speed -// Default: 60 -// #undef MOUSEKEY_TIME_TO_MAX -// #define MOUSEKEY_TIME_TO_MAX 60 - -// Maximum speed for the mouse keys -// Default: 7 -// #undef MOUSEKEY_MAX_SPEED -// #define MOUSEKEY_MAX_SPEED 7 - -// Delay before the mouse wheel -// Default: 0 -// #undef MOUSEKEY_WHEEL_DELAY -// #define MOUSEKEY_WHEEL_DELAY 0 - -#endif // MOUSEKEY_ENABLE diff --git a/users/replicaJunction/readme.md b/users/replicaJunction/readme.md deleted file mode 100644 index 2a9cad27..00000000 --- a/users/replicaJunction/readme.md +++ /dev/null @@ -1,14 +0,0 @@ -Copyright 2018 @ - -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 . \ No newline at end of file diff --git a/users/replicaJunction/replicaJunction.c b/users/replicaJunction/replicaJunction.c deleted file mode 100644 index f0bc59d2..00000000 --- a/users/replicaJunction/replicaJunction.c +++ /dev/null @@ -1,149 +0,0 @@ -#include "replicaJunction.h" -#include "version.h" - -#ifdef TAP_DANCE_ENABLE -void dance_layer(qk_tap_dance_state_t *state, void *user_data) -{ - uint8_t layer = biton32(layer_state); - - if (state->count >= 5) - { - // 5 or more taps resets the keyboard - reset_keyboard(); - } - #ifdef L_QWERTY - else if (state->count == 3) - { - // Triple tap changes to QWERTY layer - if (layer == L_QWERTY) - { - layer_off(L_QWERTY); - } - else - { - layer_on(L_QWERTY); - } - } - #endif - #ifdef L_NUM - else if (state->count == 2) - { - // Double tap toggles Number layer - if (layer == L_NUM) - { - layer_off(L_NUM); - } - else - { - layer_on(L_NUM); - } - } - #endif - else - { - // Single tap sends Escape, and also turns off layers - // That's mostly in case I get stuck and forget where I am - #ifdef L_NUM - layer_off(L_NUM); - #endif - #ifdef L_EXTEND - layer_off(L_EXTEND); - #endif - #ifdef L_SYMBOL - layer_off(L_SYMBOL); - #endif - #ifdef L_QWERTY - layer_off(L_QWERTY); - #endif - register_code(KC_ESC); - unregister_code(KC_ESC); - } -}; - -// Tap Dance Definitions -// Note - this needs to come AFTER the function is declared -qk_tap_dance_action_t tap_dance_actions[] = { - [TD_LAYER_TOGGLE] = ACTION_TAP_DANCE_FN(dance_layer) -}; - -#endif // TAP_DANCE_ENABLE - -// These functions can be overridden in individual keymap files. -// This allows a user function to be shared for all my keyboards, while each -// keyboard can also have a keyboard-specific section. - -// Note that keymaps don't need to override these if there's nothing to -// override them with. -__attribute__ ((weak)) -void matrix_init_keymap(void) {} - -__attribute__ ((weak)) -void matrix_scan_keymap(void) {} - -__attribute__ ((weak)) -bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { - return true; -}; - -// Runs just one time when the keyboard initializes. -void matrix_init_user(void) { - #ifdef UNICODEMAP_ENABLE - // Set Unicode input to use WinCompose - // https://github.com/samhocevar/wincompose - set_unicode_input_mode(UC_WINC); - #endif // UNICODEMAP_ENABLE - - matrix_init_keymap(); -}; - -// Runs constantly in the background, in a loop. -void matrix_scan_user(void) { - matrix_scan_keymap(); -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - if (record->event.pressed) - return true; - - switch(keycode) - { - case RJ_MAKE: // Compiles the firmware, and adds the flash command based on keyboard bootloader - SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP - #if (defined(BOOTLOADER_DFU) || defined(BOOTLOADER_LUFA_DFU) || defined(BOOTLOADER_QMK_DFU)) - ":dfu" - #elif defined(BOOTLOADER_HALFKAY) - ":teensy" - #elif defined(BOOTLOADER_CATERINA) - ":avrdude" - #endif // bootloader options - //SS_TAP(X_ENTER) - ); - return false; - case RJ_QMKV: - SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); - return false; - case RJ_EQ: - SEND_STRING("=="); - return false; - case RJ_NEQ: - SEND_STRING("!="); - return false; - case RJ_GEQ: - SEND_STRING(">="); - return false; - case RJ_LEQ: - SEND_STRING("<="); - return false; - case RJ_GEQR: - SEND_STRING("=>"); - return false; - case RJ_DUND: - SEND_STRING("$_"); - return false; - case RJ_SELS: - SEND_STRING("select *"); - return false; - } - - return process_record_keymap(keycode, record); -}; diff --git a/users/replicaJunction/replicaJunction.h b/users/replicaJunction/replicaJunction.h deleted file mode 100644 index 9b577254..00000000 --- a/users/replicaJunction/replicaJunction.h +++ /dev/null @@ -1,114 +0,0 @@ -#pragma once - -#include "quantum.h" - -/////////////////////////////////////////////////////////////////////////////// -// Keymap definitions -/////////////////////////////////////////////////////////////////////////////// - -// Layer definitions -// #define L_COLEMAK 0 -// #define L_QWERTY 1 -// #define L_NUM 2 -// #define L_EXTEND 3 -// #define L_FUNC 4 -// #define L_GAMING 5 -// #define L_SYMBOL 6 -// #define L_LL_R 7 -// #define L_LL_S 8 -// #define L_LL_E 9 -// #define L_LL_I 10 - -// Keyboard aliases -#define ooooooo KC_TRNS - -#define MO_FUNC MO(L_FUNC) -#define TT_NUM TT(L_NUM) -#define TG_GAME TG(L_GAMING) -#define OSL_SYM OSL(L_SYMBOL) - -#define OSM_LSF OSM(MOD_LSFT) -#define OSM_RSF OSM(MOD_RSFT) - -#define KX_CTSF LCTL(KC_LSFT) -#define KX_STAB LSFT(KC_TAB) -#define KX_CGR LCTL(KC_GRV) -#define KX_PAST LCTL(LGUI(LALT(KC_V))) -#define KX_SRCH LCTL(LGUI(LALT(KC_S))) - -#define KX_BKNM LT(L_NUM, KC_BSPC) -#define KX_DCTL CTL_T(KC_DEL) -#define KX_NALT ALT_T(KC_ENT) -#define KX_ECTL CTL_T(KC_ESC) -#define KX_SPAC LT(L_EXTEND, KC_SPC) - -#define KX_Z_MT CTL_T(KC_Z) -#define KX_X_MT GUI_T(KC_X) -#define KX_C_MT MT(MOD_LCTL | MOD_LALT, KC_C) -#define KX_D_MT ALT_T(KC_D) - -#define KX_SLMT CTL_T(KC_SLSH) -#define KX_DOMT GUI_T(KC_DOT) -#define KX_COMT MT(MOD_LCTL | MOD_LALT, KC_COMM) -#define KX_H_MT ALT_T(KC_H) - -#ifdef L_LL_R - #define KC_R_LT LT(L_LL_R, KC_R) -#else - #define KC_R_LT KC_R -#endif - -#ifdef L_LL_S - #define KC_S_LT LT(L_LL_S, KC_S) -#else - #define KC_S_LT KC_S -#endif - -#ifdef L_LL_E - #define KC_E_LT LT(L_LL_E, KC_E) -#else - #define KC_E_LT KC_E -#endif - -#ifdef L_LL_I - #define KC_I_LT LT(L_LL_I, KC_I) -#else - #define KC_I_LT KC_I -#endif - -// "Macro" functions -enum userspace_custom_keycodes { - RJ_MAKE = SAFE_RANGE, // QMK make command - RJ_QMKV, // QMK version - RJ_EQ, // == - RJ_NEQ, // != - RJ_GEQ, // >= - RJ_LEQ, // <= - RJ_GEQR, // => ("greater than or equal - right") - RJ_DUND, // $_ - RJ_SELS, // select * (used for PowerShell) - RJ_MUTE, // Discord mute (GUI+Shift+M) - RJ_DEAF, // Discord deafen (GUI+Shift+D) - RJ_DOVR // Toggle Discord overlay (GUI+Shift+O) -}; - -// Mouse keys -#define M_UP KC_MS_UP -#define M_DOWN KC_MS_DOWN -#define M_LEFT KC_MS_LEFT -#define M_RIGHT KC_MS_RIGHT -#define M_LCLIK KC_MS_BTN1 -#define M_RCLIK KC_MS_BTN2 -#define M_MCLIK KC_MS_BTN3 -#define M_WHLUP KC_WH_U -#define M_WHLDN KC_WH_D - -// Used in macro definitions -#define TAP(code) register_code (code); unregister_code (code); - -// Tap Dance -#ifdef TAP_DANCE_ENABLE -#define TD_LAYER_TOGGLE 0 -extern void dance_layer(qk_tap_dance_state_t *state, void *user_data); -#define TD_LAYR TD(TD_LAYER_TOGGLE) -#endif // TAP_DANCE_ENABLE diff --git a/users/replicaJunction/rules.mk b/users/replicaJunction/rules.mk deleted file mode 100644 index 30a33019..00000000 --- a/users/replicaJunction/rules.mk +++ /dev/null @@ -1 +0,0 @@ -SRC += replicaJunction.c diff --git a/users/ridingqwerty/config.h b/users/ridingqwerty/config.h deleted file mode 100644 index 6501efe6..00000000 --- a/users/ridingqwerty/config.h +++ /dev/null @@ -1,11 +0,0 @@ -#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 deleted file mode 100644 index 43d4d50b..00000000 --- a/users/ridingqwerty/dict.h +++ /dev/null @@ -1,1012 +0,0 @@ -#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 deleted file mode 100644 index b0b0b48a..00000000 --- a/users/ridingqwerty/process_records.c +++ /dev/null @@ -1,488 +0,0 @@ -#include -#include -#include "ridingqwerty.h" -#include "dict.h" - -__attribute__ ((weak)) -bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { - return true; -} - -__attribute__ ((weak)) -bool process_record_secrets(uint16_t keycode, keyrecord_t *record) { - return true; -} - -/* -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) { -#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_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 deleted file mode 100644 index 47c5f679..00000000 --- a/users/ridingqwerty/process_records.h +++ /dev/null @@ -1,58 +0,0 @@ -#pragma once -#include "ridingqwerty.h" - -#if defined(KEYMAP_SAFE_RANGE) - #define PLACEHOLDER_SAFE_RANGE KEYMAP_SAFE_RANGE -#else - #define PLACEHOLDER_SAFE_RANGE SAFE_RANGE -#endif - -bool process_record_secrets(uint16_t keycode, keyrecord_t *record); -bool process_record_keymap(uint16_t keycode, keyrecord_t *record); - -enum userspace_custom_keycodes { - VERSION = PLACEHOLDER_SAFE_RANGE, - QWERTY, - DVORAK, - COLEMAK, -#if defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) - GREEK, - RUSSIAN, - RUNES, - HIRAGAN, -#endif - MAKE, - RG_QUOT, - 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 -}; - -// 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 deleted file mode 100644 index ee6e7e89..00000000 --- a/users/ridingqwerty/ridingqwerty.c +++ /dev/null @@ -1,65 +0,0 @@ -#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 deleted file mode 100644 index 6bd4aa57..00000000 --- a/users/ridingqwerty/ridingqwerty.h +++ /dev/null @@ -1,61 +0,0 @@ -#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, - _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 -}; - -#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 deleted file mode 100644 index 153e5ff9..00000000 --- a/users/ridingqwerty/rules.mk +++ /dev/null @@ -1,24 +0,0 @@ -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 deleted file mode 100644 index 644166cb..00000000 --- a/users/ridingqwerty/tapdances.c +++ /dev/null @@ -1,33 +0,0 @@ -#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 deleted file mode 100644 index 6eba0e2c..00000000 --- a/users/ridingqwerty/tapdances.h +++ /dev/null @@ -1,9 +0,0 @@ -#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 deleted file mode 100644 index 8ef5aaa1..00000000 --- a/users/ridingqwerty/unicode.c +++ /dev/null @@ -1,7 +0,0 @@ -#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 deleted file mode 100644 index 8b403272..00000000 --- a/users/ridingqwerty/unicode.h +++ /dev/null @@ -1,295 +0,0 @@ -#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 deleted file mode 100644 index f78219a5..00000000 --- a/users/ridingqwerty/wrappers.h +++ /dev/null @@ -1,156 +0,0 @@ -#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 diff --git a/users/rishka/rishka.c b/users/rishka/rishka.c deleted file mode 100644 index c988072d..00000000 --- a/users/rishka/rishka.c +++ /dev/null @@ -1 +0,0 @@ -#include "rishka.h" diff --git a/users/rishka/rishka.h b/users/rishka/rishka.h deleted file mode 100644 index 96915993..00000000 --- a/users/rishka/rishka.h +++ /dev/null @@ -1,74 +0,0 @@ -#pragma once - -#if (!defined(LAYOUT) && defined(KEYMAP)) -# define LAYOUT KEYMAP -#endif - -#undef MK_MOMENTARY_ACCEL -#define MK_3_SPEED 1 - -#define LAYOUT_ergodox_pretty_wrapper(...) LAYOUT_ergodox_pretty(__VA_ARGS__) -#define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__) -#define LAYOUT_5x6_wrapper(...) LAYOUT_5x6(__VA_ARGS__) -#define KC_MLSF OSM(MOD_LSFT) -#define KC_MRSF OSM(MOD_RSFT) - -#define OS_LGUI OSM(MOD_LGUI) -#define OS_RGUI OSM(MOD_RGUI) -#define OS_LSFT OSM(MOD_LSFT) -#define OS_RSFT OSM(MOD_RSFT) -#define OS_LCTL OSM(MOD_LCTL) -#define OS_RCTL OSM(MOD_RCTL) -#define OS_LALT OSM(MOD_LALT) -#define OS_RALT OSM(MOD_RALT) -#define OS_MEH OSM(MOD_MEH) -#define OS_HYPR OSM(MOD_HYPR) -#define MOUSE_L LSFT(KC_WH_D) -#define MOUSE_R LSFT(KC_WH_U) -#define OSX_LOCK LCTL(LGUI(KC_Q)) - -// layout parts for easy reuse between keyboard keymaps -// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, -// | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | -// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, -#define ________________NUMBERS_L__________________ KC_1, KC_2, KC_3, KC_4, KC_5 -#define ________________NUMBERS_R__________________ KC_6, KC_7, KC_8, KC_9, KC_0 - -// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, -// | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | -// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, -#define ______________________F_L__________________ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5 -#define ______________________F_R__________________ KC_F6, KC_F7, KC_F8, KC_F9, KC_F10 - -// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, -// | Q | W | E | R | T | | Y | U | I | O | P | -// ,-----+-----+-----x-----x-----, ,-----x-----x-----+-----+-----, -// | A | S | D | F | G | | H | J | K | L | ; | -// ,-----+-----+-----x-----x-----, ,-----x-----x-----+-----+-----, -// | Z | X | C | V | B | | N | M | , | . | / | -// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, -#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 _____________MOD_QWERTY_L2_________________ CTL_T(KC_A), SFT_T(KC_S), GUI_T(KC_D), ALT_T(KC_F), KC_G -#define _____________MOD_QWERTY_R2_________________ KC_H , ALT_T(KC_J), GUI_T(KC_K), SFT_T(KC_L), CTL_T(KC_SCLN) - -// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, -// | ! | @ | { | } | _ | | \ | 7 | 8 | 9 | | -// ,-----+-----+-----x-----x-----, ,-----x-----x-----+-----+-----, -// | # | $ | ( | ) | - | | = | 4 | 5 | 6 | | | -// ,-----+-----+-----x-----x-----, ,-----x-----x-----+-----+-----, -// | % | ^ | [ | ] | + | | * | 1 | 2 | 3 | / | -// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, -#define _________________SYMBOL_L1_________________ KC_EXLM, KC_AT , KC_LCBR, KC_RCBR, KC_UNDS -#define _________________SYMBOL_L2_________________ KC_HASH, KC_DLR , KC_LPRN, KC_RPRN, KC_MINS -#define _________________SYMBOL_L3_________________ KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_PLUS - -#define _________________SYMBOL_R1_________________ KC_BSLS, KC_P7, KC_P8 , KC_P9, KC_PAST -#define _________________SYMBOL_R2_________________ KC_EQL , KC_P4, KC_P5, KC_P6, KC_PPLS -#define _________________SYMBOL_R3_________________ KC_ASTR, KC_P1, KC_P2, KC_P3, KC_PMNS diff --git a/users/rishka/rules.mk b/users/rishka/rules.mk deleted file mode 100644 index a0b8e584..00000000 --- a/users/rishka/rules.mk +++ /dev/null @@ -1 +0,0 @@ -SRC += rishka.c diff --git a/users/romus/README.md b/users/romus/README.md deleted file mode 100644 index 0de9d9a8..00000000 --- a/users/romus/README.md +++ /dev/null @@ -1,45 +0,0 @@ -# overview - - this is a modified version of let's split keyboard from bbaserdem. i don't like standard dvorak overuses right pinky - so i shifted the columns out. i'm not sure if this is any good, time will tell. - - i have ortholinear let's split eh, which share a lot of functions with other ortholinear keyboards. - -# layout - -i use dvorak with an unorthodox off layout. -if you wanna grab my code, and you used a layout with a persistent base -layer change, change it to layer 0 before proceeding. - -# layers - -* **dvorak**: base layer,with dvorak layout. -* **alternative**: has alternate characters. -* **game**: toggled from *function*, comfortable for gaming use. -* **numeric**: has numericals and symbols. can be locked. -* **function**: layer has media and function keys. -* **mouse**: manipulates mouse. can be locked. -* **music** allows playing sounds. - -# functionality - -* **rgb backlight**: with layer indication, and ability to change base layer lighting mode. -* **secrets**: by placing a secrets.h, and not tracking it, passwords can be stored. -* **mouse**: mouse emulation, complete with diagonal keys. -* **turkish**: an altgr-like overlay that allows some non-common letters, in unicode. - -i suggest checking out how i enabled turkish keys, -how i planned out rgb lighting, -and my mouse implementation; -they might offer some insight into fringe user cases. - -# issues - -all features are too big for the 32kb bootloader. -offenders are audio and rgb lights; it comes down to one or the other. - -~the proton board, and rev 6 might fix that.~ - -# credits - -this is a modified version of let's split keyboard from bbaserdem who has previously written his keymap by himself before, but rewrote it here. diff --git a/users/romus/config.h b/users/romus/config.h deleted file mode 100644 index 9332febe..00000000 --- a/users/romus/config.h +++ /dev/null @@ -1,8 +0,0 @@ -#pragma once - -#ifdef TAP_DANCE_ENABLE - #define TAPPING_TERM 300 - #define TAPPING_TOGGLE 1 -#endif - -// !USERSPACE_CONFIG_H diff --git a/users/romus/romus.c b/users/romus/romus.c deleted file mode 100644 index 35b524f9..00000000 --- a/users/romus/romus.c +++ /dev/null @@ -1,557 +0,0 @@ -#include "romus.h" - -/*---------------*\ -|*-----MOUSE-----*| -\*---------------*/ -#ifdef MOUSEKEY_ENABLE -#include "mousekey.h" -#endif - -/*-------------*\ -|*-----RGB-----*| -\*-------------*/ -#ifdef RGBLIGHT_ENABLE -#include "rgblight.h" -#endif - -/*-------------*\ -|*---UNICODE---*| -\*-------------*/ -#ifdef UNICODE_ENABLE -#endif - -/*-----------------*\ -|*-----SECRETS-----*| -\*-----------------*/ -// Enabled by adding a non-tracked secrets.h to this dir. -#if (__has_include("secrets.h")) -#include "secrets.h" -#endif - -/*---------------*\ -|*-----MUSIC-----*| -\*---------------*/ -#ifdef AUDIO_ENABLE -float tone_game[][2] = SONG(ZELDA_PUZZLE); -float tone_return[][2] = SONG(ZELDA_TREASURE); -float tone_linux[][2] = SONG(UNICODE_LINUX); -float tone_windows[][2] = SONG(UNICODE_WINDOWS); -#endif - -/*-------------------*\ -|*-----TAP-DANCE-----*| -\*-------------------*/ -#ifdef TAP_DANCE_ENABLE -qk_tap_dance_action_t tap_dance_actions[] = { - // Shift on double tap of semicolon - [SCL] = ACTION_TAP_DANCE_DOUBLE( KC_SCLN, KC_COLN ) -}; -#endif - -/* In keymaps, instead of writing _user functions, write _keymap functions - * The __attribute__((weak)) allows for empty definitions here, and during - * compilation, if these functions are defined elsewhere, they are written - * over. This allows to include custom code from keymaps in the generic code - * in this file. - */ -__attribute__ ((weak)) void matrix_init_keymap(void) { } -__attribute__ ((weak)) void matrix_scan_keymap(void) { } -__attribute__ ((weak)) bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { - return true; -} -__attribute__ ((weak)) uint32_t layer_state_set_keymap (uint32_t state) { - return state; -} -__attribute__ ((weak)) void led_set_keymap(uint8_t usb_led) { } - -/* ----------------------- *\ - * -----RGB Functions----- * -\* ----------------------- */ -#ifdef RGBLIGHT_ENABLE - -// Set RGBLIGHT state depending on layer -void rgblight_change( uint8_t this_layer ) { - // Enable RGB light; will not work without this - //rgblight_enable_noeeprom(); - // Change RGB light - switch ( this_layer ) { - case _DV: - // Load base layer - rgblight_disable_noeeprom(); - break; - case _AL: - // Do yellow for alternate - rgblight_enable_noeeprom(); - rgblight_sethsv_noeeprom( 60,255,255); - - - break; - case _GA: - // Do purple for game - rgblight_enable_noeeprom(); - rgblight_sethsv_noeeprom(285,255,255); - - - break; - case _NU: - // Do azure for number - rgblight_enable_noeeprom(); - rgblight_sethsv_noeeprom(186,200,255); - - - break; - case _SE: - // Do red for settings - rgblight_enable_noeeprom(); - - rgblight_sethsv_noeeprom( 16,255,255); - - break; - case _MO: - // Do green for mouse - rgblight_enable_noeeprom(); - rgblight_sethsv_noeeprom(120,255,255); - - - break; - case _MU: - // Do orange for music - - rgblight_enable_noeeprom(); - rgblight_sethsv_noeeprom( 39,255,255); - - break; - default: - // Something went wrong - rgblight_enable_noeeprom(); - rgblight_sethsv_noeeprom( 0,255,255); - - break; - } -} - -#endif - -/*---------------------*\ -|*-----MATRIX INIT-----*| -\*---------------------*/ -void matrix_init_user (void) { - - // Keymap specific things, do it first thing to allow for delays etc - matrix_init_keymap(); - - // Correct unicode -#ifdef UNICODE_ENABLE - set_unicode_input_mode(UC_LNX); -#endif - - // Make beginning layer DVORAK - set_single_persistent_default_layer(_DV); - -} - -/*---------------------*\ -|*-----MATRIX SCAN-----*| -\*---------------------*/ -void matrix_scan_user (void) { - // Keymap specific, do it first - matrix_scan_keymap(); -} - -/*------------------*\ -|*-----KEYCODES-----*| -\*------------------*/ -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - - // Shift check - bool is_capital = ( keyboard_report->mods & (MOD_BIT(KC_LSFT)|MOD_BIT(KC_RSFT)) ); - static bool lock_flag = false; - uint8_t layer = biton32 (layer_state); - - switch (keycode) { - // Secrets implementation -#if (__has_include("secrets.h")) - case SECRET1: - if( !record->event.pressed ) { - send_string_P( secret[ keycode - SECRET1 ] ); - } - return false; - break; - case SECRET2: - if( !record->event.pressed ) { - send_string_P( secret[ keycode - SECRET2 ] ); - } - return false; - break; - case SECRET3: - if( !record->event.pressed ) { - send_string_P( secret[ keycode - SECRET3 ] ); - } - return false; - break; -#endif - - // Lock functionality: These layers are locked if the LOCKED buttons are - // pressed. Otherwise, they are momentary toggles - case K_LOCK: - if (record->event.pressed) { - lock_flag = !lock_flag; - } - return false; - break; - case K_MOUSE: - if (record->event.pressed) { - layer_on(_MO); - lock_flag = false; - } else { - if ( lock_flag ) { - lock_flag = false; - } else { - layer_off(_MO); - } - } - return false; - break; - case K_NUMBR: - if (record->event.pressed) { - layer_on(_NU); - lock_flag = false; - } else { - if ( lock_flag ) { - lock_flag = false; - } else { - layer_off(_NU); - } - } - return false; - break; - - // Layer switches with sound - case K_GAMES: - if (record->event.pressed) { - // On press, turn off layer if active - if ( layer == _GA ) { -#ifdef AUDIO_ENABLE - stop_all_notes(); - PLAY_SONG(tone_return); -#endif - layer_off(_GA); - } - } else { - // After click, turn on layer if accessed from setting - if ( layer == _SE ) { -#ifdef AUDIO_ENABLE - stop_all_notes(); - PLAY_SONG(tone_game); -#endif - layer_on(_GA); - layer_off(_SE); - } - } - return false; - break; - case MU_TOG: - if (record->event.pressed) { - // On press, turn off layer if active - if ( layer == _SE ) { - layer_off(_SE); - layer_on(_MU); - } else { - layer_off(_MU); - } - } - return true; - break; - -//------UNICODE - // Unicode switches with sound -#ifdef UNICODE_ENABLE - case UNI_LI: - if (record->event.pressed) { -#ifdef AUDIO_ENABLE - stop_all_notes(); - PLAY_SONG(tone_linux); -#endif - set_unicode_input_mode(UC_LNX); - } - return false; - break; - case UNI_WN: - if (record->event.pressed) { -#ifdef AUDIO_ENABLE - stop_all_notes(); - PLAY_SONG(tone_windows); -#endif - set_unicode_input_mode(UC_WIN); - } - return false; - break; - - // Turkish letters, with capital functionality - case TUR_A: - if (record->event.pressed) { - if ( is_capital ) { - unicode_input_start(); - register_hex(0x00c2); - unicode_input_finish(); - } else { - unicode_input_start(); - register_hex(0x00e2); - unicode_input_finish(); - } - } - return false; - break; - case TUR_O: - if (record->event.pressed) { - if ( is_capital ) { - unicode_input_start(); - register_hex(0x00d6); - unicode_input_finish(); - } else { - unicode_input_start(); - register_hex(0x00f6); - unicode_input_finish(); - } - } - return false; - break; - case TUR_U: - if (record->event.pressed) { - if ( is_capital ) { - unicode_input_start(); - register_hex(0x00dc); - unicode_input_finish(); - } else { - unicode_input_start(); - register_hex(0x00fc); - unicode_input_finish(); - } - } - return false; - break; - case TUR_I: - if (record->event.pressed) { - if ( is_capital ) { - unicode_input_start(); - register_hex(0x0130); - unicode_input_finish(); - } else { - unicode_input_start(); - register_hex(0x0131); - unicode_input_finish(); - } - } - return false; - break; - case TUR_G: - if (record->event.pressed) { - if ( is_capital ) { - unicode_input_start(); - register_hex(0x011e); - unicode_input_finish(); - } else { - unicode_input_start(); - register_hex(0x011f); - unicode_input_finish(); - } - } - return false; - break; - case TUR_C: - if (record->event.pressed) { - if ( is_capital ) { - unicode_input_start(); - register_hex(0x00c7); - unicode_input_finish(); - } else { - unicode_input_start(); - register_hex(0x00e7); - unicode_input_finish(); - } - } - return false; - break; - case TUR_S: - if (record->event.pressed) { - if ( is_capital ) { - unicode_input_start(); - register_hex(0x015e); - unicode_input_finish(); - } else { - unicode_input_start(); - register_hex(0x015f); - unicode_input_finish(); - } - } - return false; - break; -#endif - -//-------Diagonal mouse movements -#ifdef MOUSEKEY_ENABLE - case MO_NE: - if( record->event.pressed ) { - mousekey_on(MO_N); - mousekey_on(MO_E); - mousekey_send(); - } else { - mousekey_off(MO_N); - mousekey_off(MO_E); - mousekey_send(); - } - return false; - break; - case MO_NW: - if( record->event.pressed ) { - mousekey_on(MO_N); - mousekey_on(MO_W); - mousekey_send(); - } else { - mousekey_off(MO_N); - mousekey_off(MO_W); - mousekey_send(); - } - return false; - break; - case MO_SE: - if( record->event.pressed ) { - mousekey_on(MO_S); - mousekey_on(MO_E); - mousekey_send(); - } else { - mousekey_off(MO_S); - mousekey_off(MO_E); - mousekey_send(); - } - return false; - break; - case MO_SW: - if( record->event.pressed ) { - mousekey_on(MO_S); - mousekey_on(MO_W); - mousekey_send(); - } else { - mousekey_off(MO_S); - mousekey_off(MO_W); - mousekey_send(); - } - return false; - break; - case MO_S_NE: - if( record->event.pressed ) { - mousekey_on(MO_S_N); - mousekey_on(MO_S_E); - mousekey_send(); - } else { - mousekey_off(MO_S_N); - mousekey_off(MO_S_E); - mousekey_send(); - } - return false; - break; - case MO_S_NW: - if( record->event.pressed ) { - mousekey_on(MO_S_N); - mousekey_on(MO_S_W); - mousekey_send(); - } else { - mousekey_off(MO_S_N); - mousekey_off(MO_S_W); - mousekey_send(); - } - return false; - break; - case MO_S_SE: - if( record->event.pressed ) { - mousekey_on(MO_S_S); - mousekey_on(MO_S_E); - mousekey_send(); - } else { - mousekey_off(MO_S_S); - mousekey_off(MO_S_E); - mousekey_send(); - } - return false; - break; - case MO_S_SW: - if( record->event.pressed ) { - mousekey_on(MO_S_S); - mousekey_on(MO_S_W); - mousekey_send(); - } else { - mousekey_off(MO_S_S); - mousekey_off(MO_S_W); - mousekey_send(); - } - return false; - break; -#endif - -//------DOUBLE PRESS, with added left navigation - case DBL_SPC: - if( record->event.pressed ) { - SEND_STRING(" "SS_TAP(X_LEFT)); - } - return false; - break; - case DBL_ANG: - if( record->event.pressed ) { - SEND_STRING("<>"SS_TAP(X_LEFT)); - } - return false; - break; - case DBL_PAR: - if( record->event.pressed ) { - SEND_STRING("()"SS_TAP(X_LEFT)); - } - return false; - break; - case DBL_SQR: - if( record->event.pressed ) { - SEND_STRING("[]"SS_TAP(X_LEFT)); - } - return false; - break; - case DBL_BRC: - if( record->event.pressed ) { - SEND_STRING("{}"SS_TAP(X_LEFT)); - } - return false; - break; - case DBL_QUO: - if( record->event.pressed ) { - SEND_STRING("\'\'"SS_TAP(X_LEFT)); - } - return false; - break; - case DBL_DQT: - if( record->event.pressed ) { - SEND_STRING("\"\""SS_TAP(X_LEFT)); - } - return false; - break; - case DBL_GRV: - if( record->event.pressed ) { - SEND_STRING("``"SS_TAP(X_LEFT)); - } - return false; - break; -// END OF KEYCODES - } - return process_record_keymap(keycode, record); -} - -/*----------------------*\ -|*-----LAYER CHANGE-----*| -\*----------------------*/ - -uint32_t layer_state_set_user(uint32_t state) { - - state = layer_state_set_keymap (state); -#ifdef RGBLIGHT_ENABLE - // Change RGB lighting depending on the last layer activated - rgblight_change( biton32(state) ); -#endif - return state; -} \ No newline at end of file diff --git a/users/romus/romus.h b/users/romus/romus.h deleted file mode 100644 index b65e32eb..00000000 --- a/users/romus/romus.h +++ /dev/null @@ -1,270 +0,0 @@ -// This is a modified version of Let's Split keyboard from bbaserdem - -#pragma once - -#include "quantum.h" - -#define XXX KC_NO - -// Layers -#define _DV 0 // Base layer -#define _AL 1 // Alt char overlay -#define _GA 2 // Game layer -#define _NU 3 // Numbers layer -#define _SE 4 // Settings layer -#define _MO 5 // Mouse emulation -#define _MU 6 // Music mode - -// Define short macros -#define UNDO LCTL(KC_Z) -#define REDO LCTL(KC_Y) -#define COPY LCTL(KC_C) -#define CUT LCTL(KC_X) -#define PASTE LCTL(KC_V) -#define EXIT LALT(KC_F4) -#define CAPS SFT_T(KC_CAPS) - - -// Rename mouse keys with 7 letters -#ifdef MOUSEKEY_ENABLE -#define MO_S_N KC_MS_WH_UP -#define MO_S_S KC_MS_WH_DOWN -#define MO_S_E KC_MS_WH_RIGHT -#define MO_S_W KC_MS_WH_LEFT -#define MO_N KC_MS_UP -#define MO_S KC_MS_DOWN -#define MO_E KC_MS_RIGHT -#define MO_W KC_MS_LEFT -#define MO_CL_L KC_MS_BTN1 -#define MO_CL_R KC_MS_BTN2 -#define MO_CL_M KC_MS_BTN3 -#define MO_CL_4 KC_MS_BTN4 -#define MO_CL_5 KC_MS_BTN5 -#define MO_AC_0 KC_MS_ACCEL0 -#define MO_AC_1 KC_MS_ACCEL1 -#define MO_AC_2 KC_MS_ACCEL2 -#else -#define MO_S_N KC_NO -#define MO_S_S KC_NO -#define MO_S_E KC_NO -#define MO_S_W KC_NO -#define MO_N KC_NO -#define MO_S KC_NO -#define MO_E KC_NO -#define MO_W KC_NO -#define MO_CL_L KC_NO -#define MO_CL_R KC_NO -#define MO_CL_M KC_NO -#define MO_CL_1 KC_NO -#define MO_CL_2 KC_NO -#define MO_AC_0 KC_NO -#define MO_AC_1 KC_NO -#define MO_AC_2 KC_NO -#endif - -// Rename music keys with <8 letters -#ifdef AUDIO_ENABLE -#define MU_REC KC_LCTL -#define MU_STOP KC_LALT -#define MU_PLAY KC_LGUI -#define MU_PLAY KC_LGUI -#define MU_FAST KC_UP -#define MU_SLOW KC_DOWN -#define MU_MASK KC_A -#else -#define MU_REC KC_NO -#define MU_STOP KC_NO -#define MU_PLAY KC_NO -#define MU_PLAY KC_NO -#define MU_FAST KC_NO -#define MU_SLOW KC_NO -#define MU_MASK KC_NO -#endif - -// Define non-capitalized UTF shortcuts here -#ifdef UNICODE_ENABLE -#define PHY_HBR UC(0x0127) -#define PHY_DEG UC(0x00b0) -#define CUR_LIR UC(0x20ba) -#define CUR_BIT UC(0x20bf) -#define CUR_EUR UC(0x20ac) -#define CUR_BPN UC(0x00a3) -#define CUR_YEN UC(0x00a5) -#else -#define PHY_HBR KC_NO -#define PHY_DEG KC_NO -#define CUR_LIR KC_NO -#define CUR_BIT KC_NO -#define CUR_EUR KC_NO -#define CUR_BPN KC_NO -#define CUR_YEN KC_NO -#endif - -// Custom keycodes -enum userspace_custom_keycodes { - // Turkish letters, with shifting - TUR_A = SAFE_RANGE, - TUR_C, - TUR_G, - TUR_I, - TUR_O, - TUR_S, - TUR_U, - // Unicode mode switch - UNI_LI, - UNI_WN, - // Double keys - DBL_SPC, - DBL_ANG, - DBL_PAR, - DBL_SQR, - DBL_BRC, - DBL_QUO, - DBL_DQT, - DBL_GRV, - // Diagonal mouse movements - MO_NE, - MO_NW, - MO_SE, - MO_SW, - MO_S_NE, - MO_S_NW, - MO_S_SE, - MO_S_SW, - // Layer switches and lock functionality - K_MOUSE, - K_NUMBR, - K_LOCK, - K_GAMES, - // Secret macros - SECRET1, - SECRET2, - SECRET3 -}; - -// Do tap dancable semicolon key if available -#ifdef TAP_DANCE_ENABLE -enum { - SCL = 0 -}; -#define MY_SCL TD(SCL) -#else -#define MY_SCL KC_SCLN -#endif - -// Shared keymaps -#define LAYOUT_planck_wrapper(...) LAYOUT_planck_grid(__VA_ARGS__) -#define LAYOUT_letssplit_wrapper(...) LAYOUT_ortho_4x12(__VA_ARGS__) - -/* Dvorak - * ,------------------------------------------------------------------------. - * | ' " | , | . | P | Y | Esc || Del | F | G | C | R | L | - * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| - * | A | O | E | U | I | Bkp || Ent | D | H | T | N | S | - * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| - * | ; : | Q | J | K | X | Spc || SET | B | M | W | V | Z | - * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| - * | Ctrl| OS | Alt | Tab | Cps | ACH || SYM | Spc | Lft | Up | Dwn | Rght| - * `------------------------------------------------------------------------' */ -#define DVORAK \ - KC_QUOT,KC_COMM,KC_DOT, KC_P, KC_Y, KC_ESC, KC_DEL, KC_F, KC_G, KC_C, KC_R, KC_L, \ - KC_A, KC_O, KC_E, KC_U, KC_I, KC_BSPC,KC_ENT, KC_D, KC_H, KC_T, KC_N, KC_S, \ - MY_SCL, KC_Q, KC_J, KC_K, KC_X, KC_SPC, MO(_SE),KC_B, KC_M, KC_W, KC_V, KC_Z, \ - KC_LCTL,KC_LGUI,KC_LALT,KC_TAB, CAPS, MO(_AL),K_NUMBR,KC_SPC, KC_LEFT,KC_UP, KC_DOWN,KC_RGHT - -/* Alternative character overlay - * ,------------------------------------------------------------------------. - * | ` ~ | ' ' | " " | Euro|Pound| || Del | Home| PgUp| Prn | \ | | / ? | - * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| - * | Redo| < > | ( ) | [ ] | { } | Alt || Ins | End |PgDwn| Scl | BTC | - _ | - * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| - * | Undo| Cut | Copy|Paste| EXIT| Shf || | | | | Yen | = + | - * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| - * | | | | | | || | | | | | | - * `------------------------------------------------------------------------' */ -#define ALTCHAR \ - KC_GRV, DBL_QUO,DBL_DQT,CUR_EUR,CUR_BPN,_______,_______,KC_HOME,KC_PGUP,KC_PSCREEN, KC_BSLASH, KC_SLSH, \ - REDO, DBL_ANG,DBL_PAR,DBL_SQR,DBL_BRC,KC_LALT,KC_INS, KC_END, KC_PGDN,KC_SCROLLLOCK, CUR_BIT, KC_MINUS, \ - UNDO, CUT, COPY, PASTE, EXIT, KC_LSFT,_______,_______,_______,_______, CUR_YEN, KC_EQUAL, \ - _______,_______,_______,_______,_______,_______,_______,DBL_SPC,_______,_______, _______, _______ - -/* Game layer - * ,------------------------------------------------------------------------. - * | OFF | Q | W | E | R | T || Esc | 7 | 8 | 9 |NumLk|Bkspc| - * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| - * | Tab | A | S | D | F | G || F1 | 4 | 5 | 6 | \ | Ent | - * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| - * | Shf | Z | X | C | V | B || F2 | 1 | 2 | 3 | ^ | MSE | - * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| - * | Ctrl| Alt | / | ` | SYM | Spc || F5 | Ent | 0 | < | v | > | - * `------------------------------------------------------------------------' */ -#define GAME \ - K_GAMES,KC_Q, KC_W, KC_E, KC_R, KC_T, KC_ESC, KC_P7, KC_P8, KC_P9, KC_NLCK,KC_BSPC, \ - KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_F1, KC_P4, KC_P5, KC_P6, KC_BSLS,KC_ENT , \ - KC_LSFT,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_F2, KC_P1, KC_P2, KC_P3, KC_UP,K_MOUSE, \ - KC_LCTL,KC_LALT,KC_SLSH,KC_GRV, K_NUMBR,KC_SPC, KC_F5, KC_ENT, KC_P0, KC_LEFT,KC_DOWN,KC_RGHT - -/* Symbols layer - * ,------------------------------------------------------------------------. - * | OFF | ` | ~ | \ | [ | { || } | ] | - | _ | = | + | - * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| - * | 1 | 2 | 3 | 4 | 5 | || LCK | 6 | 7 | 8 | 9 | 0 | - * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| - * | ! | @ | # | $ | % | ||Vol +| ^ | & | * | ( | ) | - * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| - * | | | | | | | || | | | | | | - * `------------------------------------------------------------------------' */ -#define NUMBERS \ - K_NUMBR,KC_GRV, KC_TILD,KC_BSLS,KC_LBRC,KC_LCBR,KC_RCBR,KC_RBRC,KC_MINS,KC_UNDS,KC_EQL, KC_PLUS, \ - KC_1, KC_2, KC_3, KC_4, KC_5, _______,K_LOCK, KC_6, KC_7, KC_8, KC_9, KC_0, \ - KC_EXLM,KC_AT, KC_HASH,KC_DLR, KC_PERC,_______,KC_VOLU,KC_CIRC,KC_AMPR,KC_ASTR,KC_LPRN,KC_RPRN, \ - KC_PIPE,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ - -/* Settings layer - * ,------------------------------------------------------------------------. - * |BLLed| F1 | F2 | F3 | F4 | Lin || Win | Wake| |Hue -|Hue +|Reset| - * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| - * | | F5 | F6 | F7 | F8 | ||Vol 0| |RGBto|Sat -|Sat +| | - * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| - * | Game| F9 | F10 | F11 | F12 |Vol 0|| |PrtSc|RGBan|Bri -|Bri +| | - * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| - * |Musir| | | | |Vol +||Vol -| Prev| Stop|TogMu| Next| | - * `------------------------------------------------------------------------' */ -#define SETTINGS \ - BL_STEP,KC_F1, KC_F2, KC_F3, KC_F4, UNI_LI, UNI_WN, KC_WAKE,_______,RGB_HUD,RGB_HUI,RESET , \ - _______,KC_F5, KC_F6, KC_F7, KC_F8, _______,KC_MUTE,_______,RGB_TOG,RGB_SAD,RGB_SAI,_______, \ - K_GAMES,KC_F9, KC_F10, KC_F11, KC_F12, KC_MUTE,_______,KC_PSCR,RGB_MOD,RGB_VAD,RGB_VAI,_______, \ - MU_TOG, _______,_______,_______,_______,KC_VOLU,KC_VOLD,KC_MPRV,KC_MSTP,KC_MPLY,KC_MNXT,_______ - -/* Mouse layer - * ,------------------------------------------------------------------------. - * |Ulock| \ | ^ | / |.....|.....||.....|.....| |\|.| |^| | |/|.| | - * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| - * | | < | Mid | > |Btn 4|.....||.....|Btn 5| <-- | Mid | --> | | - * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| - * | | / | v | \ |.....|.....||.....|.....| |/| | |v| | |\| | LCK | - * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| - * | | | | | | Left||Right| | |Accl0|Accl1|Accl2| - * `------------------------------------------------------------------------' */ -#define MOUSE \ - K_MOUSE,MO_NW, MO_N, MO_NE, XXX, XXX ,XXX, XXX, MO_S_NW,MO_S_N, MO_S_NE,_______, \ - _______,MO_W, MO_CL_M,MO_E, MO_CL_4,XXX ,XXX, MO_CL_5,MO_S_W, MO_CL_M,MO_S_E, _______, \ - _______,MO_SW, MO_S, MO_SE, XXX, XXX ,XXX, XXX, MO_S_SW,MO_S_S, MO_S_SE,K_LOCK , \ - _______,_______,_______,_______,_______,MO_CL_L,MO_CL_R,_______,MO_AC_0,MO_AC_1,MO_AC_2,_______ - -/* Music layer - * ,------------------------------------------------------------------------. - * |.....|.....|.....|.....|.....|.....||.....|.....|.....|.....|.....|.....| - * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| - * |.....|.....|.....|.....|.....|.....||.....|.....|.....|.....|.....|.....| - * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| - * |.....|.....|.....|.....|.....|.....||.....|.....|.....|.....|.....|.....| - * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| - * | togg| rec | stop| play| slow| fast||modes|.....|.....|.....|.....|.....| - * `------------------------------------------------------------------------' - */ -#define MUSIC \ - MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK, \ - MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK, \ - MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK, \ - MU_TOG, MU_REC, MU_STOP,MU_PLAY,MU_SLOW,MU_FAST,MU_MOD, MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK diff --git a/users/romus/rules.mk b/users/romus/rules.mk deleted file mode 100644 index 78ce2e93..00000000 --- a/users/romus/rules.mk +++ /dev/null @@ -1,24 +0,0 @@ -SRC += romus.c -EXTRAFLAGS += -flto # Used to make code smaller - -# ENABLE -UNICODE_ENABLE = yes # Used for unicode character emulation -EXTRAKEY_ENABLE = yes # OS signals like volume control - -# DISABLE -ifndef BLUETOOTH_ENABLE - BLUETOOTH_ENABLE = no # No bluetooth -endif -COMMAND_ENABLE = no # Some bootmagic thing i dont use -BOOTMAGIC_ENABLE = no # Access to EEPROM settings, not needed -CONSOLE_ENABLE = no # Allows console output with a command -SLEEP_LED_ENABLE = no # Breathes LED's when computer is asleep. Untested. -NKRO_ENABLE = no # Default is 6KRO which is plenty -MIDI_ENABLE = no # Untested feature -FAUXCLICKY_ENABLE = no # Emulates clicks using speaker -KEY_LOCK_ENABLE = no # Allows locking any key. Not used -API_SYSEX_ENABLE = no # Allows OS to send signals. - - -# Disabling this makes it compile, i dont know why -# VARIABLE_TRACE = no # Allows debugging variables diff --git a/users/rossman360/readme.md b/users/rossman360/readme.md deleted file mode 100644 index ebb17d16..00000000 --- a/users/rossman360/readme.md +++ /dev/null @@ -1,14 +0,0 @@ -Copyright 2020 Ross Montsinger rmontsinger@gmail.com @Rossman360 - -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 . \ No newline at end of file diff --git a/users/rossman360/rossman360.c b/users/rossman360/rossman360.c deleted file mode 100644 index a1c4ad8f..00000000 --- a/users/rossman360/rossman360.c +++ /dev/null @@ -1,80 +0,0 @@ -#include "rossman360.h" - -void my_custom_function(void) { - -} - -__attribute__ ((weak)) -bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { - return true; -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { -switch (keycode) { - case KC_MAKE: // Compiles the firmware, and adds the flash command based on keyboard bootloader - if (!record->event.pressed) { - uint8_t temp_mod = get_mods(); - uint8_t temp_osm = get_oneshot_mods(); - clear_mods(); clear_oneshot_mods(); - SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP); - #ifndef FLASH_BOOTLOADER - if ((temp_mod | temp_osm) & MOD_MASK_SHIFT) - #endif - { - SEND_STRING(":flash"); - } - if ((temp_mod | temp_osm) & MOD_MASK_CTRL) { - SEND_STRING(" -j8 --output-sync"); - } - tap_code(KC_ENT); - set_mods(temp_mod); - } - break; - case CSPEAK: - if (record->event.pressed) { - SEND_STRING(SS_TAP(X_PGDOWN) SS_TAP(X_ENTER) SS_TAP(X_ENTER) SS_TAP(X_PGDOWN)); - } - break; - case SPEAK1: - if (record->event.pressed) { - SEND_STRING(SS_TAP(X_PGDOWN) SS_TAP(X_ENTER) SS_TAP(X_ENTER) SS_TAP(X_PGDOWN) SS_LCTRL(SS_TAP(X_1))); - } - break; - case SPEAK2: - if (record->event.pressed) { - SEND_STRING(SS_TAP(X_PGDOWN) SS_TAP(X_ENTER) SS_TAP(X_ENTER) SS_TAP(X_PGDOWN) SS_LCTRL(SS_TAP(X_2))); - } - break; - case SPEAK3: - if (record->event.pressed) { - SEND_STRING(SS_TAP(X_PGDOWN) SS_TAP(X_ENTER) SS_TAP(X_ENTER) SS_TAP(X_PGDOWN) SS_LCTRL(SS_TAP(X_3))); - } - break; - case SPEAK4: - if (record->event.pressed) { - SEND_STRING(SS_TAP(X_PGDOWN) SS_TAP(X_ENTER) SS_TAP(X_ENTER) SS_TAP(X_PGDOWN) SS_LCTRL(SS_TAP(X_4))); - } - break; - case PARADOWN: - if (record->event.pressed) { - SEND_STRING(SS_TAP(X_PGDOWN) SS_TAP(X_ENTER) SS_TAP(X_PGDOWN)); - } - break; - case PMERGE: - if (record->event.pressed) { - SEND_STRING(SS_TAP(X_HOME) SS_TAP(X_BSPACE) SS_TAP(X_SPACE) SS_LCTRL(SS_TAP(X_BSPACE)) SS_TAP(X_SPACE)); - } - break; - case WREFRESH: - if (record->event.pressed) { - SEND_STRING(SS_TAP(X_SPACE) SS_TAP(X_BSPACE)); - } - break; - case REMCAPS: - if (record->event.pressed) { - SEND_STRING(SS_TAP(X_LEFT) SS_TAP(X_LEFT) SS_LCTRL(SS_TAP(X_LEFT)) SS_TAP(X_DELETE)); - } - break; -}; -return true; -}; diff --git a/users/rossman360/rossman360.h b/users/rossman360/rossman360.h deleted file mode 100644 index 57f6234f..00000000 --- a/users/rossman360/rossman360.h +++ /dev/null @@ -1,35 +0,0 @@ -#pragma once -#include "quantum.h" - -#define BWORD LCTL(KC_BSPC) -#define LWORD LCTL(KC_LEFT) -#define RWORD LCTL(KC_RIGHT) -#define JUMPBACK LSFT(KC_TAB) -#define UNDO LCTL(KC_Z) -#define XPANDR LCTL(LSFT(KC_X)) -#define NTAB LCTL(KC_T) -#define CTAB LCTL(KC_W) -#define XPANDR LCTL(LSFT(KC_X)) -#define CMDBSP MT(MOD_LGUI, KC_BSPC) -#define ALTDEL MT(MOD_LALT, KC_DEL) -#define TAB1 LCTL(KC_1) -#define TAB2 LCTL(KC_2) -#define TAB3 LCTL(KC_3) -#define TAB4 LCTL(KC_4) -#define CTRLSP MT(MOD_LCTL, KC_SPACE) -#define RVOLU LCTL(KC_RBRC) -#define RVOLD LCTL(KC_LBRC) - -// Define all of -enum custom_keycodes { - KC_MAKE = SAFE_RANGE, - CSPEAK, - SPEAK1, - SPEAK2, - SPEAK3, - SPEAK4, - PARADOWN, - WREFRESH, - PMERGE, - REMCAPS, -}; diff --git a/users/rossman360/rules.mk b/users/rossman360/rules.mk deleted file mode 100644 index 8aaa7431..00000000 --- a/users/rossman360/rules.mk +++ /dev/null @@ -1,5 +0,0 @@ -SRC += rossman360.c - -ifeq ($(strip $(MACROS_ENABLED)), yes) - OPT_DEFS += -DMACROS_ENABLED -endif \ No newline at end of file diff --git a/users/rs/karabiner.json b/users/rs/karabiner.json deleted file mode 100644 index f5214650..00000000 --- a/users/rs/karabiner.json +++ /dev/null @@ -1,154 +0,0 @@ -{ - "title": "RS", - "rules": [{ - "description": "CapsLock to Escape / Control Mod-Tap", - "manipulators": [{ - "type": "basic", - "from": { - "key_code": "caps_lock", - "modifiers": { - "optional": ["any"] - } - }, - "to": [{"key_code": "left_control"}], - "to_if_alone": [{"key_code": "escape"}] - }] - }, - { - "description": "Right-Shift / Enter Mod-Tap", - "manipulators": [{ - "type": "basic", - "from": { - "key_code": "right_shift", - "modifiers": { - "optional": ["any"] - } - }, - "to": [{"key_code": "right_shift"}], - "to_if_alone": [{"key_code": "return_or_enter"}] - }] - }, - { - "description": "Right-Command / Backspace Mod-Tap", - "manipulators": [{ - "type": "basic", - "from": { - "key_code": "right_command", - "modifiers": { - "optional": ["any"] - } - }, - "to": [{"key_code": "right_command"}], - "to_if_alone": [{"key_code": "delete_or_backspace"}] - }] - }, - { - "description": "Right-Command Accents", - "manipulators": [ - { - "type": "basic", - "from": { - "key_code": "a", - "modifiers": { - "mandatory": ["right_command"], - "optional": ["left_shift", "right_shift"] - } - }, - "to": [ - {"key_code": "grave_accent_and_tilde", "modifiers": ["left_option"]}, - {"key_code": "a"} - ] - }] - }, - { - "description": "Right Command Navigation", - "manipulators": [{ - "type": "basic", - "from": { - "key_code": "j", - "modifiers": { - "mandatory": ["right_command"], - "optional": ["any"] - } - }, - "to": [{"key_code": "left_arrow"}] - }, - { - "type": "basic", - "from": { - "key_code": "k", - "modifiers": { - "mandatory": ["right_command"], - "optional": ["any"] - } - }, - "to": [{"key_code": "down_arrow"}] - }, - { - "type": "basic", - "from": { - "key_code": "i", - "modifiers": { - "mandatory": ["right_command"], - "optional": ["any"] - } - }, - "to": [{"key_code": "up_arrow"}] - }, - { - "type": "basic", - "from": { - "key_code": "l", - "modifiers": { - "mandatory": ["right_command"], - "optional": ["any"] - } - }, - "to": [{"key_code": "right_arrow"}] - }, - { - "type": "basic", - "from": { - "key_code": "e", - "modifiers": { - "mandatory": ["right_command"], - "optional": ["any"] - } - }, - "to": [{"key_code": "page_up"}] - }, - { - "type": "basic", - "from": { - "key_code": "d", - "modifiers": { - "mandatory": ["right_command"], - "optional": ["any"] - } - }, - "to": [{"key_code": "page_down"}] - }, - { - "type": "basic", - "from": { - "key_code": "s", - "modifiers": { - "mandatory": ["right_command"], - "optional": ["any"] - } - }, - "to": [{"key_code": "home"}] - }, - { - "type": "basic", - "from": { - "key_code": "f", - "modifiers": { - "mandatory": ["right_command"], - "optional": ["any"] - } - }, - "to": [{"key_code": "end"}] - }] - }] -} diff --git a/users/rs/readme.md b/users/rs/readme.md deleted file mode 100644 index 60b34ea3..00000000 --- a/users/rs/readme.md +++ /dev/null @@ -1,30 +0,0 @@ -# RS: Code Friendly 40% – 60% Keymaps - -The rs keymap collection is an evolution of my previous keymap optimized for coding with a 60% keyboards like the Iris. I tried to keep the simplicity of my previous keymap with all the keys necessary for coding on a single layer in addition to the base one. It work well with any 40% and 60% keyboard, split or not. - -To build it, use: - - make :rs - -Example: - - make keebio/iris:rs - make crkbd:rs - make planck:rs - make preonic:rs - make ergotravel:rs - make handwired/rs60:rs - -Because I sometime have to use my internal keyboard I my macbook, a [karabiner configuration](karabiner.json) is also provided to get most of the features of this keyboard, including the code layer / backspace on right command key etc. - -This set of keymaps have been tested with those keyboards: -- [Planck](../../keyboards/planck/) -- [Preonic](../../keyboards/preonic/) -- [My preonic clone](../../keyboards/handwired/rs60/) - -This keymap in is also available for other keyboards: -- [Crkdb/rs](../../keyboards/crkbd/keymaps/rs/keymap.c) -- [Iris/rs](../../keyboards/keebio/iris/keymaps/rs/keymap.c) -- [Ergotravel/rs](../../keyboards/ergotravel/keymaps/rs/keymap.c) -- [ortho_5x12/rs](../../layouts/community/ortho_5x12/rs/keymap.c) -- [ortho_4x12/rs](../../layouts/community/ortho_4x12/rs/keymap.c) diff --git a/users/rs/rs.c b/users/rs/rs.c deleted file mode 100644 index fa634bb9..00000000 --- a/users/rs/rs.c +++ /dev/null @@ -1,74 +0,0 @@ - -#include "rs.h" - -// process_record_user is like process_record_user for keymaps including this file. -__attribute__ ((weak)) -bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { - return true; -} - -// rgb_mod_changed_keymap is called any time the RGB mod has been changed. -__attribute__ ((weak)) -void rgb_mod_changed_keymap(void) { -} - -// keylog_set_keymap is called for every key press. -__attribute__ ((weak)) -void keylog_set_keymap(uint16_t keycode, keyrecord_t *record) { -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - if (record->event.pressed) { - keylog_set_keymap(keycode, record); - } - - switch (keycode) { - case NEQL: // != - if (record->event.pressed) { - SEND_STRING("!="); - } - return false; - case LPLT: // ( or < with shift - if (record->event.pressed) { - if (get_mods() & (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT))) { - // < - tap_code(KC_COMM); // shift is already registered - } else { - // ( - register_mods(MOD_BIT(KC_LSFT)); - tap_code(KC_9); - unregister_mods(MOD_BIT(KC_LSFT)); - } - } - return false; - case RPGT: // ) or > with shift - if (record->event.pressed) { - if (get_mods() & (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT))) { - // < - tap_code(KC_DOT); // shift is already registered - } else { - // ) - register_mods(MOD_BIT(KC_LSFT)); - tap_code(KC_0); - unregister_mods(MOD_BIT(KC_LSFT)); - } - } - return false; -#ifdef RGBLIGHT_ENABLE - case RGB_MOD: - if (record->event.pressed) { - rgblight_step(); - rgb_mod_changed_keymap(); - } - return false; - case RGBRST: - if (record->event.pressed) { - eeconfig_update_rgblight_default(); - rgblight_enable(); - rgb_mod_changed_keymap(); - } - return false; -#endif - } - return process_record_keymap(keycode, record); -} \ No newline at end of file diff --git a/users/rs/rs.h b/users/rs/rs.h deleted file mode 100644 index 722d6ed1..00000000 --- a/users/rs/rs.h +++ /dev/null @@ -1,50 +0,0 @@ -#pragma once -#include "quantum.h" - -enum layers { - _QWERTY, - _CODE, - _FN, -}; - -enum custom_keycodes { - CODE = SAFE_RANGE, - FN, - LPLT, - RPGT, - NEQL, -#ifdef RGBLIGHT_ENABLE - RGBRST, -#endif -}; - -#define KC_ KC_TRNS - -#define KC_ESCC MT(MOD_LCTL, KC_ESC) -#define KC_ENTS MT(MOD_LSFT, KC_ENT) -#define KC_LTGT LTGT // > or < with shift -#define KC_LPLT LPLT // ( or < with shift -#define KC_RPGT RPGT // ) or > with shift -#define KC_NEQL NEQL // != -#define KC_CODE MO(_CODE) -#define KC_BCOD LT(_CODE, KC_BSPC) -#define KC_FN MO(_FN) -#define KC_RST RESET -#define KC_CTRA LCTL(KC_A) -#define KC_CTRE LCTL(KC_E) -#define KC_BLTG BL_TOGG -#define KC_BLUP BL_INC -#define KC_BLDN BL_DEC -#define KC_BLBR BL_BRTG - -#ifdef RGBLIGHT_ENABLE -#define KC_LRST RGBRST -#define KC_LTOG RGB_TOG -#define KC_LHUI RGB_HUI -#define KC_LHUD RGB_HUD -#define KC_LSAI RGB_SAI -#define KC_LSAD RGB_SAD -#define KC_LVAI RGB_VAI -#define KC_LVAD RGB_VAD -#define KC_LMOD RGB_MOD -#endif \ No newline at end of file diff --git a/users/rs/rules.mk b/users/rs/rules.mk deleted file mode 100644 index edb5be0f..00000000 --- a/users/rs/rules.mk +++ /dev/null @@ -1 +0,0 @@ -SRC += rs.c \ No newline at end of file diff --git a/users/sethBarberee/config.h b/users/sethBarberee/config.h deleted file mode 100644 index a849ac0e..00000000 --- a/users/sethBarberee/config.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifdef RGBLIGHT_ENABLE -# ifndef CAPS_LOCK_MODE -# define CAPS_LOCK_MODE 1 -# endif -# ifndef NORMAL_MODE -# define NORMAL_MODE 4 -# endif -#endif diff --git a/users/sethBarberee/readme.md b/users/sethBarberee/readme.md deleted file mode 100644 index 75d892cb..00000000 --- a/users/sethBarberee/readme.md +++ /dev/null @@ -1,6 +0,0 @@ -# seth's userspace - -## Features -* Escape/Caps Lock tap dance (1 for Escape / 2 for Caps Lock) - * RGB Mode indication for Caps Lock - * Solid Mode for Caps On diff --git a/users/sethBarberee/rules.mk b/users/sethBarberee/rules.mk deleted file mode 100644 index d8aef605..00000000 --- a/users/sethBarberee/rules.mk +++ /dev/null @@ -1 +0,0 @@ -SRC += sethBarberee.c diff --git a/users/sethBarberee/sethBarberee.c b/users/sethBarberee/sethBarberee.c deleted file mode 100644 index 10f78f63..00000000 --- a/users/sethBarberee/sethBarberee.c +++ /dev/null @@ -1,45 +0,0 @@ -#include "sethBarberee.h" -#ifdef RGBLIGHT_ENABLE -#ifdef TAP_DANCE_ENABLE - -// Initialize it now -tap caps_status = { - .toggled = false, - .toggle_mode = CAPS_LOCK_MODE, - .normal_mode = NORMAL_MODE -}; - -void dance_ecap_finished (qk_tap_dance_state_t *state, void *user_data){ - if(state->count == 1){ - register_code(KC_ESC); - } else { - register_code(KC_CAPS); - if(!caps_status.toggled){ - // Toggling caps so indicate - caps_status.toggled = true; - rgblight_mode_noeeprom(caps_status.toggle_mode); - } else { - // Turning off so return to normal mode - caps_status.toggled = false; - rgblight_mode_noeeprom(caps_status.normal_mode); - } - } -} - -void dance_ecap_reset (qk_tap_dance_state_t *state, void *user_data){ - if(state->count == 1){ - unregister_code(KC_ESC); - } else { - unregister_code(KC_CAPS); - } -} - -//Tap Dance Definitions -qk_tap_dance_action_t tap_dance_actions[] = { - //Tap once for Esc, twice for Caps Lock - [TD_ECAP] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_ecap_finished, dance_ecap_reset), -// Other declarations would go here, separated by commas, if you have them -}; - -#endif -#endif diff --git a/users/sethBarberee/sethBarberee.h b/users/sethBarberee/sethBarberee.h deleted file mode 100644 index 23774ba4..00000000 --- a/users/sethBarberee/sethBarberee.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef USERSPACE -#define USERSPACE - -#include "quantum.h" - -#ifdef TAP_DANCE_ENABLE // only enable for tap dances - enum { - TD_ECAP = 0, - }; - - #define KC_ECAP TD(TD_ECAP) - - typedef struct { - bool toggled; // store whether we have toggled caps lock - int toggle_mode; // idk why but maybe do something with this.. - int normal_mode; - } tap; -#endif - -#endif diff --git a/users/sigma/config.h b/users/sigma/config.h deleted file mode 100644 index 53b986cd..00000000 --- a/users/sigma/config.h +++ /dev/null @@ -1,21 +0,0 @@ -/* - Copyright 2018 Yann Hodique @sigma - - 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 . -*/ -#pragma once - -#define LEADER_TIMEOUT 1000 - -#define MACRO_TIMER 5 diff --git a/users/sigma/rules.mk b/users/sigma/rules.mk deleted file mode 100644 index a4cd2b34..00000000 --- a/users/sigma/rules.mk +++ /dev/null @@ -1,3 +0,0 @@ -LEADER_ENABLE = yes - -SRC += sigma.c diff --git a/users/sigma/sigma.c b/users/sigma/sigma.c deleted file mode 100644 index b2bf40d5..00000000 --- a/users/sigma/sigma.c +++ /dev/null @@ -1,276 +0,0 @@ -/* - Copyright 2018 Yann Hodique @sigma - - 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 "sigma.h" - -userspace_config_t runtime_userspace_config; -userspace_config_t stored_userspace_config; - -__attribute__ ((weak)) -void matrix_init_keymap(void) {} - -__attribute__ ((weak)) -void startup_keymap(void) {} - -__attribute__ ((weak)) -void shutdown_keymap(void) {} - -__attribute__ ((weak)) -void suspend_power_down_keymap(void) {} - -__attribute__ ((weak)) -void suspend_wakeup_init_keymap(void) {} - -__attribute__ ((weak)) -void matrix_scan_keymap(void) {} - -__attribute__ ((weak)) -bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { - return true; -} - -__attribute__ ((weak)) -bool process_record_secrets(uint16_t keycode, keyrecord_t *record) { - return true; -} - - -__attribute__ ((weak)) -uint32_t layer_state_set_keymap (uint32_t state) { - return state; -} - -__attribute__ ((weak)) -uint32_t default_layer_state_set_keymap (uint32_t state) { - return state; -} - -__attribute__ ((weak)) -void led_set_keymap(uint8_t usb_led) {} - -void set_os(uint8_t os) { - runtime_userspace_config.os_target = os; - - switch (os) { - case _OS_MACOS: - set_unicode_input_mode(UC_OSX); - break; - case _OS_LINUX: - set_unicode_input_mode(UC_LNX); - break; - case _OS_WINDOWS: - set_unicode_input_mode(UC_WIN); - break; - } -} - -void matrix_init_user(void) { - stored_userspace_config.raw = eeconfig_read_user(); - runtime_userspace_config.raw = stored_userspace_config.raw; - - set_os(runtime_userspace_config.os_target); -} - -void store_userspace_config(void) { - eeconfig_update_user(stored_userspace_config.raw); -} - -LEADER_EXTERNS(); - -void matrix_scan_user(void) { - LEADER_DICTIONARY() { - leading = false; - leader_end(); - - SEQ_TWO_KEYS(KC_F1, KC_L) { - set_os(_OS_LINUX); - } - SEQ_TWO_KEYS(KC_F1, KC_M) { - set_os(_OS_MACOS); - } - SEQ_TWO_KEYS(KC_F1, KC_W) { - set_os(_OS_WINDOWS); - } - SEQ_TWO_KEYS(KC_F1, KC_S) { - stored_userspace_config.raw = runtime_userspace_config.raw; - store_userspace_config(); - } - } -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - uint8_t os_target = runtime_userspace_config.os_target; - bool pressed = record->event.pressed; - - switch (keycode) { - case KC_QWERTY: - if (pressed) { - set_single_persistent_default_layer(_QWERTY); - } - return false; - break; - - case KC_MAKE: // Compiles the firmware, and adds the flash command based on keyboard bootloader - if (!pressed) { - send_string_with_delay_P(PSTR("make " QMK_KEYBOARD ":" QMK_KEYMAP -#if defined(__ARM__) - ":dfu-util" -#elif defined(BOOTLOADER_DFU) - ":dfu" -#elif defined(BOOTLOADER_HALFKAY) - ":teensy" -#elif defined(BOOTLOADER_CATERINA) - ":avrdude" -#endif // bootloader options - SS_TAP(X_ENTER)), 10); - } - return false; - break; - - case EPRM: // Resets EEPROM - if (pressed) { - eeconfig_init(); - default_layer_set(1UL< @sigma - - 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 . -*/ -#pragma once - -#include "quantum.h" -#include "version.h" -#include "eeprom.h" - -// Define os types -enum os_types - { - _OS_MACOS = 0, - _OS_LINUX, - _OS_WINDOWS, - }; - -// Define layer names -enum userspace_layers - { - _QWERTY = 0, - }; - -typedef union { - uint32_t raw; - struct { - uint8_t os_target :2; - }; -} userspace_config_t; - -enum userspace_custom_keycodes - { - EPRM = SAFE_RANGE, // Resets EEPROM - VRSN, // Prints QMK Firmware and board info - KC_QWERTY, // Sets default layer to QWERTY - KC_MAKE, // Rebuild the current firmware - KC_OS_CUT, - KC_OS_COPY, - KC_OS_PASTE, - KC_OS_UNDO, - KC_OS_REDO, - KC_OS_LOCK, - KC_SCRT, - NEW_SAFE_RANGE //use NEW_SAFE_RANGE for keymap specific codes - }; diff --git a/users/spacebarracecar/config.h b/users/spacebarracecar/config.h deleted file mode 100644 index 748c0471..00000000 --- a/users/spacebarracecar/config.h +++ /dev/null @@ -1,2 +0,0 @@ -#pragma once -#define TAPPING_TERM 200 diff --git a/users/spacebarracecar/readme.md b/users/spacebarracecar/readme.md deleted file mode 100644 index 3d9ceb80..00000000 --- a/users/spacebarracecar/readme.md +++ /dev/null @@ -1,111 +0,0 @@ -# SpacebarRacecar Userspace - -The main purpose of this userspace is to keep my personal keymaps clean by moving shared code in here and also allowing me to easily change all my keymaps at once. However it also contains code that might be interesting to QMK Users living in Germany. Most of this code will be explained here. - - -## US Layout Keys for German PCs - -I'm using the US Ansi layout however I'm living in Germany which means that every PC here has its input language set to German. My goal was to create custom keycodes that emulate the US Keys so that I can plug my keyboards into any German PC and have them working without changing any settings. - -### How to use - -- To activate the custom keycodes set GERMAN_ENABLE = yes in the keyboards rules.mk file. -- The keycodes are listed and explained in [spacebarracecar.h](spacebarracecar.h) under `enum userspace_custom_keycodes`. -- The keycodes are handled by the `process_record_user` function which is now located in [spacebarracecar.c](spacebarracecar.c). To change keyboard specific configuration `process_record_keymap` is used (see [drashna userspace readme](../drashna/readme.md) for better explanation). -- There is a predefined `_DEADKEY` layer in [spacebarracecar.h](spacebarracecar.h) under `enum userspace_layers`. Shifted CU_QUOT enables the dead key layer, just like KC_QUOT would when using the US International layout. (See `enum userspace_custom_keycodes` for more explanation). -- On Windows grave and circonflexe are defined as dead keys when using the standard german layout. Those are automatically escaped when using the custom keycodes. `CU_ESCT` can be used to enable/disable this behavior. -- For a complete example see my [planck](../../keyboards/planck/keymaps/spacebarracecar/keymap.c) keymap. - -### How it works - -Creating the custom keycodes was not a trivial task because it is necessary that they are able to send different keycodes depending on the physical shift state. Also the shift state of the actual send keycodes has to be completely independent of the physical shift state. At the same time it has to be ensured that shift never gets stuck or disabled accidentaly. - -(Shift state: If shift keycode is registered; Physical shift state: If shift key is actually pressed) - -Here is an example for a custom *US Equal* keycode that illustrates the problem: - -| Physical Shift State | Custom keycode | Actual send keycodes | -|----------------------|----------------|----------------------| -| Unshifted | = | Shifted DE_0 | -| Shifted | + | Unshifted DE_PLUS | - -#### Tracking the physical shift state - -To track the physical shift state there are two custom left and right shift keycodes `CU_LSFT` and `CU_RSFT`. These track the current physical shift state using two booleans `lshift` and `rshift`. To make things easier both custom shifts use KC_LSFT. A space cadet shift functionality is also included. The preexisting space cadet shift implementation could not be used because it doesn't reset when custom keycodes are pressed and therefore produces unwated parenthesis. - -#### Custom keycode templates - -To ease the creation of custom keycodes there are a few templates defined in [spacebarracecar.h](spacebarracecar.h). - -- `SHIFT_NORM(kc1, kc2)` Sends independent keycodes kc1 and kc2 depending on physical shift state without changing shift state. -- `SHIFT_SWITCH(kc1, kc2)` Sends independent keycodes kc1 and kc2 depending on physical shift state while flipping shift state. -- `SHIFT_ALL(kc1, kc2)` Sends independent keycodes kc1 and kc2 depending on physical shift state while always sending shift. -- `SHIFT_NO(kc1, kc2)` Sends independent keycodes kc1 and kc2 depending on physical shift state while never sending shift. -- `SHIFT_ALGR(kc1, kc2)` Sends independent keycodes kc1 and kc2 depending on physical shift state while never sending shift and always sending ralt. -- `UML(kc)` Sends keycode kc without changing shift state and then escapes the `_DEADKEY` layer. - -Here is `SHIFT_NORM` as an example: -```c -#define SHIFT_NORM(kc1, kc2) \ -if (record->event.pressed) { \ - timer_timeout(); \ - if (lshift || rshift) { \ - register_code(KC_LSFT); \ - unregister_code(kc2); \ - register_code(kc2); \ - add_to_prev(kc2); \ - } else { \ - unregister_code(KC_LSFT); \ - unregister_code(kc1); \ - register_code(kc1); \ - } \ -} else { \ - unregister_code(kc1); \ - unregister_code(kc2); \ -} \ -return false; -``` - -It is noticeable that before registering a keycode the same keycode gets unregistered first. The reason for this is that there can now be two physical keys that use the same keycode only with different shift states. When rolling those two keys the keycode has to be unregistered first, otherwise the second key doesn't register. Also noticable is that sometimes the `add_to_prev` function is called. This will be explained later. The `timer_timeout` function is necessary to reset the timers of the custom space cadet shift functionality. - -It's worth mentioning that `SHIFT_ALGR` unlike the other templates doesn't allow repetition of characters when held. This is because it would otherwise require extensive checking of physical ralt status similar to shift to prevent ralt from getting stuck. - -#### Ensuring that shift state is always correct when pressing normal keycodes - -To ensure that non custom keycodes always get send with the correct shift state the default case in `process_record_user` includes a physical shift check that sets shift accordingly before registering the keycode. Also `timer_timeout` is always called to reset the space cadet shift timers to prevent unwanted parenthesis. - -```c -default: - if(record->event.pressed) { - timer_timeout(); - - #ifdef GERMAN_ENABLE - if (lshift || rshift) - register_code(KC_LSFT); - else - unregister_code(KC_LSFT); - #endif - - } - return process_record_keymap(keycode, record); -``` - -#### Ensuring that custom keycodes always produce the correct character - -When very specific key combinations that include custom keycodes and/or shift are pressed it can happen that wrong characters are produced due to changing shift states. The previously mentioned `add_to_prev` function is there to prevent that. It can be used to add a keycode to the `prev_kcs` array that can hold up to 6 keycodes. On various occasions, but mainly when shift is released `unreg_prev` is called, which then unregisters all saved keycodes. - -For real use this is probably not needed, but it doesn't hurt either. - -#### Adapting the templates for other languages - -In theory the templates can be used to create custom keycodes that map any layout to any other layout. - -## Other stuff - -### Custom Nav/Esc Key - -Since I'm always using a navigation layer with all my keyboards there is a `_NAV` layer predefined in [spacebarracecar.h](spacebarracecar.h) under `enum userspace_layers`. In addition to that I wanted to have a keycode that activates the navigation layer when held, but acts as Escape when pressed. In QMK there already exists `LT(layer, kc)`, however I found that there is some amount of lag before the layer is actived. Therefore I created a custom keycode CU_NAV that does the same without lag using a custom timer. Since I already need timers for the custom space cadet shift implementing this was very easy by adding the timer to the `timer_timeout` function. - -### Gamemode - -The userspace includes the custom keycode `CU_GAME` that is used to flip a boolean variable called `game`. That variable is used to enable/disable windows keys and space cadet shift. In my [planck keymap](../../keyboards/planck/keymaps/spacebarracecar/keymap.c) it also makes Lower act like Space which is more comfortable when resting on wasd and it could also be used to change various other things when gaming. diff --git a/users/spacebarracecar/rules.mk b/users/spacebarracecar/rules.mk deleted file mode 100644 index 319e887a..00000000 --- a/users/spacebarracecar/rules.mk +++ /dev/null @@ -1,5 +0,0 @@ -SRC += spacebarracecar.c - -ifeq ($(strip $(GERMAN_ENABLE)), yes) - OPT_DEFS += -DGERMAN_ENABLE -endif diff --git a/users/spacebarracecar/spacebarracecar.c b/users/spacebarracecar/spacebarracecar.c deleted file mode 100644 index bbd864aa..00000000 --- a/users/spacebarracecar/spacebarracecar.c +++ /dev/null @@ -1,352 +0,0 @@ -#include "spacebarracecar.h" - -#ifdef GERMAN_ENABLE -// These indicate if left and right shift are physically pressed -bool lshift = false; -bool rshift = false; - -// Interrupt and times for space cadet shift -bool lshiftp = false; -bool rshiftp = false; -uint16_t lshift_timer = 0; -uint16_t rshift_timer = 0; - -// Number of items that are saved in prev_kcs -uint8_t prev_indx = 0; -// Used to save the last 6 actual keycodes activated by frankenkeycodes -uint16_t prev_kcs[6] = {0, 0, 0, 0, 0, 0}; - -// If true the deadkey characters grave and circonflexe are not automatically escaped -bool esct = false; - -/* -Used to add a keycode to a prev_kcs to remember it. -When full the last code gets discarded and replaced by -the new one. -*/ -void add_to_prev(uint16_t kc){ - for (int i=0; i0; i--){ - prev_kcs[i] = prev_kcs[i-1]; - } - prev_kcs[0] = kc; - } else { - prev_kcs[prev_indx] = kc; - prev_indx++; - } -} - -/* -Unregisters all codes saved in prev_kcs and resets prev_indx. -gets called on multiple occasions mainly when shift is released -and when frankenkeycodes are pressed. Prevents output of -wrong characters when really specific key combinations -that would never occur during normal usage are pressed. -*/ -void unreg_prev(void){ - if (prev_indx == 0) - return; - for (int i=0; ievent.pressed) { - timer_timeout(); - game = !game; - } - // allows keymap to execute further commands when CU_GAME is pressed, for example enabling a macro layer - return process_record_keymap(keycode, record) && false; - case KC_LGUI: - case KC_RGUI: - if (record->event.pressed) - timer_timeout(); - if (game) - return false; - else - return true; - case CU_NAV: - if(record->event.pressed) { - navesc = true; - navesc_timer = timer_read(); - layer_on(_NAV); - } else { - if (timer_elapsed(navesc_timer) < TAPPING_TERM && navesc) { - register_code(KC_ESC); - unregister_code(KC_ESC); - } - layer_off(_NAV); - } - return false; - case KC_P00: - if(record->event.pressed) { - timer_timeout(); - register_code(KC_P0); - unregister_code(KC_P0); - register_code(KC_P0); - unregister_code(KC_P0); - } - return false; - - #ifdef RGBLIGHT_ENABLE - case CU_RGBV: - if(record->event.pressed) { - timer_timeout(); - if (rgblight_get_val()+32>255) - rgblight_sethsv(rgblight_get_hue(), rgblight_get_sat(), 31); - else - rgblight_sethsv(rgblight_get_hue(), rgblight_get_sat(), rgblight_get_val()+32); - } - return false; - #endif - - #ifdef GERMAN_ENABLE - case CU_LSFT: - if(record->event.pressed) { - lshiftp = true; - lshift_timer = timer_read(); - unregister_code(KC_LSFT); - register_code(KC_LSFT); - lshift = true; - } else { - if (timer_elapsed(lshift_timer) < TAPPING_TERM && lshiftp && !game) { - register_code(KC_LSFT); - register_code(KC_8); - unregister_code(KC_8); - unregister_code(KC_LSFT); - } - unreg_prev(); - if (!rshift) - unregister_code(KC_LSFT); - lshift = false; - } - return false; - case CU_RSFT: - if(record->event.pressed) { - rshiftp = true; - rshift_timer = timer_read(); - unregister_code(KC_LSFT); - register_code(KC_LSFT); - rshift = true; - } else { - if (timer_elapsed(rshift_timer) < TAPPING_TERM && rshiftp && !game) { - register_code(KC_LSFT); - register_code(KC_9); - unregister_code(KC_9); - unregister_code(KC_LSFT); - } - unreg_prev(); - if (!lshift) - unregister_code(KC_LSFT); - rshift = false; - } - return false; - case CU_ESCT: - if(record->event.pressed) { - timer_timeout(); - esct = !esct; - } - return false; - case CU_AE: - UML(DE_AE) - case CU_OE: - UML(DE_OE) - case CU_UE: - UML(DE_UE) - case CU_SS: - if(record->event.pressed) { - timer_timeout(); - unregister_code(KC_LSFT); - register_code(DE_SS); - unregister_code(DE_SS); - if (lshift || rshift) - register_code(KC_LSFT); - layer_off(_DEADKEY); - } - return false; - case CU_DDQ: - if(record->event.pressed) { - timer_timeout(); - register_code(KC_LSFT); - register_code(KC_2); - unregister_code(KC_2); - if (!lshift && !rshift) - unregister_code(KC_LSFT); - layer_off(_DEADKEY); - } - return false; - case CU_ED: - if(record->event.pressed) { - timer_timeout(); - layer_off(_DEADKEY); - } - return false; - case CU_GRV: - if(record->event.pressed) { - timer_timeout(); - if (lshift || rshift){ - unregister_code(KC_LSFT); - register_code(KC_ALGR); - unregister_code(DE_PLUS); - register_code(DE_PLUS); - unregister_code(DE_PLUS); - unregister_code(KC_ALGR); - register_code(KC_LSFT); - } else { - register_code(KC_LSFT); - unregister_code(DE_ACUT); - register_code(DE_ACUT); - unregister_code(DE_ACUT); - unregister_code(KC_LSFT); - if (!esct) { - register_code(KC_SPC); - unregister_code(KC_SPC); - } - } - } - return false; - case CU_CIRC: - if(record->event.pressed) { - timer_timeout(); - unregister_code(KC_LSFT); - unregister_code(DE_CIRC); - register_code(DE_CIRC); - unregister_code(DE_CIRC); - if (!esct) { - register_code(KC_SPC); - unregister_code(KC_SPC); - } - if (lshift || rshift) - register_code(KC_LSFT); - } - return false; - case CU_QUOT: - if(record->event.pressed){ - timer_timeout(); - register_code(KC_LSFT); - if (lshift || rshift){ - layer_on(_DEADKEY); - } else { - unregister_code(DE_HASH); - register_code(DE_HASH); - add_to_prev(DE_HASH); - } - } else { - unregister_code(DE_HASH); - unreg_prev(); - if (lshift || rshift) - register_code(KC_LSFT); - else - unregister_code(KC_LSFT); - } - return false; - case CU_6: - if(record->event.pressed){ - timer_timeout(); - unregister_code(KC_LSFT); - if (lshift || rshift){ - unregister_code(DE_CIRC); - register_code(DE_CIRC); - unregister_code(DE_CIRC); - if (!esct) { - register_code(KC_SPC); - unregister_code(KC_SPC); - } - register_code(KC_LSFT); - } else { - register_code(DE_6); - } - } else { - unregister_code(DE_6); - } - return false; - case CU_COMM: - SHIFT_NO(DE_COMM, DE_LESS) - case CU_DOT: - SHIFT_NORM(DE_DOT, DE_LESS) - case CU_SLSH: - SHIFT_ALL(DE_7, DE_SS) - case CU_SCLN: - SHIFT_ALL(DE_COMM, DE_DOT) - case CU_3: - SHIFT_NO(DE_3, DE_HASH) - case CU_7: - SHIFT_NORM(DE_7, DE_6) - case CU_8: - SHIFT_NORM(DE_8, DE_PLUS) - case CU_9: - SHIFT_NORM(DE_9, DE_8) - case CU_0: - SHIFT_NORM(DE_0, DE_9) - case CU_EQL: - SHIFT_SWITCH(DE_0, DE_PLUS) - case CU_LBRC: - SHIFT_ALGR(DE_8, DE_7) - case CU_RBRC: - SHIFT_ALGR(DE_9, DE_0) - case CU_BSLS: - SHIFT_ALGR(DE_SS, DE_LESS) - case CU_Z: - CTRL(DE_Z, KC_Z) - case CU_Y: - CTRL(DE_Y, KC_Y) - case KC_LCTL: - case KC_RCTL: - if(!record->event.pressed) { - timer_timeout(); - unregister_code(KC_Z); - unregister_code(KC_Y); - } - return true; - #endif - - default: - if(record->event.pressed) { - timer_timeout(); - - #ifdef GERMAN_ENABLE - if (lshift || rshift) - register_code(KC_LSFT); - else - unregister_code(KC_LSFT); - #endif - - } - return process_record_keymap(keycode, record); - } -} - -__attribute__((weak)) -bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { - return true; -} diff --git a/users/spacebarracecar/spacebarracecar.h b/users/spacebarracecar/spacebarracecar.h deleted file mode 100644 index 43bfc5e6..00000000 --- a/users/spacebarracecar/spacebarracecar.h +++ /dev/null @@ -1,247 +0,0 @@ -#pragma once - -#include "quantum.h" -#include "keymap_german.h" - -enum userspace_layers { - _DEADKEY = 14, // Change if more than 16 layers are required - _NAV -}; - -enum userspace_custom_keycodes { - CU_GAME = SAFE_RANGE, // Toggle game mode on/off - CU_NAV, // NAV | ESC - KC_P00, // Numpad double zero - - #ifdef GERMAN_ENABLE - CU_LSFT, // LSFT | ( - CU_RSFT, // LSFT | ) - CU_COMM, // , | < - CU_DOT, // . | > - CU_SLSH, // / | ? - CU_SCLN, // ; | : - CU_QUOT, // ' | Enable deadkey layer - CU_GRV, // ` | ~ - CU_CIRC, // ^ - CU_3, // 3 | # - CU_6, // 6 | ^ - CU_7, // 7 | & - CU_8, // 8 | * - CU_9, // 9 | ( - CU_0, // 0 | ) - CU_EQL, // = | + - CU_LBRC, // [ | { - CU_RBRC, // ] | } - CU_BSLS, // \ | | - CU_Z, // Z | Y in conjunction with ctrl - CU_Y, // Y | Z in conjunction wiht ctrl - CU_ESCT, // Toggle escape of grv and circ on/off - // Deadkey Layer - CU_AE, // Ä - CU_OE, // Ö - CU_UE, // Ü - CU_SS, // ß - CU_DDQ, // " - CU_ED, // Escape deadkey layer - #endif - - #ifdef RGBLIGHT_ENABLE - CU_RGBV, // Cycle through RGB brightness - #endif - - NEW_SAFE_RANGE // Use for keymap specific keycodes -}; - -#ifdef GERMAN_ENABLE -extern bool lshift; -extern bool rshift; -extern bool lshiftp; -extern bool rshiftp; -extern uint16_t lshift_timer; -extern uint16_t rshift_timer; - -extern uint8_t prev_indx; -extern uint16_t prev_kcs[6]; -void add_to_prev(uint16_t kc); -void unreg_prev(void); - -extern bool esct; -#endif - -extern bool navesc; -extern uint16_t navesc_timer; - -extern bool game; - -void timer_timeout(void); - -void timer_timeout_keymap(void); - -bool process_record_keymap(uint16_t keycode, keyrecord_t *record); - -#define CTRLX LCTL(KC_X) -#define CTRLC LCTL(KC_C) -#define CTRLV LCTL(KC_V) - -#define ALTF4 LALT(KC_F4) - -#define GUIU LGUI(KC_UP) -#define GUID LGUI(KC_DOWN) -#define GUIL LGUI(KC_LEFT) -#define GUIR RGUI(KC_RIGHT) - -#define CTLENT CTL_T(KC_ENT) - -#define EMOJI LWIN(KC_DOT) - -/* -Templates for Keys, with custom shifted and non shifted Characters -*/ - -// Normal shift status -#define SHIFT_NORM(kc1, kc2) \ -if (record->event.pressed) { \ - timer_timeout(); \ - if (lshift || rshift) { \ - register_code(KC_LSFT); \ - unregister_code(kc2); \ - register_code(kc2); \ - add_to_prev(kc2); \ - } else { \ - unregister_code(KC_LSFT); \ - unregister_code(kc1); \ - register_code(kc1); \ - } \ -} else { \ - unregister_code(kc1); \ - unregister_code(kc2); \ -} \ -return false; - -// Inverted shift status -#define SHIFT_SWITCH(kc1, kc2) \ -if (record->event.pressed) { \ - timer_timeout(); \ - if (lshift || rshift) { \ - unregister_code(KC_LSFT); \ - unregister_code(kc2); \ - register_code(kc2); \ - add_to_prev(kc2); \ - } else { \ - register_code(KC_LSFT); \ - unregister_code(kc1); \ - register_code(kc1); \ - add_to_prev(kc1); \ - } \ -} else { \ - unregister_code(kc1); \ - unregister_code(kc2); \ - unreg_prev(); \ - if (lshift || rshift) \ - register_code(KC_LSFT); \ - else \ - unregister_code(KC_LSFT); \ -} \ -return false; - -// Always shifted -#define SHIFT_ALL(kc1, kc2) \ -if (record->event.pressed) { \ - timer_timeout(); \ - register_code(KC_LSFT); \ - if (lshift || rshift) { \ - unregister_code(kc2); \ - register_code(kc2); \ - add_to_prev(kc2); \ - } else { \ - unregister_code(kc1); \ - register_code(kc1); \ - add_to_prev(kc1); \ - } \ -} else { \ - unregister_code(kc1); \ - unregister_code(kc2); \ - unreg_prev(); \ - if (lshift || rshift) \ - register_code(KC_LSFT); \ - else \ - unregister_code(KC_LSFT); \ -} \ -return false; - -// Never shifted -#define SHIFT_NO(kc1, kc2) \ -if (record->event.pressed) { \ - timer_timeout(); \ - unregister_code(KC_LSFT); \ - if (lshift || rshift) { \ - unregister_code(kc2); \ - register_code(kc2); \ - add_to_prev(kc2); \ - } else { \ - unregister_code(kc1); \ - register_code(kc1); \ - } \ -} else { \ - unregister_code(kc1); \ - unregister_code(kc2); \ - unreg_prev(); \ - if (lshift || rshift) \ - register_code(KC_LSFT); \ - else \ - unregister_code(KC_LSFT); \ -} \ -return false; - -// Always AltGr -#define SHIFT_ALGR(kc1, kc2) \ -if (record->event.pressed) { \ - timer_timeout(); \ - unregister_code(KC_LSFT); \ - register_code(KC_ALGR); \ - if (lshift || rshift) { \ - unregister_code(kc2); \ - register_code(kc2); \ - unregister_code(kc2); \ - register_code(KC_LSFT); \ - } else { \ - unregister_code(kc1); \ - register_code(kc1); \ - unregister_code(kc1); \ - } \ - unregister_code(KC_ALGR); \ -} \ -return false; - -// Different keycode when Ctrl is pressed -#define CTRL(kc1, kc2) \ -if(record->event.pressed) { \ - timer_timeout(); \ - if (lshift || rshift) \ - register_code(KC_LSFT); \ - else \ - unregister_code(KC_LSFT); \ - if (keyboard_report->mods & (MOD_BIT(KC_LCTL) | MOD_BIT(KC_RCTL))){ \ - register_code(kc2); \ - } else { \ - register_code(kc1); \ - } \ -} else { \ - unregister_code(kc1); \ - unregister_code(kc2); \ -} \ -return false; - -// Template for keys on deadkey layer (mostly Umlaute) -#define UML(kc) \ -if(record->event.pressed) { \ - timer_timeout(); \ - if (lshift || rshift) \ - register_code(KC_LSFT); \ - else \ - unregister_code(KC_LSFT); \ - register_code(kc); \ - unregister_code(kc); \ - layer_off(_DEADKEY); \ -} \ -return false; diff --git a/users/stanrc85/config.h b/users/stanrc85/config.h deleted file mode 100644 index 42306727..00000000 --- a/users/stanrc85/config.h +++ /dev/null @@ -1,9 +0,0 @@ -#pragma once - -#define TAPPING_TERM 250 -#define RETRO_TAPPING - -#ifdef RGBLIGHT_ENABLE - #define RGBLIGHT_LIMIT_VAL 175 - #define RGBLIGHT_SLEEP -#endif diff --git a/users/stanrc85/layer_rgb.c b/users/stanrc85/layer_rgb.c deleted file mode 100644 index 58f17489..00000000 --- a/users/stanrc85/layer_rgb.c +++ /dev/null @@ -1,29 +0,0 @@ -#include "stanrc85.h" - -void matrix_init_user(void) { - rgblight_setrgb(0xFF, 0x00, 0x00); -}; - -uint32_t layer_state_set_user(uint32_t state) { - switch (biton32(state)) { - case 0: - rgblight_setrgb (0xFF, 0x00, 0x00); - break; - case 1: - rgblight_setrgb (0x00, 0xFF, 0x00); - break; - case 2: - rgblight_setrgb (0x00, 0x00, 0xFF); - break; - case 3: - rgblight_setrgb (0xFF, 0xFF, 0xFF); - break; - case 4: - rgblight_setrgb (0xFF, 0x00, 0xFF); - break; - default: // for any other layers, or the default layer - rgblight_setrgb (0xFF, 0x00, 0x00); - break; - } - return state; -} diff --git a/users/stanrc85/readme.md b/users/stanrc85/readme.md deleted file mode 100644 index 9009a71d..00000000 --- a/users/stanrc85/readme.md +++ /dev/null @@ -1,52 +0,0 @@ - - -# Stanrc85's Standard ANSI 60% Layout - -Shared keymap between two 60% PCB: -- 1upkeyboards60HSE -- DZ60 (hotswap) - -## Keymap Notes -- Layer 0 is default QWERTY layout with additional custom features: - - SpaceFN to function layer 2 on `Space` - - `CTRL` when held and `ESC` when tapped on `CAPS LOCK` - - Tap Dance on `Fn1` for `CTRL+ALT+DEL` and `WIN+L` - - Tap Dance on `ESC` for `ESC` and ` ` ` - -![Base QWERTY Layer](https://imgur.com/lGcyLJx.png) - -- Layer 1 is default QWERTY with no custom features used mostly for gaming - - Enabled by `Fn2+CAPS` from base layer - -![Default ANSI Layer](https://imgur.com/M7T9PNT.png) - -- Layer 2 is Function layer: - - F keys - - Arrows - - Volume and Media controls - - AutoHotkey shortcuts based on [Speaker Control](https://github.com/stanrc85/Speaker-Control) script - - AHK Mic is used to mute/unmute microphone - - AHK Speaker switches audio output between headphones and speakers - -![Function Layer](https://imgur.com/YPl0JrU.png) - -- Layer 3 is RGB Underglow control and RESET - - `Fn2+CAPS` used to toggle Default QWERTY layer on and off - -![RGB and RESET Layer](https://imgur.com/PyB8z7k.png) - -### Build -To build the firmware file associated with this keymap, simply run `make your_keyboard:stanrc85-ansi`. diff --git a/users/stanrc85/rules.mk b/users/stanrc85/rules.mk deleted file mode 100644 index c454058b..00000000 --- a/users/stanrc85/rules.mk +++ /dev/null @@ -1,25 +0,0 @@ -TAP_DANCE_ENABLE = yes -EXTRAKEY_ENABLE = yes -BACKLIGHT_ENABLE = no -COMMAND_ENABLE = no -BOOTMAGIC_ENABLE = no -MOUSEKEY_ENABLE = no -AUDIO_ENABLE = no -CONSOLE_ENABLE = no -NKRO_ENABLE = no - -SRC += stanrc85.c - -ifeq ($(strip $(RGBLIGHT_ENABLE)), yes) - # Include my fancy rgb functions source here - SRC += layer_rgb.c -endif - -ifeq ($(strip $(KEYBOARD)), 1upkeyboards/1up60hse) - VIA_ENABLE = yes - LTO_ENABLE = yes -endif -ifeq ($(strip $(KEYBOARD)), dz60) - VIA_ENABLE = yes - LTO_ENABLE = yes -endif \ No newline at end of file diff --git a/users/stanrc85/stanrc85.c b/users/stanrc85/stanrc85.c deleted file mode 100644 index 6ea0e33b..00000000 --- a/users/stanrc85/stanrc85.c +++ /dev/null @@ -1,80 +0,0 @@ -#include "stanrc85.h" - -static td_state_t td_state; - -__attribute__ ((weak)) -bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { - return true; -} - -// determine the tapdance state to return -int cur_dance (qk_tap_dance_state_t *state) { - if (state->count == 1) { - if (state->interrupted || !state->pressed) { return SINGLE_TAP; } - else { return SINGLE_HOLD; } - } - if (state->count == 2) { return DOUBLE_TAP; } - else { return 3; } // any number higher than the maximum state value you return above -} - -// handle the possible states for each tapdance keycode you define: -void ctl_copy_finished (qk_tap_dance_state_t *state, void *user_data) { - td_state = cur_dance(state); - switch (td_state) { - case SINGLE_TAP: - SEND_STRING(SS_LCTRL("c")); - break; - case SINGLE_HOLD: - register_mods(MOD_BIT(KC_RCTL)); - break; - case DOUBLE_TAP: - SEND_STRING(SS_LCTRL("v")); - } -} - -void ctl_copy_reset (qk_tap_dance_state_t *state, void *user_data) { - switch (td_state) { - case SINGLE_TAP: - break; - case SINGLE_HOLD: - unregister_mods(MOD_BIT(KC_RCTL)); - break; - case DOUBLE_TAP: - break; - } -} - -qk_tap_dance_action_t tap_dance_actions[] = { - [TD_WIN] = ACTION_TAP_DANCE_DOUBLE(KC_CAD, KC_LOCK), - [TD_ESC] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, KC_GRV), - [TD_RCTL] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, ctl_copy_finished, ctl_copy_reset) -}; - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case KC_MAKE: - if (!record->event.pressed) { - uint8_t mods = get_mods(); - clear_mods(); - send_string_with_delay_P(PSTR("qmk compile -kb " QMK_KEYBOARD " -km " QMK_KEYMAP "\n"), 10); //New way - if (mods & MOD_MASK_SHIFT) { - send_string(SS_LGUI()); - send_string("qmk toolbox\n"); - reset_keyboard(); - } - set_mods(mods); - } - break; - case KC_RDP: //Opens Windows RDP - if (!record->event.pressed) { - register_code(KC_LGUI); - tap_code(KC_R); - unregister_code(KC_LGUI); - wait_ms(200); - send_string_with_delay_P(PSTR("mstsc"), 10); - send_string_with_delay_P(PSTR(SS_TAP(X_ENTER)), 10); - } - break; - } - return process_record_keymap(keycode, record); -} diff --git a/users/stanrc85/stanrc85.h b/users/stanrc85/stanrc85.h deleted file mode 100644 index ceb7167e..00000000 --- a/users/stanrc85/stanrc85.h +++ /dev/null @@ -1,54 +0,0 @@ -#pragma once - -#include "quantum.h" -#include "version.h" - -enum my_layers { - _NUMPAD = 0, //Macropad numpad - _NAVKEY, //Macropad nav keys - _MEDIA, //Macropad media controls - _RGB, //Macropad RGB controls - _FN1PAD, //Macropad reset and make commands - _QWERTY = 0, //Qwerty with custom shortcuts and functions - _DEFAULT, //Default ANSI for gaming, enable with FN2+RCtl - _FN1_60, //Function keys, arrows, custom shortcuts, volume control - _FN2_60 //RGB Underglow controls and RESET -}; - -//Aliases for longer keycodes -#define KC_CAD LALT(LCTL(KC_DEL)) -#define KC_LOCK LGUI(KC_L) -#define CA_QUOT LCA(KC_QUOT) -#define CA_SCLN LCA(KC_SCLN) -#define KC_CTLE LCTL_T(KC_ESC) -#define LT_SPCF LT(_FN1_60, KC_SPC) -#define TD_TESC TD(TD_ESC) -#define TD_TWIN TD(TD_WIN) -#define TD_TCTL TD(TD_RCTL) -#define CA_COPY LCTL(KC_C) -#define CA_PSTE LCTL(KC_V) - -enum cust_keys { - KC_MAKE = SAFE_RANGE, - KC_RDP -}; - -enum tap_dance { - TD_WIN, - TD_ESC, - TD_RCTL -}; - -// define a type containing as many tapdance states as you need -typedef enum { - SINGLE_TAP, - SINGLE_HOLD, - DOUBLE_TAP -} td_state_t; - -// function to determine the current tapdance state -int cur_dance (qk_tap_dance_state_t *state); - -// `finished` and `reset` functions for each tapdance keycode -void ctl_copy_finished (qk_tap_dance_state_t *state, void *user_data); -void ctl_copy_reset (qk_tap_dance_state_t *state, void *user_data); diff --git a/users/talljoe/config.h b/users/talljoe/config.h deleted file mode 100644 index 33374014..00000000 --- a/users/talljoe/config.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef USERSPACE_CONFIG_H -#define USERSPACE_CONFIG_H - -#define PERMISSIVE_HOLD - -#define RESET_LAYER 15 - -#define BOOTMAGIC_KEY_SALT KC_ESC -#define BOOTMAGIC_KEY_SKIP KC_I -#define BOOTMAGIC_KEY_EEPROM_CLEAR KC_E - -#endif // !USERSPACE_CONFIG_H diff --git a/users/talljoe/readme.md b/users/talljoe/readme.md deleted file mode 100644 index e70c5c6d..00000000 --- a/users/talljoe/readme.md +++ /dev/null @@ -1,7 +0,0 @@ -Copyright 2018 Joe Wasson @talljoe - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/users/talljoe/rules.mk b/users/talljoe/rules.mk deleted file mode 100644 index e0a71561..00000000 --- a/users/talljoe/rules.mk +++ /dev/null @@ -1,9 +0,0 @@ -SRC += talljoe.c tapdance.c - -EXTRAFLAGS+=-flto - -TAP_DANCE_ENABLE=yes -CONSOLE_ENABLE=no -COMMAND_ENABLE=no -DYNAMIC_KEYMAP_ENABLE=no -BOOTMAGIC_ENABLE=full diff --git a/users/talljoe/talljoe.c b/users/talljoe/talljoe.c deleted file mode 100644 index a533ff61..00000000 --- a/users/talljoe/talljoe.c +++ /dev/null @@ -1,179 +0,0 @@ -#include QMK_KEYBOARD_H - -#include "talljoe.h" -#ifdef ZEAL_RGB -#include "../../../keyboards/wilba_tech/wt_rgb_backlight.h" -#endif - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_BASE] = TEMPLATE_TKL( - KC_ESC, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_PSCR, KC_SLCK, MO_ADJ , - US_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_MINS, KC_EQL , US_BSLS, KC_INS , KC_HOME, KC_PGUP, - US_TAB , KC_Q, KC_W, KC_E, KC_R, KC_T , KC_Y, KC_U, KC_I, KC_O, KC_P , KC_LBRC, KC_RBRC, KC_BSPC, KC_DEL , KC_END , KC_PGDN, - CTL_ESC, KC_A, KC_S, KC_D, KC_F, KC_G , KC_H, KC_J, KC_K, KC_L, US_SCLN, KC_QUOT, US_ENT , - SH_LBRC, KC_Z, KC_X, KC_C, KC_V, KC_B , KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SH_RBRC, KC_UP , - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC2, KC_SPC1, KC_SPC3, KC_RALT, KC_RGUI, KC_RCTL, KC_PTT , KC_LEFT, KC_DOWN, KC_RGHT), - [_WORKMAN] = TEMPLATE( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, KC_Q , KC_D , KC_R , KC_W , KC_B , KC_J , KC_F , KC_U , KC_P , US_SCLN, _______, _______, _______, - _______, KC_A , KC_S , KC_H , KC_T , KC_G , KC_Y , KC_N , KC_E , KC_O , KC_I , _______, _______, - _______, KC_Z , KC_X , KC_M , KC_C , KC_V , KC_K , KC_L , KC_COMM, KC_DOT , KC_SLSH, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), - [_NORMAN] = TEMPLATE( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, KC_Q , KC_W , KC_D , KC_F , KC_K , KC_J , KC_U , KC_R , KC_L , US_SCLN, _______, _______, _______, - _______, KC_A , KC_S , KC_E , KC_T , KC_G , KC_Y , KC_N , KC_I , KC_O , KC_H , _______, _______, - _______, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_P , KC_M , KC_COMM, KC_DOT , KC_SLSH, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), - [_DVORAK] = TEMPLATE( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, _______, _______, - _______, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y , KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL , _______, - _______, KC_A, KC_O, KC_E, KC_U, KC_I , KC_D, KC_H, KC_T, KC_N, KC_S, US_MINS, _______, - _______, US_SCLN, KC_Q, KC_J, KC_K, KC_X , KC_B, KC_M, KC_W, KC_V, KC_Z, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), - [_COLMAK] = TEMPLATE( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, KC_Q, KC_W, KC_F, KC_P, KC_G , KC_J, KC_L, KC_U, KC_Y, US_SCLN, _______, _______, _______, - _______, KC_A, KC_R, KC_S, KC_T, KC_D , KC_H, KC_N, KC_E, KC_I, KC_O , _______, _______, - _______, KC_Z, KC_X, KC_C, KC_V, KC_B , KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), -#if (SPACE_COUNT > 1) - // A tweaked version of the Maltron layout - [_MALTROFF] = TEMPLATE( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, KC_Q, KC_P, KC_Y, KC_G, KC_B , KC_J, KC_M, KC_U, KC_K, KC_L, _______, _______, _______, - _______, KC_A, KC_N, KC_I, KC_S, KC_F , KC_D, KC_T, KC_H, KC_O, KC_R , US_ENT , KC_BSPC, - _______, KC_Z, KC_X, KC_C, KC_V, US_QUOT, KC_SCLN, KC_W, KC_COMM, KC_DOT, KC_SLSH, _______, _______, - _______, _______, _______, MLT_E , _______, _______, _______, _______, _______, _______), -#endif -#ifdef ENABLE_GAME_LAYER - [_GAME] = TEMPLATE( - KC_ESC , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_MINS, KC_EQL , KC_BSLS, KC_GRV, - KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_LBRC, KC_RBRC, KC_BSPC, - MO_NAV , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT, KC_ENT , - KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, MO_ADJ , - KC_LCTL, KC_PTT , KC_PGDN, KC_SPC , KC_SPC , KC_SPC , KC_RALT, KC_APP , KC_RCTL, KC_PTT ), -#endif - [_NAV] = TEMPLATE_NAV( - KC_GRV , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , XXXXXXX, XXXXXXX, - US_TAB , KC_EXLM, KC_AT , KC_HASH, KC_DLR , KC_PERC, KC_INS , KC_PGUP, KC_UP , KC_PGDN, KC_BTN1, KC_BTN3, KC_BTN2, KC_DEL , - CTL_ESC, KC_LCBR, KC_RCBR, KC_LPRN, KC_RPRN, KC_AMPR, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END , US_QUOT, TG_ADJ , - KC_LSFT, KC_EQL, KC_PLUS, KC_MINS, KC_UNDS, KC_ASTR, KC_CALC, US_GRV , KC_WBAK, KC_WFWD, KC_WREF, KC_RSFT, KC_APP , - KC_LCTL, KC_LGUI, KC_LALT, NV_SPC2, NV_SPC1, NV_SPC3, KC_RALT, KC_RGUI, KC_RCTL, KC_PTT ), - [_NUM] = TEMPLATE_NUM( - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - KC_GRV , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_VOLU, KC_CIRC, KC_7, KC_8, KC_9, KC_PMNS, XXXXXXX, XXXXXXX, KC_DEL , - CTL_ESC, KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_MUTE, KC_PENT, KC_4, KC_5, KC_6, KC_PPLS, XXXXXXX, KC_ENT , - KC_LSFT, KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_VOLD, KC_PIPE, KC_1, KC_2, KC_3, KC_PAST, KC_PSLS, TG_NUM , - KC_LCTL, KC_LGUI, KC_LALT, NM_SPC2, NM_SPC1, NM_SPC3, KC_PDOT, KC_PCMM, KC_RCTL, KC_PTT ), - // Adjust layer is on the split-shift key; or NAV+Enter (for non-split keyboards) - [_ADJUST] = TEMPLATE_ADJUST( - MO_RST , FX(1) , FX(2) , FX(3) , FX(4) , FX(5) , FX(6) , FX(7) , FX(8) , FX(9) , FX(10) , BR_DEC , BR_INC , XXXXXXX, MO_RST , - MO_RST , H1_INC , S1_INC , H2_INC , S2_INC , EF_INC , RGB_HUI, RGB_SAI, RGB_MOD, RGB_M_P, DFAULTS, RGB_VAD, RGB_VAI, MO_RST , - XXXXXXX, H1_DEC , S1_DEC , H2_DEC , S2_DEC , EF_DEC , RGB_HUD, RGB_SAD, RGB_RMOD,RGB_M_K, RGB_M_B, RGB_M_G, TG_ADJ , - TG_NKRO, LY_QWER, LY_WORK, LY_NRMN, LY_DVRK, LY_CLMK, XXXXXXX, LY_MALT, XXXXXXX, XXXXXXX, KC_MAKE, KC_CAPS, XXXXXXX, - MO_RST , AG_SWAP, AG_NORM, XXXXXXX, BL_TOGG, XXXXXXX, RGB_TOG, XXXXXXX, XXXXXXX, TG_GAME), - // To Reset hit FN + ` + Esc - [_RESET] = TEMPLATE_RESET, -}; - -void matrix_scan_user(void) { - #ifdef KEYBOARD_gh60 - if (IS_LAYER_ON(_GAME)) { - gh60_wasd_leds_on(); - } else { - gh60_wasd_leds_off(); - } - #endif -} - -void matrix_init_user(void) { - if (!eeconfig_is_enabled()) { - eeconfig_init(); - } -} - -uint32_t default_layer_state_set_kb(uint32_t state) { - // persist changes to default layers - eeconfig_update_default_layer(state); - return state; -} - -__attribute__ ((weak)) -bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { - return true; -} - -#ifdef ZEAL_RGB -extern backlight_config g_config; -#endif -bool process_record_user(uint16_t keycode, keyrecord_t *record) { -#ifdef ZEAL_RGB - static uint8_t last_effect; -#endif - -#ifdef RGBLIGHT_ENABLE - static uint32_t savedRgbMode; - static uint16_t savedHue; - static uint8_t savedSat; - static uint8_t savedVal; - - if (keycode == KC_ESC) { - if (record->event.pressed) { - savedRgbMode = rgblight_get_mode(); - savedHue = rgblight_get_hue(); - savedSat = rgblight_get_sat(); - savedVal = rgblight_get_val(); - rgblight_mode(1); - rgblight_setrgb(255, 0, 0); - } else { - rgblight_mode(savedRgbMode); - rgblight_sethsv(savedHue, savedSat, savedVal); - } - } -#endif -// If console is enabled, it will print the matrix position and status of each key pressed -#ifdef CONSOLE_ENABLE - xprintf("KL: row: %u, column: %u, pressed: %u\n", record->event.key.row, record->event.key.col, record->event.pressed); -#endif //CONSOLE_ENABLE - - switch (keycode) { - case KC_MAKE: // Compiles the firmware, and adds the flash command based on keyboard bootloader - if (!record->event.pressed) { - SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP - - #if defined(BOOTLOADER_HALFKAY) - ":teensy" - #elif defined(BOOTLOADER_CATERINA) - ":avrdude" - #else - ":dfu" - #endif - SS_TAP(X_ENTER)); - } - return false; - break; -#ifdef ZEAL_RGB - case BL_TOGG: - if (IS_PRESSED(record->event)) { - if (g_config.effect) { - last_effect = g_config.effect; - g_config.effect = 0; - } else { - g_config.effect = last_effect; - } - } - return false; - case EFFECT...EFFECT_END: - if (IS_PRESSED(record->event)) { - uint8_t effect = keycode - EFFECT; - if(effect == g_config.effect) - effect = 0; // Toggle effect on second press - g_config.effect = effect; - backlight_config_save(); - } - return false; -#endif - } - return process_record_keymap(keycode, record); -} diff --git a/users/talljoe/talljoe.h b/users/talljoe/talljoe.h deleted file mode 100644 index 496a6222..00000000 --- a/users/talljoe/talljoe.h +++ /dev/null @@ -1,199 +0,0 @@ -#ifndef USERSPACE -#define USERSPACE - -#include "quantum.h" - -enum userspace_custom_keycodes { - KC_MAKE = SAFE_RANGE, // can always be here - DFAULTS, - TOGGLE_BACKLIGHT, - EFFECT, - EFFECT_END = EFFECT + 20 -}; - -#ifndef RESET_LAYER -#define RESET_LAYER 15 -#endif - -enum layers { - _BASE = 0, - _WORKMAN, - _NORMAN, - _DVORAK, - _COLMAK, - _MALTROFF, - _GAME, - _NAV, - _NUM, - _ADJUST, - _RESET = RESET_LAYER, -}; - -enum tap_dancers { - TD_SEMICOLON, - TD_GRAVE, - TD_QUOTE, -}; - -#define MO_NAV MO(_NAV) -#define MO_ADJ MO(_ADJUST) -#define MO_RST MO(_RESET) -#define TG_ADJ TG(_ADJUST) -#define TG_NUM TG(_NUM) -#ifdef ENABLE_GAME_LAYER - #define TG_GAME TG(_GAME) -#else - #define TG_GAME KC_NO -#endif -#define LY_QWER DF(_BASE) -#define LY_WORK DF(_WORKMAN) -#define LY_NRMN DF(_NORMAN) -#define LY_DVRK DF(_DVORAK) -#define LY_CLMK DF(_COLMAK) -#if SPACE_COUNT >= 2 - #define LY_MALT DF(_MALTROFF) -#else - #define LY_MALT KC_NO -#endif -#define TG_NKRO MAGIC_TOGGLE_NKRO -#define KC_PTT KC_F24 -#define MS_MID KC_MS_BTN3 -#define FX(x) (EFFECT + x) - -#define CTL_ESC CTL_T(KC_ESC) -#define US_ENT RCTL_T(KC_ENT) -#define US_MINS RCTL_T(KC_QUOT) -#define US_BSLS LCA_T(KC_BSLS) -#define US_SCLN TD(TD_SEMICOLON) -#define US_GRV TD(TD_GRAVE) -#define US_QUOT TD(TD_QUOTE) -#define US_TAB C_S_T(KC_TAB) -#define SH_LBRC LSFT_T(KC_LBRC) -#define SH_RBRC RSFT_T(KC_RBRC) - -#define MLT_E LT(_NUM, KC_E) - -#ifndef SPACE_COUNT - #define SPACE_COUNT 1 -#endif -#if (SPACE_COUNT == 1) - #define KC_SPC1 LT(_NAV, KC_SPC) - #define KC_SPC2 XXXXXXX - #define KC_SPC3 XXXXXXX - - #define NV_SPC1 _______ - #define NV_SPC2 _______ - #define NV_SPC3 _______ - - #define NM_SPC1 _______ - #define NM_SPC2 _______ - #define NM_SPC3 _______ -#elif (SPACE_COUNT == 2) - #define KC_SPC1 LT(_NAV,KC_SPC) - #define KC_SPC2 LT(_NUM,KC_ENT) - - #define NV_SPC1 KC_SPC - #define NV_SPC2 KC_ENT - - #define NM_SPC1 KC_0 - #define NM_SPC2 KC_SPC - - #define KC_SPC3 XXXXXXX - #define NV_SPC3 XXXXXXX - #define NM_SPC3 XXXXXXX -#elif (SPACE_COUNT == 3) - #ifdef SWAP_HANDS_ENABLE - #define KC_SPC1 SH_T(KC_BSPC) - #else - #define KC_SPC1 KC_BSPC - #endif - #define KC_SPC2 LT(_NUM,KC_ENT) - #define KC_SPC3 LT(_NAV,KC_SPC) - - #define NV_SPC1 KC_SPC - #define NV_SPC2 KC_ENT - #define NV_SPC3 KC_SPC - - #define NM_SPC1 KC_SPC - #define NM_SPC2 XXXXXXX - #define NM_SPC3 KC_0 -#else - #error "Unsupported space count:" SPACE_COUNT -#endif - -#ifndef ZEAL_RGB - #define BR_INC KC_NO - #define BR_DEC KC_NO - #define EF_INC KC_NO - #define EF_DEC KC_NO - #define ES_INC KC_NO - #define ES_DEC KC_NO - #define H1_INC KC_NO - #define H1_DEC KC_NO - #define S1_INC KC_NO - #define S1_DEC KC_NO - #define H2_INC KC_NO - #define H2_DEC KC_NO - #define S2_INC KC_NO - #define S2_DEC KC_NO - #define FN_MO13 KC_NO - #define FN_MO2 KC_NO -#endif - -#ifndef TEMPLATE - #define _X_ KC_NO - #define TEMPLATE( \ - KJ4, KJ7, KI7, KH7, KG7, KG4, KF4, KF7, KE7, KD7, KR7, KR4, KE4, KB2, KJ6, \ - KJ2, KJ5, KI5, KH5, KG5, KG2, KF2, KF5, KE5, KD5, KR5, KR2, KE2, KB3, \ - KI2, KJ3, KI3, KH3, KG3, KG6, KF6, KF3, KE3, KD3, KR3, KR6, KB1, \ - KN2, KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KN3, KA5, \ - KA4, KP2, KC6, KX1, KK6, KX2, KC0, KM3, KD0, KA1 \ - ) TEMPLATE_TKL ( \ - KJ6, _X_, _X_, _X_, _X_, _X_, _X_, _X_, _X_, _X_, _X_, _X_, _X_, _X_, _X_, KA5, \ - KJ4, KJ7, KI7, KH7, KG7, KG4, KF4, KF7, KE7, KD7, KR7, KR4, KE4, KB2, _X_, _X_, _X_, \ - KJ2, KJ5, KI5, KH5, KG5, KG2, KF2, KF5, KE5, KD5, KR5, KR2, KE2, KB3, _X_, _X_, _X_, \ - KI2, KJ3, KI3, KH3, KG3, KG6, KF6, KF3, KE3, KD3, KR3, KR6, KB1, \ - KN2, KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KN3, _X_, \ - KA4, KP2, KC6, KX1, KK6, KX2, KC0, KM3, KD0, KA1, _X_, _X_, _X_ \ - ) -#endif -#ifndef TEMPLATE_TKL - #define TEMPLATE_TKL( \ - KJ6, KI4, KH4, KH2, KH6, KA7, KE6, KD2, KD4, KB4, KB7, KB6, KB0, KC7, KC5, KA5, \ - KJ4, KJ7, KI7, KH7, KG7, KG4, KF4, KF7, KE7, KD7, KR7, KR4, KE4, KB2, KL4, KO4, KQ4, \ - KJ2, KJ5, KI5, KH5, KG5, KG2, KF2, KF5, KE5, KD5, KR5, KR2, KE2, KB3, KK4, KO7, KQ7, \ - KI2, KJ3, KI3, KH3, KG3, KG6, KF6, KF3, KE3, KD3, KR3, KR6, KB1, \ - KN2, KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KN3, KO6, \ - KA4, KP2, KC6, KX1, KK6, KX2, KC0, KM3, KD0, KA1, KO0, KK0, KL0 \ - ) TEMPLATE( \ - KJ4, KJ7, KI7, KH7, KG7, KG4, KF4, KF7, KE7, KD7, KR7, KR4, KE4, KB2, KJ6, \ - KJ2, KJ5, KI5, KH5, KG5, KG2, KF2, KF5, KE5, KD5, KR5, KR2, KE2, KB3, \ - KI2, KJ3, KI3, KH3, KG3, KG6, KF6, KF3, KE3, KD3, KR3, KR6, KB1, \ - KN2, KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KN3, KA5, \ - KA4, KP2, KC6, KX1, KK6, KX2, KC0, KM3, KD0, KA1 \ - ) -#endif - -#ifndef TEMPLATE_ALT - #define TEMPLATE_ALT TEMPLATE -#endif -#ifndef TEMPLATE_NUM - #define TEMPLATE_NUM TEMPLATE_ALT -#endif -#ifndef TEMPLATE_NAV - #define TEMPLATE_NAV TEMPLATE_ALT -#endif -#ifndef TEMPLATE_ADJUST - #define TEMPLATE_ADJUST TEMPLATE_ALT -#endif - -#ifndef TEMPLATE_RESET - #define TEMPLATE_RESET TEMPLATE_ALT( \ - RESET , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET , \ - RESET , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET , \ - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ - RESET , XXXXXXX, XXXXXXX, XXXXXXX, RESET , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX) -#endif - -#endif diff --git a/users/talljoe/tapdance.c b/users/talljoe/tapdance.c deleted file mode 100644 index c4d6025f..00000000 --- a/users/talljoe/tapdance.c +++ /dev/null @@ -1,146 +0,0 @@ -//Tap Dance -#include "talljoe.h" - -enum { - SINGLE_TAP = 1, - SINGLE_HOLD = 2, - DOUBLE_TAP = 3, - DOUBLE_HOLD = 4, - DOUBLE_SINGLE_TAP = 5, //send two single taps - TRIPLE_TAP = 6, - TRIPLE_HOLD = 7, - SPECIAL = 8 -}; - -static struct { - int quote; - int semicolon; -} tap_state = {0}; - -int cur_dance (qk_tap_dance_state_t *state) { - if (state->count == 1) { - //If count = 1, and it has been interrupted - it doesn't matter if it is pressed or not: Send SINGLE_TAP - if (state->interrupted) { - // if (!state->pressed) return SINGLE_TAP; - //need "permissive hold" here. - // else return SINGLE_HOLD; - //If the interrupting key is released before the tap-dance key, then it is a single HOLD - //However, if the tap-dance key is released first, then it is a single TAP - //But how to get access to the state of the interrupting key???? - return SINGLE_TAP; - } - else { - if (!state->pressed) return SINGLE_TAP; - else return SINGLE_HOLD; - } - } - //If count = 2, and it has been interrupted - assume that user is trying to type the letter associated - //with single tap. - else if (state->count == 2) { - if (state->interrupted) return DOUBLE_SINGLE_TAP; - else if (state->pressed) return DOUBLE_HOLD; - else return DOUBLE_TAP; - } - else if ((state->count == 3) && ((state->interrupted) || (!state->pressed))) return TRIPLE_TAP; - else if (state->count == 3) return TRIPLE_HOLD; - else return SPECIAL; -} - -int hold_cur_dance (qk_tap_dance_state_t *state) { - if (state->count == 1) { - if (state->interrupted) { - if (!state->pressed) return SINGLE_TAP; - else return SINGLE_HOLD; - } - else { - if (!state->pressed) return SINGLE_TAP; - else return SINGLE_HOLD; - } - } - //If count = 2, and it has been interrupted - assume that user is trying to type the letter associated - //with single tap. - else if (state->count == 2) { - if (state->pressed) return DOUBLE_HOLD; - else return DOUBLE_TAP; - } - else if (state->count == 3) { - if (!state->pressed) return TRIPLE_TAP; - else return TRIPLE_HOLD; - } - else return SPECIAL; -} - -// Send semi-colon + enter on two taps -void tap_dance_semicolon_finished(qk_tap_dance_state_t *state, void *user_data) { - tap_state.semicolon = hold_cur_dance(state); - switch (tap_state.semicolon) { - case SINGLE_TAP: case DOUBLE_HOLD: register_code(KC_SCLN); break; - case SINGLE_HOLD: layer_on(_NUM); break; - } -} - -void tap_dance_semicolon_reset(qk_tap_dance_state_t *state, void *user_data) { - switch (tap_state.semicolon) { - case SINGLE_TAP: case DOUBLE_HOLD: unregister_code(KC_SCLN); break; - case DOUBLE_TAP: { - if (get_mods()) { - SEND_STRING(";;"); // send normal when mods are pressed - } - else { - SEND_STRING(";\n"); - } - break; - } - case TRIPLE_TAP: { - SEND_STRING(";\n\n"); - } - case SPECIAL: layer_invert(_NUM); break; - case SINGLE_HOLD: layer_off(_NUM); break; - } - tap_state.semicolon = 0; -} - -// Send `. ~. ``` -void tap_dance_grave_finished(qk_tap_dance_state_t *state, void *user_data) { - switch(state->count) { - case 1: - SEND_STRING("`"); - break; - case 2: - SEND_STRING("~"); - break; - } -} - -void tap_dance_grave_each(qk_tap_dance_state_t *state, void *user_data) { - if(state->count == 3) { - SEND_STRING("```"); - } else if (state->count > 3) { - SEND_STRING("`"); - } -} - - -void tap_dance_quote_finished(qk_tap_dance_state_t *state, void *user_data) { - tap_state.quote = hold_cur_dance(state); - switch (tap_state.quote) { - case SINGLE_TAP: case DOUBLE_HOLD: register_code(KC_QUOT); break; - case SINGLE_HOLD: layer_on(_NAV); break; - } -} - -void tap_dance_quote_reset(qk_tap_dance_state_t *state, void *user_data) { - switch (tap_state.quote) { - case SINGLE_TAP: case DOUBLE_HOLD: unregister_code(KC_QUOTE); break; - case DOUBLE_TAP: SEND_STRING("\""); break; - case TRIPLE_TAP: layer_invert(_NAV); break; - case SINGLE_HOLD: layer_off(_NAV); break; - } - tap_state.quote = 0; -} - -qk_tap_dance_action_t tap_dance_actions[] = { - [TD_SEMICOLON] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, tap_dance_semicolon_finished, tap_dance_semicolon_reset), - [TD_GRAVE] = ACTION_TAP_DANCE_FN_ADVANCED(tap_dance_grave_each, tap_dance_grave_finished, NULL), - [TD_QUOTE] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, tap_dance_quote_finished, tap_dance_quote_reset), -}; diff --git a/users/tominabox1/.gitignore b/users/tominabox1/.gitignore deleted file mode 100644 index 62a86669..00000000 --- a/users/tominabox1/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -*.bmp -*.py diff --git a/users/tominabox1/config.h b/users/tominabox1/config.h deleted file mode 100644 index 2a8c1e94..00000000 --- a/users/tominabox1/config.h +++ /dev/null @@ -1,80 +0,0 @@ -#pragma once - -// Tapping term settings -#define TAPPING_TERM_PER_KEY -#define TAP_HOLD_CAPS_DELAY 350 -#define BOOTMAGIC_KEY_SALT KC_BSPACE -#define BOOTMAGIC_KEY_EEPROM_CLEAR KC_Q - -// OLED settings -#define OLED_FONT_H "users/tominabox1/doug.c" -#define OLED_DISABLE_TIMEOUT - -#define DEBOUNCE 5 - -// Setup RGB settings for the Dimple. -#ifdef KEYBOARD_lazydesigners_dimple - #ifdef RGBLIGHT_ENABLE - #undef RGBLED_NUM - #define RGBLED_NUM 50 - #define RGBLIGHT_ANIMATIONS - #define RGBLIGHT_SLEEP - #endif // RGBLIGHT_ENABLE - - #ifdef RGB_MATRIX_ENABLE - #undef RGBLED_NUM - #define RGBLED_NUM 50 - #define DRIVER_LED_TOTAL RGBLED_NUM - #endif // RGBL_MATRIX_ENABLE -#endif // KEYBOARD_lazydesigners_dimple - -// RGB_Matrix settings -#ifdef RGB_MATRIX_ENABLE - #define RGB_MATRIX_KEYPRESSES // reacts to keypresses - #define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended - #define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) - #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash. - #define RGB_MATRIX_HUE_STEP 8 - #define RGB_MATRIX_SAT_STEP 8 - #define RGB_MATRIX_VAL_STEP 8 - #define RGB_MATRIX_SPD_STEP 10 - #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_LEFT_RIGHT - /* Disable the animations you don't want/need. You will need to disable a good number of these - because they take up a lot of space. Disable until you can successfully compile your firmware. */ - // #define DISABLE_RGB_MATRIX_ALPHAS_MODS - // #define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN - #define DISABLE_RGB_MATRIX_BREATHING - // #define DISABLE_RGB_MATRIX_CYCLE_ALL - // #define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT - // #define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN - // #define DISABLE_RGB_MATRIX_CYCLE_OUT_IN - // #define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL - #define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON - #define DISABLE_RGB_MATRIX_DUAL_BEACON - #define DISABLE_RGB_MATRIX_RAINBOW_BEACON - #define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS - // #define DISABLE_RGB_MATRIX_RAINDROPS - #define DISABLE_RGB_MATRIX_JELLYBEN_RAINDROPS - // # define DISABLE_RGB_MATRIX_TYPING_HEATMAP - #define DISABLE_RGB_MATRIX_DIGITAL_RAIN - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE - // #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE - // #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS - // #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS - #define DISABLE_RGB_MATRIX_SPLASH - #define DISABLE_RGB_MATRIX_MULTISPLASH - #define DISABLE_RGB_MATRIX_SOLID_SPLASH - #define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH -#endif //RGB_MATRIX_ENABLE - -// Hex size reduction options -#ifndef NO_DEBUG - #define NO_DEBUG -#endif // !NO_DEBUG -#if !defined(NO_PRINT) && !defined(CONSOLE_ENABLE) - #define NO_PRINT -#endif // !NO_PRINT -#define NO_ACTION_ONESHOT diff --git a/users/tominabox1/dimple_rgb.c b/users/tominabox1/dimple_rgb.c deleted file mode 100644 index 49d95eb4..00000000 --- a/users/tominabox1/dimple_rgb.c +++ /dev/null @@ -1,433 +0,0 @@ -#include "dz60rgb.h" -#include "config.h" -#if defined (dzrgb60_iso) -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { - {0, K_14, J_14, L_14}, - {0, K_13, J_13, L_13}, - {0, K_12, J_12, L_12}, - {0, K_11, J_11, L_11}, - {0, K_10, J_10, L_10}, - {0, K_9, J_9, L_9}, - {0, K_8, J_8, L_8}, - {0, K_7, J_7, L_7}, - {0, K_6, J_6, L_6}, - {0, K_5, J_5, L_5}, - {0, K_4, J_4, L_4}, - {0, K_3, J_3, L_3}, - {0, K_2, J_2, L_2}, - {0, K_1, J_1, L_1}, - {0, H_15, G_15, I_15}, - {0, H_13, G_13, I_13}, - {0, H_12, G_12, I_12}, - {0, H_11, G_11, I_11}, - {0, H_10, G_10, I_10}, - {0, H_9, G_9, I_9}, - {0, H_8, G_8, I_8}, - {0, H_7, G_7, I_7}, - {0, H_6, G_6, I_6}, - {0, H_5, G_5, I_5}, - {0, H_4, G_4, I_4}, - {0, H_3, G_3, I_3}, - {0, H_2, G_2, I_2}, - {0, H_1, G_1, I_1}, - {0, B_14, A_14, C_14}, - {0, E_12, D_12, F_12}, - {0, E_11, D_11, F_11}, - {0, E_10, D_10, F_10}, - {0, E_9, D_9, F_9}, - {0, E_8, D_8, F_8}, - {0, E_7, D_7, F_7}, - {0, E_6, D_6, F_6}, - {0, E_5, D_5, F_5}, - {0, E_4, D_4, F_4}, - {0, E_3, D_3, F_3}, - {0, E_2, D_2, F_2}, - {0, E_1, D_1, F_1}, - {0, B_13, A_13, C_13}, - {0, B_11, A_11, C_11}, - {0, B_10, A_10, C_10}, - {0, B_9, A_9, C_9}, - {0, B_8, A_8, C_8}, - {0, B_7, A_7, C_7}, - {0, B_6, A_6, C_6}, - {0, B_5, A_5, C_5}, - {0, B_4, A_4, C_4}, - {0, B_3, A_3, C_3}, - {0, B_2, A_2, C_2}, - {0, B_1, A_1, C_1}, - {0, B_15, A_15, C_15}, - {0, E_13, D_13, F_13}, - {0, B_12, A_12, C_12}, - {0, E_15, D_15, F_15}, - {0, B_16, A_16, C_16}, - {0, E_16, D_16, F_16}, - {0, H_16, G_16, I_16}, - {0, K_16, J_16, L_16}, -}; - -led_config_t g_led_config = { { - { 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }, - { 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 28 }, - { 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, NO_LED, 14 }, - { 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, NO_LED, NO_LED }, - { 60, 59, 58, NO_LED, NO_LED, 57, NO_LED, NO_LED, NO_LED, 56, 55, 54, NO_LED, 53 } -}, { - { 216, 0 }, { 192, 0 }, { 176, 0 }, { 160, 0 }, { 144, 0 }, { 128, 0 }, { 112, 0 }, { 96, 0 }, { 80, 0 }, { 64, 0 }, { 48, 0 }, { 32, 0 }, { 16, 0 }, { 0, 0 }, - { 220, 24 }, { 200, 16 }, { 184, 16 }, { 168, 16 }, { 152, 16 }, { 136, 16 }, { 120, 16 }, { 104, 16 }, { 88, 16 }, { 72, 16 }, { 56, 16 }, { 40, 16 }, { 24, 16 }, { 4, 16 }, - { 204, 32 }, { 188, 32 }, { 172, 32 }, { 156, 32 }, { 140, 32 }, { 124, 32 }, { 108, 32 }, { 92, 32 }, { 76, 32 }, { 60, 32 }, { 44, 32 }, { 28, 32 }, { 6, 32 }, { 210, 48 }, - { 180, 48 }, { 164, 48 }, { 148, 48 }, { 132, 48 }, { 116, 48 }, { 100, 48 }, { 84, 48 }, { 68, 48 }, { 52, 48 }, { 20, 48 }, { 10, 48 }, { 222, 64 }, { 202, 64 }, { 182, 64 }, - { 162, 64 }, { 102, 64 }, { 42, 64 }, { 22, 64 }, { 2, 64 } -}, { - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 1, - 1, 4, 1, 1, 1 -} }; - -#elif defined (dzrgb60_hhkb) -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { - {0, H_15, G_15, I_15}, - {0, K_14, J_14, L_14}, - {0, K_13, J_13, L_13}, - {0, K_12, J_12, L_12}, - {0, K_11, J_11, L_11}, - {0, K_10, J_10, L_10}, - {0, K_9, J_9, L_9}, - {0, K_8, J_8, L_8}, - {0, K_7, J_7, L_7}, - {0, K_6, J_6, L_6}, - {0, K_5, J_5, L_5}, - {0, K_4, J_4, L_4}, - {0, K_3, J_3, L_3}, - {0, K_2, J_2, L_2}, - {0, K_1, J_1, L_1}, - {0, H_14, G_14, I_14}, - {0, H_13, G_13, I_13}, - {0, H_12, G_12, I_12}, - {0, H_11, G_11, I_11}, - {0, H_10, G_10, I_10}, - {0, H_9, G_9, I_9}, - {0, H_8, G_8, I_8}, - {0, H_7, G_7, I_7}, - {0, H_6, G_6, I_6}, - {0, H_5, G_5, I_5}, - {0, H_4, G_4, I_4}, - {0, H_3, G_3, I_3}, - {0, H_2, G_2, I_2}, - {0, H_1, G_1, I_1}, - {0, E_14, D_14, F_14}, - {0, E_12, D_12, F_12}, - {0, E_11, D_11, F_11}, - {0, E_10, D_10, F_10}, - {0, E_9, D_9, F_9}, - {0, E_8, D_8, F_8}, - {0, E_7, D_7, F_7}, - {0, E_6, D_6, F_6}, - {0, E_5, D_5, F_5}, - {0, E_4, D_4, F_4}, - {0, E_3, D_3, F_3}, - {0, E_2, D_2, F_2}, - {0, E_1, D_1, F_1}, - {0, B_14, A_14, C_14}, - {0, B_13, A_13, C_13}, - {0, B_11, A_11, C_11}, - {0, B_10, A_10, C_10}, - {0, B_9, A_9, C_9}, - {0, B_8, A_8, C_8}, - {0, B_7, A_7, C_7}, - {0, B_6, A_6, C_6}, - {0, B_5, A_5, C_5}, - {0, B_4, A_4, C_4}, - {0, B_3, A_3, C_3}, - {0, B_2, A_2, C_2}, - {0, B_1, A_1, C_1}, - {0, B_15, A_15, C_15}, - {0, E_13, D_13, F_13}, - {0, B_12, A_12, C_12}, - {0, B_16, A_16, C_16}, - {0, E_16, D_16, F_16}, - {0, H_16, G_16, I_16}, - {0, K_16, J_16, L_16}, -}; - -led_config_t g_led_config = { { - { 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1 }, - { 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15 }, - { 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 0, 29 }, - { 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, NO_LED, 42 }, - { 61, 60, 59, NO_LED, NO_LED, 58, NO_LED, NO_LED, NO_LED, NO_LED, 57, 56, NO_LED, 55 } -}, { - { 224, 0 }, { 208, 0 }, { 192, 0 }, { 176, 0 }, { 160, 0 }, { 144, 0 }, { 128, 0 }, { 112, 0 }, { 96, 0 }, { 80, 0 }, { 64, 0 }, { 48, 0 }, { 32, 0 }, { 16, 0 }, - { 0, 0 }, { 220, 16 }, { 200, 16 }, { 184, 16 }, { 168, 16 }, { 152, 16 }, { 136, 16 }, { 120, 16 }, { 104, 16 }, { 88, 16 }, { 72, 16 }, { 56, 16 }, { 40, 16 }, { 24, 16 }, - { 4, 16 }, { 204, 32 }, { 188, 32 }, { 172, 32 }, { 156, 32 }, { 140, 32 }, { 124, 32 }, { 108, 32 }, { 92, 32 }, { 76, 32 }, { 60, 32 }, { 44, 32 }, { 28, 32 }, { 6, 32 }, - { 224, 48 }, { 202, 48 }, { 180, 48 }, { 164, 48 }, { 148, 48 }, { 132, 48 }, { 116, 48 }, { 100, 48 }, { 84, 48 }, { 68, 48 }, { 52, 48 }, { 20, 48 }, { 10, 48 }, { 218, 64 }, - { 198, 64 }, { 178, 64 }, { 112, 64 }, { 46, 64 }, { 26, 64 }, { 6, 64 } -}, { - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, - 1, 1, 4, 1, 1, 1 -} }; - -#elif defined (dzrgb60_hhkb_iso) -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { - {0, H_15, G_15, I_15}, - {0, K_14, J_14, L_14}, - {0, K_13, J_13, L_13}, - {0, K_12, J_12, L_12}, - {0, K_11, J_11, L_11}, - {0, K_10, J_10, L_10}, - {0, K_9, J_9, L_9}, - {0, K_8, J_8, L_8}, - {0, K_7, J_7, L_7}, - {0, K_6, J_6, L_6}, - {0, K_5, J_5, L_5}, - {0, K_4, J_4, L_4}, - {0, K_3, J_3, L_3}, - {0, K_2, J_2, L_2}, - {0, K_1, J_1, L_1}, - {0, K_15, J_15, L_15}, - {0, H_13, G_13, I_13}, - {0, H_12, G_12, I_12}, - {0, H_11, G_11, I_11}, - {0, H_10, G_10, I_10}, - {0, H_9, G_9, I_9}, - {0, H_8, G_8, I_8}, - {0, H_7, G_7, I_7}, - {0, H_6, G_6, I_6}, - {0, H_5, G_5, I_5}, - {0, H_4, G_4, I_4}, - {0, H_3, G_3, I_3}, - {0, H_2, G_2, I_2}, - {0, H_1, G_1, I_1}, - {0, E_15, D_15, F_15}, - {0, E_12, D_12, F_12}, - {0, E_11, D_11, F_11}, - {0, E_10, D_10, F_10}, - {0, E_9, D_9, F_9}, - {0, E_8, D_8, F_8}, - {0, E_7, D_7, F_7}, - {0, E_6, D_6, F_6}, - {0, E_5, D_5, F_5}, - {0, E_4, D_4, F_4}, - {0, E_3, D_3, F_3}, - {0, E_2, D_2, F_2}, - {0, E_1, D_1, F_1}, - {0, B_14, A_14, C_14}, - {0, B_13, A_13, C_13}, - {0, B_11, A_11, C_11}, - {0, B_10, A_10, C_10}, - {0, B_9, A_9, C_9}, - {0, B_8, A_8, C_8}, - {0, B_7, A_7, C_7}, - {0, B_6, A_6, C_6}, - {0, B_5, A_5, C_5}, - {0, B_4, A_4, C_4}, - {0, B_3, A_3, C_3}, - {0, B_2, A_2, C_2}, - {0, B_1, A_1, C_1}, - {0, B_15, A_15, C_15}, - {0, E_13, D_13, F_13}, - {0, B_12, A_12, C_12}, - {0, B_16, A_16, C_16}, - {0, E_16, D_16, F_16}, - {0, H_16, G_16, I_16}, - {0, K_16, J_16, L_16}, -}; - -led_config_t g_led_config = { { - { 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1 }, - { 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 29 }, - { 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 0, 15 }, - { 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, NO_LED, 42 }, - { 61, 60, 59, NO_LED, NO_LED, 58, NO_LED, NO_LED, NO_LED, NO_LED, 57, 56, NO_LED, 55 } -}, { - { 224, 0 }, { 208, 0 }, { 192, 0 }, { 176, 0 }, { 160, 0 }, { 144, 0 }, { 128, 0 }, { 112, 0 }, { 96, 0 }, { 80, 0 }, { 64, 0 }, { 48, 0 }, { 32, 0 }, { 16, 0 }, - { 0, 0 }, { 220, 24 }, { 200, 16 }, { 184, 16 }, { 168, 16 }, { 152, 16 }, { 136, 16 }, { 120, 16 }, { 104, 16 }, { 88, 16 }, { 72, 16 }, { 56, 16 }, { 40, 16 }, { 24, 16 }, - { 4, 16 }, { 204, 32 }, { 188, 32 }, { 172, 32 }, { 156, 32 }, { 140, 32 }, { 124, 32 }, { 108, 32 }, { 92, 32 }, { 76, 32 }, { 60, 32 }, { 44, 32 }, { 28, 32 }, { 6, 32 }, - { 224, 48 }, { 202, 48 }, { 180, 48 }, { 164, 48 }, { 148, 48 }, { 132, 48 }, { 116, 48 }, { 100, 48 }, { 84, 48 }, { 68, 48 }, { 52, 48 }, { 20, 48 }, { 10, 48 }, { 218, 64 }, - { 198, 64 }, { 178, 64 }, { 112, 64 }, { 46, 64 }, { 26, 64 }, { 6, 64 } -}, { - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, - 1, 1, 4, 1, 1, 1 -} }; - -#elif defined (dzrgb60_ansi) -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { - {0, K_14, J_14, L_14}, - {0, K_13, J_13, L_13}, - {0, K_12, J_12, L_12}, - {0, K_11, J_11, L_11}, - {0, K_10, J_10, L_10}, - {0, K_9, J_9, L_9}, - {0, K_8, J_8, L_8}, - {0, K_7, J_7, L_7}, - {0, K_6, J_6, L_6}, - {0, K_5, J_5, L_5}, - {0, K_4, J_4, L_4}, - {0, K_3, J_3, L_3}, - {0, K_2, J_2, L_2}, - {0, K_1, J_1, L_1}, - {0, H_14, G_14, I_14}, - {0, H_13, G_13, I_13}, - {0, H_12, G_12, I_12}, - {0, H_11, G_11, I_11}, - {0, H_10, G_10, I_10}, - {0, H_9, G_9, I_9}, - {0, H_8, G_8, I_8}, - {0, H_7, G_7, I_7}, - {0, H_6, G_6, I_6}, - {0, H_5, G_5, I_5}, - {0, H_4, G_4, I_4}, - {0, H_3, G_3, I_3}, - {0, H_2, G_2, I_2}, - {0, H_1, G_1, I_1}, - {0, E_14, D_14, F_14}, - {0, E_12, D_12, F_12}, - {0, E_11, D_11, F_11}, - {0, E_10, D_10, F_10}, - {0, E_9, D_9, F_9}, - {0, E_8, D_8, F_8}, - {0, E_7, D_7, F_7}, - {0, E_6, D_6, F_6}, - {0, E_5, D_5, F_5}, - {0, E_4, D_4, F_4}, - {0, E_3, D_3, F_3}, - {0, E_2, D_2, F_2}, - {0, E_1, D_1, F_1}, - {0, B_13, A_13, C_13}, - {0, B_11, A_11, C_11}, - {0, B_10, A_10, C_10}, - {0, B_9, A_9, C_9}, - {0, B_8, A_8, C_8}, - {0, B_7, A_7, C_7}, - {0, B_6, A_6, C_6}, - {0, B_5, A_5, C_5}, - {0, B_4, A_4, C_4}, - {0, B_3, A_3, C_3}, - {0, B_2, A_2, C_2}, - {0, B_1, A_1, C_1}, - {0, B_15, A_15, C_15}, - {0, E_13, D_13, F_13}, - {0, B_12, A_12, C_12}, - {0, E_15, D_15, F_15}, - {0, B_16, A_16, C_16}, - {0, E_16, D_16, F_16}, - {0, H_16, G_16, I_16}, - {0, K_16, J_16, L_16}, -}; - -led_config_t g_led_config = { { - { 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }, - { 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14 }, - { 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, NO_LED, 28 }, - { 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, NO_LED, NO_LED }, - { 60, 59, 58, NO_LED, NO_LED, 57, NO_LED, NO_LED, NO_LED, 56, 55, 54, NO_LED, 53 } -}, { - { 216, 0 }, { 192, 0 }, { 176, 0 }, { 160, 0 }, { 144, 0 }, { 128, 0 }, { 112, 0 }, { 96, 0 }, { 80, 0 }, { 64, 0 }, { 48, 0 }, { 32, 0 }, { 16, 0 }, { 0, 0 }, - { 220, 16 }, { 200, 16 }, { 184, 16 }, { 168, 16 }, { 152, 16 }, { 136, 16 }, { 120, 16 }, { 104, 16 }, { 88, 16 }, { 72, 16 }, { 56, 16 }, { 40, 16 }, { 24, 16 }, { 4, 16 }, - { 214, 24 }, { 188, 32 }, { 172, 32 }, { 156, 32 }, { 140, 32 }, { 124, 32 }, { 108, 32 }, { 92, 32 }, { 76, 32 }, { 60, 32 }, { 44, 32 }, { 28, 32 }, { 6, 32 }, { 210, 48 }, - { 180, 48 }, { 164, 48 }, { 148, 48 }, { 132, 48 }, { 116, 48 }, { 100, 48 }, { 84, 48 }, { 68, 48 }, { 52, 48 }, { 20, 48 }, { 10, 48 }, { 222, 64 }, { 202, 64 }, { 182, 64 }, - { 162, 64 }, { 102, 64 }, { 42, 64 }, { 22, 64 }, { 2, 64 } -}, { - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 1, - 1, 4, 1, 1, 1 -} }; - -#else -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { - {0, K_14, J_14, L_14}, - {0, K_13, J_13, L_13}, - {0, K_12, J_12, L_12}, - {0, K_11, J_11, L_11}, - {0, K_10, J_10, L_10}, - {0, K_9, J_9, L_9}, - {0, K_8, J_8, L_8}, - {0, K_7, J_7, L_7}, - {0, K_6, J_6, L_6}, - {0, K_5, J_5, L_5}, - {0, K_4, J_4, L_4}, - {0, K_3, J_3, L_3}, - {0, K_2, J_2, L_2}, - {0, K_1, J_1, L_1}, - {0, H_14, G_14, I_14}, - {0, H_13, G_13, I_13}, - {0, H_12, G_12, I_12}, - {0, H_11, G_11, I_11}, - {0, H_10, G_10, I_10}, - {0, H_9, G_9, I_9}, - {0, H_8, G_8, I_8}, - {0, H_7, G_7, I_7}, - {0, H_6, G_6, I_6}, - {0, H_5, G_5, I_5}, - {0, H_4, G_4, I_4}, - {0, H_3, G_3, I_3}, - {0, H_2, G_2, I_2}, - {0, H_1, G_1, I_1}, - {0, E_14, D_14, F_14}, - {0, E_12, D_12, F_12}, - {0, E_11, D_11, F_11}, - {0, E_10, D_10, F_10}, - {0, E_9, D_9, F_9}, - {0, E_8, D_8, F_8}, - {0, E_7, D_7, F_7}, - {0, E_6, D_6, F_6}, - {0, E_5, D_5, F_5}, - {0, E_4, D_4, F_4}, - {0, E_3, D_3, F_3}, - {0, E_2, D_2, F_2}, - {0, E_1, D_1, F_1}, - {0, B_14, A_14, C_14}, - {0, B_13, A_13, C_13}, - {0, B_11, A_11, C_11}, - {0, B_10, A_10, C_10}, - {0, B_9, A_9, C_9}, - {0, B_8, A_8, C_8}, - {0, B_7, A_7, C_7}, - {0, B_6, A_6, C_6}, - {0, B_5, A_5, C_5}, - {0, B_4, A_4, C_4}, - {0, B_3, A_3, C_3}, - {0, B_2, A_2, C_2}, - {0, B_1, A_1, C_1}, - {0, B_15, A_15, C_15}, - {0, E_13, D_13, F_13}, - {0, B_12, A_12, C_12}, - {0, E_15, D_15, F_15}, - {0, H_15, G_15, I_15}, - {0, B_16, A_16, C_16}, - {0, E_16, D_16, F_16}, - {0, H_16, G_16, I_16}, - {0, K_16, J_16, L_16}, -}; - -led_config_t g_led_config = { { - { 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }, - { 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14 }, - { 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, NO_LED, 28 }, - { 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, NO_LED, 41 }, - { 62, 61, 60, NO_LED, NO_LED, 59, NO_LED, NO_LED, 58, 57, 56, 55, NO_LED, 54 } -}, { - { 216, 0 }, { 192, 0 }, { 176, 0 }, { 160, 0 }, { 144, 0 }, { 128, 0 }, { 112, 0 }, { 96, 0 }, { 80, 0 }, { 64, 0 }, { 48, 0 }, { 32, 0 }, { 16, 0 }, { 0, 0 }, - { 220, 16 }, { 200, 16 }, { 184, 16 }, { 168, 16 }, { 152, 16 }, { 136, 16 }, { 120, 16 }, { 104, 16 }, { 88, 16 }, { 72, 16 }, { 56, 16 }, { 40, 16 }, { 24, 16 }, { 4, 16 }, - { 214, 32 }, { 188, 32 }, { 172, 32 }, { 156, 32 }, { 140, 32 }, { 124, 32 }, { 108, 32 }, { 92, 32 }, { 76, 32 }, { 60, 32 }, { 44, 32 }, { 28, 32 }, { 6, 32 }, { 224, 48 }, - { 208, 48 }, { 186, 48 }, { 164, 48 }, { 148, 48 }, { 132, 48 }, { 116, 48 }, { 100, 48 }, { 84, 48 }, { 68, 48 }, { 52, 48 }, { 36, 48 }, { 9, 48 }, { 224, 64 }, { 208, 64 }, - { 192, 64 }, { 176, 64 }, { 160, 64 }, { 102, 64 }, { 42, 64 }, { 22, 64 }, { 2, 64 } -}, { - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, - 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, - 1, 1, 1, 4, 1, 1, 1 -} }; - - -#endif diff --git a/users/tominabox1/doug.c b/users/tominabox1/doug.c deleted file mode 100644 index fccb1bb6..00000000 --- a/users/tominabox1/doug.c +++ /dev/null @@ -1,232 +0,0 @@ -// This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. -// See gfxfont.h for newer custom bitmap font info. - -#include "progmem.h" - -// Standard ASCII 5x7 font -const unsigned char font[] PROGMEM = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00, -0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00, -0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00, -0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00, -0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00, -0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00, -0x00, 0x18, 0x3C, 0x18, 0x00, 0x00, -0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00, -0x00, 0x18, 0x24, 0x18, 0x00, 0x00, -0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00, -0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00, -0x26, 0x29, 0x79, 0x29, 0x26, 0x00, -0x40, 0x7F, 0x05, 0x05, 0x07, 0x00, -0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00, -0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00, -0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00, -0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00, -0x14, 0x22, 0x7F, 0x22, 0x14, 0x00, -0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00, -0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00, -0x00, 0x66, 0x89, 0x95, 0x6A, 0x00, -0x60, 0x60, 0x60, 0x60, 0x60, 0x00, -0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00, -0x08, 0x04, 0x7E, 0x04, 0x08, 0x00, -0x10, 0x20, 0x7E, 0x20, 0x10, 0x00, -0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00, -0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00, -0x1E, 0x10, 0x10, 0x10, 0x10, 0x00, -0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00, -0x30, 0x38, 0x3E, 0x38, 0x30, 0x00, -0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x5F, 0x00, 0x00, 0x00, -0x00, 0x07, 0x00, 0x07, 0x00, 0x00, -0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00, -0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00, -0x23, 0x13, 0x08, 0x64, 0x62, 0x00, -0x36, 0x49, 0x56, 0x20, 0x50, 0x00, -0x00, 0x08, 0x07, 0x03, 0x00, 0x00, -0x00, 0x1C, 0x22, 0x41, 0x00, 0x00, -0x00, 0x41, 0x22, 0x1C, 0x00, 0x00, -0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00, -0x08, 0x08, 0x3E, 0x08, 0x08, 0x00, -0x00, 0x80, 0x70, 0x30, 0x00, 0x00, -0x08, 0x08, 0x08, 0x08, 0x08, 0x00, -0x00, 0x00, 0x60, 0x60, 0x00, 0x00, -0x20, 0x10, 0x08, 0x04, 0x02, 0x00, -0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00, -0x00, 0x42, 0x7F, 0x40, 0x00, 0x00, -0x72, 0x49, 0x49, 0x49, 0x46, 0x00, -0x21, 0x41, 0x49, 0x4D, 0x33, 0x00, -0x18, 0x14, 0x12, 0x7F, 0x10, 0x00, -0x27, 0x45, 0x45, 0x45, 0x39, 0x00, -0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00, -0x41, 0x21, 0x11, 0x09, 0x07, 0x00, -0x36, 0x49, 0x49, 0x49, 0x36, 0x00, -0x46, 0x49, 0x49, 0x29, 0x1E, 0x00, -0x00, 0x00, 0x14, 0x00, 0x00, 0x00, -0x00, 0x40, 0x34, 0x00, 0x00, 0x00, -0x00, 0x08, 0x14, 0x22, 0x41, 0x00, -0x14, 0x14, 0x14, 0x14, 0x14, 0x00, -0x00, 0x41, 0x22, 0x14, 0x08, 0x00, -0x02, 0x01, 0x59, 0x09, 0x06, 0x00, -0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00, -0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00, -0x7F, 0x49, 0x49, 0x49, 0x36, 0x00, -0x3E, 0x41, 0x41, 0x41, 0x22, 0x00, -0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00, -0x7F, 0x49, 0x49, 0x49, 0x41, 0x00, -0x7F, 0x09, 0x09, 0x09, 0x01, 0x00, -0x3E, 0x41, 0x41, 0x51, 0x73, 0x00, -0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00, -0x00, 0x41, 0x7F, 0x41, 0x00, 0x00, -0x20, 0x40, 0x41, 0x3F, 0x01, 0x00, -0x7F, 0x08, 0x14, 0x22, 0x41, 0x00, -0x7F, 0x40, 0x40, 0x40, 0x40, 0x00, -0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00, -0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00, -0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00, -0x7F, 0x09, 0x09, 0x09, 0x06, 0x00, -0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00, -0x7F, 0x09, 0x19, 0x29, 0x46, 0x00, -0x26, 0x49, 0x49, 0x49, 0x32, 0x00, -0x03, 0x01, 0x7F, 0x01, 0x03, 0x00, -0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00, -0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00, -0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00, -0x63, 0x14, 0x08, 0x14, 0x63, 0x00, -0x03, 0x04, 0x78, 0x04, 0x03, 0x00, -0x61, 0x59, 0x49, 0x4D, 0x43, 0x00, -0x00, 0x7F, 0x41, 0x41, 0x41, 0x00, -0x02, 0x04, 0x08, 0x10, 0x20, 0x00, -0x00, 0x41, 0x41, 0x41, 0x7F, 0x00, -0x04, 0x02, 0x01, 0x02, 0x04, 0x00, -0x40, 0x40, 0x40, 0x40, 0x40, 0x00, -0x00, 0x03, 0x07, 0x08, 0x00, 0x00, -0x20, 0x54, 0x54, 0x78, 0x40, 0x00, -0x7F, 0x28, 0x44, 0x44, 0x38, 0x00, -0x38, 0x44, 0x44, 0x44, 0x28, 0x00, -0x38, 0x44, 0x44, 0x28, 0x7F, 0x00, -0x38, 0x54, 0x54, 0x54, 0x18, 0x00, -0x00, 0x08, 0x7E, 0x09, 0x02, 0x00, -0x18, 0xA4, 0xA4, 0x9C, 0x78, 0x00, -0x7F, 0x08, 0x04, 0x04, 0x78, 0x00, -0x00, 0x44, 0x7D, 0x40, 0x00, 0x00, -0x20, 0x40, 0x40, 0x3D, 0x00, 0x00, -0x7F, 0x10, 0x28, 0x44, 0x00, 0x00, -0x00, 0x41, 0x7F, 0x40, 0x00, 0x00, -0x7C, 0x04, 0x78, 0x04, 0x78, 0x00, -0x7C, 0x08, 0x04, 0x04, 0x78, 0x00, -0x38, 0x44, 0x44, 0x44, 0x38, 0x00, -0xFC, 0x18, 0x24, 0x24, 0x18, 0x00, -0x18, 0x24, 0x24, 0x18, 0xFC, 0x00, -0x7C, 0x08, 0x04, 0x04, 0x08, 0x00, -0x48, 0x54, 0x54, 0x54, 0x24, 0x00, -0x04, 0x04, 0x3F, 0x44, 0x24, 0x00, -0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00, -0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00, -0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00, -0x44, 0x28, 0x10, 0x28, 0x44, 0x00, -0x4C, 0x90, 0x90, 0x90, 0x7C, 0x00, -0x44, 0x64, 0x54, 0x4C, 0x44, 0x00, -0x00, 0x08, 0x36, 0x41, 0x00, 0x00, -0x00, 0x00, 0x77, 0x00, 0x00, 0x00, -0x00, 0x41, 0x36, 0x08, 0x00, 0x00, -0x02, 0x01, 0x02, 0x04, 0x02, 0x00, -0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00, -0x00, 0x2C, 0x2C, 0x2C, 0x34, 0x34, -0x34, 0x24, 0x2C, 0x2C, 0x2C, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x18, 0x14, -0x14, 0x3C, 0x20, 0x00, 0x00, 0x04, -0x0C, 0x00, 0x00, 0x20, 0x00, 0xC0, -0x00, 0x00, 0x00, 0xA0, 0x20, 0x30, -0x7C, 0x78, 0x0C, 0x0C, 0x18, 0x18, -0x18, 0x14, 0x14, 0x14, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x80, 0x5C, 0x5C, 0x24, 0x20, -0xA0, 0xA0, 0xA0, 0x20, 0x60, 0x20, -0xBC, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x14, 0x94, 0x94, -0x14, 0x94, 0x94, 0x94, 0x94, 0x14, -0x1C, 0x1C, 0x1C, 0x88, 0x08, 0x00, -0x00, 0x00, 0x00, 0x00, 0x18, 0x08, -0x84, 0x84, 0x84, 0x84, 0x80, 0x98, -0x80, 0x9C, 0x9C, 0x90, 0x80, 0x00, -0x10, 0x1C, 0x1C, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x10, 0x10, 0x00, -0xE0, 0xF0, 0xF0, 0xF0, 0xE0, 0xEC, -0xEE, 0xF7, 0xF3, 0x70, 0x20, 0x00, -0x7C, 0x7C, 0x7C, 0x7E, 0x00, 0x7E, -0x7E, 0x7E, 0x7F, 0x7F, 0x7F, 0x00, -0x00, 0x80, 0xC0, 0xE0, 0x7E, 0x5B, -0x4F, 0x5B, 0xFE, 0xC0, 0x00, 0x00, -0xC0, 0x00, 0xDC, 0xD7, 0xDE, 0xDE, -0xDE, 0xD7, 0xDC, 0x00, 0xC0, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x80, 0x80, 0x40, 0x00, 0x80, 0x80, -0x00, 0x00, 0x00, 0x00, 0x80, 0x80, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x50, 0xA0, 0x40, 0x80, 0x80, 0x40, -0xA0, 0x50, 0x00, 0x00, 0xF0, 0x00, -0x01, 0x08, 0x08, 0x88, 0x08, 0x08, -0x00, 0x00, 0x00, 0x00, 0x0A, 0x0C, -0x0E, 0x0A, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x02, 0x82, 0x80, 0x80, -0x00, 0x00, 0x80, 0x80, 0x00, 0x00, -0x00, 0xC0, 0x00, 0x00, 0x00, 0x01, -0x00, 0x00, 0x00, 0x40, 0x00, 0x40, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x03, 0x00, -0x01, 0x01, 0x01, 0x60, 0x60, 0x40, -0xF1, 0xB3, 0x03, 0x00, 0x00, 0x00, -0x00, 0x00, 0x90, 0x90, 0xD0, 0xC0, -0xE0, 0xE0, 0x00, 0x00, 0x00, 0x01, -0x00, 0x90, 0xA0, 0xA0, 0x63, 0x60, -0x40, 0x40, 0xC0, 0x00, 0x00, 0x00, -0x00, 0x02, 0x02, 0x02, 0x03, 0x00, -0x0F, 0x1F, 0x3F, 0x7F, 0x7F, 0x7F, -0x7F, 0x7F, 0x3F, 0x1E, 0x0C, 0x00, -0x1F, 0x1F, 0x1F, 0x3F, 0x00, 0x3F, -0x3F, 0x3F, 0x7F, 0x7F, 0x7F, 0x00, -0x30, 0x7B, 0x7F, 0x78, 0x30, 0x20, -0x20, 0x30, 0x78, 0x7F, 0x3B, 0x00, -0x03, 0x00, 0x0F, 0x7F, 0x0F, 0x0F, -0x0F, 0x7F, 0x0F, 0x00, 0x03, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x07, 0x06, 0x00, 0x70, 0x10, 0x10, -0x31, 0x11, 0x16, 0x06, 0x07, 0x01, -0x00, 0x08, 0x08, 0x08, 0x70, 0x70, -0x40, 0x40, 0x41, 0x46, 0x46, 0x41, -0x40, 0x40, 0x00, 0x00, 0x07, 0x00, -0x00, 0x00, 0x00, 0x75, 0x75, 0x15, -0x77, 0x77, 0x35, 0x15, 0x75, 0x75, -0x75, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x70, 0x70, 0x56, 0x56, 0x56, -0x51, 0x11, 0x26, 0x00, 0x00, 0x00, -0x00, 0x17, 0x10, 0x10, 0x70, 0x00, -0x00, 0x00, 0x30, 0x20, 0x27, 0x77, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0xE0, 0xE0, 0xA0, 0xA0, 0xA0, 0xA0, -0xA0, 0xA0, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x90, 0x90, 0x90, 0x90, -0x90, 0xF0, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x20, 0x40, -0xF0, 0x30, 0x10, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; diff --git a/users/tominabox1/readme.md b/users/tominabox1/readme.md deleted file mode 100644 index 99a3542b..00000000 --- a/users/tominabox1/readme.md +++ /dev/null @@ -1,5 +0,0 @@ -# Overview - -My user-space code covers the [Minivan](../../keyboards/thevankeyboards/minivan/keymaps/tominabox1/keymap.c), [Dimple](../../keyboards/lazydesigners/dimple/keymaps/tominabox1/keymap.c), [CRKBD](../../keyboards/crkbd/keymaps/tominabox1/keymap.c), and [Teensy based HHKB converter](../../keyboards/hhkb/keymaps/tominabox1/). My code makes extensive use of @Drashna's code and much love and praise goes to him for figuring a lot of this stuff out! - -My usercode utilizes the layout wrappers contained in [wrappers.h](wrappers.h). All of the keymaps are derivative of the Dimple keymap and utilize its wrappers in the definition of additional wrappers. diff --git a/users/tominabox1/rules.mk b/users/tominabox1/rules.mk deleted file mode 100644 index b70b128c..00000000 --- a/users/tominabox1/rules.mk +++ /dev/null @@ -1,26 +0,0 @@ -# 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 -# -CONSOLE_ENABLE = no -TAP_DANCE_ENABLE = yes -NKRO_ENABLE = yes -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration - -ifeq ($(strip $(KEYBOARD)), crkbd/rev1) -RGB_MATRIX_ENABLE = WS2812 -EXTRAFLAGS += -flto -BOOTLOADER = qmk-dfu -OLED_DRIVER_ENABLE = yes -endif - -ifeq ($(strip $(KEYBOARD)), lazydesigners/dimple) -MOUSEKEY_ENABLE = no # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default -RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -# RGB_MATRIX_ENABLE = WS2812 -endif - - -SRC += tominabox1.c diff --git a/users/tominabox1/tominabox1.c b/users/tominabox1/tominabox1.c deleted file mode 100644 index 95e6ee78..00000000 --- a/users/tominabox1/tominabox1.c +++ /dev/null @@ -1,281 +0,0 @@ -#include "tominabox1.h" - -#ifdef KEYBOARD_lazydesigners_dimple -#ifdef RGBLIGHT_ENABLE -__attribute__ ((weak)) -void keyboard_post_init_keymap(void) {} - -void keyboard_post_init_user(void) { // sets the backlighting to come on upon successful load then turn off - rgblight_enable_noeeprom(); - rgblight_sethsv_noeeprom(RGB_RED); - rgblight_mode_noeeprom(0); - wait_ms(700); - rgblight_disable_noeeprom(); -} -#endif // RGBLIGHT -#endif // Dimple - - -#ifdef RGB_MATRIX_ENABLE -void rgb_matrix_layer_helper(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode, uint8_t speed, uint8_t led_type); -static bool is_suspended; -static bool rgb_matrix_enabled; - -__attribute__ ((weak)) -void suspend_power_down_keymap(void) {} - -void suspend_power_down_user(void) { - rgb_matrix_set_suspend_state(true); - if (!is_suspended) { - is_suspended = true; - rgb_matrix_enabled = (bool)rgb_matrix_config.enable; - rgb_matrix_disable_noeeprom(); - } -} - -__attribute__ ((weak)) -void suspend_wakeup_init_keymap(void) {} - -void suspend_wakeup_init_user(void) { - rgb_matrix_set_suspend_state(false); - is_suspended = false; - if (rgb_matrix_enabled) { - rgb_matrix_enable_noeeprom(); - } -} - -# include "lib/lib8tion/lib8tion.h" -extern led_config_t g_led_config; -void rgb_matrix_layer_helper(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode, uint8_t speed, uint8_t led_type) { - HSV hsv = {hue, sat, val}; - if (hsv.v > rgb_matrix_config.hsv.v) { - hsv.v = rgb_matrix_config.hsv.v; - } - - switch (mode) { - case 1: // breathing - { - uint16_t time = scale16by8(g_rgb_counters.tick, speed / 8); - hsv.v = scale8(abs8(sin8(time) - 128) * 2, hsv.v); - RGB rgb = hsv_to_rgb(hsv); - for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) { - if (HAS_FLAGS(g_led_config.flags[i], led_type)) { - rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); - } - } - break; - } - default: // Solid Color - { - RGB rgb = hsv_to_rgb(hsv); - for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) { - if (HAS_FLAGS(g_led_config.flags[i], led_type)) { - rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); - } - } - break; - } - } -} -#endif //RGB_MATRIX_ENABLE - -void dance_cln_finished (qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 1) { - register_code16(S(KC_2)); - } else { - SEND_STRING("tom.campie@gmail.com"); - } -} - -void dance_cln_reset (qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 1) { - unregister_code16(S(KC_2)); - } else { - } -} - -qk_tap_dance_action_t tap_dance_actions[] = { - [KC_EMAIL] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, dance_cln_finished, dance_cln_reset), - [TD_SFT_CPS] = ACTION_TAP_DANCE_DOUBLE(KC_LSFT, KC_CAPS), -}; - -#define TAPPING_TERM 200 -#define IGNORE_MOD_TAP_INTERRUPT - -#ifdef KEYBOARD_crkbd_rev1 - -#endif // CRKBD - -uint16_t get_tapping_term(uint16_t keycode) { - switch (keycode) { - case LSFT_T(KC_CAPS): - return 250; - case KC_ENT_LOW: - return 150; - case KC_SPC_RSE: - return(250); - case LCTL_T(KC_TAB): - return 300; - default: - return TAPPING_TERM; - } -}; - -__attribute__ ((weak)) -layer_state_t layer_state_set_keymap (layer_state_t state) { - return state; -} - -uint32_t layer_state_set_user(uint32_t state) { - state = update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); - switch (biton32(state)) { - case _LOWER: - break; - case _RAISE: - break; - case _ADJUST: - break; - default: - break; - } - return state; -} - -#ifdef KEYBOARD_crkbd_rev1 - -__attribute__((weak)) -void matrix_scan_keymap(void) {} - -extern bool oled_initialized; -void matrix_scan_user(void) { - if(!oled_initialized) { - wait_ms(200); - oled_init(0); - return; - } - matrix_scan_keymap(); - } - -extern uint8_t is_master; -#endif // CRKBD - -uint16_t oled_timer; - -__attribute__ ((weak)) -bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { - return true; -} - -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 - - if (record->event.pressed) { - #ifdef OLED_DRIVER_ENABLE - oled_timer = timer_read(); - oled_on(); - #endif // OLED_DRIVER_ENABLE - switch (keycode) { - case KC_BBB: - if (record->event.pressed) { - SEND_STRING(":b:"); - } else {} - break; - case KC_BEPIS: - if (record->event.pressed) { - SEND_STRING("BEPIS"); - } else {} - break; - } - } - return true; - -} -#ifdef KEYBOARD_crkbd_rev1 -#ifdef OLED_DRIVER_ENABLE -void render_logo(void) { - static const char PROGMEM logo[] = { - 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, - 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, - 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, - 0}; - oled_write_P(logo, false); -} - -void render_status_main(void) { - // Host Keyboard USB Status - oled_write_P(PSTR("USB: "), false); - switch (USB_DeviceState) { - case DEVICE_STATE_Unattached: - oled_write_P(PSTR("Unattached\n"), false); - break; - case DEVICE_STATE_Suspended: - oled_write_P(PSTR("Suspended\n"), false); - break; - case DEVICE_STATE_Configured: - oled_write_P(PSTR("Connected\n"), false); - break; - case DEVICE_STATE_Powered: - oled_write_P(PSTR("Powered\n"), false); - break; - case DEVICE_STATE_Default: - oled_write_P(PSTR("Default\n"), false); - break; - case DEVICE_STATE_Addressed: - oled_write_P(PSTR("Addressed\n"), false); - break; - default: - oled_write_P(PSTR("Invalid\n"), false); - } - - // Host Keyboard Layer Status - oled_write_P(PSTR("Layer: "), false); - switch (biton32(layer_state)) { - case _BASE: - oled_write_P(PSTR("Colemak\n"), false); - break; - case _RAISE: - oled_write_P(PSTR("Numbers\n"), false); - break; - case _LOWER: - oled_write_P(PSTR("Symbols\n"), false); - break; - case _ADJUST: - oled_write_P(PSTR("Adjust\n"), false); - break; - case _ARROW: - oled_write_P(PSTR("Navigation\n"), false); - break; - case _FKEY: - oled_write_P(PSTR("Function\n"), false); - break; - default: - // Or use the write_ln shortcut over adding '\n' to the end of your string - oled_write_ln_P(PSTR("Undefined"), false); - } - - // Host Keyboard LED Status - - oled_write_ln_P(IS_HOST_LED_ON(USB_LED_CAPS_LOCK) ? PSTR("Caps Lock\n") : PSTR(" \n"), false); -} -__attribute__ ((weak)) -void oled_task_keymap(void) {} - -void oled_task_user(void) { - - if (timer_elapsed(oled_timer) > 20000) { - oled_off(); - return; - } - if (is_master) { - render_status_main(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) - } else { - render_logo(); - oled_scroll_left(); - } - oled_task_keymap(); - } - -#endif // OLED_Driver -#endif // crkbd diff --git a/users/tominabox1/tominabox1.h b/users/tominabox1/tominabox1.h deleted file mode 100644 index 00f8e651..00000000 --- a/users/tominabox1/tominabox1.h +++ /dev/null @@ -1,56 +0,0 @@ -#pragma once -#include "quantum.h" -#include "action.h" -#include "version.h" -#include "wrappers.h" - -// #define KC_SFT_CPS MT(MOD_LSFT, KC_CAPS) // Act as Shift on hold and as CapsLock on tap -#define SPC_LOW LT(_LOWER, KC_ENT) // Left space on tap, LOWER on hold -#define SPC_UPR LT(_RAISE, KC_SPC) // Left space on tap, UPPER on hold - -extern keymap_config_t keymap_config; - -enum layers { - _BASE, - _LOWER, - _RAISE, - _ADJUST, - _ARROW, - _FKEY -}; - -enum custom_keycodes { - BASE = SAFE_RANGE, - KC_BEPIS, - KC_BBB, - LOWER, - RAISE, - ADJUST, - ARROW, - FKEY, - KC_LFT_NUM_F, - RGBRST, - KC_PASTA -}; - -enum tap_dance_indexes { - KC_EMAIL, - TD_SFT_CPS, -}; - -#define KC_ARROW MO(4) -#define KC_LTOG RGB_TOG -#define KC_LHUI RGB_HUI -#define KC_LHUD RGB_HUD -#define KC_LSAI RGB_SAI -#define KC_LSAD RGB_SAD -#define KC_LVAI RGB_VAI -#define KC_LVAD RGB_VAD -#define KC_LMOD RGB_MOD -#define KC_CTLTB CTL_T(KC_TAB) // Tab on tap, ctrl on hold -#define KC_SFT_CPS TD(TD_SFT_CPS) // Hold for shift, double tap for caps -#define KC_ENT_LOW LT(_LOWER, KC_ENT) // Return on tap, Lower on hold -#define KC_SPC_RSE LT(_RAISE, KC_SPC) // Space on tap, raise on hold -#define KC_EML TD(KC_EMAIL) // Double tap @ for email macro -#define KC_FKEY LT(_FKEY, KC_ENT) // Return on tap, Fkey on hold -#define KC_NUMF TD(KC_LFT_NUM_F) diff --git a/users/tominabox1/wrappers.h b/users/tominabox1/wrappers.h deleted file mode 100644 index 032fad27..00000000 --- a/users/tominabox1/wrappers.h +++ /dev/null @@ -1,142 +0,0 @@ -#pragma once -#include "tominabox1.h" -/* -Since our quirky block definitions are basically a list of comma separated -arguments, we need a wrapper in order for these definitions to be -expanded before being used as arguments to the LAYOUT_xxx macro. -*/ -#if (!defined(LAYOUT) && defined(KEYMAP)) -# define LAYOUT KEYMAP -#endif - -// clang-format off -#define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__) -#define LAYOUT_arrow_wrapper(...) LAYOUT_arrow(__VA_ARGS__) - -/* - _____ _ _ - | __ \(_) | | - | | | |_ _ __ ___ _ __ | | ___ - | | | | | '_ ` _ \| '_ \| |/ _ \ - | |__| | | | | | | | |_) | | __/ - |_____/|_|_| |_| |_| .__/|_|\___| - | | - |_| -*/ -// Dimple Base layer -#define __________________DIMPLE1__________________ KC_GESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC -#define __________________DIMPLE2__________________ LCTL_T(KC_TAB), KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT -#define __________________DIMPLE3L_________________ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B -#define __________________DIMPLE3R_________________ KC_K, KC_M, KC_COMM, KC_UP, LT(_FKEY,KC_DOT) -#define __________________DIMPLE4__________________ KC_LCTL, KC_LGUI, KC_LALT, KC_ENT_LOW, KC_SPC_RSE, KC_LEFT, KC_DOWN, KC_RGHT - -// Dimple Symbol Layer -#define _________________LOWER_1___________________ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC -#define _________________LOWER_2___________________ KC_DEL, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE -#define _________________LOWER_3___________________ KC_CAPS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PGUP, KC_QUES -#define _________________LOWER_4___________________ LCA(KC_DEL), KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_END - -// Dimple Number layer -#define ___________________RAISE1__________________ KC_TILD, KC_EXLM, TD(KC_EMAIL), KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL -#define ___________________RAISE2__________________ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS -#define ___________________RAISE3__________________ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_DOT, KC_SLSH -#define ___________________RAISE4__________________ KC_VOLD, KC_MUTE, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO - -// Dimple F-key layer -#define ___________________FKEY1___________________ KC_PASTA, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_NO -#define ___________________FKEY2___________________ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_F11, KC_F12, KC_NO -#define ___________________FKEY3___________________ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO -#define ___________________FKEY4___________________ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_NO - -// Dimple Adjust layer -#define ___________________ADJST1__________________ RESET,RGBRST, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO -#define ___________________ADJST2__________________ RGB_M_P, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO -#define ___________________ADJST3__________________ RGB_MOD, RGB_HUI, RGB_HUD, RGB_M_SN, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO -#define ___________________ADJST4__________________ RGB_VAD, RGB_TOG, RGB_VAI, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_NO - -/* -__ __ _ _ -| \/ (_) (_) -| \ / |_ _ __ ___ ____ _ _ __ -| |\/| | | '_ \| \ \ / / _` | '_ \ -| | | | | | | | |\ V / (_| | | | | -|_| |_|_|_| |_|_| \_/ \__,_|_| |_| -*/ - - -// Minivan Base Layer -#define __________________MINIVAN1_________________ __________________DIMPLE1__________________ -#define __________________MINIVAN2_________________ __________________DIMPLE2__________________ -#define __________________MINIVAN3_________________ __________________DIMPLE3L_________________, __________________DIMPLE3R_________________, KC_RSFT -#define __________________MINIVAN4_________________ KC_LCTL, KC_LGUI, KC_LALT, KC_ENT_LOW, KC_SPC_RSE, KC_LEFT, KC_DOWN, KC_RGHT, MO(_FKEY) - -/* Minivan Symbol Layer -#define _________________LOWER_1___________________ -#define _________________LOWER_2___________________ */ -#define __________________MININUM3_________________ _________________LOWER_3___________________, KC_SLSH -#define __________________MININUM4_________________ _________________LOWER_4___________________, KC_END - -/* Minvian Number Layer -#define ___________________RAISE1__________________ -#define ___________________RAISE2__________________ */ -#define ___________________RVAN_3__________________ ___________________RAISE3__________________, KC_NO -#define ___________________RVAN_4__________________ ___________________RAISE4__________________, KC_NO - -/* Minvian F-key layer -#define ___________________FKEY1___________________ -#define ___________________FKEY2___________________ */ -#define ___________________FVAN_3__________________ ___________________FKEY3___________________, KC_NO -#define ___________________FVAN_4__________________ ___________________FKEY4___________________, KC_TRNS - -/* Minivan Adjust Layer -#define ___________________ADJST1__________________ -#define ___________________ADJST2__________________ */ -#define ___________________ADJVAN3_________________ ___________________ADJST3__________________, KC_NO -#define ___________________ADJVAN4_________________ ___________________ADJST4__________________, KC_TRNS - -/* - _____ _____ _ ______ _____ - / ____| __ \| |/ / _ \| __ \ -| | | |__) | ' /| |_) | | | | -| | | _ /| < | _ <| | | | -| |____| | \ \| . \| |_) | |__| | - \_____|_| \_\_|\_\____/|_____/ -*/ - -// CRKBD Base Layer -#define ___________________CRKBD1__________________ __________________DIMPLE1__________________ -#define ___________________CRKBD2__________________ __________________DIMPLE2__________________ -#define ___________________CRKBD3__________________ __________________DIMPLE3L_________________, KC_K, KC_M,KC_COMM, KC_DOT, KC_SLSH, KC_BBB -#define ___________________CRKBD4__________________ KC_LGUI, KC_LALT,KC_ENT_LOW, KC_SPC_RSE, KC_ARROW, KC_FKEY - -/* CRKBD Number layer -#define ___________________RAISE1__________________ -#define ___________________RAISE1__________________ */ -#define ___________________CRKBD_RAISE3____________ ___________________RVAN_3__________________ -#define ___________________CRKBD_RAISE4____________ ___________________CRKBD4__________________ - -/* CRKBD Symbol Layer -#define _________________LOWER_1___________________ -#define _________________LOWER_2___________________ */ -#define ___________________CRKBD_LOW3______________ __________________MININUM3_________________ -#define ___________________CRKBD_LOW4______________ ___________________CRKBD4__________________ - -/* CRKBD F-key layer -#define ___________________FKEY1___________________ -#define ___________________FKEY2___________________ */ -#define ___________________CRKBD_FKEY3_____________ ___________________FVAN_3__________________ -#define ___________________CRKBD_FKEY4_____________ ___________________CRKBD4__________________ - -/* CRKBD adjust layer -#define ___________________ADJST1__________________ */ -#define ___________________CRKBD_ADJST2____________ KC_LTOG,KC_LHUI,KC_LSAI,KC_LVAI,KC_NO,KC_NO,KC_NO,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO -#define ___________________CRKBD_ADJST3____________ KC_LMOD, KC_LHUD, KC_LSAD, KC_LVAD, KC_NO, KC_NO,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO -#define ___________________CRKBD_ADJST4____________ ___________________CRKBD4__________________ - -// CRKBD arrow layer -#define ___________________ARROW1__________________ KC_NO, KC_NO, KC_UP, KC_NO, KC_NO, KC_NO, KC_NO, KC_PGDN, KC_UP, KC_PGUP, KC_NO, KC_NO -#define ___________________ARROW2__________________ KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT, KC_NO, KC_NO,KC_NO, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO, KC_NO -#define ___________________ARROW3__________________ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO -#define ___________________ARROW4__________________ ___________________CRKBD4__________________ - -// clang-format on diff --git a/users/turbomech/backupturbomech.c b/users/turbomech/backupturbomech.c deleted file mode 100644 index 2815aa45..00000000 --- a/users/turbomech/backupturbomech.c +++ /dev/null @@ -1,389 +0,0 @@ -/* Copyright 2017 @TurboMech /u/TurboMech @A9entOran9e#6134 - * - * 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 "turbomech.h" -#include "quantum.h" -//#include "action_layer.h" -#include "action.h" -//#include "rgblight.h" - -__attribute__ ((weak)) -void matrix_init_keymap(void) {} - -__attribute__ ((weak)) -void matrix_scan_keymap(void) {} - -__attribute__ ((weak)) -bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { - return true; -} -__attribute__ ((weak)) -uint32_t layer_state_set_keymap (uint32_t state) { - return state; -} -__attribute__ ((weak)) -void led_set_keymap(uint8_t usb_led) {} - -//#define default_layer _QWERTY (0) -//extern keymap_config_t keymap_config; - -extern rgblight_config_t rgblight_config; - - -//#ifdef RGBLIGHT_ENABLE -/*change the rgblight_setrgb(#, #, #) to what you want CAPS lock - currenlty red*/ - //#define rgblight_set_caps rgblight_setrgb(255, 0, 0) - //#define rgblight_base rgblight_mode(RGB_current_mode) -//#endif -// -//bool rgb_layer_change = true; -//bool RGB_INIT = false; -//bool TOG_STATUS = false; -#ifdef RGBLIGHT_ENABLE -bool rgb_layer_change = true; -#endif -int RGB_current_mode; - -/*void matrix_init_user(void) { - #ifdef RGBLIGHT_ENABLE - rgblight_enable(); - if (true) { - eeconfig_read_rgblight(); - rgblight_get_mode(); - eeconfig_update_rgblight_default(); - - - // eeconfig_debug_rgblight(); - //rgblight_init(); - } - #endif - -} -*/ - -/*void matrix_init_user(void) { - #ifdef RGBLIGHT_ENABLE - eeconfig_read_rgblight(); - eeconfig_update_rgblight_default(); - //rgblight_init(); - //rgblight_mode(RGB_current_mode); - //rgblight_mode(RGB_current_mode); - //RGB_current_mode = rgblight_config.mode; - #endif -}*/ - - -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); - default_layer = _QWERTY; - // eeconfig_update_rgblight(rgblight_config.raw); -} - - //Setting ADJUST layer RGB back to default -/*void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) { - if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) { - rgblight_mode(RGB_current_mode); - layer_on(layer1); - } else { - layer_off(layer2); - } -}*/ - - -void matrix_init_user(void) { - - uint8_t default_layer = eeconfig_read_default_layer(); - - rgblight_enable(); - - if(true) { - if (default_layer & (1UL << _QWERTY)) { - //RGB_current_mode = rgblight_config.mode; - rgblight_mode(11); - } - else { - rgblight_mode (12); - } - - /*else if (default_layer & (1UL << _DVORAK)) { - rgblight_set_green; - } - //else if (default_layer & (1UL << _WORKMAN)) { - rgblight_set_purple; - } - else { - rgblight_set_teal;*/ - - - } - - -} - -static bool is_capslocked = false; -void led_set_user(uint8_t usb_led) { - if (usb_led & (1<event.pressed) { - SEND_STRING("make alu84:TurboMech:dfu"); - SEND_STRING(SS_TAP(X_ENTER)); - } - return false; - break; - case KC_QMK: - if (!record->event.pressed) { - SEND_STRING("cd QMK/qmk_firmware"); - SEND_STRING(SS_TAP(X_ENTER)); - } - return false; - break; - case KC_RESET: - if (!record->event.pressed) { - #ifdef RGBLIGHT_ENABLE - rgblight_enable(); - rgblight_mode(1); - rgblight_setrgb(255, 255, 255); - #endif - //_delay_ms(2000); - reset_keyboard(); - } - return false; - break; - /*case RGB_MOD: - //led operations - RGB mode change now updates the RGB_current_mode to allow the right RGB mode to be set after reactive keys are released - if (record->event.pressed) { - rgblight_mode(RGB_current_mode); - RGB_current_mode = rgblight_config.mode; - rgblight_step(); - // rgblight_mode(RGB_current_mode); - //RGB_current_mode = rgblight_config.mode; - // _delay_ms(50); - // rgblight_set(); - RGB_current_mode = rgblight_config.mode; - } - else //if (rgblight_config.enable) - { - _delay_ms(50); - rgblight_set(); - //rgblight_mode(rgblight_config.mode); - // eeconfig_update_rgblight(rgblight_config.raw); - } - - return true; - break;*/ - - /*case MO(1): - if (record->event.realeased) { - rgblight_mode(1); - rgblight_set_red; - } - return true; - break;*/ - - /*case KC_CAPS: - if (record->event.pressed) { - rgblight_mode(RGB_current_mode); - register_code(KC_CAPS); - rgblight_mode(1); - rgblight_set_red; - } - else { - unregister_code(KC_CAPS); - rgblight_mode(RGB_current_mode); - - } - return false; - break;*/ - - /* rgblight_mode(RGB_current_mode); - register_code(KC_CAPS); - rgblight_mode(1); - rgblight_set_red; - } - else { - unregister_code(KC_CAPS); - rgblight_mode(RGB_current_mode);*/ - - // } - // return true; - // break; - /*case KC_RESET: - if (record->event.pressed) { - layer_off(_FUNCTION); - rgblight_mode(RGB_current_mode); - RGB_current_mode = rgblight_config.mode; - layer_clear(); - _delay_ms(1000); - reset_keyboard(); - } - else{ - //layer_off(_FUNCTION); - _delay_ms(1000); - rgblight_mode(RGB_current_mode); - RGB_current_mode = rgblight_config.mode; - - //eeconfig_update_rgblight_default(); - } - - return false; - break; - }*/ - - - return true; - break; - - - - - -/*case RGB_MOD: -case RGB_HUI: -case RGB_HUD: -case RGB_SAI: -case RGB_SAD: -case RGB_VAI: -case RGB_VAD: -case RGB_MODE_PLAIN: -case RGB_MODE_BREATHE: -case RGB_MODE_RAINBOW: -case RGB_MODE_SWIRL: -case RGB_MODE_SNAKE: -case RGB_MODE_KNIGHT: -case RGB_MODE_XMAS: -case RGB_MODE_GRADIENT: - if (record->event.pressed) { - rgb_layer_change = false; - } - break; - } - return true;*/ - } - - - return process_record_keymap(keycode, record); - -} - -uint32_t layer_state_set_user(uint32_t state) { -#ifdef RGBLIGHT_ENABLE - uint8_t default_layer = eeconfig_read_default_layer(); - if (rgb_layer_change) { - switch (biton32(state)) { - case _FUNCTION: - rgblight_set_blue; - rgblight_mode(1); - break; - case _QWERTY: - - rgblight_mode(11); - break; - // case _MOUS: - // rgblight_set_yellow; - // rgblight_mode(1); - // break; - //case _MACROS: - //rgblight_set_orange; - //is_overwatch ? rgblight_mode(17) : rgblight_mode(18); - //break; - //case _MEDIA: - //rgblight_set_green; - //rgblight_mode(22); - //break; - default: - if (is_capslocked) { - rgblight_mode(1); - rgblight_set_red; - } - else { if (default_layer & (1UL << _QWERTY)) { - rgblight_mode(11); - } - - else if (default_layer & (1UL << _FUNCTION)) { - rgblight_set_cyan; - } - //else if (default_layer & (1UL << _WORKMAN)) { - // rgblight_set_purple; - // } - else { - rgblight_set_orange; - } - } - rgblight_mode(1); - break; - } - } -#endif - return state; -} - - -!!** possible for later - -void set_single_persistent_default_layer(uint8_t default_layer); - -void set_single_persistent_default_layer(uint8_t default_layer) { - #if defined(AUDIO_ENABLE) && defined(DEFAULT_LAYER_SONGS) - PLAY_SONG(default_layer_songs[default_layer]); - #endif - eeconfig_update_default_layer(1U< @A9entOran9e#6134 - * - * 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 . - */ - -//**!! Currently after reboot the set rgb mode does not persist after reboot. Need to find a way to "save" the rgb mode. Color remains after reboot though. - -#include "turbomech.h" -#include "quantum.h" -#include "action_layer.h" -#include "action.h" -#include "rgblight.h" -//#include "process_unicode.h" - -extern keymap_config_t keymap_config; -extern rgblight_config_t rgblight_config; -bool RGB_INIT = false; -bool TOG_STATUS = false; -bool caps_is_active = false; -int RGB_current_mode; - -void matirx_scan_kb (void) { - if (RGB_INIT) {} - else { - RGB_current_mode = rgblight_config.mode; - RGB_INIT = true; - } - rgblight_mode(RGB_current_mode); // revert RGB to initial mode prior to RGB mode change - TOG_STATUS = false; -} - -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} -/*void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) { - if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) { - rgblight_mode(RGB_current_mode); - layer_on(layer3); - } else { - layer_off(layer3); - } -}*/ - -__attribute__ ((weak)) -bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { - return true; -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case KC_CAPS: - if (record->event.pressed) { - register_code(KC_CAPS); - caps_is_active = !caps_is_active; - if (caps_is_active) { - rgblight_mode(14); - } - else if (!caps_is_active) { - unregister_code(KC_CAPS); - rgblight_mode(RGB_current_mode); - } - } - return false; - break; - - case RGB_MOD: - //led operations - RGB mode change now updates the RGB_current_mode to allow the right RGB mode to be set after reactive keys are released - if (record->event.pressed) { - rgblight_mode(RGB_current_mode); - rgblight_step(); - RGB_current_mode = rgblight_config.mode; - // rgblight_set(); - } - return false; - break; - - case KC_RESET: - if (record->event.pressed) { - rgblight_enable(); - rgblight_mode(1); - rgblight_setrgb(255, 255, 255); - //_delay_ms(2000); - reset_keyboard(); - } - return false; - break; - - /*case _FLIP: //(╯°□°)╯︵ ┻━┻ - if (record->event.pressed) { - register_code(KC_LPRN); - unregister_code(KC_LPRN); - register_code(X(0x00B0)); - unregister_code(X(0x00B0)); - - UC(0x256F); - PROCESS_UNICODE(UC(0x00B0)); - SEND_TAP(UC(0x25A1)); - SEND_TAP(UC(0x00B0)); - SEND_STRING(")"); - SEND_TAP(UC(0x256F)); - SEND_TAP(UC(0xFE35)); - SEND_TAP(UC(0x253B)); - SEND_TAP(UC(0x2501)); - SEND_TAP(UC(0x253B)); - } - return false; - break;*/ - - return true; - break; - } -return process_record_keymap(keycode, record); -} diff --git a/users/turbomech/turbomech.h b/users/turbomech/turbomech.h deleted file mode 100644 index 87fd4da6..00000000 --- a/users/turbomech/turbomech.h +++ /dev/null @@ -1,50 +0,0 @@ -/* Copyright 2017 @TurboMech /u/TurboMech @A9entOran9e#6134 - * - * 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 . - */ - - -#ifndef USERSPACE -#define USERSPACE - -#include "quantum.h" - -// Definine layer names -#define _QWERTY 0 -#define _FUNCTION 1 - -#ifdef RGBLIGHT_ENABLE -//values are HSV (Hue, Sat, Val) - except Sat and Val equal 255 for 100%. -#define rgblight_set_blue rgblight_sethsv (240, 255, 255); -#define rgblight_set_red rgblight_sethsv (0, 255, 255); -#define rgblight_set_green rgblight_sethsv (120, 255, 255); -#define rgblight_set_orange rgblight_sethsv (30, 255, 255); -#define rgblight_set_teal rgblight_sethsv (195, 255, 255); -#define rgblight_set_magenta rgblight_sethsv (300, 255, 255); -#define rgblight_set_yellow rgblight_sethsv (60, 255, 255); -#define rgblight_set_purple rgblight_sethsv (270, 255, 255); -#define rgblight_set_cyan rgblight_sethsv (180, 255, 255); -#define rgblight_set_white rgblight_sethsv (0, 0, 255) -#endif - -//must use KC_RESET in order to have RESET indicate a color/mode -enum userspace_custom_keycodes { - EPRM = SAFE_RANGE, //should always be here - KC_RESET, - KC_MAKE_ALU84, - KC_QMK, - _FLIP, - NEW_SAFE_RANGE -}; -#endif diff --git a/users/twschum/config.h b/users/twschum/config.h deleted file mode 100644 index e69de29b..00000000 diff --git a/users/twschum/readme.md b/users/twschum/readme.md deleted file mode 100644 index b354e4b7..00000000 --- a/users/twschum/readme.md +++ /dev/null @@ -1,14 +0,0 @@ -Copyright 2019 Tim Schumacher @twschum - -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 . diff --git a/users/twschum/rules.mk b/users/twschum/rules.mk deleted file mode 100644 index 9878e6f6..00000000 --- a/users/twschum/rules.mk +++ /dev/null @@ -1,5 +0,0 @@ -SRC += twschum.c -SRC += xtonhasvim.c -ifeq ($(strip $(FLASH_BOOTLOADER)), yes) - OPT_DEFS += -DFLASH_BOOTLOADER -endif diff --git a/users/twschum/twschum.c b/users/twschum/twschum.c deleted file mode 100644 index 2d34f957..00000000 --- a/users/twschum/twschum.c +++ /dev/null @@ -1,257 +0,0 @@ -#include "twschum.h" - -#ifdef TWSCHUM_TAPPING_CTRL_PREFIX -// state for the great state machine of custom actions! -#define TIMEOUT_DELAY 200 // ms -static uint16_t idle_timer; -static bool timeout_is_active = false; - -static bool ctrl_shortcuts_enabled_g = false; -//static bool B_down = 0; // TODO just use top bit from count -//static int8_t B_count = 0; - -#define N_TAPPING_CTRL_KEYS 2 -static struct Tapping_ctrl_key_t special_keys_g[N_TAPPING_CTRL_KEYS] = { - {false, 0, KC_B}, {false, 0, KC_A} -}; - -static inline void start_idle_timer(void) { - idle_timer = timer_read(); - timeout_is_active = true; -} -static inline void clear_state_after_idle_timeout(void) { - idle_timer = 0; - timeout_is_active = false; - - // send timed out plain keys from tapping ctrl mod - for (int i = 0; i < N_TAPPING_CTRL_KEYS; ++i) { - struct Tapping_ctrl_key_t* key = special_keys_g + i; - repeat_send_keys(key->count, key->keycode); - key->count = 0; - } -} - -inline void matrix_scan_user(void) { - if (timeout_is_active && timer_elapsed(idle_timer) > TIMEOUT_DELAY) { - clear_state_after_idle_timeout(); - } -} - -static inline bool tap_ctrl_event(struct Tapping_ctrl_key_t* key, keyrecord_t* record) { - if (!ctrl_shortcuts_enabled_g) { - // normal operation, just send the plain keycode - if (record->event.pressed) { - register_code(key->keycode); - } - else { - unregister_code(key->keycode); - } - return false; - } - key->down = record->event.pressed; - // increment count and reset timer when key pressed - // start the timeout when released - if (key->down) { - ++(key->count); - timeout_is_active = false; - idle_timer = 0; - } - else { - if (key->count) { - start_idle_timer(); - } - } - return false; -} - -static inline bool tap_ctrl_other_pressed(void) { - for (int i = 0; i < N_TAPPING_CTRL_KEYS; ++i) { - struct Tapping_ctrl_key_t* key = special_keys_g + i; - if (key->count) { - if (key->down) { - // another key has been pressed while the leader key is down, - // so send number of ctrl-KEY combos before the other key - repeat_send_keys(key->count, KC_LCTL, key->keycode); - key->count = 0; - } - else { - // another key pressed after leader key released, - // need to send the plain keycode plus potential mods - if (get_mods() & MOD_MASK_CTRL) { - // make sure to send a shift if prssed - repeat_send_keys(key->count, KC_RSHIFT, key->keycode); - } - else { - repeat_send_keys(key->count, key->keycode); - } - key->count = 0; - } - return true; // will send the other keycode - } - } - return true; // safe default -} -#endif /* TWSCHUM_TAPPING_CTRL_PREFIX */ - - -/* Use RGB underglow to indicate layer - * https://docs.qmk.fm/reference/customizing-functionality - */ -// add to quantum/rgblight_list.h -#ifdef RGBLIGHT_ENABLE -static bool rgb_layers_enabled = true; -static bool rgb_L0_enabled = false; - -layer_state_t layer_state_set_user(layer_state_t state) { - if (!rgb_layers_enabled) { - return state; - } - switch (get_highest_layer(state)) { - case _Base: - if (rgb_L0_enabled) { - rgblight_sethsv_noeeprom(_Base_HSV_ON); - } - else { - rgblight_sethsv_noeeprom(_Base_HSV_OFF); - } - break; - case _Vim: - rgblight_sethsv_noeeprom(_Vim_HSV); - break; - case _Fn: - rgblight_sethsv_noeeprom(_Fn_HSV); - break; - case _Nav: - rgblight_sethsv_noeeprom(_Nav_HSV); - break; - case _Num: - rgblight_sethsv_noeeprom(_Num_HSV); - break; - case _Cfg: - rgblight_sethsv_noeeprom(_Cfg_HSV); - break; - case _None: - rgblight_sethsv_noeeprom(_None_HSV); - break; - } - return state; -} -#endif /* RGBLIGHT_ENABLE */ - -/* process_record_vimlayer: handles the VIM_ keycodes from xtonhasvim's vim - * emulation layer - * add process_record_keymap to allow specific keymap to still add keys - * Makes the callstack look like: - * process_record_ - * _quantum - * _kb - * _user - * _keymap - * _vimlayer - */ -__attribute__ ((weak)) -bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { - return true; -} - -/* Return True to continue processing keycode, false to stop further processing - * process_record_keymap to be call by process_record_user in the vim addon */ -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - - /* keymap gets first whack, then vimlayer */ - if(!process_record_keymap(keycode, record)) return false; - if(!process_record_vimlayer(keycode, record)) return false; - - switch (keycode) { - /* KC_MAKE is a keycode to be used with any keymap - * Outputs `make :` - * Holding shift will add the appropriate flashing command (:dfu, - * :teensy, :avrdude, :dfu-util) for a majority of keyboards. - * Holding control will add some commands that will speed up compiling - * time by processing multiple files at once - * For the boards that lack a shift key, or that you want to always - * attempt the flashing part, you can add FLASH_BOOTLOADER = yes to the - * rules.mk of that keymap. - */ - case KC_MAKE: // Compiles the firmware, and adds the flash command based on keyboard bootloader - if (!record->event.pressed) { - uint8_t temp_mod = get_mods(); - uint8_t temp_osm = get_oneshot_mods(); - clear_mods(); clear_oneshot_mods(); - SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP); - #ifndef FLASH_BOOTLOADER - if ( (temp_mod | temp_osm) & MOD_MASK_SHIFT ) { - SEND_STRING(":flash"); - } - #endif - if ( (temp_mod | temp_osm) & MOD_MASK_CTRL) { - SEND_STRING(" -j8 --output-sync"); - } - SEND_STRING(SS_TAP(X_ENTER)); - set_mods(temp_mod); - } - break; - - #ifdef RGBLIGHT_ENABLE - case TG_LAYER_RGB: - if (record->event.pressed) { - rgb_layers_enabled = !rgb_layers_enabled; - } - return false; - case TG_L0_RGB: - if (record->event.pressed) { - rgb_L0_enabled = !rgb_L0_enabled; - } - return false; - #endif - - case SALT_CMD: - if (!record->event.pressed) { - SEND_STRING(SALT_CMD_MACRO); - } - return false; - case LESS_PD: - if (!record->event.pressed) { - SEND_STRING(LESS_PD_MACRO); - } - return false; - case CODE_PASTE: - if (!record->event.pressed) { - SEND_STRING(CODE_PASTE_MACRO); - } - return false; - - #ifdef TWSCHUM_TAPPING_CTRL_PREFIX - case EN_CTRL_SHORTCUTS: - if (record->event.pressed) { - ctrl_shortcuts_enabled_g = !ctrl_shortcuts_enabled_g; - start_idle_timer(); // need to clear out state in some cases - } - return false; - case CTRL_A: - return tap_ctrl_event(&special_keys_g[1], record); - case CTRL_B: - return tap_ctrl_event(&special_keys_g[0], record); - default: - if (record->event.pressed) { - return tap_ctrl_other_pressed(); - } - #endif - } - return true; -} - -#ifdef RGBLIGHT_ENABLE -void matrix_init_user(void) { - // called once on board init - rgblight_enable(); -} -#endif - -void suspend_power_down_user(void) { - // TODO shut off backlighting -} - -void suspend_wakeup_init_user(void) { - // TODO turn on backlighting -} diff --git a/users/twschum/twschum.h b/users/twschum/twschum.h deleted file mode 100644 index e8c9aeff..00000000 --- a/users/twschum/twschum.h +++ /dev/null @@ -1,131 +0,0 @@ -#pragma once -#include -#include "quantum.h" -#include "xtonhasvim.h" - -/************************** - * QMK Features Used - ************************** - * RGBLIGHT_ENABLE - * - Adds layer indication via RGB underglow - * - see the `layer_definitions` enum and following _*_HSV #defines - * - * - * - ************************** - * Custom Feature Flags - ************************** - * - * TWSCHUM_TAPPING_CTRL_PREFIX - * - Adds feature that makes sending nested sequences of C-a, C-b[, C-b, ...] - * as simple as C-a b [b ...] - * - Not necessarily super useful outside specialized nested tmux sessions, - * but it was a fun state-machine to build - * - * TWSCHUM_VIM_LAYER - * - Fork of xtonhasvim, adding vim-emulation - * - * TWSCHUM_IS_MAC - * - Flag for handling media keys and other settings between OSX and Win/Unix - * without having to include bootmagic - * - ************************** - * Features Wishlist - ************************** - * use VIM_Q as macro recorder! - * Dynamic macros - * Leader functions - * Uniicode leader commands??? (symbolic unicode) - * Mac mode vs not: -probably bootmagic or use default with dynamic swap out here - * KC_MFFD(KC_MEDIA_FAST_FORWARD) and KC_MRWD(KC_MEDIA_REWIND) instead of KC_MNXT and KC_MPRV - */ - -/* Each layer gets a color, overwritable per keyboard */ -enum layers_definitions { - _Base, - _Vim, - _Fn, - _Nav, - _Num, - _Cfg, - _None, -}; -#ifdef RGBLIGHT_ENABLE -#define _Base_HSV_ON HSV_WHITE -#define _Base_HSV_OFF 0, 0, 0 -#define _Vim_HSV HSV_ORANGE -#define _Fn_HSV HSV_GREEN -#define _Nav_HSV HSV_AZURE -#define _Num_HSV HSV_GOLD -#define _Cfg_HSV HSV_RED -#define _None_HSV HSV_WHITE -#endif - -enum extra_keycodes { - TWSCHUM_START = VIM_SAFE_RANGE, - KC_MAKE, // types the make command for this keyboard -#ifdef TWSCHUM_TAPPING_CTRL_PREFIX - CTRL_A, - CTRL_B, - EN_CTRL_SHORTCUTS, -#endif -#ifdef RGBLIGHT_ENABLE - TG_LAYER_RGB, // Toggle between standard RGB underglow, and RGB underglow to do layer indication - TG_L0_RGB, // Toggle color on or off of layer0 -#endif - SALT_CMD, // macro - LESS_PD, // macro - CODE_PASTE, // macro - KEYMAP_SAFE_RANGE, // range to start for the keymap -}; -#define SALT_CMD_MACRO "sudo salt \\* cmd.run ''"SS_TAP(X_LEFT) -#define LESS_PD_MACRO "sudo less /pipedream/cache/" -// TODO mac vs linux -#define CODE_PASTE_MACRO SS_LSFT("\n")"```"SS_LSFT("\n")SS_LALT("v")SS_LSFT("\n")"```" - - -/* PP_NARG macro returns the number of arguments passed to it. - * https://groups.google.com/forum/#!topic/comp.std.c/d-6Mj5Lko_s - */ -#define PP_NARG(...) PP_NARG_(__VA_ARGS__,PP_RSEQ_N()) -#define PP_NARG_(...) PP_ARG_N(__VA_ARGS__) -#define PP_MAX_ARGS 64 -#define PP_ARG_N( \ - _1, _2, _3, _4, _5, _6, _7, _8, _9,_10, \ - _11,_12,_13,_14,_15,_16,_17,_18,_19,_20, \ - _21,_22,_23,_24,_25,_26,_27,_28,_29,_30, \ - _31,_32,_33,_34,_35,_36,_37,_38,_39,_40, \ - _41,_42,_43,_44,_45,_46,_47,_48,_49,_50, \ - _51,_52,_53,_54,_55,_56,_57,_58,_59,_60, \ - _61,_62,_63,N,...) N -#define PP_RSEQ_N() 63,62,61,60, \ - 59,58,57,56,55,54,53,52,51,50, \ - 49,48,47,46,45,44,43,42,41,40, \ - 39,38,37,36,35,34,33,32,31,30, \ - 29,28,27,26,25,24,23,22,21,20, \ - 19,18,17,16,15,14,13,12,11,10, \ - 9,8,7,6,5,4,3,2,1,0 - -#define send_keys(...) send_n_keys(PP_NARG(__VA_ARGS__), __VA_ARGS__) -static inline void send_n_keys(int n, ...) { - uint8_t i = 0; - uint16_t keycodes[PP_MAX_ARGS]; - va_list keys; - va_start(keys, n); - for (; i < n; ++i) { - keycodes[i] = (uint16_t)va_arg(keys, int); // cast suppresses warning - register_code(keycodes[i]); - } - for (; n > 0; --n) { - unregister_code(keycodes[n-1]); - } - va_end(keys); -} -#define repeat_send_keys(n, ...) {for (int i=0; i < n; ++i) {send_keys(__VA_ARGS__);}} - -/* State functions for nested c-a & c-b leader keystrokes */ -struct Tapping_ctrl_key_t { - bool down; - int8_t count; - const uint16_t keycode; -}; diff --git a/users/twschum/xtonhasvim.c b/users/twschum/xtonhasvim.c deleted file mode 100644 index a1adf39f..00000000 --- a/users/twschum/xtonhasvim.c +++ /dev/null @@ -1,593 +0,0 @@ - /* Copyright 2015-2017 Christon DeWan * - * 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 "xtonhasvim.h" - - -uint16_t vstate = VIM_START; -static bool yank_was_lines = false; -static bool SHIFTED = false; -static uint32_t mod_override_layer_state = 0; -static uint16_t mod_override_triggering_key = 0; - -static void edit(void) { vstate = VIM_START; layer_clear(); } -#define EDIT edit() - - -static void simple_movement(uint16_t keycode) { - switch(keycode) { - case VIM_B: - register_code(KC_LALT); - tap_code16(LSFT(KC_LEFT)); // select to start of this word - unregister_code(KC_LALT); - break; - case VIM_E: - register_code(KC_LALT); - tap_code16(LSFT(KC_RIGHT)); // select to end of this word - unregister_code(KC_LALT); - break; - case VIM_H: - tap_code16(LSFT(KC_LEFT)); - break; - case VIM_J: - tap_code16(LGUI(KC_LEFT)); - tap_code16(LSFT(KC_DOWN)); - tap_code16(LSFT(KC_DOWN)); - break; - case VIM_K: - tap_code16(LGUI(KC_LEFT)); - tap_code(KC_DOWN); - tap_code16(LSFT(KC_UP)); - tap_code16(LSFT(KC_UP)); - break; - case VIM_L: - tap_code16(LSFT(KC_RIGHT)); - break; - case VIM_W: - register_code(KC_LALT); - tap_code16(LSFT(KC_RIGHT)); // select to end of this word - tap_code16(LSFT(KC_RIGHT)); // select to end of next word - tap_code16(LSFT(KC_LEFT)); // select to start of next word - unregister_code(KC_LALT); - break; - } -} - -static void comma_period(uint16_t keycode) { - switch (keycode) { - case VIM_COMMA: - if (SHIFTED) { - // indent - tap_code16(LGUI(KC_LBRACKET)); - } else { - // toggle comment - tap_code16(LGUI(KC_SLASH)); - } - break; - case VIM_PERIOD: - if (SHIFTED) { - // outdent - tap_code16(LGUI(KC_RBRACKET)); - } - break; - } -} - - -bool process_record_vimlayer(uint16_t keycode, keyrecord_t *record) { - - /****** mod passthru *****/ - if(record->event.pressed && layer_state_is(vim_cmd_layer()) && (IS_MOD(keycode) || keycode == LSFT(KC_LALT))) { - mod_override_layer_state = layer_state; - mod_override_triggering_key = keycode; - // TODO: change this to track key location instead - layer_clear(); - return true; // let the event fall through... - } - if(mod_override_layer_state && !record->event.pressed && keycode == mod_override_triggering_key) { - layer_state_set(mod_override_layer_state); - mod_override_layer_state = 0; - mod_override_triggering_key = 0; - return true; - } - - if (VIM_START <= keycode && keycode <= VIM_ESC) { - if(keycode == VIM_SHIFT) { - SHIFTED = record->event.pressed; - return false; - } - - if (record->event.pressed) { - if(keycode == VIM_START) { - // entry from anywhere - layer_on(vim_cmd_layer()); - vstate = VIM_START; - - // reset state - yank_was_lines = false; - SHIFTED = false; - mod_override_layer_state = 0; - mod_override_triggering_key = 0; - - return false; - } - switch(vstate) { - case VIM_START: - switch(keycode){ - /***************************** - * ground state - *****************************/ - case VIM_A: - if(SHIFTED) { - // tap_code16(LGUI(KC_RIGHT)); - tap_code16(LCTL(KC_E)); - } else { - tap_code(KC_RIGHT); - } - EDIT; - break; - case VIM_B: - register_code(KC_LALT); - register_code(KC_LEFT); - break; - case VIM_C: - if(SHIFTED) { - register_code(KC_LSHIFT); - tap_code16(LGUI(KC_RIGHT)); - unregister_code(KC_LSHIFT); - tap_code16(LGUI(KC_X)); - yank_was_lines = false; - EDIT; - } else { - vstate = VIM_C; - } - break; - case VIM_D: - if(SHIFTED) { - tap_code16(LCTL(KC_K)); - } else { - vstate = VIM_D; - } - break; - case VIM_E: - register_code(KC_LALT); - register_code(KC_RIGHT); - break; - case VIM_G: - if(SHIFTED) { - tap_code(KC_END); - } else { - vstate = VIM_G; - } - break; - case VIM_H: - register_code(KC_LEFT); - break; - case VIM_I: - if(SHIFTED){ - tap_code16(LCTL(KC_A)); - } - EDIT; - break; - case VIM_J: - if(SHIFTED) { - tap_code16(LGUI(KC_RIGHT)); - tap_code(KC_DEL); - } else { - register_code(KC_DOWN); - } - break; - case VIM_K: - register_code(KC_UP); - break; - case VIM_L: - register_code(KC_RIGHT); - break; - case VIM_O: - if(SHIFTED) { - tap_code16(LGUI(KC_LEFT)); - tap_code(KC_ENTER); - tap_code(KC_UP); - EDIT; - } else { - tap_code16(LGUI(KC_RIGHT)); - tap_code(KC_ENTER); - EDIT; - } - break; - case VIM_P: - if(SHIFTED) { - tap_code16(LGUI(KC_LEFT)); - tap_code16(LGUI(KC_V)); - } else { - if(yank_was_lines) { - tap_code16(LGUI(KC_RIGHT)); - tap_code(KC_RIGHT); - tap_code16(LGUI(KC_V)); - } else { - tap_code16(LGUI(KC_V)); - } - } - break; - case VIM_S: - // s for substitute? - if(SHIFTED) { - tap_code16(LGUI(KC_LEFT)); - register_code(KC_LSHIFT); - tap_code16(LGUI(KC_RIGHT)); - unregister_code(KC_LSHIFT); - tap_code16(LGUI(KC_X)); - yank_was_lines = false; - EDIT; - } else { - tap_code16(LSFT(KC_RIGHT)); - tap_code16(LGUI(KC_X)); - yank_was_lines = false; - EDIT; - } - break; - case VIM_U: - if(SHIFTED) { - register_code(KC_LSFT); - tap_code16(LGUI(KC_Z)); - unregister_code(KC_LSHIFT); - } else { - tap_code16(LGUI(KC_Z)); - } - break; - case VIM_V: - if(SHIFTED) { - tap_code16(LGUI(KC_LEFT)); - tap_code16(LSFT(KC_DOWN)); - vstate = VIM_VS; - } else { - vstate = VIM_V; - } - break; - case VIM_W: - register_code(KC_LALT); - tap_code(KC_RIGHT); - tap_code(KC_RIGHT); - tap_code(KC_LEFT); - unregister_code(KC_LALT); - break; - case VIM_X: - // tap_code16(LSFT(KC_RIGHT)); - // tap_code16(LGUI(KC_X)); - register_code(KC_DEL); - break; - case VIM_Y: - if(SHIFTED) { - tap_code16(LGUI(KC_LEFT)); - tap_code16(LSFT(KC_DOWN)); - tap_code16(LGUI(KC_C)); - tap_code(KC_RIGHT); - yank_was_lines = true; - } else { - vstate = VIM_Y; - } - break; - case VIM_COMMA: - case VIM_PERIOD: - comma_period(keycode); - break; - } - break; - case VIM_C: - /***************************** - * c- ...for change. I never use this... - *****************************/ - switch(keycode) { - case VIM_B: - case VIM_E: - case VIM_H: - case VIM_J: - case VIM_K: - case VIM_L: - case VIM_W: - simple_movement(keycode); - tap_code16(LGUI(KC_X)); - yank_was_lines = false; - EDIT; - break; - - case VIM_C: - tap_code16(LGUI(KC_LEFT)); - register_code(KC_LSHIFT); - tap_code16(LGUI(KC_RIGHT)); - unregister_code(KC_LSHIFT); - tap_code16(LGUI(KC_X)); - yank_was_lines = false; - EDIT; - break; - case VIM_I: - vstate = VIM_CI; - break; - default: - vstate = VIM_START; - break; - } - break; - case VIM_CI: - /***************************** - * ci- ...change inner word - *****************************/ - switch(keycode) { - case VIM_W: - tap_code16(LALT(KC_LEFT)); - register_code(KC_LSHIFT); - tap_code16(LALT(KC_RIGHT)); - unregister_code(KC_LSHIFT); - tap_code16(LGUI(KC_X)); - yank_was_lines = false; - EDIT; - default: - vstate = VIM_START; - break; - } - break; - case VIM_D: - /***************************** - * d- ...delete stuff - *****************************/ - switch(keycode) { - case VIM_B: - case VIM_E: - case VIM_H: - case VIM_J: - case VIM_K: - case VIM_L: - case VIM_W: - simple_movement(keycode); - tap_code16(LGUI(KC_X)); - yank_was_lines = false; - vstate = VIM_START; - break; - case VIM_D: - tap_code16(LGUI(KC_LEFT)); - tap_code16(LSFT(KC_DOWN)); - tap_code16(LGUI(KC_X)); - yank_was_lines = true; - vstate = VIM_START; - break; - case VIM_I: - vstate = VIM_DI; - break; - default: - vstate = VIM_START; - break; - } - break; - case VIM_DI: - /***************************** - * ci- ...delete a word... FROM THE INSIDE! - *****************************/ - switch(keycode) { - case VIM_W: - tap_code16(LALT(KC_LEFT)); - register_code(KC_LSHIFT); - tap_code16(LALT(KC_RIGHT)); - unregister_code(KC_LSHIFT); - tap_code16(LGUI(KC_X)); - yank_was_lines = false; - vstate = VIM_START; - default: - vstate = VIM_START; - break; - } - break; - case VIM_V: - /***************************** - * visual! - *****************************/ - switch(keycode) { - case VIM_D: - case VIM_X: - tap_code16(LGUI(KC_X)); - yank_was_lines = false; - vstate = VIM_START; - break; - case VIM_B: - register_code(KC_LALT); - register_code(KC_LSHIFT); - register_code(KC_LEFT); - // leave open for key repeat - break; - case VIM_E: - register_code(KC_LALT); - register_code(KC_LSHIFT); - register_code(KC_RIGHT); - // leave open for key repeat - break; - case VIM_H: - register_code(KC_LSHIFT); - register_code(KC_LEFT); - break; - case VIM_I: - vstate = VIM_VI; - break; - case VIM_J: - register_code(KC_LSHIFT); - register_code(KC_DOWN); - break; - case VIM_K: - register_code(KC_LSHIFT); - register_code(KC_UP); - break; - case VIM_L: - register_code(KC_LSHIFT); - register_code(KC_RIGHT); - break; - case VIM_W: - register_code(KC_LALT); - tap_code16(LSFT(KC_RIGHT)); // select to end of this word - tap_code16(LSFT(KC_RIGHT)); // select to end of next word - tap_code16(LSFT(KC_LEFT)); // select to start of next word - unregister_code(KC_LALT); - break; - case VIM_P: - tap_code16(LGUI(KC_V)); - vstate = VIM_START; - break; - case VIM_Y: - tap_code16(LGUI(KC_C)); - tap_code(KC_RIGHT); - yank_was_lines = false; - vstate = VIM_START; - break; - case VIM_V: - case VIM_ESC: - tap_code(KC_RIGHT); - vstate = VIM_START; - break; - case VIM_COMMA: - case VIM_PERIOD: - comma_period(keycode); - break; - default: - // do nothing - break; - } - break; - case VIM_VI: - /***************************** - * vi- ...select a word... FROM THE INSIDE! - *****************************/ - switch(keycode) { - case VIM_W: - tap_code16(LALT(KC_LEFT)); - register_code(KC_LSHIFT); - tap_code16(LALT(KC_RIGHT)); - unregister_code(KC_LSHIFT); - vstate = VIM_V; - default: - // ignore - vstate = VIM_V; - break; - } - break; - case VIM_VS: - /***************************** - * visual line - *****************************/ - switch(keycode) { - case VIM_D: - case VIM_X: - tap_code16(LGUI(KC_X)); - yank_was_lines = true; - vstate = VIM_START; - break; - case VIM_J: - register_code(KC_LSHIFT); - register_code(KC_DOWN); - break; - case VIM_K: - register_code(KC_LSHIFT); - register_code(KC_UP); - break; - case VIM_Y: - tap_code16(LGUI(KC_C)); - yank_was_lines = true; - tap_code(KC_RIGHT); - vstate = VIM_START; - break; - case VIM_P: - tap_code16(LGUI(KC_V)); - vstate = VIM_START; - break; - case VIM_V: - case VIM_ESC: - tap_code(KC_RIGHT); - vstate = VIM_START; - break; - case VIM_COMMA: - case VIM_PERIOD: - comma_period(keycode); - break; - default: - // do nothing - break; - } - break; - case VIM_G: - /***************************** - * gg, and a grab-bag of other macros i find useful - *****************************/ - switch(keycode) { - case VIM_G: - tap_code(KC_HOME); - break; - // codes b - case VIM_H: - tap_code16(LCTL(KC_A)); - break; - case VIM_J: - register_code(KC_PGDN); - break; - case VIM_K: - register_code(KC_PGUP); - break; - case VIM_L: - tap_code16(LCTL(KC_E)); - break; - default: - // do nothing - break; - } - vstate = VIM_START; - break; - case VIM_Y: - /***************************** - * yoink! - *****************************/ - switch(keycode) { - case VIM_B: - case VIM_E: - case VIM_H: - case VIM_J: - case VIM_K: - case VIM_L: - case VIM_W: - simple_movement(keycode); - tap_code16(LGUI(KC_C)); - tap_code(KC_RIGHT); - yank_was_lines = false; - break; - case VIM_Y: - tap_code16(LGUI(KC_LEFT)); - tap_code16(LSFT(KC_DOWN)); - tap_code16(LGUI(KC_C)); - tap_code(KC_RIGHT); - yank_was_lines = true; - break; - default: - // NOTHING - break; - } - vstate = VIM_START; - break; - } - } else { - /************************ - * key unregister_code events - ************************/ - clear_keyboard(); - } - return false; - } else { - return true; - } -} - diff --git a/users/twschum/xtonhasvim.h b/users/twschum/xtonhasvim.h deleted file mode 100644 index fd9ebd4f..00000000 --- a/users/twschum/xtonhasvim.h +++ /dev/null @@ -1,62 +0,0 @@ - /* Copyright 2015-2017 Christon DeWan - * - * 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 . - */ - -#ifndef USERSPACE -#define USERSPACE - -#include QMK_KEYBOARD_H - -enum xtonhasvim_keycodes { - VIM_START = SAFE_RANGE, // bookend for vim states - VIM_A, - VIM_B, - VIM_C, - VIM_CI, - VIM_D, - VIM_DI, - VIM_E, - VIM_H, - VIM_G, - VIM_I, - VIM_J, - VIM_K, - VIM_L, - VIM_O, - VIM_P, - VIM_S, - VIM_U, - VIM_V, - VIM_VS, // visual-line - VIM_VI, - VIM_W, - VIM_X, - VIM_Y, - VIM_PERIOD, // to support indent/outdent - VIM_COMMA, // and toggle comments - VIM_SHIFT, // avoid side-effect of supporting real shift. - VIM_ESC, // bookend - VIM_SAFE_RANGE // start other keycodes here. -}; - -bool process_record_vimlayer(uint16_t keycode, keyrecord_t *record); - -// NOTE: Define this in keymap.c to return vim layer -extern uint8_t vim_cmd_layer(void); - -extern uint16_t vstate; - - -#endif diff --git a/users/vosechu/config.h b/users/vosechu/config.h deleted file mode 100644 index 837cc60f..00000000 --- a/users/vosechu/config.h +++ /dev/null @@ -1,24 +0,0 @@ -#pragma once - -// this makes it possible to do rolling combos (zx) with keys that -// convert to other keys on hold (z becomes ctrl when you hold it, -// and when this option isn't enabled, z rapidly followed by x -// actually sends Ctrl-x. That's bad.) -#define IGNORE_MOD_TAP_INTERRUPT -#undef PERMISSIVE_HOLD -//#define TAPPING_FORCE_HOLD -//#define RETRO_TAPPING - -#ifndef TAPPING_TOGGLE -#define TAPPING_TOGGLE 2 -#endif - -#ifdef TAPPING_TERM -#undef TAPPING_TERM -#endif -#define TAPPING_TERM 150 - -// Disable action_get_macro and fn_actions, since we don't use these -// and it saves on space in the firmware. -#define NO_ACTION_MACRO -#define NO_ACTION_FUNCTION diff --git a/users/vosechu/readme.md b/users/vosechu/readme.md deleted file mode 100644 index 44789a9f..00000000 --- a/users/vosechu/readme.md +++ /dev/null @@ -1,14 +0,0 @@ -Copyright 2018 Chuck Lauer Vose vosechu@gmail.com @vosechu - -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 . diff --git a/users/vosechu/rules.mk b/users/vosechu/rules.mk deleted file mode 100644 index e346db93..00000000 --- a/users/vosechu/rules.mk +++ /dev/null @@ -1 +0,0 @@ -SRC += vosechu.c diff --git a/users/vosechu/vosechu.c b/users/vosechu/vosechu.c deleted file mode 100644 index 3f58ca26..00000000 --- a/users/vosechu/vosechu.c +++ /dev/null @@ -1,25 +0,0 @@ -#include "vosechu.h" - -// void my_custom_function(void) { - -// } - -// [DV] = { /* ================================================== DVORAK ============================================================ */ -// { KC_1, KC_A, KC_B, KC_C, KC_D, KC_E, _______ , KC_G, KC_H, KC_J, KC_K, KC_L, KC_M }, -// { KC_2, KC_A, KC_B, KC_C, KC_D, KC_E, _______ , KC_G, KC_H, KC_J, KC_K, KC_L, KC_M }, -// { KC_3, KC_A, KC_B, KC_C, KC_D, KC_E, _______ , KC_G, KC_H, KC_J, KC_K, KC_L, KC_M }, -// { KC_4, KC_A, KC_B, KC_C, KC_D, KC_E, KC_F , KC_G, KC_H, KC_J, KC_K, KC_L, KC_M }, -// { KC_5, KC_A, KC_B, KC_C, KC_D, KC_E, KC_F , KC_G, KC_H, KC_J, KC_K, KC_L, KC_M } -// }, - -// bool process_record_user(uint16_t keycode, keyrecord_t *record) { -// if (record->event.pressed) { -// // These also need to be defined in the header file -// switch(keycode) { -// case PAWFIVE: -// SEND_STRING(":pawfive:"); -// return false; -// } -// } -// return true; -// }; diff --git a/users/vosechu/vosechu.h b/users/vosechu/vosechu.h deleted file mode 100644 index 5cd2217e..00000000 --- a/users/vosechu/vosechu.h +++ /dev/null @@ -1,71 +0,0 @@ -#pragma once - -#include "quantum.h" - -// Each layer gets a name for readability, which is then used in the keymap matrix below. -enum userspace_custom_layers { - DV = 0, - QW, - GAM1, - RSE, - LWR, - LFT, - MOUSE -}; - -enum userspace_custom_keycodes { - PAWFIVE = SAFE_RANGE, - MOUKEY, - MS_BTN1, - MS_BTN2, - MS_BTN3 -}; - -// Transparent macro to indicate that this spot is already being pressed -// to activate this layer -#define _LAYER_ KC_TRNS - -// == Dual-action keys on most of the modifiers -#define CTL_ESC CTL_T(KC_ESC) -#define CTL_GRV CTL_T(KC_GRV) -#define ALT_TAB ALT_T(KC_TAB) -#define SFT_SPC SFT_T(KC_SPC) - -// == Macro keys for commonly used apps -// -- Slack -// Move one conversation up/down -#define SLACKUP LALT(LSFT(KC_UP)) -#define SLACKDN LALT(LSFT(KC_DOWN)) - -// -- Browser and OS X -// Activate one tab left/right -#define TAB_LFT LGUI(LSFT(KC_LBRC)) -#define TAB_RGT LGUI(LSFT(KC_RBRC)) -// Go back/forward in history -#define BWSR_BK LGUI(KC_LBRC) -#define BWSR_FW LGUI(KC_RBRC) - -// -- Screen management -// Make window fill the left/right side -#define SCR_LFT HYPR(KC_LEFT) -#define SCR_RGT HYPR(KC_RGHT) -// Make window fill the whole monitor -#define SCR_FUL HYPR(KC_F) - -// == Extended alpha layer toggles -// -- Dvorak -// Pressing U opens up the LWR layer (numpad) -#define LWR_U LT(LWR, KC_U) -// Pressing H opens up the RSE layer (brackets/parens) -#define RSE_H LT(RSE, KC_H) - -// -- Qwerty -// Pressing F opens up the LWR layer (numpad) -#define LWR_F LT(LWR, KC_F) -// Pressing J opens up the RSE layer (brackets/parens) -#define RSE_J LT(RSE, KC_J) - -// -- LFT layer (Works on both Qwerty and Dvorak) -// Pressing Back space or Enter opens up the LFT layer (media/navigation) -#define LFT_BK LT(LFT, KC_BSPC) -#define LFT_ENT LT(LFT, KC_ENT) diff --git a/users/wanleg/config.h b/users/wanleg/config.h deleted file mode 100644 index d2905469..00000000 --- a/users/wanleg/config.h +++ /dev/null @@ -1,51 +0,0 @@ -#pragma once - -//TAPPING_TERM -//tapping term short (<100): on multi-purpose keys, slow taps may not register, but "holds" register easier. multi-tap keys may be difficult to activate. -//tapping term long (>200): holds don't register as easily - noticeable when typing quickly (e.g. shift doesn't want to engage.) - - -//MIGHT HAVE TO SPLIT THIS INTO TWO CONDITIONS -#if defined(TAP_DANCE_ENABLE) && defined(KEYBOARD_lets_split_rev2) || defined(KEYBOARD_keebio_iris_rev2) -//Kailh Coppers activate quickly and don't need a long tapping term -#define TAPPING_TERM 180 - -#elif defined(TAP_DANCE_ENABLE) && defined(KEYBOARD_bigswitch) -#define TAPPING_TERM 700 - -#else -#define TAPPING_TERM 145 -#endif - -//Mousekey Settings -#ifdef MOUSEKEY_ENABLE -#define MOUSEKEY_INTERVAL 16 -#define MOUSEKEY_DELAY 0 -#define MOUSEKEY_TIME_TO_MAX 60 -#define MOUSEKEY_MAX_SPEED 7 -#define MOUSEKEY_WHEEL_DELAY 0 -#endif - -// Disable action_get_macro and fn_actions, since we don't use these -// and it saves on space in the firmware. -#ifndef NO_DEBUG -#define NO_DEBUG -#endif // !NO_DEBUG -#if !defined(NO_PRINT) && !defined(CONSOLE_ENABLE) -#define NO_PRINT -#endif // !NO_PRINT -#define NO_ACTION_MACRO -#define NO_ACTION_FUNCTION -#define NO_ACTION_ONESHOT - - -#define PERMISSIVE_HOLD -//// Disable mod tap interrrupt -//#ifndef IGNORE_MOD_TAP_INTERRUPT -//#define IGNORE_MOD_TAP_INTERRUPT -//#endif // !mod tap interrrupt - -//set max breathing brightness on kbd6x -#if defined(KEYBOARD_kbdfans_kbd6x) -#define RGBLIGHT_EFFECT_BREATHE_MAX 128 // 0-255 -#endif diff --git a/users/wanleg/readme.md b/users/wanleg/readme.md deleted file mode 100644 index 42761112..00000000 --- a/users/wanleg/readme.md +++ /dev/null @@ -1,125 +0,0 @@ -# Contents - * [Git Basics](#git-basics) - * [Update a Feature Branch](#update-a-development-branch) - * [Delete Branch Locally and Remotely](#delete-branch-locally-and-remotely) - * [Merge TEST branch into DEV branch](#merge-test-branch-into-dev-branch) - * [STM32F103C8T6 Setup](#STM32F103C8T6-setup) - * [Bootloader](#bootloader) - * [Flashing QMK](#flashing-qmk) - ---- -## Git Basics -### Update a Development Branch - -This is how to update a working branch with upstream changes. -First we'll update your local master branch. Go to your local project and check out the branch you want to merge into (your local master branch) -```bash -$ git checkout master -``` - -Fetch the remote, bringing the branches and their commits from the remote repository. -You can use the -p, --prune option to delete any remote-tracking references that no longer exist in the remote. Commits to master will be stored in a local branch, remotes/origin/master -```bash -$ git fetch -p origin -``` - -Merge the changes from origin/master into your local master branch. This brings your master branch in sync with the remote repository, without losing your local changes. If your local branch didn't have any unique commits, Git will instead perform a "fast-forward". -```bash -$ git merge origin/master -``` - -Checkout the branch you want to merge into -```bash -$ git checkout -``` - -Merge your (now updated) master branch into your feature branch to update it with the latest changes from your team. -```bash -$ git merge master -``` - -This will open your git-configured text editor. Edit the message as desired, save, and exit the editor. - -The above steps only update your local feature branch. To update it on GitHub, push your changes. -```bash -$ git push origin -``` - -### Delete Branch Locally and Remotely - -Executive Summary -```bash -$ git push --delete -$ git branch -d -``` -Note that in most cases the remote name is origin. - -Delete Local Branch -To delete the local branch use one of the following: -```bash -$ git branch -d branch_name -$ git branch -D branch_name -``` -Note: The -d option is an alias for --delete, which only deletes the branch if it has already been fully merged in its upstream branch. You could also use -D, which is an alias for --delete --force, which deletes the branch "irrespective of its merged status." [Source: man git-branch] - -Delete Remote Branch [Updated on 8-Sep-2017] -As of Git v1.7.0, you can delete a remote branch using -```bash -$ git push --delete -``` -which might be easier to remember than -```bash -$ git push : -``` -which was added in Git v1.5.0 "to delete a remote branch or a tag." - -Starting on Git v2.8.0 you can also use `git push` with the `-d` option as an alias for `--delete`. - -Therefore, the version of Git you have installed will dictate whether you need to use the easier or harder syntax. - -### Merge TEST branch into DEV branch - -Executive Summary -```bash -$ git checkout DEV -$ git merge TEST -$ git push DEV -$ git branch -d TEST -$ git push :TEST -``` -Note that in most cases the remote name is origin. -The above code will merge, push to remote, and delete both the local and remote TEST branches - ---- -## STM32F103C8T6 Setup -Cheap "Blue/Black Pills" typically do not come with a bootloader installed. The Black Pill uses [generic_boot20_pb12.bin](https://github.com/rogerclarkmelbourne/STM32duino-bootloader/blob/master/binaries/generic_boot20_pb12.bin). The Blue Pill uses [generic_boot20_pc13.bin](https://github.com/rogerclarkmelbourne/STM32duino-bootloader/blob/master/binaries/generic_boot20_pc13.bin). -The following instructions have been adapted from [here](http://wiki.stm32duino.com/index.php?title=Burning_the_bootloader). -### Bootloader -Flashing a bootloader on to a Black Pill can be done via a USB to Serial converter (e.g. CP2102). This process should be roughly the same for all F103 boards. - -1. Download the correct bootloader binary -2. Set the 'boot 0' pin/jumper high, and 'boot 1' low - B0+ to center pin - B1- to center pin -3. Connect the board to the PC using a USB to serial converter - RX to PA9 - TX to PA10 - GND to Ground - 3.3V to 3.3 Volts -4. Download and install __Flash Loader Demonstrator__ from [here](http://www.st.com/content/st_com/en/products/development-tools/software-development-tools/stm32-software-development-tools/stm32-programmers/flasher-stm32.html) -5. Use __Flash Loader Demonstrator__ to flash the bootloader - Ensure the correct COM port is selected. Leave other options with their default values/selections. - Use the "Download to Device" option, with "Erase necessary pages" selected -6. After a successful flash, set 'boot 0' pin/jumper low - B0- to center pin - B1- to center pin (no change) - -### Flashing QMK -As of April 2019, the `:dfu-util` target doesn't work on a \*Pill. You will need to use dfu-util directly. -1. Use QMK to build your `.bin` -2. Run `dfu-util.exe -d 1eaf:0003 -a 2 -D YOUR_FIRMWARE.bin"` - If this is the first QMK flash on the \*Pill, you will need to synchronize your Reset Button-push with starting the command. By default, the \*Pill only stays in bootloader mode for about 3 seconds before returning to normal operation. - -See [this page](https://docs.qmk.fm/#/faq_build?id=unknown-device-for-dfu-bootloader) if Windows can't see anything to upload to. - ---- diff --git a/users/wanleg/rules.mk b/users/wanleg/rules.mk deleted file mode 100644 index eb66a49e..00000000 --- a/users/wanleg/rules.mk +++ /dev/null @@ -1,45 +0,0 @@ -SRC += wanleg.c tapdances.c - -TAP_DANCE_ENABLE = yes -MOUSEKEY_ENABLE = yes - -#If using a ProMicro and it has the QMK DFU bootloader instead of Caterina, -#run "make : dfu=qmk" when compiling to ensure it is flagged properly after being flashed -ifeq ($(strip $(dfu)), qmk) - BOOTLOADER = qmk-dfu -endif - -#use alternate settings for boards using ProMicro instead of Micro -#example usage: make 4x4:wanleg PM=yes -ifeq ($(strip $(PM)), yes) - OPT_DEFS += -DPRO_MICRO -endif - -#use alternate settings for boards using "Adafruit Feather 32u4 Bluefruit LE" instead of Micro -#example usage: make 5x5:wanleg BT=yes -ifeq ($(strip $(BT)), yes) - #opt_defs for alternate pin usage - OPT_DEFS += -DBLUEFRUIT - #Adafruit Bluefruit controller settings - BLUETOOTH = AdafruitBLE - BLUETOOTH_ENABLE = yes - F_CPU = 8000000 - CONSOLE_ENABLE = no # Console for debug(+400) - COMMAND_ENABLE = no # Commands for debug and configuration - RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -endif - -#move numpad to Left/Centre/Right(default) on 5x15 boards -#example usage: make 4x4:wanleg padc=yes -ifeq ($(strip $(padc)), yes) - OPT_DEFS += -DPADC -endif -ifeq ($(strip $(padl)), yes) - OPT_DEFS += -DPADL -endif - -#change gherkin orientation (i.e. move USB port from right side to left side) -#example usage: make gherkin:wanleg flip=yes -ifeq ($(strip $(flip)), yes) - OPT_DEFS += -DFLIP -endif \ No newline at end of file diff --git a/users/wanleg/tapdances.c b/users/wanleg/tapdances.c deleted file mode 100644 index 1be5636d..00000000 --- a/users/wanleg/tapdances.c +++ /dev/null @@ -1,264 +0,0 @@ -//Tap Dance Settings -#include "wanleg.h" - -//audio settings for one of the tap dances below -#ifdef AUDIO_ENABLE - float lyrup_song[][2] = SONG(MUSIC_ON_SOUND); - float lyrdown_song[][2] = SONG(MUSIC_OFF_SOUND); -#endif - -///// QUAD FUNCTION TAP DANCE GENERAL SETUP SECTION START ///// -///// (no need to edit this section) ///// -//Enums used to clearly convey the state of the tap dance -enum { - SINGLE_TAP = 1, - SINGLE_HOLD = 2, - DOUBLE_TAP = 3, - DOUBLE_HOLD = 4, - DOUBLE_SINGLE_TAP = 5, //send SINGLE_TAP twice - NOT DOUBLE_TAP - TRIPLE_TAP = 6, - TRIPLE_HOLD = 7, - TRIPLE_SINGLE_TAP = 8 - // Add more enums here if you want for triple, quadruple, etc. -}; - -typedef struct { - bool is_press_action; - int state; -} tap; - -int cur_dance (qk_tap_dance_state_t *state) { - if (state->count == 1) { - //If count = 1, and it has been interrupted - it doesn't matter if it is pressed or not: Send SINGLE_TAP - if (state->interrupted || !state->pressed) return SINGLE_TAP; - if (state->interrupted) return SINGLE_TAP; - else return SINGLE_HOLD; - } - //If count = 2, and it has been interrupted - assume that user is trying to type the letter associated - //with single tap. - else if (state->count == 2) { - if (state->interrupted) return DOUBLE_SINGLE_TAP; - else if (state->pressed) return DOUBLE_HOLD; - else return DOUBLE_TAP; - } - - //If count = 3, and it has been interrupted - assume that user is trying to type the letter associated - //with double tap. - else if (state->count == 3) { - if (state->interrupted) return TRIPLE_SINGLE_TAP; - else if (state->pressed) return TRIPLE_HOLD; - else return TRIPLE_TAP; - } - else return 9; //magic number. At some point this method will expand to work for more presses -} -///// QUAD FUNCTION TAP DANCE GENERAL SETUP SECTION END ///// -///// QUAD FUNCTION TAP DANCE PERSONALIZATION SECTION START ///// -//instantiate 'tap' for the 'CAD' tap dance. -static tap CADtap_state = { - .is_press_action = true, - .state = 0 -}; - -void CAD_finished (qk_tap_dance_state_t *state, void *user_data) { - CADtap_state.state = cur_dance(state); - switch (CADtap_state.state) { - case SINGLE_TAP: - //register_code(KC_SPC); - SEND_STRING(SS_LGUI("l")); - #ifdef BACKLIGHT_ENABLE - backlight_level(3); - #endif - break; - case SINGLE_HOLD: - //register_code(KC_NO); - //take a screenshot of a single window, open Paint and paste - SEND_STRING(SS_LALT(SS_TAP(X_PSCREEN)) SS_LGUI("r")); - wait_ms(500); - SEND_STRING("mspaint" SS_TAP(X_ENTER)); - wait_ms(700); - SEND_STRING(SS_LCTRL("v")); - break; //register this keycode when button is held - case DOUBLE_TAP: - //register_code(KC_ENT); - SEND_STRING(SS_LCTRL(SS_LALT(SS_TAP(X_DELETE)))); - #ifdef BACKLIGHT_ENABLE - backlight_level(0); - #endif - break; - //case DOUBLE_HOLD: register_code(KC_NO); break; //register this keycode when button is tapped and then held - case DOUBLE_HOLD: - reset_keyboard(); - break; //register this keycode when button is tapped and then held - case TRIPLE_TAP: - SEND_STRING("wanleg@github.com"); - break; - case TRIPLE_HOLD: - set_single_persistent_default_layer(1); - #ifdef AUDIO_ENABLE - stop_all_notes(); - PLAY_SONG(lyrup_song); - #endif - break; - } -} - -void CAD_reset (qk_tap_dance_state_t *state, void *user_data) { - switch (CADtap_state.state) { -//nothing to do - } - CADtap_state.state = 0; -} - -//instantiate 'tap' for the 'RST' tap dance. -static tap RSTtap_state = { - .is_press_action = true, - .state = 0 -}; - -void RST_finished (qk_tap_dance_state_t *state, void *user_data) { - RSTtap_state.state = cur_dance(state); - switch (RSTtap_state.state) { - case SINGLE_TAP: register_code(KC_LCTL); break; - case SINGLE_HOLD: register_code(KC_LCTL); break; - case DOUBLE_TAP: reset_keyboard(); break; - case DOUBLE_SINGLE_TAP: register_code(KC_LCTL); unregister_code(KC_LCTL); register_code(KC_LCTL); break; - } -} - -void RST_reset (qk_tap_dance_state_t *state, void *user_data) { - switch (RSTtap_state.state) { - case SINGLE_TAP: unregister_code(KC_LCTL); break; - case SINGLE_HOLD: unregister_code(KC_LCTL); break; - case DOUBLE_SINGLE_TAP: unregister_code(KC_LCTL); break; - } - RSTtap_state.state = 0; -} - -//instantiate 'tap' for the 'LYR' tap dance. -static tap LYRtap_state = { - .is_press_action = true, - .state = 0 -}; - -void LYR_finished (qk_tap_dance_state_t *state, void *user_data) { - LYRtap_state.state = cur_dance(state); - switch (LYRtap_state.state) { - case SINGLE_TAP: register_code(KC_PSLS); break; - case DOUBLE_TAP: set_single_persistent_default_layer(_GK); break; - case DOUBLE_SINGLE_TAP: register_code(KC_PSLS); unregister_code(KC_PSLS); register_code(KC_PSLS); - } -} - -void LYR_reset (qk_tap_dance_state_t *state, void *user_data) { - switch (LYRtap_state.state) { - case SINGLE_TAP: unregister_code(KC_PSLS); break; - case DOUBLE_TAP: set_single_persistent_default_layer(_GK); break; - case DOUBLE_SINGLE_TAP: unregister_code(KC_PSLS); - } - LYRtap_state.state = 0; -} - -//instantiate 'tap' for the 'LYR75' tap dance. -static tap LYR75tap_state = { - .is_press_action = true, - .state = 0 -}; - -void LYR75_finished (qk_tap_dance_state_t *state, void *user_data) { - LYR75tap_state.state = cur_dance(state); - switch (LYR75tap_state.state) { - case SINGLE_TAP: register_code(KC_PSLS); break; - case DOUBLE_TAP: set_single_persistent_default_layer(_GK); break; - case DOUBLE_SINGLE_TAP: register_code(KC_PSLS); unregister_code(KC_PSLS); register_code(KC_PSLS); - } -} - -void LYR75_reset (qk_tap_dance_state_t *state, void *user_data) { - switch (LYR75tap_state.state) { - case SINGLE_TAP: unregister_code(KC_PSLS); break; - case DOUBLE_TAP: set_single_persistent_default_layer(_GK); break; - case DOUBLE_SINGLE_TAP: unregister_code(KC_PSLS); - } - LYR75tap_state.state = 0; -} - -//instantiate 'tap' for the 'LYR50' tap dance. -static tap LYR50tap_state = { - .is_press_action = true, - .state = 0 -}; - -void LYR50_finished (qk_tap_dance_state_t *state, void *user_data) { - LYR50tap_state.state = cur_dance(state); - switch (LYR75tap_state.state) { - case SINGLE_TAP: register_code(KC_PSLS); break; - case DOUBLE_TAP: set_single_persistent_default_layer(GK50); break; - case DOUBLE_SINGLE_TAP: register_code(KC_PSLS); unregister_code(KC_PSLS); register_code(KC_PSLS); - } -} - -void LYR50_reset (qk_tap_dance_state_t *state, void *user_data) { - switch (LYR50tap_state.state) { - case SINGLE_TAP: unregister_code(KC_PSLS); break; - case DOUBLE_TAP: set_single_persistent_default_layer(GK50); break; - case DOUBLE_SINGLE_TAP: unregister_code(KC_PSLS); - } - LYR50tap_state.state = 0; -} - -//instantiate 'tap' for the 'BSW' tap dance. -static tap BSWtap_state = { - .is_press_action = true, - .state = 0 -}; - -void BSW_finished (qk_tap_dance_state_t *state, void *user_data) { - BSWtap_state.state = cur_dance(state); - switch (BSWtap_state.state) { - case SINGLE_TAP: register_code(KC_ENTER); break; - case SINGLE_HOLD: - set_single_persistent_default_layer(0); - #ifdef AUDIO_ENABLE - stop_all_notes(); - PLAY_SONG(lyrdown_song); - #endif - break; - case DOUBLE_TAP: - register_code(KC_LCTRL); - register_code(KC_C); - break; - case DOUBLE_HOLD: - reset_keyboard(); - break; //register this keycode when button is tapped and then held - } -} - -void BSW_reset (qk_tap_dance_state_t *state, void *user_data) { - switch (BSWtap_state.state) { - case SINGLE_TAP: unregister_code(KC_ENTER); break; - case DOUBLE_TAP: - unregister_code(KC_LCTRL); - unregister_code(KC_C); - break; - } - BSWtap_state.state = 0; -} - -///// QUAD FUNCTION TAP DANCE PERSONALIZATION SECTION END ///// - -//Tap Dance Definitions -//THIS SECTION HAS TO BE AT THE END OF THE TAP DANCE SECTION -qk_tap_dance_action_t tap_dance_actions[] = { - [TD_SFT_CAPS] = ACTION_TAP_DANCE_DOUBLE(KC_LSFT, KC_CAPS) -// Other declarations would go here, separated by commas, if you have them - ,[TD_Q_ESC] = ACTION_TAP_DANCE_DOUBLE(KC_Q, KC_ESC) - ,[RST_TAP_DANCE] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, RST_finished, RST_reset) - ,[CAD_TD] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, CAD_finished, CAD_reset) - ,[LYR_TAP_DANCE] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, LYR_finished, LYR_reset) - ,[LYR75_TAP_DANCE] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, LYR75_finished, LYR75_reset) - ,[LYR50_TAP_DANCE] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, LYR50_finished, LYR50_reset) - ,[BSW_TAP_DANCE] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, BSW_finished, BSW_reset) -}; - -//In Layer declaration, add tap dance item in place of a key code -//TD(TD_SFT_CAPS) diff --git a/users/wanleg/wanleg.c b/users/wanleg/wanleg.c deleted file mode 100644 index aa7b1c9a..00000000 --- a/users/wanleg/wanleg.c +++ /dev/null @@ -1,176 +0,0 @@ -#include "wanleg.h" - -// Defines actions for my global custom keycodes. Defined in wanleg.h file -// Then runs the _keymap's record handier if not processed here -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case QWERTY: - if (record->event.pressed) { - set_single_persistent_default_layer(_QW); - #if defined(RGBLIGHT_ENABLE) - rgblight_sethsv_noeeprom(0,0,128); - rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING); - #endif - } - return false; - break; - case GHERKIN: - if (record->event.pressed) { - set_single_persistent_default_layer(_GK); - #if defined(RGBLIGHT_ENABLE) - rgblight_sethsv_noeeprom(128,255,64); - #endif - } - return false; - break; - case gGHERKIN: - if (record->event.pressed) { - set_single_persistent_default_layer(gGK); - #if defined(RGBLIGHT_ENABLE) - rgblight_sethsv_noeeprom(128,255,128); - rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT); - #endif - } - return false; - break; - case ONEHAND: - if (record->event.pressed) { - set_single_persistent_default_layer(ONE); - } - return false; - break; - case NUMPAD: - if (record->event.pressed) { - set_single_persistent_default_layer(PAD); - } - return false; - break; - case GHERKIN50: - if (record->event.pressed) { - set_single_persistent_default_layer(GK50); - } - return false; - break; - case SUBTER: - if (record->event.pressed) { - layer_on(SUB); - } else { - layer_off(SUB); - } - return false; - break; - case SUPRA: - if (record->event.pressed) { - layer_on(SUP); - } else { - layer_off(SUP); - } - return false; - break; - case NUMBER: - if (record->event.pressed) { - layer_on(NUM); - } else { - layer_off(NUM); - } - return false; - break; - case DIRECTION: - if (record->event.pressed) { - layer_on(DIR); - } else { - layer_off(DIR); - } - return false; - break; - case ETCETERA: - if (record->event.pressed) { - layer_on(ETC); - } else { - layer_off(ETC); - } - return false; - break; - case gNUMBER: - if (record->event.pressed) { - layer_on(gNUM); - } else { - layer_off(gNUM); - } - return false; - break; - case gDIRECTION: - if (record->event.pressed) { - layer_on(gDIR); - } else { - layer_off(gDIR); - } - return false; - break; - case gETCETERA: - if (record->event.pressed) { - layer_on(gETC); - } else { - layer_off(gETC); - } - return false; - break; - case FUNCTION: - if (record->event.pressed) { - layer_on(_FN); - } else { - layer_off(_FN); - } - return false; - break; - //on RESET, underglow red if present - case RESET: - if (record->event.pressed) { - #if defined(RGBLIGHT_ENABLE) - rgblight_enable_noeeprom(); // enables Rgb, without saving settings - rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); - rgblight_sethsv_noeeprom_red(); - #endif - } - return true; // Let QMK send the press/release events as normal - break; - } - return true; -} - -/// Turn off LEDs on ProMicros of Let's Split /// -// LEDs only on by default on Let's Split -// Add reconfigurable functions here, for keymap customization -// This allows for a global, userspace functions, and continued -// customization of the keymap. Use _keymap instead of _user -// functions in the keymaps -__attribute__ ((weak)) -void matrix_init_keymap(void) {} - -// Call user matrix init, then call the keymap's init function -void matrix_init_user(void) { -//turn off pro micro LEDs -#if defined(KEYBOARD_lets_split_rev2) - DDRD &= ~(1<<5); - PORTD &= ~(1<<5); - - DDRB &= ~(1<<0); - PORTB &= ~(1<<0); -#endif - -//disable backlight breathing for keyboard using random flashing RGB LEDs for backlight -//(breathing provides insufficient power to integrated LED IC) -#if defined(KEYBOARD_kbdfans_kbd6x) && defined(BACKLIGHT_BREATHING) - breathing_disable(); -#endif - matrix_init_keymap(); -} - -//at end of firmware startup process, change powerup default layer and underglow colour for kbd6x -void keyboard_post_init_user(void) { - #if defined(KEYBOARD_kbdfans_kbd6x) - set_single_persistent_default_layer(_QW); - rgblight_mode_noeeprom(RGBLIGHT_MODE_SNAKE + 5); - rgblight_sethsv_noeeprom(0,0,128); - #endif -} diff --git a/users/wanleg/wanleg.h b/users/wanleg/wanleg.h deleted file mode 100644 index 2aea1a31..00000000 --- a/users/wanleg/wanleg.h +++ /dev/null @@ -1,322 +0,0 @@ -#pragma once - -#include "quantum.h" - -// Define layer names and order -#if defined(KEYBOARD_40percentclub_gherkin) || defined(KEYBOARD_kbdfans_kbd6x) -enum userspace_layers { - gGK = 0, - gNUM, - gDIR, - gETC, - _GK, - _QW, - ONE, - SUB, - SUP, - NUM, - DIR, - ETC, - _FN, - PAD, - GK50, -}; -#elif KEYBOARD_40percentclub_5x5 -enum userspace_layers { - GK50 = 0, - _GK, - _QW, - PAD, - gNUM, - gDIR, - gETC, - gGK, - ONE, - SUB, - SUP, - NUM, - DIR, - ETC, - _FN, -}; -#else - enum userspace_layers { - _GK = 0, - _QW, - PAD, - ONE, - SUB, - SUP, - NUM, - DIR, - ETC, - gGK, - gNUM, - gDIR, - gETC, - _FN, - GK50, -}; -#endif - -enum userspace_custom_keycodes { - gGHERKIN = SAFE_RANGE, - GHERKIN, - QWERTY, - ONEHAND, - SUBTER, - SUPRA, - NUMBER, - DIRECTION, - ETCETERA, - gNUMBER, - gDIRECTION, - gETCETERA, - FUNCTION, - NUMPAD, - GHERKIN50, - -}; - -//Tap Dance Declarations (list of my tap dance configurations) -#ifdef TAP_DANCE_ENABLE -enum { - TD_SFT_CAPS = 0 - ,TD_Q_ESC - ,CAD_TD - ,RST_TAP_DANCE - ,LYR_TAP_DANCE - ,LYR50_TAP_DANCE - ,LYR75_TAP_DANCE - ,BSW_TAP_DANCE -}; -#endif - -// Since our quirky block definitions are basically a list of comma separated -// arguments, we need a wrapper in order for these definitions to be -// expanded before being used as arguments to the LAYOUT_xxx macro. -#if (!defined(LAYOUT) && defined(KEYMAP)) -#define LAYOUT KEYMAP -#endif - -#define KEYMAP_wrapper(...) LAYOUT(__VA_ARGS__) -#define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__) -#define LAYOUT_ortho_3x10_wrapper(...) LAYOUT_ortho_3x10(__VA_ARGS__) -#define LAYOUT_ortho_4x4_wrapper(...) LAYOUT_ortho_4x4(__VA_ARGS__) -#define LAYOUT_ortho_4x12_wrapper(...) LAYOUT_ortho_4x12(__VA_ARGS__) -#define LAYOUT_ortho_5x5_wrapper(...) LAYOUT_ortho_5x5(__VA_ARGS__) -#define LAYOUT_ortho_5x10_wrapper(...) LAYOUT_ortho_5x10(__VA_ARGS__) -#define LAYOUT_ortho_5x15_wrapper(...) LAYOUT_ortho_5x15(__VA_ARGS__) - -// Blocks for each of the major keyboard layouts -// Organized so we can quickly adapt and modify all of them -// at once, rather than for each keyboard, one at a time. -// And this allows for much cleaner blocks in the keymaps. - -// NOTE: These are all the same length. If you do a search/replace -// then you need to add/remove underscores to keep the -// lengths consistent. - - -/* Gherkin - * .-----------------------------------------------------------------------------------------. - * | Q//ESC | W | E | R | T | Y | U | I | O | P | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | A | S | D | F | G | H | J | K | L | SPACE | - * | | | | | | | | | |SFThold | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | Z | X | C | V/gNUM | B/gETC | N/Fn | M/gDIR | ,/GUI | ./ALT | BSPC | - * | SFThold| | | | | | | | |CTRLhold| - * '-----------------------------------------------------------------------------------------' - */ -#define _______________Gherkin_Row_0_______________ TD(TD_Q_ESC), KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P -#define _______________Gherkin_Row_1_______________ KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, SFT_T(KC_SPC) -#define _______________Gherkin_Row_2_______________ SFT_T(KC_Z), KC_X, KC_C, LT(gNUM,KC_V), LT(gETC,KC_B), LT(_FN,KC_N), LT(gDIR,KC_M), GUI_T(KC_COMM), ALT_T(KC_DOT), CTL_T(KC_BSPC) - -/* Gherkin Directional Keys - * .-----------------------------------------------------------------------------------------. - * | TAB | up | | INS | CTRL | SHIFT | PgUp | HOME | - | = | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | left | down | right | PrScr | SHIFT | CTRL | PgDn | END | [ | ] | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | P-Brk | | | | | | | RGUI | ALT | / | - * '-----------------------------------------------------------------------------------------' - */ -#define _______________Gherkin_DIR_0_______________ KC_TAB, KC_UP, _______, KC_INS, KC_LCTL, KC_RSFT, KC_PGUP, KC_HOME, KC_MINS, KC_EQL -#define _______________Gherkin_DIR_1_______________ KC_LEFT, KC_DOWN, KC_RGHT, KC_PSCR, KC_LSFT, KC_RCTL, KC_PGDN, KC_END, KC_LBRC, KC_RBRC -#define _______________Gherkin_DIR_2_______________ KC_PAUS, _______, _______, _______, _______, _______, _______, KC_RGUI, KC_LALT, KC_SLSH - -/* Gherkin Numbers - * .-----------------------------------------------------------------------------------------. - * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | F11 | F12 | | | | ENTER | SHIFT | GUI | ./ALT | BSPC | - * | | | | | | | | | |CTRLhold| - * '-----------------------------------------------------------------------------------------' - */ -#define _______________Gherkin_NUM_0_______________ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10 -#define _______________Gherkin_NUM_1_______________ KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0 -#define _______________Gherkin_NUM_2_______________ KC_F11, KC_F12, _______,_______, _______, KC_ENT, KC_RSFT, KC_RGUI, ALT_T(KC_DOT), CTL_T(KC_BSPC) - -/* Gherkin Et Cetera - * .-----------------------------------------------------------------------------------------. - * | ` | mUP | | ESC | RESET | SHIFT | mScrDn | mScrUp | | \ | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | mLeft | mDown | mRight | | SHIFT | mBtn3 | mBtn1 | mBtn2 | ; | ' | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | Sft//Cp| CAPS | | | | C-A-D | mScrL | mScrR | ALT | DEL | - * '-----------------------------------------------------------------------------------------' - */ -#define _______________Gherkin_ETC_0_______________ KC_GRV, KC_MS_U, _______,KC_ESC, RESET, KC_RSFT, KC_WH_D, KC_WH_U, _______, KC_BSLS -#define _______________Gherkin_ETC_1_______________ KC_MS_L, KC_MS_D, KC_MS_R,_______, KC_LSFT, KC_BTN3, KC_BTN1, KC_BTN2, KC_SCLN, KC_QUOT -#define _______________Gherkin_ETC_2_______________ TD(TD_SFT_CAPS),KC_CAPS, _______,_______, _______, LALT(LCTL(KC_DEL)), KC_WH_L, KC_WH_R, KC_LALT, KC_DEL - -/* Gherkin-Like - * .-----------------------------------------------------------------------------------------------------------. - * | ESC | Q//ESC | W | E | R | T | Y | U | I | O | P | BSPC | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | TAB | A | S | D | F | G | H | J | K | L | SPACE | ' | - * | | | | | | | | | | |SFThold | | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * |SFT/CAPS| Z | X | C | V/NUM | B/ETC | N/Fn | M/DIR | ,/GUI | ./ALT | BSPC | ENT/SFT| - * | |SFThold | | | | | | | | |CTRLhold| | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | LCTRL | LGUI | ALT | ONEHAND| NUM | ETC | SPACE | DIR | RGUI | ALT | DEL | CTRL | - * '-----------------------------------------------------------------------------------------------------------' - */ -#define _______________GherkinLike_0_______________ KC_ESC, _______________Gherkin_Row_0_______________, KC_BSPC -#define _______________GherkinLike_1_______________ KC_TAB, _______________Gherkin_Row_1_______________, KC_QUOT -#define _______________GherkinLike_2_______________ TD(TD_SFT_CAPS), SFT_T(KC_Z), KC_X, KC_C, LT(NUM, KC_V),LT(ETC, KC_B),LT(_FN,KC_N), LT(DIR, KC_M), GUI_T(KC_COMM), ALT_T(KC_DOT), CTL_T(KC_BSPC), SFT_T(KC_ENT) -#define _______________GherkinLike_3_______________ KC_LCTL, KC_LGUI, KC_LALT, KC_LALT, NUMBER, ETCETERA, KC_SPC,DIRECTION, KC_RGUI, KC_RALT, KC_DEL, KC_RCTL -#define _______________GherkinLike_3_OneHand_______ KC_LCTL, KC_LGUI, KC_LALT, ONEHAND, NUMBER, ETCETERA, KC_SPC,DIRECTION, KC_RGUI, KC_RALT, ONEHAND, KC_RCTL - -/* Qwerty - * .-------------------------------------------------------------------------------------. - * | Esc | Q | W | E | R | T | Y | U | I | O | P | BSPC | - * |-------+------+------+------+------+-------------+------+------+------+------+-------| - * | Tab | A | S | D | F | G | H | J | K | L | ; | ' | - * |-------+------+------+------+------+------|------+------+------+------+------+-------| - * |Sft/Cps| Z | X | C | V | B | N | M | , | . | / |ENT/SFT| - * |-------+------+------+------+------+------+------+------+------+------+------+-------| - * | LCTRL | LGUI | ALT | ALT | SUB | SHIFT| SPACE| SUP | RGUI | RALT | DEL | CTRL | - * '-------------------------------------------------------------------------------------' - */ -#define _______________Qwerty_Row__0_______________ KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC -#define _______________Qwerty_Row__1_______________ KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT -#define _______________Qwerty_Row__2_______________ TD(TD_SFT_CAPS), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT) -#define _______________Qwerty_Row__3_______________ KC_LCTL, KC_LGUI, KC_LALT, KC_LALT, SUBTER, KC_LSFT, KC_SPC, SUPRA, KC_RGUI, KC_RALT, KC_DEL, KC_RCTL - -/* SUPRA - * .-----------------------------------------------------------------------------------------------------------. - * | RESET | TAB | up | | INS | CTRL | SHIFT | PgUp | Home | - | = | DEL | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | | left | down | right | PrScr | SHIFT | CTRL | PgDn | End | [ | ] | \ | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | | P-Brk | | | | | | | RGUI | ALT | | | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | | | | | | | | | | | | | - * '-----------------------------------------------------------------------------------------------------------' - */ -#define ________________SUPRA_Row_0________________ RESET, KC_TAB, KC_UP, _______, KC_INS, KC_LCTL, KC_RSFT, KC_PGUP, KC_HOME, KC_MINS, KC_EQL, KC_DEL -#define ________________SUPRA_Row_1________________ _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PSCR, KC_LSFT, KC_RCTL, KC_PGDN, KC_END, KC_LBRC, KC_RBRC, KC_BSLS -#define ________________SUPRA_Row_2________________ _______, KC_PAUS, _______, _______, _______, _______, _______, _______, KC_RGUI, KC_RALT, _______, _______ -#define ________________SUPRA_Row_3________________ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ - -/* SUBTER - * .-----------------------------------------------------------------------------------------------------------. - * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | DEL | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | | F11 | F12 | | | | | | RGUI | ./ALT | BSPC | | - * | | | | | | | | | | |CTRLhold| | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | | | gherkin| | | | ENTER | SHIFT | | | | | - * '-----------------------------------------------------------------------------------------------------------' - */ -#define _______________SUBTER_Row__0_______________ _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL -#define _______________SUBTER_Row__1_______________ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______ -#define _______________SUBTER_Row__2_______________ _______, KC_F11, KC_F12, _______, _______, _______, _______, _______, KC_RGUI,ALT_T(KC_DOT), CTL_T(KC_BSPC), _______ -#define _______________SUBTER_Row__3_______________ _______, _______, GHERKIN, _______, _______, _______, KC_ENT, KC_LSFT, _______,_______, _______, _______ - -/* Gherkin-Like Numbers - * .-----------------------------------------------------------------------------------------------------------. - * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | BSPC | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | | F11 | F12 | | | | ENTER | SHIFT | RGUI | ./ALT | BSPC | | - * | | | | | | | | | | |CTRLhold| | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | | | | | | | ENTER | SHIFT | RGUI | | | | - * '-----------------------------------------------------------------------------------------------------------' - */ -#define _______________NUMBERS_Row_0_______________ _______, _______________Gherkin_NUM_0_______________, KC_BSPC -#define _______________NUMBERS_Row_1_______________ _______, _______________Gherkin_NUM_1_______________, _______ -#define _______________NUMBERS_Row_2_______________ _______, _______________Gherkin_NUM_2_______________, _______ -#define _______________NUMBERS_Row_3_______________ _______, _______, _______, _______, _______, _______, KC_ENT, KC_RSFT, KC_RGUI, _______, _______, _______ - - -/* Gherkin-Like Directional Keys - * .-----------------------------------------------------------------------------------------------------------. - * | | TAB | up | | INS | CTRL | SHIFT | PgUp | HOME | - | = | DEL | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | | left | down | right | PrScr | SHIFT | CTRL | PgDn | END | [ | ] | | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | | P-Brk | | | | | | | RGUI | ALT | / | | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | | | qwerty | | | | | | | | | | - * '-----------------------------------------------------------------------------------------------------------' - */ -#define _____________DIRECTIONS_Row__0_____________ _______, _______________Gherkin_DIR_0_______________, KC_DEL -#define _____________DIRECTIONS_Row__1_____________ _______, _______________Gherkin_DIR_1_______________, _______ -#define _____________DIRECTIONS_Row__2_____________ _______, _______________Gherkin_DIR_2_______________, _______ -#define _____________DIRECTIONS_Row__3_____________ _______, _______, QWERTY, _______, _______, _______, _______, _______, _______, _______, _______, _______ - -/* Gherkin-Like Et Cetera - * .-----------------------------------------------------------------------------------------------------------. - * | | ` | mUP | | | RESET | SHIFT | mScrDn | mScrUp | | \ | DEL | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | | mLeft | mDown | mRight | | SHIFT | mBtn3 | mBtn1 | mBtn2 | ; | ' | | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | | Sft//Cp| | | | | C-A-D |mScrLeft| mScrRt | ALT | DEL | | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | | | | | | | C-A-D | | | | | | - * '-----------------------------------------------------------------------------------------------------------' - */ -#define ______________ETCETERA_Row__0______________ _______, _______________Gherkin_ETC_0_______________, KC_DEL -#define ______________ETCETERA_Row__1______________ _______, _______________Gherkin_ETC_1_______________, _______ -#define ______________ETCETERA_Row__2______________ _______, _______________Gherkin_ETC_2_______________, _______ -#define ______________ETCETERA_Row__3______________ _______, _______, _______, _______, _______, _______, LALT(LCTL(KC_DEL)), _______, _______, _______, _______, _______ - -/* Single 4x4 board only - * .-----------------------------------. - * | 7 | 8 | 9 | BSPC | - * |--------+--------+--------+--------| - * | 4 | 5 | 6 | SPACE | - * |--------+--------+--------+--------| - * | 1 | 2 | 3 | ENTER | - * |--------+--------+--------+--------| - * | 0 |/ //_GK | . | - | - * '-----------------------------------' - */ - -#define _______________NUMPAD_Row__0_______________ KC_KP_7, KC_KP_8, KC_KP_9, KC_BSPC -#define _______________NUMPAD_Row__1_______________ KC_KP_4, KC_KP_5, KC_KP_6, KC_SPC -#define _______________NUMPAD_Row__2_______________ KC_KP_1, KC_KP_2, KC_KP_3, KC_PENT -#define _______________NUMPAD_Row__3_______________ KC_KP_0, TD(LYR_TAP_DANCE), KC_KP_DOT, KC_PMNS - -/* Gherkin FN/Lighting - * .-----------------------------------------------------------------------------------------------------. - * | BL_breathe | BL_brite- | BL_brite+ | BL_toggle | BL_briteCyc | BL_briteMax | | | | | - * |------------+-----------+-----------+-----------+-------------+-------------+-----+-----+-----+------| - * | UG_breathe | UG_brite- | UG_brite+ | UG_toggle | UG_modeCycle| | | | | | - * |------------+-----------+-----------+-----------+-------------+-------------+-----+-----+-----+------| - * | UG_hue- | UG_hue+ | UG_sat- | UG_sat+ | | | | | |QWERTY| - * '-----------------------------------------------------------------------------------------------------' - */ -#define _______________Gherkin_FN_0________________ BL_BRTG, BL_DEC, BL_INC, BL_TOGG, BL_STEP, BL_ON, _______, _______, _______, _______ -#define _______________Gherkin_FN_1________________ RGB_M_B, RGB_VAD, RGB_VAI, RGB_TOG, RGB_MOD, _______, _______, _______, _______, _______ -#define _______________Gherkin_FN_2________________ RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, _______, _______, _______, _______, _______, QWERTY diff --git a/users/xtonhasvim/fancylighting.c b/users/xtonhasvim/fancylighting.c deleted file mode 100644 index a88ca4be..00000000 --- a/users/xtonhasvim/fancylighting.c +++ /dev/null @@ -1,172 +0,0 @@ - /* Copyright 2015-2017 Christon DeWan - * - * 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 . - */ - -#ifdef RGBLIGHT_ENABLE - -#include - -#include "rgblight.h" -#include "color.h" -#include "fancylighting.h" - - -__attribute__ ((weak)) -void matrix_scan_keymap(void) { - // override me, if you want. - return; -} - -#define ABSDIFF(a,b) ((a)>(b)?(a)-(b):(b)-(a)) - -#define FADE_BACK_TIME 500 -#define BREATH_FIRE_TIME 1000 -#define ANIMATION_STEP_INTERVAL 20 - -#if RGBLED_NUM >= 2 -#define POWER_KEY_OFFSET (RGBLED_NUM / 2) -#define SPACE_OFFSET_MAX (RGBLED_NUM / 2) -#else -#define POWER_KEY_OFFSET 1 -#define SPACE_OFFSET_MAX 1 -#endif - -uint16_t effect_start_timer = 0; -uint8_t user_rgb_mode = 0; -LED_TYPE shadowed_led[RGBLED_NUM] = {{0}}; - -void start_firey_return(void) { - user_rgb_mode = BREATH_FIRE; - effect_start_timer = timer_read(); - for(uint8_t i = 0; i < RGBLED_NUM; i++) { - shadowed_led[i] = led[i]; - } -} - -/** 0---max - * [___] - * [__/] - * [_/\] - * [/\_] - * [\__] - * [___] - **/ - -void set_color_for_offsets(uint16_t time_offset, uint16_t space_offset, uint8_t idx) { - float time_progress = (float)time_offset / BREATH_FIRE_TIME; - float space_progress = (float)space_offset / SPACE_OFFSET_MAX; - float progress = time_progress * 5.0 - space_progress; - if(progress > 1.0) { - progress -= 1.0; - progress /= 4.0; - progress = 1.0 - progress; - } - progress = fmax(0.0,progress); - progress *= progress; // squared! - - float alpha = (time_progress + 0.1) * 7.0 - space_progress; - alpha = fmin(1.0, alpha*alpha); - - LED_TYPE px[1] = {{0}}; - sethsv((uint16_t)(fmod(time_progress * 1.5 + space_progress,1.0)*360), 255, (uint8_t)(progress*255),&px[0]); - led[idx].r = alpha * px[0].r + ( 1.0 - alpha) * shadowed_led[idx].r; - led[idx].g = alpha * px[0].g + ( 1.0 - alpha) * shadowed_led[idx].g; - led[idx].b = alpha * px[0].b + ( 1.0 - alpha) * shadowed_led[idx].b; -} - -/** - * It's actually a rainbow: a fire curve didn't really look right. - * it's still cool, though! - */ -void rgb_mode_breath_fire(void) { - static uint16_t last_timer = 0; - if(!last_timer) last_timer = timer_read(); - uint16_t this_timer = timer_read(); - - // too soon. don't spam updates - if(this_timer - last_timer < ANIMATION_STEP_INTERVAL) return; - - uint16_t elapsed = this_timer - effect_start_timer; - - last_timer = this_timer; - if(elapsed >= BREATH_FIRE_TIME) { - // complete - user_rgb_mode = FADE_BACK; - effect_start_timer = this_timer; - } else { - // linear fade - for(uint16_t i = 0; i < RGBLED_NUM; i++) { - uint16_t space_offset = ABSDIFF(i,POWER_KEY_OFFSET); - if(space_offset > SPACE_OFFSET_MAX) space_offset = RGBLED_NUM - space_offset; - - set_color_for_offsets(elapsed, space_offset, i); - } - rgblight_set(); - } -} - -void rgb_mode_fade_back(void) { - static uint16_t last_timer = 0; - if(!last_timer) last_timer = timer_read(); - uint16_t this_timer = timer_read(); - - // too soon. don't spam updates - if(this_timer - last_timer < ANIMATION_STEP_INTERVAL) return; - - uint16_t elapsed = this_timer - effect_start_timer; - - last_timer = this_timer; - float progress = (float)elapsed / FADE_BACK_TIME; - progress = fmin(1.0,progress); - - for(uint8_t i = 0; i < RGBLED_NUM; i++) { - led[i].r = shadowed_led[i].r * progress; - led[i].g = shadowed_led[i].g * progress; - led[i].b = shadowed_led[i].b * progress; - } - rgblight_set(); - - if(elapsed >= FADE_BACK_TIME) user_rgb_mode = 0; -} - -/** called when layer state or vstate has changed */ -__attribute__ ((weak)) -void set_state_leds(void) { - return; -} - -void matrix_scan_user(void) { - static uint32_t last_layer = 0; - static uint32_t last_vstate = 0; - if(last_layer != layer_state || last_vstate != vstate) set_state_leds(); - last_layer = layer_state; - last_vstate = vstate; - - switch (user_rgb_mode) { - case BREATH_FIRE: - rgb_mode_breath_fire(); - break; - case FADE_BACK: - rgb_mode_fade_back(); - break; - } - matrix_scan_keymap(); -} - -#else - -void start_firey_return(void) {} - -#endif diff --git a/users/xtonhasvim/fancylighting.h b/users/xtonhasvim/fancylighting.h deleted file mode 100644 index 02fb58b8..00000000 --- a/users/xtonhasvim/fancylighting.h +++ /dev/null @@ -1,36 +0,0 @@ -/* Copyright 2015-2017 Christon DeWan - * - * 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 . - */ - -#ifndef _fancy_lighting_h -#define _fancy_lighting_h -#ifdef RGBLIGHT_ENABLE - -#include "xtonhasvim.h" - - -extern uint8_t user_rgb_mode; -extern LED_TYPE shadowed_led[]; - - -#endif //RGBLIGHT_ENABLE -void start_firey_return(void); - -enum xtonhasvim_rgbmodes { - BREATH_FIRE = 1, - FADE_BACK -}; - -#endif //_fancy_lighting_h diff --git a/users/xtonhasvim/readme.md b/users/xtonhasvim/readme.md deleted file mode 100644 index e08e972f..00000000 --- a/users/xtonhasvim/readme.md +++ /dev/null @@ -1,10 +0,0 @@ - -# Xton has Vim! - -Contains common code for Xton's vim emulation (vimulation?) layer. - -Inspired/stolen from the `ergodox_ez/vim` keymap. Rewritten to be a more straightforward state machine and support more macros. Vim layers `_CMD` and `_EDIT` are designed to lay on top of an otherwise fully-functional layout. `_CMD` runs the entire vim state machine while `_EDIT` should lay across your base layer and mask off just the escape key. - -Works via OSX text editing shortcuts, mainly MOD+arrow combinations. This has some limitations and only works on OSX. - -The `_CMD` layer will temporarily disable itself while *CMD* or *ALT* are held down so that typical OSX shortcuts can be used without switching out of vim mode. diff --git a/users/xtonhasvim/rules.mk b/users/xtonhasvim/rules.mk deleted file mode 100644 index a901bfcf..00000000 --- a/users/xtonhasvim/rules.mk +++ /dev/null @@ -1,2 +0,0 @@ -SRC += xtonhasvim.c -SRC += fancylighting.c diff --git a/users/xtonhasvim/xtonhasvim.c b/users/xtonhasvim/xtonhasvim.c deleted file mode 100644 index 5f670183..00000000 --- a/users/xtonhasvim/xtonhasvim.c +++ /dev/null @@ -1,643 +0,0 @@ - /* Copyright 2015-2017 Christon DeWan - * - * 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 "xtonhasvim.h" -#include "fancylighting.h" - -/************************************ - * helper foo - ************************************/ - -#define PRESS(kc) register_code(kc) -#define RELEASE(kc) unregister_code(kc) - -static void TAP(uint16_t keycode) { - PRESS(keycode); - RELEASE(keycode); -} - -static void CMD(uint16_t keycode) { - PRESS(KC_LGUI); - TAP(keycode); - RELEASE(KC_LGUI); -} - -static void CTRL(uint16_t keycode) { - PRESS(KC_LCTRL); - TAP(keycode); - RELEASE(KC_LCTRL); -} - -static void SHIFT(uint16_t keycode) { - PRESS(KC_LSHIFT); - TAP(keycode); - RELEASE(KC_LSHIFT); -} - -static void ALT(uint16_t keycode) { - PRESS(KC_LALT); - TAP(keycode); - RELEASE(KC_LALT); -} - - -uint16_t vstate = VIM_START; -static bool yank_was_lines = false; -static bool SHIFTED = false; -static uint32_t mod_override_layer_state = 0; -static uint16_t mod_override_triggering_key = 0; - -static void edit(void) { vstate = VIM_START; layer_clear(); } -#define EDIT edit() - - -static void simple_movement(uint16_t keycode) { - switch(keycode) { - case VIM_B: - PRESS(KC_LALT); - SHIFT(KC_LEFT); // select to start of this word - RELEASE(KC_LALT); - break; - case VIM_E: - PRESS(KC_LALT); - SHIFT(KC_RIGHT); // select to end of this word - RELEASE(KC_LALT); - break; - case VIM_H: - SHIFT(KC_LEFT); - break; - case VIM_J: - CMD(KC_LEFT); - SHIFT(KC_DOWN); - SHIFT(KC_DOWN); - break; - case VIM_K: - CMD(KC_LEFT); - TAP(KC_DOWN); - SHIFT(KC_UP); - SHIFT(KC_UP); - break; - case VIM_L: - SHIFT(KC_RIGHT); - break; - case VIM_W: - PRESS(KC_LALT); - SHIFT(KC_RIGHT); // select to end of this word - SHIFT(KC_RIGHT); // select to end of next word - SHIFT(KC_LEFT); // select to start of next word - RELEASE(KC_LALT); - break; - } -} - -static void comma_period(uint16_t keycode) { - switch (keycode) { - case VIM_COMMA: - if (SHIFTED) { - // indent - CMD(KC_LBRACKET); - } else { - // toggle comment - CMD(KC_SLASH); - } - break; - case VIM_PERIOD: - if (SHIFTED) { - // outdent - CMD(KC_RBRACKET); - } - break; - } -} - -__attribute__ ((weak)) -bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { - return true; -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - /* keymap gets first whack */ - if(!process_record_keymap(keycode, record)) return false; - - /****** FIREY_RETURN *****/ - if(record->event.pressed && keycode == FIREY_RETURN) { - start_firey_return(); - TAP(KC_ENT); - } - - /****** mod passthru *****/ - if(record->event.pressed && layer_state_is(vim_cmd_layer()) && (IS_MOD(keycode) || keycode == LSFT(KC_LALT))) { - mod_override_layer_state = layer_state; - mod_override_triggering_key = keycode; - // TODO: change this to track key location instead - layer_clear(); - return true; // let the event fall through... - } - if(mod_override_layer_state && !record->event.pressed && keycode == mod_override_triggering_key) { - layer_state_set(mod_override_layer_state); - mod_override_layer_state = 0; - mod_override_triggering_key = 0; - return true; - } - - if (VIM_START <= keycode && keycode <= VIM_ESC) { - if(keycode == VIM_SHIFT) { - SHIFTED = record->event.pressed; - return false; - } - - if (record->event.pressed) { - if(keycode == VIM_START) { - // entry from anywhere - layer_on(vim_cmd_layer()); - vstate = VIM_START; - - // reset state - yank_was_lines = false; - SHIFTED = false; - mod_override_layer_state = 0; - mod_override_triggering_key = 0; - - return false; - } - switch(vstate) { - case VIM_START: - switch(keycode){ - /***************************** - * ground state - *****************************/ - case VIM_A: - if(SHIFTED) { - // CMD(KC_RIGHT); - CTRL(KC_E); - } else { - TAP(KC_RIGHT); - } - EDIT; - break; - case VIM_B: - PRESS(KC_LALT); - PRESS(KC_LEFT); - break; - case VIM_C: - if(SHIFTED) { - PRESS(KC_LSHIFT); - CMD(KC_RIGHT); - RELEASE(KC_LSHIFT); - CMD(KC_X); - yank_was_lines = false; - EDIT; - } else { - vstate = VIM_C; - } - break; - case VIM_D: - if(SHIFTED) { - CTRL(KC_K); - } else { - vstate = VIM_D; - } - break; - case VIM_E: - PRESS(KC_LALT); - PRESS(KC_RIGHT); - break; - case VIM_G: - if(SHIFTED) { - TAP(KC_END); - } else { - vstate = VIM_G; - } - break; - case VIM_H: - PRESS(KC_LEFT); - break; - case VIM_I: - if(SHIFTED){ - CTRL(KC_A); - } - EDIT; - break; - case VIM_J: - if(SHIFTED) { - CMD(KC_RIGHT); - TAP(KC_DEL); - } else { - PRESS(KC_DOWN); - } - break; - case VIM_K: - PRESS(KC_UP); - break; - case VIM_L: - PRESS(KC_RIGHT); - break; - case VIM_O: - if(SHIFTED) { - CMD(KC_LEFT); - TAP(KC_ENTER); - TAP(KC_UP); - EDIT; - } else { - CMD(KC_RIGHT); - TAP(KC_ENTER); - EDIT; - } - break; - case VIM_P: - if(SHIFTED) { - CMD(KC_LEFT); - CMD(KC_V); - } else { - if(yank_was_lines) { - CMD(KC_RIGHT); - TAP(KC_RIGHT); - CMD(KC_V); - } else { - CMD(KC_V); - } - } - break; - case VIM_S: - // s for substitute? - if(SHIFTED) { - CMD(KC_LEFT); - PRESS(KC_LSHIFT); - CMD(KC_RIGHT); - RELEASE(KC_LSHIFT); - CMD(KC_X); - yank_was_lines = false; - EDIT; - } else { - SHIFT(KC_RIGHT); - CMD(KC_X); - yank_was_lines = false; - EDIT; - } - break; - case VIM_U: - if(SHIFTED) { - PRESS(KC_LSFT); - CMD(KC_Z); - RELEASE(KC_LSHIFT); - } else { - CMD(KC_Z); - } - break; - case VIM_V: - if(SHIFTED) { - CMD(KC_LEFT); - SHIFT(KC_DOWN); - vstate = VIM_VS; - } else { - vstate = VIM_V; - } - break; - case VIM_W: - PRESS(KC_LALT); - TAP(KC_RIGHT); - TAP(KC_RIGHT); - TAP(KC_LEFT); - RELEASE(KC_LALT); - break; - case VIM_X: - // SHIFT(KC_RIGHT); - // CMD(KC_X); - PRESS(KC_DEL); - break; - case VIM_Y: - if(SHIFTED) { - CMD(KC_LEFT); - SHIFT(KC_DOWN); - CMD(KC_C); - TAP(KC_RIGHT); - yank_was_lines = true; - } else { - vstate = VIM_Y; - } - break; - case VIM_COMMA: - case VIM_PERIOD: - comma_period(keycode); - break; - } - break; - case VIM_C: - /***************************** - * c- ...for change. I never use this... - *****************************/ - switch(keycode) { - case VIM_B: - case VIM_E: - case VIM_H: - case VIM_J: - case VIM_K: - case VIM_L: - case VIM_W: - simple_movement(keycode); - CMD(KC_X); - yank_was_lines = false; - EDIT; - break; - - case VIM_C: - CMD(KC_LEFT); - PRESS(KC_LSHIFT); - CMD(KC_RIGHT); - RELEASE(KC_LSHIFT); - CMD(KC_X); - yank_was_lines = false; - EDIT; - break; - case VIM_I: - vstate = VIM_CI; - break; - default: - vstate = VIM_START; - break; - } - break; - case VIM_CI: - /***************************** - * ci- ...change inner word - *****************************/ - switch(keycode) { - case VIM_W: - ALT(KC_LEFT); - PRESS(KC_LSHIFT); - ALT(KC_RIGHT); - RELEASE(KC_LSHIFT); - CMD(KC_X); - yank_was_lines = false; - EDIT; - default: - vstate = VIM_START; - break; - } - break; - case VIM_D: - /***************************** - * d- ...delete stuff - *****************************/ - switch(keycode) { - case VIM_B: - case VIM_E: - case VIM_H: - case VIM_J: - case VIM_K: - case VIM_L: - case VIM_W: - simple_movement(keycode); - CMD(KC_X); - yank_was_lines = false; - vstate = VIM_START; - break; - case VIM_D: - CMD(KC_LEFT); - SHIFT(KC_DOWN); - CMD(KC_X); - yank_was_lines = true; - vstate = VIM_START; - break; - case VIM_I: - vstate = VIM_DI; - break; - default: - vstate = VIM_START; - break; - } - break; - case VIM_DI: - /***************************** - * ci- ...delete a word... FROM THE INSIDE! - *****************************/ - switch(keycode) { - case VIM_W: - ALT(KC_LEFT); - PRESS(KC_LSHIFT); - ALT(KC_RIGHT); - RELEASE(KC_LSHIFT); - CMD(KC_X); - yank_was_lines = false; - vstate = VIM_START; - default: - vstate = VIM_START; - break; - } - break; - case VIM_V: - /***************************** - * visual! - *****************************/ - switch(keycode) { - case VIM_D: - case VIM_X: - CMD(KC_X); - yank_was_lines = false; - vstate = VIM_START; - break; - case VIM_B: - PRESS(KC_LALT); - PRESS(KC_LSHIFT); - PRESS(KC_LEFT); - // leave open for key repeat - break; - case VIM_E: - PRESS(KC_LALT); - PRESS(KC_LSHIFT); - PRESS(KC_RIGHT); - // leave open for key repeat - break; - case VIM_H: - PRESS(KC_LSHIFT); - PRESS(KC_LEFT); - break; - case VIM_I: - vstate = VIM_VI; - break; - case VIM_J: - PRESS(KC_LSHIFT); - PRESS(KC_DOWN); - break; - case VIM_K: - PRESS(KC_LSHIFT); - PRESS(KC_UP); - break; - case VIM_L: - PRESS(KC_LSHIFT); - PRESS(KC_RIGHT); - break; - case VIM_W: - PRESS(KC_LALT); - SHIFT(KC_RIGHT); // select to end of this word - SHIFT(KC_RIGHT); // select to end of next word - SHIFT(KC_LEFT); // select to start of next word - RELEASE(KC_LALT); - break; - case VIM_P: - CMD(KC_V); - vstate = VIM_START; - break; - case VIM_Y: - CMD(KC_C); - TAP(KC_RIGHT); - yank_was_lines = false; - vstate = VIM_START; - break; - case VIM_V: - case VIM_ESC: - TAP(KC_RIGHT); - vstate = VIM_START; - break; - case VIM_COMMA: - case VIM_PERIOD: - comma_period(keycode); - break; - default: - // do nothing - break; - } - break; - case VIM_VI: - /***************************** - * vi- ...select a word... FROM THE INSIDE! - *****************************/ - switch(keycode) { - case VIM_W: - ALT(KC_LEFT); - PRESS(KC_LSHIFT); - ALT(KC_RIGHT); - RELEASE(KC_LSHIFT); - vstate = VIM_V; - default: - // ignore - vstate = VIM_V; - break; - } - break; - case VIM_VS: - /***************************** - * visual line - *****************************/ - switch(keycode) { - case VIM_D: - case VIM_X: - CMD(KC_X); - yank_was_lines = true; - vstate = VIM_START; - break; - case VIM_J: - PRESS(KC_LSHIFT); - PRESS(KC_DOWN); - break; - case VIM_K: - PRESS(KC_LSHIFT); - PRESS(KC_UP); - break; - case VIM_Y: - CMD(KC_C); - yank_was_lines = true; - TAP(KC_RIGHT); - vstate = VIM_START; - break; - case VIM_P: - CMD(KC_V); - vstate = VIM_START; - break; - case VIM_V: - case VIM_ESC: - TAP(KC_RIGHT); - vstate = VIM_START; - break; - case VIM_COMMA: - case VIM_PERIOD: - comma_period(keycode); - break; - default: - // do nothing - break; - } - break; - case VIM_G: - /***************************** - * gg, and a grab-bag of other macros i find useful - *****************************/ - switch(keycode) { - case VIM_G: - TAP(KC_HOME); - break; - // codes b - case VIM_H: - CTRL(KC_A); - break; - case VIM_J: - PRESS(KC_PGDN); - break; - case VIM_K: - PRESS(KC_PGUP); - break; - case VIM_L: - CTRL(KC_E); - break; - default: - // do nothing - break; - } - vstate = VIM_START; - break; - case VIM_Y: - /***************************** - * yoink! - *****************************/ - switch(keycode) { - case VIM_B: - case VIM_E: - case VIM_H: - case VIM_J: - case VIM_K: - case VIM_L: - case VIM_W: - simple_movement(keycode); - CMD(KC_C); - TAP(KC_RIGHT); - yank_was_lines = false; - break; - case VIM_Y: - CMD(KC_LEFT); - SHIFT(KC_DOWN); - CMD(KC_C); - TAP(KC_RIGHT); - yank_was_lines = true; - break; - default: - // NOTHING - break; - } - vstate = VIM_START; - break; - } - } else { - /************************ - * key release events - ************************/ - clear_keyboard(); - } - return false; - } else { - return true; - } -} - diff --git a/users/xtonhasvim/xtonhasvim.h b/users/xtonhasvim/xtonhasvim.h deleted file mode 100644 index 2d6670a5..00000000 --- a/users/xtonhasvim/xtonhasvim.h +++ /dev/null @@ -1,65 +0,0 @@ - /* Copyright 2015-2017 Christon DeWan - * - * 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 . - */ - -#ifndef USERSPACE -#define USERSPACE - -#include QMK_KEYBOARD_H -#include "action_layer.h" - -#define X_____X KC_NO - -enum xtonhasvim_keycodes { - // 20: give keyboard-specific codes some room - FIREY_RETURN = SAFE_RANGE + 20, // kick off special effects - VIM_START, // bookend for vim states - VIM_A, - VIM_B, - VIM_C, - VIM_CI, - VIM_D, - VIM_DI, - VIM_E, - VIM_H, - VIM_G, - VIM_I, - VIM_J, - VIM_K, - VIM_L, - VIM_O, - VIM_P, - VIM_S, - VIM_U, - VIM_V, - VIM_VS, // visual-line - VIM_VI, - VIM_W, - VIM_X, - VIM_Y, - VIM_PERIOD, // to support indent/outdent - VIM_COMMA, // and toggle comments - VIM_SHIFT, // avoid side-effect of supporting real shift. - VIM_ESC, // bookend - VIM_SAFE_RANGE // start other keycodes here. -}; - -// NOTE: YOU MUST DEFINE THIS -extern uint8_t vim_cmd_layer(void); - -extern uint16_t vstate; - - -#endif diff --git a/users/xulkal/config.h b/users/xulkal/config.h deleted file mode 100644 index 4b05ea4e..00000000 --- a/users/xulkal/config.h +++ /dev/null @@ -1,34 +0,0 @@ -#pragma once - -#undef TAPPING_FORCE_HOLD - -#undef TAPPING_TERM -#define TAPPING_TERM 175 - -#define SPACE_CADET_MODIFIER_CARRYOVER -#define LSPO_KEYS KC_LSFT, KC_TRNS, KC_LBRC -#define RSPC_KEYS KC_RSFT, KC_TRNS, KC_RBRC -#define LCPO_KEYS KC_LCTL, KC_TRNS, KC_MINS -#define RCPC_KEYS KC_RCTL, KC_TRNS, KC_EQL - -// Running out of firmware space -#if defined(__AVR__) -#undef RGB_MATRIX_KEYPRESSES -#undef RGB_MATRIX_KEYRELEASES -#undef RGB_MATRIX_FRAMEBUFFER_EFFECTS -#else -#define RGB_MATRIX_KEYPRESSES -#undef RGB_MATRIX_KEYRELEASES -#define RGB_MATRIX_FRAMEBUFFER_EFFECTS -#endif - -// No need for the single versions when multi performance isn't a problem =D -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -#define DISABLE_RGB_MATRIX_SPLASH -#define DISABLE_RGB_MATRIX_SOLID_SPLASH - -// 20m timeout (20m * 60s * 1000mil) -#define RGB_DISABLE_TIMEOUT 1200000 -#define OLED_SCROLL_TIMEOUT 20000 diff --git a/users/xulkal/custom_encoder.c b/users/xulkal/custom_encoder.c deleted file mode 100644 index cd029944..00000000 --- a/users/xulkal/custom_encoder.c +++ /dev/null @@ -1,72 +0,0 @@ -#include "custom_encoder.h" -#include "custom_keycodes.h" - -#ifdef RGB_OLED_MENU -#include "custom_rgb.h" - -// I'm lazy and like constants over calculations, also using it as a compile time check -#if defined(RGB_MATRIX_ENABLE) - #define RGB_FUNCTION_COUNT 6 -#elif defined(RGBLIGHT_ENABLE) - #define RGB_FUNCTION_COUNT 5 -#endif - -typedef void (*rgb_f)(void); - -const rgb_f rgb_functions[RGB_FUNCTION_COUNT][2] = { -#if defined(RGB_MATRIX_ENABLE) - { rgb_matrix_increase_hue, rgb_matrix_decrease_hue }, - { rgb_matrix_increase_sat, rgb_matrix_decrease_sat }, - { rgb_matrix_increase_val, rgb_matrix_decrease_val }, - { rgb_matrix_increase_speed, rgb_matrix_decrease_speed }, - { rgb_matrix_step, rgb_matrix_step_reverse }, - { rgb_matrix_increase_flags, rgb_matrix_decrease_flags } -#elif defined(RGBLIGHT_ENABLE) - { rgblight_increase_hue, rgblight_decrease_hue }, - { rgblight_increase_sat, rgblight_decrease_sat }, - { rgblight_increase_val, rgblight_decrease_val }, - { rgblight_increase_speed, rgblight_decrease_speed }, - { rgblight_step, rgblight_step_reverse } -#endif -}; - -// Start at the end for mode -uint8_t rgb_encoder_state = 4; - -bool process_record_encoder(uint16_t keycode, keyrecord_t *record) -{ - switch (keycode) - { - case RGB_ENC: - if (record->event.pressed) { - if (get_mods() & MOD_MASK_SHIFT) { - rgb_encoder_state = (rgb_encoder_state - 1); - if (rgb_encoder_state >= RGB_FUNCTION_COUNT) - rgb_encoder_state = RGB_FUNCTION_COUNT - 1; - } else { - rgb_encoder_state = (rgb_encoder_state + 1) % RGB_FUNCTION_COUNT; - } - } - return false; - } - return true; -} -#endif // RGB_OLED_MENU - -const uint16_t PROGMEM encoders[][2] = { - { KC_PGUP, KC_PGDN }, - { KC_VOLU, KC_VOLD } -}; - -void encoder_update_user(uint8_t index, bool clockwise) -{ - if (!is_keyboard_master()) - return; - -#ifdef RGB_OLED_MENU - if (index == RGB_OLED_MENU) - (*rgb_functions[rgb_encoder_state][clockwise])(); - else -#endif // RGB_OLED_MENU - tap_code16(pgm_read_word(&encoders[index][clockwise])); -} diff --git a/users/xulkal/custom_encoder.h b/users/xulkal/custom_encoder.h deleted file mode 100644 index 010d4b13..00000000 --- a/users/xulkal/custom_encoder.h +++ /dev/null @@ -1,2 +0,0 @@ -#pragma once -#include "quantum.h" diff --git a/users/xulkal/custom_keycodes.h b/users/xulkal/custom_keycodes.h deleted file mode 100644 index 7ced92bf..00000000 --- a/users/xulkal/custom_keycodes.h +++ /dev/null @@ -1,40 +0,0 @@ -#pragma once - -enum custom_keycodes { - RGBRST = SAFE_RANGE, -#ifndef TAP_DANCE_ENABLE - TD_MIN, - TD_COMM = TD_MIN, - TD_BSPC, - TD_DEL, - TD_DOT, - TD_MAX, -#endif -#ifdef ENCODER_ENABLE - RGB_ENC, -#endif - KEYMAP_SAFE_RANGE -}; - -#define RIS_ESC LT(_RAISE, KC_ESC) -#define RIS_CAPS LT(_RAISE, KC_CAPS) - -#define QWERTY DF(_QWERTY) - -#ifndef GAMELAYER_DISABLE -#define GAME DF(_GAME) -#else -#define GAME KC_TRANSPARENT -#endif - -#define LOWER MO(_LOWER) -#define RAISE MO(_RAISE) - - -#ifdef ENCODER_ENABLE -#define KC_ENC1 RGB_ENC -#define KC_ENC2 KC_MPLY -#else -#define KC_ENC1 RGB_RMOD -#define KC_ENC2 RGB_MOD -#endif diff --git a/users/xulkal/custom_oled.c b/users/xulkal/custom_oled.c deleted file mode 100644 index 4ed2b9a0..00000000 --- a/users/xulkal/custom_oled.c +++ /dev/null @@ -1,188 +0,0 @@ -#include "custom_oled.h" -#include "process_records.h" - -#include - -#ifdef RGBLIGHT_ENABLE -rgblight_config_t rgblight_config; -#endif - -static void render_logo(void) -{ - static const char PROGMEM font_logo[] = { - 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, - 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, - 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0}; - oled_write_P(font_logo, false); -} - -static void render_icon(void) -{ -#ifdef OLED_90ROTATION - static const char PROGMEM font_icon[] = { - 0x9b,0x9c,0x9d,0x9e,0x9f, - 0xbb,0xbc,0xbd,0xbe,0xbf, - 0xdb,0xdc,0xdd,0xde,0xdf,0 - }; -#else - static const char PROGMEM font_icon[] = { - // Use \r (0x0d) to jump to the next line without clearing the rest of the current line - 0x9b,0x9c,0x9d,0x9e,0x9f,0x0d, - 0xbb,0xbc,0xbd,0xbe,0xbf,0x0d, - 0xdb,0xdc,0xdd,0xde,0xdf,0 - }; -#endif - oled_write_P(font_icon, false); -} - -static void render_layer(void) -{ - uint8_t layer = layer_state ? biton(layer_state) : biton32(default_layer_state); -#ifdef OLED_90ROTATION - oled_write_P(PSTR("Layer"), false); -#else - oled_write_P(PSTR("Layer: "), false); -#endif - - switch (layer) - { - case _QWERTY: - oled_write_P(PSTR("BASE "), false); - break; -#ifndef GAMELAYER_DISABLE - case _GAME: - oled_write_P(PSTR("GAME "), false); - break; -#endif - case _LOWER: - oled_write_P(PSTR("LOWER"), false); - break; - case _RAISE: - oled_write_P(PSTR("RAISE"), false); - break; -#ifdef TRILAYER_ENABLED - case _ADJUST: - oled_write_P(PSTR("ADJST"), false); - break; -#endif - } -} - -static void render_keyboard_leds(void) -{ - // Host Keyboard LED Status - uint8_t led_state = host_keyboard_leds(); -#ifdef OLED_90ROTATION - oled_write_P(IS_LED_ON(led_state, USB_LED_NUM_LOCK) ? PSTR("NUMLK") : PSTR(" "), false); - oled_write_P(IS_LED_ON(led_state, USB_LED_CAPS_LOCK) ? PSTR("CAPLK") : PSTR(" "), false); - oled_write_P(IS_LED_ON(led_state, USB_LED_SCROLL_LOCK) ? PSTR("SCRLK") : PSTR(" "), false); -#else - oled_write_P(IS_LED_ON(led_state, USB_LED_NUM_LOCK) ? PSTR("NUM ") : PSTR(" "), false); - oled_write_P(IS_LED_ON(led_state, USB_LED_CAPS_LOCK) ? PSTR("CAPS ") : PSTR(" "), false); - oled_write_P(IS_LED_ON(led_state, USB_LED_SCROLL_LOCK) ? PSTR("SCRL") : PSTR(" "), false); -#endif -} - -#ifdef RGB_OLED_MENU -extern uint8_t rgb_encoder_state; -#endif - -#if defined(OLED_90ROTATION) - -#ifdef RGB_ENABLE -static void render_rgb_state(void) -{ - // TODO: need to do a bit more handling here for horizontal rendering -#if defined(RGB_MATRIX_ENABLE) - static char buffer[31] = {0}; - snprintf(buffer, sizeof(buffer), "h%3d s%3d v%3d s%3d m%3d e%3d ", rgb_matrix_config.hsv.h, rgb_matrix_config.hsv.s, rgb_matrix_config.hsv.v, rgb_matrix_config.speed, rgb_matrix_config.mode, rgb_matrix_get_flags()); -#elif defined(RGBLIGHT_ENABLE) - static char buffer[26] = {0}; - snprintf(buffer, sizeof(buffer), "h%3d s%3d v%3d s%3d m%3d ", rgblight_config.hue, rgblight_config.sat, rgblight_config.val, rgblight_config.speed, rgblight_config.mode); -#endif - -#ifdef RGB_OLED_MENU - buffer[4 + rgb_encoder_state * 5] = '<'; -#endif - oled_write(buffer, false); -} -#endif - -static void render_status(void) -{ - render_icon(); - render_layer(); - - // Host Keyboard LED Status - oled_write_P(PSTR("-----"), false); - render_keyboard_leds(); - - oled_write_P(PSTR("-----"), false); -#ifdef RGB_ENABLE - render_rgb_state(); -#endif -} - -oled_rotation_t oled_init_user(oled_rotation_t rotation) { -#if KEYBOARD_helix_rev2 - if (is_keyboard_master()) - return OLED_ROTATION_270; - return rotation; -#else - if (is_keyboard_master()) - return OLED_ROTATION_90; - return rotation; -#endif -} - -#else // OLED_90ROTATION - -#ifdef RGB_ENABLE -static void render_rgb_state(void) -{ - // TODO: need to do a bit more handling here for horizontal rendering -#if defined(RGB_MATRIX_ENABLE) - static char buffer[37] = {0}; - snprintf(buffer, sizeof(buffer), "h%3d s%3d v%3d s%3d m%3d e%3d ", rgb_matrix_config.hsv.h, rgb_matrix_config.hsv.s, rgb_matrix_config.hsv.v, rgb_matrix_config.speed, rgb_matrix_config.mode, rgb_matrix_get_flags()); -#elif defined(RGBLIGHT_ENABLE) - static char buffer[32] = {0}; - snprintf(buffer, sizeof(buffer), "h%3d s%3d v%3d s%3d m%3d ", rgblight_config.hue, rgblight_config.sat, rgblight_config.val, rgblight_config.speed, rgblight_config.mode); -#endif - -#ifdef RGB_OLED_MENU - buffer[4 + rgb_encoder_state * 5] = '<'; -#endif - oled_write(buffer, false); -} -#endif - -static void render_status(void) -{ - render_icon(); - - // Host Layer Status - oled_set_cursor(6, 0); - render_layer(); - - // Host Keyboard LED Status - oled_set_cursor(6, 1); - render_keyboard_leds(); - -#ifdef RGB_ENABLE - oled_set_cursor(6, 2); - render_rgb_state(); -#endif -} - -#endif // OLED_90ROTATION - -void oled_task_user(void) -{ - if (is_keyboard_master()) - render_status(); - else - { - render_logo(); - oled_scroll_left(); - } -} diff --git a/users/xulkal/custom_oled.h b/users/xulkal/custom_oled.h deleted file mode 100644 index 010d4b13..00000000 --- a/users/xulkal/custom_oled.h +++ /dev/null @@ -1,2 +0,0 @@ -#pragma once -#include "quantum.h" diff --git a/users/xulkal/custom_rgb.c b/users/xulkal/custom_rgb.c deleted file mode 100644 index f68a7c56..00000000 --- a/users/xulkal/custom_rgb.c +++ /dev/null @@ -1,64 +0,0 @@ -#include "custom_rgb.h" - -#ifdef RGB_MATRIX_ENABLE -void rgb_matrix_increase_flags(void) -{ - switch (rgb_matrix_get_flags()) { - case LED_FLAG_ALL: { - rgb_matrix_set_flags(LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER); - rgb_matrix_set_color_all(0, 0, 0); - } - break; - case LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER: { - rgb_matrix_set_flags(LED_FLAG_NONE); - rgb_matrix_disable_noeeprom(); - } - break; - case LED_FLAG_UNDERGLOW: { - rgb_matrix_set_flags(LED_FLAG_ALL); - rgb_matrix_set_color_all(0, 0, 0); - } - break; - default: { - rgb_matrix_set_flags(LED_FLAG_UNDERGLOW); - rgb_matrix_enable_noeeprom(); - } - break; - } -} - -void rgb_matrix_decrease_flags(void) -{ - switch (rgb_matrix_get_flags()) { - case LED_FLAG_ALL: { - rgb_matrix_set_flags(LED_FLAG_UNDERGLOW); - rgb_matrix_set_color_all(0, 0, 0); - } - break; - case LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER: { - rgb_matrix_set_flags(LED_FLAG_ALL); - rgb_matrix_set_color_all(0, 0, 0); - } - break; - case LED_FLAG_UNDERGLOW: { - rgb_matrix_set_flags(LED_FLAG_NONE); - rgb_matrix_disable_noeeprom(); - } - break; - default: { - rgb_matrix_set_flags(LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER); - rgb_matrix_enable_noeeprom(); - } - break; - } -} -#endif - -void rgb_reset(void) { -#if defined(RGB_MATRIX_ENABLE) - eeconfig_update_rgb_matrix_default(); -#elif defined(RGBLIGHT_ENABLE) - eeconfig_update_rgblight_default(); - rgblight_enable(); -#endif -} diff --git a/users/xulkal/custom_rgb.h b/users/xulkal/custom_rgb.h deleted file mode 100644 index 10010b52..00000000 --- a/users/xulkal/custom_rgb.h +++ /dev/null @@ -1,17 +0,0 @@ -#pragma once - -#if defined(RGB_MATRIX_ENABLE) -# include "rgb_matrix.h" -#elif defined(RGBLIGHT_ENABLE) -# if !defined(__AVR__) -# define PROGMEM -# endif -# include "rgblight.h" -#endif - -#ifdef RGB_MATRIX_ENABLE -void rgb_matrix_increase_flags(void); -void rgb_matrix_decrease_flags(void); -#endif - -void rgb_reset(void); diff --git a/users/xulkal/custom_tap_dance.c b/users/xulkal/custom_tap_dance.c deleted file mode 100644 index 2c5d145f..00000000 --- a/users/xulkal/custom_tap_dance.c +++ /dev/null @@ -1,59 +0,0 @@ -#include "custom_tap_dance.h" -#include "custom_keycodes.h" - -#ifdef TAP_DANCE_ENABLE - -//Tap Dance Definitions -qk_tap_dance_action_t tap_dance_actions[] = { - [COMM_QUOT] = ACTION_TAP_DANCE_DOUBLE(KC_COMM, KC_QUOT), - [BACKSPACE] = ACTION_TAP_DANCE_DOUBLE (KC_BSPACE, LCTL(KC_BSPACE)), - [DELETE] = ACTION_TAP_DANCE_DOUBLE (KC_DELETE, LCTL(KC_DELETE)) -}; - -#else - -static uint16_t td_keycode; -static uint16_t td_timer; - -const uint16_t PROGMEM td_keymaps[TD_MAX - TD_MIN][2] = { - [TD_COMM - TD_MIN] = { KC_COMM, KC_QUOT }, - [TD_BSPC - TD_MIN] = { KC_BSPACE, LCTL(KC_BSPACE) }, - [TD_DEL - TD_MIN] = { KC_DELETE, LCTL(KC_DELETE) } -}; - -static void run_custom_tap_dance(uint8_t i) -{ - tap_code16(pgm_read_word(&td_keymaps[td_keycode - TD_MIN][i])); - td_keycode = KC_TRANSPARENT; - td_timer = timer_read() + TAPPING_TERM; -} - -bool process_custom_tap_dance(uint16_t keycode, keyrecord_t *record) -{ - if (TD_MIN <= keycode && keycode < TD_MAX) - { - if (record->event.pressed) - { - if (td_keycode != keycode || timer_expired(td_timer)) - { - td_keycode = keycode; - td_timer = timer_read() + TAPPING_TERM; - } - else - run_custom_tap_dance(1); - } - return false; - } - - if (td_keycode != KC_TRANSPARENT) - run_custom_tap_dance(0); - return true; -} - -void matrix_scan_user(void) -{ - if (td_keycode != KC_TRANSPARENT && timer_expired(td_timer)) - run_custom_tap_dance(0); -} - -#endif diff --git a/users/xulkal/custom_tap_dance.h b/users/xulkal/custom_tap_dance.h deleted file mode 100644 index c4da9318..00000000 --- a/users/xulkal/custom_tap_dance.h +++ /dev/null @@ -1,23 +0,0 @@ -#pragma once -#include "quantum.h" - -#ifdef TAP_DANCE_ENABLE - -#include "process_tap_dance.h" - -//Tap Dance Declarations -enum { - COMM_QUOT = 0, - BACKSPACE, - DELETE -}; - -#define TD_COMM TD(COMM_QUOT) -#define TD_BSPC TD(BACKSPACE) -#define TD_DEL TD(DELETE) - -#else - -bool process_custom_tap_dance(uint16_t keycode, keyrecord_t *record); - -#endif diff --git a/users/xulkal/layouts.h b/users/xulkal/layouts.h deleted file mode 100644 index d4b70841..00000000 --- a/users/xulkal/layouts.h +++ /dev/null @@ -1,119 +0,0 @@ -#pragma once - - /* Qwerty Layout - * ,-----------------------------------------. ,-----------------------------------------. - * | GESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | BkSp | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | Tab | Q | W | E | R | T | | Y | U | I | O | P | \ | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * |FN(CAPS)| A | S | D | F | G | | H | J | K | L | ; | Enter| - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | Sft[ | Z | X | C | V | B | | N | M | , | . | / | Sft] | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | Ctrl | Win | ADJ | FN | Alt | Space| | Space| Left | Up | Down | Right| Ctrl | - * `-----------------------------------------' `-----------------------------------------' - */ - -#define _________________QWERTY_L1_________________ KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5 -#define _________________QWERTY_L2_________________ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T -#define _________________QWERTY_L3_________________ RIS_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G -#define _________________QWERTY_L4_________________ KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B -#define _________________QWERTY_L5_________________ KC_LCPO, KC_LGUI, KC_LALT, LOWER, RAISE, KC_SPC - -#define _________________QWERTY_R1_________________ KC_6, KC_7, KC_8, KC_9, KC_0, TD_BSPC -#define _________________QWERTY_R2_________________ KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS -#define _________________QWERTY_R3_________________ KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT -#define _________________QWERTY_R4_________________ KC_N, KC_M, TD_COMM, KC_DOT, KC_SLASH, KC_RSPC -#define _________________QWERTY_R5_________________ KC_SPC, KC_LEFT, KC_UP, KC_DOWN, KC_RIGHT, KC_RCPC - - -#define ___________________GAME_L1_________________ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5 -#define ___________________GAME_L2_________________ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T -#define ___________________GAME_L3_________________ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G -#define ___________________GAME_L4_________________ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B -#define ___________________GAME_L5_________________ KC_LCTL, KC_LGUI, LOWER, RAISE, KC_LALT, KC_SPC - -#define ___________________GAME_R1_________________ KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC -#define ___________________GAME_R2_________________ KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS -#define ___________________GAME_R3_________________ KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT -#define ___________________GAME_R4_________________ KC_N, KC_M, KC_COMM, KC_DOT, KC_SLASH, KC_RSFT -#define ___________________GAME_R5_________________ KC_SPC, KC_LEFT, KC_UP, KC_DOWN, KC_RIGHT, KC_RCTL - - - /* RAISE Layout - * ,-----------------------------------------. ,-----------------------------------------. - * | F12 | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | PGDN | UP | PGUP | |QWERTY| | | INS | HOME | PGUP | PRINT| | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | LEFT | DOWN | RIGHT| | GAME | | | DEL | END | PGDN |SCRLCK| | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | | | | | | | | | | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | | | | | | PREV | VOL+ | VOL- | NEXT | PLAY | - * `-----------------------------------------' `-----------------------------------------' - */ - -#define __________________RAISE_L1_________________ KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5 -#define __________________RAISE_L2_________________ _______, KC_PGDN, KC_UP, KC_PGUP, _______, QWERTY -#define __________________RAISE_L3_________________ _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, GAME -#define __________________RAISE_L4_________________ _______, _______, _______, _______, _______, _______ -#define __________________RAISE_L5_________________ _______, _______, _______, _______, _______, _______ - -#define __________________RAISE_R1_________________ KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11 -#define __________________RAISE_R2_________________ _______, KC_INS, KC_HOME, KC_PGUP, KC_PSCR, _______ -#define __________________RAISE_R3_________________ _______, KC_DEL, KC_END, KC_PGDN, KC_SLCK, _______ -#define __________________RAISE_R4_________________ _______, _______, _______, _______, _______, _______ -#define __________________RAISE_R5_________________ _______, KC_MPRV, KC_VOLU, KC_VOLD, KC_MNXT, KC_MPLY - - /* LOWER Layout - * ,-----------------------------------------. ,-----------------------------------------. - * | |RGBMD |RGBRMD|RGBTOG| | | | | | | | | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | SPDI | SAI | VAI | HUI | RESET| | | | | 7 | 8 | 9 | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | SPDD | SAD | VAD | HUD |RGBRST| | | | | 4 | 5 | 6 | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | | | | | | | 1 | 2 | 3 | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | | | | | | | | 0 | . | | - * `-----------------------------------------' `-----------------------------------------' - */ - -#define __________________LOWER_L1_________________ _______, RGB_RMOD, RGB_MOD, RGB_TOG, _______, _______ -#define __________________LOWER_L2_________________ RGB_SPI, RGB_SAI, RGB_VAI, RGB_HUI, RESET, _______ -#define __________________LOWER_L3_________________ RGB_SPD, RGB_SAD, RGB_VAD, RGB_HUD, RGBRST, _______ -#define __________________LOWER_L4_________________ _______, _______, _______, _______, _______, _______ -#define __________________LOWER_L5_________________ _______, _______, _______, _______, _______, _______ - -#define __________________LOWER_R1_________________ _______, _______, _______, KC_SLCK, KC_NLCK, KC_DEL -#define __________________LOWER_R2_________________ _______, _______, KC_KP_7, KC_KP_8, KC_KP_9, _______ -#define __________________LOWER_R3_________________ _______, _______, KC_KP_4, KC_KP_5, KC_KP_6, _______ -#define __________________LOWER_R4_________________ _______, _______, KC_KP_1, KC_KP_2, KC_KP_3, _______ -#define __________________LOWER_R5_________________ _______, _______, _______, KC_KP_0, KC_PDOT, _______ - - /* ADJUST Layout - * ,-----------------------------------------. ,-----------------------------------------. - * | | | | | | | | | | | | | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | RESET| DEBUG| | | | | |TERM_ON|TERM_OFF| | | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | |MusMod|Aud on|AudOff|AGnorm| |AGswap|ClkUp |ClkDwn| | | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | |Voice-|Voice+|Mus on|MusOff|MidiOn| |MidOff|ClkOn |ClkOff| | | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | | | | | | | | | | | - * `-----------------------------------------' `-----------------------------------------' - */ - -#define _________________ADJUST_L1_________________ _______, _______, _______, _______, _______, _______ -#define _________________ADJUST_L2_________________ _______, RESET, DEBUG, _______, _______, _______ -#define _________________ADJUST_L3_________________ _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM -#define _________________ADJUST_L4_________________ _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON -#define _________________ADJUST_L5_________________ _______, _______, _______, _______, _______, _______ - -#define _________________ADJUST_R1_________________ _______, _______, _______, _______, _______, _______ -#define _________________ADJUST_R2_________________ _______, TERM_ON, TERM_OFF, _______, _______, _______ -#define _________________ADJUST_R3_________________ AG_SWAP, CK_UP, CK_DOWN, _______, _______, _______ -#define _________________ADJUST_R4_________________ MI_OFF, CK_ON, CK_OFF, _______, _______, _______ -#define _________________ADJUST_R5_________________ _______, _______, _______, _______, _______, _______ diff --git a/users/xulkal/process_records.c b/users/xulkal/process_records.c deleted file mode 100644 index ca237614..00000000 --- a/users/xulkal/process_records.c +++ /dev/null @@ -1,62 +0,0 @@ -#include "process_records.h" -#include "custom_keycodes.h" - -#ifdef RGB_ENABLE -#include "custom_rgb.h" -#endif - -#ifdef TRILAYER_ENABLED -uint32_t layer_state_set_user(uint32_t state) -{ - return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); -} -#endif - -bool process_record_user(uint16_t keycode, keyrecord_t *record) -{ - static uint16_t reset_timer; - -#ifndef TAP_DANCE_ENABLE - if (!process_custom_tap_dance(keycode, record)) - return false; -#endif - - switch (keycode) - { - case RGBRST: -#ifdef RGB_ENABLE - if (record->event.pressed) - rgb_reset(); -#endif - return false; - case RESET: - { - if (record->event.pressed) - reset_timer = timer_read() + 500; - else if (timer_expired(timer_read(), reset_timer)) - reset_keyboard(); - } - return false; -#ifdef RGB_MATRIX_TOG_LAYERS - case RGB_TOG: - if (record->event.pressed) { - rgb_matrix_increase_flags(); - } - return false; -#endif - } - - return process_record_encoder(keycode, record) && process_record_keymap(keycode, record); -} - -__attribute__ ((weak)) -bool process_record_keymap(uint16_t keycode, keyrecord_t *record) -{ - return true; -} - -__attribute__ ((weak)) -bool process_record_encoder(uint16_t keycode, keyrecord_t *record) -{ - return true; -} diff --git a/users/xulkal/process_records.h b/users/xulkal/process_records.h deleted file mode 100644 index c219394f..00000000 --- a/users/xulkal/process_records.h +++ /dev/null @@ -1,18 +0,0 @@ -#pragma once -#include "quantum.h" -#include "custom_tap_dance.h" - -enum layer_number { - _QWERTY = 0, -#ifndef GAMELAYER_DISABLE - _GAME, -#endif - _LOWER, - _RAISE, -#ifdef TRILAYER_ENABLED - _ADJUST -#endif -}; - -bool process_record_keymap(uint16_t keycode, keyrecord_t *record); -bool process_record_encoder(uint16_t keycode, keyrecord_t *record); diff --git a/users/xulkal/rules.mk b/users/xulkal/rules.mk deleted file mode 100644 index 8f8365ea..00000000 --- a/users/xulkal/rules.mk +++ /dev/null @@ -1,32 +0,0 @@ -SRC += xulkal.c \ - process_records.c \ - custom_tap_dance.c - -# Some usual defaults -MOUSEKEY_ENABLE = no # Mouse keys (+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control (+450) -TAP_DANCE_ENABLE = yes - -ifneq ($(strip $(DISABLE_LTO)), yes) - EXTRAFLAGS += -flto - OPT_DEFS += -DNO_ACTION_MACRO - OPT_DEFS += -DNO_ACTION_FUNCTION -endif - -ifeq ($(strip $(ENCODER_ENABLE)), yes) - SRC += custom_encoder.c -endif - -ifneq ($(strip $(RGB_MATRIX_ENABLE)), no) - OPT_DEFS += -DRGB_ENABLE - SRC += custom_rgb.c -endif - -ifeq ($(strip $(RGBLIGHT_ENABLE)), yes) - OPT_DEFS += -DRGB_ENABLE - SRC += custom_rgb.c -endif - -ifeq ($(strip $(OLED_DRIVER_ENABLE)), yes) - SRC += custom_oled.c -endif diff --git a/users/xulkal/xulkal.c b/users/xulkal/xulkal.c deleted file mode 100644 index ea9b6bdb..00000000 --- a/users/xulkal/xulkal.c +++ /dev/null @@ -1 +0,0 @@ -#include "xulkal.h" diff --git a/users/xulkal/xulkal.h b/users/xulkal/xulkal.h deleted file mode 100644 index 32df8df0..00000000 --- a/users/xulkal/xulkal.h +++ /dev/null @@ -1,6 +0,0 @@ -#pragma once - -#include "process_records.h" -#include "layouts.h" -#include "custom_keycodes.h" -#include "custom_tap_dance.h" diff --git a/users/yanfali/config.h b/users/yanfali/config.h deleted file mode 100644 index 2c427f03..00000000 --- a/users/yanfali/config.h +++ /dev/null @@ -1,21 +0,0 @@ -#pragma once - -#ifdef KEYBOARD_maartenwut_plain60 - -#define B7_AUDIO -#ifdef AUDIO_ENABLE - #define STARTUP_SONG SONG(GUITAR_SOUND) -#endif - -#endif - -#ifdef KEYBOARD_xd84 - -#undef RGBLED_NUM -#define RGBLED_NUM 20 - -#undef RGBLIGHT_ANIMATIONS -#define RGBLIGHT_EFFECT_RAINBOW_MOOD -#define RGBLIGHT_EFFECT_RAINBOW_SWIRL - -#endif diff --git a/users/yanfali/rules.mk b/users/yanfali/rules.mk deleted file mode 100644 index a4f1092d..00000000 --- a/users/yanfali/rules.mk +++ /dev/null @@ -1,27 +0,0 @@ -BOOTMAGIC = lite -DYNAMIC_KEYMAP_ENABLE = no -CONSOLE_ENABLE = yes -COMMAND_ENABLE = yes -LINK_TIME_OPTIMIZATION_ENABLE = yes -AUDIO_ENABLE = no - -# only enable audio on specific boards -ifeq ($(strip $(KEYBOARD)), maartenwut/plain60) - AUDIO_ENABLE = yes -endif - -ifeq ($(strip $(KEYBOARD)), clueboard/60) - AUDIO_ENABLE = yes -endif - -ifeq ($(strip $(KEYBOARD)), hadron/ver3) - AUDIO_ENABLE = yes -endif - -ifeq ($(strip $(KEYBOARD)), fruity60) - COMMAND_ENABLE = no -endif - -ifeq ($(strip $(KEYBOARD)), kbdfans/kbd75/rev1) - COMMAND_ENABLE = no -endif diff --git a/users/yet-another-developer/.gitignore b/users/yet-another-developer/.gitignore deleted file mode 100644 index d8155691..00000000 --- a/users/yet-another-developer/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -secrets.c -secrets.h \ No newline at end of file diff --git a/users/yet-another-developer/README.md b/users/yet-another-developer/README.md deleted file mode 100644 index 3e528bcf..00000000 --- a/users/yet-another-developer/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# User Space for yet-another-developer - - -## Reference / Inspiration - - /u/kuchosauronad0 - - /u/drashna - - /u/not-quite-neo \ No newline at end of file diff --git a/users/yet-another-developer/combo.c b/users/yet-another-developer/combo.c deleted file mode 100644 index b4e8e84a..00000000 --- a/users/yet-another-developer/combo.c +++ /dev/null @@ -1,27 +0,0 @@ -#include "combo.h" - -void process_combo_event(uint8_t combo_index, bool pressed){ - switch(combo_index) { - case ZV_COPY: - if (pressed) { - tap_code16(LCTL(KC_C)); - } - break; - case XV_CUT: - if (pressed) { - tap_code16(LCTL(KC_X)); - } - break; - - case CV_PASTE: - if (pressed) { - tap_code16(LCTL(KC_V)); - } - break; - case QP_SLEEP: - if (pressed) { - tap_code16(KC_SYSTEM_SLEEP); - } - break; - } -} diff --git a/users/yet-another-developer/combo.h b/users/yet-another-developer/combo.h deleted file mode 100644 index e2ff09ab..00000000 --- a/users/yet-another-developer/combo.h +++ /dev/null @@ -1,21 +0,0 @@ -#pragma once -#include "quantum.h" -enum combo_events { - ZV_COPY, - XV_CUT, - CV_PASTE, - QP_SLEEP -}; - -const uint16_t PROGMEM copy_combo[] = {KC_Z, KC_V, COMBO_END}; -const uint16_t PROGMEM cut_combo[] = {KC_X, KC_V, COMBO_END}; -const uint16_t PROGMEM paste_combo[] = {KC_C, KC_V, COMBO_END}; -const uint16_t PROGMEM sleep_combo[] = {KC_Q, KC_P, COMBO_END}; - -combo_t key_combos[COMBO_COUNT] = { - [ZV_COPY] = COMBO_ACTION(copy_combo), - [XV_CUT] = COMBO_ACTION(cut_combo), - [CV_PASTE] = COMBO_ACTION(paste_combo), - [QP_SLEEP] = COMBO_ACTION(sleep_combo), -}; - diff --git a/users/yet-another-developer/config.h b/users/yet-another-developer/config.h deleted file mode 100644 index d46d487f..00000000 --- a/users/yet-another-developer/config.h +++ /dev/null @@ -1,56 +0,0 @@ -#pragma once - -/* Set Polling rate to 1000Hz */ -#define USB_POLLING_INTERVAL_MS 1 - -#ifndef ONESHOT_TAP_TOGGLE - #define ONESHOT_TAP_TOGGLE 2 -#endif // !ONESHOT_TAP_TOGGLE - -#ifndef ONESHOT_TIMEOUT - #define ONESHOT_TIMEOUT 2000 -#endif // !ONESHOT_TIMEOUT - -#ifndef QMK_KEYS_PER_SCAN - #define QMK_KEYS_PER_SCAN 4 -#endif // !QMK_KEYS_PER_SCAN - -#if defined(LEADER_ENABLE) - #define LEADER_PER_KEY_TIMING - #define LEADER_TIMEOUT 250 -#endif // !LEADER_ENABLE - -#if defined(COMBO_ENABLE) - #define COMBO_COUNT 4 - #define COMBO_TERM 150 -#endif // !COMBO_ENABLE - -#if defined(NKRO_ENABLE) - #define FORCE_NKRO -#endif // !NKRO_ENABLE - -// this makes it possible to do rolling combos (zx) with keys that -// convert to other keys on hold (z becomes ctrl when you hold it, -// and when this option isn't enabled, z rapidly followed by x -// actually sends Ctrl-x. That's bad.) -#define IGNORE_MOD_TAP_INTERRUPT -#undef PERMISSIVE_HOLD -//#define TAPPING_FORCE_HOLD -//#define RETRO_TAPPING - -#ifndef TAPPING_TOGGLE - #define TAPPING_TOGGLE 1 -#endif - -#ifdef TAPPING_TERM -# undef TAPPING_TERM -#endif // !TAPPING_TERM -#if defined(KEYBOARD_ergodash) - #define TAPPING_TERM 240 -#else - #define TAPPING_TERM 200 -#endif - -#define TAP_CODE_DELAY 5 //DEFAULT: 100 - -#define MACRO_TIMER 5 diff --git a/users/yet-another-developer/leader.c b/users/yet-another-developer/leader.c deleted file mode 100644 index 3cbbf8d7..00000000 --- a/users/yet-another-developer/leader.c +++ /dev/null @@ -1,46 +0,0 @@ -#include "leader.h" - -LEADER_EXTERNS(); - -// Runs constantly in the background, in a loop. -void matrix_scan_user(void){ - -#ifdef TAP_DANCE_ENABLE // Run Diablo 3 macro checking code. -// run_diablo_macro_check(); -#endif // TAP_DANCE_ENABLE - -#ifdef RGBLIGHT_ENABLE - matrix_scan_rgb(); -#endif // RGBLIGHT_ENABLE - - LEADER_DICTIONARY() { - leading = false; - leader_end(); - - SEQ_TWO_KEYS(KC_V, KC_Z){ - // vim: Zoom pane - tap_code16(LCTL(KC_W)); - tap_code16(LSFT(KC_BSLS)); - } - - SEQ_TWO_KEYS(KC_V, KC_R) { - // vim: Substitute and place cursor - SEND_STRING(":%s///g" SS_TAP(X_LEFT)); - tap_code(KC_LEFT); - tap_code(KC_LEFT); - } - - SEQ_TWO_KEYS(KC_V, KC_T) { - // vim: move current pane to new tab - tap_code16(LCTL(KC_W)); - tap_code16(LSFT(KC_T)); - } - - SEQ_THREE_KEYS(KC_BSPC, KC_BSPC, KC_BSPC){ - // Reset the keyboard - reset_keyboard(); - } - } - - matrix_scan_keymap(); -} diff --git a/users/yet-another-developer/leader.h b/users/yet-another-developer/leader.h deleted file mode 100644 index 7ed6c8a8..00000000 --- a/users/yet-another-developer/leader.h +++ /dev/null @@ -1,6 +0,0 @@ -#pragma once -#include "yet-another-developer.h" - -#include "leader.h" - -void matrix_scan_user(void); diff --git a/users/yet-another-developer/process_records.c b/users/yet-another-developer/process_records.c deleted file mode 100644 index c7dbd704..00000000 --- a/users/yet-another-developer/process_records.c +++ /dev/null @@ -1,193 +0,0 @@ -#include "yet-another-developer.h" - -uint16_t copy_paste_timer; - -__attribute__ ((weak)) -bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { - return true; -} - -__attribute__ ((weak)) -bool process_record_secrets(uint16_t keycode, keyrecord_t *record) { - return true; -} - -// Defines actions for my global custom keycodes. Defined in yet-another-developer.h file -// Then runs the _keymap's record handier if not processed here -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - - // If console is enabled, it will print the matrix position and status of each key pressed -#ifdef KEYLOGGER_ENABLE - #if defined(KEYBOARD_ergodox_ez) || defined(KEYBOARD_keebio_iris_rev2) - xprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.row, record->event.key.col, record->event.pressed); - #else - xprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed); - #endif -#endif //KEYLOGGER_ENABLE - - switch (keycode) { - case KC_QWERTY ... KC_UNICODE: - if (record->event.pressed) { - set_single_persistent_default_layer(keycode - KC_QWERTY); - } - break; - - case KC_MAKE: // Compiles the firmware, and adds the flash command based on keyboard bootloader - if (!record->event.pressed) { - clear_mods(); - clear_oneshot_mods(); - send_string_with_delay_P(PSTR("make " QMK_KEYBOARD ":" QMK_KEYMAP), TAP_CODE_DELAY); - { - send_string_with_delay_P(PSTR(":flash"), TAP_CODE_DELAY); - } - } - break; - - /* Tap Dance */ - case MC_QT1: // "" - if(record->event.pressed){ - SEND_STRING("\"\""); - tap_code(KC_LEFT); - } - break; - case MC_QT2: // '' - if(record->event.pressed){ - SEND_STRING("''"); - tap_code(KC_LEFT); - } - break; - case MC_QT3: // `' - if(record->event.pressed){ - SEND_STRING("`'"); - tap_code(KC_LEFT); - } - break; - case MC_PAR: // Parenthesis - if(record->event.pressed){ - SEND_STRING("()"); - tap_code(KC_LEFT); - } - break; - case MC_CUR: // Curly bracket - if(record->event.pressed){ - SEND_STRING("{}"); - tap_code(KC_LEFT); - } - break; - case MC_SQR: // Square bracket - if(record->event.pressed){ - SEND_STRING("[]"); - tap_code(KC_LEFT); - } - break; - case MC_ABR: // Angle bracket - if(record->event.pressed){ - SEND_STRING("<>"); - tap_code(KC_LEFT); - } - break; - case MCT_NEW: // New Tmux Session - if(record->event.pressed){ - SEND_STRING(":neww"); - tap_code(KC_ENT); - } - break; - case MCT_SH: // Tmux horizontal split - if(record->event.pressed){ - SEND_STRING("%"); - } - break; - case MCT_SV: // Tmux vertical split - if(record->event.pressed){ - SEND_STRING("\""); - } - break; - case MCT_ZM: // Tmux zoom - if(record->event.pressed){ - tap_code(KC_Z); - } - break; - case MCT_SCR: // Tmux scroll mode - if(record->event.pressed){ - tap_code(KC_PGUP); - } - break; - case MCT_UP: // Tmux up - break; - case MCT_DW: // Tmux down - break; - case MCT_LFT: // Tmux left - break; - case MCT_RGT: // Tmux right - tap_code(KC_RIGHT); - break; - case MCV_B: // Vim begin of line - if(record->event.pressed){ - tap_code(KC_0); - } - break; - case MCV_E: // Vim end of line - if(record->event.pressed){ - SEND_STRING(":vsplit"); - tap_code(KC_ENT); - } - break; - case MCT_F: // Vim for loop - if(record->event.pressed){ - SEND_STRING(":help"); - tap_code(KC_ENT); - } - break; - - case VRSN: // Prints firmware version - if (record->event.pressed) { - send_string_with_delay_P(PSTR(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION ", Built on: " QMK_BUILDDATE), TAP_CODE_DELAY); - } - break; - - - case KC_CCCV: // One key copy/paste - if (record->event.pressed) { - copy_paste_timer = timer_read(); - } else { - if (timer_elapsed(copy_paste_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; -#ifdef UNICODE_ENABLE - case UC_FLIP: // (ノಠ痊ಠ)ノ彡┻━┻ - if (record->event.pressed) { - send_unicode_hex_string("0028 30CE 0CA0 75CA 0CA0 0029 30CE 5F61 253B 2501 253B"); - } - break; - case UC_TABL: // ┬─┬ノ( º _ ºノ) - if (record->event.pressed) { - send_unicode_hex_string("252C 2500 252C 30CE 0028 0020 00BA 0020 005F 0020 00BA 30CE 0029"); - } - break; - case UC_SHRG: // ¯\_(ツ)_/¯ - if (record->event.pressed) { - send_unicode_hex_string("00AF 005C 005F 0028 30C4 0029 005F 002F 00AF"); - } - break; - case UC_DISA: // ಠ_ಠ - if (record->event.pressed) { - send_unicode_hex_string("0CA0 005F 0CA0"); - } - break; -#endif // UNICODE_ENABLE - } - - return process_record_keymap(keycode, record) && -#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) - process_record_user_rgb(keycode, record) && -#endif // RGBLIGHT_ENABLE - process_record_secrets(keycode, record); -} diff --git a/users/yet-another-developer/process_records.h b/users/yet-another-developer/process_records.h deleted file mode 100644 index d4576f54..00000000 --- a/users/yet-another-developer/process_records.h +++ /dev/null @@ -1,109 +0,0 @@ -#pragma once -#include "yet-another-developer.h" - -#if defined(KEYMAP_SAFE_RANGE) -# define PLACEHOLDER_SAFE_RANGE KEYMAP_SAFE_RANGE -#else -# define PLACEHOLDER_SAFE_RANGE SAFE_RANGE -#endif - -enum userspace_custom_keycodes { - VRSN = PLACEHOLDER_SAFE_RANGE, // Prints QMK Firmware and board info - KC_QWERTY, // Sets default layer to QWERTY - KC_COLEMAK, // Sets default layer to COLEMAK - KC_DVORAK, // Sets default layer to DVORAK - KC_WORKMAN, // Sets default layer to WORKMAN - KC_UNICODE, // Sets default layer to UNICOD - - KC_MAKE, // Run keyboard's customized make command - KC_SECRET_1, // test1 - KC_SECRET_2, // test2 - KC_SECRET_3, // test3 - KC_SECRET_4, // test4 - KC_SECRET_5, // test5 - KC_CCCV, // Hold to copy, tap to paste - KC_NUKE, // NUCLEAR LAUNCH DETECTED!!! - UC_FLIP, // (ಠ痊ಠ)┻━┻ - UC_TABL, // ┬─┬ノ( º _ ºノ) - UC_SHRG, // ¯\_(ツ)_/¯ - UC_DISA, // ಠ_ಠ - - MC_QT1, // "" - MC_QT2, // '' - MC_QT3, // `' - MC_PAR, // Parenthesis - MC_CUR, // Curly bracket - MC_SQR, // Square bracket - MC_ABR, // Angle bracket - MCT_NEW, // New Tmux Session - MCT_SH, // Tmux horizontal split - MCT_SV, // Tmux vertical split - MCT_ZM, // Tmux zoom - MCT_SCR, // Tmux scroll mode - MCT_UP, // Tmux up - MCT_DW, // Tmux down - MCT_LFT, // Tmux left - MCT_RGT, // Tmux right - MCV_B, // Vim begin of line - MCV_E, // Vim end of line - MCT_F, // Vim for loop - MCG_A, // Git add - MCG_C, // Git commit - MCG_P, // Git push - MCG_R, // Git revert - MCG_L, // Git log - MCG_S, // Git status - - NEW_SAFE_RANGE // use "NEWPLACEHOLDER for keymap specific codes -}; - -bool process_record_secrets(uint16_t keycode, keyrecord_t *record); -bool process_record_keymap( uint16_t keycode, keyrecord_t *record); - -#define LOWER MO(_LOWER) -#define RAISE MO(_RAISE) -#define ADJUST MO(_ADJUST) -#define TG_MODS TG(_MODS) -#define OS_LWR OSL(_LOWER) -#define OS_RSE OSL(_RAISE) -#define OS_UNI OSL(_UNICODE) - -#define KC_SEC1 KC_SECRET_1 -#define KC_SEC2 KC_SECRET_2 -#define KC_SEC3 KC_SECRET_3 -#define KC_SEC4 KC_SECRET_4 -#define KC_SEC5 KC_SECRET_5 - -#define QWERTY KC_QWERTY -#define DVORAK KC_DVORAK -#define COLEMAK KC_COLEMAK -#define WORKMAN KC_WORKMAN -#define UNICODE KC_UNICODE - -#define KC_RESET RESET -#define KC_RST KC_RESET - -#define BK_LWER LT(_LOWER, KC_BSPC) -#define SP_LWER LT(_LOWER, KC_SPC) -#define DL_RAIS LT(_RAISE, KC_DEL) -#define ET_RAIS LT(_RAISE, KC_ENTER) - -/* OSM keycodes, to keep things clean and easy to change */ -#define KC_MLSF OSM(MOD_LSFT) -#define KC_MRSF OSM(MOD_RSFT) - -#define OS_LGUI OSM(MOD_LGUI) -#define OS_RGUI OSM(MOD_RGUI) -#define OS_LSFT OSM(MOD_LSFT) -#define OS_RSFT OSM(MOD_RSFT) -#define OS_LCTL OSM(MOD_LCTL) -#define OS_RCTL OSM(MOD_RCTL) -#define OS_LALT OSM(MOD_LALT) -#define OS_RALT OSM(MOD_RALT) -#define OS_MEH OSM(MOD_MEH) -#define OS_HYPR OSM(MOD_HYPR) - -#define ALT_APP ALT_T(KC_APP) - -#define UC_IRNY UC(0x2E2E) -#define UC_CLUE UC(0x203D) diff --git a/users/yet-another-developer/rules.mk b/users/yet-another-developer/rules.mk deleted file mode 100644 index 597df6d0..00000000 --- a/users/yet-another-developer/rules.mk +++ /dev/null @@ -1,50 +0,0 @@ -SRC += yet-another-developer.c \ - process_records.c - -LINK_TIME_OPTIMIZATION_ENABLE = yes -SPACE_CADET_ENABLE = no - -ifeq ($(strip $(TAP_DANCE_ENABLE)), yes) - SRC += tap_dances.c -endif - -ifeq ($(strip $(COMBO_ENABLE)), yes) - SRC += combo.c -endif - - -ifeq ($(strip $(LEADER_ENABLE)), yes) - SRC += leader.c -endif - - -ifneq ("$(wildcard $(USER_PATH)/secrets.c)","") - SRC += secrets.c -endif - - -ifeq ($(strip $(NO_SECRETS)), yes) - OPT_DEFS += -DNO_SECRETS -endif - - -ifeq ($(strip $(UNICODEMAP_ENABLE)), yes) - SRC += unicode.c -endif - - -ifeq ($(strip $(MACROS_ENABLED)), yes) - OPT_DEFS += -DMACROS_ENABLED -endif - - -ifdef CONSOLE_ENABLE - ifeq ($(strip $(KEYLOGGER_ENABLE)), yes) - OPT_DEFS += -DKEYLOGGER_ENABLE - endif -endif - - -ifeq ($(strip $(MAKE_BOOTLOADER)), yes) - OPT_DEFS += -DMAKE_BOOTLOADER -endif diff --git a/users/yet-another-developer/tap_dances.c b/users/yet-another-developer/tap_dances.c deleted file mode 100644 index 66dcc60f..00000000 --- a/users/yet-another-developer/tap_dances.c +++ /dev/null @@ -1,55 +0,0 @@ -#include "tap_dances.h" - -void td_parenthesis (qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 1) { -// SEND_STRING ("\("); - tap_code(KC_QUOT); - reset_tap_dance (state); - } - else if (state->count == 2) { - SEND_STRING("()" SS_TAP(X_LEFT)); - reset_tap_dance (state); - } - else if (state->count == 3) { - SEND_STRING("[]" SS_TAP(X_LEFT)); - reset_tap_dance (state); - } - else if (state->count == 4) { - SEND_STRING("{}" SS_TAP(X_LEFT)); - reset_tap_dance (state); - } - else if (state->count >= 5) { - SEND_STRING("<>" SS_TAP(X_LEFT)); - reset_tap_dance (state); - } -} - -void safe_reset(qk_tap_dance_state_t *state, void *user_data) { - if (state->count >= 3) { - // Reset the keyboard if you tap the key more than three times - reset_keyboard(); - reset_tap_dance(state); - } -} - -qk_tap_dance_action_t tap_dance_actions[] = { - [TD_RESET] = ACTION_TAP_DANCE_FN(safe_reset), - [TD_NUM1] = ACTION_TAP_DANCE_DOUBLE(KC_1, KC_4), - [TD_NUM2] = ACTION_TAP_DANCE_DOUBLE(KC_2, KC_5), - [TD_NUM3] = ACTION_TAP_DANCE_DOUBLE(KC_3, KC_6), - [TD_QT1] = ACTION_TAP_DANCE_DOUBLE(KC_QUOT, MC_QT1), - [TD_QT2] = ACTION_TAP_DANCE_DOUBLE(LSFT(KC_QUOT), MC_QT2), - [TD_QT3] = ACTION_TAP_DANCE_DOUBLE(KC_GRV, MC_QT3), - - [TD_EOL] = ACTION_TAP_DANCE_DOUBLE(KC_E, MC_EOL), // end of line - [TD_BOL] = ACTION_TAP_DANCE_DOUBLE(KC_A, MC_BOL), // beginning of line - [TD_NW] = ACTION_TAP_DANCE_DOUBLE(KC_F, MC_NW), // next word - [TD_PW] = ACTION_TAP_DANCE_DOUBLE(KC_B, MC_PW), // pevious word - [TD_DW] = ACTION_TAP_DANCE_DOUBLE(KC_W, MC_DW), // pevious word - - [TD_SPC] = ACTION_TAP_DANCE_FN(td_parenthesis), // \(, (), [], {}, <> - [TD_PAR] = ACTION_TAP_DANCE_DOUBLE(KC_LPRN, MC_PAR), // () - [TD_SQR] = ACTION_TAP_DANCE_DOUBLE(KC_LBRC, MC_SQR), // [] - [TD_CUR] = ACTION_TAP_DANCE_DOUBLE(LSFT(KC_LCBR), MC_CUR),// {} - [TD_ABR] = ACTION_TAP_DANCE_DOUBLE(LSFT(KC_COMM), MC_ABR),// -}; diff --git a/users/yet-another-developer/tap_dances.h b/users/yet-another-developer/tap_dances.h deleted file mode 100644 index 8afda817..00000000 --- a/users/yet-another-developer/tap_dances.h +++ /dev/null @@ -1,26 +0,0 @@ -#pragma once -#include "yet-another-developer.h" - -#ifdef TAP_DANCE_ENABLE -enum { - TD_RESET = 0, - TD_SPC, // for special function td_parenthesis testing - TD_NUM1, // compact gaming numpad - TD_NUM2, // - TD_NUM3, // - TD_TMX, // tmux control sequence - TD_EOL, // end of line - TD_BOL, // beginning of line - TD_NW, // next word - TD_PW, // pevious word - TD_DW, // delete word - TD_QT1, // single double quote for ' - TD_QT2, // single double quote for " - TD_QT3, // single double quote for ` - TD_PAR, // single double parenthesis - TD_CUR, // single double curly braces - TD_SQR, // single double square brackets - TD_ABR // single double angle brackets -}; -#endif // TAP_DANCE_ENABLE -void td_parenthesis (qk_tap_dance_state_t *state, void *user_data); diff --git a/users/yet-another-developer/unicode.c b/users/yet-another-developer/unicode.c deleted file mode 100644 index 8b312deb..00000000 --- a/users/yet-another-developer/unicode.c +++ /dev/null @@ -1,62 +0,0 @@ -#include "unicode.h" - -//#ifdef UNICODEMAP_ENABLE -const uint32_t PROGMEM unicode_map[] = { - [BANG] = 0x0203D,// ‽ - [IRONY] = 0x02E2E,// ⸮ - [DEGREE] = 0x000B0,// ° - [THINK] = 0x1F914,// 🤔 - [GRIN] = 0x1F600,// � - [MONOCL] = 0x1F9D0,// 🧐 - [DRUG0] = 0x1F92A,// 🤪 - [DRUG1] = 0x1F974,// 🥴 - [CLOWN] = 0x1F921,// 🤡 - [MNDBLWN] = 0x1F92F,// 🤯 - [MONEY] = 0x1F911,// 🤑 - [SHTUP] = 0x1F910,// 🤐 - [PARTY] = 0x1F973,// 🥳 - [SMRK] = 0x1F60F,// 😏 - [WEARY] = 0x1F629,// 😩 - [UNAMU] = 0x1F612,// 😒 - [SPY] = 0x1F575,//🕵 - [DAFUQ] = 0x1F47A,// 👺 - [FIST0] = 0x1F91B,// 🤛 - [FIST1] = 0x1F91C,// 🤜 - [FIST2] = 0x270A, // ✊ - [FIST3] = 0x1F44A,// 👊 - [WIFIHAND] = 0x1F44B,// 👋 - [OKOK] = 0x1F44C,// 👌 - [EFFU] = 0x1F595,// 🖕 - [SPOCK] = 0x1F596,// 🖖 - [INUP] = 0x1F446,// 👆 - [THDN] = 0x1F44E,// 👎 - [THUP] = 0x1F44D,// 👍 - [TUMBLER] = 0x1F943,// 🥃 - [DRAGON0] = 0x1F409,// 🐉 - [DRAGON1] = 0x1F432,// 🐲 - [TIGER0] = 0x1F405,// 🐅 - [TIGER1] = 0x1F42F,// 🐯 - [COOL] = 0x1F192,// 🆒 - [UCHART] = 0x1F4C8,// 📈 - [DCHART] = 0x1F4C9,// 📉 - [BCHART] = 0x1F4CA,// 📊 - [NOPRCY] = 0x1F572,// 🕲 - [PRCY] = 0x1F571,// 🕱 - [BBB] = 0x1F171,// 🅱 - [POO] = 0x1F4A9,// 💩 - [HUNDR] = 0x1F4AF,// 💯 - [EGGPL] = 0x1F346,// 🍆 - [WATER] = 0x1F4A6,// 💦 - [LIT] = 0x1F525,// 🔥 - [SNEK] = 0x1F40D,// 🐍 - [PENGUIN] = 0x1F427,// 🐧 - [BOAR] = 0x1F417,// 🐗 - [MONKEY] = 0x1F412,// 🐒 - [CHICK] = 0x1F425,// 🐥 - [DASH] = 0x1F4A8,// 💨 - [DIZZY] = 0x1F4AB,// 💫 - [KEEB] = 0x1F5AE,// 🖮 - [HOLE] = 0x1F573,// 🕳 - [SAUCER] = 0x1F6F8// 🛸 - }; -//#endif // UNICODEMAP_ENABLE diff --git a/users/yet-another-developer/unicode.h b/users/yet-another-developer/unicode.h deleted file mode 100644 index cb550243..00000000 --- a/users/yet-another-developer/unicode.h +++ /dev/null @@ -1,67 +0,0 @@ -#pragma once - -#include "quantum.h" - -void send_unicode_hex_string(const char* str); - -/* use X(n) to call the */ -#ifdef UNICODEMAP_ENABLE -enum unicode_name { -OKOK, // -BANG, // ‽ -IRONY, // ⸮ -DEGREE, // ° -THINK, // 🤔 -GRIN, // � -MONOCL, // 🧐 -DRUG0, // 🤪 -DRUG1, // 🥴 -CLOWN, // 🤡 -MNDBLWN, // 🤯 -MONEY, // 🤑 -SHTUP, // 🤐 -PARTY, // 🥳 -SMRK, // 😏 -WEARY, // 😩 -UNAMU, // 😒 -SPY, // 🕵 -DAFUQ, // 👺 -FIST0, // 🤛 -FIST1, // 🤜 -FIST2, // ✊ -FIST3, // 👊 -WIFIHAND, // 👌 -EFFU, // 🖕 -SPOCK, // 🖖 -INUP, // 👆 -THDN, // 👎 -THUP, // 👍 -TUMBLER, // 🥃 -DRAGON0, // 🐉 -DRAGON1, // 🐅 -TIGER0, // 🐅 -TIGER1, // 🐯 -COOL, // 🆒 -UCHART, // 📈 -DCHART, // 📉 -BCHART, // 📊 -NOPRCY, // 🕲 -PRCY, // 🕱 -BBB, // 🅱 -POO, // 💩 -HUNDR, // 💯 -EGGPL, // 🍆 -WATER, // 💦 -LIT, // 🔥 -SNEK, // 🐍 -PENGUIN, // 🐧 -BOAR, // 🐗 -MONKEY, // 🐒 -CHICK, // 🐥 -DASH, // 💨 -DIZZY, // 💫 -KEEB, // 🖮 -HOLE, // 🕳 -SAUCER // 🛸 -}; -#endif diff --git a/users/yet-another-developer/wrappers.h b/users/yet-another-developer/wrappers.h deleted file mode 100644 index cd21032a..00000000 --- a/users/yet-another-developer/wrappers.h +++ /dev/null @@ -1,166 +0,0 @@ -#pragma once -#include "yet-another-developer.h" - -/* -Since our quirky block definitions are basically a list of comma separated -arguments, we need a wrapper in order for these definitions to be -expanded before being used as arguments to the LAYOUT_xxx macro. -*/ -#if (!defined(LAYOUT) && defined(KEYMAP)) -# define LAYOUT KEYMAP -#endif - -// clang-format off - -#define KEYMAP_wrapper(...) LAYOUT(__VA_ARGS__) -#define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__) -#define LAYOUT_ortho_5x14_wrapper(...) LAYOUT_ortho_5x14(__VA_ARGS__) - -/* ---------- LEFT HAND ----------- ---------- RIGHT HAND ---------- */ -#define LAYOUT_ergodash_pretty( \ - L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \ - L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \ - L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \ - L30, L31, L32, L33, L34, L35, R31, R32, R33, R34, R35, R36, \ - L40, L41, L42, L43, R43, R44, R45, R46, \ - L36, R30, \ - L44, L45, L46, R40, R41, R42 \ - ) \ - { \ - { L00, L01, L02, L03, L04, L05, L06 }, \ - { L10, L11, L12, L13, L14, L15, L16 }, \ - { L20, L21, L22, L23, L24, L25, L26 }, \ - { L30, L31, L32, L33, L34, L35, L36 }, \ - { L40, L41, L42, L43, L44, L45, L46 }, \ - { R06, R05, R04, R03, R02, R01, R00 }, \ - { R16, R15, R14, R13, R12, R11, R10 }, \ - { R26, R25, R24, R23, R22, R21, R20 }, \ - { R36, R35, R34, R33, R32, R31, R30 }, \ - { R46, R45, R44, R43, R42, R41, R40 } \ - } - -/* -Blocks for each of the four major keyboard layouts -Organized so we can quickly adapt and modify all of them -at once, rather than for each keyboard, one at a time. -And this allows for much cleaner blocks in the keymaps. -For instance Tap/Hold for Control on all of the layouts - -NOTE: These are all the same length. If you do a search/replace - then you need to add/remove underscores to keep the - lengths consistent. -*/ - -#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_SLASH - - -#ifdef TAP_DANCE_ENABLE - #define _________________COLEMAK_L1________________ KC_Q, KC_W, KC_F, KC_P, KC_G - #define _________________COLEMAK_L2________________ KC_BOL, KC_R, KC_S, KC_T, KC_D - #define _________________COLEMAK_L3________________ KC_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, KC_O - #define _________________COLEMAK_R3________________ KC_K, KC_M, KC_COMM, KC_DOT, KC_SLASH -#else - #define _________________COLEMAK_L1________________ KC_Q, KC_W, KC_F, KC_P, KC_G - #define _________________COLEMAK_L2________________ KC_A, KC_R, KC_S, KC_T, KC_D - #define _________________COLEMAK_L3________________ KC_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, KC_O - #define _________________COLEMAK_R3________________ KC_K, KC_M, KC_COMM, KC_DOT, KC_SLASH -#endif - - - - -#define _________________DVORAK_L1_________________ KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y -#define _________________DVORAK_L2_________________ KC_A, KC_O, KC_E, KC_U, KC_I -#define _________________DVORAK_L3_________________ KC_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, KC_S -#define _________________DVORAK_R3_________________ KC_B, KC_M, KC_W, KC_V, KC_Z - - -#define _________________WORKMAN_L1________________ KC_Q, KC_D, KC_R, KC_W, KC_B -#define _________________WORKMAN_L2________________ KC_A, KC_S, KC_H, KC_T, KC_G -#define _________________WORKMAN_L3________________ KC_Z, KC_X, KC_M, KC_C, KC_V - -#define _________________WORKMAN_R1________________ KC_J, KC_F, KC_U, KC_P, KC_SCLN -#define _________________WORKMAN_R2________________ KC_Y, KC_N, KC_E, KC_O, KC_I -#define _________________WORKMAN_R3________________ KC_K, KC_L, KC_COMM, KC_DOT, KC_SLASH - -// #define _________________WHITE_R1__________________ KC_V, KC_Y, KC_D, KC_COMM, KC_QUOT -// #define _________________WHITE_R2__________________ KC_A, KC_T, KC_H, KC_E, KC_B -// #define _________________WHITE_R3__________________ KC_P, KC_K, KC_G, KC_W, KC_Q - -// #define _________________WHITE_L1__________________ KC_INT1, KC_J, KC_M, KC_L, KC_U -// #define _________________WHITE_L2__________________ KC_MINS, KC_C, KC_S, KC_N, KC_O // KC_I -// #define _________________WHITE_L3__________________ KC_X, KC_R, KC_F, KC_DOT, KC_Z - - -#ifdef UNICODE_ENABLE -#define _______________UNICODE_L1__________________ UC_DISA,UC_DISA, UC_DISA, UC_DISA, UC_DISA -#define _______________UNICODE_L2__________________ UC_DISA,UC_DISA, UC_DISA, UC_DISA, UC_DISA -#define _______________UNICODE_L3__________________ UC_DISA,UC_DISA, UC_DISA, UC_DISA, UC_DISA - -#define _______________UNICODE_R1__________________ UC_SHRG, UC_SHRG, UC_SHRG, UC_SHRG, UC_SHRG -#define _______________UNICODE_R2__________________ UC_SHRG, UC_SHRG, UC_SHRG, UC_SHRG, UC_SHRG -#define _______________UNICODE_R3__________________ UC_SHRG, UC_SHRG, UC_SHRG, UC_SHRG, UC_SHRG -#endif - -#ifdef UNICODEMAP_ENABLE -#define _______________UNICODE_L1__________________ X(SMRK), X(THINK), X(CLOWN), X(HUNDR), X(BANG) -#define _______________UNICODE_L2__________________ X(GRIN), X(MONKEY), X(OKOK), X(EGGPL), X(LIT) -#define _______________UNICODE_L3__________________ X(WEARY), X(UNAMU), X(EFFU), X(MONOCL), X(IRONY) - -#define _______________UNICODE_R1__________________ X(DRUG0), X(THUP), X(INUP), X(DIZZY), X(COOL) -#define _______________UNICODE_R2__________________ X(FIST0), X(FIST2),X(FIST3),X(FIST1), X(OKOK) -#define _______________UNICODE_R3__________________ X(MNDBLWN), X(THDN), X(SPOCK),X(HOLE), X(DASH) -#endif - -#define ________________NUMBER_LEFT________________ KC_1, KC_2, KC_3, KC_4, KC_5 -#define ________________NUMBER_RIGHT_______________ KC_6, KC_7, KC_8, KC_9, KC_0 -#define _________________FUNC_LEFT_________________ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5 -#define _________________FUNC_RIGHT________________ KC_F6, KC_F7, KC_F8, KC_F9, KC_F10 - -#define ___________________BLANK___________________ _______, _______, _______, _______, _______ - - -#define _________________LOWER_L1__________________ KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC -#define _________________LOWER_L2__________________ _________________FUNC_LEFT_________________ -#define _________________LOWER_L3__________________ _________________FUNC_RIGHT________________ - -#define _________________LOWER_R1__________________ KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN -#define _________________LOWER_R2__________________ OS_UNI, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR -#define _________________LOWER_R3__________________ _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT - - - -#define _________________RAISE_L1__________________ ________________NUMBER_LEFT________________ -#define _________________RAISE_L2__________________ ___________________BLANK___________________ -#define _________________RAISE_L3__________________ ___________________BLANK___________________ - -#define _________________RAISE_R1__________________ ________________NUMBER_RIGHT_______________ -#define _________________RAISE_R2__________________ _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC -#define _________________RAISE_R3__________________ _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END - - - -#define _________________ADJUST_L1_________________ ___________________BLANK___________________ -#define _________________ADJUST_L2_________________ _________________FUNC_LEFT_________________ -#define _________________ADJUST_L3_________________ _______, QWERTY, COLEMAK, DVORAK, WORKMAN - -#define _________________ADJUST_R1_________________ KC_SEC1, KC_SEC2, KC_SEC3, KC_SEC4, KC_SEC5 -#define _________________ADJUST_R2_________________ _________________FUNC_RIGHT________________ -#define _________________ADJUST_R3_________________ KC_MUTE, KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT - -// clang-format on diff --git a/users/yet-another-developer/yet-another-developer.c b/users/yet-another-developer/yet-another-developer.c deleted file mode 100644 index b729c062..00000000 --- a/users/yet-another-developer/yet-another-developer.c +++ /dev/null @@ -1,160 +0,0 @@ -#include "quantum.h" -#include "yet-another-developer.h" - -userspace_config_t userspace_config; - -#if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE)) - #define YAD_UNICODE_MODE UC_WIN -#else -// set to 2 for UC_WIN, set to 4 for UC_WINC - #define YAD_UNICODE_MODE 2 -#endif - - -bool mod_key_press_timer(uint16_t code, uint16_t mod_code, bool pressed) { - static uint16_t this_timer; - if (pressed) { - this_timer = timer_read(); - } else { - if (timer_elapsed(this_timer) < TAPPING_TERM) { - tap_code(code); - } else { - register_code(mod_code); - tap_code(code); - unregister_code(mod_code); - } - } - return false; -} - -bool mod_key_press(uint16_t code, uint16_t mod_code, bool pressed, uint16_t this_timer) { - if (pressed) { - this_timer = timer_read(); - } else { - if (timer_elapsed(this_timer) < TAPPING_TERM) { - tap_code(code); - } else { - register_code(mod_code); - tap_code(code); - unregister_code(mod_code); - } - } - return false; -} - -// Add reconfigurable functions here, for keymap customization -// This allows for a global, userspace functions, and continued -// customization of the keymap. Use _keymap instead of _user -// functions in the keymaps -__attribute__ ((weak)) -void matrix_init_keymap(void) {} - -// Call user matrix init, set default RGB colors and then -// call the keymap's init function -void matrix_init_user(void) { - userspace_config.raw = eeconfig_read_user(); - - #if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE)) - set_unicode_input_mode(YAD_UNICODE_MODE); - get_unicode_input_mode(); - #endif //UNICODE_ENABLE - - matrix_init_keymap(); -} - -__attribute__((weak)) -void keyboard_post_init_keymap(void) {} - -void keyboard_post_init_user(void) { -#ifdef RGBLIGHT_ENABLE - keyboard_post_init_rgb(); -#endif - keyboard_post_init_keymap(); -} - -__attribute__((weak)) -void suspend_power_down_keymap(void) {} - -void suspend_power_down_user(void) { - suspend_power_down_keymap(); -} - -__attribute__((weak)) -void suspend_wakeup_init_keymap(void) {} - -void suspend_wakeup_init_user(void) { - suspend_wakeup_init_keymap(); -} - -__attribute__((weak)) -void matrix_scan_keymap(void) {} - -__attribute__ ((weak)) -void matrix_scan_user(void){ - -#ifdef TAP_DANCE_ENABLE // Run Diablo 3 macro checking code. -// run_diablo_macro_check(); -#endif // TAP_DANCE_ENABLE - -#ifdef RGBLIGHT_ENABLE - matrix_scan_rgb(); -#endif // RGBLIGHT_ENABLE - - matrix_scan_keymap(); -} - -__attribute__((weak)) -layer_state_t layer_state_set_keymap(layer_state_t state) { - return state; -} - -// on layer change, no matter where the change was initiated -// Then runs keymap's layer change check -layer_state_t layer_state_set_user(layer_state_t state) { - state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST); -#ifdef RGBLIGHT_ENABLE - state = layer_state_set_rgb(state); -#endif // RGBLIGHT_ENABLE - return layer_state_set_keymap(state); -} - -__attribute__((weak)) -layer_state_t default_layer_state_set_keymap(layer_state_t state) { - return state; -} - -// Runs state check and changes underglow color and animation -layer_state_t default_layer_state_set_user(layer_state_t state) { - state = default_layer_state_set_keymap(state); -#if 0 -#ifdef RGBLIGHT_ENABLE - state = default_layer_state_set_rgb(state); -#endif // RGBLIGHT_ENABLE -#endif - return state; -} - -__attribute__ ((weak)) -void led_set_keymap(uint8_t usb_led) {} - -// Any custom LED code goes here. -// So far, I only have keyboard specific code, -// So nothing goes here. -void led_set_user(uint8_t usb_led) { - led_set_keymap(usb_led); -} - -__attribute__ ((weak)) -void eeconfig_init_keymap(void) {} - -void eeconfig_init_user(void) { - userspace_config.raw = 0; - userspace_config.rgb_layer_change = true; - eeconfig_update_user(userspace_config.raw); - #if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE)) - set_unicode_input_mode(YAD_UNICODE_MODE); - get_unicode_input_mode(); - #else - eeprom_update_byte(EECONFIG_UNICODEMODE, YAD_UNICODE_MODE); - #endif -} diff --git a/users/yet-another-developer/yet-another-developer.h b/users/yet-another-developer/yet-another-developer.h deleted file mode 100644 index e0d02f70..00000000 --- a/users/yet-another-developer/yet-another-developer.h +++ /dev/null @@ -1,87 +0,0 @@ -#pragma once -#include "quantum.h" -#include "version.h" -#include "eeprom.h" -#include "wrappers.h" -#include "process_records.h" - -#ifdef TAP_DANCE_ENABLE - #include "tap_dances.h" - #define KC_TMX TD(TD_TMX) // tap1: 't' tap2: +b - #define KC_EOL TD(TD_EOL) // tap1: 'e' tap2: +e - #define KC_BOL TD(TD_BOL) // tap1: 'a' tap2: +a - #define KC_NW TD(TD_NW) // tap1: 'f' tap2: +f - #define KC_PW TD(TD_PW) // tap1: 'b' tap2: +b - #define KC_DW TD(TD_DW) // tap1: 'w' tap2: +w -#endif //!TAP_DANCE_ENABLE -#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) - #include "rgb_stuff.h" -#endif -#if defined(UNICODEMAP_ENABLE) || defined(UNICODE_ENABLE) - #include "unicode.h" -#endif //!UNICODE_ENABLE - -#define MC_BOL LCTL(KC_A) // jump to beginning of line -#define MC_EOL LCTL(KC_E) // jump to end of line -#define MC_NW LALT(KC_F) // next word -#define MC_PW LALT(KC_B) // previous word -#define MC_DW LCTL(KC_W) // delete word - -/* Define layer names */ -enum userspace_layers { - _QWERTY = 0, - _NUMLOCK = 0, - _COLEMAK, - _DVORAK, - _WORKMAN, - _UNICODE, - _MODS, /* layer 8 */ - _MACROS, - _MEDIA, - _LOWER, - _RAISE, - _ADJUST, -}; - -bool mod_key_press_timer(uint16_t code, uint16_t mod_code, bool pressed); -bool mod_key_press(uint16_t code, uint16_t mod_code, bool pressed, uint16_t this_timer); -void matrix_init_keymap(void); -void suspend_power_down_keymap(void); -void suspend_wakeup_init_keymap(void); -void matrix_scan_keymap(void); -layer_state_t layer_state_set_keymap(layer_state_t state); -layer_state_t default_layer_state_set_keymap(layer_state_t state); -void led_set_keymap(uint8_t usb_led); -void eeconfig_init_keymap(void); - -typedef union { - uint32_t raw; - struct { - bool rgb_layer_change :1; - bool is_overwatch :1; - bool nuke_switch :1; - uint8_t unicode_mod :4; - bool swapped_numbers :1; - }; -} userspace_config_t; - -extern userspace_config_t userspace_config; - -/* -Custom Keycodes for Diablo 3 layer -But since TD() doesn't work when tap dance is disabled -We use custom codes here, so we can substitute the right stuff -*/ -#ifdef TAP_DANCE_ENABLE -#define KC_D3_1 TD(TD_D3_1) -#define KC_D3_2 TD(TD_D3_2) -#define KC_D3_3 TD(TD_D3_3) -#define KC_D3_4 TD(TD_D3_4) -#else // TAP_DANCE_ENABLE -#define KC_D3_1 KC_1 -#define KC_D3_2 KC_2 -#define KC_D3_3 KC_3 -#define KC_D3_4 KC_4 -#endif // TAP_DANCE_ENABLE - - diff --git a/users/zer09/config.h b/users/zer09/config.h deleted file mode 100644 index c5ab32f8..00000000 --- a/users/zer09/config.h +++ /dev/null @@ -1,32 +0,0 @@ -#ifndef USERSPACE_CONFIG_H -#define USERSPACE_CONFIG_H - -#ifndef QMK_KEYS_PER_SCAN -#define QMK_KEYS_PER_SCAN 4 -#endif // !QMK_KEYS_PER_SCAN - -// this makes it possible to do rolling combos (zx) with keys that -// convert to other keys on hold (z becomes ctrl when you hold it, -// and when this option isn't enabled, z rapidly followed by x -// actually sends Ctrl-x. That's bad.) -#define IGNORE_MOD_TAP_INTERRUPT -#undef PERMISSIVE_HOLD -#define STRICT_LAYER_RELEASE - -#define FORCE_NKRO - -#ifndef TAPPING_TOGGLE -#define TAPPING_TOGGLE 1 -#endif - -#ifdef TAPPING_TERM -#undef TAPPING_TERM -#endif -#define TAPPING_TERM 95 - -// Disable action_get_macro and fn_actions, since we don't use these -// and it saves on space in the firmware. -#define NO_ACTION_MACRO -#define NO_ACTION_FUNCTION - -#endif diff --git a/users/zer09/lights.c b/users/zer09/lights.c deleted file mode 100644 index 448ef494..00000000 --- a/users/zer09/lights.c +++ /dev/null @@ -1,189 +0,0 @@ -#include "lights.h" - -static bool active_key_pos[50] = {}; -static uint8_t led_dim = 0; - -volatile led_key rbw_led_keys[RBW] = { - [RBW_LCTL] = {DEFAULT, 21, true}, [RBW_LCAP] = {DEFAULT, 24, false}, - [RBW_LSPR] = {DEFAULT, 23, true}, [RBW_RCTL] = {DEFAULT, 48, true}, - [RBW_RCAP] = {DEFAULT, 45, false}, [RBW_RALT] = {DEFAULT, 46, true}, - [RBW_SCRL] = {DEFAULT, 42, true}}; - -/* Pressed led color. */ -const uint32_t _PC[3] = {0xFF, 0x00, 0x00}; - -/* Layer color. */ -const uint8_t _LC[5][3] = {[_BL] = {0x00, 0x00, 0x00}, - [_UL] = {0x00, 0x00, 0xFF}, - [_VL] = {0xFF, 0xFF, 0x00}, - [_DL] = {0x00, 0xFF, 0x00}, - [_AL] = {0xFF, 0x00, 0x00}}; - -/* Color table by sine wave */ -const uint8_t _LIGHTS[360] = { - 0, 0, 0, 0, 0, 1, 1, 2, 2, 3, 4, 5, 6, 7, 8, - 11, 12, 9, 13, 15, 17, 18, 20, 22, 24, 26, 28, 30, 32, 35, - 37, 39, 42, 44, 47, 49, 52, 55, 58, 60, 63, 66, 69, 72, 75, - 78, 81, 85, 88, 91, 94, 97, 101, 104, 107, 111, 114, 117, 121, 124, - 127, 131, 134, 137, 141, 144, 147, 150, 154, 157, 160, 163, 167, 170, 173, - 176, 179, 182, 185, 188, 191, 194, 197, 200, 202, 205, 208, 210, 213, 215, - 217, 220, 222, 224, 226, 229, 231, 232, 234, 236, 238, 239, 241, 242, 244, - 245, 246, 248, 249, 250, 251, 251, 252, 253, 253, 254, 254, 255, 255, 255, - 255, 255, 255, 255, 254, 254, 253, 253, 252, 251, 251, 250, 249, 248, 246, - 245, 244, 242, 241, 239, 238, 236, 234, 232, 231, 229, 226, 224, 222, 220, - 217, 215, 213, 210, 208, 205, 202, 200, 197, 194, 191, 188, 185, 182, 179, - 176, 173, 170, 167, 163, 160, 157, 154, 150, 147, 144, 141, 137, 134, 131, - 127, 124, 121, 117, 114, 111, 107, 104, 101, 97, 94, 91, 88, 85, 81, - 78, 75, 72, 69, 66, 63, 60, 58, 55, 52, 49, 47, 44, 42, 39, - 37, 35, 32, 30, 28, 26, 24, 22, 20, 18, 17, 15, 13, 12, 11, - 9, 8, 7, 6, 5, 4, 3, 2, 2, 1, 1, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - -void set_key_led(keyrecord_t *record, uint8_t lyr) { - static uint8_t base = 5; - - uint8_t r = record->event.key.row; - uint8_t c = record->event.key.col; - uint8_t pos; - - // This was the result of my soldering. - // Lesson of the day: always check. - if (r < 5) { - pos = r % 2 == 0 ? r * base + c : r * base + (base - (c + 1)); - } else { - pos = r % 2 == 0 ? r * base + (base - (c + 1)) : r * base + c; - } - - if (record->event.pressed) { - active_key_pos[pos] = true; - SET_LED_RGB(_PC[0], _PC[1], _PC[2], led_dim, pos); - } else { - active_key_pos[pos] = false; - SET_LED_RGB(_LC[lyr][0], _LC[lyr][1], _LC[lyr][2], led_dim, pos); - } -} - -/* Fix for unknown reason after testin flash the eeprom handedness, - the leds will ligth up after boot. - This should be call in the set layer led.*/ -bool is_first_run(void) { - static uint8_t run = 0; - - if (run == 0) { - run++; - return true; - } else { - return false; - } -} - -bool set_layer_led(uint8_t lyr) { - static uint8_t p_lyr = 0; // Previous layer. - static uint8_t p_dim = 0; // Previous dim. - - if (p_lyr == lyr && p_dim == led_dim && !is_first_run()) { - return false; - } - - p_lyr = lyr; - p_dim = led_dim; - const uint8_t r = _LC[lyr][0]; - const uint8_t g = _LC[lyr][1]; - const uint8_t b = _LC[lyr][2]; - const uint8_t d = (p_lyr == _VL && p_dim < 1) ? 1 : p_dim; - - for (uint8_t i = 0; i < RGBLED_NUM; i++) { - SET_LED_RGB(r, g, b, d, i); - } - - return true; -} - -bool rainbow_loop(uint8_t lyr) { - static uint16_t last_timer = 0; - static uint16_t i = 0; - static uint8_t r, g, b, pos; - - if (timer_elapsed(last_timer) < 8) { - return false; - } - - if (i >= 360) { - i = 0; - } - - last_timer = timer_read(); - r = _LIGHTS[(i + 120) % 360]; - g = _LIGHTS[i]; - b = _LIGHTS[(i + 240) % 360]; - - i++; - - bool set_rbw = false; - - for (uint8_t j = 0; j < RBW; j++) { - pos = rbw_led_keys[j].pos; - - switch (rbw_led_keys[j].status) { - case ENABLED: - if (!active_key_pos[pos] || rbw_led_keys[j].forced) { - SET_LED_RGB(r, g, b, led_dim, pos); - set_rbw = true; - } - - break; - case DISABLED: - if (!active_key_pos[pos] || rbw_led_keys[j].forced) { - SET_LED_RGB(_LC[lyr][0], _LC[lyr][1], _LC[lyr][2], led_dim, pos); - set_rbw = true; - } - - rbw_led_keys[j].status = DEFAULT; - break; - default: - break; - } - } - - return set_rbw; -} - -bool led_brightness(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case RGUP: - if (record->event.pressed && led_dim > 0) { - led_dim--; - eeprom_write_byte(EECONFIG_LED_DIM_LVL, led_dim); - } - - return true; - break; - case RGDWN: - if (record->event.pressed && led_dim < 8) { - led_dim++; - eeprom_write_byte(EECONFIG_LED_DIM_LVL, led_dim); - } - - return true; - break; - default: - return false; - break; - } -} - -void eeprom_read_led_dim_lvl(void) { - led_dim = eeprom_read_byte(EECONFIG_LED_DIM_LVL); - - if (led_dim > 8 || led_dim < 0) { - led_dim = 0; - eeprom_write_byte(EECONFIG_LED_DIM_LVL, led_dim); - } -} diff --git a/users/zer09/lights.h b/users/zer09/lights.h deleted file mode 100644 index f1bd7245..00000000 --- a/users/zer09/lights.h +++ /dev/null @@ -1,45 +0,0 @@ -#ifndef LIGHTS_H -#define LIGHTS_H - -#include "eeprom.h" -#include "tap_dance.h" -#include "zer09.h" - -/* Will hold the RGB brightness level */ -#define EECONFIG_LED_DIM_LVL (uint8_t *)15 - -#define SET_LED_RGB(r, g, b, led_dim, pos) \ - setrgb(r >> led_dim, g >> led_dim, b >> led_dim, (LED_TYPE *)&led[pos]) - -typedef enum { - DEFAULT, - ENABLED, - DISABLED, -} led_status; - -typedef struct { - led_status status; - uint8_t pos; - bool forced; -} led_key; - -enum rbw_keys { - RBW_LCTL, - RBW_LCAP, - RBW_LSPR, - RBW_RCTL, - RBW_RCAP, - RBW_RALT, - RBW_SCRL, - RBW -}; - -extern volatile led_key rbw_led_keys[RBW]; - -void set_key_led(keyrecord_t *record, uint8_t lyr); -bool set_layer_led(uint8_t lyr); -bool rainbow_loop(uint8_t lyr); -bool led_brightness(uint16_t keycode, keyrecord_t *record); -void eeprom_read_led_dim_lvl(void); - -#endif diff --git a/users/zer09/rules.mk b/users/zer09/rules.mk deleted file mode 100644 index 43b409ec..00000000 --- a/users/zer09/rules.mk +++ /dev/null @@ -1,2 +0,0 @@ -SRC += zer09.c tap_dance.c lights.c -EXTRAFLAGS += -flto diff --git a/users/zer09/tap_dance.c b/users/zer09/tap_dance.c deleted file mode 100644 index e99b26cc..00000000 --- a/users/zer09/tap_dance.c +++ /dev/null @@ -1,203 +0,0 @@ -#include "tap_dance.h" -#include "lights.h" - -qk_tap_dance_action_t tap_dance_actions[] = { - [DA_LCTL] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_lctl_finished, - dance_lctl_reset), - [DA_LSPR] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_lspr_finished, - dance_lspr_reset), - [DA_RCTL] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_rctl_finished, - dance_rctl_reset), - [DA_RALT] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_ralt_finished, - dance_ralt_reset), - [DA_UPLY] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_uply_finished, - dance_uply_reset), - [DA_DWLY] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_dwly_finished, - dance_dwly_reset), -}; - -volatile uint8_t active_layer = _BL; -volatile uint8_t gm_layer_act = false; -static tap upltap_state = {.state = 0}; -static tap dwltap_state = {.state = 0}; -static tap lsprtap_state = {.state = 0}; -static tap ralttap_state = {.state = 0}; - -void layer_switcher_tap(uint8_t new_layer) { - if (gm_layer_act == true) { - layer_off(active_layer); - if (new_layer == _BL) { - layer_on(_GM); - active_layer = _GM; - } else { - layer_on(new_layer); - active_layer = new_layer; - } - } else { - layer_off(active_layer); - layer_on(new_layer); - active_layer = new_layer; - } -} - -int cur_dance(qk_tap_dance_state_t *state) { - switch (state->count) { - case 1: - return state->pressed == 0 ? SINGLE_TAP : SINGLE_HOLD; - case 2: - return state->pressed == 0 ? DOUBLE_TAP : DOUBLE_HOLD; - case 3: - return state->pressed == 0 ? TRIPLE_TAP : TRIPLE_HOLD; - default: - return state->pressed == 0 ? DEFAULT_TAP : DEFAULT_HOLD; - } -} - -void dance_lctl_finished(qk_tap_dance_state_t *state, void *user_data) { - rbw_led_keys[RBW_LCTL].status = ENABLED; - register_code(KC_LCTRL); -}; - -void dance_lctl_reset(qk_tap_dance_state_t *state, void *user_data) { - unregister_code(KC_LCTRL); - rbw_led_keys[RBW_LCTL].status = DISABLED; -}; - -void dance_lspr_finished(qk_tap_dance_state_t *state, void *user_data) { - lsprtap_state.state = cur_dance(state); - - switch (lsprtap_state.state) { - case DOUBLE_HOLD: - rbw_led_keys[RBW_LSPR].status = ENABLED; - register_code(KC_LALT); - break; - default: - register_code(KC_LGUI); - break; - } -}; - -void dance_lspr_reset(qk_tap_dance_state_t *state, void *user_data) { - switch (lsprtap_state.state) { - case DOUBLE_HOLD: - unregister_code(KC_LALT); - rbw_led_keys[RBW_LSPR].status = DISABLED; - break; - default: - unregister_code(KC_LGUI); - break; - } -}; - -void dance_rctl_finished(qk_tap_dance_state_t *state, void *user_data) { - rbw_led_keys[RBW_RCTL].status = ENABLED; - register_code(KC_RCTRL); -}; - -void dance_rctl_reset(qk_tap_dance_state_t *state, void *user_data) { - unregister_code(KC_RCTRL); - rbw_led_keys[RBW_RCTL].status = DISABLED; -}; - -void dance_ralt_finished(qk_tap_dance_state_t *state, void *user_data) { - ralttap_state.state = cur_dance(state); - - switch (ralttap_state.state) { - case DOUBLE_HOLD: - rbw_led_keys[RBW_RALT].status = ENABLED; - unregister_code(KC_LGUI); - break; - default: - register_code(KC_RALT); - break; - } -}; - -void dance_ralt_reset(qk_tap_dance_state_t *state, void *user_data) { - switch (ralttap_state.state) { - case DOUBLE_HOLD: - unregister_code(KC_RGUI); - rbw_led_keys[RBW_RALT].status = DISABLED; - break; - default: - unregister_code(KC_RALT); - break; - } -}; - -void dance_uply_finished(qk_tap_dance_state_t *state, void *user_data) { - upltap_state.state = cur_dance(state); - - switch (upltap_state.state) { - case SINGLE_TAP: - if (active_layer == _UL) { - layer_switcher_tap(_BL); - } else { - layer_switcher_tap(_UL); - } - break; - case SINGLE_HOLD: - layer_switcher_tap(_UL); - break; - default: - layer_switcher_tap(_BL); - break; - } -} - -void dance_uply_reset(qk_tap_dance_state_t *state, void *user_data) { - switch (upltap_state.state) { - case SINGLE_TAP: - break; - case SINGLE_HOLD: - default: - layer_switcher_tap(_BL); - break; - } - upltap_state.state = 0; -} - -void dance_dwly_finished(qk_tap_dance_state_t *state, void *user_data) { - dwltap_state.state = cur_dance(state); - - switch (dwltap_state.state) { - case SINGLE_TAP: - if (active_layer == _DL) { - layer_switcher_tap(_BL); - } else { - layer_switcher_tap(_DL); - } - break; - case SINGLE_HOLD: - layer_switcher_tap(_DL); - break; - case DOUBLE_HOLD: - layer_switcher_tap(_AL); - break; - case TRIPLE_TAP: - if (gm_layer_act == true) { - gm_layer_act = false; - layer_switcher_tap(_BL); - } else { - gm_layer_act = true; - layer_switcher_tap(_GM); - } - default: - layer_switcher_tap(_BL); - break; - } -} - -void dance_dwly_reset(qk_tap_dance_state_t *state, void *user_data) { - switch (dwltap_state.state) { - case SINGLE_TAP: - break; - case SINGLE_HOLD: - case DOUBLE_HOLD: - case TRIPLE_TAP: - default: - layer_switcher_tap(_BL); - break; - } - dwltap_state.state = 0; -} diff --git a/users/zer09/tap_dance.h b/users/zer09/tap_dance.h deleted file mode 100644 index 555c1592..00000000 --- a/users/zer09/tap_dance.h +++ /dev/null @@ -1,55 +0,0 @@ -#ifndef TAP_DANCE_H -#define TAP_DANCE_H - -#include "zer09.h" - -typedef struct { - int state; -} tap; - -enum { - DEFAULT_TAP, - DEFAULT_HOLD, - SINGLE_TAP, - SINGLE_HOLD, - DOUBLE_TAP, - DOUBLE_HOLD, - TRIPLE_TAP, - TRIPLE_HOLD -}; - -enum { - DA_SAFE_START, - DA_LCTL, - DA_LSPR, - DA_RCTL, - DA_RALT, - DA_UPLY, - DA_DWLY, - DA_SAFE_END -}; - -extern volatile uint8_t active_layer; - -void layer_switcher_tap(uint8_t); -int cur_dance(qk_tap_dance_state_t *); - -void dance_lctl_finished(qk_tap_dance_state_t *, void *); -void dance_lctl_reset(qk_tap_dance_state_t *, void *); - -void dance_lspr_finished(qk_tap_dance_state_t *, void *); -void dance_lspr_reset(qk_tap_dance_state_t *, void *); - -void dance_rctl_finished(qk_tap_dance_state_t *, void *); -void dance_rctl_reset(qk_tap_dance_state_t *, void *); - -void dance_ralt_finished(qk_tap_dance_state_t *, void *); -void dance_ralt_reset(qk_tap_dance_state_t *, void *); - -void dance_uply_finished(qk_tap_dance_state_t *, void *); -void dance_uply_reset(qk_tap_dance_state_t *, void *); - -void dance_dwly_finished(qk_tap_dance_state_t *, void *); -void dance_dwly_reset(qk_tap_dance_state_t *, void *); - -#endif diff --git a/users/zer09/zer09.c b/users/zer09/zer09.c deleted file mode 100644 index a6768f0a..00000000 --- a/users/zer09/zer09.c +++ /dev/null @@ -1,88 +0,0 @@ -#include "zer09.h" -#include "lights.h" -#include "tap_dance.h" - -__attribute__((weak)) void matrix_init_keymap(void) {} - -__attribute__((weak)) void matrix_scan_keymap(void) {} - -__attribute__((weak)) bool process_record_keymap(uint16_t keycode, - keyrecord_t *record) { - return true; -} - -__attribute__((weak)) void led_set_keymap(uint8_t usb_led) {} - -static uint8_t c_lyr = 0; // current layer. - -bool shifted_layer(void) { - static bool is_shifted = false; - - if (c_lyr == _VL) { - if (!is_shifted) { - register_code(KC_LSFT); - is_shifted = true; - return true; - } - } else { - if (is_shifted) { - unregister_code(KC_LSFT); - is_shifted = false; - return true; - } - } - - return false; -} - -void matrix_init_user(void) { - eeprom_read_led_dim_lvl(); - - matrix_init_keymap(); -} - -void matrix_scan_user(void) { - static uint8_t is_leds_changes = 1; - c_lyr = biton32(layer_state); - - is_leds_changes = is_leds_changes << set_layer_led(c_lyr); - is_leds_changes = is_leds_changes << shifted_layer(); - is_leds_changes = is_leds_changes << rainbow_loop(c_lyr); - - if (is_leds_changes > 1) { - rgblight_set(); - is_leds_changes = 1; - } - - matrix_scan_keymap(); -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - set_key_led(record, c_lyr); - - if (led_brightness(keycode, record)) { - rgblight_set(); - return false; - } - - rgblight_set(); - return process_record_keymap(keycode, record); -} - -void led_set_user(uint8_t usb_led) { - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - rbw_led_keys[RBW_LCAP].status = ENABLED; - rbw_led_keys[RBW_RCAP].status = ENABLED; - } else { - rbw_led_keys[RBW_LCAP].status = DISABLED; - rbw_led_keys[RBW_RCAP].status = DISABLED; - } - - if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { - rbw_led_keys[RBW_SCRL].status = ENABLED; - } else { - rbw_led_keys[RBW_SCRL].status = DISABLED; - } - - led_set_keymap(usb_led); -} diff --git a/users/zer09/zer09.h b/users/zer09/zer09.h deleted file mode 100644 index cc91cd6f..00000000 --- a/users/zer09/zer09.h +++ /dev/null @@ -1,25 +0,0 @@ -#ifndef USERSPACE -#define USERSPACE - -#include "quantum.h" - -enum custom_keycodes { - CK_SAFE = SAFE_RANGE, - RGUP, - RGDWN, - YREG, - NEW_SAFE_RANGE -}; - -#define KC_RGUP RGUP -#define KC_RGDWN RGDWN -#define KC_YREG YREG - -#define _BL 0 // The base layer -#define _UL 1 // The up layer -#define _DL 2 // The down layer -#define _VL 3 // The shifted up layer -#define _AL 4 // The assorted layer -#define _GM 5 - -#endif