summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile27
-rw-r--r--Vagrantfile2
-rw-r--r--build_json.mk12
-rw-r--r--build_keyboard.mk19
-rw-r--r--build_layout.mk5
-rw-r--r--build_test.mk1
-rw-r--r--common_features.mk62
-rw-r--r--data/schemas/api_keyboard.jsonschema44
-rw-r--r--data/schemas/definitions.jsonschema107
-rw-r--r--data/schemas/keyboard.jsonschema253
-rw-r--r--docs/_summary.md2
-rw-r--r--docs/breaking_changes.md4
-rw-r--r--docs/chibios_upgrade_instructions.md56
-rw-r--r--docs/cli_commands.md2
-rw-r--r--docs/compatible_microcontrollers.md2
-rw-r--r--docs/config_options.md33
-rw-r--r--docs/custom_quantum_functions.md8
-rw-r--r--docs/eeprom_driver.md3
-rw-r--r--docs/feature_debounce_type.md4
-rw-r--r--docs/feature_dip_switch.md16
-rw-r--r--docs/feature_haptic_feedback.md26
-rw-r--r--docs/feature_key_overrides.md229
-rw-r--r--docs/feature_oled_driver.md4
-rw-r--r--docs/feature_rgb_matrix.md141
-rw-r--r--docs/feature_rgblight.md47
-rw-r--r--docs/feature_split_keyboard.md122
-rw-r--r--docs/feature_st7565.md274
-rw-r--r--docs/ja/compatible_microcontrollers.md2
-rw-r--r--docs/ja/feature_dip_switch.md16
-rw-r--r--docs/serial_driver.md15
-rw-r--r--docs/syllabus.md1
-rw-r--r--docs/understanding_qmk.md1
-rw-r--r--drivers/avr/i2c_master.c19
-rw-r--r--drivers/avr/i2c_slave.c29
-rw-r--r--drivers/avr/i2c_slave.h13
-rw-r--r--drivers/avr/serial.c82
-rw-r--r--drivers/avr/serial.h62
-rw-r--r--drivers/awinic/aw20216.c182
-rw-r--r--drivers/awinic/aw20216.h251
-rw-r--r--drivers/chibios/serial.c52
-rw-r--r--drivers/chibios/serial.h62
-rw-r--r--drivers/chibios/serial_usart.c352
-rw-r--r--drivers/chibios/serial_usart.h40
-rw-r--r--drivers/chibios/serial_usart_duplex.c261
-rw-r--r--drivers/chibios/spi_master.c70
-rw-r--r--drivers/chibios/spi_master.h19
-rw-r--r--drivers/eeprom/eeprom_i2c.c23
-rw-r--r--drivers/haptic/haptic.c71
-rw-r--r--drivers/issi/is31fl3737.c54
-rw-r--r--drivers/lcd/st7565.c496
-rw-r--r--drivers/lcd/st7565.h219
-rw-r--r--drivers/oled/oled_driver.c26
-rw-r--r--drivers/oled/oled_driver.h4
-rw-r--r--drivers/sensors/adns5050.c (renamed from keyboards/ploopyco/adns5050.c)10
-rw-r--r--drivers/sensors/adns5050.h (renamed from keyboards/ploopyco/adns5050.h)0
-rw-r--r--drivers/sensors/adns9800.c (renamed from keyboards/oddball/adns/adns.c)2
-rw-r--r--drivers/sensors/adns9800.h (renamed from keyboards/oddball/adns/adns.h)0
-rw-r--r--drivers/sensors/adns9800_srom_A6.h (renamed from keyboards/oddball/adns/adns9800_srom_A6.h)0
-rw-r--r--drivers/sensors/pimoroni_trackball.c (renamed from keyboards/draculad/keymaps/pimoroni/pimoroni_trackball.c)55
-rw-r--r--drivers/sensors/pimoroni_trackball.h (renamed from users/drashna/pimoroni_trackball.h)0
-rw-r--r--drivers/sensors/pmw3360.c (renamed from keyboards/handwired/dactyl_manuform/5x6_right_trackball/pmw3360.c)42
-rw-r--r--drivers/sensors/pmw3360.h (renamed from keyboards/ploopyco/pmw3360.h)1
-rw-r--r--drivers/sensors/pmw3360_firmware.h (renamed from keyboards/handwired/dactyl_manuform/5x6_right_trackball/pmw3360_firmware.h)0
-rw-r--r--drivers/serial.h46
-rw-r--r--keyboards/40percentclub/25/rules.mk2
-rw-r--r--keyboards/40percentclub/4x4/rules.mk2
-rw-r--r--keyboards/40percentclub/5x5/rules.mk2
-rw-r--r--keyboards/40percentclub/nori/rules.mk2
-rw-r--r--keyboards/40percentclub/ut47/keymaps/nordic/keymap.c10
-rw-r--r--keyboards/7skb/keymaps/salicylic/keymap.c2
-rw-r--r--keyboards/7splus/keymaps/salicylic/keymap.c2
-rw-r--r--keyboards/9key/rules.mk1
-rw-r--r--keyboards/abacus/keymaps/unicodemap/keymap.c3
-rw-r--r--keyboards/acr60/keymaps/mitch/keymap.c38
-rwxr-xr-xkeyboards/aeboards/constellation/rev2/config.h2
-rw-r--r--keyboards/ai03/voyager60_alps/config.h2
-rw-r--r--keyboards/ajisai74/keymaps/salicylic/keymap.c2
-rw-r--r--keyboards/alu84/keymaps/turbomech/keymap.c36
-rw-r--r--keyboards/amjpad/keymaps/max/keymap.c37
-rw-r--r--keyboards/anavi/macropad8/keymaps/default/config.h (renamed from keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/default/keymap.c)6
-rw-r--r--keyboards/atreus/keymaps/erlandsona/keymap.c15
-rw-r--r--keyboards/atreus/keymaps/khitsule/keymap.c24
-rw-r--r--keyboards/atreus62/keymaps/194h/keymap.c2
-rw-r--r--keyboards/bakeneko65/keymaps/default/readme.md1
-rw-r--r--keyboards/bakeneko65/rev2/config.h (renamed from keyboards/bakeneko65/config.h)2
-rw-r--r--keyboards/bakeneko65/rev2/info.json (renamed from keyboards/bakeneko65/info.json)4
-rw-r--r--keyboards/bakeneko65/rev2/keymaps/default/keymap.c (renamed from keyboards/bakeneko65/keymaps/default/keymap.c)0
-rw-r--r--keyboards/bakeneko65/rev2/keymaps/default/readme.md1
-rw-r--r--keyboards/bakeneko65/rev2/keymaps/via/keymap.c (renamed from keyboards/bakeneko65/keymaps/via/keymap.c)0
-rw-r--r--keyboards/bakeneko65/rev2/keymaps/via/rules.mk (renamed from keyboards/bakeneko65/keymaps/via/rules.mk)0
-rw-r--r--keyboards/bakeneko65/rev2/readme.md (renamed from keyboards/bakeneko65/readme.md)8
-rw-r--r--keyboards/bakeneko65/rev2/rev2.c (renamed from keyboards/bakeneko65/bakeneko65.c)2
-rw-r--r--keyboards/bakeneko65/rev2/rev2.h (renamed from keyboards/bakeneko65/bakeneko65.h)0
-rw-r--r--keyboards/bakeneko65/rev2/rules.mk (renamed from keyboards/bakeneko65/rules.mk)0
-rw-r--r--keyboards/bakeneko65/rev3/config.h109
-rw-r--r--keyboards/bakeneko65/rev3/info.json12
-rw-r--r--keyboards/bakeneko65/rev3/keymaps/default/keymap.c38
-rw-r--r--keyboards/bakeneko65/rev3/keymaps/default/readme.md1
-rw-r--r--keyboards/bakeneko65/rev3/keymaps/via/keymap.c54
-rw-r--r--keyboards/bakeneko65/rev3/keymaps/via/rules.mk (renamed from keyboards/tokyo60/keymaps/via/rules.mk)0
-rw-r--r--keyboards/bakeneko65/rev3/readme.md17
-rw-r--r--keyboards/bakeneko65/rev3/rev3.c17
-rw-r--r--keyboards/bakeneko65/rev3/rev3.h33
-rw-r--r--keyboards/bakeneko65/rev3/rules.mk22
-rw-r--r--keyboards/barracuda/rules.mk2
-rw-r--r--keyboards/basekeys/trifecta/config.h4
-rwxr-xr-xkeyboards/bm40hsrgb/config.h4
-rw-r--r--keyboards/bm68rgb/keymaps/peepeetee/config.h2
-rw-r--r--keyboards/boardsource/3x4/config.h2
-rw-r--r--keyboards/boardsource/the_mark/config.h6
-rw-r--r--keyboards/bpiphany/frosty_flake/frosty_flake.h30
-rw-r--r--keyboards/bpiphany/kitten_paw/keymaps/ickerwx/keymap.c154
-rw-r--r--keyboards/bpiphany/pegasushoof/2013/2013.h18
-rw-r--r--keyboards/bpiphany/pegasushoof/2015/2015.h36
-rw-r--r--keyboards/bpiphany/pegasushoof/keymaps/blowrak/keymap.c8
-rw-r--r--keyboards/checkerboards/nop60/info.json4
-rw-r--r--keyboards/christmas_tree/rules.mk1
-rw-r--r--keyboards/clueboard/66/keymaps/magicmonty/keymap.c30
-rw-r--r--keyboards/clueboard/66/keymaps/tetris/keymap.c126
-rw-r--r--keyboards/comet46/keymaps/satt/keymap.c6
-rw-r--r--keyboards/contra/keymaps/deastiny/keymap.c6
-rw-r--r--keyboards/contra/keymaps/maxr1998/keymap.c8
-rw-r--r--keyboards/converter/hp_46010a/rules.mk1
-rw-r--r--keyboards/converter/ibm_5291/config.h2
-rw-r--r--keyboards/converter/ibm_5291/rules.mk1
-rw-r--r--keyboards/converter/ibm_terminal/keymaps/default/rules.mk1
-rw-r--r--keyboards/converter/ibm_terminal/keymaps/priyadi/rules.mk1
-rw-r--r--keyboards/converter/ibm_terminal/rules.mk1
-rw-r--r--keyboards/converter/siemens_tastatur/config.h4
-rw-r--r--keyboards/converter/usb_usb/usb_usb.h129
-rw-r--r--keyboards/coseyfannitutti/mulletpad/config.h2
-rw-r--r--keyboards/crkbd/keymaps/devdev/config.h14
-rw-r--r--keyboards/crkbd/keymaps/gotham/config.h2
-rw-r--r--keyboards/crkbd/keymaps/kidbrazil/config.h2
-rw-r--r--keyboards/crkbd/keymaps/rpbaptist/config.h2
-rw-r--r--keyboards/crkbd/keymaps/soundmonster/config.h4
-rw-r--r--keyboards/crkbd/readme.md2
-rw-r--r--keyboards/dc01/left/config.h2
-rw-r--r--keyboards/draculad/config.h2
-rw-r--r--keyboards/draculad/keymaps/pimoroni/keymap.c2
-rw-r--r--keyboards/draculad/keymaps/pimoroni/rules.mk2
-rw-r--r--keyboards/dz60/keymaps/default_abnt2/keymap.c2
-rw-r--r--keyboards/dztech/dz60rgb/v1/config.h2
-rw-r--r--keyboards/dztech/dz60rgb/v2/config.h2
-rw-r--r--keyboards/dztech/dz60rgb_ansi/v1/config.h2
-rw-r--r--keyboards/dztech/dz60rgb_ansi/v2/config.h2
-rw-r--r--keyboards/dztech/dz60rgb_wkl/v1/config.h2
-rw-r--r--keyboards/dztech/dz60rgb_wkl/v2/config.h2
-rw-r--r--keyboards/dztech/dz65rgb/v1/config.h4
-rw-r--r--keyboards/dztech/dz65rgb/v2/config.h2
-rw-r--r--keyboards/eco/rules.mk1
-rw-r--r--keyboards/ergo42/keymaps/hdbx/keymap.c2
-rw-r--r--keyboards/ergo42/keymaps/shinze/keymap.c8
-rw-r--r--keyboards/ergo42/rules.mk2
-rw-r--r--keyboards/ergoarrows/keymaps/salicylic/keymap.c2
-rw-r--r--keyboards/ergodash/rev1/keymaps/m47ch4n/keymap.c2
-rw-r--r--keyboards/ergodox_ez/config.h2
-rwxr-xr-xkeyboards/ergodox_ez/keymaps/bepo_tm_style/keymap.c10
-rwxr-xr-xkeyboards/ergodox_ez/keymaps/bepo_tm_style/rules.mk1
-rw-r--r--keyboards/ergodox_ez/keymaps/bpruitt-goddard/rules.mk1
-rw-r--r--keyboards/ergodox_ez/keymaps/colemak_es_osx/keymap.c4
-rw-r--r--keyboards/ergodox_ez/keymaps/ericgebhart/keymap.c2
-rw-r--r--keyboards/ergodox_ez/keymaps/hacker_dvorak/config.h2
-rw-r--r--keyboards/ergodox_ez/keymaps/hacker_dvorak/rules.mk1
-rw-r--r--keyboards/ergodox_ez/keymaps/nathanvercaemert/keymap.c4
-rw-r--r--keyboards/ergodox_ez/keymaps/skug/keymap.c13
-rw-r--r--keyboards/ergodox_ez/keymaps/stamm/keymap.c4
-rw-r--r--keyboards/ergodox_ez/rules.mk1
-rw-r--r--keyboards/ergodox_infinity/config.h35
-rw-r--r--keyboards/ergodox_infinity/ergodox_infinity.c378
-rw-r--r--keyboards/ergodox_infinity/ergodox_infinity.h4
-rw-r--r--keyboards/ergodox_infinity/keymaps/default/keymap.c4
-rw-r--r--keyboards/ergodox_infinity/matrix.c18
-rw-r--r--keyboards/ergodox_infinity/rules.mk18
-rw-r--r--keyboards/evil80/rules.mk1
-rw-r--r--keyboards/evyd13/plain60/keymaps/kwerdenker/keymap.c6
-rw-r--r--keyboards/geekboards/macropad_v2/config.h4
-rw-r--r--keyboards/geekboards/tester/config.h4
-rw-r--r--keyboards/ggkeyboards/genesis/hotswap/config.h4
-rw-r--r--keyboards/ggkeyboards/genesis/solder/config.h4
-rw-r--r--keyboards/gh60/revc/keymaps/dbroqua/keymap.c71
-rw-r--r--keyboards/gh60/revc/keymaps/dbroqua_7U/keymap.c33
-rw-r--r--keyboards/gh60/revc/keymaps/default_abnt2/keymap.c2
-rw-r--r--keyboards/gh60/revc/keymaps/robotmaxtron/keymap.c100
-rw-r--r--keyboards/gh60/revc/keymaps/sethbc/keymap.c39
-rw-r--r--keyboards/gh60/satan/keymaps/addcninblue/rules.mk1
-rw-r--r--keyboards/gh60/satan/keymaps/admiralStrokers/rules.mk2
-rw-r--r--keyboards/gh60/satan/keymaps/chaser/keymap.c41
-rw-r--r--keyboards/gh60/satan/keymaps/dbroqua/keymap.c71
-rw-r--r--keyboards/gh60/satan/keymaps/dende_iso/keymap.c6
-rw-r--r--keyboards/gh60/satan/keymaps/denolfe/keymap.c104
-rw-r--r--keyboards/gh60/satan/keymaps/isoHHKB/keymap.c39
-rw-r--r--keyboards/gh60/satan/keymaps/sethbc/keymap.c40
-rw-r--r--keyboards/gh60/satan/keymaps/stanleylai/keymap.c40
-rw-r--r--keyboards/gh60/satan/keymaps/unxmaal/keymap.c39
-rw-r--r--keyboards/gmmk/pro/config.h16
-rw-r--r--keyboards/gmmk/pro/halconf.h7
-rw-r--r--keyboards/gmmk/pro/keymaps/alexmarmon/keymap.c66
-rw-r--r--keyboards/gmmk/pro/keymaps/alexmarmon/readme.md7
-rw-r--r--keyboards/gmmk/pro/mcuconf.h6
-rw-r--r--keyboards/gmmk/pro/pro.c222
-rw-r--r--keyboards/gmmk/pro/rules.mk2
-rw-r--r--keyboards/gon/nerdtkl/keymaps/gam3cat/rules.mk1
-rw-r--r--keyboards/hadron/ver2/rules.mk1
-rw-r--r--keyboards/handwired/412_64/rules.mk2
-rw-r--r--keyboards/handwired/6key/keymaps/default/keymap.c33
-rw-r--r--keyboards/handwired/colorlice/config.h2
-rw-r--r--keyboards/handwired/dactyl/rules.mk1
-rw-r--r--keyboards/handwired/dactyl_manuform/5x6/keymaps/swedish/keymap.c11
-rw-r--r--keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/default/rules.mk4
-rw-r--r--keyboards/handwired/dactyl_manuform/5x6_right_trackball/pmw3360.h103
-rw-r--r--keyboards/handwired/dactyl_manuform/5x6_right_trackball/pointer_transport.c616
-rw-r--r--keyboards/handwired/dactyl_manuform/dactyl_manuform.h2
-rw-r--r--keyboards/handwired/frankie_macropad/keymaps/default/config.h19
-rw-r--r--keyboards/handwired/frenchdev/keymaps/default/keymap.c12
-rw-r--r--keyboards/handwired/frenchdev/rules.mk1
-rw-r--r--keyboards/handwired/freoduo/rules.mk4
-rw-r--r--keyboards/handwired/hnah40rgb/config.h2
-rw-r--r--keyboards/handwired/jot50/rules.mk1
-rw-r--r--keyboards/handwired/jotanck/rules.mk1
-rw-r--r--keyboards/handwired/jotpad16/rules.mk1
-rw-r--r--keyboards/handwired/p1800fl/rules.mk30
-rw-r--r--keyboards/handwired/p65rgb/config.h2
-rw-r--r--keyboards/handwired/promethium/config.h2
-rw-r--r--keyboards/handwired/promethium/rules.mk1
-rw-r--r--keyboards/handwired/reddot/keymaps/default/keymap.c8
-rw-r--r--keyboards/handwired/swiftrax/astro65/config.h2
-rw-r--r--keyboards/handwired/tractyl_manuform/4x6_right/4x6_right.c67
-rw-r--r--keyboards/handwired/tractyl_manuform/4x6_right/4x6_right.h47
-rw-r--r--keyboards/handwired/tractyl_manuform/4x6_right/config.h91
-rw-r--r--keyboards/handwired/tractyl_manuform/4x6_right/info.json (renamed from keyboards/handwired/dactyl_manuform/5x6_right_trackball/info.json)6
-rw-r--r--keyboards/handwired/tractyl_manuform/4x6_right/keymaps/default/keymap.c62
-rw-r--r--keyboards/handwired/tractyl_manuform/4x6_right/keymaps/drashna/config.h (renamed from keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/drashna/config.h)7
-rw-r--r--keyboards/handwired/tractyl_manuform/4x6_right/keymaps/drashna/keymap.c243
-rw-r--r--keyboards/handwired/tractyl_manuform/4x6_right/keymaps/drashna/rules.mk (renamed from keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/drashna/rules.mk)3
-rw-r--r--keyboards/handwired/tractyl_manuform/4x6_right/readme.md (renamed from keyboards/handwired/dactyl_manuform/5x6_right_trackball/readme.md)0
-rw-r--r--keyboards/handwired/tractyl_manuform/4x6_right/rules.mk33
-rw-r--r--keyboards/handwired/tractyl_manuform/5x6_right/5x6_right.c35
-rw-r--r--keyboards/handwired/tractyl_manuform/5x6_right/5x6_right.h (renamed from keyboards/handwired/dactyl_manuform/5x6_right_trackball/5x6_right_trackball.h)31
-rw-r--r--keyboards/handwired/tractyl_manuform/5x6_right/config.h (renamed from keyboards/handwired/dactyl_manuform/5x6_right_trackball/config.h)54
-rw-r--r--keyboards/handwired/tractyl_manuform/5x6_right/info.json75
-rw-r--r--keyboards/handwired/tractyl_manuform/5x6_right/keymaps/default/keymap.c63
-rw-r--r--keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/config.h (renamed from keyboards/handwired/dactyl_manuform/5x6_right_trackball/post_config.h)33
-rw-r--r--keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/keymap.c (renamed from keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/drashna/keymap.c)46
-rw-r--r--keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/rules.mk11
-rw-r--r--keyboards/handwired/tractyl_manuform/5x6_right/readme.md21
-rw-r--r--keyboards/handwired/tractyl_manuform/5x6_right/rules.mk (renamed from keyboards/handwired/dactyl_manuform/5x6_right_trackball/rules.mk)12
-rw-r--r--keyboards/handwired/tractyl_manuform/config.h43
-rw-r--r--keyboards/handwired/tractyl_manuform/post_config.h96
-rw-r--r--keyboards/handwired/tractyl_manuform/readme.md159
-rw-r--r--keyboards/handwired/tractyl_manuform/tm_sync.c132
-rw-r--r--keyboards/handwired/tractyl_manuform/tractyl_manuform.c (renamed from keyboards/handwired/dactyl_manuform/5x6_right_trackball/5x6_right_trackball.c)88
-rw-r--r--keyboards/handwired/tractyl_manuform/tractyl_manuform.h (renamed from keyboards/draculad/keymaps/pimoroni/pimoroni_trackball.h)42
-rw-r--r--keyboards/handwired/tritium_numpad/rules.mk2
-rw-r--r--keyboards/handwired/wulkan/keymaps/default/keymap.c28
-rw-r--r--keyboards/handwired/xealous/rules.mk2
-rw-r--r--keyboards/helix/rev2/keymaps/default/rules.mk2
-rw-r--r--keyboards/helix/rev2/keymaps/five_rows_jis/keymap.c4
-rw-r--r--keyboards/helix/rev2/keymaps/froggy_106/keymap.c6
-rw-r--r--keyboards/helix/rev3_4rows/config.h2
-rw-r--r--keyboards/helix/rev3_4rows/rev3_4rows.c3
-rw-r--r--keyboards/helix/rev3_5rows/config.h2
-rw-r--r--keyboards/helix/rev3_5rows/rev3_5rows.c3
-rw-r--r--keyboards/hhkb/ansi/keymaps/shela/keymap_jis2us.h6
-rw-r--r--keyboards/hineybush/h87a/keymaps/gam3cat/rules.mk1
-rw-r--r--keyboards/hs60/v1/config.h2
-rw-r--r--keyboards/infinity60/keymaps/jpetermans/keymap.c101
-rw-r--r--keyboards/ivy/rules.mk1
-rw-r--r--keyboards/jc65/v32u4/keymaps/gam3cat/rules.mk1
-rw-r--r--keyboards/jisplit89/keymaps/salicylic/keymap.c2
-rw-r--r--keyboards/jj40/keymaps/skewwhiffy/keymap.c46
-rw-r--r--keyboards/kbdfans/bella/rgb/config.h2
-rw-r--r--keyboards/kbdfans/bella/rgb_iso/config.h2
-rw-r--r--keyboards/kbdfans/kbd67/mkiirgb/v1/config.h4
-rw-r--r--keyboards/kbdfans/kbd67/mkiirgb/v2/config.h4
-rw-r--r--keyboards/kbdfans/kbd67/rev1/keymaps/default/config.h2
-rw-r--r--keyboards/kbdfans/kbd67/rev2/info.json2
-rw-r--r--keyboards/kbdfans/kbd6x/keymaps/othi/keymap.c22
-rw-r--r--keyboards/kbdfans/kbd75/keymaps/adit/keymap.c36
-rw-r--r--keyboards/kbdfans/kbdmini/config.h2
-rwxr-xr-xkeyboards/kbdfans/maja/config.h4
-rw-r--r--keyboards/kc60/keymaps/stanleylai/keymap.c38
-rw-r--r--keyboards/keebio/iris/keymaps/antonlindstrom/keymap.c10
-rw-r--r--keyboards/keebio/iris/keymaps/olligranlund_nordic/keymap.c10
-rw-r--r--keyboards/keebio/iris/rev2/rules.mk2
-rw-r--r--keyboards/keebio/iris/rev3/rules.mk1
-rw-r--r--keyboards/keebio/iris/rev4/rules.mk2
-rw-r--r--keyboards/keebio/nyquist/keymaps/skug/keymap.c18
-rw-r--r--keyboards/keebio/nyquist/nyquist.h14
-rw-r--r--keyboards/keebio/nyquist/rev1/rev1.h32
-rw-r--r--keyboards/keebio/nyquist/rev2/rev2.h32
-rw-r--r--keyboards/keebio/nyquist/rev3/rev3.h17
-rw-r--r--keyboards/keebio/quefrency/rules.mk1
-rw-r--r--keyboards/keebio/viterbi/rev2/rules.mk2
-rw-r--r--keyboards/keebio/viterbi/rules.mk8
-rw-r--r--keyboards/keyboardio/model01/keymaps/tw1t611/keymap.c12
-rw-r--r--keyboards/kindakeyboards/conone65/rules.mk2
-rw-r--r--keyboards/kinesis/alvicstep/config.h2
-rw-r--r--keyboards/kinesis/keymaps/tw1t611/keymap.c12
-rw-r--r--keyboards/kinesis/kinesis.h3
-rw-r--r--keyboards/kinesis/kint36/config.h2
-rw-r--r--keyboards/kinesis/kint41/chconf.h33
-rw-r--r--keyboards/kinesis/kint41/config.h105
-rw-r--r--keyboards/kinesis/kint41/kint41.c52
-rw-r--r--keyboards/kinesis/kint41/kint41.h92
-rw-r--r--keyboards/kinesis/kint41/mcuconf.h22
-rw-r--r--keyboards/kinesis/kint41/readme.md3
-rw-r--r--keyboards/kinesis/kint41/rules.mk12
-rw-r--r--keyboards/kinesis/nguyenvietyen/config.h2
-rw-r--r--keyboards/kmac/config.h2
-rw-r--r--keyboards/kyria/keymaps/drashna/keymap.c2
-rw-r--r--keyboards/kyria/keymaps/drashna/rules.mk12
-rw-r--r--keyboards/kyria/keymaps/shinze/keymap.c14
-rw-r--r--keyboards/latin17rgb/config.h32
-rw-r--r--keyboards/latin60rgb/config.h31
-rw-r--r--keyboards/latinpadble/rules.mk1
-rw-r--r--keyboards/launchpad/rules.mk1
-rw-r--r--keyboards/le_chiffre/config.h2
-rw-r--r--keyboards/lets_split/keymaps/DE_programming/keymap.c6
-rw-r--r--keyboards/lets_split/keymaps/DE_simple/keymap.c4
-rwxr-xr-xkeyboards/lets_split/keymaps/bbaserdem_right/rules.mk2
-rw-r--r--keyboards/lets_split_eh/rules.mk1
-rw-r--r--keyboards/lizard_trick/tenkey_plusplus/config.h2
-rw-r--r--keyboards/m10a/keymaps/gam3cat/rules.mk1
-rw-r--r--keyboards/m10a/rules.mk1
-rw-r--r--keyboards/manyboard/macro/config.h53
-rw-r--r--keyboards/manyboard/macro/info.json29
-rw-r--r--keyboards/manyboard/macro/keymaps/default/keymap.c73
-rw-r--r--keyboards/manyboard/macro/keymaps/via/keymap.c72
-rw-r--r--keyboards/manyboard/macro/keymaps/via/rules.mk1
-rw-r--r--keyboards/manyboard/macro/macro.c17
-rw-r--r--keyboards/manyboard/macro/macro.h31
-rw-r--r--keyboards/manyboard/macro/readme.md15
-rw-r--r--keyboards/manyboard/macro/rules.mk23
-rw-r--r--keyboards/marksard/rhymestone/rev1/config.h2
-rw-r--r--keyboards/massdrop/alt/keymaps/pregame/config.h4
-rw-r--r--keyboards/massdrop/alt/keymaps/urbanvanilla/config.h2
-rw-r--r--keyboards/massdrop/ctrl/keymaps/endgame/config.h2
-rw-r--r--keyboards/massdrop/ctrl/keymaps/matthewrobo/config.h2
-rw-r--r--keyboards/masterworks/classy_tkl/rev_a/rules.mk3
-rw-r--r--keyboards/maxr1998/phoebe/keymaps/default/keymap.c14
-rw-r--r--keyboards/maxr1998/phoebe/rules.mk1
-rw-r--r--keyboards/maxr1998/pulse4k/rules.mk1
-rw-r--r--keyboards/mechlovin/adelais/rgb_led/rev1/config.h4
-rw-r--r--keyboards/mechlovin/adelais/rgb_led/rev2/config.h6
-rw-r--r--keyboards/mechlovin/delphine/rgb_led/config.h4
-rw-r--r--keyboards/mechlovin/hannah60rgb/rev1/config.h4
-rw-r--r--keyboards/mechlovin/hannah60rgb/rev2/config.h4
-rw-r--r--keyboards/mechlovin/infinity87/rgb_rev1/config.h2
-rw-r--r--keyboards/mechlovin/tmkl/config.h4
-rw-r--r--keyboards/mechmini/v2/keymaps/2u_space_ortho/keymap.c81
-rwxr-xr-xkeyboards/mechmini/v2/keymaps/625_space/keymap.c37
-rwxr-xr-xkeyboards/mechmini/v2/keymaps/ortho/keymap.c81
-rw-r--r--keyboards/mechmini/v2/keymaps/spacebarracecar/keymap.c2
-rwxr-xr-xkeyboards/mechmini/v2/keymaps/split_space/keymap.c37
-rw-r--r--keyboards/meira/featherble/config.h2
-rw-r--r--keyboards/meira/meira.h4
-rw-r--r--keyboards/meira/promicro/config.h2
-rw-r--r--keyboards/melgeek/mj61/config.h2
-rw-r--r--keyboards/melgeek/mj63/config.h2
-rw-r--r--keyboards/melgeek/mj64/config.h2
-rw-r--r--keyboards/melgeek/mj65/config.h2
-rw-r--r--keyboards/melgeek/mojo75/config.h2
-rw-r--r--keyboards/melgeek/z70ultra/config.h2
-rw-r--r--keyboards/miller/gm862/config.h4
-rw-r--r--keyboards/minidox/keymaps/bepo/keymap.c14
-rw-r--r--keyboards/minidox/keymaps/tw1t611/keymap.c8
-rw-r--r--keyboards/mitosis/keymaps/mjt/rules.mk2
-rw-r--r--keyboards/monstargear/xo87/rgb/config.h2
-rw-r--r--keyboards/moonlander/config.h2
-rw-r--r--keyboards/mt84/keymaps/default/config.h19
-rw-r--r--keyboards/mt84/mt84.c40
-rw-r--r--keyboards/mxss/rules.mk26
-rw-r--r--keyboards/naked48/keymaps/salicylic/config.h3
-rw-r--r--keyboards/naked48/keymaps/salicylic/keymap.c2
-rw-r--r--keyboards/naked48/keymaps/salicylic_with_nafuda/keymap.c2
-rw-r--r--keyboards/naked48/keymaps/salicylic_with_setta21/keymap.c2
-rw-r--r--keyboards/naked60/keymaps/salicylic/keymap.c2
-rw-r--r--keyboards/naked60/keymaps/salicylic_with_nafuda/keymap.c2
-rw-r--r--keyboards/naked60/keymaps/salicylic_with_setta21/keymap.c2
-rw-r--r--keyboards/naked64/keymaps/salicylic/keymap.c2
-rw-r--r--keyboards/naked64/keymaps/salicylic_with_setta21/keymap.c2
-rw-r--r--keyboards/namecard2x4/keymaps/brainfuck/keymap.c2
-rw-r--r--keyboards/ncc1701kb/rules.mk1
-rw-r--r--keyboards/niu_mini/rules.mk1
-rw-r--r--keyboards/nknl7en/keymaps/salicylic/keymap.c2
-rw-r--r--keyboards/nknl7jp/keymaps/salicylic/keymap.c2
-rw-r--r--keyboards/nopunin10did/jabberwocky/config.h1
-rw-r--r--keyboards/numatreus/keymaps/hdbx/keymap.c2
-rw-r--r--keyboards/oddball/optical_sensor/optical_sensor.h2
-rw-r--r--keyboards/oddball/rules.mk2
-rw-r--r--keyboards/ok60/rules.mk2
-rw-r--r--keyboards/opendeck/32/rev1/config.h2
-rw-r--r--keyboards/orthodox/rev3/config.h4
-rw-r--r--keyboards/orthodox/rev3_teensy/config.h2
-rw-r--r--keyboards/pandora/keymaps/default/keymap.c3
-rw-r--r--keyboards/pandora/keymaps/via/keymap.c3
-rw-r--r--keyboards/percent/canoe_gen2/config.h2
-rw-r--r--keyboards/phase_studio/titan65/hotswap/config.h2
-rw-r--r--keyboards/planck/ez/config.h2
-rw-r--r--keyboards/planck/ez/ez.c2
-rw-r--r--keyboards/planck/ez/ez.h20
-rw-r--r--keyboards/planck/ez/rules.mk1
-rw-r--r--keyboards/planck/keymaps/abishalom/keymap.c3
-rw-r--r--keyboards/planck/keymaps/atreus/keymap.c3
-rw-r--r--keyboards/planck/keymaps/bone2planck/keymap.c16
-rw-r--r--keyboards/planck/keymaps/cbbrowne/rules.mk1
-rw-r--r--keyboards/planck/keymaps/charlesrocket/keymap.c4
-rw-r--r--keyboards/planck/keymaps/corvec/rules.mk1
-rw-r--r--keyboards/planck/keymaps/dear_vehicle_owner/keymap.c3
-rw-r--r--keyboards/planck/keymaps/default/keymap.c3
-rw-r--r--keyboards/planck/keymaps/dvorak2space/rules.mk1
-rw-r--r--keyboards/planck/keymaps/gitdrik/keymap.c3
-rw-r--r--keyboards/planck/keymaps/grant24/keymap.c3
-rw-r--r--keyboards/planck/keymaps/hvp/keymap.c3
-rw-r--r--keyboards/planck/keymaps/jdelkins/keymap.c3
-rw-r--r--keyboards/planck/keymaps/lja83/keymap.c3
-rw-r--r--keyboards/planck/keymaps/lucas/keymap.c12
-rw-r--r--keyboards/planck/keymaps/mjuma/keymap.c3
-rw-r--r--keyboards/planck/keymaps/motform/keymap.c16
-rw-r--r--keyboards/planck/keymaps/neo2planck/keymap.c12
-rw-r--r--keyboards/planck/keymaps/priyadi/rules.mk1
-rw-r--r--keyboards/planck/keymaps/rjhilgefort/keymap.c3
-rw-r--r--keyboards/planck/keymaps/rodhaene/rules.mk1
-rw-r--r--keyboards/planck/keymaps/sgoodwin/rules.mk1
-rw-r--r--keyboards/planck/keymaps/sigul/keymap.c10
-rw-r--r--keyboards/planck/keymaps/skug/keymap.c12
-rw-r--r--keyboards/planck/keymaps/spacebarracecar/keymap.c2
-rw-r--r--keyboards/planck/keymaps/vifon/rules.mk1
-rw-r--r--keyboards/planck/light/rules.mk1
-rw-r--r--keyboards/planck/rev1/rules.mk1
-rw-r--r--keyboards/planck/rev2/rules.mk1
-rw-r--r--keyboards/planck/rev3/rules.mk1
-rw-r--r--keyboards/planck/rev4/rules.mk1
-rw-r--r--keyboards/planck/rev5/rules.mk1
-rw-r--r--keyboards/planck/rev6/config.h2
-rw-r--r--keyboards/planck/rev6/rev6.c6
-rw-r--r--keyboards/planck/rev6/rules.mk1
-rw-r--r--keyboards/planck/thk/info.json42
-rw-r--r--keyboards/planck/thk/keymaps/thk/keymap.c3
-rw-r--r--keyboards/ploopyco/mouse/mouse.h2
-rw-r--r--keyboards/ploopyco/mouse/rules.mk2
-rw-r--r--keyboards/ploopyco/pmw3360.c218
-rw-r--r--keyboards/ploopyco/pmw3360_firmware.h300
-rw-r--r--keyboards/ploopyco/trackball/rules.mk2
-rw-r--r--keyboards/ploopyco/trackball/trackball.h2
-rw-r--r--keyboards/ploopyco/trackball_mini/rules.mk2
-rw-r--r--keyboards/ploopyco/trackball_mini/trackball_mini.h2
-rw-r--r--keyboards/ploopyco/trackball_nano/rules.mk2
-rw-r--r--keyboards/ploopyco/trackball_nano/trackball_nano.h2
-rw-r--r--keyboards/preonic/keymaps/AlexDaigre/keymap.c3
-rw-r--r--keyboards/preonic/keymaps/default/keymap.c3
-rw-r--r--keyboards/preonic/keymaps/drasbeck/keymap.c3
-rw-r--r--keyboards/preonic/keymaps/elisiano/keymap.c3
-rw-r--r--keyboards/preonic/keymaps/keelhauler/keymap.c3
-rw-r--r--keyboards/preonic/keymaps/kjwon15/keymap.c3
-rw-r--r--keyboards/preonic/keymaps/laurentlaurent/keymap.c3
-rw-r--r--keyboards/preonic/keymaps/mguterl/keymap.c3
-rw-r--r--keyboards/preonic/keymaps/mverteuil/keymap.c3
-rw-r--r--keyboards/preonic/keymaps/mverteuil_2x2u/keymap.c3
-rw-r--r--keyboards/preonic/keymaps/pezhore/keymap.c3
-rw-r--r--keyboards/preonic/keymaps/pitty/keymap.c12
-rw-r--r--keyboards/preonic/keymaps/senseored/keymap.c3
-rw-r--r--keyboards/preonic/keymaps/via/keymap.c3
-rw-r--r--keyboards/preonic/rev1/rules.mk1
-rw-r--r--keyboards/preonic/rev2/rules.mk1
-rw-r--r--keyboards/preonic/rev3/rev3.c6
-rw-r--r--keyboards/preonic/rev3/rules.mk1
-rw-r--r--keyboards/primekb/prime_m/rules.mk2
-rw-r--r--keyboards/primekb/prime_o/keymaps/spacebarracecar/keymap.c2
-rw-r--r--keyboards/ramonimbao/wete/keymaps/jis/keymap.c2
-rw-r--r--keyboards/redox/keymaps/german/keymap.c4
-rw-r--r--keyboards/redox/keymaps/italian/keymap.c14
-rw-r--r--keyboards/redox/keymaps/tw1t611/keymap.c12
-rw-r--r--keyboards/redox_w/keymaps/italian/keymap.c14
-rw-r--r--keyboards/rgbkb/common/common_oled.c101
-rw-r--r--keyboards/rgbkb/common/common_oled.h21
-rw-r--r--keyboards/rgbkb/common/glcdfont.c240
-rw-r--r--keyboards/rgbkb/common/touch_encoder.c310
-rw-r--r--keyboards/rgbkb/common/touch_encoder.h54
-rw-r--r--keyboards/rgbkb/mun/.noci0
-rw-r--r--keyboards/rgbkb/mun/config.h106
-rw-r--r--keyboards/rgbkb/mun/halconf.h24
-rw-r--r--keyboards/rgbkb/mun/keymaps/default/config.h32
-rw-r--r--keyboards/rgbkb/mun/keymaps/default/keymap.c252
-rw-r--r--keyboards/rgbkb/mun/keymaps/default/rules.mk1
-rw-r--r--keyboards/rgbkb/mun/keymaps/xulkal2/config.h42
-rw-r--r--keyboards/rgbkb/mun/keymaps/xulkal2/keymap.c246
-rw-r--r--keyboards/rgbkb/mun/keymaps/xulkal2/rules.mk4
-rw-r--r--keyboards/rgbkb/mun/matrix.c156
-rw-r--r--keyboards/rgbkb/mun/mcuconf.h42
-rw-r--r--keyboards/rgbkb/mun/mun.c35
-rw-r--r--keyboards/rgbkb/mun/mun.h16
-rw-r--r--keyboards/rgbkb/mun/readme.md15
-rw-r--r--keyboards/rgbkb/mun/rev1/config.h12
-rw-r--r--keyboards/rgbkb/mun/rev1/info.json101
-rw-r--r--keyboards/rgbkb/mun/rev1/readme.md15
-rw-r--r--keyboards/rgbkb/mun/rev1/rev1.c122
-rw-r--r--keyboards/rgbkb/mun/rev1/rev1.h43
-rw-r--r--keyboards/rgbkb/mun/rev1/rgbkb_mun_rev1_default.json13
-rw-r--r--keyboards/rgbkb/mun/rev1/rules.mk0
-rw-r--r--keyboards/rgbkb/mun/rules.mk46
-rw-r--r--keyboards/rgbkb/sol/rev2/config.h36
-rw-r--r--keyboards/runner3680/5x8/keymaps/JIS/keymap.c2
-rw-r--r--keyboards/satt/vision/keymaps/satt/keymap.c2
-rw-r--r--keyboards/satt/vision/keymaps/satt/keymap_jis2us.h6
-rw-r--r--keyboards/sendyyeah/75pixels/info.json62
-rw-r--r--keyboards/sentraq/s60_x/keymaps/dbroqua/keymap.c131
-rw-r--r--keyboards/sergiopoverony/creator_pro/config.h49
-rw-r--r--keyboards/sergiopoverony/creator_pro/creator_pro.c33
-rw-r--r--keyboards/sergiopoverony/creator_pro/creator_pro.h33
-rw-r--r--keyboards/sergiopoverony/creator_pro/info.json22
-rw-r--r--keyboards/sergiopoverony/creator_pro/keymaps/default/keymap.c123
-rw-r--r--keyboards/sergiopoverony/creator_pro/keymaps/default/readme.md5
-rw-r--r--keyboards/sergiopoverony/creator_pro/keymaps/via/keymap.c123
-rw-r--r--keyboards/sergiopoverony/creator_pro/keymaps/via/rules.mk1
-rw-r--r--keyboards/sergiopoverony/creator_pro/readme.md27
-rw-r--r--keyboards/sergiopoverony/creator_pro/rules.mk23
-rw-r--r--keyboards/setta21/keymaps/salicylic/config.h3
-rw-r--r--keyboards/shk9/rules.mk2
-rw-r--r--keyboards/sofle/keymaps/devdev/config.h44
-rw-r--r--keyboards/sofle/keymaps/killmaster/config.h64
-rw-r--r--keyboards/sofle/keymaps/killmaster/keymap.c403
-rw-r--r--keyboards/sofle/keymaps/killmaster/readme.md19
-rw-r--r--keyboards/sofle/keymaps/killmaster/rules.mk4
-rw-r--r--keyboards/sofle/keymaps/rgb_default/config.h44
-rw-r--r--keyboards/sofle/rev1/readme.md27
-rw-r--r--keyboards/sofle/rev1/rev1.c86
-rw-r--r--keyboards/sowbug/68keys/config.h4
-rw-r--r--keyboards/sowbug/ansi_tkl/config.h4
-rw-r--r--keyboards/subatomic/rules.mk1
-rw-r--r--keyboards/team0110/p1800fl/config.h (renamed from keyboards/handwired/p1800fl/config.h)20
-rw-r--r--keyboards/team0110/p1800fl/info.json (renamed from keyboards/handwired/p1800fl/info.json)4
-rw-r--r--keyboards/team0110/p1800fl/keymaps/default/keymap.c (renamed from keyboards/handwired/p1800fl/keymaps/default/keymap.c)21
-rw-r--r--keyboards/team0110/p1800fl/keymaps/default/readme.md (renamed from keyboards/handwired/p1800fl/keymaps/default/readme.md)0
-rw-r--r--keyboards/team0110/p1800fl/keymaps/via/keymap.c48
-rw-r--r--keyboards/team0110/p1800fl/keymaps/via/readme.md1
-rw-r--r--keyboards/team0110/p1800fl/keymaps/via/rules.mk1
-rw-r--r--keyboards/team0110/p1800fl/p1800fl.c (renamed from keyboards/handwired/p1800fl/p1800fl.c)0
-rw-r--r--keyboards/team0110/p1800fl/p1800fl.h (renamed from keyboards/handwired/p1800fl/p1800fl.h)0
-rw-r--r--keyboards/team0110/p1800fl/readme.md (renamed from keyboards/handwired/p1800fl/readme.md)12
-rw-r--r--keyboards/team0110/p1800fl/rules.mk22
-rw-r--r--keyboards/terrazzo/config.h4
-rw-r--r--keyboards/themadnoodle/ncc1701kb/v2/rules.mk1
-rw-r--r--keyboards/themadnoodle/noodlepad/rules.mk1
-rw-r--r--keyboards/tkc/portico/config.h2
-rw-r--r--keyboards/tokyokeyboard/tokyo60/config.h (renamed from keyboards/tokyo60/config.h)0
-rw-r--r--keyboards/tokyokeyboard/tokyo60/info.json (renamed from keyboards/tokyo60/info.json)0
-rw-r--r--keyboards/tokyokeyboard/tokyo60/keymaps/default/config.h (renamed from keyboards/tokyo60/keymaps/default/config.h)0
-rw-r--r--keyboards/tokyokeyboard/tokyo60/keymaps/default/keymap.c (renamed from keyboards/tokyo60/keymaps/default/keymap.c)0
-rw-r--r--keyboards/tokyokeyboard/tokyo60/keymaps/swappedBottomRow/config.h (renamed from keyboards/tokyo60/keymaps/swappedBottomRow/config.h)0
-rw-r--r--keyboards/tokyokeyboard/tokyo60/keymaps/swappedBottomRow/keymap.c (renamed from keyboards/tokyo60/keymaps/swappedBottomRow/keymap.c)0
-rw-r--r--keyboards/tokyokeyboard/tokyo60/keymaps/via/keymap.c (renamed from keyboards/tokyo60/keymaps/via/keymap.c)0
-rw-r--r--keyboards/tokyokeyboard/tokyo60/keymaps/via/rules.mk1
-rw-r--r--keyboards/tokyokeyboard/tokyo60/readme.md (renamed from keyboards/tokyo60/readme.md)8
-rw-r--r--keyboards/tokyokeyboard/tokyo60/rules.mk (renamed from keyboards/tokyo60/rules.mk)0
-rw-r--r--keyboards/tokyokeyboard/tokyo60/tokyo60.c (renamed from keyboards/tokyo60/tokyo60.c)0
-rw-r--r--keyboards/tokyokeyboard/tokyo60/tokyo60.h (renamed from keyboards/tokyo60/tokyo60.h)0
-rw-r--r--keyboards/torn/rules.mk2
-rw-r--r--keyboards/touchpad/rules.mk1
-rw-r--r--keyboards/waldo/rules.mk1
-rw-r--r--keyboards/westfoxtrot/cypher/rev1/keymaps/kwer/keymap.c8
-rw-r--r--keyboards/whitefox/config.h14
-rw-r--r--keyboards/whitefox/keymaps/kim-kim/keymap.c15
-rw-r--r--keyboards/whitefox/keymaps/matt3o/keymap.c60
-rw-r--r--keyboards/whitefox/rules.mk8
-rw-r--r--keyboards/whitefox/whitefox.c76
-rw-r--r--keyboards/xbows/nature/config.h2
-rw-r--r--keyboards/xbows/woody/config.h6
-rw-r--r--keyboards/xd75/keymaps/c4software_bepo/keymap.c8
-rw-r--r--keyboards/xd75/keymaps/cbbrowne/rules.mk1
-rw-r--r--keyboards/xd75/keymaps/developper_bepo/keymap.c12
-rw-r--r--keyboards/xd75/keymaps/french/keymap.c4
-rw-r--r--keyboards/xd75/keymaps/french/keymap_french.c8
-rw-r--r--keyboards/xd75/keymaps/germanized/config.h24
-rw-r--r--keyboards/xd75/keymaps/germanized/keymap.c6
-rw-r--r--keyboards/xd75/keymaps/markus/keymap.c22
-rw-r--r--keyboards/xd75/keymaps/pitty/keymap.c12
-rw-r--r--keyboards/xd75/keymaps/skewwhiffy/keymap.c38
-rw-r--r--keyboards/xw60/rules.mk1
-rw-r--r--keyboards/ymdk/np24/u4rgb6/rules.mk2
-rw-r--r--keyboards/yncognito/batpad/config.h14
-rw-r--r--layouts/community/ergodox/adnw_k_o_y/keymap.c2
-rw-r--r--layouts/community/ergodox/adnw_p_u_q/keymap.c14
-rw-r--r--layouts/community/ergodox/algernon/keymap.c42
-rw-r--r--layouts/community/ergodox/bepo/keymap.c34
-rw-r--r--layouts/community/ergodox/bepo_alt/keymap.c14
-rw-r--r--layouts/community/ergodox/bepo_csa/keymap.c60
-rw-r--r--layouts/community/ergodox/coderkun_neo2/keymap.c40
-rw-r--r--layouts/community/ergodox/colemak_osx_pc_no/keymap.c114
-rw-r--r--layouts/community/ergodox/deadcyclo/keymap.c371
-rw-r--r--layouts/community/ergodox/drashna/config.h1
-rw-r--r--layouts/community/ergodox/drashna/keymap.c13
-rw-r--r--layouts/community/ergodox/drashna/visualizer.c_old (renamed from layouts/community/ergodox/drashna/visualizer.c)0
-rw-r--r--layouts/community/ergodox/dvorak_programmer_swe/keymap.c10
-rw-r--r--layouts/community/ergodox/dvorak_programmer_swe/readme.md2
-rw-r--r--layouts/community/ergodox/dvorak_svorak_a5/keymap.c12
-rw-r--r--layouts/community/ergodox/french_hacker/keymap.c10
-rw-r--r--layouts/community/ergodox/german-kinergo/keymap.c12
-rw-r--r--layouts/community/ergodox/german-lukas/keymap.c6
-rw-r--r--layouts/community/ergodox/german-manuneo/keymap.c10
-rw-r--r--layouts/community/ergodox/german/keymap.c6
-rw-r--r--layouts/community/ergodox/guni/keymap.c41
-rw-r--r--layouts/community/ergodox/ishigoya-jp/keymap.c2
-rw-r--r--layouts/community/ergodox/kristian/keymap.c2
-rw-r--r--layouts/community/ergodox/neo2_on_qwertz_hardware/keymap.c8
-rw-r--r--layouts/community/ergodox/norwegian_programmer_osx_pc/keymap.c118
-rw-r--r--layouts/community/ergodox/norwegian_programmer_osx_pc_colemak/keymap.c118
-rw-r--r--layouts/community/ergodox/osx_de/keymap.c52
-rw-r--r--layouts/community/ergodox/osx_de_adnw_koy/keymap.c18
-rw-r--r--layouts/community/ergodox/osx_de_experimental/keymap.c60
-rw-r--r--layouts/community/ergodox/osx_fr/keymap.c8
-rw-r--r--layouts/community/ergodox/osx_whiskey_tango_foxtrot_capslock/keymap.c6
-rw-r--r--layouts/community/ergodox/software_neo2/keymap.c20
-rw-r--r--layouts/community/ergodox/swedish-lindhe/keymap.c6
-rw-r--r--layouts/community/ergodox/swedish/keymap.c6
-rw-r--r--layouts/community/ergodox/workman_osx_mdw/keymap.c2
-rw-r--r--layouts/community/ortho_4x12/bocaj/config.h2
-rw-r--r--layouts/community/ortho_4x12/brandonschlack/keymap.c3
-rw-r--r--layouts/community/ortho_4x12/drashna/config.h2
-rw-r--r--layouts/community/ortho_4x12/mguterl/keymap.c3
-rw-r--r--layouts/community/ortho_5x12/brandonschlack/keymap.c3
-rw-r--r--layouts/community/split_3x6_3/drashna/config.h41
-rw-r--r--layouts/community/split_3x6_3/drashna/keymap.c2
-rw-r--r--layouts/default/60_abnt2/default_60_abnt2/keymap.c2
m---------lib/chibios0
m---------lib/chibios-contrib0
-rw-r--r--lib/python/qmk/cli/__init__.py1
-rwxr-xr-xlib/python/qmk/cli/doctor/__init__.py5
-rw-r--r--lib/python/qmk/cli/doctor/check.py (renamed from lib/python/qmk/os_helpers/__init__.py)18
-rw-r--r--lib/python/qmk/cli/doctor/linux.py (renamed from lib/python/qmk/os_helpers/linux/__init__.py)26
-rw-r--r--lib/python/qmk/cli/doctor/macos.py13
-rwxr-xr-xlib/python/qmk/cli/doctor/main.py (renamed from lib/python/qmk/cli/doctor.py)76
-rw-r--r--lib/python/qmk/cli/doctor/windows.py14
-rwxr-xr-xlib/python/qmk/cli/format/json.py5
-rw-r--r--lib/python/qmk/cli/generate/version_h.py28
-rw-r--r--lib/python/qmk/commands.py133
-rw-r--r--lib/python/qmk/constants.py5
-rw-r--r--lib/python/qmk/info.py57
-rw-r--r--lib/python/qmk/json_schema.py34
-rw-r--r--lib/python/qmk/tests/test_cli_commands.py6
-rw-r--r--platforms/chibios/GENERIC_STM32_L412XB/board/board.mk9
-rw-r--r--platforms/chibios/GENERIC_STM32_L412XB/configs/board.h24
-rw-r--r--platforms/chibios/GENERIC_STM32_L412XB/configs/config.h26
-rw-r--r--platforms/chibios/GENERIC_STM32_L412XB/configs/mcuconf.h282
-rw-r--r--platforms/chibios/GENERIC_STM32_L433XC/configs/board.h2
-rw-r--r--platforms/chibios/IC_TEENSY_4_1/board/board.mk1
-rw-r--r--platforms/chibios/IC_TEENSY_4_1/rules.mk1
-rw-r--r--platforms/chibios/QMK_PROTON_C/configs/halconf.h2
-rw-r--r--platforms/chibios/common/configs/halconf.h2
-rw-r--r--platforms/chibios/common/ld/STM32L412xB.ld85
-rw-r--r--quantum/color.h54
-rw-r--r--quantum/command.c2
-rw-r--r--quantum/crc.c59
-rw-r--r--quantum/crc.h44
-rw-r--r--quantum/debounce.h2
-rw-r--r--quantum/debounce/asym_eager_defer_pk.c171
-rw-r--r--quantum/debounce/none.c31
-rw-r--r--quantum/debounce/sym_defer_g.c26
-rw-r--r--quantum/debounce/sym_defer_pk.c67
-rw-r--r--quantum/debounce/sym_eager_pk.c72
-rw-r--r--quantum/debounce/sym_eager_pr.c76
-rw-r--r--quantum/debounce/tests/asym_eager_defer_pk_tests.cpp374
-rw-r--r--quantum/debounce/tests/debounce_test_common.cpp229
-rw-r--r--quantum/debounce/tests/debounce_test_common.h83
-rw-r--r--quantum/debounce/tests/rules.mk44
-rw-r--r--quantum/debounce/tests/sym_defer_g_tests.cpp223
-rw-r--r--quantum/debounce/tests/sym_defer_pk_tests.cpp225
-rw-r--r--quantum/debounce/tests/sym_eager_pk_tests.cpp237
-rw-r--r--quantum/debounce/tests/sym_eager_pr_tests.cpp280
-rw-r--r--quantum/debounce/tests/testlist.mk6
-rw-r--r--quantum/dip_switch.c8
-rw-r--r--quantum/dip_switch.h8
-rw-r--r--quantum/keymap_extras/keymap_belgian.h13
-rw-r--r--quantum/keymap_extras/keymap_bepo.h167
-rw-r--r--quantum/keymap_extras/keymap_br_abnt2.h20
-rw-r--r--quantum/keymap_extras/keymap_canadian_multilingual.h179
-rw-r--r--quantum/keymap_extras/keymap_colemak.h32
-rw-r--r--quantum/keymap_extras/keymap_fr_ch.h79
-rw-r--r--quantum/keymap_extras/keymap_french.h11
-rw-r--r--quantum/keymap_extras/keymap_french_osx.h12
-rw-r--r--quantum/keymap_extras/keymap_german.h13
-rw-r--r--quantum/keymap_extras/keymap_german_ch.h18
-rw-r--r--quantum/keymap_extras/keymap_german_osx.h80
-rw-r--r--quantum/keymap_extras/keymap_hungarian.h19
-rw-r--r--quantum/keymap_extras/keymap_italian.h19
-rw-r--r--quantum/keymap_extras/keymap_italian_osx_ansi.h18
-rw-r--r--quantum/keymap_extras/keymap_italian_osx_iso.h18
-rw-r--r--quantum/keymap_extras/keymap_jp.h9
-rw-r--r--quantum/keymap_extras/keymap_neo2.h52
-rw-r--r--quantum/keymap_extras/keymap_norwegian.h23
-rw-r--r--quantum/keymap_extras/keymap_slovenian.h8
-rw-r--r--quantum/keymap_extras/keymap_spanish.h9
-rw-r--r--quantum/keymap_extras/keymap_swedish.h23
-rw-r--r--quantum/keymap_extras/keymap_uk.h75
-rw-r--r--quantum/keymap_extras/keymap_workman.h29
-rw-r--r--quantum/led_matrix/animations/alpha_mods_anim.h (renamed from quantum/led_matrix_animations/alpha_mods_anim.h)2
-rw-r--r--quantum/led_matrix/animations/band_anim.h (renamed from quantum/led_matrix_animations/band_anim.h)2
-rw-r--r--quantum/led_matrix/animations/band_pinwheel_anim.h (renamed from quantum/led_matrix_animations/band_pinwheel_anim.h)2
-rw-r--r--quantum/led_matrix/animations/band_spiral_anim.h (renamed from quantum/led_matrix_animations/band_spiral_anim.h)2
-rw-r--r--quantum/led_matrix/animations/breathing_anim.h (renamed from quantum/led_matrix_animations/breathing_anim.h)2
-rw-r--r--quantum/led_matrix/animations/cycle_left_right_anim.h (renamed from quantum/led_matrix_animations/cycle_left_right_anim.h)2
-rw-r--r--quantum/led_matrix/animations/cycle_out_in_anim.h (renamed from quantum/led_matrix_animations/cycle_out_in_anim.h)2
-rw-r--r--quantum/led_matrix/animations/cycle_up_down_anim.h (renamed from quantum/led_matrix_animations/cycle_up_down_anim.h)2
-rw-r--r--quantum/led_matrix/animations/dual_beacon_anim.h (renamed from quantum/led_matrix_animations/dual_beacon_anim.h)2
-rw-r--r--quantum/led_matrix/animations/led_matrix_effects.inc18
-rw-r--r--quantum/led_matrix/animations/runners/effect_runner_dx_dy.h (renamed from quantum/led_matrix_runners/effect_runner_dx_dy.h)0
-rw-r--r--quantum/led_matrix/animations/runners/effect_runner_dx_dy_dist.h (renamed from quantum/led_matrix_runners/effect_runner_dx_dy_dist.h)0
-rw-r--r--quantum/led_matrix/animations/runners/effect_runner_i.h (renamed from quantum/led_matrix_runners/effect_runner_i.h)0
-rw-r--r--quantum/led_matrix/animations/runners/effect_runner_reactive.h (renamed from quantum/led_matrix_runners/effect_runner_reactive.h)0
-rw-r--r--quantum/led_matrix/animations/runners/effect_runner_reactive_splash.h (renamed from quantum/led_matrix_runners/effect_runner_reactive_splash.h)0
-rw-r--r--quantum/led_matrix/animations/runners/effect_runner_sin_cos_i.h (renamed from quantum/led_matrix_runners/effect_runner_sin_cos_i.h)0
-rw-r--r--quantum/led_matrix/animations/runners/led_matrix_runners.inc6
-rw-r--r--quantum/led_matrix/animations/solid_anim.h (renamed from quantum/led_matrix_animations/solid_anim.h)0
-rw-r--r--quantum/led_matrix/animations/solid_reactive_cross.h (renamed from quantum/led_matrix_animations/solid_reactive_cross.h)4
-rw-r--r--quantum/led_matrix/animations/solid_reactive_nexus.h (renamed from quantum/led_matrix_animations/solid_reactive_nexus.h)4
-rw-r--r--quantum/led_matrix/animations/solid_reactive_simple_anim.h (renamed from quantum/led_matrix_animations/solid_reactive_simple_anim.h)4
-rw-r--r--quantum/led_matrix/animations/solid_reactive_wide.h (renamed from quantum/led_matrix_animations/solid_reactive_wide.h)4
-rw-r--r--quantum/led_matrix/animations/solid_splash_anim.h (renamed from quantum/led_matrix_animations/solid_splash_anim.h)4
-rw-r--r--quantum/led_matrix/animations/wave_left_right_anim.h (renamed from quantum/led_matrix_animations/wave_left_right_anim.h)2
-rw-r--r--quantum/led_matrix/animations/wave_up_down_anim.h (renamed from quantum/led_matrix_animations/wave_up_down_anim.h)2
-rw-r--r--quantum/led_matrix/led_matrix.c (renamed from quantum/led_matrix.c)48
-rw-r--r--quantum/led_matrix/led_matrix.h (renamed from quantum/led_matrix.h)2
-rw-r--r--quantum/led_matrix/led_matrix_drivers.c (renamed from quantum/led_matrix_drivers.c)0
-rw-r--r--quantum/led_matrix/led_matrix_types.h (renamed from quantum/led_matrix_types.h)0
-rw-r--r--quantum/led_matrix_animations/led_matrix_effects.inc18
-rw-r--r--quantum/matrix.c283
-rw-r--r--quantum/matrix.h2
-rw-r--r--quantum/matrix_common.c2
-rw-r--r--quantum/mcu_selection.mk72
-rw-r--r--quantum/mousekey.c2
-rw-r--r--quantum/mousekey.h11
-rw-r--r--quantum/process_keycode/process_key_override.c518
-rw-r--r--quantum/process_keycode/process_key_override.h147
-rw-r--r--quantum/process_keycode/process_key_override_private.h24
-rw-r--r--quantum/process_keycode/process_rgb.c1
-rw-r--r--quantum/quantum.c30
-rw-r--r--quantum/quantum.h8
-rw-r--r--quantum/quantum_keycodes.h5
-rw-r--r--quantum/rgb.h39
-rw-r--r--quantum/rgb_matrix/animations/alpha_mods_anim.h (renamed from quantum/rgb_matrix_animations/alpha_mods_anim.h)0
-rw-r--r--quantum/rgb_matrix/animations/breathing_anim.h (renamed from quantum/rgb_matrix_animations/breathing_anim.h)0
-rw-r--r--quantum/rgb_matrix/animations/colorband_pinwheel_sat_anim.h (renamed from quantum/rgb_matrix_animations/colorband_pinwheel_sat_anim.h)0
-rw-r--r--quantum/rgb_matrix/animations/colorband_pinwheel_val_anim.h (renamed from quantum/rgb_matrix_animations/colorband_pinwheel_val_anim.h)0
-rw-r--r--quantum/rgb_matrix/animations/colorband_sat_anim.h (renamed from quantum/rgb_matrix_animations/colorband_sat_anim.h)0
-rw-r--r--quantum/rgb_matrix/animations/colorband_spiral_sat_anim.h (renamed from quantum/rgb_matrix_animations/colorband_spiral_sat_anim.h)0
-rw-r--r--quantum/rgb_matrix/animations/colorband_spiral_val_anim.h (renamed from quantum/rgb_matrix_animations/colorband_spiral_val_anim.h)0
-rw-r--r--quantum/rgb_matrix/animations/colorband_val_anim.h (renamed from quantum/rgb_matrix_animations/colorband_val_anim.h)0
-rw-r--r--quantum/rgb_matrix/animations/cycle_all_anim.h (renamed from quantum/rgb_matrix_animations/cycle_all_anim.h)0
-rw-r--r--quantum/rgb_matrix/animations/cycle_left_right_anim.h (renamed from quantum/rgb_matrix_animations/cycle_left_right_anim.h)0
-rw-r--r--quantum/rgb_matrix/animations/cycle_out_in_anim.h (renamed from quantum/rgb_matrix_animations/cycle_out_in_anim.h)0
-rw-r--r--quantum/rgb_matrix/animations/cycle_out_in_dual_anim.h (renamed from quantum/rgb_matrix_animations/cycle_out_in_dual_anim.h)0
-rw-r--r--quantum/rgb_matrix/animations/cycle_pinwheel_anim.h (renamed from quantum/rgb_matrix_animations/cycle_pinwheel_anim.h)0
-rw-r--r--quantum/rgb_matrix/animations/cycle_spiral_anim.h (renamed from quantum/rgb_matrix_animations/cycle_spiral_anim.h)0
-rw-r--r--quantum/rgb_matrix/animations/cycle_up_down_anim.h (renamed from quantum/rgb_matrix_animations/cycle_up_down_anim.h)0
-rw-r--r--quantum/rgb_matrix/animations/digital_rain_anim.h (renamed from quantum/rgb_matrix_animations/digital_rain_anim.h)0
-rw-r--r--quantum/rgb_matrix/animations/dual_beacon_anim.h (renamed from quantum/rgb_matrix_animations/dual_beacon_anim.h)0
-rw-r--r--quantum/rgb_matrix/animations/gradient_left_right_anim.h (renamed from quantum/rgb_matrix_animations/gradient_left_right_anim.h)0
-rw-r--r--quantum/rgb_matrix/animations/gradient_up_down_anim.h (renamed from quantum/rgb_matrix_animations/gradient_up_down_anim.h)0
-rw-r--r--quantum/rgb_matrix/animations/hue_breathing_anim.h (renamed from quantum/rgb_matrix_animations/hue_breathing_anim.h)0
-rw-r--r--quantum/rgb_matrix/animations/hue_pendulum_anim.h (renamed from quantum/rgb_matrix_animations/hue_pendulum_anim.h)0
-rw-r--r--quantum/rgb_matrix/animations/hue_wave_anim.h (renamed from quantum/rgb_matrix_animations/hue_wave_anim.h)0
-rw-r--r--quantum/rgb_matrix/animations/jellybean_raindrops_anim.h (renamed from quantum/rgb_matrix_animations/jellybean_raindrops_anim.h)2
-rw-r--r--quantum/rgb_matrix/animations/rainbow_beacon_anim.h (renamed from quantum/rgb_matrix_animations/rainbow_beacon_anim.h)0
-rw-r--r--quantum/rgb_matrix/animations/rainbow_moving_chevron_anim.h (renamed from quantum/rgb_matrix_animations/rainbow_moving_chevron_anim.h)0
-rw-r--r--quantum/rgb_matrix/animations/rainbow_pinwheels_anim.h (renamed from quantum/rgb_matrix_animations/rainbow_pinwheels_anim.h)0
-rw-r--r--quantum/rgb_matrix/animations/raindrops_anim.h (renamed from quantum/rgb_matrix_animations/raindrops_anim.h)0
-rw-r--r--quantum/rgb_matrix/animations/rgb_matrix_effects.inc37
-rw-r--r--quantum/rgb_matrix/animations/runners/effect_runner_dx_dy.h (renamed from quantum/rgb_matrix_runners/effect_runner_dx_dy.h)0
-rw-r--r--quantum/rgb_matrix/animations/runners/effect_runner_dx_dy_dist.h (renamed from quantum/rgb_matrix_runners/effect_runner_dx_dy_dist.h)0
-rw-r--r--quantum/rgb_matrix/animations/runners/effect_runner_i.h (renamed from quantum/rgb_matrix_runners/effect_runner_i.h)0
-rw-r--r--quantum/rgb_matrix/animations/runners/effect_runner_reactive.h (renamed from quantum/rgb_matrix_runners/effect_runner_reactive.h)0
-rw-r--r--quantum/rgb_matrix/animations/runners/effect_runner_reactive_splash.h (renamed from quantum/rgb_matrix_runners/effect_runner_reactive_splash.h)0
-rw-r--r--quantum/rgb_matrix/animations/runners/effect_runner_sin_cos_i.h (renamed from quantum/rgb_matrix_runners/effect_runner_sin_cos_i.h)0
-rw-r--r--quantum/rgb_matrix/animations/runners/rgb_matrix_runners.inc6
-rw-r--r--quantum/rgb_matrix/animations/solid_color_anim.h (renamed from quantum/rgb_matrix_animations/solid_color_anim.h)0
-rw-r--r--quantum/rgb_matrix/animations/solid_reactive_anim.h (renamed from quantum/rgb_matrix_animations/solid_reactive_anim.h)0
-rw-r--r--quantum/rgb_matrix/animations/solid_reactive_cross.h (renamed from quantum/rgb_matrix_animations/solid_reactive_cross.h)0
-rw-r--r--quantum/rgb_matrix/animations/solid_reactive_nexus.h (renamed from quantum/rgb_matrix_animations/solid_reactive_nexus.h)0
-rw-r--r--quantum/rgb_matrix/animations/solid_reactive_simple_anim.h (renamed from quantum/rgb_matrix_animations/solid_reactive_simple_anim.h)0
-rw-r--r--quantum/rgb_matrix/animations/solid_reactive_wide.h (renamed from quantum/rgb_matrix_animations/solid_reactive_wide.h)0
-rw-r--r--quantum/rgb_matrix/animations/solid_splash_anim.h (renamed from quantum/rgb_matrix_animations/solid_splash_anim.h)0
-rw-r--r--quantum/rgb_matrix/animations/splash_anim.h (renamed from quantum/rgb_matrix_animations/splash_anim.h)0
-rw-r--r--quantum/rgb_matrix/animations/typing_heatmap_anim.h (renamed from quantum/rgb_matrix_animations/typing_heatmap_anim.h)0
-rw-r--r--quantum/rgb_matrix/rgb_matrix.c (renamed from quantum/rgb_matrix.c)48
-rw-r--r--quantum/rgb_matrix/rgb_matrix.h (renamed from quantum/rgb_matrix.h)4
-rw-r--r--quantum/rgb_matrix/rgb_matrix_drivers.c (renamed from quantum/rgb_matrix_drivers.c)31
-rw-r--r--quantum/rgb_matrix/rgb_matrix_types.h (renamed from quantum/rgb_matrix_types.h)0
-rw-r--r--quantum/rgb_matrix_animations/rgb_matrix_effects.inc37
-rw-r--r--quantum/rgblight/rgblight.c (renamed from quantum/rgblight.c)2
-rw-r--r--quantum/rgblight/rgblight.h (renamed from quantum/rgblight.h)0
-rw-r--r--quantum/rgblight/rgblight_breathe_table.h (renamed from quantum/rgblight_breathe_table.h)0
-rw-r--r--quantum/rgblight/rgblight_list.h (renamed from quantum/rgblight_list.h)46
-rw-r--r--quantum/rgblight/rgblight_modes.h (renamed from quantum/rgblight_modes.h)0
-rw-r--r--quantum/rgblight/rgblight_post_config.h (renamed from quantum/rgblight_post_config.h)0
-rw-r--r--quantum/send_string.c8
-rw-r--r--quantum/serial_link/system/serial_link.c22
-rw-r--r--quantum/split_common/matrix.c309
-rw-r--r--quantum/split_common/post_config.h9
-rw-r--r--quantum/split_common/split_util.c4
-rw-r--r--quantum/split_common/transaction_id_define.h94
-rw-r--r--quantum/split_common/transactions.c655
-rw-r--r--quantum/split_common/transactions.h54
-rw-r--r--quantum/split_common/transport.c484
-rw-r--r--quantum/split_common/transport.h165
-rw-r--r--show_options.mk14
-rw-r--r--testlist.mk1
-rw-r--r--tmk_core/avr.mk2
-rw-r--r--tmk_core/chibios.mk6
-rw-r--r--tmk_core/common/action_layer.c12
-rw-r--r--tmk_core/common/action_layer.h29
-rw-r--r--tmk_core/common/action_util.c28
-rw-r--r--tmk_core/common/arm_atsam/_timer.h19
-rw-r--r--tmk_core/common/avr/_timer.h19
-rw-r--r--tmk_core/common/avr/gpio.h15
-rw-r--r--tmk_core/common/chibios/_timer.h19
-rw-r--r--tmk_core/common/chibios/bootloader.c5
-rw-r--r--tmk_core/common/chibios/gpio.h16
-rw-r--r--tmk_core/common/host.c14
-rw-r--r--tmk_core/common/keyboard.c24
-rw-r--r--tmk_core/common/progmem.h1
-rw-r--r--tmk_core/common/sync_timer.c2
-rw-r--r--tmk_core/common/sync_timer.h2
-rw-r--r--tmk_core/common/timer.h24
-rw-r--r--tmk_core/protocol/chibios/usb_main.c34
-rw-r--r--tmk_core/protocol/lufa/lufa.c34
-rw-r--r--tmk_core/protocol/usb_descriptor.c6
-rw-r--r--tmk_core/protocol/usb_descriptor_common.h4
-rw-r--r--tmk_core/protocol/vusb/vusb.c7
-rw-r--r--tmk_core/rules.mk2
-rw-r--r--users/bbaserdem/rules.mk2
-rw-r--r--users/bcat/config.h2
-rw-r--r--users/bcat/rules.mk1
-rw-r--r--users/bocaj/config.h2
-rw-r--r--users/curry/config.h2
-rw-r--r--users/danielo515/process_records.h4
-rw-r--r--users/drashna/config.h167
-rw-r--r--users/drashna/drashna.c31
-rw-r--r--users/drashna/drashna.h11
-rw-r--r--users/drashna/drashna_font.h5
-rw-r--r--users/drashna/drashna_transport.c603
-rw-r--r--users/drashna/oled_stuff.c83
-rw-r--r--users/drashna/oled_stuff.h165
-rw-r--r--users/drashna/pimoroni_trackball.c151
-rw-r--r--users/drashna/process_records.c62
-rw-r--r--users/drashna/process_records.h82
-rw-r--r--users/drashna/rgb_matrix_stuff.c54
-rw-r--r--users/drashna/rgb_stuff.c100
-rw-r--r--users/drashna/rules.mk45
-rw-r--r--users/drashna/tap_dances.c8
-rw-r--r--users/drashna/tap_dances.h2
-rw-r--r--users/drashna/template.c6
-rw-r--r--users/drashna/template.h4
-rw-r--r--users/drashna/transport_sync.c80
-rw-r--r--users/drashna/transport_sync.h (renamed from keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/default/config.h)6
-rw-r--r--users/dshields/rules.mk1
-rw-r--r--users/ericgebhart/base_layers.h2
-rw-r--r--users/ericgebhart/core_keys.h2
-rw-r--r--users/ericgebhart/core_keysets.h36
-rw-r--r--users/ericgebhart/ericgebhart.c22
-rwxr-xr-xusers/ericgebhart/rules.mk1
-rw-r--r--users/romus/rules.mk2
-rw-r--r--users/sigul/sigul.c20
-rw-r--r--users/sigul/sigul.h8
-rw-r--r--users/spacebarracecar/spacebarracecar.c12
-rw-r--r--users/spidey3/config.h4
-rw-r--r--users/tominabox1/config.h2
-rwxr-xr-xutil/update_chibios_mirror.sh55
868 files changed, 17211 insertions, 9290 deletions
diff --git a/Makefile b/Makefile
index e007ae3679..866bcaaf3f 100644
--- a/Makefile
+++ b/Makefile
@@ -548,29 +548,14 @@ git-submodule:
git submodule sync --recursive
git submodule update --init --recursive --progress
-ifdef SKIP_VERSION
-SKIP_GIT := yes
-endif
-
# Generate the version.h file
-ifndef SKIP_GIT
- GIT_VERSION := $(shell git describe --abbrev=6 --dirty --always --tags 2>/dev/null || date +"%Y-%m-%d-%H:%M:%S")
- CHIBIOS_VERSION := $(shell cd lib/chibios && git describe --abbrev=6 --dirty --always --tags 2>/dev/null || date +"%Y-%m-%d-%H:%M:%S")
- CHIBIOS_CONTRIB_VERSION := $(shell cd lib/chibios-contrib && git describe --abbrev=6 --dirty --always --tags 2>/dev/null || date +"%Y-%m-%d-%H:%M:%S")
-else
- GIT_VERSION := NA
- CHIBIOS_VERSION := NA
- CHIBIOS_CONTRIB_VERSION := NA
+ifdef SKIP_GIT
+VERSION_H_FLAGS := --skip-git
endif
-ifndef SKIP_VERSION
-BUILD_DATE := $(shell date +"%Y-%m-%d-%H:%M:%S")
-else
-BUILD_DATE := 2020-01-01-00:00:00
+ifdef SKIP_VERSION
+VERSION_H_FLAGS := --skip-all
+SKIP_GIT := yes
endif
-
-$(shell echo '#define QMK_VERSION "$(GIT_VERSION)"' > $(ROOT_DIR)/quantum/version.h)
-$(shell echo '#define QMK_BUILDDATE "$(BUILD_DATE)"' >> $(ROOT_DIR)/quantum/version.h)
-$(shell echo '#define CHIBIOS_VERSION "$(CHIBIOS_VERSION)"' >> $(ROOT_DIR)/quantum/version.h)
-$(shell echo '#define CHIBIOS_CONTRIB_VERSION "$(CHIBIOS_CONTRIB_VERSION)"' >> $(ROOT_DIR)/quantum/version.h)
+$(shell $(QMK_BIN) generate-version-h $(VERSION_H_FLAGS) -q -o quantum/version.h)
include $(ROOT_DIR)/testlist.mk
diff --git a/Vagrantfile b/Vagrantfile
index adb93a3cee..8125b05890 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -6,7 +6,7 @@ Vagrant.configure(2) do |config|
config.vm.define "qmk_firmware"
# VMware/Virtualbox ( and also Hyperv/Parallels) 64 bit
- config.vm.box = "generic/debian9"
+ config.vm.box = "generic/debian10"
config.vm.synced_folder '.', '/vagrant'
diff --git a/build_json.mk b/build_json.mk
index 8822be6a12..28659f2603 100644
--- a/build_json.mk
+++ b/build_json.mk
@@ -1,22 +1,22 @@
# Look for a json keymap file
ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_5)/keymap.json)","")
- KEYMAP_C := $(KEYBOARD_OUTPUT)/src/keymap.c
+ KEYMAP_C := $(KEYMAP_OUTPUT)/keymap.c
KEYMAP_JSON := $(MAIN_KEYMAP_PATH_5)/keymap.json
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_5)
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_4)/keymap.json)","")
- KEYMAP_C := $(KEYBOARD_OUTPUT)/src/keymap.c
+ KEYMAP_C := $(KEYMAP_OUTPUT)/keymap.c
KEYMAP_JSON := $(MAIN_KEYMAP_PATH_4)/keymap.json
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_4)
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_3)/keymap.json)","")
- KEYMAP_C := $(KEYBOARD_OUTPUT)/src/keymap.c
+ KEYMAP_C := $(KEYMAP_OUTPUT)/keymap.c
KEYMAP_JSON := $(MAIN_KEYMAP_PATH_3)/keymap.json
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_3)
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_2)/keymap.json)","")
- KEYMAP_C := $(KEYBOARD_OUTPUT)/src/keymap.c
+ KEYMAP_C := $(KEYMAP_OUTPUT)/keymap.c
KEYMAP_JSON := $(MAIN_KEYMAP_PATH_2)/keymap.json
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_2)
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_1)/keymap.json)","")
- KEYMAP_C := $(KEYBOARD_OUTPUT)/src/keymap.c
+ KEYMAP_C := $(KEYMAP_OUTPUT)/keymap.c
KEYMAP_JSON := $(MAIN_KEYMAP_PATH_1)/keymap.json
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_1)
endif
@@ -27,5 +27,5 @@ ifneq ("$(wildcard $(KEYMAP_PATH))", "")
endif
# Generate the keymap.c
-$(KEYBOARD_OUTPUT)/src/keymap.c: $(KEYMAP_JSON)
+$(KEYMAP_C): $(KEYMAP_JSON)
$(QMK_BIN) json2c --quiet --output $(KEYMAP_C) $(KEYMAP_JSON)
diff --git a/build_keyboard.mk b/build_keyboard.mk
index 91a6c23b71..38ca2aaa99 100644
--- a/build_keyboard.mk
+++ b/build_keyboard.mk
@@ -103,6 +103,15 @@ MAIN_KEYMAP_PATH_5 := $(KEYBOARD_PATH_5)/keymaps/$(KEYMAP)
INFO_RULES_MK = $(shell $(QMK_BIN) generate-rules-mk --quiet --escape --keyboard $(KEYBOARD) --output $(KEYBOARD_OUTPUT)/src/rules.mk)
include $(INFO_RULES_MK)
+ifneq ($(FORCE_LAYOUT),)
+ TARGET := $(TARGET)_$(FORCE_LAYOUT)
+endif
+
+# Object files and generated keymap directory
+# To put object files in current directory, use a dot (.), do NOT make
+# this an empty or blank macro!
+KEYMAP_OUTPUT := $(BUILD_DIR)/obj_$(TARGET)
+
# Check for keymap.json first, so we can regenerate keymap.c
include build_json.mk
@@ -145,10 +154,6 @@ ifeq ($(strip $(CONVERT_TO_PROTON_C)), yes)
include platforms/chibios/QMK_PROTON_C/convert_to_proton_c.mk
endif
-ifneq ($(FORCE_LAYOUT),)
- TARGET := $(TARGET)_$(FORCE_LAYOUT)
-endif
-
include quantum/mcu_selection.mk
# Find all the C source files to be compiled in subfolders.
@@ -232,6 +237,7 @@ ifdef MCU_FAMILY
PLATFORM=CHIBIOS
PLATFORM_KEY=chibios
FIRMWARE_FORMAT?=bin
+ OPT_DEFS += -DMCU_$(MCU_FAMILY)
else ifdef ARM_ATSAM
PLATFORM=ARM_ATSAM
PLATFORM_KEY=arm_atsam
@@ -327,11 +333,6 @@ endif
# Disable features that a keyboard doesn't support
-include disable_features.mk
-# Object files directory
-# To put object files in current directory, use a dot (.), do NOT make
-# this an empty or blank macro!
-KEYMAP_OUTPUT := $(BUILD_DIR)/obj_$(TARGET)
-
ifneq ("$(wildcard $(KEYMAP_PATH)/config.h)","")
CONFIG_H += $(KEYMAP_PATH)/config.h
endif
diff --git a/build_layout.mk b/build_layout.mk
index 4748ad483d..649dfb2c70 100644
--- a/build_layout.mk
+++ b/build_layout.mk
@@ -7,7 +7,7 @@ define SEARCH_LAYOUTS_REPO
LAYOUT_KEYMAP_C := $$(LAYOUT_KEYMAP_PATH)/keymap.c
ifneq ("$$(wildcard $$(LAYOUT_KEYMAP_JSON))","")
-include $$(LAYOUT_KEYMAP_PATH)/rules.mk
- KEYMAP_C := $(KEYBOARD_OUTPUT)/src/keymap.c
+ KEYMAP_C := $(KEYMAP_OUTPUT)/keymap.c
KEYMAP_JSON := $$(LAYOUT_KEYMAP_JSON)
KEYMAP_PATH := $$(LAYOUT_KEYMAP_PATH)
else ifneq ("$$(wildcard $$(LAYOUT_KEYMAP_C))","")
@@ -33,4 +33,5 @@ endif
$(foreach LAYOUT,$(LAYOUTS),$(eval $(call SEARCH_LAYOUTS)))
# Use rule from build_json.mk, but update prerequisite in case KEYMAP_JSON was updated
-$(KEYBOARD_OUTPUT)/src/keymap.c: $(KEYMAP_JSON)
+$(KEYMAP_C): $(KEYMAP_JSON)
+ $(QMK_BIN) json2c --quiet --output $(KEYMAP_C) $(KEYMAP_JSON)
diff --git a/build_test.mk b/build_test.mk
index 77c4265f93..5171c58c36 100644
--- a/build_test.mk
+++ b/build_test.mk
@@ -49,6 +49,7 @@ endif
include common_features.mk
include $(TMK_PATH)/common.mk
+include $(QUANTUM_PATH)/debounce/tests/rules.mk
include $(QUANTUM_PATH)/sequencer/tests/rules.mk
include $(QUANTUM_PATH)/serial_link/tests/rules.mk
ifneq ($(filter $(FULL_TESTS),$(TEST)),)
diff --git a/common_features.mk b/common_features.mk
index 1a9fd46b55..74b94ecd77 100644
--- a/common_features.mk
+++ b/common_features.mk
@@ -196,10 +196,11 @@ ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
ifeq ($(filter $(RGBLIGHT_DRIVER),$(VALID_RGBLIGHT_TYPES)),)
$(error RGBLIGHT_DRIVER="$(RGBLIGHT_DRIVER)" is not a valid RGB type)
else
- POST_CONFIG_H += $(QUANTUM_DIR)/rgblight_post_config.h
+ COMMON_VPATH += $(QUANTUM_DIR)/rgblight
+ POST_CONFIG_H += $(QUANTUM_DIR)/rgblight/rgblight_post_config.h
OPT_DEFS += -DRGBLIGHT_ENABLE
SRC += $(QUANTUM_DIR)/color.c
- SRC += $(QUANTUM_DIR)/rgblight.c
+ SRC += $(QUANTUM_DIR)/rgblight/rgblight.c
CIE1931_CURVE := yes
RGB_KEYCODES_ENABLE := yes
endif
@@ -230,9 +231,12 @@ ifneq (,$(filter $(MCU), atmega16u2 atmega32u2 at90usb162))
# ATmegaxxU2 does not have hardware MUL instruction - lib8tion must be told to use software multiplication routines
OPT_DEFS += -DLIB8_ATTINY
endif
+ COMMON_VPATH += $(QUANTUM_DIR)/led_matrix
+ COMMON_VPATH += $(QUANTUM_DIR)/led_matrix/animations
+ COMMON_VPATH += $(QUANTUM_DIR)/led_matrix/animations/runners
SRC += $(QUANTUM_DIR)/process_keycode/process_backlight.c
- SRC += $(QUANTUM_DIR)/led_matrix.c
- SRC += $(QUANTUM_DIR)/led_matrix_drivers.c
+ SRC += $(QUANTUM_DIR)/led_matrix/led_matrix.c
+ SRC += $(QUANTUM_DIR)/led_matrix/led_matrix_drivers.c
CIE1931_CURVE := yes
ifeq ($(strip $(LED_MATRIX_DRIVER)), IS31FL3731)
@@ -244,7 +248,7 @@ endif
endif
RGB_MATRIX_ENABLE ?= no
-VALID_RGB_MATRIX_TYPES := IS31FL3731 IS31FL3733 IS31FL3737 IS31FL3741 WS2812 custom
+VALID_RGB_MATRIX_TYPES := AW20216 IS31FL3731 IS31FL3733 IS31FL3737 IS31FL3741 WS2812 custom
ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes)
ifeq ($(filter $(RGB_MATRIX_DRIVER),$(VALID_RGB_MATRIX_TYPES)),)
@@ -255,12 +259,25 @@ ifneq (,$(filter $(MCU), atmega16u2 atmega32u2 at90usb162))
# ATmegaxxU2 does not have hardware MUL instruction - lib8tion must be told to use software multiplication routines
OPT_DEFS += -DLIB8_ATTINY
endif
+ COMMON_VPATH += $(QUANTUM_DIR)/rgb_matrix
+ COMMON_VPATH += $(QUANTUM_DIR)/rgb_matrix/animations
+ COMMON_VPATH += $(QUANTUM_DIR)/rgb_matrix/animations/runners
+ # Get rid of this!
+ COMMON_VPATH += $(QUANTUM_DIR)/rgblight
+
SRC += $(QUANTUM_DIR)/color.c
- SRC += $(QUANTUM_DIR)/rgb_matrix.c
- SRC += $(QUANTUM_DIR)/rgb_matrix_drivers.c
+ SRC += $(QUANTUM_DIR)/rgb_matrix/rgb_matrix.c
+ SRC += $(QUANTUM_DIR)/rgb_matrix/rgb_matrix_drivers.c
CIE1931_CURVE := yes
RGB_KEYCODES_ENABLE := yes
+ ifeq ($(strip $(RGB_MATRIX_DRIVER)), AW20216)
+ OPT_DEFS += -DAW20216 -DSTM32_SPI -DHAL_USE_SPI=TRUE
+ COMMON_VPATH += $(DRIVER_PATH)/awinic
+ SRC += aw20216.c
+ QUANTUM_LIB_SRC += spi_master.c
+ endif
+
ifeq ($(strip $(RGB_MATRIX_DRIVER)), IS31FL3731)
OPT_DEFS += -DIS31FL3731 -DSTM32_I2C -DHAL_USE_I2C=TRUE
COMMON_VPATH += $(DRIVER_PATH)/issi
@@ -318,6 +335,11 @@ ifeq ($(strip $(PRINTING_ENABLE)), yes)
SRC += $(TMK_DIR)/protocol/serial_uart.c
endif
+ifeq ($(strip $(KEY_OVERRIDE_ENABLE)), yes)
+ OPT_DEFS += -DKEY_OVERRIDE_ENABLE
+ SRC += $(QUANTUM_DIR)/process_keycode/process_key_override.c
+endif
+
ifeq ($(strip $(SERIAL_LINK_ENABLE)), yes)
SERIAL_SRC := $(wildcard $(SERIAL_PATH)/protocol/*.c)
SERIAL_SRC += $(wildcard $(SERIAL_PATH)/system/*.c)
@@ -494,11 +516,7 @@ ifneq ($(strip $(CUSTOM_MATRIX)), yes)
# if 'lite' then skip the actual matrix implementation
ifneq ($(strip $(CUSTOM_MATRIX)), lite)
# Include the standard or split matrix code if needed
- ifeq ($(strip $(SPLIT_KEYBOARD)), yes)
- QUANTUM_SRC += $(QUANTUM_DIR)/split_common/matrix.c
- else
- QUANTUM_SRC += $(QUANTUM_DIR)/matrix.c
- endif
+ QUANTUM_SRC += $(QUANTUM_DIR)/matrix.c
endif
endif
@@ -523,13 +541,18 @@ endif
ifeq ($(strip $(SPLIT_KEYBOARD)), yes)
POST_CONFIG_H += $(QUANTUM_DIR)/split_common/post_config.h
OPT_DEFS += -DSPLIT_KEYBOARD
+ CRC_ENABLE := yes
# Include files used by all split keyboards
QUANTUM_SRC += $(QUANTUM_DIR)/split_common/split_util.c
# Determine which (if any) transport files are required
ifneq ($(strip $(SPLIT_TRANSPORT)), custom)
- QUANTUM_LIB_SRC += $(QUANTUM_DIR)/split_common/transport.c
+ QUANTUM_SRC += $(QUANTUM_DIR)/split_common/transport.c \
+ $(QUANTUM_DIR)/split_common/transactions.c
+
+ OPT_DEFS += -DSPLIT_COMMON_TRANSACTIONS
+
# Functions added via QUANTUM_LIB_SRC are only included in the final binary if they're called.
# Unused functions are pruned away, which is why we can add multiple drivers here without bloat.
ifeq ($(PLATFORM),AVR)
@@ -550,6 +573,11 @@ ifeq ($(strip $(SPLIT_KEYBOARD)), yes)
COMMON_VPATH += $(QUANTUM_PATH)/split_common
endif
+ifeq ($(strip $(CRC_ENABLE)), yes)
+ OPT_DEFS += -DCRC_ENABLE
+ SRC += crc.c
+endif
+
HAPTIC_ENABLE ?= no
ifneq ($(strip $(HAPTIC_ENABLE)),no)
COMMON_VPATH += $(DRIVER_PATH)/haptic
@@ -580,6 +608,14 @@ ifeq ($(strip $(OLED_DRIVER_ENABLE)), yes)
SRC += oled_driver.c
endif
+ifeq ($(strip $(ST7565_ENABLE)), yes)
+ OPT_DEFS += -DST7565_ENABLE
+ COMMON_VPATH += $(DRIVER_PATH)/oled # For glcdfont.h
+ COMMON_VPATH += $(DRIVER_PATH)/lcd
+ QUANTUM_LIB_SRC += spi_master.c
+ SRC += st7565.c
+endif
+
include $(DRIVER_PATH)/qwiic/qwiic.mk
ifeq ($(strip $(UCIS_ENABLE)), yes)
diff --git a/data/schemas/api_keyboard.jsonschema b/data/schemas/api_keyboard.jsonschema
index d570ee9990..d638658a1d 100644
--- a/data/schemas/api_keyboard.jsonschema
+++ b/data/schemas/api_keyboard.jsonschema
@@ -1,34 +1,22 @@
{
+ "$id": "qmk.api.keyboard.v1",
"allOf": [
- { "$ref": "qmk.keyboard.v1" },
+ {"$ref": "qmk.keyboard.v1"},
{
- "$id": "qmk.api.keyboard.v1",
- "keymaps": {
- "type": "string"
- },
- "parse_errors": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "parse_warnings": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "processor_type": {
- "type": "string"
- },
- "protocol": {
- "type": "string"
- },
- "keyboard_folder": {
- "type": "string"
- },
- "platform": {
- "type": "string"
+ "properties": {
+ "keymaps": {
+ "type": "object",
+ "properties": {
+ "url": {"type": "string"}
+ }
+
+ },
+ "parse_errors": {"$ref": "qmk.definitions.v1#/string_array"},
+ "parse_warnings": {"$ref": "qmk.definitions.v1#/string_array"},
+ "processor_type": {"type": "string"},
+ "protocol": {"type": "string"},
+ "keyboard_folder": {"type": "string"},
+ "platform": {"type": "string"}
}
}
]
diff --git a/data/schemas/definitions.jsonschema b/data/schemas/definitions.jsonschema
new file mode 100644
index 0000000000..822f237073
--- /dev/null
+++ b/data/schemas/definitions.jsonschema
@@ -0,0 +1,107 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "$id": "qmk.definitions.v1",
+ "title": "Common definitions used across QMK's jsonschemas.",
+ "type": "object",
+ "boolean_array": {
+ "type": "object",
+ "additionalProperties": {"type": "boolean"}
+ },
+ "filename": {
+ "type": "string",
+ "minLength": 1,
+ "pattern": "^[0-9a-z_]*$"
+ },
+ "hex_number_2d": {
+ "type": "string",
+ "pattern": "^0x[0-9A-F]{2}$"
+ },
+ "hex_number_4d": {
+ "type": "string",
+ "pattern": "^0x[0-9A-F]{4}$"
+ },
+ "text_identifier": {
+ "type": "string",
+ "minLength": 1,
+ "maxLength": 250
+ },
+ "layout_macro": {
+ "oneOf": [
+ {
+ "type": "string",
+ "enum": ["LAYOUT", "LAYOUT_planck_1x2uC"]
+ },
+ {
+ "type": "string",
+ "pattern": "^LAYOUT_[0-9a-z_]*$"
+ }
+ ]
+ },
+ "key_unit": {
+ "type": "number",
+ "min": 0.25
+ },
+ "mcu_pin_array": {
+ "type": "array",
+ "items": {"$ref": "#/mcu_pin"}
+ },
+ "mcu_pin": {
+ "oneOf": [
+ {
+ "type": "string",
+ "pattern": "^[A-K]\\d{1,2}$"
+ },
+ {
+ "type": "string",
+ "pattern": "^LINE_PIN\\d{1,2}$"
+ },
+ {
+ "type": "number",
+ "multipleOf": 1
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "signed_decimal": {
+ "type": "number"
+ },
+ "signed_int": {
+ "type": "number",
+ "multipleOf": 1
+ }
+ "signed_int_8": {
+ "type": "number",
+ "min": -127,
+ "max": 127,
+ "multipleOf": 1
+ }
+ "string_array": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "string_object": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ }
+ },
+ "unsigned_decimal": {
+ "type": "number",
+ "min": 0
+ },
+ "unsigned_int": {
+ "type": "number",
+ "min": 0,
+ "multipleOf": 1
+ }
+ "unsigned_int_8": {
+ "type": "number",
+ "min": 0,
+ "max": 255,
+ "multipleOf": 1
+ }
+}
diff --git a/data/schemas/keyboard.jsonschema b/data/schemas/keyboard.jsonschema
index c335f49d52..3a77b20678 100644
--- a/data/schemas/keyboard.jsonschema
+++ b/data/schemas/keyboard.jsonschema
@@ -1,31 +1,19 @@
{
- "$schema": "http://json-schema.org/schema#",
+ "$schema": "http://json-schema.org/draft-07/schema#",
"$id": "qmk.keyboard.v1",
"title": "Keyboard Information",
"type": "object",
"properties": {
- "keyboard_name": {
- "type": "string",
- "minLength": 2,
- "maxLength": 250
- },
- "maintainer": {
- "type": "string",
- "minLength": 2,
- "maxLength": 250
- },
- "manufacturer": {
- "type": "string",
- "minLength": 2,
- "maxLength": 250
- },
+ "keyboard_name": {"$ref": "qmk.definitions.v1#/text_identifier"},
+ "maintainer": {"$ref": "qmk.definitions.v1#/text_identifier"},
+ "manufacturer": {"$ref": "qmk.definitions.v1#/text_identifier"},
"url": {
"type": "string",
"format": "uri"
},
"processor": {
"type": "string",
- "enum": ["cortex-m0", "cortex-m0plus", "cortex-m3", "cortex-m4", "MKL26Z64", "MK20DX128", "MK20DX256", "MK66F18", "STM32F042", "STM32F072", "STM32F103", "STM32F303", "STM32F401", "STM32F411", "STM32F446", "STM32G431", "STM32G474", "STM32L433", "STM32L443", "atmega16u2", "atmega32u2", "atmega16u4", "atmega32u4", "at90usb162", "at90usb646", "at90usb647", "at90usb1286", "at90usb1287", "atmega32a", "atmega328p", "atmega328", "attiny85", "unknown"]
+ "enum": ["cortex-m0", "cortex-m0plus", "cortex-m3", "cortex-m4", "MKL26Z64", "MK20DX128", "MK20DX256", "MK66F18", "STM32F042", "STM32F072", "STM32F103", "STM32F303", "STM32F401", "STM32F411", "STM32F446", "STM32G431", "STM32G474", "STM32L412", "STM32L422", "STM32L433", "STM32L443", "atmega16u2", "atmega32u2", "atmega16u4", "atmega32u4", "at90usb162", "at90usb646", "at90usb647", "at90usb1286", "at90usb1287", "atmega32a", "atmega328p", "atmega328", "attiny85", "unknown"]
},
"board": {
"type": "string",
@@ -40,62 +28,25 @@
"type": "string",
"enum": ["COL2ROW", "ROW2COL"]
},
- "debounce": {
- "type": "number",
- "min": 0,
- "multipleOf": 1
- },
- "height": {
- "type": "number",
- "min": 0.25
- },
- "width": {
- "type": "number",
- "min": 0.25
- },
+ "debounce": {"$ref": "qmk.definitions.v1#/unsigned_int"},
+ "height": {"$ref": "qmk.definitions.v1#/key_unit"},
+ "width": {"$ref": "qmk.definitions.v1#/key_unit"},
"community_layouts": {
"type": "array",
- "items": {
- "type": "string",
- "minLength": 2,
- "pattern": "^[0-9a-z_]*$"
- }
- },
- "features": {
- "type": "object",
- "additionalProperties": {"type": "boolean"}
+ "items": {"$ref": "qmk.definitions.v1#/filename"}
},
+ "features": {"$ref": "qmk.definitions.v1#/boolean_array"},
"indicators": {
"type": "object",
"properties": {
- "caps_lock": {
- "type": "string",
- "pattern": "^[A-K]\\d{1,2}$"
- },
- "num_lock": {
- "type": "string",
- "pattern": "^[A-K]\\d{1,2}$"
- },
- "scroll_lock": {
- "type": "string",
- "pattern": "^[A-K]\\d{1,2}$"
- }
+ "caps_lock": {"$ref": "qmk.definitions.v1#/mcu_pin"},
+ "num_lock": {"$ref": "qmk.definitions.v1#/mcu_pin"},
+ "scroll_lock": {"$ref": "qmk.definitions.v1#/mcu_pin"}
}
},
"layout_aliases": {
"type": "object",
- "additionalProperties": {
- "oneOf": [
- {
- "type": "string",
- "enum": ["LAYOUT", "LAYOUT_planck_1x2uC"]
- },
- {
- "type": "string",
- "pattern": "^LAYOUT_[0-9a-z_]*$"
- }
- ]
- }
+ "additionalProperties": {"$ref": "qmk.definitions.v1#/layout_macro"}
},
"layouts": {
"type": "object",
@@ -109,11 +60,7 @@
"c_macro": {
"type": "boolean"
},
- "key_count": {
- "type": "number",
- "min": 0,
- "multipleOf": 1
- },
+ "key_count": {"$ref": "qmk.definitions.v1#/key_unit"},
"layout": {
"type": "array",
"items": {
@@ -131,34 +78,14 @@
"multipleOf": 1
}
},
- "h": {
- "type": "number",
- "min": 0.25
- },
- "r": {
- "type": "number",
- "min": 0
- },
- "rx": {
- "type": "number",
- "min": 0
- },
- "ry": {
- "type": "number",
- "min": 0
- },
- "w": {
- "type": "number",
- "min": 0.25
- },
- "x": {
- "type": "number",
- "min": 0
- },
- "y": {
- "type": "number",
- "min": 0
- }
+ "key_count": {"$ref": "qmk.definitions.v1#/key_unit"},
+ "r": {"$ref": "qmk.definitions.v1#/unsigned_decimal"},
+ "rx": {"$ref": "qmk.definitions.v1#/unsigned_decimal"},
+ "ry": {"$ref": "qmk.definitions.v1#/unsigned_decimal"},
+ "h": {"$ref": "qmk.definitions.v1#/key_unit"},
+ "w": {"$ref": "qmk.definitions.v1#/key_unit"},
+ "x": {"$ref": "qmk.definitions.v1#/key_unit"},
+ "y": {"$ref": "qmk.definitions.v1#/key_unit"}
}
}
}
@@ -171,61 +98,10 @@
"properties": {
"direct": {
"type": "array",
- "items": {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "type": "string",
- "pattern": "^[A-K]\\d{1,2}$"
- },
- {
- "type": "number",
- "multipleOf": 1
- },
- {
- "type": "null"
- }
- ]
- }
- }
- },
- "cols": {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "type": "string",
- "pattern": "^[A-K]\\d{1,2}$"
- },
- {
- "type": "number",
- "multipleOf": 1
- },
- {
- "type": "null"
- }
- ]
- }
+ "items": {$ref": "qmk.definitions.v1#/mcu_pin_array"}
},
- "rows": {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "type": "string",
- "pattern": "^[A-K]\\d{1,2}$"
- },
- {
- "type": "number",
- "multipleOf": 1
- },
- {
- "type": "null"
- }
- ]
- }
- }
+ "cols": {"$ref": "qmk.definitions.v1#/mcu_pin_array"},
+ "rows": {"$ref": "qmk.definitions.v1#/mcu_pin_array"}
}
},
"rgblight": {
@@ -238,47 +114,19 @@
"type": "boolean"
}
},
- "brightness_steps": {
- "type": "number",
- "min": 0,
- "multipleOf": 1
- },
- "hue_steps": {
- "type": "number",
- "min": 0,
- "multipleOf": 1
- },
- "led_count": {
- "type": "number",
- "min": 0,
- "multipleOf": 1
- },
- "max_brightness": {
- "type": "number",
- "min": 0,
- "max": 255,
- "multipleOf": 1
- },
- "pin": {
- "type": "string",
- "pattern": "^[A-K]\\d{1,2}$"
- },
- "saturation_steps": {
- "type": "number",
- "min": 0,
- "multipleOf": 1
- },
+ "brightness_steps": {"$ref": "qmk.definitions.v1#/unsigned_int"},
+ "hue_steps": {"$ref": "qmk.definitions.v1#/unsigned_int"},
+ "led_count": {"$ref": "qmk.definitions.v1#/unsigned_int"},
+ "max_brightness": {"$ref": "qmk.definitions.v1#/unsigned_int_8"},
+ "pin": {"$ref": "qmk.definitions.v1#/mcu_pin"},
+ "saturation_steps": {"$ref": "qmk.definitions.v1#/unsigned_int"},
"sleep": {"type": "boolean"},
"split": {"type": "boolean"},
"split_count": {
"type": "array",
"minLength": 2,
"maxLength": 2,
- "items": {
- "type": "number",
- "min": 0,
- "multipleOf": 1
- }
+ "items": {"$ref": "qmk.definitions.v1#/unsigned_int"}
}
}
},
@@ -286,40 +134,19 @@
"type": "object",
"additionalProperties": false,
"properties": {
- "device_ver": {
- "type": "string",
- "pattern": "^[0-9A-F]x[0-9A-F][0-9A-F][0-9A-F][0-9A-F]"
- },
- "pid": {
- "type": "string",
- "pattern": "^[0-9A-F]x[0-9A-F][0-9A-F][0-9A-F][0-9A-F]"
- },
- "vid": {
- "type": "string",
- "pattern": "^[0-9A-F]x[0-9A-F][0-9A-F][0-9A-F][0-9A-F]"
- }
+ "device_ver": {"$ref": "qmk.definitions.v1#/hex_number_4d"},
+ "pid": {"$ref": "qmk.definitions.v1#/hex_number_4d"},
+ "vid": {"$ref": "qmk.definitions.v1#/hex_number_4d"}
}
},
"qmk_lufa_bootloader": {
"type": "object",
"additionalProperties": false,
"properties": {
- "esc_output": {
- "type": "string",
- "pattern": "^[A-K]\\d{1,2}$"
- },
- "esc_input": {
- "type": "string",
- "pattern": "^[A-K]\\d{1,2}$"
- },
- "led": {
- "type": "string",
- "pattern": "^[A-K]\\d{1,2}$"
- },
- "speaker": {
- "type": "string",
- "pattern": "^[A-K]\\d{1,2}$"
- }
+ "esc_output": {"$ref": "qmk.definitions.v1#/mcu_pin"},
+ "esc_input": {"$ref": "qmk.definitions.v1#/mcu_pin"},
+ "led": {"$ref": "qmk.definitions.v1#/mcu_pin"},
+ "speaker": {"$ref": "qmk.definitions.v1#/mcu_pin"}
}
}
}
diff --git a/docs/_summary.md b/docs/_summary.md
index 9798ef5127..6c39aeda09 100644
--- a/docs/_summary.md
+++ b/docs/_summary.md
@@ -77,6 +77,7 @@
* [Combos](feature_combo.md)
* [Debounce API](feature_debounce_type.md)
* [Key Lock](feature_key_lock.md)
+ * [Key Overrides](feature_key_overrides.md)
* [Layers](feature_layers.md)
* [One Shot Keys](one_shot_keys.md)
* [Pointing Device](feature_pointing_device.md)
@@ -93,6 +94,7 @@
* Hardware Features
* Displays
* [HD44780 LCD Controller](feature_hd44780.md)
+ * [ST7565 LCD Driver](feature_st7565.md)
* [OLED Driver](feature_oled_driver.md)
* Lighting
* [Backlight](feature_backlight.md)
diff --git a/docs/breaking_changes.md b/docs/breaking_changes.md
index b0d56a81bd..a1a56bd457 100644
--- a/docs/breaking_changes.md
+++ b/docs/breaking_changes.md
@@ -100,3 +100,7 @@ This happens immediately after the previous `develop` branch is merged.
* [ ] `git pull --ff-only`
* [ ] `git merge --no-ff develop`
* [ ] `git push upstream master`
+
+## Post-merge operations
+
+* (Optional) [update ChibiOS + ChibiOS-Contrib on `develop`](chibios_upgrade_instructions.md)
diff --git a/docs/chibios_upgrade_instructions.md b/docs/chibios_upgrade_instructions.md
new file mode 100644
index 0000000000..40c2faafcf
--- /dev/null
+++ b/docs/chibios_upgrade_instructions.md
@@ -0,0 +1,56 @@
+# ChibiOS Upgrade Procedure
+
+ChibiOS and ChibiOS-Contrib need to be updated in tandem -- the latter has a branch tied to the ChibiOS version in use and should not be mixed with different versions.
+
+## Getting ChibiOS
+
+* `svn` Initialisation:
+ * Only needed to be done once
+ * You might need to separately install `git-svn` package in your OS's package manager
+ * `git svn init --stdlayout --prefix='svn/' http://svn.osdn.net/svnroot/chibios/`
+ * `git remote add qmk git@github.com:qmk/ChibiOS.git`
+* Updating:
+ * `git svn fetch`
+ * First time around this will take several hours
+ * Subsequent updates will be incremental only
+* Tagging example (work out which version first!):
+ * `git tag -a ver20.3.3 -m ver20.3.3 svn/tags/ver20.3.3`
+ * `git push qmk ver20.3.3`
+ * `git tag -a breaking_YYYY_qN -m breaking_YYYY_qN svn/tags/ver20.3.3`
+ * `git push qmk breaking_YYYY_qN`
+
+## Getting ChibiOS-Contrib
+
+* `git` Initialisation:
+ * `git clone git@github.com:qmk/ChibiOS-Contrib`
+ * `git remote add upstream https://github.com/ChibiOS/ChibiOS-Contrib`
+ * `git checkout -b chibios-20.3.x upstream/chibios-20.3.x`
+* Updating:
+ * `git fetch --all --tags --prune`
+ * `git checkout chibios-20.3.x`
+ * `git pull --ff-only`
+ * `git push origin chibios-20.3.x`
+ * `git tag -a breaking_YYYY_qN -m breaking_YYYY_qN chibios-20.3.x`
+ * `git push origin breaking_YYYY_qN`
+
+## Updating submodules
+
+* Update the submodules
+ * `cd $QMK_FIRMWARE`
+ * `git checkout develop`
+ * `git pull --ff-only`
+ * `git checkout -b chibios-version-bump`
+ * `cd lib/chibios`
+ * `git fetch --all --tags --prune`
+ * `git checkout breaking_YYYY_qN`
+ * `cd ../chibios-contrib`
+ * `git fetch --all --tags --prune`
+ * `git checkout breaking_YYYY_qN`
+* Build everything
+ * `cd $QMK_FIRMWARE`
+ * `qmk multibuild -j4`
+ * Make sure there are no errors
+* Push to the repo
+ * `git commit -am 'Update ChibiOS to XXXXXXXXX'`
+ * `git push --set-upstream origin chibios-version-bump`
+* Make a PR to qmk_firmware with the new branch \ No newline at end of file
diff --git a/docs/cli_commands.md b/docs/cli_commands.md
index 581342093a..e30593daa9 100644
--- a/docs/cli_commands.md
+++ b/docs/cli_commands.md
@@ -368,7 +368,7 @@ qmk generate-docs
## `qmk generate-rgb-breathe-table`
-This command generates a lookup table (LUT) header file for the [RGB Lighting](feature_rgblight.md) feature's breathing animation. Place this file in your keyboard or keymap directory as `rgblight_breathe_table.h` to override the default LUT in `quantum/`.
+This command generates a lookup table (LUT) header file for the [RGB Lighting](feature_rgblight.md) feature's breathing animation. Place this file in your keyboard or keymap directory as `rgblight_breathe_table.h` to override the default LUT in `quantum/rgblight/`.
**Usage**:
diff --git a/docs/compatible_microcontrollers.md b/docs/compatible_microcontrollers.md
index 0f5b140de0..865b29feec 100644
--- a/docs/compatible_microcontrollers.md
+++ b/docs/compatible_microcontrollers.md
@@ -31,6 +31,8 @@ You can also use any ARM chip with USB that [ChibiOS](https://www.chibios.org) s
* [STM32F446](https://www.st.com/en/microcontrollers-microprocessors/stm32f446.html)
* [STM32G431](https://www.st.com/en/microcontrollers-microprocessors/stm32g4x1.html)
* [STM32G474](https://www.st.com/en/microcontrollers-microprocessors/stm32g4x4.html)
+ * [STM32L412](https://www.st.com/en/microcontrollers-microprocessors/stm32l4x2.html)
+ * [STM32L422](https://www.st.com/en/microcontrollers-microprocessors/stm32l4x2.html)
* [STM32L433](https://www.st.com/en/microcontrollers-microprocessors/stm32l4x3.html)
* [STM32L443](https://www.st.com/en/microcontrollers-microprocessors/stm32l4x3.html)
diff --git a/docs/config_options.md b/docs/config_options.md
index d0f0b316e0..0c98b31010 100644
--- a/docs/config_options.md
+++ b/docs/config_options.md
@@ -51,8 +51,10 @@ This is a C header file that is one of the first things included, and will persi
* the number of columns in your keyboard's matrix
* `#define MATRIX_ROW_PINS { D0, D5, B5, B6 }`
* pins of the rows, from top to bottom
+ * may be omitted by the keyboard designer if matrix reads are handled in an alternate manner. See [low-level matrix overrides](custom_quantum_functions.md?id=low-level-matrix-overrides) for more information.
* `#define MATRIX_COL_PINS { F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7 }`
* pins of the columns, from left to right
+ * may be omitted by the keyboard designer if matrix reads are handled in an alternate manner. See [low-level matrix overrides](custom_quantum_functions.md?id=low-level-matrix-overrides) for more information.
* `#define MATRIX_IO_DELAY 30`
* the delay in microseconds when between changing matrix pin state and reading values
* `#define UNUSED_PINS { D1, D2, D3, B1, B2, B3 }`
@@ -193,6 +195,8 @@ If you define these options you will enable the associated feature, which may in
* Sets the delay between `register_code` and `unregister_code`, if you're having issues with it registering properly (common on VUSB boards). The value is in milliseconds.
* `#define TAP_HOLD_CAPS_DELAY 80`
* Sets the delay for Tap Hold keys (`LT`, `MT`) when using `KC_CAPSLOCK` keycode, as this has some special handling on MacOS. The value is in milliseconds, and defaults to 80 ms if not defined. For macOS, you may want to set this to 200 or higher.
+* `#define KEY_OVERRIDE_REPEAT_DELAY 500`
+ * Sets the key repeat interval for [key overrides](feature_key_overrides.md).
## RGB Light Configuration
@@ -272,7 +276,7 @@ There are a few different ways to set handedness for split keyboards (listed in
### Other Options
* `#define USE_I2C`
- * For using I2C instead of Serial (defaults to serial)
+ * For using I2C instead of Serial (default is serial; serial transport is supported on ARM -- I2C is AVR-only)
* `#define SOFT_SERIAL_PIN D0`
* When using serial, define this. `D0` or `D1`,`D2`,`D3`,`E6`.
@@ -280,6 +284,7 @@ There are a few different ways to set handedness for split keyboards (listed in
* `#define MATRIX_ROW_PINS_RIGHT { <row pins> }`
* `#define MATRIX_COL_PINS_RIGHT { <col pins> }`
* If you want to specify a different pinout for the right half than the left half, you can define `MATRIX_ROW_PINS_RIGHT`/`MATRIX_COL_PINS_RIGHT`. Currently, the size of `MATRIX_ROW_PINS` must be the same as `MATRIX_ROW_PINS_RIGHT` and likewise for the definition of columns.
+ * may be omitted by the keyboard designer if matrix reads are handled in an alternate manner. See [low-level matrix overrides](custom_quantum_functions.md?id=low-level-matrix-overrides) for more information.
* `#define DIRECT_PINS_RIGHT { { F1, F0, B0, C7 }, { F4, F5, F6, F7 } }`
* If you want to specify a different direct pinout for the right half than the left half, you can define `DIRECT_PINS_RIGHT`. Currently, the size of `DIRECT_PINS` must be the same as `DIRECT_PINS_RIGHT`.
@@ -300,7 +305,7 @@ There are a few different ways to set handedness for split keyboards (listed in
* `#define SPLIT_USB_DETECT`
* Detect (with timeout) USB connection when delegating master/slave
* Default behavior for ARM
- * Required for AVR Teensy
+ * Required for AVR Teensy (without hardware mods)
* `#define SPLIT_USB_TIMEOUT 2000`
* Maximum timeout when detecting master/slave when using `SPLIT_USB_DETECT`
@@ -308,6 +313,28 @@ There are a few different ways to set handedness for split keyboards (listed in
* `#define SPLIT_USB_TIMEOUT_POLL 10`
* Poll frequency when detecting master/slave when using `SPLIT_USB_DETECT`
+* `#define FORCED_SYNC_THROTTLE_MS 100`
+ * Deadline for synchronizing data from master to slave when using the QMK-provided split transport.
+
+* `#define SPLIT_TRANSPORT_MIRROR`
+ * Mirrors the master-side matrix on the slave when using the QMK-provided split transport.
+
+* `#define SPLIT_LAYER_STATE_ENABLE`
+ * Ensures the current layer state is available on the slave when using the QMK-provided split transport.
+
+* `#define SPLIT_LED_STATE_ENABLE`
+ * Ensures the current host indicator state (caps/num/scroll) is available on the slave when using the QMK-provided split transport.
+
+* `#define SPLIT_MODS_ENABLE`
+ * Ensures the current modifier state (normal, weak, and oneshot) is available on the slave when using the QMK-provided split transport.
+
+* `#define SPLIT_WPM_ENABLE`
+ * Ensures the current WPM is available on the slave when using the QMK-provided split transport.
+
+* `#define SPLIT_TRANSACTION_IDS_KB .....`
+* `#define SPLIT_TRANSACTION_IDS_USER .....`
+ * Allows for custom data sync with the slave when using the QMK-provided split transport. See [custom data sync between sides](feature_split_keyboard.md#custom-data-sync) for more information.
+
# The `rules.mk` File
This is a [make](https://www.gnu.org/software/make/manual/make.html) file that is included by the top-level `Makefile`. It is used to set some information about the MCU that we will be compiling for as well as enabling and disabling certain features.
@@ -375,6 +402,8 @@ Use these to enable or disable building certain features. The more you have enab
* USB N-Key Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
* `AUDIO_ENABLE`
* Enable the audio subsystem.
+* `KEY_OVERRIDE_ENABLE`
+ * Enable the key override feature
* `RGBLIGHT_ENABLE`
* Enable keyboard underlight functionality
* `LEADER_ENABLE`
diff --git a/docs/custom_quantum_functions.md b/docs/custom_quantum_functions.md
index 694b421e79..30c637bb49 100644
--- a/docs/custom_quantum_functions.md
+++ b/docs/custom_quantum_functions.md
@@ -144,6 +144,14 @@ This is useful for setting up stuff that you may need elsewhere, but isn't hardw
* Keyboard/Revision: `void matrix_init_kb(void)`
* Keymap: `void matrix_init_user(void)`
+### Low-level Matrix Overrides Function Documentation :id=low-level-matrix-overrides
+
+* GPIO pin initialisation: `void matrix_init_pins(void)`
+ * This needs to perform the low-level initialisation of all row and column pins. By default this will initialise the input/output state of each of the GPIO pins listed in `MATRIX_ROW_PINS` and `MATRIX_COL_PINS`, based on whether or not the keyboard is set up for `ROW2COL`, `COL2ROW`, or `DIRECT_PINS`. Should the keyboard designer override this function, no initialisation of pin state will occur within QMK itself, instead deferring to the keyboard's override.
+* `COL2ROW`-based row reads: `void matrix_read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col)`
+* `ROW2COL`-based column reads: `void matrix_read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)`
+* `DIRECT_PINS`-based reads: `void matrix_read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)`
+ * These three functions need to perform the low-level retrieval of matrix state of relevant input pins, based on the matrix type. Only one of the functions should be implemented, if needed. By default this will iterate through `MATRIX_ROW_PINS` and `MATRIX_COL_PINS`, configuring the inputs and outputs based on whether or not the keyboard is set up for `ROW2COL`, `COL2ROW`, or `DIRECT_PINS`. Should the keyboard designer override this function, no manipulation of matrix GPIO pin state will occur within QMK itself, instead deferring to the keyboard's override.
## Keyboard Post Initialization code
diff --git a/docs/eeprom_driver.md b/docs/eeprom_driver.md
index e2c262546d..6dcf10c04d 100644
--- a/docs/eeprom_driver.md
+++ b/docs/eeprom_driver.md
@@ -31,6 +31,9 @@ Currently QMK supports 24xx-series chips over I2C. As such, requires a working i
`#define EXTERNAL_EEPROM_PAGE_SIZE` | Page size of the EEPROM in bytes, as specified in the datasheet | 32
`#define EXTERNAL_EEPROM_ADDRESS_SIZE` | The number of bytes to transmit for the memory location within the EEPROM | 2
`#define EXTERNAL_EEPROM_WRITE_TIME` | Write cycle time of the EEPROM, as specified in the datasheet | 5
+`#define EXTERNAL_EEPROM_WP_PIN` | If defined the WP pin will be toggled appropriately when writing to the EEPROM. | _none_
+
+Some I2C EEPROM manufacturers explicitly recommend against hardcoding the WP pin to ground. This is in order to protect the eeprom memory content during power-up/power-down/brown-out conditions at low voltage where the eeprom is still operational, but the i2c master output might be unpredictable. If a WP pin is configured, then having an external pull-up on the WP pin is recommended.
Default values and extended descriptions can be found in `drivers/eeprom/eeprom_i2c.h`.
diff --git a/docs/feature_debounce_type.md b/docs/feature_debounce_type.md
index 3ad74224c1..306185fe83 100644
--- a/docs/feature_debounce_type.md
+++ b/docs/feature_debounce_type.md
@@ -121,16 +121,16 @@ DEBOUNCE_TYPE = <name of algorithm>
Where name of algorithm is one of:
* ```sym_defer_g``` - debouncing per keyboard. On any state change, a global timer is set. When ```DEBOUNCE``` milliseconds of no changes has occurred, all input changes are pushed.
* This is the current default algorithm. This is the highest performance algorithm with lowest memory usage, and it's also noise-resistant.
-* ```sym_eager_pr``` - debouncing per row. On any state change, response is immediate, followed by locking the row ```DEBOUNCE``` milliseconds of no further input for that row.
+* ```sym_eager_pr``` - debouncing per row. On any state change, response is immediate, followed by locking the row ```DEBOUNCE``` milliseconds of no further input for that row.
For use in keyboards where refreshing ```NUM_KEYS``` 8-bit counters is computationally expensive / low scan rate, and fingers usually only hit one row at a time. This could be
appropriate for the ErgoDox models; the matrix is rotated 90°, and hence its "rows" are really columns, and each finger only hits a single "row" at a time in normal use.
* ```sym_eager_pk``` - debouncing per key. On any state change, response is immediate, followed by ```DEBOUNCE``` milliseconds of no further input for that key
* ```sym_defer_pk``` - debouncing per key. On any state change, a per-key timer is set. When ```DEBOUNCE``` milliseconds of no changes have occurred on that key, the key status change is pushed.
+* ```asym_eager_defer_pk``` - debouncing per key. On a key-down state change, response is immediate, followed by ```DEBOUNCE``` milliseconds of no further input for that key. On a key-up state change, a per-key timer is set. When ```DEBOUNCE``` milliseconds of no changes have occurred on that key, the key-up status change is pushed.
### A couple algorithms that could be implemented in the future:
* ```sym_defer_pr```
* ```sym_eager_g```
-* ```asym_eager_defer_pk```
### Use your own debouncing code
You have the option to implement you own debouncing algorithm. To do this:
diff --git a/docs/feature_dip_switch.md b/docs/feature_dip_switch.md
index 15e449c4c4..5e8c19bfa7 100644
--- a/docs/feature_dip_switch.md
+++ b/docs/feature_dip_switch.md
@@ -23,8 +23,9 @@ or
The callback functions can be inserted into your `<keyboard>.c`:
```c
-void dip_switch_update_kb(uint8_t index, bool active) {
- dip_switch_update_user(index, active);
+bool dip_switch_update_kb(uint8_t index, bool active) {
+ if !(dip_switch_update_user(index, active)) { return false; }
+ return true;
}
```
@@ -32,7 +33,7 @@ void dip_switch_update_kb(uint8_t index, bool active) {
or `keymap.c`:
```c
-void dip_switch_update_user(uint8_t index, bool active) {
+bool dip_switch_update_user(uint8_t index, bool active) {
switch (index) {
case 0:
if(active) { audio_on(); } else { audio_off(); }
@@ -57,6 +58,7 @@ void dip_switch_update_user(uint8_t index, bool active) {
}
break;
}
+ return true;
}
```
@@ -64,8 +66,9 @@ Additionally, we support bit mask functions which allow for more complex handlin
```c
-void dip_switch_update_mask_kb(uint32_t state) {
- dip_switch_update_mask_user(state);
+bool dip_switch_update_mask_kb(uint32_t state) {
+ if (!dip_switch_update_mask_user(state)) { return false; }
+ return true;
}
```
@@ -73,7 +76,7 @@ void dip_switch_update_mask_kb(uint32_t state) {
or `keymap.c`:
```c
-void dip_switch_update_mask_user(uint32_t state) {
+bool dip_switch_update_mask_user(uint32_t state) {
if (state & (1UL<<0) && state & (1UL<<1)) {
layer_on(_ADJUST); // C on esc
} else {
@@ -89,6 +92,7 @@ void dip_switch_update_mask_user(uint32_t state) {
} else {
layer_off(_TEST_B);
}
+ return true;
}
```
diff --git a/docs/feature_haptic_feedback.md b/docs/feature_haptic_feedback.md
index a092e784c7..469c9c7981 100644
--- a/docs/feature_haptic_feedback.md
+++ b/docs/feature_haptic_feedback.md
@@ -162,4 +162,28 @@ This will set what sequence HPT_RST will set as the active mode. If not defined,
### DRV2605L Continuous Haptic Mode
-This mode sets continuous haptic feedback with the option to increase or decrease strength.
+This mode sets continuous haptic feedback with the option to increase or decrease strength.
+
+## Haptic Key Exclusion
+The Haptic Exclusion is implemented as `__attribute__((weak)) bool get_haptic_enabled_key(uint16_t keycode, keyrecord_t *record)` in haptic.c. This allows a re-definition at the required level with the specific requirement / exclusion.
+
+### NO_HAPTIC_MOD
+With the entry of `#define NO_HAPTIC_MOD` in config.h, modifiers from Left Control to Right GUI will not trigger a feedback. This also includes modifiers in a Mod Tap configuration.
+
+### NO_HAPTIC_FN
+With the entry of `#define NO_HAPTIC_FN` in config.h, layer keys will not rigger a feedback.
+
+### NO_HAPTIC_ALPHA
+With the entry of `#define NO_HAPTIC_ALPHA` in config.h, none of the alpha keys (A ... Z) will trigger a feedback.
+
+### NO_HAPTIC_PUNCTUATION
+With the entry of `#define NO_HAPTIC_PUNCTUATION` in config.h, none of the following keys will trigger a feedback: Enter, ESC, Backspace, Space, Minus, Equal, Left Bracket, Right Bracket, Backslash, Non-US Hash, Semicolon, Quote, Grave, Comma, Slash, Dot, Non-US Backslash.
+
+### NO_HAPTIC_LOCKKEYS
+With the entry of `#define NO_HAPTIC_LOCKKEYS` in config.h, none of the following keys will trigger a feedback: Caps Lock, Scroll Lock, Num Lock.
+
+### NO_HAPTIC_NAV
+With the entry of `#define NO_HAPTIC_NAV` in config.h, none of the following keys will trigger a feedback: Print Screen, Pause, Insert, Delete, Page Down, Page Up, Left Arrow, Up Arrow, Right Arrow, Down Arrow, End, Home.
+
+### NO_HAPTIC_NUMERIC
+With the entry of `#define NO_HAPTIC_NUMERIC` in config.h, none of the following keys between 0 and 9 (KC_1 ... KC_0) will trigger a feedback. \ No newline at end of file
diff --git a/docs/feature_key_overrides.md b/docs/feature_key_overrides.md
new file mode 100644
index 0000000000..861c4bef5d
--- /dev/null
+++ b/docs/feature_key_overrides.md
@@ -0,0 +1,229 @@
+# Key Overrides
+
+Key overrides allow you to override modifier-key combinations to send a different modifier-key combination or perform completely custom actions. Don't want `shift` + `1` to type `!` on your computer? Use a key override to make your keyboard type something different when you press `shift` + `1`. The general behavior is like this: If `modifiers w` + `key x` are pressed, replace these keys with `modifiers y` + `key z` in the keyboard report.
+
+You can use key overrides in a similar way to momentary layer/fn keys to activate custom keycodes/shortcuts, with a number of benefits: You completely keep the original use of the modifier keys, while being able to save space by removing fn keys from your keyboard. You can also easily configure _combinations of modifiers_ to trigger different actions than individual modifiers, and much more. The possibilities are quite vast and this documentation contains a few examples for inspiration throughout.
+
+##### A few more examples to get started: You could use key overrides to...
+- Send `brightness up/down` when pressing `ctrl` + `volume up/down`.
+- Send `delete` when pressing `shift` + `backspace`.
+- Create custom shortcuts or change existing ones: E.g. Send `ctrl`+`shift`+`z` when `ctrl`+`y` is pressed.
+- Run custom code when `ctrl` + `alt` + `esc` is pressed.
+
+## Setup
+
+To enable this feature, you need to add `KEY_OVERRIDE_ENABLE = yes` to your `rules.mk`.
+
+Then, in your `keymap.c` file, you'll need to define the array `key_overrides`, which defines all key overrides to be used. Each override is a value of type `key_override_t`. The array `key_overrides` is `NULL`-terminated and contains pointers to `key_override_t` values (`const key_override_t **`).
+
+## Creating Key Overrides
+
+The `key_override_t` struct has many options that allow you to precisely tune your overrides. The full reference is shown below. Instead of manually creating a `key_override_t` value, it is recommended to use these dedicated initializers:
+
+#### `ko_make_basic(modifiers, key, replacement)`
+Returns a `key_override_t`, which sends `replacement` (can be a key-modifer combination), when `key` and `modifiers` are all pressed down. This override still activates if any additional modifiers not specified in `modifiers` are also pressed down. See `ko_make_with_layers_and_negmods` to customize this behavior.
+
+#### `ko_make_with_layers(modifiers, key, replacement, layers)`
+Additionally takes a bitmask `layers` that defines on which layers the override is used.
+
+#### `ko_make_with_layers_and_negmods(modifiers, key, replacement, layers, negative_mods)`
+Additionally takes a bitmask `negative_mods` that defines which modifiers may not be pressed for this override to activate.
+
+#### `ko_make_with_layers_negmods_and_options(modifiers, key, replacement, layers, negative_mods, options)`
+Additionally takes a bitmask `options` that specifies additional options. See `ko_option_t` for available options.
+
+For more customization possibilities, you may directly create a `key_override_t`, which allows you to customize even more behavior. Read further below for details and examples.
+
+## Simple Example
+
+This shows how the mentioned example of sending `delete` when `shift` + `backspace` are pressed is realized:
+
+```c
+const key_override_t delete_key_override = ko_make_basic(MOD_MASK_SHIFT, KC_BSPACE, KC_DELETE);
+
+// This globally defines all key overrides to be used
+const key_override_t **key_overrides = (const key_override_t *[]){
+ &delete_key_override,
+ NULL // Null terminate the array of overrides!
+};
+```
+
+## Intermediate Difficulty Examples
+
+### Media Controls & Screen Brightness
+
+In this example a single key is configured to control media, volume and screen brightness by using key overrides.
+
+- The key is set to send `play/pause` in the keymap.
+
+The following key overrides will be configured:
+
+- `Ctrl` + `play/pause` will send `next track`.
+- `Ctrl` + `Shift` + `play/pause` will send `previous track`.
+- `Alt` + `play/pause` will send `volume up`.
+- `Alt` + `Shift` + `play/pause` will send `volume down`.
+- `Ctrl` + `Alt` + `play/pause` will send `brightness up`.
+- `Ctrl` + `Alt` + `Shift` + `play/pause` will send `brightness down`.
+
+
+```c
+const key_override_t next_track_override =
+ ko_make_with_layers_negmods_and_options(
+ MOD_MASK_CTRL, // Trigger modifiers: ctrl
+ KC_MPLY, // Trigger key: play/pause
+ KC_MNXT, // Replacement key
+ ~0, // Activate on all layers
+ MOD_MASK_SA, // Do not activate when shift or alt are pressed
+ ko_option_no_reregister_trigger); // Specifies that the play key is not registered again after lifting ctrl
+
+const key_override_t prev_track_override = ko_make_with_layers_negmods_and_options(MOD_MASK_CS, KC_MPLY,
+ KC_MPRV, ~0, MOD_MASK_ALT, ko_option_no_reregister_trigger);
+
+const key_override_t vol_up_override = ko_make_with_layers_negmods_and_options(MOD_MASK_ALT, KC_MPLY,
+ KC_VOLU, ~0, MOD_MASK_CS, ko_option_no_reregister_trigger);
+
+const key_override_t vol_down_override = ko_make_with_layers_negmods_and_options(MOD_MASK_SA, KC_MPLY,
+ KC_VOLD, ~0, MOD_MASK_CTRL, ko_option_no_reregister_trigger);
+
+const key_override_t brightness_up_override = ko_make_with_layers_negmods_and_options(MOD_MASK_CA, KC_MPLY,
+ KC_BRIU, ~0, MOD_MASK_SHIFT, ko_option_no_reregister_trigger);
+
+const key_override_t brightness_down_override = ko_make_basic(MOD_MASK_CSA, KC_MPLY, KC_BRID);
+
+// This globally defines all key overrides to be used
+const key_override_t **key_overrides = (const key_override_t *[]){
+ &next_track_override,
+ &prev_track_override,
+ &vol_up_override,
+ &vol_down_override,
+ &brightness_up_override,
+ &brightness_down_override,
+ NULL
+};
+```
+
+### Flexible macOS-friendly Grave Escape
+The [Grave Escape feature](https://docs.qmk.fm/using-qmk/advanced-keycodes/feature_grave_esc) is limited in its configurability and has [bugs when used on macOS](https://docs.qmk.fm/using-qmk/advanced-keycodes/feature_grave_esc#caveats). Key overrides can be used to achieve a similar functionality as Grave Escape, but with more customization and without bugs on macOS.
+
+```c
+// Shift + esc = ~
+const key_override_t tilde_esc_override = ko_make_basic(MOD_MASK_SHIFT, KC_ESC, S(KC_GRAVE));
+
+// GUI + esc = `
+const key_override_t grave_esc_override = ko_make_basic(MOD_MASK_GUI, KC_ESC, KC_GRAVE);
+
+const key_override_t **key_overrides = (const key_override_t *[]){
+ &tilde_esc_override,
+ &grave_esc_override,
+ NULL
+};
+```
+
+In addition to not encountering unexpected bugs on macOS, you can also change the behavior as you wish. Instead setting `GUI` + `ESC` = `` ` `` you may change it to an arbitrary other modifier, for example `Ctrl` + `ESC` = `` ` ``.
+
+## Advanced Examples
+### Modifiers as Layer Keys
+
+Do you really need a dedicated key to toggle your fn layer? With key overrides, perhaps not. This example shows how you can configure to use `rGUI` + `rAlt` (right GUI and right alt) to access a momentary layer like an fn layer. With this you completely eliminate the need to use a dedicated layer key. Of course the choice of modifier keys can be changed as needed, `rGUI` + `rAlt` is just an example here.
+
+```c
+// This is called when the override activates and deactivates. Enable the fn layer on activation and disable on deactivation
+bool momentary_layer(bool key_down, void *layer) {
+ if (key_down) {
+ layer_on((uint8_t)(uintptr_t)layer);
+ } else {
+ layer_off((uint8_t)(uintptr_t)layer);
+ }
+
+ return false;
+}
+
+const key_override_t fn_override = {.trigger_mods = MOD_BIT(KC_RGUI) | MOD_BIT(KC_RCTL), //
+ .layers = ~(1 << LAYER_FN), //
+ .suppressed_mods = MOD_BIT(KC_RGUI) | MOD_BIT(KC_RCTL), //
+ .options = ko_option_no_unregister_on_other_key_down, //
+ .negative_mod_mask = (uint8_t) ~(MOD_BIT(KC_RGUI) | MOD_BIT(KC_RCTL)), //
+ .custom_action = momentary_layer, //
+ .context = (void *)LAYER_FN, //
+ .trigger = KC_NO, //
+ .replacement = KC_NO, //
+ .enabled = NULL};
+```
+
+## Keycodes
+
+You can enable, disable and toggle all key overrides on the fly.
+
+|Keycode |Description |Function Equivalent|
+|----------|---------------------------------|--------|
+|`KEY_OVERRIDE_ON` |Turns on Key Override feature | `key_override_on(void)`|
+|`KEY_OVERRIDE_OFF` |Turns off Key Override feature |`key_override_off(void)`|
+|`KEY_OVERRIDE_TOGGLE` |Toggles Key Override feature on and off |`key_override_toggle(void)`|
+
+## Reference for `key_override_t`
+
+Advanced users may need more customization than what is offered by the simple `ko_make` initializers. For this, directly create a `key_override_t` value and set all members. Below is a reference for all members of `key_override_t`.
+
+| Member | Description |
+|--------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| `uint16_t trigger` | The non-modifier keycode that triggers the override. This keycode, and the necessary modifiers (`trigger_mods`) must be pressed to activate this override. Set this to the keycode of the key that should activate the override. Set to `KC_NO` to require only the necessary modifiers to be pressed and no non-modifier. |
+| `uint8_t trigger_mods` | Which mods need to be down for activation. If both sides of a modifier are set (e.g. left ctrl and right ctrl) then only one is required to be pressed (e.g. left ctrl suffices). Use the `MOD_MASK_XXX` and `MOD_BIT()` macros for this. |
+| `layer_state_t layers` | This is a BITMASK (!), defining which layers this override applies to. To use this override on layer i set the ith bit `(1 << i)`. |
+| `uint8_t negative_mod_mask` | Which modifiers cannot be down. It must hold that `(active_modifiers & negative_mod_mask) == 0`, otherwise the key override will not be activated. An active override will be deactivated once this is no longer true. |
+| `uint8_t suppressed_mods` | Modifiers to 'suppress' while the override is active. To suppress a modifier means that even though the modifier key is held down, the host OS sees the modifier as not pressed. Can be used to suppress the trigger modifiers, as a trivial example. |
+| `uint16_t replacement` | The complex keycode to send as replacement when this override is triggered. This can be a simple keycode, a key-modifier combination (e.g. `C(KC_A)`), or `KC_NO` (to register no replacement keycode). Use in combination with suppressed_mods to get the correct modifiers to be sent. |
+| `ko_option_t options` | Options controlling the behavior of the override, such as what actions are allowed to activate the override. |
+| `bool (*custom_action)(bool activated, void *context)` | If not NULL, this function will be called right before the replacement key is registered, along with the provided context and a flag indicating whether the override was activated or deactivated. This function allows you to run some custom actions for specific key overrides. If you return `false`, the replacement key is not registered/unregistered as it would normally. Return `true` to register and unregister the override normally. |
+| `void *context` | A context that will be passed to the custom action function. |
+| `bool *enabled` | If this points to false this override will not be used. Set to NULL to always have this override enabled. |
+
+### Reference for `ko_option_t`
+
+Bitfield with various options controlling the behavior of a key override.
+
+| Value | Description |
+|------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| `ko_option_activation_trigger_down` | Allow activating when the trigger key is pressed down. |
+| `ko_option_activation_required_mod_down` | Allow activating when a necessary modifier is pressed down. |
+| `ko_option_activation_negative_mod_up` | Allow activating when a negative modifier is released. |
+| `ko_option_one_mod` | If set, any of the modifiers in `trigger_mods` will be enough to activate the override (logical OR of modifiers). If not set, all the modifiers in `trigger_mods` have to be pressed (logical AND of modifiers). |
+| `ko_option_no_unregister_on_other_key_down` | If set, the override will not deactivate when another key is pressed down. Use only if you really know you need this. |
+| `ko_option_no_reregister_trigger` | If set, the trigger key will never be registered again after the override is deactivated. |
+| `ko_options_default` | The default options used by the `ko_make_xxx` functions |
+
+## For Advanced Users: Inner Workings
+
+This section explains how a key override works in detail, explaining where each member of `key_override_t` comes into play. Understanding this is essential to be able to take full advantage of all the options offered by key overrides.
+
+#### Activation
+
+When the necessary keys are pressed (`trigger_mods` + `trigger`), the override is 'activated' and the replacement key is registered in the keyboard report (`replacement`), while the `trigger` key is removed from the keyboard report. The trigger modifiers may also be removed from the keyboard report upon activation of an override (`suppressed_mods`). The override will not activate if any of the `negative_modifiers` are pressed.
+
+Overrides can activate in three different cases:
+
+1. The trigger key is pressed down and necessary modifiers are already down.
+2. A necessary modifier is pressed down, while the trigger key and other necessary modifiers are already down.
+3. A negative modifier is released, while all necessary modifiers and the trigger key are already down.
+
+Use the `option` member to customize which of these events are allowed to activate your overrides (default: all three).
+
+In any case, a key override can only activate if the `trigger` key is the _last_ non-modifier key that was pressed down. This emulates the behavior of how standard OSes (macOS, Windows, Linux) handle normal key input (to understand: Hold down `a`, then also hold down `b`, then hold down `shift`; `B` will be typed but not `A`).
+
+#### Deactivation
+
+An override is 'deactivated' when one of the trigger keys (`trigger_mods`, `trigger`) is lifted, another non-modifier key is pressed down, or one of the `negative_modifiers` is pressed down. When an override deactivates, the `replacement` key is removed from the keyboard report, while the `suppressed_mods` that are still held down are re-added to the keyboard report. By default, the `trigger` key is re-added to the keyboard report if it is still held down and no other non-modifier key has been pressed since. This again emulates the behavior of how standard OSes handle normal key input (To understand: hold down `a`, then also hold down `b`, then also `shift`, then release `b`; `A` will not be typed even though you are holding the `a` and `shift` keys). Use the `option` field `ko_option_no_reregister_trigger` to prevent re-registering the trigger key in all cases.
+
+#### Key Repeat Delay
+
+A third way in which standard OS-handling of modifier-key input is emulated in key overrides is with a ['key repeat delay'](https://www.dummies.com/computers/pcs/set-your-keyboards-repeat-delay-and-repeat-rate/). To explain what this is, let's look at how normal keyboard input is handled by mainstream OSes again: If you hold down `a`, followed by `shift`, you will see the letter `a` is first typed, then for a short moment nothing is typed and then repeating `A`s are typed. Take note that, although shift is pressed down just after `a` is pressed, it takes a moment until `A` is typed. This is caused by the aforementioned key repeat delay, and it is a feature that prevents unwanted repeated characters from being typed.
+
+This applies equally to releasing a modifier: When you hold `shift`, then press `a`, the letter `A` is typed. Now if you release `shift` first, followed by `a` shortly after, you will not see the letter `a` being typed, even though for a short moment of time you were just holding down the key `a`. This is because no modified characters are typed until the key repeat delay has passed.
+
+ This exact behavior is implemented in key overrides as well: If a key override for `shift` + `a` = `b` exists, and `a` is pressed and held, followed by `shift`, you will not immediately see the letter `b` being typed. Instead, this event is deferred for a short moment, until the key repeat delay has passed, measured from the moment when the trigger key (`a`) was pressed down.
+
+The duration of the key repeat delay is controlled with the `KEY_OVERRIDE_REPEAT_DELAY` macro. Define this value in your `config.h` file to change it. It is 500ms by default.
+
+
+## Difference to Combos
+
+Note that key overrides are very different from [combos](https://docs.qmk.fm/#/feature_combo). Combos require that you press down several keys almost _at the same time_ and can work with any combination of non-modifier keys. Key overrides work like keyboard shortcuts (e.g. `ctrl` + `z`): They take combinations of _multiple_ modifiers and _one_ non-modifier key to then perform some custom action. Key overrides are implemented with much care to behave just like normal keyboard shortcuts would in regards to the order of pressed keys, timing, and interacton with other pressed keys. There are a number of optional settings that can be used to really fine-tune the behavior of each key override as well. Using key overrides also does not delay key input for regular key presses, which inherently happens in combos and may be undesirable.
diff --git a/docs/feature_oled_driver.md b/docs/feature_oled_driver.md
index f3b659b1bc..c90aabb9c6 100644
--- a/docs/feature_oled_driver.md
+++ b/docs/feature_oled_driver.md
@@ -346,6 +346,10 @@ bool oled_scroll_left(void);
// Returns true if the screen was not scrolling or stops scrolling
bool oled_scroll_off(void);
+// Inverts the display
+// Returns true if the screen was or is inverted
+bool oled_invert(bool invert);
+
// Returns the maximum number of characters that will fit on a line
uint8_t oled_max_chars(void);
diff --git a/docs/feature_rgb_matrix.md b/docs/feature_rgb_matrix.md
index 08d5c9c4c6..f3e25f2f13 100644
--- a/docs/feature_rgb_matrix.md
+++ b/docs/feature_rgb_matrix.md
@@ -145,9 +145,22 @@ There is basic support for addressable RGB matrix lighting with the I2C IS31FL37
RGB_MATRIX_ENABLE = yes
RGB_MATRIX_DRIVER = IS31FL3737
```
+You can use between 1 and 2 IS31FL3737 IC's. Do not specify `DRIVER_ADDR_2` define for second IC if not present on your keyboard.
Configure the hardware via your `config.h`:
+| Variable | Description | Default |
+|----------|-------------|---------|
+| `ISSI_TIMEOUT` | (Optional) How long to wait for i2c messages, in milliseconds | 100 |
+| `ISSI_PERSISTENCE` | (Optional) Retry failed messages this many times | 0 |
+| `DRIVER_COUNT` | (Required) How many RGB driver IC's are present | |
+| `DRIVER_LED_TOTAL` | (Required) How many RGB lights are present across all drivers | |
+| `DRIVER_ADDR_1` | (Required) Address for the first RGB driver | |
+| `DRIVER_ADDR_2` | (Optional) Address for the second RGB driver | |
+
+
+Here is an example using 2 drivers.
+
```c
// This is a 7-bit address, that gets left-shifted and bit 0
// set to 0 for write, 1 for read (as per I2C protocol)
@@ -159,19 +172,21 @@ Configure the hardware via your `config.h`:
// ADDR represents A3:A0 of the 7-bit address.
// The result is: 0b101(ADDR)
#define DRIVER_ADDR_1 0b1010000
-#define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons.
+#define DRIVER_ADDR_2 0b1010001
#define DRIVER_COUNT 2
-#define DRIVER_1_LED_TOTAL 64
-#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
+#define DRIVER_1_LED_TOTAL 30
+#define DRIVER_2_LED_TOTAL 36
+#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
```
+!> Note the parentheses, this is so when `DRIVER_LED_TOTAL` is used in code and expanded, the values are added together before any additional math is applied to them. As an example, `rand() % (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)` will give very different results than `rand() % DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL`.
-Currently only a single drivers is supported, but it would be trivial to support all 4 combinations. For now define `DRIVER_ADDR_2` as `DRIVER_ADDR_1`
+Currently only 2 drivers are supported, but it would be trivial to support all 4 combinations.
Define these arrays listing all the LEDs in your `<keyboard>.c`:
```c
-const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
+const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
@@ -183,7 +198,7 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
}
```
-Where `X_Y` is the location of the LED in the matrix defined by [the datasheet](https://www.issi.com/WW/pdf/31FL3737.pdf) and the header file `drivers/issi/is31fl3737.h`. The `driver` is the index of the driver you defined in your `config.h` (Only `0` right now).
+Where `X_Y` is the location of the LED in the matrix defined by [the datasheet](https://www.issi.com/WW/pdf/31FL3737.pdf) and the header file `drivers/issi/is31fl3737.h`. The `driver` is the index of the driver you defined in your `config.h` (Only `0`, `1` for now).
---
@@ -228,6 +243,75 @@ Configure the hardware via your `config.h`:
```
---
+### AW20216 :id=aw20216
+There is basic support for addressable RGB matrix lighting with the SPI AW20216 RGB controller. To enable it, add this to your `rules.mk`:
+
+```makefile
+RGB_MATRIX_ENABLE = yes
+RGB_MATRIX_DRIVER = AW20216
+```
+
+You can use up to 2 AW20216 IC's. Do not specify `DRIVER_<N>_xxx` defines for IC's that are not present on your keyboard. You can define the following items in `config.h`:
+
+| Variable | Description | Default |
+|----------|-------------|---------|
+| `DRIVER_1_CS` | (Required) MCU pin connected to first RGB driver chip select line | B13 |
+| `DRIVER_2_CS` | (Optional) MCU pin connected to second RGB driver chip select line | |
+| `DRIVER_1_EN` | (Required) MCU pin connected to first RGB driver hardware enable line | C13 |
+| `DRIVER_2_EN` | (Optional) MCU pin connected to second RGB driver hardware enable line | |
+| `DRIVER_1_LED_TOTAL` | (Required) How many RGB lights are connected to first RGB driver | |
+| `DRIVER_2_LED_TOTAL` | (Optional) How many RGB lights are connected to second RGB driver | |
+| `DRIVER_COUNT` | (Required) How many RGB driver IC's are present | |
+| `DRIVER_LED_TOTAL` | (Required) How many RGB lights are present across all drivers | |
+| `AW_SCALING_MAX` | (Optional) LED current scaling value (0-255, higher values mean LED is brighter at full PWM) | 150 |
+| `AW_GLOBAL_CURRENT_MAX` | (Optional) Driver global current limit (0-255, higher values means the driver may consume more power) | 150 |
+| `AW_SPI_DIVISOR` | (Optional) Clock divisor for SPI communication (powers of 2, smaller numbers means faster communication, should not be less than 4) | 4 |
+
+Here is an example using 2 drivers.
+
+```c
+#define DRIVER_1_CS B13
+#define DRIVER_2_CS B14
+// Hardware enable lines may be connected to the same pin
+#define DRIVER_1_EN C13
+#define DRIVER_2_EN C13
+
+#define DRIVER_COUNT 2
+#define DRIVER_1_LED_TOTAL 66
+#define DRIVER_2_LED_TOTAL 32
+#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
+```
+
+!> Note the parentheses, this is so when `DRIVER_LED_TOTAL` is used in code and expanded, the values are added together before any additional math is applied to them. As an example, `rand() % (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)` will give very different results than `rand() % DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL`.
+
+Define these arrays listing all the LEDs in your `<keyboard>.c`:
+
+```c
+const aw_led g_aw_leds[DRIVER_LED_TOTAL] = {
+/* Each AW20216 channel is controlled by a register at some offset between 0x00
+ * and 0xD7 inclusive.
+ * See drivers/awinic/aw20216.h for the mapping between register offsets and
+ * driver pin locations.
+ * driver
+ * | R location
+ * | | G location
+ * | | | B location
+ * | | | | */
+ { 0, CS1_SW1, CS2_SW1, CS3_SW1 },
+ { 0, CS4_SW1, CS5_SW1, CS6_SW1 },
+ { 0, CS7_SW1, CS8_SW1, CS9_SW1 },
+ { 0, CS10_SW1, CS11_SW1, CS12_SW1 },
+ { 0, CS13_SW1, CS14_SW1, CS15_SW1 },
+ ...
+ { 1, CS1_SW1, CS2_SW1, CS3_SW1 },
+ { 1, CS13_SW1, CS14_SW1, CS15_SW1 },
+ { 1, CS16_SW1, CS17_SW1, CS18_SW1 },
+ { 1, CS4_SW2, CS5_SW2, CS6_SW2 },
+ ...
+};
+```
+
+---
## Common Configuration :id=common-configuration
@@ -485,28 +569,29 @@ For inspiration and examples, check out the built-in effects under `quantum/rgb_
These are shorthands to popular colors. The `RGB` ones can be passed to the `setrgb` functions, while the `HSV` ones to the `sethsv` functions.
-|RGB |HSV |
-|-------------------|-------------------|
-|`RGB_WHITE` |`HSV_WHITE` |
-|`RGB_RED` |`HSV_RED` |
-|`RGB_CORAL` |`HSV_CORAL` |
-|`RGB_ORANGE` |`HSV_ORANGE` |
-|`RGB_GOLDENROD` |`HSV_GOLDENROD` |
-|`RGB_GOLD` |`HSV_GOLD` |
-|`RGB_YELLOW` |`HSV_YELLOW` |
-|`RGB_CHARTREUSE` |`HSV_CHARTREUSE` |
-|`RGB_GREEN` |`HSV_GREEN` |
-|`RGB_SPRINGGREEN` |`HSV_SPRINGGREEN` |
-|`RGB_TURQUOISE` |`HSV_TURQUOISE` |
-|`RGB_TEAL` |`HSV_TEAL` |
-|`RGB_CYAN` |`HSV_CYAN` |
-|`RGB_AZURE` |`HSV_AZURE` |
-|`RGB_BLUE` |`HSV_BLUE` |
-|`RGB_PURPLE` |`HSV_PURPLE` |
-|`RGB_MAGENTA` |`HSV_MAGENTA` |
-|`RGB_PINK` |`HSV_PINK` |
-
-These are defined in [`rgblight_list.h`](https://github.com/qmk/qmk_firmware/blob/master/quantum/rgblight_list.h). Feel free to add to this list!
+|RGB |HSV |
+|---------------------|---------------------|
+|`RGB_AZURE` |`HSV_AZURE` |
+|`RGB_BLACK`/`RGB_OFF`|`HSV_BLACK`/`HSV_OFF`|
+|`RGB_BLUE` |`HSV_BLUE` |
+|`RGB_CHARTREUSE` |`HSV_CHARTREUSE` |
+|`RGB_CORAL` |`HSV_CORAL` |
+|`RGB_CYAN` |`HSV_CYAN` |
+|`RGB_GOLD` |`HSV_GOLD` |
+|`RGB_GOLDENROD` |`HSV_GOLDENROD` |
+|`RGB_GREEN` |`HSV_GREEN` |
+|`RGB_MAGENTA` |`HSV_MAGENTA` |
+|`RGB_ORANGE` |`HSV_ORANGE` |
+|`RGB_PINK` |`HSV_PINK` |
+|`RGB_PURPLE` |`HSV_PURPLE` |
+|`RGB_RED` |`HSV_RED` |
+|`RGB_SPRINGGREEN` |`HSV_SPRINGGREEN` |
+|`RGB_TEAL` |`HSV_TEAL` |
+|`RGB_TURQUOISE` |`HSV_TURQUOISE` |
+|`RGB_WHITE` |`HSV_WHITE` |
+|`RGB_YELLOW` |`HSV_YELLOW` |
+
+These are defined in [`color.h`](https://github.com/qmk/qmk_firmware/blob/master/quantum/color.h). Feel free to add to this list!
## Additional `config.h` Options :id=additional-configh-options
diff --git a/docs/feature_rgblight.md b/docs/feature_rgblight.md
index 994a014a28..d323dee4f7 100644
--- a/docs/feature_rgblight.md
+++ b/docs/feature_rgblight.md
@@ -119,7 +119,7 @@ if `RGBLIGHT_EFFECT_xxxx` or `RGBLIGHT_ANIMATIONS` is defined, you also have a n
Check out [this video](https://youtube.com/watch?v=VKrpPAHlisY) for a demonstration.
-Note: For versions older than 0.6.117, The mode numbers were written directly. In `quantum/rgblight.h` there is a contrast table between the old mode number and the current symbol.
+Note: For versions older than 0.6.117, The mode numbers were written directly. In `quantum/rgblight/rgblight.h` there is a contrast table between the old mode number and the current symbol.
### Effect and Animation Toggles
@@ -328,7 +328,7 @@ Normally lighting layers are not shown when RGB Lighting is disabled (e.g. with
## Functions
-If you need to change your RGB lighting in code, for example in a macro to change the color whenever you switch layers, QMK provides a set of functions to assist you. See [`rgblight.h`](https://github.com/qmk/qmk_firmware/blob/master/quantum/rgblight.h) for the full list, but the most commonly used functions include:
+If you need to change your RGB lighting in code, for example in a macro to change the color whenever you switch layers, QMK provides a set of functions to assist you. See [`rgblight.h`](https://github.com/qmk/qmk_firmware/blob/master/quantum/rgblight/rgblight.h) for the full list, but the most commonly used functions include:
### Utility Functions
|Function |Description |
@@ -449,26 +449,27 @@ rgblight_sethsv_at(HSV_GREEN, 2); // led 2
These are shorthands to popular colors. The `RGB` ones can be passed to the `setrgb` functions, while the `HSV` ones to the `sethsv` functions.
-|RGB |HSV |
-|-------------------|-------------------|
-|`RGB_WHITE` |`HSV_WHITE` |
-|`RGB_RED` |`HSV_RED` |
-|`RGB_CORAL` |`HSV_CORAL` |
-|`RGB_ORANGE` |`HSV_ORANGE` |
-|`RGB_GOLDENROD` |`HSV_GOLDENROD` |
-|`RGB_GOLD` |`HSV_GOLD` |
-|`RGB_YELLOW` |`HSV_YELLOW` |
-|`RGB_CHARTREUSE` |`HSV_CHARTREUSE` |
-|`RGB_GREEN` |`HSV_GREEN` |
-|`RGB_SPRINGGREEN` |`HSV_SPRINGGREEN` |
-|`RGB_TURQUOISE` |`HSV_TURQUOISE` |
-|`RGB_TEAL` |`HSV_TEAL` |
-|`RGB_CYAN` |`HSV_CYAN` |
-|`RGB_AZURE` |`HSV_AZURE` |
-|`RGB_BLUE` |`HSV_BLUE` |
-|`RGB_PURPLE` |`HSV_PURPLE` |
-|`RGB_MAGENTA` |`HSV_MAGENTA` |
-|`RGB_PINK` |`HSV_PINK` |
+|RGB |HSV |
+|---------------------|---------------------|
+|`RGB_AZURE` |`HSV_AZURE` |
+|`RGB_BLACK`/`RGB_OFF`|`HSV_BLACK`/`HSV_OFF`|
+|`RGB_BLUE` |`HSV_BLUE` |
+|`RGB_CHARTREUSE` |`HSV_CHARTREUSE` |
+|`RGB_CORAL` |`HSV_CORAL` |
+|`RGB_CYAN` |`HSV_CYAN` |
+|`RGB_GOLD` |`HSV_GOLD` |
+|`RGB_GOLDENROD` |`HSV_GOLDENROD` |
+|`RGB_GREEN` |`HSV_GREEN` |
+|`RGB_MAGENTA` |`HSV_MAGENTA` |
+|`RGB_ORANGE` |`HSV_ORANGE` |
+|`RGB_PINK` |`HSV_PINK` |
+|`RGB_PURPLE` |`HSV_PURPLE` |
+|`RGB_RED` |`HSV_RED` |
+|`RGB_SPRINGGREEN` |`HSV_SPRINGGREEN` |
+|`RGB_TEAL` |`HSV_TEAL` |
+|`RGB_TURQUOISE` |`HSV_TURQUOISE` |
+|`RGB_WHITE` |`HSV_WHITE` |
+|`RGB_YELLOW` |`HSV_YELLOW` |
```c
rgblight_setrgb(RGB_ORANGE);
@@ -477,7 +478,7 @@ rgblight_setrgb_at(RGB_GOLD, 3);
rgblight_sethsv_range(HSV_WHITE, 0, 6);
```
-These are defined in [`rgblight_list.h`](https://github.com/qmk/qmk_firmware/blob/master/quantum/rgblight_list.h). Feel free to add to this list!
+These are defined in [`color.h`](https://github.com/qmk/qmk_firmware/blob/master/quantum/color.h). Feel free to add to this list!
## Changing the order of the LEDs
diff --git a/docs/feature_split_keyboard.md b/docs/feature_split_keyboard.md
index 4ebf585f5c..428d581cab 100644
--- a/docs/feature_split_keyboard.md
+++ b/docs/feature_split_keyboard.md
@@ -8,8 +8,7 @@ QMK Firmware has a generic implementation that is usable by any board, as well a
For this, we will mostly be talking about the generic implementation used by the Let's Split and other keyboards.
-!> ARM is not yet fully supported for Split Keyboards and has many limitations. Progress is being made, but we have not yet reached 100% feature parity.
-
+!> ARM split supports most QMK subsystems when using the 'serial' and 'serial_usart' drivers. I2C slave is currently unsupported.
## Compatibility Overview
@@ -90,7 +89,13 @@ You can configure the firmware to read a pin on the controller to determine hand
#define SPLIT_HAND_PIN B7
```
-This will read the specified pin. If it's high, then the controller assumes it is the left hand, and if it's low, it's assumed to be the right side.
+This will read the specified pin. By default, if it's high, then the controller assumes it is the left hand, and if it's low, it's assumed to be the right side.
+
+This behaviour can be flipped by adding this to you `config.h` file:
+
+```c
+#define SPLIT_HAND_PIN_LOW_IS_LEFT
+```
#### Handedness by Matrix Pin
@@ -169,7 +174,7 @@ Because not every split keyboard is identical, there are a number of additional
#define USE_I2C
```
-This enables I<sup>2</sup>C support for split keyboards. This isn't strictly for communication, but can be used for OLED or other I<sup>2</sup>C-based devices.
+This configures the use of I<sup>2</sup>C support for split keyboard transport (AVR only).
```c
#define SOFT_SERIAL_PIN D0
@@ -193,20 +198,115 @@ If you're having issues with serial communication, you can change this value, as
* **`5`**: about 20kbps
```c
-#define SPLIT_MODS_ENABLE
+#define FORCED_SYNC_THROTTLE_MS 100
```
-This enables transmitting modifier state (normal, weak and oneshot) to the non
-primary side of the split keyboard. This adds a few bytes of data to the split
-communication protocol and may impact the matrix scan speed when enabled.
-The purpose of this feature is to support cosmetic use of modifer state (e.g.
-displaying status on an OLED screen).
+This sets the maximum number of milliseconds before forcing a synchronization of data from master to slave. Under normal circumstances this sync occurs whenever the data _changes_, for safety a data transfer occurs after this number of milliseconds if no change has been detected since the last sync.
```c
#define SPLIT_TRANSPORT_MIRROR
```
-This mirrors the master side matrix to the slave side for features that react or require knowledge of master side key presses on the slave side. This adds a few bytes of data to the split communication protocol and may impact the matrix scan speed when enabled. The purpose of this feature is to support cosmetic use of key events (e.g. RGB reacting to Keypresses).
+This mirrors the master side matrix to the slave side for features that react or require knowledge of master side key presses on the slave side. The purpose of this feature is to support cosmetic use of key events (e.g. RGB reacting to keypresses). This adds overhead to the split communication protocol and may negatively impact the matrix scan speed when enabled.
+
+```c
+#define SPLIT_LAYER_STATE_ENABLE
+```
+
+This enables syncing of the layer state between both halves of the split keyboard. The main purpose of this feature is to enable support for use of things like OLED display of the currently active layer. This adds overhead to the split communication protocol and may negatively impact the matrix scan speed when enabled.
+
+```c
+#define SPLIT_LED_STATE_ENABLE
+```
+
+This enables syncing of the Host LED status (caps lock, num lock, etc) between both halves of the split keyboard. The main purpose of this feature is to enable support for use of things like OLED display of the Host LED status. This adds overhead to the split communication protocol and may negatively impact the matrix scan speed when enabled.
+
+```c
+#define SPLIT_MODS_ENABLE
+```
+
+This enables transmitting modifier state (normal, weak and oneshot) to the non primary side of the split keyboard. The purpose of this feature is to support cosmetic use of modifer state (e.g. displaying status on an OLED screen). This adds overhead to the split communication protocol and may negatively impact the matrix scan speed when enabled.
+
+```c
+#define SPLIT_WPM_ENABLE
+```
+
+This enables transmitting the current WPM to the slave side of the split keyboard. The purpose of this feature is to support cosmetic use of WPM (e.g. displaying the current value on an OLED screen). This adds overhead to the split communication protocol and may negatively impact the matrix scan speed when enabled.
+
+### Custom data sync between sides :id=custom-data-sync
+
+QMK's split transport allows for arbitrary data transactions at both the keyboard and user levels. This is modelled on a remote procedure call, with the master invoking a function on the slave side, with the ability to send data from master to slave, process it slave side, and send data back from slave to master.
+
+To leverage this, a keyboard or user/keymap can define a comma-separated list of _transaction IDs_:
+
+```c
+// for keyboard-level data sync:
+#define SPLIT_TRANSACTION_IDS_KB KEYBOARD_SYNC_A, KEYBOARD_SYNC_B
+// or, for user:
+#define SPLIT_TRANSACTION_IDS_USER USER_SYNC_A, USER_SYNC_B, USER_SYNC_C
+```
+
+These _transaction IDs_ then need a slave-side handler function to be registered with the split transport, for example:
+
+```c
+typedef struct _master_to_slave_t {
+ int m2s_data;
+} master_to_slave_t;
+
+typedef struct _slave_to_master_t {
+ int s2m_data;
+} slave_to_master_t;
+
+void user_sync_a_slave_handler(uint8_t in_buflen, const void* in_data, uint8_t out_buflen, void* out_data) {
+ const master_to_slave_t *m2s = (const master_to_slave_t*)in_data;
+ slave_to_master_t *s2m = (slave_to_master_t*)out_data;
+ s2m->s2m_data = m2s->m2s_data + 5; // whatever comes in, add 5 so it can be sent back
+}
+
+void keyboard_post_init_user(void) {
+ transaction_register_rpc(USER_SYNC_A, user_sync_a_slave_handler);
+}
+```
+
+The master side can then invoke the slave-side handler - for normal keyboard functionality to be minimally affected, any keyboard- or user-level code attempting to sync data should be throttled:
+
+```c
+void housekeeping_task_user(void) {
+ if (is_keyboard_master()) {
+ // Interact with slave every 500ms
+ static uint32_t last_sync = 0;
+ if (timer_elapsed32(last_sync) > 500) {
+ master_to_slave_t m2s = {6};
+ slave_to_master_t s2m = {0};
+ if(transaction_rpc_exec(USER_SYNC_A, sizeof(m2s), &m2s, sizeof(s2m), &s2m)) {
+ last_sync = timer_read32();
+ dprintf("Slave value: %d\n", s2m.s2m_data); // this will now be 11, as the slave adds 5
+ } else {
+ dprint("Slave sync failed!\n");
+ }
+ }
+ }
+}
+```
+
+!> It is recommended that any data sync between halves happens during the master side's _housekeeping task_. This ensures timely retries should failures occur.
+
+If only one-way data transfer is needed, helper methods are provided:
+
+```c
+bool transaction_rpc_exec(int8_t transaction_id, uint8_t initiator2target_buffer_size, const void *initiator2target_buffer, uint8_t target2initiator_buffer_size, void *target2initiator_buffer);
+bool transaction_rpc_send(int8_t transaction_id, uint8_t initiator2target_buffer_size, const void *initiator2target_buffer);
+bool transaction_rpc_recv(int8_t transaction_id, uint8_t target2initiator_buffer_size, void *target2initiator_buffer);
+```
+
+By default, the inbound and outbound data is limited to a maximum of 32 bytes each. The sizes can be altered if required:
+
+```c
+// Master to slave:
+#define RPC_M2S_BUFFER_SIZE 48
+// Slave to master:
+#define RPC_S2M_BUFFER_SIZE 48
+```
### Hardware Configuration Options
diff --git a/docs/feature_st7565.md b/docs/feature_st7565.md
new file mode 100644
index 0000000000..de3e44d8e9
--- /dev/null
+++ b/docs/feature_st7565.md
@@ -0,0 +1,274 @@
+# ST7565 LCD Driver
+
+## Supported Hardware
+
+LCD modules using ST7565 driver IC, communicating over SPI.
+
+|Module |IC |Size |Notes |
+|------------------------------|-------|------|----------------------------------------------------------|
+|Newhaven Display NHD-C12832A1Z|ST7565R|128x32|Used by Ergodox Infinity; primary consumer of this feature|
+|Zolentech ZLE12864B |ST7565P|128x64|Requires contrast adjustment |
+
+## Usage
+
+To enable the feature, there are three steps. First, when compiling your keyboard, you'll need to add the following to your `rules.mk`:
+
+```make
+ST7565_ENABLE = yes
+```
+
+Then in your `keymap.c` file, implement the ST7565 task call. This example assumes your keymap has three layers named `_QWERTY`, `_FN` and `_ADJ`:
+
+```c
+#ifdef ST7565_ENABLE
+void st7565_task_user(void) {
+ // Host Keyboard Layer Status
+ st7565_write_P(PSTR("Layer: "), false);
+
+ switch (get_highest_layer(layer_state)) {
+ case _QWERTY:
+ st7565_write_P(PSTR("Default\n"), false);
+ break;
+ case _FN:
+ st7565_write_P(PSTR("FN\n"), false);
+ break;
+ case _ADJ:
+ st7565_write_P(PSTR("ADJ\n"), false);
+ break;
+ default:
+ // Or use the write_ln shortcut over adding '\n' to the end of your string
+ st7565_write_ln_P(PSTR("Undefined"), false);
+ }
+
+ // Host Keyboard LED Status
+ led_t led_state = host_keyboard_led_state();
+ st7565_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false);
+ st7565_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false);
+ st7565_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false);
+}
+#endif
+```
+
+## Logo Example
+
+In the default font, certain ranges of characters are reserved for a QMK logo. To render this logo to the screen, use the following code example:
+
+```c
+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, 0x00
+ };
+
+ st7565_write_P(qmk_logo, false);
+}
+```
+
+## Buffer Read Example
+For some purposes, you may need to read the current state of the display buffer. The `st7565_read_raw` function can be used to safely read bytes from the buffer.
+
+In this example, calling `fade_display` in the `st7565_task_user` function will slowly fade away whatever is on the screen by turning random pixels off over time.
+```c
+//Setup some mask which can be or'd with bytes to turn off pixels
+const uint8_t single_bit_masks[8] = {127, 191, 223, 239, 247, 251, 253, 254};
+
+static void fade_display(void) {
+ //Define the reader structure
+ display_buffer_reader_t reader;
+ uint8_t buff_char;
+ if (random() % 30 == 0) {
+ srand(timer_read());
+ // Fetch a pointer for the buffer byte at index 0. The return structure
+ // will have the pointer and the number of bytes remaining from this
+ // index position if we want to perform a sequential read by
+ // incrementing the buffer pointer
+ reader = st7565_read_raw(0);
+ //Loop over the remaining buffer and erase pixels as we go
+ for (uint16_t i = 0; i < reader.remaining_element_count; i++) {
+ //Get the actual byte in the buffer by dereferencing the pointer
+ buff_char = *reader.current_element;
+ if (buff_char != 0) {
+ st7565_write_raw_byte(buff_char & single_bit_masks[rand() % 8], i);
+ }
+ //increment the pointer to fetch a new byte during the next loop
+ reader.current_element++;
+ }
+ }
+}
+```
+
+## Other Examples
+
+In split keyboards, it is very common to have two displays that each render different content and are oriented or flipped differently. You can do this by switching which content to render by using the return value from `is_keyboard_master()` or `is_keyboard_left()` found in `split_util.h`, e.g:
+
+```c
+#ifdef ST7565_ENABLE
+display_rotation_t st7565_init_user(display_rotation_t rotation) {
+ if (!is_keyboard_master()) {
+ return DISPLAY_ROTATION_180; // flips the display 180 degrees if offhand
+ }
+
+ return rotation;
+}
+
+void st7565_task_user(void) {
+ if (is_keyboard_master()) {
+ render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc)
+ } else {
+ render_logo(); // Renders a static logo
+ }
+}
+#endif
+```
+
+## Basic Configuration
+
+|Define |Default |Description |
+|------------------------|--------------|-----------------------------------------------------------------------------------------------------|
+|`ST7565_A0_PIN` |*Not defined* |(Required) The GPIO connected to the display's A0 (data/command) pin |
+|`ST7565_RST_PIN` |*Not defined* |(Required) The GPIO connected to the display's reset pin |
+|`ST7565_SS_PIN` |*Not defined* |(Required) The GPIO connected to the display's slave select pin |
+|`ST7565_SPI_CLK_DIVISOR`|`4` |The SPI clock divisor to use |
+|`ST7565_FONT_H` |`"glcdfont.c"`|The font code file to use for custom fonts |
+|`ST7565_FONT_START` |`0` |The starting character index for custom fonts |
+|`ST7565_FONT_END` |`223` |The ending character index for custom fonts |
+|`ST7565_FONT_WIDTH` |`6` |The font width |
+|`ST7565_FONT_HEIGHT` |`8` |The font height (untested) |
+|`ST7565_TIMEOUT` |`60000` |Turns off the screen after 60000ms of keyboard inactivity. Helps reduce burn-in. Set to 0 to disable.|
+|`ST7565_COLUMN_OFFSET` |`0` |Shift output to the right this many pixels. |
+|`ST7565_CONTRAST` |`32` |The default contrast level of the display, from 0 to 255. |
+|`ST7565_UPDATE_INTERVAL`|`0` |Set the time interval for updating the display in ms. This will improve the matrix scan rate. |
+
+## Custom sized displays
+
+The default display size for this feature is 128x32 and all necessary defines are precalculated with that in mind.
+
+|Define |Default |Description |
+|-----------------------|----------|-----------------------------------------------------------------------------------------------------------|
+|`ST7565_DISPLAY_WIDTH` |`128` |The width of the display. |
+|`ST7565_DISPLAY_HEIGHT`|`32` |The height of the display. |
+|`ST7565_MATRIX_SIZE` |`512` |The local buffer size to allocate.<br>`(ST7565_DISPLAY_HEIGHT / 8 * ST7565_DISPLAY_WIDTH)`. |
+|`ST7565_BLOCK_TYPE` |`uint16_t`|The unsigned integer type to use for dirty rendering. |
+|`ST7565_BLOCK_COUNT` |`16` |The number of blocks the display is divided into for dirty rendering.<br>`(sizeof(ST7565_BLOCK_TYPE) * 8)`.|
+|`ST7565_BLOCK_SIZE` |`32` |The size of each block for dirty rendering<br>`(ST7565_MATRIX_SIZE / ST7565_BLOCK_COUNT)`. |
+
+## API
+
+```c
+// Rotation enum values are flags
+typedef enum {
+ DISPLAY_ROTATION_0,
+ DISPLAY_ROTATION_180
+} display_rotation_t;
+
+// Initialize the display, rotating the rendered output based on the define passed in.
+// Returns true if the was initialized successfully
+bool st7565_init(display_rotation_t rotation);
+
+// Called at the start of st7565_init, weak function overridable by the user
+// rotation - the value passed into st7565_init
+// Return new display_rotation_t if you want to override default rotation
+display_rotation_t st7565_init_user(display_rotation_t rotation);
+
+// Clears the display buffer, resets cursor position to 0, and sets the buffer to dirty for rendering
+void st7565_clear(void);
+
+// Renders the dirty chunks of the buffer to display
+void st7565_render(void);
+
+// Moves cursor to character position indicated by column and line, wraps if out of bounds
+// Max column denoted by 'st7565_max_chars()' and max lines by 'st7565_max_lines()' functions
+void st7565_set_cursor(uint8_t col, uint8_t line);
+
+// Advances the cursor to the next page, writing ' ' if true
+// Wraps to the begining when out of bounds
+void st7565_advance_page(bool clearPageRemainder);
+
+// Moves the cursor forward 1 character length
+// Advance page if there is not enough room for the next character
+// Wraps to the begining when out of bounds
+void st7565_advance_char(void);
+
+// Writes a single character to the buffer at current cursor position
+// Advances the cursor while writing, inverts the pixels if true
+// Main handler that writes character data to the display buffer
+void st7565_write_char(const char data, bool invert);
+
+// Writes a string to the buffer at current cursor position
+// Advances the cursor while writing, inverts the pixels if true
+void st7565_write(const char *data, bool invert);
+
+// Writes a string to the buffer at current cursor position
+// Advances the cursor while writing, inverts the pixels if true
+// Advances the cursor to the next page, wiring ' ' to the remainder of the current page
+void st7565_write_ln(const char *data, bool invert);
+
+// Pans the buffer to the right (or left by passing true) by moving contents of the buffer
+// Useful for moving the screen in preparation for new drawing
+void st7565_pan(bool left);
+
+// Returns a pointer to the requested start index in the buffer plus remaining
+// buffer length as struct
+display_buffer_reader_t st7565_read_raw(uint16_t start_index);
+
+// Writes a string to the buffer at current cursor position
+void st7565_write_raw(const char *data, uint16_t size);
+
+// Writes a single byte into the buffer at the specified index
+void st7565_write_raw_byte(const char data, uint16_t index);
+
+// Sets a specific pixel on or off
+// Coordinates start at top-left and go right and down for positive x and y
+void st7565_write_pixel(uint8_t x, uint8_t y, bool on);
+
+// Writes a PROGMEM string to the buffer at current cursor position
+// Advances the cursor while writing, inverts the pixels if true
+// Remapped to call 'void st7565_write(const char *data, bool invert);' on ARM
+void st7565_write_P(const char *data, bool invert);
+
+// Writes a PROGMEM string to the buffer at current cursor position
+// Advances the cursor while writing, inverts the pixels if true
+// Advances the cursor to the next page, wiring ' ' to the remainder of the current page
+// Remapped to call 'void st7565_write_ln(const char *data, bool invert);' on ARM
+void st7565_write_ln_P(const char *data, bool invert);
+
+// Writes a PROGMEM string to the buffer at current cursor position
+void st7565_write_raw_P(const char *data, uint16_t size);
+
+// Can be used to manually turn on the screen if it is off
+// Returns true if the screen was on or turns on
+bool st7565_on(void);
+
+// Called when st7565_on() turns on the screen, weak function overridable by the user
+// Not called if the screen is already on
+void st7565_on_user(void);
+
+// Can be used to manually turn off the screen if it is on
+// Returns true if the screen was off or turns off
+bool st7565_off(void);
+
+// Called when st7565_off() turns off the screen, weak function overridable by the user
+// Not called if the screen is already off
+void st7565_off_user(void);
+
+// Returns true if the screen is currently on, false if it is
+// not
+bool st7565_is_on(void);
+
+// Basically it's st7565_render, but with timeout management and st7565_task_user calling!
+void st7565_task(void);
+
+// Called at the start of st7565_task, weak function overridable by the user
+void st7565_task_user(void);
+
+// Inverts the display
+// Returns true if the screen was or is inverted
+bool st7565_invert(bool invert);
+
+// Returns the maximum number of characters that will fit on a line
+uint8_t st7565_max_chars(void);
+
+// Returns the maximum number of lines that will fit on the display
+uint8_t st7565_max_lines(void);
+```
diff --git a/docs/ja/compatible_microcontrollers.md b/docs/ja/compatible_microcontrollers.md
index b675b038d2..761a4cda46 100644
--- a/docs/ja/compatible_microcontrollers.md
+++ b/docs/ja/compatible_microcontrollers.md
@@ -36,6 +36,8 @@ QMK ã¯å分ãªå®¹é‡ã®ãƒ•ãƒ©ãƒƒã‚·ãƒ¥ãƒ¡ãƒ¢ãƒªã‚’å‚™ãˆãŸ USB 対応 AVR ã¾
* [STM32F446](https://www.st.com/en/microcontrollers-microprocessors/stm32f446.html)
* [STM32G431](https://www.st.com/en/microcontrollers-microprocessors/stm32g4x1.html)
* [STM32G474](https://www.st.com/en/microcontrollers-microprocessors/stm32g4x4.html)
+* [STM32L412](https://www.st.com/en/microcontrollers-microprocessors/stm32l4x2.html)
+* [STM32L422](https://www.st.com/en/microcontrollers-microprocessors/stm32l4x2.html)
* [STM32L433](https://www.st.com/en/microcontrollers-microprocessors/stm32l4x3.html)
* [STM32L443](https://www.st.com/en/microcontrollers-microprocessors/stm32l4x3.html)
diff --git a/docs/ja/feature_dip_switch.md b/docs/ja/feature_dip_switch.md
index a0f6aeb003..a5436779f1 100644
--- a/docs/ja/feature_dip_switch.md
+++ b/docs/ja/feature_dip_switch.md
@@ -28,8 +28,9 @@ DIP スイッãƒã¯ã€ä»¥ä¸‹ã‚’ `rules.mk` ã«è¿½åŠ ã™ã‚‹ã“ã¨ã§ã‚µãƒãƒ¼ãƒˆã
コールãƒãƒƒã‚¯é–¢æ•°ã‚’ `<keyboard>.c` ã«è¨˜è¿°ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™:
```c
-void dip_switch_update_kb(uint8_t index, bool active) {
- dip_switch_update_user(index, active);
+bool dip_switch_update_kb(uint8_t index, bool active) {
+ if !(dip_switch_update_user(index, active)) { return false; }
+ return true;
}
```
@@ -37,7 +38,7 @@ void dip_switch_update_kb(uint8_t index, bool active) {
ã‚ã‚‹ã„㯠`keymap.c` ã«è¨˜è¿°ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™:
```c
-void dip_switch_update_user(uint8_t index, bool active) {
+bool dip_switch_update_user(uint8_t index, bool active) {
switch (index) {
case 0:
if(active) { audio_on(); } else { audio_off(); }
@@ -62,6 +63,7 @@ void dip_switch_update_user(uint8_t index, bool active) {
}
break;
}
+ return true;
}
```
@@ -69,8 +71,9 @@ void dip_switch_update_user(uint8_t index, bool active) {
```c
-void dip_switch_update_mask_kb(uint32_t state) {
- dip_switch_update_mask_user(state);
+bool dip_switch_update_mask_kb(uint32_t state) {
+ if (!dip_switch_update_mask_user(state)) { return false; }
+ return true;
}
```
@@ -78,7 +81,7 @@ void dip_switch_update_mask_kb(uint32_t state) {
ã‚ã‚‹ã„㯠`keymap.c` ã«è¨˜è¿°ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™:
```c
-void dip_switch_update_mask_user(uint32_t state) {
+bool dip_switch_update_mask_user(uint32_t state) {
if (state & (1UL<<0) && state & (1UL<<1)) {
layer_on(_ADJUST); // C on esc
} else {
@@ -94,6 +97,7 @@ void dip_switch_update_mask_user(uint32_t state) {
} else {
layer_off(_TEST_B);
}
+ return true;
}
```
diff --git a/docs/serial_driver.md b/docs/serial_driver.md
index 359fc59551..ed989b0a15 100644
--- a/docs/serial_driver.md
+++ b/docs/serial_driver.md
@@ -73,7 +73,7 @@ You must also enable the ChibiOS `SERIAL` feature:
Do note that the configuration required is for the `SERIAL` peripheral, not the `UART` peripheral.
### USART Full-duplex
-Targeting STM32 boards where communication is offloaded to a USART hardware device. The advantage over bitbang is that this provides fast and accurate timings. USART Full-Duplex requires two conductors **without** pull-up resistors instead of one conductor with a pull-up resistor unlike the Half-duplex driver, but it is more efficent as it uses DMA transfers, which can result in even faster transmission speeds.
+Targeting STM32 boards where communication is offloaded to a USART hardware device. The advantage over bitbang is that this provides fast and accurate timings. USART Full-Duplex requires two conductors **without** pull-up resistors instead of one conductor with a pull-up resistor unlike the Half-duplex driver. Due to its internal design it is more efficent, which can result in even faster transmission speeds.
#### Pin configuration
@@ -86,12 +86,13 @@ Please note that `TX` of the master half has to be connected with the `RX` pin o
To use the driver, add this to your rules.mk:
```make
-SERIAL_DRIVER = usart_duplex
+SERIAL_DRIVER = usart
```
Next configure the hardware via your config.h:
```c
+#define SERIAL_USART_FULL_DUPLEX // Enable full duplex operation mode.
#define SERIAL_USART_TX_PIN B6 // USART TX pin
#define SERIAL_USART_RX_PIN B7 // USART RX pin
//#define USART1_REMAP // Remap USART TX and RX pins on STM32F103 MCUs, see table below.
@@ -104,17 +105,17 @@ Next configure the hardware via your config.h:
// 3: 57600 baud
// 4: 38400 baud
// 5: 19200 baud
-#define SERIAL_USART_DRIVER UARTD1 // USART driver of TX and RX pin. default: UARTD1
+#define SERIAL_USART_DRIVER SD1 // USART driver of TX and RX pin. default: SD1
#define SERIAL_USART_TX_PAL_MODE 7 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 7
#define SERIAL_USART_RX_PAL_MODE 7 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 7
#define SERIAL_USART_TIMEOUT 100 // USART driver timeout. default 100
```
-You must also enable the ChibiOS `UART` with blocking api feature:
-* In your board's halconf.h: `#define HAL_USE_UART TRUE` and `#define UART_USE_WAIT TRUE`
-* In your board's mcuconf.h: `#define STM32_UART_USE_USARTn TRUE` (where 'n' matches the peripheral number of your selected USART on the MCU)
+You must also enable the ChibiOS `SERIAL` feature:
+* In your board's halconf.h: `#define HAL_USE_SERIAL TRUE`
+* In your board's mcuconf.h: `#define STM32_SERIAL_USE_USARTn TRUE` (where 'n' matches the peripheral number of your selected USART on the MCU)
-Do note that the configuration required is for the `UART` peripheral, not the `SERIAL` peripheral.
+Do note that the configuration required is for the `SERIAL` peripheral, not the `UART` peripheral.
#### Pins for USART Peripherals with Alternate Functions for selected STM32 MCUs
diff --git a/docs/syllabus.md b/docs/syllabus.md
index ec7f66ba78..b33bd9e727 100644
--- a/docs/syllabus.md
+++ b/docs/syllabus.md
@@ -40,6 +40,7 @@ These topics start to dig into some of the features that QMK supports. You don't
* [Tap Dance](feature_tap_dance.md)
* [Combos](feature_combo.md)
* [Userspace](feature_userspace.md)
+ * [Key Overrides](feature_key_overrides.md)
# Advanced Topics
diff --git a/docs/understanding_qmk.md b/docs/understanding_qmk.md
index 331b1c893c..e3dd5cb780 100644
--- a/docs/understanding_qmk.md
+++ b/docs/understanding_qmk.md
@@ -146,6 +146,7 @@ The `process_record()` function itself is deceptively simple, but hidden within
* [`bool process_audio(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_audio.c#L19)
* [`bool process_steno(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_steno.c#L160)
* [`bool process_music(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_music.c#L114)
+ * [`bool process_key_override(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/5a1b857dea45a17698f6baa7dd1b7a7ea907fb0a/quantum/process_keycode/process_key_override.c#L397)
* [`bool process_tap_dance(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_tap_dance.c#L141)
* [`bool process_unicode_common(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_unicode_common.c#L169)
calls one of:
diff --git a/drivers/avr/i2c_master.c b/drivers/avr/i2c_master.c
index b1e4885298..2773e00778 100644
--- a/drivers/avr/i2c_master.c
+++ b/drivers/avr/i2c_master.c
@@ -28,8 +28,14 @@
# define F_SCL 400000UL // SCL frequency
#endif
+#ifndef I2C_START_RETRY_COUNT
+# define I2C_START_RETRY_COUNT 20
+#endif // I2C_START_RETRY_COUNT
+
#define TWBR_val (((F_CPU / F_SCL) - 16) / 2)
+#define MAX(X, Y) ((X) > (Y) ? (X) : (Y))
+
void i2c_init(void) {
TWSR = 0; /* no prescaler */
TWBR = (uint8_t)TWBR_val;
@@ -47,7 +53,7 @@ void i2c_init(void) {
#endif
}
-i2c_status_t i2c_start(uint8_t address, uint16_t timeout) {
+static i2c_status_t i2c_start_impl(uint8_t address, uint16_t timeout) {
// reset TWI control register
TWCR = 0;
// transmit START condition
@@ -86,6 +92,17 @@ i2c_status_t i2c_start(uint8_t address, uint16_t timeout) {
return I2C_STATUS_SUCCESS;
}
+i2c_status_t i2c_start(uint8_t address, uint16_t timeout) {
+ // Retry i2c_start_impl a bunch times in case the remote side has interrupts disabled.
+ uint16_t timeout_timer = timer_read();
+ uint16_t time_slice = MAX(1, (timeout == (I2C_TIMEOUT_INFINITE)) ? 5 : (timeout / (I2C_START_RETRY_COUNT))); // if it's infinite, wait 1ms between attempts, otherwise split up the entire timeout into the number of retries
+ i2c_status_t status;
+ do {
+ status = i2c_start_impl(address, time_slice);
+ } while ((status < 0) && ((timeout == I2C_TIMEOUT_INFINITE) || (timer_elapsed(timeout_timer) < timeout)));
+ return status;
+}
+
i2c_status_t i2c_write(uint8_t data, uint16_t timeout) {
// load data into data register
TWDR = data;
diff --git a/drivers/avr/i2c_slave.c b/drivers/avr/i2c_slave.c
index 62a378165a..2907f164c0 100644
--- a/drivers/avr/i2c_slave.c
+++ b/drivers/avr/i2c_slave.c
@@ -17,6 +17,7 @@
* GitHub repository: https://github.com/g4lvanix/I2C-slave-lib
*/
+#include <stddef.h>
#include <avr/io.h>
#include <util/twi.h>
#include <avr/interrupt.h>
@@ -24,6 +25,12 @@
#include "i2c_slave.h"
+#if defined(USE_I2C) && defined(SPLIT_COMMON_TRANSACTIONS)
+# include "transactions.h"
+
+static volatile bool is_callback_executor = false;
+#endif // defined(USE_I2C) && defined(SPLIT_COMMON_TRANSACTIONS)
+
volatile uint8_t i2c_slave_reg[I2C_SLAVE_REG_COUNT];
static volatile uint8_t buffer_address;
@@ -48,11 +55,14 @@ ISR(TWI_vect) {
case TW_SR_SLA_ACK:
// The device is now a slave receiver
slave_has_register_set = false;
+#if defined(USE_I2C) && defined(SPLIT_COMMON_TRANSACTIONS)
+ is_callback_executor = false;
+#endif // defined(USE_I2C) && defined(SPLIT_COMMON_TRANSACTIONS)
break;
case TW_SR_DATA_ACK:
// This device is a slave receiver and has received data
- // First byte is the location then the bytes will be writen in buffer with auto-incriment
+ // First byte is the location then the bytes will be writen in buffer with auto-increment
if (!slave_has_register_set) {
buffer_address = TWDR;
@@ -60,10 +70,25 @@ ISR(TWI_vect) {
ack = 0;
buffer_address = 0;
}
- slave_has_register_set = true; // address has been receaved now fill in buffer
+ slave_has_register_set = true; // address has been received now fill in buffer
+
+#if defined(USE_I2C) && defined(SPLIT_COMMON_TRANSACTIONS)
+ // Work out if we're attempting to execute a callback
+ is_callback_executor = buffer_address == split_transaction_table[I2C_EXECUTE_CALLBACK].initiator2target_offset;
+#endif // defined(USE_I2C) && defined(SPLIT_COMMON_TRANSACTIONS)
} else {
i2c_slave_reg[buffer_address] = TWDR;
buffer_address++;
+
+#if defined(USE_I2C) && defined(SPLIT_COMMON_TRANSACTIONS)
+ // If we're intending to execute a transaction callback, do so, as we've just received the transaction ID
+ if (is_callback_executor) {
+ split_transaction_desc_t *trans = &split_transaction_table[split_shmem->transaction_id];
+ if (trans->slave_callback) {
+ trans->slave_callback(trans->initiator2target_buffer_size, split_trans_initiator2target_buffer(trans), trans->target2initiator_buffer_size, split_trans_target2initiator_buffer(trans));
+ }
+ }
+#endif // defined(USE_I2C) && defined(SPLIT_COMMON_TRANSACTIONS)
}
break;
diff --git a/drivers/avr/i2c_slave.h b/drivers/avr/i2c_slave.h
index 1cd0625ef4..a8647c9da3 100644
--- a/drivers/avr/i2c_slave.h
+++ b/drivers/avr/i2c_slave.h
@@ -22,7 +22,18 @@
#pragma once
-#define I2C_SLAVE_REG_COUNT 30
+#ifndef I2C_SLAVE_REG_COUNT
+
+# if defined(USE_I2C) && defined(SPLIT_COMMON_TRANSACTIONS)
+# include "transport.h"
+# define I2C_SLAVE_REG_COUNT sizeof(split_shared_memory_t)
+# else // defined(USE_I2C) && defined(SPLIT_COMMON_TRANSACTIONS)
+# define I2C_SLAVE_REG_COUNT 30
+# endif // defined(USE_I2C) && defined(SPLIT_COMMON_TRANSACTIONS)
+
+#endif // I2C_SLAVE_REG_COUNT
+
+_Static_assert(I2C_SLAVE_REG_COUNT < 256, "I2C target registers must be single byte");
extern volatile uint8_t i2c_slave_reg[I2C_SLAVE_REG_COUNT];
diff --git a/drivers/avr/serial.c b/drivers/avr/serial.c
index 3647bee0d3..9a7345a53d 100644
--- a/drivers/avr/serial.c
+++ b/drivers/avr/serial.c
@@ -224,15 +224,8 @@
# define SERIAL_DELAY_HALF2 (SERIAL_DELAY - SERIAL_DELAY / 2)
# define SLAVE_INT_WIDTH_US 1
-# ifndef SERIAL_USE_MULTI_TRANSACTION
-# define SLAVE_INT_RESPONSE_TIME SERIAL_DELAY
-# else
-# define SLAVE_INT_ACK_WIDTH_UNIT 2
-# define SLAVE_INT_ACK_WIDTH 4
-# endif
-
-static SSTD_t *Transaction_table = NULL;
-static uint8_t Transaction_table_size = 0;
+# define SLAVE_INT_ACK_WIDTH_UNIT 2
+# define SLAVE_INT_ACK_WIDTH 4
inline static void serial_delay(void) ALWAYS_INLINE;
inline static void serial_delay(void) { _delay_us(SERIAL_DELAY); }
@@ -259,16 +252,12 @@ inline static void serial_low(void) { writePinLow(SOFT_SERIAL_PIN); }
inline static void serial_high(void) ALWAYS_INLINE;
inline static void serial_high(void) { writePinHigh(SOFT_SERIAL_PIN); }
-void soft_serial_initiator_init(SSTD_t *sstd_table, int sstd_table_size) {
- Transaction_table = sstd_table;
- Transaction_table_size = (uint8_t)sstd_table_size;
+void soft_serial_initiator_init(void) {
serial_output();
serial_high();
}
-void soft_serial_target_init(SSTD_t *sstd_table, int sstd_table_size) {
- Transaction_table = sstd_table;
- Transaction_table_size = (uint8_t)sstd_table_size;
+void soft_serial_target_init(void) {
serial_input_with_pullup();
// Enable INT0-INT7
@@ -395,19 +384,14 @@ static inline uint8_t nibble_bits_count(uint8_t bits) {
// interrupt handle to be used by the target device
ISR(SERIAL_PIN_INTERRUPT) {
-# ifndef SERIAL_USE_MULTI_TRANSACTION
- serial_low();
- serial_output();
- SSTD_t *trans = Transaction_table;
-# else
// recive transaction table index
uint8_t tid, bits;
uint8_t pecount = 0;
sync_recv();
- bits = serial_read_chunk(&pecount, 7);
+ bits = serial_read_chunk(&pecount, 8);
tid = bits >> 3;
- bits = (bits & 7) != nibble_bits_count(tid);
- if (bits || pecount > 0 || tid > Transaction_table_size) {
+ bits = (bits & 7) != (nibble_bits_count(tid) & 7);
+ if (bits || pecount > 0 || tid > NUM_TOTAL_TRANSACTIONS) {
return;
}
serial_delay_half1();
@@ -415,18 +399,22 @@ ISR(SERIAL_PIN_INTERRUPT) {
serial_high(); // response step1 low->high
serial_output();
_delay_sub_us(SLAVE_INT_ACK_WIDTH_UNIT * SLAVE_INT_ACK_WIDTH);
- SSTD_t *trans = &Transaction_table[tid];
+ split_transaction_desc_t *trans = &split_transaction_table[tid];
serial_low(); // response step2 ack high->low
-# endif
+
+ // If the transaction has a callback, we can execute it now
+ if (trans->slave_callback) {
+ trans->slave_callback(trans->initiator2target_buffer_size, split_trans_initiator2target_buffer(trans), trans->target2initiator_buffer_size, split_trans_target2initiator_buffer(trans));
+ }
// target send phase
- if (trans->target2initiator_buffer_size > 0) serial_send_packet((uint8_t *)trans->target2initiator_buffer, trans->target2initiator_buffer_size);
+ if (trans->target2initiator_buffer_size > 0) serial_send_packet((uint8_t *)split_trans_target2initiator_buffer(trans), trans->target2initiator_buffer_size);
// target switch to input
change_sender2reciver();
// target recive phase
if (trans->initiator2target_buffer_size > 0) {
- if (serial_recive_packet((uint8_t *)trans->initiator2target_buffer, trans->initiator2target_buffer_size)) {
+ if (serial_recive_packet((uint8_t *)split_trans_initiator2target_buffer(trans), trans->initiator2target_buffer_size)) {
*trans->status = TRANSACTION_ACCEPTED;
} else {
*trans->status = TRANSACTION_DATA_ERROR;
@@ -448,14 +436,12 @@ ISR(SERIAL_PIN_INTERRUPT) {
// TRANSACTION_NO_RESPONSE
// TRANSACTION_DATA_ERROR
// this code is very time dependent, so we need to disable interrupts
-# ifndef SERIAL_USE_MULTI_TRANSACTION
-int soft_serial_transaction(void) {
- SSTD_t *trans = Transaction_table;
-# else
int soft_serial_transaction(int sstd_index) {
- if (sstd_index > Transaction_table_size) return TRANSACTION_TYPE_ERROR;
- SSTD_t *trans = &Transaction_table[sstd_index];
-# endif
+ if (sstd_index > NUM_TOTAL_TRANSACTIONS) return TRANSACTION_TYPE_ERROR;
+ split_transaction_desc_t *trans = &split_transaction_table[sstd_index];
+
+ if (!trans->status) return TRANSACTION_TYPE_ERROR; // not registered
+
cli();
// signal to the target that we want to start a transaction
@@ -463,27 +449,11 @@ int soft_serial_transaction(int sstd_index) {
serial_low();
_delay_us(SLAVE_INT_WIDTH_US);
-# ifndef SERIAL_USE_MULTI_TRANSACTION
- // wait for the target response
- serial_input_with_pullup();
- _delay_us(SLAVE_INT_RESPONSE_TIME);
-
- // check if the target is present
- if (serial_read_pin()) {
- // target failed to pull the line low, assume not present
- serial_output();
- serial_high();
- *trans->status = TRANSACTION_NO_RESPONSE;
- sei();
- return TRANSACTION_NO_RESPONSE;
- }
-
-# else
// send transaction table index
int tid = (sstd_index << 3) | (7 & nibble_bits_count(sstd_index));
sync_send();
_delay_sub_us(TID_SEND_ADJUST);
- serial_write_chunk(tid, 7);
+ serial_write_chunk(tid, 8);
serial_delay_half1();
// wait for the target response (step1 low->high)
@@ -504,12 +474,11 @@ int soft_serial_transaction(int sstd_index) {
}
_delay_sub_us(SLAVE_INT_ACK_WIDTH_UNIT);
}
-# endif
// initiator recive phase
// if the target is present syncronize with it
if (trans->target2initiator_buffer_size > 0) {
- if (!serial_recive_packet((uint8_t *)trans->target2initiator_buffer, trans->target2initiator_buffer_size)) {
+ if (!serial_recive_packet((uint8_t *)split_trans_target2initiator_buffer(trans), trans->target2initiator_buffer_size)) {
serial_output();
serial_high();
*trans->status = TRANSACTION_DATA_ERROR;
@@ -523,7 +492,7 @@ int soft_serial_transaction(int sstd_index) {
// initiator send phase
if (trans->initiator2target_buffer_size > 0) {
- serial_send_packet((uint8_t *)trans->initiator2target_buffer, trans->initiator2target_buffer_size);
+ serial_send_packet((uint8_t *)split_trans_initiator2target_buffer(trans), trans->initiator2target_buffer_size);
}
// always, release the line when not in use
@@ -534,9 +503,8 @@ int soft_serial_transaction(int sstd_index) {
return TRANSACTION_END;
}
-# ifdef SERIAL_USE_MULTI_TRANSACTION
int soft_serial_get_and_clean_status(int sstd_index) {
- SSTD_t *trans = &Transaction_table[sstd_index];
+ split_transaction_desc_t *trans = &split_transaction_table[sstd_index];
cli();
int retval = *trans->status;
*trans->status = 0;
@@ -544,8 +512,6 @@ int soft_serial_get_and_clean_status(int sstd_index) {
sei();
return retval;
}
-# endif
-
#endif
// Helix serial.c history
diff --git a/drivers/avr/serial.h b/drivers/avr/serial.h
deleted file mode 100644
index 53e66cf905..0000000000
--- a/drivers/avr/serial.h
+++ /dev/null
@@ -1,62 +0,0 @@
-#pragma once
-
-#include <stdbool.h>
-
-// /////////////////////////////////////////////////////////////////
-// Need Soft Serial defines in config.h
-// /////////////////////////////////////////////////////////////////
-// ex.
-// #define SOFT_SERIAL_PIN ?? // ?? = D0,D1,D2,D3,E6
-// OPTIONAL: #define SELECT_SOFT_SERIAL_SPEED ? // ? = 1,2,3,4,5
-// // 1: about 137kbps (default)
-// // 2: about 75kbps
-// // 3: about 39kbps
-// // 4: about 26kbps
-// // 5: about 20kbps
-//
-// //// USE simple API (using signle-type transaction function)
-// /* nothing */
-// //// USE flexible API (using multi-type transaction function)
-// #define SERIAL_USE_MULTI_TRANSACTION
-//
-// /////////////////////////////////////////////////////////////////
-
-// Soft Serial Transaction Descriptor
-typedef struct _SSTD_t {
- uint8_t *status;
- uint8_t initiator2target_buffer_size;
- uint8_t *initiator2target_buffer;
- uint8_t target2initiator_buffer_size;
- uint8_t *target2initiator_buffer;
-} SSTD_t;
-#define TID_LIMIT(table) (sizeof(table) / sizeof(SSTD_t))
-
-// initiator is transaction start side
-void soft_serial_initiator_init(SSTD_t *sstd_table, int sstd_table_size);
-// target is interrupt accept side
-void soft_serial_target_init(SSTD_t *sstd_table, int sstd_table_size);
-
-// initiator resullt
-#define TRANSACTION_END 0
-#define TRANSACTION_NO_RESPONSE 0x1
-#define TRANSACTION_DATA_ERROR 0x2
-#define TRANSACTION_TYPE_ERROR 0x4
-#ifndef SERIAL_USE_MULTI_TRANSACTION
-int soft_serial_transaction(void);
-#else
-int soft_serial_transaction(int sstd_index);
-#endif
-
-// target status
-// *SSTD_t.status has
-// initiator:
-// TRANSACTION_END
-// or TRANSACTION_NO_RESPONSE
-// or TRANSACTION_DATA_ERROR
-// target:
-// TRANSACTION_DATA_ERROR
-// or TRANSACTION_ACCEPTED
-#define TRANSACTION_ACCEPTED 0x8
-#ifdef SERIAL_USE_MULTI_TRANSACTION
-int soft_serial_get_and_clean_status(int sstd_index);
-#endif
diff --git a/drivers/awinic/aw20216.c b/drivers/awinic/aw20216.c
new file mode 100644
index 0000000000..776653fa6c
--- /dev/null
+++ b/drivers/awinic/aw20216.c
@@ -0,0 +1,182 @@
+/* Copyright 2021 Jasper Chan
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
+#include "aw20216.h"
+#include "spi_master.h"
+
+/* The AW20216 appears to be somewhat similar to the IS31FL743, although quite
+ * a few things are different, such as the command byte format and page ordering.
+ * The LED addresses start from 0x00 instead of 0x01.
+ */
+#define AWINIC_ID 0b1010 << 4
+
+#define AW_PAGE_FUNCTION 0x00 << 1 // PG0, Function registers
+#define AW_PAGE_PWM 0x01 << 1 // PG1, LED PWM control
+#define AW_PAGE_SCALING 0x02 << 1 // PG2, LED current scaling control
+#define AW_PAGE_PATCHOICE 0x03 << 1 // PG3, Pattern choice?
+#define AW_PAGE_PWMSCALING 0x04 << 1 // PG4, LED PWM + Scaling control?
+
+#define AW_WRITE 0
+#define AW_READ 1
+
+#define AW_REG_CONFIGURATION 0x00 // PG0
+#define AW_REG_GLOBALCURRENT 0x01 // PG0
+
+// Default value of AW_REG_CONFIGURATION
+// D7:D4 = 1011, SWSEL (SW1~SW12 active)
+// D3 = 0?, reserved (apparently this should be 1 but it doesn't seem to matter)
+// D2:D1 = 00, OSDE (open/short detection enable)
+// D0 = 0, CHIPEN (write 1 to enable LEDs when hardware enable pulled high)
+#define AW_CONFIG_DEFAULT 0b10110000
+#define AW_CHIPEN 1
+
+#define AW_PWM_REGISTER_COUNT 216
+
+#define AW_SPI_START(PIN) spi_start(PIN, false, 0, AW_SPI_DIVISOR)
+
+#ifndef AW_SCALING_MAX
+# define AW_SCALING_MAX 150
+#endif
+
+#ifndef AW_GLOBAL_CURRENT_MAX
+# define AW_GLOBAL_CURRENT_MAX 150
+#endif
+
+#ifndef DRIVER_1_CS
+# define DRIVER_1_CS B13
+#endif
+
+#ifndef DRIVER_1_EN
+# define DRIVER_1_EN C13
+#endif
+
+#ifndef AW_SPI_DIVISOR
+# define AW_SPI_DIVISOR 4
+#endif
+
+uint8_t g_spi_transfer_buffer[3] = {0};
+uint8_t g_pwm_buffer[DRIVER_COUNT][AW_PWM_REGISTER_COUNT];
+bool g_pwm_buffer_update_required[DRIVER_COUNT] = {false};
+
+bool AW20216_write_register(pin_t slave_pin, uint8_t page, uint8_t reg, uint8_t data) {
+ // Do we need to call spi_stop() if this fails?
+ if (!AW_SPI_START(slave_pin)) {
+ return false;
+ }
+
+ g_spi_transfer_buffer[0] = (AWINIC_ID | page | AW_WRITE);
+ g_spi_transfer_buffer[1] = reg;
+ g_spi_transfer_buffer[2] = data;
+
+ if (spi_transmit(g_spi_transfer_buffer, 3) != SPI_STATUS_SUCCESS) {
+ spi_stop();
+ return false;
+ }
+ spi_stop();
+ return true;
+}
+
+bool AW20216_init_scaling(void) {
+ // Set constant current to the max, control brightness with PWM
+ aw_led led;
+ for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) {
+ led = g_aw_leds[i];
+ if (led.driver == 0) {
+ AW20216_write_register(DRIVER_1_CS, AW_PAGE_SCALING, led.r, AW_SCALING_MAX);
+ AW20216_write_register(DRIVER_1_CS, AW_PAGE_SCALING, led.g, AW_SCALING_MAX);
+ AW20216_write_register(DRIVER_1_CS, AW_PAGE_SCALING, led.b, AW_SCALING_MAX);
+ }
+#ifdef DRIVER_2_CS
+ else if (led.driver == 1) {
+ AW20216_write_register(DRIVER_2_CS, AW_PAGE_SCALING, led.r, AW_SCALING_MAX);
+ AW20216_write_register(DRIVER_2_CS, AW_PAGE_SCALING, led.g, AW_SCALING_MAX);
+ AW20216_write_register(DRIVER_2_CS, AW_PAGE_SCALING, led.b, AW_SCALING_MAX);
+ }
+#endif
+ }
+ return true;
+}
+
+bool AW20216_soft_enable(void) {
+ AW20216_write_register(DRIVER_1_CS, AW_PAGE_FUNCTION, AW_REG_CONFIGURATION, AW_CONFIG_DEFAULT | AW_CHIPEN);
+#ifdef DRIVER_2_CS
+ AW20216_write_register(DRIVER_2_CS, AW_PAGE_FUNCTION, AW_REG_CONFIGURATION, AW_CONFIG_DEFAULT | AW_CHIPEN);
+#endif
+ return true;
+}
+
+void AW20216_update_pwm(int index, uint8_t red, uint8_t green, uint8_t blue) {
+ aw_led led = g_aw_leds[index];
+ if (led.driver == 0) {
+ AW20216_write_register(DRIVER_1_CS, AW_PAGE_PWM, led.r, red);
+ AW20216_write_register(DRIVER_1_CS, AW_PAGE_PWM, led.g, green);
+ AW20216_write_register(DRIVER_1_CS, AW_PAGE_PWM, led.b, blue);
+ }
+#ifdef DRIVER_2_CS
+ else if (led.driver == 1) {
+ AW20216_write_register(DRIVER_2_CS, AW_PAGE_PWM, led.r, red);
+ AW20216_write_register(DRIVER_2_CS, AW_PAGE_PWM, led.g, green);
+ AW20216_write_register(DRIVER_2_CS, AW_PAGE_PWM, led.b, blue);
+ }
+#endif
+ return;
+}
+
+void AW20216_init(void) {
+ // All LEDs should start with all scaling and PWM registers as off
+ setPinOutput(DRIVER_1_EN);
+ writePinHigh(DRIVER_1_EN);
+ AW20216_write_register(DRIVER_1_CS, AW_PAGE_FUNCTION, AW_REG_GLOBALCURRENT, AW_GLOBAL_CURRENT_MAX);
+#ifdef DRIVER_2_EN
+ setPinOutput(DRIVER_2_EN);
+ writePinHigh(DRIVER_2_EN);
+ AW20216_write_register(DRIVER_2_CS, AW_PAGE_FUNCTION, AW_REG_GLOBALCURRENT, AW_GLOBAL_CURRENT_MAX);
+#endif
+ AW20216_init_scaling();
+ AW20216_soft_enable();
+ return;
+}
+
+void AW20216_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) {
+ aw_led led = g_aw_leds[index];
+ g_pwm_buffer[led.driver][led.r] = red;
+ g_pwm_buffer[led.driver][led.g] = green;
+ g_pwm_buffer[led.driver][led.b] = blue;
+ g_pwm_buffer_update_required[led.driver] = true;
+ return;
+}
+void AW20216_set_color_all(uint8_t red, uint8_t green, uint8_t blue) {
+ for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) {
+ AW20216_set_color(i, red, green, blue);
+ }
+ return;
+}
+
+void AW20216_write_pwm_buffer(pin_t slave_pin, uint8_t buffer_idx) {
+ AW_SPI_START(slave_pin);
+ spi_write((AWINIC_ID | AW_PAGE_PWM | AW_WRITE));
+ spi_write(0);
+ spi_transmit(g_pwm_buffer[buffer_idx], AW_PWM_REGISTER_COUNT);
+ spi_stop();
+}
+
+void AW20216_update_pwm_buffers(void) {
+ AW20216_write_pwm_buffer(DRIVER_1_CS, 0);
+#ifdef DRIVER_2_CS
+ AW20216_write_pwm_buffer(DRIVER_2_CS, 1);
+#endif
+ return;
+}
diff --git a/drivers/awinic/aw20216.h b/drivers/awinic/aw20216.h
new file mode 100644
index 0000000000..9c6865cc82
--- /dev/null
+++ b/drivers/awinic/aw20216.h
@@ -0,0 +1,251 @@
+/* Copyright 2021 Jasper Chan (Gigahawk)
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+
+#include <stdint.h>
+#include <stdbool.h>
+
+typedef struct aw_led {
+ uint8_t driver : 2;
+ uint8_t r;
+ uint8_t g;
+ uint8_t b;
+} aw_led;
+
+extern const aw_led g_aw_leds[DRIVER_LED_TOTAL];
+
+void AW20216_init(void);
+void AW20216_set_color(int index, uint8_t red, uint8_t green, uint8_t blue);
+void AW20216_set_color_all(uint8_t red, uint8_t green, uint8_t blue);
+void AW20216_update_pwm_buffers(void);
+
+#define CS1_SW1 0x00
+#define CS2_SW1 0x01
+#define CS3_SW1 0x02
+#define CS4_SW1 0x03
+#define CS5_SW1 0x04
+#define CS6_SW1 0x05
+#define CS7_SW1 0x06
+#define CS8_SW1 0x07
+#define CS9_SW1 0x08
+#define CS10_SW1 0x09
+#define CS11_SW1 0x0A
+#define CS12_SW1 0x0B
+#define CS13_SW1 0x0C
+#define CS14_SW1 0x0D
+#define CS15_SW1 0x0E
+#define CS16_SW1 0x0F
+#define CS17_SW1 0x10
+#define CS18_SW1 0x11
+#define CS1_SW2 0x12
+#define CS2_SW2 0x13
+#define CS3_SW2 0x14
+#define CS4_SW2 0x15
+#define CS5_SW2 0x16
+#define CS6_SW2 0x17
+#define CS7_SW2 0x18
+#define CS8_SW2 0x19
+#define CS9_SW2 0x1A
+#define CS10_SW2 0x1B
+#define CS11_SW2 0x1C
+#define CS12_SW2 0x1D
+#define CS13_SW2 0x1E
+#define CS14_SW2 0x1F
+#define CS15_SW2 0x20
+#define CS16_SW2 0x21
+#define CS17_SW2 0x22
+#define CS18_SW2 0x23
+#define CS1_SW3 0x24
+#define CS2_SW3 0x25
+#define CS3_SW3 0x26
+#define CS4_SW3 0x27
+#define CS5_SW3 0x28
+#define CS6_SW3 0x29
+#define CS7_SW3 0x2A
+#define CS8_SW3 0x2B
+#define CS9_SW3 0x2C
+#define CS10_SW3 0x2D
+#define CS11_SW3 0x2E
+#define CS12_SW3 0x2F
+#define CS13_SW3 0x30
+#define CS14_SW3 0x31
+#define CS15_SW3 0x32
+#define CS16_SW3 0x33
+#define CS17_SW3 0x34
+#define CS18_SW3 0x35
+#define CS1_SW4 0x36
+#define CS2_SW4 0x37
+#define CS3_SW4 0x38
+#define CS4_SW4 0x39
+#define CS5_SW4 0x3A
+#define CS6_SW4 0x3B
+#define CS7_SW4 0x3C
+#define CS8_SW4 0x3D
+#define CS9_SW4 0x3E
+#define CS10_SW4 0x3F
+#define CS11_SW4 0x40
+#define CS12_SW4 0x41
+#define CS13_SW4 0x42
+#define CS14_SW4 0x43
+#define CS15_SW4 0x44
+#define CS16_SW4 0x45
+#define CS17_SW4 0x46
+#define CS18_SW4 0x47
+#define CS1_SW5 0x48
+#define CS2_SW5 0x49
+#define CS3_SW5 0x4A
+#define CS4_SW5 0x4B
+#define CS5_SW5 0x4C
+#define CS6_SW5 0x4D
+#define CS7_SW5 0x4E
+#define CS8_SW5 0x4F
+#define CS9_SW5 0x50
+#define CS10_SW5 0x51
+#define CS11_SW5 0x52
+#define CS12_SW5 0x53
+#define CS13_SW5 0x54
+#define CS14_SW5 0x55
+#define CS15_SW5 0x56
+#define CS16_SW5 0x57
+#define CS17_SW5 0x58
+#define CS18_SW5 0x59
+#define CS1_SW6 0x5A
+#define CS2_SW6 0x5B
+#define CS3_SW6 0x5C
+#define CS4_SW6 0x5D
+#define CS5_SW6 0x5E
+#define CS6_SW6 0x5F
+#define CS7_SW6 0x60
+#define CS8_SW6 0x61
+#define CS9_SW6 0x62
+#define CS10_SW6 0x63
+#define CS11_SW6 0x64
+#define CS12_SW6 0x65
+#define CS13_SW6 0x66
+#define CS14_SW6 0x67
+#define CS15_SW6 0x68
+#define CS16_SW6 0x69
+#define CS17_SW6 0x6A
+#define CS18_SW6 0x6B
+#define CS1_SW7 0x6C
+#define CS2_SW7 0x6D
+#define CS3_SW7 0x6E
+#define CS4_SW7 0x6F
+#define CS5_SW7 0x70
+#define CS6_SW7 0x71
+#define CS7_SW7 0x72
+#define CS8_SW7 0x73
+#define CS9_SW7 0x74
+#define CS10_SW7 0x75
+#define CS11_SW7 0x76
+#define CS12_SW7 0x77
+#define CS13_SW7 0x78
+#define CS14_SW7 0x79
+#define CS15_SW7 0x7A
+#define CS16_SW7 0x7B
+#define CS17_SW7 0x7C
+#define CS18_SW7 0x7D
+#define CS1_SW8 0x7E
+#define CS2_SW8 0x7F
+#define CS3_SW8 0x80
+#define CS4_SW8 0x81
+#define CS5_SW8 0x82
+#define CS6_SW8 0x83
+#define CS7_SW8 0x84
+#define CS8_SW8 0x85
+#define CS9_SW8 0x86
+#define CS10_SW8 0x87
+#define CS11_SW8 0x88
+#define CS12_SW8 0x89
+#define CS13_SW8 0x8A
+#define CS14_SW8 0x8B
+#define CS15_SW8 0x8C
+#define CS16_SW8 0x8D
+#define CS17_SW8 0x8E
+#define CS18_SW8 0x8F
+#define CS1_SW9 0x90
+#define CS2_SW9 0x91
+#define CS3_SW9 0x92
+#define CS4_SW9 0x93
+#define CS5_SW9 0x94
+#define CS6_SW9 0x95
+#define CS7_SW9 0x96
+#define CS8_SW9 0x97
+#define CS9_SW9 0x98
+#define CS10_SW9 0x99
+#define CS11_SW9 0x9A
+#define CS12_SW9 0x9B
+#define CS13_SW9 0x9C
+#define CS14_SW9 0x9D
+#define CS15_SW9 0x9E
+#define CS16_SW9 0x9F
+#define CS17_SW9 0xA0
+#define CS18_SW9 0xA1
+#define CS1_SW10 0xA2
+#define CS2_SW10 0xA3
+#define CS3_SW10 0xA4
+#define CS4_SW10 0xA5
+#define CS5_SW10 0xA6
+#define CS6_SW10 0xA7
+#define CS7_SW10 0xA8
+#define CS8_SW10 0xA9
+#define CS9_SW10 0xAA
+#define CS10_SW10 0xAB
+#define CS11_SW10 0xAC
+#define CS12_SW10 0xAD
+#define CS13_SW10 0xAE
+#define CS14_SW10 0xAF
+#define CS15_SW10 0xB0
+#define CS16_SW10 0xB1
+#define CS17_SW10 0xB2
+#define CS18_SW10 0xB3
+#define CS1_SW11 0xB4
+#define CS2_SW11 0xB5
+#define CS3_SW11 0xB6
+#define CS4_SW11 0xB7
+#define CS5_SW11 0xB8
+#define CS6_SW11 0xB9
+#define CS7_SW11 0xBA
+#define CS8_SW11 0xBB
+#define CS9_SW11 0xBC
+#define CS10_SW11 0xBD
+#define CS11_SW11 0xBE
+#define CS12_SW11 0xBF
+#define CS13_SW11 0xC0
+#define CS14_SW11 0xC1
+#define CS15_SW11 0xC2
+#define CS16_SW11 0xC3
+#define CS17_SW11 0xC4
+#define CS18_SW11 0xC5
+#define CS1_SW12 0xC6
+#define CS2_SW12 0xC7
+#define CS3_SW12 0xC8
+#define CS4_SW12 0xC9
+#define CS5_SW12 0xCA
+#define CS6_SW12 0xCB
+#define CS7_SW12 0xCC
+#define CS8_SW12 0xCD
+#define CS9_SW12 0xCE
+#define CS10_SW12 0xCF
+#define CS11_SW12 0xD0
+#define CS12_SW12 0xD1
+#define CS13_SW12 0xD2
+#define CS14_SW12 0xD3
+#define CS15_SW12 0xD4
+#define CS16_SW12 0xD5
+#define CS17_SW12 0xD6
+#define CS18_SW12 0xD7
diff --git a/drivers/chibios/serial.c b/drivers/chibios/serial.c
index 54f7e1321f..f54fbcee4e 100644
--- a/drivers/chibios/serial.c
+++ b/drivers/chibios/serial.c
@@ -74,21 +74,12 @@ static THD_FUNCTION(Thread1, arg) {
}
}
-static SSTD_t *Transaction_table = NULL;
-static uint8_t Transaction_table_size = 0;
-
-void soft_serial_initiator_init(SSTD_t *sstd_table, int sstd_table_size) {
- Transaction_table = sstd_table;
- Transaction_table_size = (uint8_t)sstd_table_size;
-
+void soft_serial_initiator_init(void) {
serial_output();
serial_high();
}
-void soft_serial_target_init(SSTD_t *sstd_table, int sstd_table_size) {
- Transaction_table = sstd_table;
- Transaction_table_size = (uint8_t)sstd_table_size;
-
+void soft_serial_target_init(void) {
serial_input();
palEnablePadEvent(PAL_PORT(SOFT_SERIAL_PIN), PAL_PAD(SOFT_SERIAL_PIN), PAL_EVENT_MODE_FALLING_EDGE);
@@ -154,16 +145,14 @@ void interrupt_handler(void *arg) {
uint8_t checksum_computed = 0;
int sstd_index = 0;
-#ifdef SERIAL_USE_MULTI_TRANSACTION
sstd_index = serial_read_byte();
sync_send();
-#endif
- SSTD_t *trans = &Transaction_table[sstd_index];
+ split_transaction_desc_t *trans = &split_transaction_table[sstd_index];
for (int i = 0; i < trans->initiator2target_buffer_size; ++i) {
- trans->initiator2target_buffer[i] = serial_read_byte();
+ split_trans_initiator2target_buffer(trans)[i] = serial_read_byte();
sync_send();
- checksum_computed += trans->initiator2target_buffer[i];
+ checksum_computed += split_trans_initiator2target_buffer(trans)[i];
}
checksum_computed ^= 7;
uint8_t checksum_received = serial_read_byte();
@@ -172,12 +161,17 @@ void interrupt_handler(void *arg) {
// wait for the sync to finish sending
serial_delay();
+ // Allow any slave processing to occur
+ if (trans->slave_callback) {
+ trans->slave_callback(trans->initiator2target_buffer_size, split_trans_initiator2target_buffer(trans), trans->target2initiator_buffer_size, split_trans_target2initiator_buffer(trans));
+ }
+
uint8_t checksum = 0;
for (int i = 0; i < trans->target2initiator_buffer_size; ++i) {
- serial_write_byte(trans->target2initiator_buffer[i]);
+ serial_write_byte(split_trans_target2initiator_buffer(trans)[i]);
sync_send();
serial_delay_half();
- checksum += trans->target2initiator_buffer[i];
+ checksum += split_trans_target2initiator_buffer(trans)[i];
}
serial_write_byte(checksum ^ 7);
sync_send();
@@ -206,15 +200,10 @@ void interrupt_handler(void *arg) {
// TRANSACTION_NO_RESPONSE
// TRANSACTION_DATA_ERROR
// this code is very time dependent, so we need to disable interrupts
-#ifndef SERIAL_USE_MULTI_TRANSACTION
-int soft_serial_transaction(void) {
- int sstd_index = 0;
-#else
int soft_serial_transaction(int sstd_index) {
-#endif
-
- if (sstd_index > Transaction_table_size) return TRANSACTION_TYPE_ERROR;
- SSTD_t *trans = &Transaction_table[sstd_index];
+ if (sstd_index > NUM_TOTAL_TRANSACTIONS) return TRANSACTION_TYPE_ERROR;
+ split_transaction_desc_t *trans = &split_transaction_table[sstd_index];
+ if (!trans->status) return TRANSACTION_TYPE_ERROR; // not registered
// TODO: remove extra delay between transactions
serial_delay();
@@ -244,14 +233,13 @@ int soft_serial_transaction(int sstd_index) {
uint8_t checksum = 0;
// send data to the slave
-#ifdef SERIAL_USE_MULTI_TRANSACTION
serial_write_byte(sstd_index); // first chunk is transaction id
sync_recv();
-#endif
+
for (int i = 0; i < trans->initiator2target_buffer_size; ++i) {
- serial_write_byte(trans->initiator2target_buffer[i]);
+ serial_write_byte(split_trans_initiator2target_buffer(trans)[i]);
sync_recv();
- checksum += trans->initiator2target_buffer[i];
+ checksum += split_trans_initiator2target_buffer(trans)[i];
}
serial_write_byte(checksum ^ 7);
sync_recv();
@@ -262,9 +250,9 @@ int soft_serial_transaction(int sstd_index) {
// receive data from the slave
uint8_t checksum_computed = 0;
for (int i = 0; i < trans->target2initiator_buffer_size; ++i) {
- trans->target2initiator_buffer[i] = serial_read_byte();
+ split_trans_target2initiator_buffer(trans)[i] = serial_read_byte();
sync_recv();
- checksum_computed += trans->target2initiator_buffer[i];
+ checksum_computed += split_trans_target2initiator_buffer(trans)[i];
}
checksum_computed ^= 7;
uint8_t checksum_received = serial_read_byte();
diff --git a/drivers/chibios/serial.h b/drivers/chibios/serial.h
deleted file mode 100644
index 0c1857d52e..0000000000
--- a/drivers/chibios/serial.h
+++ /dev/null
@@ -1,62 +0,0 @@
-#pragma once
-
-#include <stdbool.h>
-
-// /////////////////////////////////////////////////////////////////
-// Need Soft Serial defines in config.h
-// /////////////////////////////////////////////////////////////////
-// ex.
-// #define SOFT_SERIAL_PIN ?? // ?? = D0,D1,D2,D3,E6
-// OPTIONAL: #define SELECT_SOFT_SERIAL_SPEED ? // ? = 1,2,3,4,5
-// // 1: about 137kbps (default)
-// // 2: about 75kbps
-// // 3: about 39kbps
-// // 4: about 26kbps
-// // 5: about 20kbps
-//
-// //// USE simple API (using signle-type transaction function)
-// /* nothing */
-// //// USE flexible API (using multi-type transaction function)
-// #define SERIAL_USE_MULTI_TRANSACTION
-//
-// /////////////////////////////////////////////////////////////////
-
-// Soft Serial Transaction Descriptor
-typedef struct _SSTD_t {
- uint8_t *status;
- uint8_t initiator2target_buffer_size;
- uint8_t *initiator2target_buffer;
- uint8_t target2initiator_buffer_size;
- uint8_t *target2initiator_buffer;
-} SSTD_t;
-#define TID_LIMIT(table) (sizeof(table) / sizeof(SSTD_t))
-
-// initiator is transaction start side
-void soft_serial_initiator_init(SSTD_t *sstd_table, int sstd_table_size);
-// target is interrupt accept side
-void soft_serial_target_init(SSTD_t *sstd_table, int sstd_table_size);
-
-// initiator result
-#define TRANSACTION_END 0
-#define TRANSACTION_NO_RESPONSE 0x1
-#define TRANSACTION_DATA_ERROR 0x2
-#define TRANSACTION_TYPE_ERROR 0x4
-#ifndef SERIAL_USE_MULTI_TRANSACTION
-int soft_serial_transaction(void);
-#else
-int soft_serial_transaction(int sstd_index);
-#endif
-
-// target status
-// *SSTD_t.status has
-// initiator:
-// TRANSACTION_END
-// or TRANSACTION_NO_RESPONSE
-// or TRANSACTION_DATA_ERROR
-// target:
-// TRANSACTION_DATA_ERROR
-// or TRANSACTION_ACCEPTED
-#define TRANSACTION_ACCEPTED 0x8
-#ifdef SERIAL_USE_MULTI_TRANSACTION
-int soft_serial_get_and_clean_status(int sstd_index);
-#endif
diff --git a/drivers/chibios/serial_usart.c b/drivers/chibios/serial_usart.c
index cae29388c3..ea4473791c 100644
--- a/drivers/chibios/serial_usart.c
+++ b/drivers/chibios/serial_usart.c
@@ -16,190 +16,300 @@
#include "serial_usart.h"
-#ifndef USE_GPIOV1
-// The default PAL alternate modes are used to signal that the pins are used for USART
-# ifndef SERIAL_USART_TX_PAL_MODE
-# define SERIAL_USART_TX_PAL_MODE 7
+#if defined(SERIAL_USART_CONFIG)
+static SerialConfig serial_config = SERIAL_USART_CONFIG;
+#else
+static SerialConfig serial_config = {
+ .speed = (SERIAL_USART_SPEED), /* speed - mandatory */
+ .cr1 = (SERIAL_USART_CR1),
+ .cr2 = (SERIAL_USART_CR2),
+# if !defined(SERIAL_USART_FULL_DUPLEX)
+ .cr3 = ((SERIAL_USART_CR3) | USART_CR3_HDSEL) /* activate half-duplex mode */
+# else
+ .cr3 = (SERIAL_USART_CR3)
# endif
+};
#endif
-#ifndef SERIAL_USART_DRIVER
-# define SERIAL_USART_DRIVER SD1
-#endif
-
-#ifdef SOFT_SERIAL_PIN
-# define SERIAL_USART_TX_PIN SOFT_SERIAL_PIN
-#endif
-
-static inline msg_t sdWriteHalfDuplex(SerialDriver* driver, uint8_t* data, uint8_t size) {
- msg_t ret = sdWrite(driver, data, size);
+static SerialDriver* serial_driver = &SERIAL_USART_DRIVER;
- // Half duplex requires us to read back the data we just wrote - just throw it away
- uint8_t dump[size];
- sdRead(driver, dump, size);
+static inline bool react_to_transactions(void);
+static inline bool __attribute__((nonnull)) receive(uint8_t* destination, const size_t size);
+static inline bool __attribute__((nonnull)) send(const uint8_t* source, const size_t size);
+static inline int initiate_transaction(uint8_t sstd_index);
+static inline void usart_clear(void);
- return ret;
+/**
+ * @brief Clear the receive input queue.
+ */
+static inline void usart_clear(void) {
+ osalSysLock();
+ bool volatile queue_not_empty = !iqIsEmptyI(&serial_driver->iqueue);
+ osalSysUnlock();
+
+ while (queue_not_empty) {
+ osalSysLock();
+ /* Hard reset the input queue. */
+ iqResetI(&serial_driver->iqueue);
+ osalSysUnlock();
+ /* Allow pending interrupts to preempt.
+ * Do not merge the lock/unlock blocks into one
+ * or the code will not work properly.
+ * The empty read adds a tiny amount of delay. */
+ (void)queue_not_empty;
+ osalSysLock();
+ queue_not_empty = !iqIsEmptyI(&serial_driver->iqueue);
+ osalSysUnlock();
+ }
}
-#undef sdWrite
-#define sdWrite sdWriteHalfDuplex
-static inline msg_t sdWriteTimeoutHalfDuplex(SerialDriver* driver, uint8_t* data, uint8_t size, uint32_t timeout) {
- msg_t ret = sdWriteTimeout(driver, data, size, timeout);
-
- // Half duplex requires us to read back the data we just wrote - just throw it away
- uint8_t dump[size];
- sdReadTimeout(driver, dump, size, timeout);
+/**
+ * @brief Blocking send of buffer with timeout.
+ *
+ * @return true Send success.
+ * @return false Send failed.
+ */
+static inline bool send(const uint8_t* source, const size_t size) {
+ bool success = (size_t)sdWriteTimeout(serial_driver, source, size, TIME_MS2I(SERIAL_USART_TIMEOUT)) == size;
+
+#if !defined(SERIAL_USART_FULL_DUPLEX)
+ if (success) {
+ /* Half duplex fills the input queue with the data we wrote - just throw it away.
+ Under the right circumstances (e.g. bad cables paired with high baud rates)
+ less bytes can be present in the input queue, therefore a timeout is needed. */
+ uint8_t dump[size];
+ return receive(dump, size);
+ }
+#endif
- return ret;
+ return success;
}
-#undef sdWriteTimeout
-#define sdWriteTimeout sdWriteTimeoutHalfDuplex
-static inline void sdClear(SerialDriver* driver) {
- while (sdGetTimeout(driver, TIME_IMMEDIATE) != MSG_TIMEOUT) {
- // Do nothing with the data
- }
+/**
+ * @brief Blocking receive of size * bytes with timeout.
+ *
+ * @return true Receive success.
+ * @return false Receive failed.
+ */
+static inline bool receive(uint8_t* destination, const size_t size) {
+ bool success = (size_t)sdReadTimeout(serial_driver, destination, size, TIME_MS2I(SERIAL_USART_TIMEOUT)) == size;
+ return success;
}
-static SerialConfig sdcfg = {
- (SERIAL_USART_SPEED), // speed - mandatory
- (SERIAL_USART_CR1), // CR1
- (SERIAL_USART_CR2), // CR2
- (SERIAL_USART_CR3) // CR3
-};
-
-void handle_soft_serial_slave(void);
+#if !defined(SERIAL_USART_FULL_DUPLEX)
-/*
- * This thread runs on the slave and responds to transactions initiated
- * by the master
+/**
+ * @brief Initiate pins for USART peripheral. Half-duplex configuration.
*/
-static THD_WORKING_AREA(waSlaveThread, 2048);
-static THD_FUNCTION(SlaveThread, arg) {
- (void)arg;
- chRegSetThreadName("slave_transport");
+__attribute__((weak)) void usart_init(void) {
+# if defined(MCU_STM32)
+# if defined(USE_GPIOV1)
+ palSetLineMode(SERIAL_USART_TX_PIN, PAL_MODE_STM32_ALTERNATE_OPENDRAIN);
+# else
+ palSetLineMode(SERIAL_USART_TX_PIN, PAL_MODE_ALTERNATE(SERIAL_USART_TX_PAL_MODE) | PAL_STM32_OTYPE_OPENDRAIN);
+# endif
- while (true) {
- handle_soft_serial_slave();
- }
+# if defined(USART_REMAP)
+ USART_REMAP;
+# endif
+# else
+# pragma message "usart_init: MCU Familiy not supported by default, please supply your own init code by implementing usart_init() in your keyboard files."
+# endif
}
-__attribute__((weak)) void usart_init(void) {
-#if defined(USE_GPIOV1)
- palSetLineMode(SERIAL_USART_TX_PIN, PAL_MODE_STM32_ALTERNATE_OPENDRAIN);
#else
- palSetLineMode(SERIAL_USART_TX_PIN, PAL_MODE_ALTERNATE(SERIAL_USART_TX_PAL_MODE) | PAL_STM32_OTYPE_OPENDRAIN);
-#endif
-#if defined(USART_REMAP)
+/**
+ * @brief Initiate pins for USART peripheral. Full-duplex configuration.
+ */
+__attribute__((weak)) void usart_init(void) {
+# if defined(MCU_STM32)
+# if defined(USE_GPIOV1)
+ palSetLineMode(SERIAL_USART_TX_PIN, PAL_MODE_STM32_ALTERNATE_PUSHPULL);
+ palSetLineMode(SERIAL_USART_RX_PIN, PAL_MODE_INPUT);
+# else
+ palSetLineMode(SERIAL_USART_TX_PIN, PAL_MODE_ALTERNATE(SERIAL_USART_TX_PAL_MODE) | PAL_STM32_OTYPE_PUSHPULL | PAL_STM32_OSPEED_HIGHEST);
+ palSetLineMode(SERIAL_USART_RX_PIN, PAL_MODE_ALTERNATE(SERIAL_USART_RX_PAL_MODE) | PAL_STM32_OTYPE_PUSHPULL | PAL_STM32_OSPEED_HIGHEST);
+# endif
+
+# if defined(USART_REMAP)
USART_REMAP;
-#endif
+# endif
+# else
+# pragma message "usart_init: MCU Familiy not supported by default, please supply your own init code by implementing usart_init() in your keyboard files."
+# endif
}
-void usart_master_init(void) {
- usart_init();
+#endif
- sdcfg.cr3 |= USART_CR3_HDSEL;
- sdStart(&SERIAL_USART_DRIVER, &sdcfg);
+/**
+ * @brief Overridable master specific initializations.
+ */
+__attribute__((weak, nonnull)) void usart_master_init(SerialDriver** driver) {
+ (void)driver;
+ usart_init();
}
-void usart_slave_init(void) {
+/**
+ * @brief Overridable slave specific initializations.
+ */
+__attribute__((weak, nonnull)) void usart_slave_init(SerialDriver** driver) {
+ (void)driver;
usart_init();
+}
- sdcfg.cr3 |= USART_CR3_HDSEL;
- sdStart(&SERIAL_USART_DRIVER, &sdcfg);
+/**
+ * @brief This thread runs on the slave and responds to transactions initiated
+ * by the master.
+ */
+static THD_WORKING_AREA(waSlaveThread, 1024);
+static THD_FUNCTION(SlaveThread, arg) {
+ (void)arg;
+ chRegSetThreadName("usart_tx_rx");
- // Start transport thread
- chThdCreateStatic(waSlaveThread, sizeof(waSlaveThread), HIGHPRIO, SlaveThread, NULL);
+ while (true) {
+ if (!react_to_transactions()) {
+ /* Clear the receive queue, to start with a clean slate.
+ * Parts of failed transactions or spurious bytes could still be in it. */
+ usart_clear();
+ }
+ }
}
-static SSTD_t* Transaction_table = NULL;
-static uint8_t Transaction_table_size = 0;
+/**
+ * @brief Slave specific initializations.
+ */
+void soft_serial_target_init(void) {
+ usart_slave_init(&serial_driver);
-void soft_serial_initiator_init(SSTD_t* sstd_table, int sstd_table_size) {
- Transaction_table = sstd_table;
- Transaction_table_size = (uint8_t)sstd_table_size;
+ sdStart(serial_driver, &serial_config);
- usart_master_init();
+ /* Start transport thread. */
+ chThdCreateStatic(waSlaveThread, sizeof(waSlaveThread), HIGHPRIO, SlaveThread, NULL);
}
-void soft_serial_target_init(SSTD_t* sstd_table, int sstd_table_size) {
- Transaction_table = sstd_table;
- Transaction_table_size = (uint8_t)sstd_table_size;
+/**
+ * @brief React to transactions started by the master.
+ */
+static inline bool react_to_transactions(void) {
+ /* Wait until there is a transaction for us. */
+ uint8_t sstd_index = (uint8_t)sdGet(serial_driver);
- usart_slave_init();
-}
+ /* Sanity check that we are actually responding to a valid transaction. */
+ if (sstd_index >= NUM_TOTAL_TRANSACTIONS) {
+ return false;
+ }
-void handle_soft_serial_slave(void) {
- uint8_t sstd_index = sdGet(&SERIAL_USART_DRIVER); // first chunk is always transaction id
- SSTD_t* trans = &Transaction_table[sstd_index];
+ split_transaction_desc_t* trans = &split_transaction_table[sstd_index];
- // Always write back the sstd_index as part of a basic handshake
+ /* Send back the handshake which is XORed as a simple checksum,
+ to signal that the slave is ready to receive possible transaction buffers */
sstd_index ^= HANDSHAKE_MAGIC;
- sdWrite(&SERIAL_USART_DRIVER, &sstd_index, sizeof(sstd_index));
+ if (!send(&sstd_index, sizeof(sstd_index))) {
+ *trans->status = TRANSACTION_DATA_ERROR;
+ return false;
+ }
+ /* Receive transaction buffer from the master. If this transaction requires it.*/
if (trans->initiator2target_buffer_size) {
- sdRead(&SERIAL_USART_DRIVER, trans->initiator2target_buffer, trans->initiator2target_buffer_size);
+ if (!receive(split_trans_initiator2target_buffer(trans), trans->initiator2target_buffer_size)) {
+ *trans->status = TRANSACTION_DATA_ERROR;
+ return false;
+ }
}
- if (trans->target2initiator_buffer_size) {
- sdWrite(&SERIAL_USART_DRIVER, trans->target2initiator_buffer, trans->target2initiator_buffer_size);
+ /* Allow any slave processing to occur. */
+ if (trans->slave_callback) {
+ trans->slave_callback(trans->initiator2target_buffer_size, split_trans_initiator2target_buffer(trans), trans->initiator2target_buffer_size, split_trans_target2initiator_buffer(trans));
}
- if (trans->status) {
- *trans->status = TRANSACTION_ACCEPTED;
+ /* Send transaction buffer to the master. If this transaction requires it. */
+ if (trans->target2initiator_buffer_size) {
+ if (!send(split_trans_target2initiator_buffer(trans), trans->target2initiator_buffer_size)) {
+ *trans->status = TRANSACTION_DATA_ERROR;
+ return false;
+ }
}
+
+ *trans->status = TRANSACTION_ACCEPTED;
+ return true;
}
-/////////
-// start transaction by initiator
-//
-// int soft_serial_transaction(int sstd_index)
-//
-// Returns:
-// TRANSACTION_END
-// TRANSACTION_NO_RESPONSE
-// TRANSACTION_DATA_ERROR
-#ifndef SERIAL_USE_MULTI_TRANSACTION
-int soft_serial_transaction(void) {
- uint8_t sstd_index = 0;
-#else
-int soft_serial_transaction(int index) {
- uint8_t sstd_index = index;
+/**
+ * @brief Master specific initializations.
+ */
+void soft_serial_initiator_init(void) {
+ usart_master_init(&serial_driver);
+
+#if defined(MCU_STM32) && defined(SERIAL_USART_PIN_SWAP)
+ serial_config.cr2 |= USART_CR2_SWAP; // master has swapped TX/RX pins
#endif
- if (sstd_index > Transaction_table_size) return TRANSACTION_TYPE_ERROR;
- SSTD_t* trans = &Transaction_table[sstd_index];
- msg_t res = 0;
+ sdStart(serial_driver, &serial_config);
+}
+
+/**
+ * @brief Start transaction from the master half to the slave half.
+ *
+ * @param index Transaction Table index of the transaction to start.
+ * @return int TRANSACTION_NO_RESPONSE in case of Timeout.
+ * TRANSACTION_TYPE_ERROR in case of invalid transaction index.
+ * TRANSACTION_END in case of success.
+ */
+int soft_serial_transaction(int index) {
+ /* Clear the receive queue, to start with a clean slate.
+ * Parts of failed transactions or spurious bytes could still be in it. */
+ usart_clear();
+ return initiate_transaction((uint8_t)index);
+}
+
+/**
+ * @brief Initiate transaction to slave half.
+ */
+static inline int initiate_transaction(uint8_t sstd_index) {
+ /* Sanity check that we are actually starting a valid transaction. */
+ if (sstd_index >= NUM_TOTAL_TRANSACTIONS) {
+ dprintln("USART: Illegal transaction Id.");
+ return TRANSACTION_TYPE_ERROR;
+ }
+
+ split_transaction_desc_t* trans = &split_transaction_table[sstd_index];
- sdClear(&SERIAL_USART_DRIVER);
+ /* Transaction is not registered. Abort. */
+ if (!trans->status) {
+ dprintln("USART: Transaction not registered.");
+ return TRANSACTION_TYPE_ERROR;
+ }
- // First chunk is always transaction id
- sdWriteTimeout(&SERIAL_USART_DRIVER, &sstd_index, sizeof(sstd_index), TIME_MS2I(SERIAL_USART_TIMEOUT));
+ /* Send transaction table index to the slave, which doubles as basic handshake token. */
+ if (!send(&sstd_index, sizeof(sstd_index))) {
+ dprintln("USART: Send Handshake failed.");
+ return TRANSACTION_TYPE_ERROR;
+ }
uint8_t sstd_index_shake = 0xFF;
- // Which we always read back first so that we can error out correctly
- // - due to the half duplex limitations on return codes, we always have to read *something*
- // - without the read, write only transactions *always* succeed, even during the boot process where the slave is not ready
- res = sdReadTimeout(&SERIAL_USART_DRIVER, &sstd_index_shake, sizeof(sstd_index_shake), TIME_MS2I(SERIAL_USART_TIMEOUT));
- if (res < 0 || (sstd_index_shake != (sstd_index ^ HANDSHAKE_MAGIC))) {
- dprintf("serial::usart_shake NO_RESPONSE\n");
+ /* Which we always read back first so that we can error out correctly.
+ * - due to the half duplex limitations on return codes, we always have to read *something*.
+ * - without the read, write only transactions *always* succeed, even during the boot process where the slave is not ready.
+ */
+ if (!receive(&sstd_index_shake, sizeof(sstd_index_shake)) || (sstd_index_shake != (sstd_index ^ HANDSHAKE_MAGIC))) {
+ dprintln("USART: Handshake failed.");
return TRANSACTION_NO_RESPONSE;
}
+ /* Send transaction buffer to the slave. If this transaction requires it. */
if (trans->initiator2target_buffer_size) {
- res = sdWriteTimeout(&SERIAL_USART_DRIVER, trans->initiator2target_buffer, trans->initiator2target_buffer_size, TIME_MS2I(SERIAL_USART_TIMEOUT));
- if (res < 0) {
- dprintf("serial::usart_transmit NO_RESPONSE\n");
+ if (!send(split_trans_initiator2target_buffer(trans), trans->initiator2target_buffer_size)) {
+ dprintln("USART: Send failed.");
return TRANSACTION_NO_RESPONSE;
}
}
+ /* Receive transaction buffer from the slave. If this transaction requires it. */
if (trans->target2initiator_buffer_size) {
- res = sdReadTimeout(&SERIAL_USART_DRIVER, trans->target2initiator_buffer, trans->target2initiator_buffer_size, TIME_MS2I(SERIAL_USART_TIMEOUT));
- if (res < 0) {
- dprintf("serial::usart_receive NO_RESPONSE\n");
+ if (!receive(split_trans_target2initiator_buffer(trans), trans->target2initiator_buffer_size)) {
+ dprintln("USART: Receive failed.");
return TRANSACTION_NO_RESPONSE;
}
}
diff --git a/drivers/chibios/serial_usart.h b/drivers/chibios/serial_usart.h
index fee7b4d159..c64e15566f 100644
--- a/drivers/chibios/serial_usart.h
+++ b/drivers/chibios/serial_usart.h
@@ -23,19 +23,45 @@
#include <ch.h>
#include <hal.h>
-#ifndef USART_CR1_M0
+#if !defined(SERIAL_USART_DRIVER)
+# define SERIAL_USART_DRIVER SD1
+#endif
+
+#if !defined(USE_GPIOV1)
+/* The default PAL alternate modes are used to signal that the pins are used for USART. */
+# if !defined(SERIAL_USART_TX_PAL_MODE)
+# define SERIAL_USART_TX_PAL_MODE 7
+# endif
+# if !defined(SERIAL_USART_RX_PAL_MODE)
+# define SERIAL_USART_RX_PAL_MODE 7
+# endif
+#endif
+
+#if defined(SOFT_SERIAL_PIN)
+# define SERIAL_USART_TX_PIN SOFT_SERIAL_PIN
+#endif
+
+#if !defined(SERIAL_USART_TX_PIN)
+# define SERIAL_USART_TX_PIN A9
+#endif
+
+#if !defined(SERIAL_USART_RX_PIN)
+# define SERIAL_USART_RX_PIN A10
+#endif
+
+#if !defined(USART_CR1_M0)
# define USART_CR1_M0 USART_CR1_M // some platforms (f1xx) dont have this so
#endif
-#ifndef SERIAL_USART_CR1
+#if !defined(SERIAL_USART_CR1)
# define SERIAL_USART_CR1 (USART_CR1_PCE | USART_CR1_PS | USART_CR1_M0) // parity enable, odd parity, 9 bit length
#endif
-#ifndef SERIAL_USART_CR2
+#if !defined(SERIAL_USART_CR2)
# define SERIAL_USART_CR2 (USART_CR2_STOP_1) // 2 stop bits
#endif
-#ifndef SERIAL_USART_CR3
+#if !defined(SERIAL_USART_CR3)
# define SERIAL_USART_CR3 0
#endif
@@ -61,11 +87,11 @@
} while (0)
#endif
-#ifndef SELECT_SOFT_SERIAL_SPEED
+#if !defined(SELECT_SOFT_SERIAL_SPEED)
# define SELECT_SOFT_SERIAL_SPEED 1
#endif
-#ifdef SERIAL_USART_SPEED
+#if defined(SERIAL_USART_SPEED)
// Allow advanced users to directly set SERIAL_USART_SPEED
#elif SELECT_SOFT_SERIAL_SPEED == 0
# define SERIAL_USART_SPEED 460800
@@ -83,7 +109,7 @@
# error invalid SELECT_SOFT_SERIAL_SPEED value
#endif
-#ifndef SERIAL_USART_TIMEOUT
+#if !defined(SERIAL_USART_TIMEOUT)
# define SERIAL_USART_TIMEOUT 100
#endif
diff --git a/drivers/chibios/serial_usart_duplex.c b/drivers/chibios/serial_usart_duplex.c
deleted file mode 100644
index cc9b889ac2..0000000000
--- a/drivers/chibios/serial_usart_duplex.c
+++ /dev/null
@@ -1,261 +0,0 @@
-/* Copyright 2021 QMK
- *
- * 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 3 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 <http://www.gnu.org/licenses/>.
- */
-
-#include "serial_usart.h"
-
-#include <stdatomic.h>
-
-#if !defined(USE_GPIOV1)
-// The default PAL alternate modes are used to signal that the pins are used for USART
-# if !defined(SERIAL_USART_TX_PAL_MODE)
-# define SERIAL_USART_TX_PAL_MODE 7
-# endif
-# if !defined(SERIAL_USART_RX_PAL_MODE)
-# define SERIAL_USART_RX_PAL_MODE 7
-# endif
-#endif
-
-#if !defined(SERIAL_USART_DRIVER)
-# define SERIAL_USART_DRIVER UARTD1
-#endif
-
-#if !defined(SERIAL_USART_TX_PIN)
-# define SERIAL_USART_TX_PIN A9
-#endif
-
-#if !defined(SERIAL_USART_RX_PIN)
-# define SERIAL_USART_RX_PIN A10
-#endif
-
-#define SIGNAL_HANDSHAKE_RECEIVED 0x1
-
-void handle_transactions_slave(uint8_t sstd_index);
-static void receive_transaction_handshake(UARTDriver* uartp, uint16_t received_handshake);
-
-/*
- * UART driver configuration structure. We use the blocking DMA enabled API and
- * the rxchar callback to receive handshake tokens but only on the slave halve.
- */
-// clang-format off
-static UARTConfig uart_config = {
- .txend1_cb = NULL,
- .txend2_cb = NULL,
- .rxend_cb = NULL,
- .rxchar_cb = NULL,
- .rxerr_cb = NULL,
- .timeout_cb = NULL,
- .speed = (SERIAL_USART_SPEED),
- .cr1 = (SERIAL_USART_CR1),
- .cr2 = (SERIAL_USART_CR2),
- .cr3 = (SERIAL_USART_CR3)
-};
-// clang-format on
-
-static SSTD_t* Transaction_table = NULL;
-static uint8_t Transaction_table_size = 0;
-static atomic_uint_least8_t handshake = 0xFF;
-static thread_reference_t tp_target = NULL;
-
-/*
- * This callback is invoked when a character is received but the application
- * was not ready to receive it, the character is passed as parameter.
- * Receive transaction table index from initiator, which doubles as basic handshake token. */
-static void receive_transaction_handshake(UARTDriver* uartp, uint16_t received_handshake) {
- /* Check if received handshake is not a valid transaction id.
- * Please note that we can still catch a seemingly valid handshake
- * i.e. a byte from a ongoing transfer which is in the allowed range.
- * So this check mainly prevents any obviously wrong handshakes and
- * subsequent wakeups of the receiving thread, which is a costly operation. */
- if (received_handshake > Transaction_table_size) {
- return;
- }
-
- handshake = (uint8_t)received_handshake;
- chSysLockFromISR();
- /* Wakeup receiving thread to start a transaction. */
- chEvtSignalI(tp_target, (eventmask_t)SIGNAL_HANDSHAKE_RECEIVED);
- chSysUnlockFromISR();
-}
-
-__attribute__((weak)) void usart_init(void) {
-#if defined(USE_GPIOV1)
- palSetLineMode(SERIAL_USART_TX_PIN, PAL_MODE_STM32_ALTERNATE_PUSHPULL);
- palSetLineMode(SERIAL_USART_RX_PIN, PAL_MODE_INPUT);
-#else
- palSetLineMode(SERIAL_USART_TX_PIN, PAL_MODE_ALTERNATE(SERIAL_USART_TX_PAL_MODE) | PAL_STM32_OTYPE_PUSHPULL | PAL_STM32_OSPEED_HIGHEST);
- palSetLineMode(SERIAL_USART_RX_PIN, PAL_MODE_ALTERNATE(SERIAL_USART_RX_PAL_MODE) | PAL_STM32_OTYPE_PUSHPULL | PAL_STM32_OSPEED_HIGHEST);
-#endif
-}
-
-/*
- * This thread runs on the slave half and reacts to transactions initiated from the master.
- */
-static THD_WORKING_AREA(waSlaveThread, 1024);
-static THD_FUNCTION(SlaveThread, arg) {
- (void)arg;
- chRegSetThreadName("slave_usart_tx_rx");
-
- while (true) {
- /* We sleep as long as there is no handshake waiting for us. */
- chEvtWaitAny((eventmask_t)SIGNAL_HANDSHAKE_RECEIVED);
- handle_transactions_slave(handshake);
- }
-}
-
-void soft_serial_target_init(SSTD_t* const sstd_table, int sstd_table_size) {
- Transaction_table = sstd_table;
- Transaction_table_size = (uint8_t)sstd_table_size;
- usart_init();
-
-#if defined(USART_REMAP)
- USART_REMAP;
-#endif
-
- tp_target = chThdCreateStatic(waSlaveThread, sizeof(waSlaveThread), HIGHPRIO, SlaveThread, NULL);
-
- // Start receiving handshake tokens on slave halve
- uart_config.rxchar_cb = receive_transaction_handshake;
- uartStart(&SERIAL_USART_DRIVER, &uart_config);
-}
-
-/**
- * @brief React to transactions started by the master.
- * This version uses duplex send and receive usart pheriphals and DMA backed transfers.
- */
-void inline handle_transactions_slave(uint8_t sstd_index) {
- size_t buffer_size = 0;
- msg_t msg = 0;
- SSTD_t* trans = &Transaction_table[sstd_index];
-
- /* Send back the handshake which is XORed as a simple checksum,
- to signal that the slave is ready to receive possible transaction buffers */
- sstd_index ^= HANDSHAKE_MAGIC;
- buffer_size = (size_t)sizeof(sstd_index);
- msg = uartSendTimeout(&SERIAL_USART_DRIVER, &buffer_size, &sstd_index, TIME_MS2I(SERIAL_USART_TIMEOUT));
-
- if (msg != MSG_OK) {
- if (trans->status) {
- *trans->status = TRANSACTION_NO_RESPONSE;
- }
- return;
- }
-
- /* Receive transaction buffer from the master. If this transaction requires it.*/
- buffer_size = (size_t)trans->initiator2target_buffer_size;
- if (buffer_size) {
- msg = uartReceiveTimeout(&SERIAL_USART_DRIVER, &buffer_size, trans->initiator2target_buffer, TIME_MS2I(SERIAL_USART_TIMEOUT));
- if (msg != MSG_OK) {
- if (trans->status) {
- *trans->status = TRANSACTION_NO_RESPONSE;
- }
- return;
- }
- }
-
- /* Send transaction buffer to the master. If this transaction requires it. */
- buffer_size = (size_t)trans->target2initiator_buffer_size;
- if (buffer_size) {
- msg = uartSendFullTimeout(&SERIAL_USART_DRIVER, &buffer_size, trans->target2initiator_buffer, TIME_MS2I(SERIAL_USART_TIMEOUT));
- if (msg != MSG_OK) {
- if (trans->status) {
- *trans->status = TRANSACTION_NO_RESPONSE;
- }
- return;
- }
- }
-
- if (trans->status) {
- *trans->status = TRANSACTION_ACCEPTED;
- }
-}
-
-void soft_serial_initiator_init(SSTD_t* const sstd_table, int sstd_table_size) {
- Transaction_table = sstd_table;
- Transaction_table_size = (uint8_t)sstd_table_size;
- usart_init();
-
-#if defined(SERIAL_USART_PIN_SWAP)
- uart_config.cr2 |= USART_CR2_SWAP; // master has swapped TX/RX pins
-#endif
-
-#if defined(USART_REMAP)
- USART_REMAP;
-#endif
-
- uartStart(&SERIAL_USART_DRIVER, &uart_config);
-}
-
-/**
- * @brief Start transaction from the master to the slave.
- * This version uses duplex send and receive usart pheriphals and DMA backed transfers.
- *
- * @param index Transaction Table index of the transaction to start.
- * @return int TRANSACTION_NO_RESPONSE in case of Timeout.
- * TRANSACTION_TYPE_ERROR in case of invalid transaction index.
- * TRANSACTION_END in case of success.
- */
-#if !defined(SERIAL_USE_MULTI_TRANSACTION)
-int soft_serial_transaction(void) {
- uint8_t sstd_index = 0;
-#else
-int soft_serial_transaction(int index) {
- uint8_t sstd_index = index;
-#endif
-
- if (sstd_index > Transaction_table_size) {
- return TRANSACTION_TYPE_ERROR;
- }
-
- SSTD_t* const trans = &Transaction_table[sstd_index];
- msg_t msg = 0;
- size_t buffer_size = (size_t)sizeof(sstd_index);
-
- /* Send transaction table index to the slave, which doubles as basic handshake token. */
- uartSendFullTimeout(&SERIAL_USART_DRIVER, &buffer_size, &sstd_index, TIME_MS2I(SERIAL_USART_TIMEOUT));
-
- uint8_t sstd_index_shake = 0xFF;
- buffer_size = (size_t)sizeof(sstd_index_shake);
-
- /* Receive the handshake token from the slave. The token was XORed by the slave as a simple checksum.
- If the tokens match, the master will start to send and receive possible transaction buffers. */
- msg = uartReceiveTimeout(&SERIAL_USART_DRIVER, &buffer_size, &sstd_index_shake, TIME_MS2I(SERIAL_USART_TIMEOUT));
- if (msg != MSG_OK || (sstd_index_shake != (sstd_index ^ HANDSHAKE_MAGIC))) {
- dprintln("USART: Handshake Failed");
- return TRANSACTION_NO_RESPONSE;
- }
-
- /* Send transaction buffer to the slave. If this transaction requires it. */
- buffer_size = (size_t)trans->initiator2target_buffer_size;
- if (buffer_size) {
- msg = uartSendFullTimeout(&SERIAL_USART_DRIVER, &buffer_size, trans->initiator2target_buffer, TIME_MS2I(SERIAL_USART_TIMEOUT));
- if (msg != MSG_OK) {
- dprintln("USART: Send Failed");
- return TRANSACTION_NO_RESPONSE;
- }
- }
-
- /* Receive transaction buffer from the slave. If this transaction requires it. */
- buffer_size = (size_t)trans->target2initiator_buffer_size;
- if (buffer_size) {
- msg = uartReceiveTimeout(&SERIAL_USART_DRIVER, &buffer_size, trans->target2initiator_buffer, TIME_MS2I(SERIAL_USART_TIMEOUT));
- if (msg != MSG_OK) {
- dprintln("USART: Receive Failed");
- return TRANSACTION_NO_RESPONSE;
- }
- }
-
- return TRANSACTION_END;
-}
diff --git a/drivers/chibios/spi_master.c b/drivers/chibios/spi_master.c
index 4852a6eba4..28ddcbb2ba 100644
--- a/drivers/chibios/spi_master.c
+++ b/drivers/chibios/spi_master.c
@@ -18,8 +18,13 @@
#include "timer.h"
-static pin_t currentSlavePin = NO_PIN;
-static SPIConfig spiConfig = {false, NULL, 0, 0, 0, 0};
+static pin_t currentSlavePin = NO_PIN;
+
+#if defined(K20x) || defined(KL2x)
+static SPIConfig spiConfig = {NULL, 0, 0, 0};
+#else
+static SPIConfig spiConfig = {false, NULL, 0, 0, 0, 0};
+#endif
__attribute__((weak)) void spi_init(void) {
static bool is_initialised = false;
@@ -27,15 +32,15 @@ __attribute__((weak)) void spi_init(void) {
is_initialised = true;
// Try releasing special pins for a short time
- palSetPadMode(PAL_PORT(SPI_SCK_PIN), PAL_PAD(SPI_SCK_PIN), PAL_MODE_INPUT);
- palSetPadMode(PAL_PORT(SPI_MOSI_PIN), PAL_PAD(SPI_MOSI_PIN), PAL_MODE_INPUT);
- palSetPadMode(PAL_PORT(SPI_MISO_PIN), PAL_PAD(SPI_MISO_PIN), PAL_MODE_INPUT);
+ setPinInput(SPI_SCK_PIN);
+ setPinInput(SPI_MOSI_PIN);
+ setPinInput(SPI_MISO_PIN);
chThdSleepMilliseconds(10);
#if defined(USE_GPIOV1)
- palSetPadMode(PAL_PORT(SPI_SCK_PIN), PAL_PAD(SPI_SCK_PIN), PAL_MODE_STM32_ALTERNATE_PUSHPULL);
- palSetPadMode(PAL_PORT(SPI_MOSI_PIN), PAL_PAD(SPI_MOSI_PIN), PAL_MODE_STM32_ALTERNATE_PUSHPULL);
- palSetPadMode(PAL_PORT(SPI_MISO_PIN), PAL_PAD(SPI_MISO_PIN), PAL_MODE_STM32_ALTERNATE_PUSHPULL);
+ palSetPadMode(PAL_PORT(SPI_SCK_PIN), PAL_PAD(SPI_SCK_PIN), SPI_SCK_PAL_MODE);
+ palSetPadMode(PAL_PORT(SPI_MOSI_PIN), PAL_PAD(SPI_MOSI_PIN), SPI_MOSI_PAL_MODE);
+ palSetPadMode(PAL_PORT(SPI_MISO_PIN), PAL_PAD(SPI_MISO_PIN), SPI_MISO_PAL_MODE);
#else
palSetPadMode(PAL_PORT(SPI_SCK_PIN), PAL_PAD(SPI_SCK_PIN), PAL_MODE_ALTERNATE(SPI_SCK_PAL_MODE) | PAL_STM32_OTYPE_PUSHPULL | PAL_STM32_OSPEED_HIGHEST);
palSetPadMode(PAL_PORT(SPI_MOSI_PIN), PAL_PAD(SPI_MOSI_PIN), PAL_MODE_ALTERNATE(SPI_MOSI_PAL_MODE) | PAL_STM32_OTYPE_PUSHPULL | PAL_STM32_OSPEED_HIGHEST);
@@ -58,6 +63,54 @@ bool spi_start(pin_t slavePin, bool lsbFirst, uint8_t mode, uint16_t divisor) {
return false;
}
+#if defined(K20x) || defined(KL2x)
+ spiConfig.tar0 = SPIx_CTARn_FMSZ(7) | SPIx_CTARn_ASC(1);
+
+ if (lsbFirst) {
+ spiConfig.tar0 |= SPIx_CTARn_LSBFE;
+ }
+
+ switch (mode) {
+ case 0:
+ break;
+ case 1:
+ spiConfig.tar0 |= SPIx_CTARn_CPHA;
+ break;
+ case 2:
+ spiConfig.tar0 |= SPIx_CTARn_CPOL;
+ break;
+ case 3:
+ spiConfig.tar0 |= SPIx_CTARn_CPHA | SPIx_CTARn_CPOL;
+ break;
+ }
+
+ switch (roundedDivisor) {
+ case 2:
+ spiConfig.tar0 |= SPIx_CTARn_BR(0);
+ break;
+ case 4:
+ spiConfig.tar0 |= SPIx_CTARn_BR(1);
+ break;
+ case 8:
+ spiConfig.tar0 |= SPIx_CTARn_BR(3);
+ break;
+ case 16:
+ spiConfig.tar0 |= SPIx_CTARn_BR(4);
+ break;
+ case 32:
+ spiConfig.tar0 |= SPIx_CTARn_BR(5);
+ break;
+ case 64:
+ spiConfig.tar0 |= SPIx_CTARn_BR(6);
+ break;
+ case 128:
+ spiConfig.tar0 |= SPIx_CTARn_BR(7);
+ break;
+ case 256:
+ spiConfig.tar0 |= SPIx_CTARn_BR(8);
+ break;
+ }
+#else
spiConfig.cr1 = 0;
if (lsbFirst) {
@@ -103,6 +156,7 @@ bool spi_start(pin_t slavePin, bool lsbFirst, uint8_t mode, uint16_t divisor) {
spiConfig.cr1 |= SPI_CR1_BR_2 | SPI_CR1_BR_1 | SPI_CR1_BR_0;
break;
}
+#endif
currentSlavePin = slavePin;
spiConfig.ssport = PAL_PORT(slavePin);
diff --git a/drivers/chibios/spi_master.h b/drivers/chibios/spi_master.h
index e93580e319..b5a6ef1437 100644
--- a/drivers/chibios/spi_master.h
+++ b/drivers/chibios/spi_master.h
@@ -21,6 +21,7 @@
#include <stdbool.h>
#include "gpio.h"
+#include "chibios_config.h"
#ifndef SPI_DRIVER
# define SPI_DRIVER SPID2
@@ -31,7 +32,11 @@
#endif
#ifndef SPI_SCK_PAL_MODE
-# define SPI_SCK_PAL_MODE 5
+# if defined(USE_GPIOV1)
+# define SPI_SCK_PAL_MODE PAL_MODE_STM32_ALTERNATE_PUSHPULL
+# else
+# define SPI_SCK_PAL_MODE 5
+# endif
#endif
#ifndef SPI_MOSI_PIN
@@ -39,7 +44,11 @@
#endif
#ifndef SPI_MOSI_PAL_MODE
-# define SPI_MOSI_PAL_MODE 5
+# if defined(USE_GPIOV1)
+# define SPI_MOSI_PAL_MODE PAL_MODE_STM32_ALTERNATE_PUSHPULL
+# else
+# define SPI_MOSI_PAL_MODE 5
+# endif
#endif
#ifndef SPI_MISO_PIN
@@ -47,7 +56,11 @@
#endif
#ifndef SPI_MISO_PAL_MODE
-# define SPI_MISO_PAL_MODE 5
+# if defined(USE_GPIOV1)
+# define SPI_MISO_PAL_MODE PAL_MODE_STM32_ALTERNATE_PUSHPULL
+# else
+# define SPI_MISO_PAL_MODE 5
+# endif
#endif
typedef int16_t spi_status_t;
diff --git a/drivers/eeprom/eeprom_i2c.c b/drivers/eeprom/eeprom_i2c.c
index 4210f06f9f..8e80ff544f 100644
--- a/drivers/eeprom/eeprom_i2c.c
+++ b/drivers/eeprom/eeprom_i2c.c
@@ -16,6 +16,9 @@
#include <stdint.h>
#include <string.h>
+#if defined(EXTERNAL_EEPROM_WP_PIN)
+# include "gpio.h"
+#endif
/*
Note that the implementations of eeprom_XXXX_YYYY on AVR are normally
@@ -50,7 +53,14 @@ static inline void fill_target_address(uint8_t *buffer, const void *addr) {
}
}
-void eeprom_driver_init(void) { i2c_init(); }
+void eeprom_driver_init(void) {
+ i2c_init();
+#if defined(EXTERNAL_EEPROM_WP_PIN)
+ /* We are setting the WP pin to high in a way that requires at least two bit-flips to change back to 0 */
+ writePin(EXTERNAL_EEPROM_WP_PIN, 1);
+ setPinInputHigh(EXTERNAL_EEPROM_WP_PIN);
+#endif
+}
void eeprom_driver_erase(void) {
#if defined(CONSOLE_ENABLE) && defined(DEBUG_EEPROM_OUTPUT)
@@ -89,6 +99,11 @@ void eeprom_write_block(const void *buf, void *addr, size_t len) {
uint8_t * read_buf = (uint8_t *)buf;
uintptr_t target_addr = (uintptr_t)addr;
+#if defined(EXTERNAL_EEPROM_WP_PIN)
+ setPinOutput(EXTERNAL_EEPROM_WP_PIN);
+ writePin(EXTERNAL_EEPROM_WP_PIN, 0);
+#endif
+
while (len > 0) {
uintptr_t page_offset = target_addr % EXTERNAL_EEPROM_PAGE_SIZE;
int write_length = EXTERNAL_EEPROM_PAGE_SIZE - page_offset;
@@ -116,4 +131,10 @@ void eeprom_write_block(const void *buf, void *addr, size_t len) {
target_addr += write_length;
len -= write_length;
}
+
+#if defined(EXTERNAL_EEPROM_WP_PIN)
+ /* We are setting the WP pin to high in a way that requires at least two bit-flips to change back to 0 */
+ writePin(EXTERNAL_EEPROM_WP_PIN, 1);
+ setPinInputHigh(EXTERNAL_EEPROM_WP_PIN);
+#endif
}
diff --git a/drivers/haptic/haptic.c b/drivers/haptic/haptic.c
index de3f400527..3fab1be1ae 100644
--- a/drivers/haptic/haptic.c
+++ b/drivers/haptic/haptic.c
@@ -291,6 +291,73 @@ void haptic_play(void) {
#endif
}
+__attribute__((weak)) bool get_haptic_enabled_key(uint16_t keycode, keyrecord_t *record) {
+ switch(keycode) {
+# ifdef NO_HAPTIC_MOD
+ case QK_MOD_TAP ... QK_MOD_TAP_MAX:
+ if (record->tap.count == 0) return false;
+ break;
+ case QK_LAYER_TAP_TOGGLE ... QK_LAYER_TAP_TOGGLE_MAX:
+ if (record->tap.count != TAPPING_TOGGLE) return false;
+ break;
+ case QK_LAYER_TAP ... QK_LAYER_TAP_MAX:
+ if (record->tap.count == 0) return false;
+ break;
+ case KC_LCTRL ... KC_RGUI:
+ case QK_MOMENTARY ... QK_MOMENTARY_MAX:
+# endif
+# ifdef NO_HAPTIC_FN
+ case KC_FN0 ... KC_FN31:
+# endif
+# ifdef NO_HAPTIC_ALPHA
+ case KC_A ... KC_Z:
+# endif
+# ifdef NO_HAPTIC_PUNCTUATION
+ case KC_ENTER:
+ case KC_ESCAPE:
+ case KC_BSPACE:
+ case KC_SPACE:
+ case KC_MINUS:
+ case KC_EQUAL:
+ case KC_LBRACKET:
+ case KC_RBRACKET:
+ case KC_BSLASH:
+ case KC_NONUS_HASH:
+ case KC_SCOLON:
+ case KC_QUOTE:
+ case KC_GRAVE:
+ case KC_COMMA:
+ case KC_SLASH:
+ case KC_DOT:
+ case KC_NONUS_BSLASH:
+# endif
+# ifdef NO_HAPTIC_LOCKKEYS
+ case KC_CAPSLOCK:
+ case KC_SCROLLLOCK:
+ case KC_NUMLOCK:
+# endif
+# ifdef NO_HAPTIC_NAV
+ case KC_PSCREEN:
+ case KC_PAUSE:
+ case KC_INSERT:
+ case KC_DELETE:
+ case KC_PGDOWN:
+ case KC_PGUP:
+ case KC_LEFT:
+ case KC_UP:
+ case KC_RIGHT:
+ case KC_DOWN:
+ case KC_END:
+ case KC_HOME:
+# endif
+# ifdef NO_HAPTIC_NUMERIC
+ case KC_1 ... KC_0:
+# endif
+ return false;
+ }
+ return true;
+}
+
bool process_haptic(uint16_t keycode, keyrecord_t *record) {
if (keycode == HPT_ON && record->event.pressed) {
haptic_enable();
@@ -335,12 +402,12 @@ bool process_haptic(uint16_t keycode, keyrecord_t *record) {
if (haptic_config.enable) {
if (record->event.pressed) {
// keypress
- if (haptic_config.feedback < 2) {
+ if (haptic_config.feedback < 2 && get_haptic_enabled_key(keycode, record)) {
haptic_play();
}
} else {
// keyrelease
- if (haptic_config.feedback > 0) {
+ if (haptic_config.feedback > 0 && get_haptic_enabled_key(keycode, record)) {
haptic_play();
}
}
diff --git a/drivers/issi/is31fl3737.c b/drivers/issi/is31fl3737.c
index 8647c93cc1..30906b4840 100644
--- a/drivers/issi/is31fl3737.c
+++ b/drivers/issi/is31fl3737.c
@@ -19,6 +19,7 @@
#include "is31fl3737.h"
#include "i2c_master.h"
#include "wait.h"
+#include "progmem.h"
// This is a 7-bit address, that gets left-shifted and bit 0
// set to 0 for write, 1 for read (as per I2C protocol)
@@ -65,11 +66,12 @@ uint8_t g_twi_transfer_buffer[20];
// We could optimize this and take out the unused registers from these
// buffers and the transfers in IS31FL3737_write_pwm_buffer() but it's
// probably not worth the extra complexity.
+
uint8_t g_pwm_buffer[DRIVER_COUNT][192];
-bool g_pwm_buffer_update_required = false;
+bool g_pwm_buffer_update_required[DRIVER_COUNT] = {false};
-uint8_t g_led_control_registers[DRIVER_COUNT][24] = {{0}};
-bool g_led_control_registers_update_required = false;
+uint8_t g_led_control_registers[DRIVER_COUNT][24] = {0};
+bool g_led_control_registers_update_required[DRIVER_COUNT] = {false};
void IS31FL3737_write_register(uint8_t addr, uint8_t reg, uint8_t data) {
g_twi_transfer_buffer[0] = reg;
@@ -153,12 +155,14 @@ void IS31FL3737_init(uint8_t addr) {
void IS31FL3737_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) {
if (index >= 0 && index < DRIVER_LED_TOTAL) {
- is31_led led = g_is31_leds[index];
-
- g_pwm_buffer[led.driver][led.r] = red;
- g_pwm_buffer[led.driver][led.g] = green;
- g_pwm_buffer[led.driver][led.b] = blue;
- g_pwm_buffer_update_required = true;
+ // copy the led config from progmem to SRAM
+ is31_led led;
+ memcpy_P(&led, (&g_is31_leds[index]), sizeof(led));
+
+ g_pwm_buffer[led.driver][led.r] = red;
+ g_pwm_buffer[led.driver][led.g] = green;
+ g_pwm_buffer[led.driver][led.b] = blue;
+ g_pwm_buffer_update_required[led.driver] = true;
}
}
@@ -169,7 +173,9 @@ void IS31FL3737_set_color_all(uint8_t red, uint8_t green, uint8_t blue) {
}
void IS31FL3737_set_led_control_register(uint8_t index, bool red, bool green, bool blue) {
- is31_led led = g_is31_leds[index];
+ // copy the led config from progmem to SRAM
+ is31_led led;
+ memcpy_P(&led, (&g_is31_leds[index]), sizeof(led));
uint8_t control_register_r = led.r / 8;
uint8_t control_register_g = led.g / 8;
@@ -194,30 +200,28 @@ void IS31FL3737_set_led_control_register(uint8_t index, bool red, bool green, bo
g_led_control_registers[led.driver][control_register_b] &= ~(1 << bit_b);
}
- g_led_control_registers_update_required = true;
+ g_led_control_registers_update_required[led.driver] = true;
}
-void IS31FL3737_update_pwm_buffers(uint8_t addr1, uint8_t addr2) {
- if (g_pwm_buffer_update_required) {
+void IS31FL3737_update_pwm_buffers(uint8_t addr, uint8_t index) {
+ if (g_pwm_buffer_update_required[index]) {
// Firstly we need to unlock the command register and select PG1
- IS31FL3737_write_register(addr1, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5);
- IS31FL3737_write_register(addr1, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM);
+ IS31FL3737_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5);
+ IS31FL3737_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM);
- IS31FL3737_write_pwm_buffer(addr1, g_pwm_buffer[0]);
- // IS31FL3737_write_pwm_buffer(addr2, g_pwm_buffer[1]);
+ IS31FL3737_write_pwm_buffer(addr, g_pwm_buffer[index]);
}
- g_pwm_buffer_update_required = false;
+ g_pwm_buffer_update_required[index] = false;
}
-void IS31FL3737_update_led_control_registers(uint8_t addr1, uint8_t addr2) {
- if (g_led_control_registers_update_required) {
+void IS31FL3737_update_led_control_registers(uint8_t addr, uint8_t index) {
+ if (g_led_control_registers_update_required[index]) {
// Firstly we need to unlock the command register and select PG0
- IS31FL3737_write_register(addr1, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5);
- IS31FL3737_write_register(addr1, ISSI_COMMANDREGISTER, ISSI_PAGE_LEDCONTROL);
+ IS31FL3737_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5);
+ IS31FL3737_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_LEDCONTROL);
for (int i = 0; i < 24; i++) {
- IS31FL3737_write_register(addr1, i, g_led_control_registers[0][i]);
- // IS31FL3737_write_register(addr2, i, g_led_control_registers[1][i]);
+ IS31FL3737_write_register(addr, i, g_led_control_registers[index][i]);
}
- g_led_control_registers_update_required = false;
}
+ g_led_control_registers_update_required[index] = false;
}
diff --git a/drivers/lcd/st7565.c b/drivers/lcd/st7565.c
new file mode 100644
index 0000000000..49b13c00f1
--- /dev/null
+++ b/drivers/lcd/st7565.c
@@ -0,0 +1,496 @@
+/*
+Copyright 2021
+
+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 <http://www.gnu.org/licenses/>.
+*/
+
+#include "st7565.h"
+
+#include <string.h>
+
+#include "keyboard.h"
+#include "progmem.h"
+#include "timer.h"
+#include "wait.h"
+
+#include ST7565_FONT_H
+
+// Fundamental Commands
+#define CONTRAST 0x81
+#define DISPLAY_ALL_ON 0xA5
+#define DISPLAY_ALL_ON_RESUME 0xA4
+#define NORMAL_DISPLAY 0xA6
+#define INVERT_DISPLAY 0xA7
+#define DISPLAY_ON 0xAF
+#define DISPLAY_OFF 0xAE
+#define NOP 0xE3
+
+// Addressing Setting Commands
+#define PAM_SETCOLUMN_LSB 0x00
+#define PAM_SETCOLUMN_MSB 0x10
+#define PAM_PAGE_ADDR 0xB0 // 0xb0 -- 0xb7
+
+// Hardware Configuration Commands
+#define DISPLAY_START_LINE 0x40
+#define SEGMENT_REMAP 0xA0
+#define SEGMENT_REMAP_INV 0xA1
+#define COM_SCAN_INC 0xC0
+#define COM_SCAN_DEC 0xC8
+#define LCD_BIAS_7 0xA3
+#define LCD_BIAS_9 0xA2
+#define RESISTOR_RATIO 0x20
+#define POWER_CONTROL 0x28
+
+// Misc defines
+#ifndef ST7565_BLOCK_COUNT
+# define ST7565_BLOCK_COUNT (sizeof(ST7565_BLOCK_TYPE) * 8)
+#endif
+#ifndef ST7565_BLOCK_SIZE
+# define ST7565_BLOCK_SIZE (ST7565_MATRIX_SIZE / ST7565_BLOCK_COUNT)
+#endif
+
+#define ST7565_ALL_BLOCKS_MASK (((((ST7565_BLOCK_TYPE)1 << (ST7565_BLOCK_COUNT - 1)) - 1) << 1) | 1)
+
+#define HAS_FLAGS(bits, flags) ((bits & flags) == flags)
+
+// Display buffer's is the same as the display memory layout
+// this is so we don't end up with rounding errors with
+// parts of the display unusable or don't get cleared correctly
+// and also allows for drawing & inverting
+uint8_t st7565_buffer[ST7565_MATRIX_SIZE];
+uint8_t * st7565_cursor;
+ST7565_BLOCK_TYPE st7565_dirty = 0;
+bool st7565_initialized = false;
+bool st7565_active = false;
+bool st7565_inverted = false;
+display_rotation_t st7565_rotation = DISPLAY_ROTATION_0;
+#if ST7565_TIMEOUT > 0
+uint32_t st7565_timeout;
+#endif
+#if ST7565_UPDATE_INTERVAL > 0
+uint16_t st7565_update_timeout;
+#endif
+
+// Flips the rendering bits for a character at the current cursor position
+static void InvertCharacter(uint8_t *cursor) {
+ const uint8_t *end = cursor + ST7565_FONT_WIDTH;
+ while (cursor < end) {
+ *cursor = ~(*cursor);
+ cursor++;
+ }
+}
+
+bool st7565_init(display_rotation_t rotation) {
+ setPinOutput(ST7565_A0_PIN);
+ writePinHigh(ST7565_A0_PIN);
+ setPinOutput(ST7565_RST_PIN);
+ writePinHigh(ST7565_RST_PIN);
+
+ st7565_rotation = st7565_init_user(rotation);
+
+ spi_init();
+ spi_start(ST7565_SS_PIN, false, 0, ST7565_SPI_CLK_DIVISOR);
+
+ st7565_reset();
+
+ st7565_send_cmd(LCD_BIAS_7);
+ if (!HAS_FLAGS(st7565_rotation, DISPLAY_ROTATION_180)) {
+ st7565_send_cmd(SEGMENT_REMAP);
+ st7565_send_cmd(COM_SCAN_DEC);
+ } else {
+ st7565_send_cmd(SEGMENT_REMAP_INV);
+ st7565_send_cmd(COM_SCAN_INC);
+ }
+ st7565_send_cmd(DISPLAY_START_LINE | 0x00);
+ st7565_send_cmd(CONTRAST);
+ st7565_send_cmd(ST7565_CONTRAST);
+ st7565_send_cmd(RESISTOR_RATIO | 0x01);
+ st7565_send_cmd(POWER_CONTROL | 0x04);
+ wait_ms(50);
+ st7565_send_cmd(POWER_CONTROL | 0x06);
+ wait_ms(50);
+ st7565_send_cmd(POWER_CONTROL | 0x07);
+ wait_ms(10);
+ st7565_send_cmd(DISPLAY_ON);
+ st7565_send_cmd(DISPLAY_ALL_ON_RESUME);
+ st7565_send_cmd(NORMAL_DISPLAY);
+
+ spi_stop();
+
+#if ST7565_TIMEOUT > 0
+ st7565_timeout = timer_read32() + ST7565_TIMEOUT;
+#endif
+
+ st7565_clear();
+ st7565_initialized = true;
+ st7565_active = true;
+ return true;
+}
+
+__attribute__((weak)) display_rotation_t st7565_init_user(display_rotation_t rotation) { return rotation; }
+
+void st7565_clear(void) {
+ memset(st7565_buffer, 0, sizeof(st7565_buffer));
+ st7565_cursor = &st7565_buffer[0];
+ st7565_dirty = ST7565_ALL_BLOCKS_MASK;
+}
+
+uint8_t crot(uint8_t a, int8_t n) {
+ const uint8_t mask = 0x7;
+ n &= mask;
+ return a << n | a >> (-n & mask);
+}
+
+void st7565_render(void) {
+ if (!st7565_initialized) {
+ return;
+ }
+
+ // Do we have work to do?
+ st7565_dirty &= ST7565_ALL_BLOCKS_MASK;
+ if (!st7565_dirty) {
+ return;
+ }
+
+ // Find first dirty block
+ uint8_t update_start = 0;
+ while (!(st7565_dirty & ((ST7565_BLOCK_TYPE)1 << update_start))) {
+ ++update_start;
+ }
+
+ // Calculate commands to set memory addressing bounds.
+ uint8_t start_page = ST7565_BLOCK_SIZE * update_start / ST7565_DISPLAY_WIDTH;
+ uint8_t start_column = ST7565_BLOCK_SIZE * update_start % ST7565_DISPLAY_WIDTH;
+ // IC has 132 segment drivers, for panels with less width we need to offset the starting column
+ if (HAS_FLAGS(st7565_rotation, DISPLAY_ROTATION_180)) {
+ start_column += (132 - ST7565_DISPLAY_WIDTH);
+ }
+
+ spi_start(ST7565_SS_PIN, false, 0, ST7565_SPI_CLK_DIVISOR);
+
+ st7565_send_cmd(PAM_PAGE_ADDR | start_page);
+ st7565_send_cmd(PAM_SETCOLUMN_LSB | ((ST7565_COLUMN_OFFSET + start_column) & 0x0f));
+ st7565_send_cmd(PAM_SETCOLUMN_MSB | ((ST7565_COLUMN_OFFSET + start_column) >> 4 & 0x0f));
+
+ st7565_send_data(&st7565_buffer[ST7565_BLOCK_SIZE * update_start], ST7565_BLOCK_SIZE);
+
+ // Turn on display if it is off
+ st7565_on();
+
+ // Clear dirty flag
+ st7565_dirty &= ~((ST7565_BLOCK_TYPE)1 << update_start);
+}
+
+void st7565_set_cursor(uint8_t col, uint8_t line) {
+ uint16_t index = line * ST7565_DISPLAY_WIDTH + col * ST7565_FONT_WIDTH;
+
+ // Out of bounds?
+ if (index >= ST7565_MATRIX_SIZE) {
+ index = 0;
+ }
+
+ st7565_cursor = &st7565_buffer[index];
+}
+
+void st7565_advance_page(bool clearPageRemainder) {
+ uint16_t index = st7565_cursor - &st7565_buffer[0];
+ uint8_t remaining = ST7565_DISPLAY_WIDTH - (index % ST7565_DISPLAY_WIDTH);
+
+ if (clearPageRemainder) {
+ // Remaining Char count
+ remaining = remaining / ST7565_FONT_WIDTH;
+
+ // Write empty character until next line
+ while (remaining--) st7565_write_char(' ', false);
+ } else {
+ // Next page index out of bounds?
+ if (index + remaining >= ST7565_MATRIX_SIZE) {
+ index = 0;
+ remaining = 0;
+ }
+
+ st7565_cursor = &st7565_buffer[index + remaining];
+ }
+}
+
+void st7565_advance_char(void) {
+ uint16_t nextIndex = st7565_cursor - &st7565_buffer[0] + ST7565_FONT_WIDTH;
+ uint8_t remainingSpace = ST7565_DISPLAY_WIDTH - (nextIndex % ST7565_DISPLAY_WIDTH);
+
+ // Do we have enough space on the current line for the next character
+ if (remainingSpace < ST7565_FONT_WIDTH) {
+ nextIndex += remainingSpace;
+ }
+
+ // Did we go out of bounds
+ if (nextIndex >= ST7565_MATRIX_SIZE) {
+ nextIndex = 0;
+ }
+
+ // Update cursor position
+ st7565_cursor = &st7565_buffer[nextIndex];
+}
+
+// Main handler that writes character data to the display buffer
+void st7565_write_char(const char data, bool invert) {
+ // Advance to the next line if newline
+ if (data == '\n') {
+ // Old source wrote ' ' until end of line...
+ st7565_advance_page(true);
+ return;
+ }
+
+ if (data == '\r') {
+ st7565_advance_page(false);
+ return;
+ }
+
+ // copy the current render buffer to check for dirty after
+ static uint8_t st7565_temp_buffer[ST7565_FONT_WIDTH];
+ memcpy(&st7565_temp_buffer, st7565_cursor, ST7565_FONT_WIDTH);
+
+ _Static_assert(sizeof(font) >= ((ST7565_FONT_END + 1 - ST7565_FONT_START) * ST7565_FONT_WIDTH), "ST7565_FONT_END references outside array");
+
+ // set the reder buffer data
+ uint8_t cast_data = (uint8_t)data; // font based on unsigned type for index
+ if (cast_data < ST7565_FONT_START || cast_data > ST7565_FONT_END) {
+ memset(st7565_cursor, 0x00, ST7565_FONT_WIDTH);
+ } else {
+ const uint8_t *glyph = &font[(cast_data - ST7565_FONT_START) * ST7565_FONT_WIDTH];
+ memcpy_P(st7565_cursor, glyph, ST7565_FONT_WIDTH);
+ }
+
+ // Invert if needed
+ if (invert) {
+ InvertCharacter(st7565_cursor);
+ }
+
+ // Dirty check
+ if (memcmp(&st7565_temp_buffer, st7565_cursor, ST7565_FONT_WIDTH)) {
+ uint16_t index = st7565_cursor - &st7565_buffer[0];
+ st7565_dirty |= ((ST7565_BLOCK_TYPE)1 << (index / ST7565_BLOCK_SIZE));
+ // Edgecase check if the written data spans the 2 chunks
+ st7565_dirty |= ((ST7565_BLOCK_TYPE)1 << ((index + ST7565_FONT_WIDTH - 1) / ST7565_BLOCK_SIZE));
+ }
+
+ // Finally move to the next char
+ st7565_advance_char();
+}
+
+void st7565_write(const char *data, bool invert) {
+ const char *end = data + strlen(data);
+ while (data < end) {
+ st7565_write_char(*data, invert);
+ data++;
+ }
+}
+
+void st7565_write_ln(const char *data, bool invert) {
+ st7565_write(data, invert);
+ st7565_advance_page(true);
+}
+
+void st7565_pan(bool left) {
+ uint16_t i = 0;
+ for (uint16_t y = 0; y < ST7565_DISPLAY_HEIGHT / 8; y++) {
+ if (left) {
+ for (uint16_t x = 0; x < ST7565_DISPLAY_WIDTH - 1; x++) {
+ i = y * ST7565_DISPLAY_WIDTH + x;
+ st7565_buffer[i] = st7565_buffer[i + 1];
+ }
+ } else {
+ for (uint16_t x = ST7565_DISPLAY_WIDTH - 1; x > 0; x--) {
+ i = y * ST7565_DISPLAY_WIDTH + x;
+ st7565_buffer[i] = st7565_buffer[i - 1];
+ }
+ }
+ }
+ st7565_dirty = ST7565_ALL_BLOCKS_MASK;
+}
+
+display_buffer_reader_t st7565_read_raw(uint16_t start_index) {
+ if (start_index > ST7565_MATRIX_SIZE) start_index = ST7565_MATRIX_SIZE;
+ display_buffer_reader_t ret_reader;
+ ret_reader.current_element = &st7565_buffer[start_index];
+ ret_reader.remaining_element_count = ST7565_MATRIX_SIZE - start_index;
+ return ret_reader;
+}
+
+void st7565_write_raw_byte(const char data, uint16_t index) {
+ if (index > ST7565_MATRIX_SIZE) index = ST7565_MATRIX_SIZE;
+ if (st7565_buffer[index] == data) return;
+ st7565_buffer[index] = data;
+ st7565_dirty |= ((ST7565_BLOCK_TYPE)1 << (index / ST7565_BLOCK_SIZE));
+}
+
+void st7565_write_raw(const char *data, uint16_t size) {
+ uint16_t cursor_start_index = st7565_cursor - &st7565_buffer[0];
+ if ((size + cursor_start_index) > ST7565_MATRIX_SIZE) size = ST7565_MATRIX_SIZE - cursor_start_index;
+ for (uint16_t i = cursor_start_index; i < cursor_start_index + size; i++) {
+ uint8_t c = *data++;
+ if (st7565_buffer[i] == c) continue;
+ st7565_buffer[i] = c;
+ st7565_dirty |= ((ST7565_BLOCK_TYPE)1 << (i / ST7565_BLOCK_SIZE));
+ }
+}
+
+void st7565_write_pixel(uint8_t x, uint8_t y, bool on) {
+ if (x >= ST7565_DISPLAY_WIDTH) {
+ return;
+ }
+ uint16_t index = x + (y / 8) * ST7565_DISPLAY_WIDTH;
+ if (index >= ST7565_MATRIX_SIZE) {
+ return;
+ }
+ uint8_t data = st7565_buffer[index];
+ if (on) {
+ data |= (1 << (y % 8));
+ } else {
+ data &= ~(1 << (y % 8));
+ }
+ if (st7565_buffer[index] != data) {
+ st7565_buffer[index] = data;
+ st7565_dirty |= ((ST7565_BLOCK_TYPE)1 << (index / ST7565_BLOCK_SIZE));
+ }
+}
+
+#if defined(__AVR__)
+void st7565_write_P(const char *data, bool invert) {
+ uint8_t c = pgm_read_byte(data);
+ while (c != 0) {
+ st7565_write_char(c, invert);
+ c = pgm_read_byte(++data);
+ }
+}
+
+void st7565_write_ln_P(const char *data, bool invert) {
+ st7565_write_P(data, invert);
+ st7565_advance_page(true);
+}
+
+void st7565_write_raw_P(const char *data, uint16_t size) {
+ uint16_t cursor_start_index = st7565_cursor - &st7565_buffer[0];
+ if ((size + cursor_start_index) > ST7565_MATRIX_SIZE) size = ST7565_MATRIX_SIZE - cursor_start_index;
+ for (uint16_t i = cursor_start_index; i < cursor_start_index + size; i++) {
+ uint8_t c = pgm_read_byte(data++);
+ if (st7565_buffer[i] == c) continue;
+ st7565_buffer[i] = c;
+ st7565_dirty |= ((ST7565_BLOCK_TYPE)1 << (i / ST7565_BLOCK_SIZE));
+ }
+}
+#endif // defined(__AVR__)
+
+bool st7565_on(void) {
+ if (!st7565_initialized) {
+ return st7565_active;
+ }
+
+#if ST7565_TIMEOUT > 0
+ st7565_timeout = timer_read32() + ST7565_TIMEOUT;
+#endif
+
+ if (!st7565_active) {
+ spi_start(ST7565_SS_PIN, false, 0, ST7565_SPI_CLK_DIVISOR);
+ st7565_send_cmd(DISPLAY_ON);
+ spi_stop();
+ st7565_active = true;
+ st7565_on_user();
+ }
+ return st7565_active;
+}
+
+__attribute__((weak)) void st7565_on_user(void) {}
+
+bool st7565_off(void) {
+ if (!st7565_initialized) {
+ return !st7565_active;
+ }
+
+ if (st7565_active) {
+ spi_start(ST7565_SS_PIN, false, 0, ST7565_SPI_CLK_DIVISOR);
+ st7565_send_cmd(DISPLAY_OFF);
+ spi_stop();
+ st7565_active = false;
+ st7565_off_user();
+ }
+ return !st7565_active;
+}
+
+__attribute__((weak)) void st7565_off_user(void) {}
+
+bool st7565_is_on(void) { return st7565_active; }
+
+bool st7565_invert(bool invert) {
+ if (!st7565_initialized) {
+ return st7565_inverted;
+ }
+
+ if (invert != st7565_inverted) {
+ spi_start(ST7565_SS_PIN, false, 0, ST7565_SPI_CLK_DIVISOR);
+ st7565_send_cmd(invert ? INVERT_DISPLAY : NORMAL_DISPLAY);
+ spi_stop();
+ st7565_inverted = invert;
+ }
+ return st7565_inverted;
+}
+
+uint8_t st7565_max_chars(void) { return ST7565_DISPLAY_WIDTH / ST7565_FONT_WIDTH; }
+
+uint8_t st7565_max_lines(void) { return ST7565_DISPLAY_HEIGHT / ST7565_FONT_HEIGHT; }
+
+void st7565_task(void) {
+ if (!st7565_initialized) {
+ return;
+ }
+
+#if ST7565_UPDATE_INTERVAL > 0
+ if (timer_elapsed(st7565_update_timeout) >= ST7565_UPDATE_INTERVAL) {
+ st7565_update_timeout = timer_read();
+ st7565_set_cursor(0, 0);
+ st7565_task_user();
+ }
+#else
+ st7565_set_cursor(0, 0);
+ st7565_task_user();
+#endif
+
+ // Smart render system, no need to check for dirty
+ st7565_render();
+
+ // Display timeout check
+#if ST7565_TIMEOUT > 0
+ if (st7565_active && timer_expired32(timer_read32(), st7565_timeout)) {
+ st7565_off();
+ }
+#endif
+}
+
+__attribute__((weak)) void st7565_task_user(void) {}
+
+void st7565_reset(void) {
+ writePinLow(ST7565_RST_PIN);
+ wait_ms(20);
+ writePinHigh(ST7565_RST_PIN);
+ wait_ms(20);
+}
+
+spi_status_t st7565_send_cmd(uint8_t cmd) {
+ writePinLow(ST7565_A0_PIN);
+ return spi_write(cmd);
+}
+
+spi_status_t st7565_send_data(uint8_t *data, uint16_t length) {
+ writePinHigh(ST7565_A0_PIN);
+ return spi_transmit(data, length);
+}
diff --git a/drivers/lcd/st7565.h b/drivers/lcd/st7565.h
new file mode 100644
index 0000000000..d453dbe6da
--- /dev/null
+++ b/drivers/lcd/st7565.h
@@ -0,0 +1,219 @@
+/*
+Copyright 2021
+
+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 <http://www.gnu.org/licenses/>.
+*/
+
+#pragma once
+
+#include <stdint.h>
+#include <stdbool.h>
+
+#include "spi_master.h"
+
+#ifndef ST7565_DISPLAY_WIDTH
+# define ST7565_DISPLAY_WIDTH 128
+#endif
+#ifndef ST7565_DISPLAY_HEIGHT
+# define ST7565_DISPLAY_HEIGHT 32
+#endif
+#ifndef ST7565_MATRIX_SIZE
+# define ST7565_MATRIX_SIZE (ST7565_DISPLAY_HEIGHT / 8 * ST7565_DISPLAY_WIDTH) // 1024 (compile time mathed)
+#endif
+#ifndef ST7565_BLOCK_TYPE
+# define ST7565_BLOCK_TYPE uint16_t
+#endif
+#ifndef ST7565_BLOCK_COUNT
+# define ST7565_BLOCK_COUNT (sizeof(ST7565_BLOCK_TYPE) * 8) // 32 (compile time mathed)
+#endif
+#ifndef ST7565_BLOCK_SIZE
+# define ST7565_BLOCK_SIZE (ST7565_MATRIX_SIZE / ST7565_BLOCK_COUNT) // 32 (compile time mathed)
+#endif
+
+// the column address corresponding to the first column in the display hardware
+#if !defined(ST7565_COLUMN_OFFSET)
+# define ST7565_COLUMN_OFFSET 0
+#endif
+
+// spi clock divisor
+#if !defined(ST7565_SPI_CLK_DIVISOR)
+# define ST7565_SPI_CLK_DIVISOR 4
+#endif
+
+// Custom font file to use
+#if !defined(ST7565_FONT_H)
+# define ST7565_FONT_H "glcdfont.c"
+#endif
+// unsigned char value of the first character in the font file
+#if !defined(ST7565_FONT_START)
+# define ST7565_FONT_START 0
+#endif
+// unsigned char value of the last character in the font file
+#if !defined(ST7565_FONT_END)
+# define ST7565_FONT_END 223
+#endif
+// Font render width
+#if !defined(ST7565_FONT_WIDTH)
+# define ST7565_FONT_WIDTH 6
+#endif
+// Font render height
+#if !defined(ST7565_FONT_HEIGHT)
+# define ST7565_FONT_HEIGHT 8
+#endif
+// Default contrast level
+#if !defined(ST7565_CONTRAST)
+# define ST7565_CONTRAST 32
+#endif
+
+#if !defined(ST7565_TIMEOUT)
+# if defined(ST7565_DISABLE_TIMEOUT)
+# define ST7565_TIMEOUT 0
+# else
+# define ST7565_TIMEOUT 60000
+# endif
+#endif
+
+#if !defined(ST7565_UPDATE_INTERVAL) && defined(SPLIT_KEYBOARD)
+# define ST7565_UPDATE_INTERVAL 50
+#endif
+
+typedef struct __attribute__((__packed__)) {
+ uint8_t *current_element;
+ uint16_t remaining_element_count;
+} display_buffer_reader_t;
+
+// Rotation enum values are flags
+typedef enum { DISPLAY_ROTATION_0, DISPLAY_ROTATION_180 } display_rotation_t;
+
+// Initialize the display, rotating the rendered output based on the define passed in.
+// Returns true if the display was initialized successfully
+bool st7565_init(display_rotation_t rotation);
+
+// Called at the start of st7565_init, weak function overridable by the user
+// rotation - the value passed into st7565_init
+// Return new display_rotation_t if you want to override default rotation
+display_rotation_t st7565_init_user(display_rotation_t rotation);
+
+// Clears the display buffer, resets cursor position to 0, and sets the buffer to dirty for rendering
+void st7565_clear(void);
+
+// Renders the dirty chunks of the buffer to display
+void st7565_render(void);
+
+// Moves cursor to character position indicated by column and line, wraps if out of bounds
+// Max column denoted by 'st7565_max_chars()' and max lines by 'st7565_max_lines()' functions
+void st7565_set_cursor(uint8_t col, uint8_t line);
+
+// Advances the cursor to the next page, writing ' ' if true
+// Wraps to the begining when out of bounds
+void st7565_advance_page(bool clearPageRemainder);
+
+// Moves the cursor forward 1 character length
+// Advance page if there is not enough room for the next character
+// Wraps to the begining when out of bounds
+void st7565_advance_char(void);
+
+// Writes a single character to the buffer at current cursor position
+// Advances the cursor while writing, inverts the pixels if true
+// Main handler that writes character data to the display buffer
+void st7565_write_char(const char data, bool invert);
+
+// Writes a string to the buffer at current cursor position
+// Advances the cursor while writing, inverts the pixels if true
+void st7565_write(const char *data, bool invert);
+
+// Writes a string to the buffer at current cursor position
+// Advances the cursor while writing, inverts the pixels if true
+// Advances the cursor to the next page, wiring ' ' to the remainder of the current page
+void st7565_write_ln(const char *data, bool invert);
+
+// Pans the buffer to the right (or left by passing true) by moving contents of the buffer
+// Useful for moving the screen in preparation for new drawing
+void st7565_pan(bool left);
+
+// Returns a pointer to the requested start index in the buffer plus remaining
+// buffer length as struct
+display_buffer_reader_t st7565_read_raw(uint16_t start_index);
+
+// Writes a string to the buffer at current cursor position
+void st7565_write_raw(const char *data, uint16_t size);
+
+// Writes a single byte into the buffer at the specified index
+void st7565_write_raw_byte(const char data, uint16_t index);
+
+// Sets a specific pixel on or off
+// Coordinates start at top-left and go right and down for positive x and y
+void st7565_write_pixel(uint8_t x, uint8_t y, bool on);
+
+#if defined(__AVR__)
+// Writes a PROGMEM string to the buffer at current cursor position
+// Advances the cursor while writing, inverts the pixels if true
+// Remapped to call 'void st7565_write(const char *data, bool invert);' on ARM
+void st7565_write_P(const char *data, bool invert);
+
+// Writes a PROGMEM string to the buffer at current cursor position
+// Advances the cursor while writing, inverts the pixels if true
+// Advances the cursor to the next page, wiring ' ' to the remainder of the current page
+// Remapped to call 'void st7565_write_ln(const char *data, bool invert);' on ARM
+void st7565_write_ln_P(const char *data, bool invert);
+
+// Writes a PROGMEM string to the buffer at current cursor position
+void st7565_write_raw_P(const char *data, uint16_t size);
+#else
+# define st7565_write_P(data, invert) st7565_write(data, invert)
+# define st7565_write_ln_P(data, invert) st7565_write_ln(data, invert)
+# define st7565_write_raw_P(data, size) st7565_write_raw(data, size)
+#endif // defined(__AVR__)
+
+// Can be used to manually turn on the screen if it is off
+// Returns true if the screen was on or turns on
+bool st7565_on(void);
+
+// Called when st7565_on() turns on the screen, weak function overridable by the user
+// Not called if the screen is already on
+void st7565_on_user(void);
+
+// Can be used to manually turn off the screen if it is on
+// Returns true if the screen was off or turns off
+bool st7565_off(void);
+
+// Called when st7565_off() turns off the screen, weak function overridable by the user
+// Not called if the screen is already off
+void st7565_off_user(void);
+
+// Returns true if the screen is currently on, false if it is
+// not
+bool st7565_is_on(void);
+
+// Basically it's st7565_render, but with timeout management and st7565_task_user calling!
+void st7565_task(void);
+
+// Called at the start of st7565_task, weak function overridable by the user
+void st7565_task_user(void);
+
+// Inverts the display
+// Returns true if the screen was or is inverted
+bool st7565_invert(bool invert);
+
+// Returns the maximum number of characters that will fit on a line
+uint8_t st7565_max_chars(void);
+
+// Returns the maximum number of lines that will fit on the display
+uint8_t st7565_max_lines(void);
+
+void st7565_reset(void);
+
+spi_status_t st7565_send_cmd(uint8_t cmd);
+
+spi_status_t st7565_send_data(uint8_t *data, uint16_t length);
diff --git a/drivers/oled/oled_driver.c b/drivers/oled/oled_driver.c
index 8e5ed5f070..7d41978905 100644
--- a/drivers/oled/oled_driver.c
+++ b/drivers/oled/oled_driver.c
@@ -34,6 +34,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DISPLAY_ALL_ON 0xA5
#define DISPLAY_ALL_ON_RESUME 0xA4
#define NORMAL_DISPLAY 0xA6
+#define INVERT_DISPLAY 0xA7
#define DISPLAY_ON 0xAF
#define DISPLAY_OFF 0xAE
#define NOP 0xE3
@@ -114,6 +115,7 @@ OLED_BLOCK_TYPE oled_dirty = 0;
bool oled_initialized = false;
bool oled_active = false;
bool oled_scrolling = false;
+bool oled_inverted = false;
uint8_t oled_brightness = OLED_BRIGHTNESS;
oled_rotation_t oled_rotation = 0;
uint8_t oled_rotation_width = 0;
@@ -690,6 +692,30 @@ bool oled_scroll_off(void) {
return !oled_scrolling;
}
+bool oled_invert(bool invert) {
+ if (!oled_initialized) {
+ return oled_inverted;
+ }
+
+ if (invert && !oled_inverted) {
+ static const uint8_t PROGMEM display_inverted[] = {I2C_CMD, INVERT_DISPLAY};
+ if (I2C_TRANSMIT_P(display_inverted) != I2C_STATUS_SUCCESS) {
+ print("oled_invert cmd failed\n");
+ return oled_inverted;
+ }
+ oled_inverted = true;
+ } else if (!invert && oled_inverted) {
+ static const uint8_t PROGMEM display_normal[] = {I2C_CMD, NORMAL_DISPLAY};
+ if (I2C_TRANSMIT_P(display_normal) != I2C_STATUS_SUCCESS) {
+ print("oled_invert cmd failed\n");
+ return oled_inverted;
+ }
+ oled_inverted = false;
+ }
+
+ return oled_inverted;
+}
+
uint8_t oled_max_chars(void) {
if (!HAS_FLAGS(oled_rotation, OLED_ROTATION_90)) {
return OLED_DISPLAY_WIDTH / OLED_FONT_WIDTH;
diff --git a/drivers/oled/oled_driver.h b/drivers/oled/oled_driver.h
index a6b85f37e6..fc68f0ec95 100644
--- a/drivers/oled/oled_driver.h
+++ b/drivers/oled/oled_driver.h
@@ -313,6 +313,10 @@ bool oled_scroll_left(void);
// Returns true if the screen was not scrolling or stops scrolling
bool oled_scroll_off(void);
+// Inverts the display
+// Returns true if the screen was or is inverted
+bool oled_invert(bool invert);
+
// Returns the maximum number of characters that will fit on a line
uint8_t oled_max_chars(void);
diff --git a/keyboards/ploopyco/adns5050.c b/drivers/sensors/adns5050.c
index e12e56f20c..e7273977d5 100644
--- a/keyboards/ploopyco/adns5050.c
+++ b/drivers/sensors/adns5050.c
@@ -19,20 +19,16 @@
#include "adns5050.h"
-#include "quantum.h"
#include "wait.h"
-
-#ifdef CONSOLE_ENABLE
-# include "print.h"
-#endif
+#include "debug.h"
+#include "print.h"
+#include "gpio.h"
#ifndef OPTIC_ROTATED
# define OPTIC_ROTATED false
#endif
// Definitions for the ADNS serial line.
-// These really ought to be defined in your config.h, but defaults are
-// here if you're really lazy.
#ifndef ADNS_SCLK_PIN
# define ADNS_SCLK_PIN B7
#endif
diff --git a/keyboards/ploopyco/adns5050.h b/drivers/sensors/adns5050.h
index ff8e8f78e9..ff8e8f78e9 100644
--- a/keyboards/ploopyco/adns5050.h
+++ b/drivers/sensors/adns5050.h
diff --git a/keyboards/oddball/adns/adns.c b/drivers/sensors/adns9800.c
index 9338808ff7..36213179f7 100644
--- a/keyboards/oddball/adns/adns.c
+++ b/drivers/sensors/adns9800.c
@@ -17,7 +17,7 @@
#include "spi_master.h"
#include "quantum.h"
#include "adns9800_srom_A6.h"
-#include "adns.h"
+#include "adns9800.h"
// registers
#define REG_Product_ID 0x00
diff --git a/keyboards/oddball/adns/adns.h b/drivers/sensors/adns9800.h
index 2f50b8f1be..2f50b8f1be 100644
--- a/keyboards/oddball/adns/adns.h
+++ b/drivers/sensors/adns9800.h
diff --git a/keyboards/oddball/adns/adns9800_srom_A6.h b/drivers/sensors/adns9800_srom_A6.h
index f5b3abeb62..f5b3abeb62 100644
--- a/keyboards/oddball/adns/adns9800_srom_A6.h
+++ b/drivers/sensors/adns9800_srom_A6.h
diff --git a/keyboards/draculad/keymaps/pimoroni/pimoroni_trackball.c b/drivers/sensors/pimoroni_trackball.c
index c4f4a0441a..c0ac644f70 100644
--- a/keyboards/draculad/keymaps/pimoroni/pimoroni_trackball.c
+++ b/drivers/sensors/pimoroni_trackball.c
@@ -26,8 +26,8 @@ static float precisionSpeed = 1;
static uint16_t i2c_timeout_timer;
-#ifndef I2C_TIMEOUT
-# define I2C_TIMEOUT 100
+#ifndef PIMORONI_I2C_TIMEOUT
+# define PIMORONI_I2C_TIMEOUT 100
#endif
#ifndef I2C_WAITCHECK
# define I2C_WAITCHECK 1000
@@ -38,7 +38,7 @@ static uint16_t i2c_timeout_timer;
void trackball_set_rgbw(uint8_t red, uint8_t green, uint8_t blue, uint8_t white) {
uint8_t data[] = {0x00, red, green, blue, white};
- i2c_transmit(TRACKBALL_WRITE, data, sizeof(data), I2C_TIMEOUT);
+ i2c_transmit(TRACKBALL_WRITE, data, sizeof(data), PIMORONI_I2C_TIMEOUT);
}
int16_t mouse_offset(uint8_t positive, uint8_t negative, int16_t scale) {
@@ -68,59 +68,19 @@ __attribute__((weak)) void trackball_check_click(bool pressed, report_mouse_t* m
}
}
-bool process_record_kb(uint16_t keycode, keyrecord_t* record) {
- if (true) {
- xprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed);
- }
-
-
- if (!process_record_user(keycode, record)) { return false; }
-
-/* If Mousekeys is disabled, then use handle the mouse button
- * keycodes. This makes things simpler, and allows usage of
- * the keycodes in a consistent manner. But only do this if
- * Mousekeys is not enable, so it's not handled twice.
- */
-#ifndef MOUSEKEY_ENABLE
- if (IS_MOUSEKEY_BUTTON(keycode)) {
- report_mouse_t currentReport = pointing_device_get_report();
- if (record->event.pressed) {
- currentReport.buttons |= 1 << (keycode - KC_MS_BTN1);
- } else {
- currentReport.buttons &= ~(1 << (keycode - KC_MS_BTN1));
- }
- pointing_device_set_report(currentReport);
- pointing_device_send();
- }
-#endif
-
- return true;
-}
-
-void trackball_register_button(bool pressed, enum mouse_buttons button) {
- report_mouse_t currentReport = pointing_device_get_report();
- if (pressed) {
- currentReport.buttons |= button;
- } else {
- currentReport.buttons &= ~button;
- }
- pointing_device_set_report(currentReport);
-}
-
float trackball_get_precision(void) { return precisionSpeed; }
void trackball_set_precision(float precision) { precisionSpeed = precision; }
bool trackball_is_scrolling(void) { return scrolling; }
void trackball_set_scrolling(bool scroll) { scrolling = scroll; }
-
-__attribute__((weak)) void pointing_device_init(void) { trackball_set_rgbw(0x80, 0x00, 0x00, 0x00); }
+__attribute__((weak)) void pointing_device_init(void) { i2c_init(); trackball_set_rgbw(0x00, 0x00, 0x00, 0x00); }
void pointing_device_task(void) {
static bool debounce;
static uint16_t debounce_timer;
uint8_t state[5] = {};
if (timer_elapsed(i2c_timeout_timer) > I2C_WAITCHECK) {
- if (i2c_readReg(TRACKBALL_WRITE, 0x04, state, 5, I2C_TIMEOUT) == I2C_STATUS_SUCCESS) {
+ if (i2c_readReg(TRACKBALL_READ, 0x04, state, 5, PIMORONI_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) {
if (!state[4] && !debounce) {
if (scrolling) {
#ifdef PIMORONI_TRACKBALL_INVERT_X
@@ -159,7 +119,10 @@ void pointing_device_task(void) {
if (timer_elapsed(debounce_timer) > MOUSE_DEBOUNCE) debounce = false;
report_mouse_t mouse = pointing_device_get_report();
- // trackball_check_click(state[4] & (1 << 7), &mouse);
+
+#ifdef PIMORONI_TRACKBALL_CLICK
+ trackball_check_click(state[4] & (1 << 7), &mouse);
+#endif
#ifndef PIMORONI_TRACKBALL_ROTATE
update_member(&mouse.x, &x_offset);
diff --git a/users/drashna/pimoroni_trackball.h b/drivers/sensors/pimoroni_trackball.h
index a30fb0bb8c..a30fb0bb8c 100644
--- a/users/drashna/pimoroni_trackball.h
+++ b/drivers/sensors/pimoroni_trackball.h
diff --git a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/pmw3360.c b/drivers/sensors/pmw3360.c
index 59e3495127..91ee87b957 100644
--- a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/pmw3360.c
+++ b/drivers/sensors/pmw3360.c
@@ -16,8 +16,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifdef POINTING_DEVICE_ENABLE
-
#include "wait.h"
#include "debug.h"
#include "print.h"
@@ -29,17 +27,26 @@ bool _inBurst = false;
#ifndef PMW_CPI
# define PMW_CPI 1600
#endif
+#ifndef PMW_CLOCK_SPEED
+# define PMW_CLOCK_SPEED 70000000
+#endif
+#ifndef SPI_MODE
+# define SPI_MODE 3
+#endif
#ifndef SPI_DIVISOR
-# define SPI_DIVISOR 2
+# define SPI_DIVISOR (F_CPU / PMW_CLOCK_SPEED)
#endif
#ifndef ROTATIONAL_TRANSFORM_ANGLE
# define ROTATIONAL_TRANSFORM_ANGLE 0x00
#endif
+#ifndef PMW_CS_PIN
+# define PMW_CS_PIN SPI_SS_PIN
+#endif
void print_byte(uint8_t byte) { dprintf("%c%c%c%c%c%c%c%c|", (byte & 0x80 ? '1' : '0'), (byte & 0x40 ? '1' : '0'), (byte & 0x20 ? '1' : '0'), (byte & 0x10 ? '1' : '0'), (byte & 0x08 ? '1' : '0'), (byte & 0x04 ? '1' : '0'), (byte & 0x02 ? '1' : '0'), (byte & 0x01 ? '1' : '0')); }
bool spi_start_adv(void) {
- bool status = spi_start(SPI_SS_PIN, false, 3, SPI_DIVISOR);
+ bool status = spi_start(PMW_CS_PIN, false, SPI_MODE, SPI_DIVISOR);
wait_us(1);
return status;
}
@@ -57,7 +64,7 @@ spi_status_t spi_write_adv(uint8_t reg_addr, uint8_t data) {
spi_start_adv();
// send address of the register, with MSBit = 1 to indicate it's a write
spi_status_t status = spi_write(reg_addr | 0x80);
- status = spi_write(data);
+ status = spi_write(data);
// tSCLK-NCS for write operation
wait_us(20);
@@ -86,14 +93,21 @@ uint8_t spi_read_adv(uint8_t reg_addr) {
}
void pmw_set_cpi(uint16_t cpi) {
- int cpival = constrain((cpi / 100) - 1, 0, 0x77); // limits to 0--119
+ uint8_t cpival = constrain((cpi / 100) - 1, 0, 0x77); // limits to 0--119
spi_start_adv();
spi_write_adv(REG_Config1, cpival);
spi_stop();
}
+uint16_t pmw_get_cpi(void) {
+ uint8_t cpival = spi_read_adv(REG_Config1);
+ return (uint16_t)(cpival & 0xFF) * 100;
+}
+
bool pmw_spi_init(void) {
+ setPinOutput(PMW_CS_PIN);
+
spi_init();
_inBurst = false;
@@ -101,7 +115,7 @@ bool pmw_spi_init(void) {
spi_start_adv();
spi_stop();
- spi_write_adv(REG_Shutdown, 0xb6); // Shutdown first
+ spi_write_adv(REG_Shutdown, 0xb6); // Shutdown first
wait_ms(300);
spi_start_adv();
@@ -127,14 +141,18 @@ bool pmw_spi_init(void) {
wait_ms(1);
- return pmw_check_signature();
-}
-
-void pmw_upload_firmware(void) {
spi_write_adv(REG_Config2, 0x00);
spi_write_adv(REG_Angle_Tune, constrain(ROTATIONAL_TRANSFORM_ANGLE, -30, 30));
+ bool init_success = pmw_check_signature();
+
+ writePinLow(PMW_CS_PIN);
+
+ return init_success;
+}
+
+void pmw_upload_firmware(void) {
spi_write_adv(REG_SROM_Enable, 0x1d);
wait_ms(10);
@@ -217,5 +235,3 @@ report_pmw_t pmw_read_burst(void) {
return data;
}
-
-#endif
diff --git a/keyboards/ploopyco/pmw3360.h b/drivers/sensors/pmw3360.h
index c1d5e3badb..d5b1741791 100644
--- a/keyboards/ploopyco/pmw3360.h
+++ b/drivers/sensors/pmw3360.h
@@ -93,6 +93,7 @@ spi_status_t spi_write_adv(uint8_t reg_addr, uint8_t data);
uint8_t spi_read_adv(uint8_t reg_addr);
bool pmw_spi_init(void);
void pmw_set_cpi(uint16_t cpi);
+uint16_t pmw_get_cpi(void);
void pmw_upload_firmware(void);
bool pmw_check_signature(void);
report_pmw_t pmw_read_burst(void);
diff --git a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/pmw3360_firmware.h b/drivers/sensors/pmw3360_firmware.h
index cca5a6a4d8..cca5a6a4d8 100644
--- a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/pmw3360_firmware.h
+++ b/drivers/sensors/pmw3360_firmware.h
diff --git a/drivers/serial.h b/drivers/serial.h
new file mode 100644
index 0000000000..d9c2a69e96
--- /dev/null
+++ b/drivers/serial.h
@@ -0,0 +1,46 @@
+/* Copyright 2021 QMK
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+
+#include <stdint.h>
+#include <stdbool.h>
+
+#include <transactions.h>
+
+// initiator is transaction start side
+void soft_serial_initiator_init(void);
+// target is interrupt accept side
+void soft_serial_target_init(void);
+
+// initiator result
+#define TRANSACTION_END 0
+#define TRANSACTION_NO_RESPONSE 0x1
+#define TRANSACTION_DATA_ERROR 0x2
+#define TRANSACTION_TYPE_ERROR 0x4
+int soft_serial_transaction(int sstd_index);
+
+// target status
+// *SSTD_t.status has
+// initiator:
+// TRANSACTION_END
+// or TRANSACTION_NO_RESPONSE
+// or TRANSACTION_DATA_ERROR
+// target:
+// TRANSACTION_DATA_ERROR
+// or TRANSACTION_ACCEPTED
+#define TRANSACTION_ACCEPTED 0x8
+int soft_serial_get_and_clean_status(int sstd_index);
diff --git a/keyboards/40percentclub/25/rules.mk b/keyboards/40percentclub/25/rules.mk
index d018039571..8d32d2c3fb 100644
--- a/keyboards/40percentclub/25/rules.mk
+++ b/keyboards/40percentclub/25/rules.mk
@@ -32,5 +32,3 @@ AUDIO_ENABLE = no # Audio output on port C6
# Enable generic behavior for split boards
SPLIT_KEYBOARD = yes
-
-LAYOUTS = ortho_5x5 ortho_5x10
diff --git a/keyboards/40percentclub/4x4/rules.mk b/keyboards/40percentclub/4x4/rules.mk
index 91b609103e..f51e98ff3b 100644
--- a/keyboards/40percentclub/4x4/rules.mk
+++ b/keyboards/40percentclub/4x4/rules.mk
@@ -29,7 +29,7 @@ UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
AUDIO_ENABLE = no # Audio output on port C6
-LAYOUTS = ortho_4x4 ortho_4x8 ortho_4x12 ortho_4x16
+LAYOUTS = ortho_4x4 ortho_4x12
# Disable unsupported hardware
RGBLIGHT_SUPPORTED = no
diff --git a/keyboards/40percentclub/5x5/rules.mk b/keyboards/40percentclub/5x5/rules.mk
index ae36f660e9..97c63a856b 100644
--- a/keyboards/40percentclub/5x5/rules.mk
+++ b/keyboards/40percentclub/5x5/rules.mk
@@ -29,4 +29,4 @@ UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
AUDIO_ENABLE = no # Audio output on port C6
-LAYOUTS = ortho_5x5 ortho_5x10 ortho_5x15
+LAYOUTS = ortho_5x15
diff --git a/keyboards/40percentclub/nori/rules.mk b/keyboards/40percentclub/nori/rules.mk
index 1b9766581a..3056c606c8 100644
--- a/keyboards/40percentclub/nori/rules.mk
+++ b/keyboards/40percentclub/nori/rules.mk
@@ -30,7 +30,7 @@ UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
AUDIO_ENABLE = no # Audio output on port C6
-LAYOUTS = ortho_4x4 ortho_4x8 ortho_4x12
+LAYOUTS = ortho_4x4 ortho_4x12
# Disable unsupported hardware
AUDIO_SUPPORTED = no
diff --git a/keyboards/40percentclub/ut47/keymaps/nordic/keymap.c b/keyboards/40percentclub/ut47/keymaps/nordic/keymap.c
index f3e297ec03..52372e2857 100644
--- a/keyboards/40percentclub/ut47/keymaps/nordic/keymap.c
+++ b/keyboards/40percentclub/ut47/keymaps/nordic/keymap.c
@@ -47,7 +47,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
LAYOUT( /* Base - L0 */
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
- LT3_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, NO_APOS, MT_RSFT_ENT,
+ LT3_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, NO_QUOT, MT_RSFT_ENT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, MO(4),
KC_LCTL, KC_LGUI, MO(4), KC_LALT, MO(2), KC_SPC, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
),
@@ -84,7 +84,7 @@ LAYOUT( /* Right modifier - L1 */
*/
LAYOUT( /* Left modifier - L2 */
- NO_SECT, KC_EXCLAIM, NO_QUO2, KC_HASH, NO_BULT, KC_PERCENT, NO_AMPR, NO_SLSH, NO_EQL, NO_PLUS, NO_BSLS, KC_DELETE,
+ NO_SECT, KC_EXCLAIM, NO_DQUO, KC_HASH, NO_CURR, KC_PERCENT, NO_AMPR, NO_SLSH, NO_EQL, NO_PLUS, NO_BSLS, KC_DELETE,
_______, _______, NO_QUES, NO_LCBR, NO_LBRC, NO_LPRN, NO_RPRN, NO_RBRC, NO_RCBR, KC_F10, KC_F11, KC_F12,
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_PGUP, _______,
_______, _______, _______, KC_CAPS, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END
@@ -122,9 +122,9 @@ LAYOUT( /* Hold Tab down - L3 */
*/
LAYOUT( /* Norsk - L4 */
- _______, _______, NO_AT, NO_PND, NO_DLR, NO_TILD, _______, NO_QUOT, NO_ACUT, NO_GRV, NO_AA, _______,
- _______, _______, _______, NO_EURO, _______, _______, _______, _______, NO_CIRC, NO_OSLH, NO_AE, _______,
- _______, NO_LESS, _______, _______, _______, _______, _______, NO_MU, _______, _______, _______, _______,
+ _______, _______, NO_AT, NO_PND, NO_DLR, NO_TILD, _______, NO_QUOT, NO_ACUT, NO_GRV, NO_ARNG, _______,
+ _______, _______, _______, NO_EURO, _______, _______, _______, _______, NO_CIRC, NO_OSTR, NO_AE, _______,
+ _______, NO_LABK, _______, _______, _______, _______, _______, NO_MICR, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, TO(5), _______, _______, _______
),
diff --git a/keyboards/7skb/keymaps/salicylic/keymap.c b/keyboards/7skb/keymaps/salicylic/keymap.c
index bf3433b17c..ad12f49d5b 100644
--- a/keyboards/7skb/keymaps/salicylic/keymap.c
+++ b/keyboards/7skb/keymaps/salicylic/keymap.c
@@ -85,7 +85,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------|
JP_QUOT, JP_EXLM, JP_QUES, JP_LBRC, JP_RBRC, JP_TILD, KC_P6, KC_P7, KC_P8, KC_P9, JP_ASTR, JP_SLSH, _______, KC_BSPC,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------|
- JP_QUOT, JP_HASH, JP_DQT, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_P4, KC_P5, KC_P6, JP_MINS, JP_EQL, _______,
+ JP_QUOT, JP_HASH, JP_DQUO, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_P4, KC_P5, KC_P6, JP_MINS, JP_EQL, _______,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
JP_CIRC, JP_PERC, JP_AMPR, JP_SCLN, JP_COLN, JP_PIPE, KC_P0, KC_P1, KC_P2, KC_P3, JP_PLUS, _______, _______,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
diff --git a/keyboards/7splus/keymaps/salicylic/keymap.c b/keyboards/7splus/keymaps/salicylic/keymap.c
index 4435bf98cb..cbe4e57dcf 100644
--- a/keyboards/7splus/keymaps/salicylic/keymap.c
+++ b/keyboards/7splus/keymaps/salicylic/keymap.c
@@ -84,7 +84,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------|
JP_QUOT, JP_EXLM, JP_QUES, JP_LBRC, JP_RBRC, JP_TILD, KC_P6, KC_P7, KC_P8, KC_P9, JP_ASTR, JP_SLSH, _______, _______, KC_HOME,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------|
-LCTL_T(JP_QUOT),JP_HASH, JP_DQT, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_P4, KC_P5, KC_P6, JP_MINS, JP_EQL, _______, KC_END,
+LCTL_T(JP_QUOT),JP_HASH,JP_DQUO, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_P4, KC_P5, KC_P6, JP_MINS, JP_EQL, _______, KC_END,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------|
SFT_T(JP_CIRC),JP_PERC, JP_AMPR, JP_SCLN, JP_COLN, JP_PIPE, KC_P0, KC_P1, KC_P2, KC_P3, JP_PLUS, _______, KC_UP, KC_PGUP,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------|
diff --git a/keyboards/9key/rules.mk b/keyboards/9key/rules.mk
index b6c0c73be9..d16c096768 100644
--- a/keyboards/9key/rules.mk
+++ b/keyboards/9key/rules.mk
@@ -27,7 +27,6 @@ AUDIO_ENABLE = no # Audio output on port C6
UNICODE_ENABLE = yes # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
-API_SYSEX_ENABLE = yes
TAP_DANCE_ENABLE = no
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
diff --git a/keyboards/abacus/keymaps/unicodemap/keymap.c b/keyboards/abacus/keymaps/unicodemap/keymap.c
index 8a2a33889b..c31b268ca2 100644
--- a/keyboards/abacus/keymaps/unicodemap/keymap.c
+++ b/keyboards/abacus/keymaps/unicodemap/keymap.c
@@ -108,7 +108,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
-void dip_switch_update_user(uint8_t index, bool active) {
+bool dip_switch_update_user(uint8_t index, bool active) {
switch (index) {
case 0:
if(active) {
@@ -125,6 +125,7 @@ void dip_switch_update_user(uint8_t index, bool active) {
}
}
}
+ return true;
}
diff --git a/keyboards/acr60/keymaps/mitch/keymap.c b/keyboards/acr60/keymaps/mitch/keymap.c
index b7fcb5a04a..1567b14813 100644
--- a/keyboards/acr60/keymaps/mitch/keymap.c
+++ b/keyboards/acr60/keymaps/mitch/keymap.c
@@ -11,8 +11,6 @@
#define GUIOFF MAGIC_NO_GUI
#define GUION MAGIC_UNNO_GUI
-#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))
-
/* TODO: create handy quick-ref list here for easy grokking of the actual shortcuts in place */
/*
@@ -64,7 +62,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* Hit MO(_FN) and Alt in that order to lock into the _FN layer.
*/
[_DFT] = LAYOUT_mitchsplit( /* Basic QWERTY */
- F(0), 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_BSPC, \
+ KC_GESC, 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_BSPC, \
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_BSLS, \
MO(_FN), 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(_FN), \
@@ -169,37 +167,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
-
-enum function_id {
- SHIFT_ESC,
-};
-
-const uint16_t PROGMEM fn_actions[] = {
- [0] = ACTION_FUNCTION(SHIFT_ESC),
-};
-
-void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
- static uint8_t shift_esc_shift_mask;
- switch (id) {
- case SHIFT_ESC:
- shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK;
- if (record->event.pressed) {
- if (shift_esc_shift_mask) {
- add_key(KC_GRV);
- send_keyboard_report();
- } else {
- add_key(KC_ESC);
- send_keyboard_report();
- }
- } else {
- if (shift_esc_shift_mask) {
- del_key(KC_GRV);
- send_keyboard_report();
- } else {
- del_key(KC_ESC);
- send_keyboard_report();
- }
- }
- break;
- }
-}
diff --git a/keyboards/aeboards/constellation/rev2/config.h b/keyboards/aeboards/constellation/rev2/config.h
index bff51c07d5..36029aba7d 100755
--- a/keyboards/aeboards/constellation/rev2/config.h
+++ b/keyboards/aeboards/constellation/rev2/config.h
@@ -27,7 +27,7 @@
/* key matrix size */
#define MATRIX_ROWS 5
-#define MATRIX_COLS 15
+#define MATRIX_COLS 14
/* key matrix pins */
#define MATRIX_ROW_PINS { B15, A14, A2, B13, B14 }
diff --git a/keyboards/ai03/voyager60_alps/config.h b/keyboards/ai03/voyager60_alps/config.h
index 98f37e8cfe..cd749cc505 100644
--- a/keyboards/ai03/voyager60_alps/config.h
+++ b/keyboards/ai03/voyager60_alps/config.h
@@ -23,7 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define PRODUCT Voyager60-Alps
#define MATRIX_ROWS 5
-#define MATRIX_COLS 15
+#define MATRIX_COLS 14
#define MATRIX_ROW_PINS { B1, B2, B3, F0, F1 }
#define MATRIX_COL_PINS { F4, F7, F5, F6, C7, C6, B6, B5, B4, D7, D6, D4, D5, D3}
diff --git a/keyboards/ajisai74/keymaps/salicylic/keymap.c b/keyboards/ajisai74/keymaps/salicylic/keymap.c
index 03cecb7a0d..f8b430af1c 100644
--- a/keyboards/ajisai74/keymaps/salicylic/keymap.c
+++ b/keyboards/ajisai74/keymaps/salicylic/keymap.c
@@ -56,7 +56,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
JP_DQUO, JP_EXLM, JP_QUES, JP_LBRC, JP_RBRC, JP_TILD, KC_P6, KC_P7, KC_P8, KC_P9, JP_ASTR, JP_SLSH, _______, _______, _______,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------|
- JP_QUOT, JP_HASH, JP_DQT, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_P4, KC_P5, KC_P6, JP_MINS, JP_EQL, _______, _______, _______,
+ JP_QUOT, JP_HASH, JP_DQUO, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_P4, KC_P5, KC_P6, JP_MINS, JP_EQL, _______, _______, _______,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------|
_______,JP_CIRC,JP_PERC,JP_AMPR,JP_SCLN, JP_COLN, JP_PIPE, KC_P0, KC_P1, KC_P2, KC_P3, JP_PLUS, _______, _______, _______,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------|
diff --git a/keyboards/alu84/keymaps/turbomech/keymap.c b/keyboards/alu84/keymaps/turbomech/keymap.c
index 80006d0dbe..894dfc8402 100644
--- a/keyboards/alu84/keymaps/turbomech/keymap.c
+++ b/keyboards/alu84/keymaps/turbomech/keymap.c
@@ -18,8 +18,6 @@
#include QMK_KEYBOARD_H
#include "turbomech.h"
-#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))
-
#define _QWERTY 0 //BASE layer
#define _FUNCTION 1 //Function layer
@@ -121,37 +119,3 @@ void led_set_user(uint8_t usb_led) {
}
}
-
-enum function_id {
- SHIFT_ESC,
-};
-
-const uint16_t PROGMEM fn_actions[] = {
- [0] = ACTION_FUNCTION(SHIFT_ESC),
-};
-
-void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
- static uint8_t shift_esc_shift_mask;
- switch (id) {
- case SHIFT_ESC:
- shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK;
- if (record->event.pressed) {
- if (shift_esc_shift_mask) {
- add_key(KC_GRV);
- send_keyboard_report();
- } else {
- add_key(KC_ESC);
- send_keyboard_report();
- }
- } else {
- if (shift_esc_shift_mask) {
- del_key(KC_GRV);
- send_keyboard_report();
- } else {
- del_key(KC_ESC);
- send_keyboard_report();
- }
- }
- break;
- }
-}
diff --git a/keyboards/amjpad/keymaps/max/keymap.c b/keyboards/amjpad/keymaps/max/keymap.c
index eb50567e98..7bfaed5999 100644
--- a/keyboards/amjpad/keymaps/max/keymap.c
+++ b/keyboards/amjpad/keymaps/max/keymap.c
@@ -4,9 +4,6 @@
#include "rgblight.h"
#endif
-// Used for SHIFT_ESC
-#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))
-
// 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
@@ -64,37 +61,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT
),
};
-
-enum function_id {
- SHIFT_ESC,
-};
-
-const uint16_t PROGMEM fn_actions[] = {
- [0] = ACTION_FUNCTION(SHIFT_ESC),
-};
-
-void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
- static uint8_t shift_esc_shift_mask;
- switch (id) {
- case SHIFT_ESC:
- shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK;
- if (record->event.pressed) {
- if (shift_esc_shift_mask) {
- add_key(KC_GRV);
- send_keyboard_report();
- } else {
- add_key(KC_ESC);
- send_keyboard_report();
- }
- } else {
- if (shift_esc_shift_mask) {
- del_key(KC_GRV);
- send_keyboard_report();
- } else {
- del_key(KC_ESC);
- send_keyboard_report();
- }
- }
- break;
- }
-}
diff --git a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/default/keymap.c b/keyboards/anavi/macropad8/keymaps/default/config.h
index 037f59af85..dd687cad58 100644
--- a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/default/keymap.c
+++ b/keyboards/anavi/macropad8/keymaps/default/config.h
@@ -1,4 +1,4 @@
-/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
+/* Copyright 2021 QMK
*
* 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
@@ -14,4 +14,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-// placeholder
+#pragma once
+
+#define LAYER_STATE_8BIT
diff --git a/keyboards/atreus/keymaps/erlandsona/keymap.c b/keyboards/atreus/keymaps/erlandsona/keymap.c
index 151288edc2..c261e892d4 100644
--- a/keyboards/atreus/keymaps/erlandsona/keymap.c
+++ b/keyboards/atreus/keymaps/erlandsona/keymap.c
@@ -1,6 +1,3 @@
-// this is the style you want to emulate.
-// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
-
#include QMK_KEYBOARD_H
// Each layer gets a name for readability, which is then used in the keymap matrix below.
@@ -23,21 +20,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_LPRN, KC_RPRN, KC_MINS, KC_EQL , KC_LBRC,
KC_TAB , KC_5 , KC_6 , KC_7 , KC_8 , KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, KC_RBRC,
_______, KC_9 , KC_0 , KC_DOT , KC_COMM, KC_HOME, KC_PGDN, KC_PGUP, KC_END , _______,
- _______, _______, _______, _______, KC_DEL , F(MOUS), _______, _______, _______, _______, _______, _______
+ _______, _______, _______, _______, KC_DEL , TG(MOUS), _______, _______, _______, _______, _______, _______
),
[MOUS] = LAYOUT( /* Mouse and Media Keys */
KC_SLCK, KC_PAUSE, KC_F11 , KC_F10 , KC_F9 , KC_F8 , KC_F7 , KC_F6 , KC_F5 , KC_F4,
KC_VOLD, KC_ACL0 , KC_ACL1, KC_ACL2, KC_VOLU, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_F3,
KC_MUTE, KC_MPRV , KC_MPLY, KC_MNXT, KC_MUTE, KC_WH_R, KC_WH_U, KC_WH_D, KC_WH_L, KC_F2,
- _______, _______ , _______, _______, _______, _______, _______, KC_BTN1, F(BASE), RESET , KC_F12 , KC_F1
+ _______, _______ , _______, _______, _______, _______, _______, KC_BTN1, TO(BASE), RESET , KC_F12 , KC_F1
),
};
-
-
-// I prefer this layer switching strategy to the TG and MO functions.
-// so that I can get out of mouse mode just by tapping/holding my base layer FN key.
-const uint16_t PROGMEM fn_actions[] = {
- [BASE] = ACTION_LAYER_OFF(2, 1), // switch back to layer 0
- [MOUS] = ACTION_LAYER_ON(2, 1) // switch to layer 2
-};
diff --git a/keyboards/atreus/keymaps/khitsule/keymap.c b/keyboards/atreus/keymaps/khitsule/keymap.c
index e6a5366916..1190efa3cb 100644
--- a/keyboards/atreus/keymaps/khitsule/keymap.c
+++ b/keyboards/atreus/keymaps/khitsule/keymap.c
@@ -16,12 +16,6 @@ enum layers {
#define KM_DRIGHT LGUI(LCTL(KC_RIGHT))
#define TSKMGR LCTL(LSFT(KC_ESC))
-#define tap_mod_macro(record, mod, macro) ( ((record)->event.pressed) ? \
- ( ((record)->tap.count <= 0 || (record)->tap.interrupted) ? MACRO(D(mod), END) : MACRO_NONE ) : \
- ( ((record)->tap.count > 0 && !((record)->tap.interrupted)) ? (macro) : MACRO(U(mod), END) ) )
-
-
-
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[ALPH] = LAYOUT(
KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,
@@ -54,21 +48,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
)
};
-
-const uint16_t PROGMEM fn_actions[] = {
- [1] = ACTION_MACRO_TAP(1),
- [2] = ACTION_MACRO_TAP(2)
-};
-
-const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
- switch(id) {
- case 1:
- return tap_mod_macro(record, LGUI, MACRO( D(LSFT), T(9), U(LSFT), END));
- break;
- case 2:
- return tap_mod_macro(record, LALT, MACRO( D(LSFT), T(0), U(LSFT), END));
- break;
-
- }
- return MACRO_NONE;
-};
diff --git a/keyboards/atreus62/keymaps/194h/keymap.c b/keyboards/atreus62/keymaps/194h/keymap.c
index 1d069e9d42..b9587b03e8 100644
--- a/keyboards/atreus62/keymaps/194h/keymap.c
+++ b/keyboards/atreus62/keymaps/194h/keymap.c
@@ -31,7 +31,7 @@
#define NO_RCBR RALT(KC_0) // }
#define NO_COLN LSFT(KC_DOT) // :
#define NO_SCLN LSFT(KC_COMM) // ;
-#define NO_MU RALT(KC_M) // µ
+#define NO_MICR RALT(KC_M) // µ
#define NO_EURO RALT(KC_E) // €
#define NO_SECT LSFT(KC_GRV) // §
#define NO_GERC RALT(KC_COMM) // ¸
diff --git a/keyboards/bakeneko65/keymaps/default/readme.md b/keyboards/bakeneko65/keymaps/default/readme.md
deleted file mode 100644
index 34d1b4e931..0000000000
--- a/keyboards/bakeneko65/keymaps/default/readme.md
+++ /dev/null
@@ -1 +0,0 @@
-# The default keymap for Bakeneko 65
diff --git a/keyboards/bakeneko65/config.h b/keyboards/bakeneko65/rev2/config.h
index 65b3ff88e2..6639e82395 100644
--- a/keyboards/bakeneko65/config.h
+++ b/keyboards/bakeneko65/rev2/config.h
@@ -24,7 +24,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define PRODUCT_ID 0x4C82
#define DEVICE_VER 0x0001
#define MANUFACTURER kkatano
-#define PRODUCT Bakeneko 65
+#define PRODUCT Bakeneko 65 V2
/* key matrix size */
#define MATRIX_ROWS 5
diff --git a/keyboards/bakeneko65/info.json b/keyboards/bakeneko65/rev2/info.json
index 25b438c297..cbaadc3c34 100644
--- a/keyboards/bakeneko65/info.json
+++ b/keyboards/bakeneko65/rev2/info.json
@@ -1,6 +1,6 @@
{
- "keyboard_name": "Bakeneko 65",
- "url": "https://github.com/kkatano/bakeneko-65-pcb",
+ "keyboard_name": "Bakeneko 65 V2",
+ "url": "https://github.com/kkatano/bakeneko-65",
"maintainer": "kkatano",
"width": 16,
"height": 5,
diff --git a/keyboards/bakeneko65/keymaps/default/keymap.c b/keyboards/bakeneko65/rev2/keymaps/default/keymap.c
index 4d6d297d94..4d6d297d94 100644
--- a/keyboards/bakeneko65/keymaps/default/keymap.c
+++ b/keyboards/bakeneko65/rev2/keymaps/default/keymap.c
diff --git a/keyboards/bakeneko65/rev2/keymaps/default/readme.md b/keyboards/bakeneko65/rev2/keymaps/default/readme.md
new file mode 100644
index 0000000000..71ad76773f
--- /dev/null
+++ b/keyboards/bakeneko65/rev2/keymaps/default/readme.md
@@ -0,0 +1 @@
+# The default keymap for Bakeneko 65 V2
diff --git a/keyboards/bakeneko65/keymaps/via/keymap.c b/keyboards/bakeneko65/rev2/keymaps/via/keymap.c
index a4cc2d8e8a..a4cc2d8e8a 100644
--- a/keyboards/bakeneko65/keymaps/via/keymap.c
+++ b/keyboards/bakeneko65/rev2/keymaps/via/keymap.c
diff --git a/keyboards/bakeneko65/keymaps/via/rules.mk b/keyboards/bakeneko65/rev2/keymaps/via/rules.mk
index 1e5b99807c..1e5b99807c 100644
--- a/keyboards/bakeneko65/keymaps/via/rules.mk
+++ b/keyboards/bakeneko65/rev2/keymaps/via/rules.mk
diff --git a/keyboards/bakeneko65/readme.md b/keyboards/bakeneko65/rev2/readme.md
index 87960d2f15..8d2fa6bc58 100644
--- a/keyboards/bakeneko65/readme.md
+++ b/keyboards/bakeneko65/rev2/readme.md
@@ -1,17 +1,17 @@
-# Bakeneko 65
+# Bakeneko 65 V2
A simple 65% keyboard
* Keyboard Maintainer: [kkatano](https://github.com/kkatano)
-* Hardware Supported: Bakeneko 65
+* Hardware Supported: Bakeneko 65 V2
* Hardware Availability: [Open source on GitHub](https://github.com/kkatano/bakeneko-65)
Make example for this keyboard (after setting up your build environment):
- make bakeneko65:default
+ make bakeneko65/rev2:default
Flashing example for this keyboard:
- make bakeneko65:default:flash
+ make bakeneko65/rev2:default:flash
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/bakeneko65/bakeneko65.c b/keyboards/bakeneko65/rev2/rev2.c
index aa1ba8e661..a486650790 100644
--- a/keyboards/bakeneko65/bakeneko65.c
+++ b/keyboards/bakeneko65/rev2/rev2.c
@@ -14,4 +14,4 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "bakeneko65.h"
+#include "rev2.h"
diff --git a/keyboards/bakeneko65/bakeneko65.h b/keyboards/bakeneko65/rev2/rev2.h
index db2d5c14a6..db2d5c14a6 100644
--- a/keyboards/bakeneko65/bakeneko65.h
+++ b/keyboards/bakeneko65/rev2/rev2.h
diff --git a/keyboards/bakeneko65/rules.mk b/keyboards/bakeneko65/rev2/rules.mk
index f8a290cad5..f8a290cad5 100644
--- a/keyboards/bakeneko65/rules.mk
+++ b/keyboards/bakeneko65/rev2/rules.mk
diff --git a/keyboards/bakeneko65/rev3/config.h b/keyboards/bakeneko65/rev3/config.h
new file mode 100644
index 0000000000..6001ce3159
--- /dev/null
+++ b/keyboards/bakeneko65/rev3/config.h
@@ -0,0 +1,109 @@
+/*
+Copyright 2020 Koichi Katano
+
+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 <http://www.gnu.org/licenses/>.
+*/
+
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0x3A0E
+#define PRODUCT_ID 0x4C83
+#define DEVICE_VER 0x0001
+#define MANUFACTURER kkatano
+#define PRODUCT Bakeneko 65 V3
+
+/* key matrix size */
+#define MATRIX_ROWS 5
+#define MATRIX_COLS 16
+
+/*
+ * Keyboard Matrix Assignments
+ *
+ * Change this to how you wired your keyboard
+ * COLS: AVR pins used for columns, left to right
+ * ROWS: AVR pins used for rows, top to bottom
+ * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
+ * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
+ *
+ */
+#define MATRIX_ROW_PINS { E6, B7, F7, F4, F5 }
+#define MATRIX_COL_PINS { F6, B0, F1, C7, C6, B6, B5, B4, D7, D6, D4, D5, D3, D2, D1, D0 }
+#define UNUSED_PINS
+
+/* COL2ROW, ROW2COL */
+#define DIODE_DIRECTION COL2ROW
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCE 5
+
+/* define if matrix has ghost (lacks anti-ghosting diodes) */
+//#define MATRIX_HAS_GHOST
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+#define LOCKING_SUPPORT_ENABLE
+/* Locking resynchronize hack */
+#define LOCKING_RESYNC_ENABLE
+
+/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
+ * This is useful for the Windows task manager shortcut (ctrl+shift+esc).
+ */
+//#define GRAVE_ESC_CTRL_OVERRIDE
+
+/*
+ * Force NKRO
+ *
+ * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
+ * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
+ * makefile for this to work.)
+ *
+ * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
+ * until the next keyboard reset.
+ *
+ * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
+ * fully operational during normal computer usage.
+ *
+ * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
+ * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
+ * bootmagic, NKRO mode will always be enabled until it is toggled again during a
+ * power-up.
+ *
+ */
+//#define FORCE_NKRO
+
+/*
+ * Feature disable options
+ * These options are also useful to firmware size reduction.
+ */
+
+/* disable debug print */
+//#define NO_DEBUG
+
+/* disable print */
+//#define NO_PRINT
+
+/* disable action features */
+//#define NO_ACTION_LAYER
+//#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
+
+/* disable these deprecated features by default */
+#define NO_ACTION_MACRO
+#define NO_ACTION_FUNCTION
+
+/* Bootmagic Lite key configuration */
+//#define BOOTMAGIC_LITE_ROW 0
+//#define BOOTMAGIC_LITE_COLUMN 0
diff --git a/keyboards/bakeneko65/rev3/info.json b/keyboards/bakeneko65/rev3/info.json
new file mode 100644
index 0000000000..7e63af038c
--- /dev/null
+++ b/keyboards/bakeneko65/rev3/info.json
@@ -0,0 +1,12 @@
+{
+ "keyboard_name": "Bakeneko 65 V3",
+ "url": "https://github.com/kkatano/bakeneko-65",
+ "maintainer": "kkatano",
+ "width": 16,
+ "height": 5,
+ "layouts": {
+ "LAYOUT_all": {
+ "layout": [{"x":0, "y":0.25}, {"x":1, "y":0.25}, {"x":2, "y":0.25}, {"x":3, "y":0.25}, {"x":4, "y":0.25}, {"x":5, "y":0.25}, {"x":6, "y":0.25}, {"x":7, "y":0.25}, {"x":8, "y":0.25}, {"x":9, "y":0.25}, {"x":10, "y":0.25}, {"x":11, "y":0.25}, {"x":12, "y":0.25}, {"x":13, "y":0.25}, {"x":14, "y":0.25}, {"x":15, "y":0.25}, {"x":0, "y":1.25, "w":1.5}, {"x":1.5, "y":1.25}, {"x":2.5, "y":1.25}, {"x":3.5, "y":1.25}, {"x":4.5, "y":1.25}, {"x":5.5, "y":1.25}, {"x":6.5, "y":1.25}, {"x":7.5, "y":1.25}, {"x":8.5, "y":1.25}, {"x":9.5, "y":1.25}, {"x":10.5, "y":1.25}, {"x":11.5, "y":1.25}, {"x":12.5, "y":1.25}, {"x":13.5, "y":1.25, "w":1.5}, {"x":15, "y":1.25}, {"x":0, "y":2.25, "w":1.75}, {"x":1.75, "y":2.25}, {"x":2.75, "y":2.25}, {"x":3.75, "y":2.25}, {"x":4.75, "y":2.25}, {"x":5.75, "y":2.25}, {"x":6.75, "y":2.25}, {"x":7.75, "y":2.25}, {"x":8.75, "y":2.25}, {"x":9.75, "y":2.25}, {"x":10.75, "y":2.25}, {"x":11.75, "y":2.25}, {"x":12.75, "y":2.25, "w":2.25}, {"x":15, "y":2.25}, {"x":0, "y":3.25, "w":2.25}, {"x":2.25, "y":3.25}, {"x":3.25, "y":3.25}, {"x":4.25, "y":3.25}, {"x":5.25, "y":3.25}, {"x":6.25, "y":3.25}, {"x":7.25, "y":3.25}, {"x":8.25, "y":3.25}, {"x":9.25, "y":3.25}, {"x":10.25, "y":3.25}, {"x":11.25, "y":3.25}, {"x":12.25, "y":3.25, "w":1.75}, {"x":14, "y":3.25}, {"x":15, "y":3.25}, {"x":0, "y":4.25, "w":1.25}, {"x":1.25, "y":4.25, "w":1.25}, {"x":2.5, "y":4.25, "w":1.25}, {"x":3.75, "y":4.25, "w":6.25}, {"x":10, "y":4.25, "w":1.25}, {"x":11.25, "y":4.25, "w":1.25}, {"x":13, "y":4.25}, {"x":14, "y":4.25}, {"x":15, "y":4.25}]
+ }
+ }
+}
diff --git a/keyboards/bakeneko65/rev3/keymaps/default/keymap.c b/keyboards/bakeneko65/rev3/keymaps/default/keymap.c
new file mode 100644
index 0000000000..eb745e15ce
--- /dev/null
+++ b/keyboards/bakeneko65/rev3/keymaps/default/keymap.c
@@ -0,0 +1,38 @@
+/* Copyright 2020 kkatano
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+#include QMK_KEYBOARD_H
+
+enum layer_names {
+ _BASE,
+ _FN
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [_BASE] = LAYOUT_all(
+ 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_HOME,
+ 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, KC_END,
+ KC_CAPS, 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_PGUP,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN), KC_LEFT, KC_DOWN, KC_RGHT
+ ),
+ [_FN] = LAYOUT_all(
+ RESET, 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_INS, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_DEL, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______
+ )
+};
diff --git a/keyboards/bakeneko65/rev3/keymaps/default/readme.md b/keyboards/bakeneko65/rev3/keymaps/default/readme.md
new file mode 100644
index 0000000000..ecac9e3dff
--- /dev/null
+++ b/keyboards/bakeneko65/rev3/keymaps/default/readme.md
@@ -0,0 +1 @@
+# The default keymap for Bakeneko 65 V3
diff --git a/keyboards/bakeneko65/rev3/keymaps/via/keymap.c b/keyboards/bakeneko65/rev3/keymaps/via/keymap.c
new file mode 100644
index 0000000000..aed067bf10
--- /dev/null
+++ b/keyboards/bakeneko65/rev3/keymaps/via/keymap.c
@@ -0,0 +1,54 @@
+/* Copyright 2020 kkatano
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+#include QMK_KEYBOARD_H
+
+enum layer_names {
+ _L0,
+ _L1,
+ _L2,
+ _L3
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [_L0] = LAYOUT_all(
+ 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_HOME,
+ 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, KC_END,
+ KC_CAPS, 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_PGUP,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_L1), KC_LEFT, KC_DOWN, KC_RGHT
+ ),
+ [_L1] = LAYOUT_all(
+ RESET, 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_INS, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_DEL, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______
+ ),
+ [_L2] = LAYOUT_all(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______
+ ),
+ [_L3] = LAYOUT_all(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______
+ )
+};
diff --git a/keyboards/tokyo60/keymaps/via/rules.mk b/keyboards/bakeneko65/rev3/keymaps/via/rules.mk
index 1e5b99807c..1e5b99807c 100644
--- a/keyboards/tokyo60/keymaps/via/rules.mk
+++ b/keyboards/bakeneko65/rev3/keymaps/via/rules.mk
diff --git a/keyboards/bakeneko65/rev3/readme.md b/keyboards/bakeneko65/rev3/readme.md
new file mode 100644
index 0000000000..e147b11e6f
--- /dev/null
+++ b/keyboards/bakeneko65/rev3/readme.md
@@ -0,0 +1,17 @@
+# Bakeneko 65 V3
+
+A simple 65% keyboard
+
+* Keyboard Maintainer: [kkatano](https://github.com/kkatano)
+* Hardware Supported: Bakeneko 65 V3
+* Hardware Availability: [Open source on GitHub](https://github.com/kkatano/bakeneko-65)
+
+Make example for this keyboard (after setting up your build environment):
+
+ make bakeneko65/rev3:default
+
+Flashing example for this keyboard:
+
+ make bakeneko65/rev3:default:flash
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/bakeneko65/rev3/rev3.c b/keyboards/bakeneko65/rev3/rev3.c
new file mode 100644
index 0000000000..cf1084d495
--- /dev/null
+++ b/keyboards/bakeneko65/rev3/rev3.c
@@ -0,0 +1,17 @@
+/* Copyright 2020 Koichi Katano
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
+#include "rev3.h"
diff --git a/keyboards/bakeneko65/rev3/rev3.h b/keyboards/bakeneko65/rev3/rev3.h
new file mode 100644
index 0000000000..3e46097e39
--- /dev/null
+++ b/keyboards/bakeneko65/rev3/rev3.h
@@ -0,0 +1,33 @@
+/* Copyright 2020 Koichi Katano
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+
+#include "quantum.h"
+
+#define LAYOUT_all( \
+ k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013, k014, k015, \
+ k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, k115, \
+ k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k213, k215, \
+ k300, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, k315, \
+ k400, k401, k402, k406, k409, k411, k412, k413, k415 \
+) { \
+ { k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013, k014, k015 }, \
+ { k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, KC_NO, k115 }, \
+ { k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, KC_NO, k213, KC_NO, k215 }, \
+ { k300, KC_NO, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, KC_NO, k315 }, \
+ { k400, k401, k402, KC_NO, KC_NO, KC_NO, k406, KC_NO, KC_NO, k409, KC_NO, k411, k412, k413, KC_NO, k415 } \
+}
diff --git a/keyboards/bakeneko65/rev3/rules.mk b/keyboards/bakeneko65/rev3/rules.mk
new file mode 100644
index 0000000000..5c0d8f307c
--- /dev/null
+++ b/keyboards/bakeneko65/rev3/rules.mk
@@ -0,0 +1,22 @@
+# MCU name
+MCU = atmega32u4
+
+# Bootloader selection
+BOOTLOADER = atmel-dfu
+
+# Build Options
+# change yes to no to disable
+#
+BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
+MOUSEKEY_ENABLE = yes # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = no # Console for debug
+COMMAND_ENABLE = no # Commands for debug and configuration
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+NKRO_ENABLE = no # USB Nkey Rollover
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
+RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
+BLUETOOTH_ENABLE = no # Enable Bluetooth
+AUDIO_ENABLE = no # Audio output
diff --git a/keyboards/barracuda/rules.mk b/keyboards/barracuda/rules.mk
index 7233e7c00f..09a21e9e0b 100644
--- a/keyboards/barracuda/rules.mk
+++ b/keyboards/barracuda/rules.mk
@@ -20,5 +20,3 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
BLUETOOTH_ENABLE = no # Enable Bluetooth
AUDIO_ENABLE = no # Audio output
-
-LAYOUTS = ortho_3x11
diff --git a/keyboards/basekeys/trifecta/config.h b/keyboards/basekeys/trifecta/config.h
index 8a95291260..28c9c18fb2 100644
--- a/keyboards/basekeys/trifecta/config.h
+++ b/keyboards/basekeys/trifecta/config.h
@@ -80,11 +80,11 @@
# define RGB_MATRIX_KEYPRESSES // reacts to keypresses
// # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
// # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-//# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+//# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
# define RGB_MATRIX_FRAMEBUFFER_EFFECTS
# define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness)
# 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_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
diff --git a/keyboards/bm40hsrgb/config.h b/keyboards/bm40hsrgb/config.h
index 167a5667a4..8ef9a78c7d 100755
--- a/keyboards/bm40hsrgb/config.h
+++ b/keyboards/bm40hsrgb/config.h
@@ -50,6 +50,6 @@
#ifdef RGB_DI_PIN
#define RGB_MATRIX_KEYPRESSES // reacts to keypresses
#endif
-#ifndef RGB_DISABLE_WHEN_USB_SUSPENDED
-# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+#ifdef RGB_MATRIX_ENABLE
+# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
#endif
diff --git a/keyboards/bm68rgb/keymaps/peepeetee/config.h b/keyboards/bm68rgb/keymaps/peepeetee/config.h
index 53eebce7f2..aada255cd7 100644
--- a/keyboards/bm68rgb/keymaps/peepeetee/config.h
+++ b/keyboards/bm68rgb/keymaps/peepeetee/config.h
@@ -64,7 +64,7 @@
// #define RGBLIGHT_SAT_STEP 25 // Units to step when in/decreasing saturation
// #define RGBLIGHT_VAL_STEP 12 // Units to step when in/decreasing value (brightness)
// #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-// #define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended
+// #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
// #define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness)
// #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 RGBLIGHT_ANIMATIONS // Run RGB animations
diff --git a/keyboards/boardsource/3x4/config.h b/keyboards/boardsource/3x4/config.h
index c997f72a9d..32a0b3d290 100644
--- a/keyboards/boardsource/3x4/config.h
+++ b/keyboards/boardsource/3x4/config.h
@@ -15,7 +15,7 @@
#define MATRIX_ROWS 3
#define MATRIX_COLS 4
-#define MATRIX_ROW_PINS { F7, F6, F5,}
+#define MATRIX_ROW_PINS {F7, F6, F5}
#define MATRIX_COL_PINS {B6, B2, B3, B1}
#define DIODE_DIRECTION COL2ROW
diff --git a/keyboards/boardsource/the_mark/config.h b/keyboards/boardsource/the_mark/config.h
index 5888452ce4..3c78af62b2 100644
--- a/keyboards/boardsource/the_mark/config.h
+++ b/keyboards/boardsource/the_mark/config.h
@@ -41,8 +41,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-#define MATRIX_ROW_PINS {B0, B1, B2, B3, B4,}
-#define MATRIX_COL_PINS { B5, B6, B7, F5, C7, D0, D1, D2, D3, D4, D5, D6, D7,F0, F1, F4}
+#define MATRIX_ROW_PINS {B0, B1, B2, B3, B4}
+#define MATRIX_COL_PINS {B5, B6, B7, F5, C7, D0, D1, D2, D3, D4, D5, D6, D7,F0, F1, F4}
#define UNUSED_PINS
/* COL2ROW, ROW2COL */
@@ -59,7 +59,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DRIVER_LED_TOTAL 24 // Number of LEDs
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200
# ifndef RGB_DISABLE_WHEN_USB_SUSPENDED
-# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
# endif
#endif
diff --git a/keyboards/bpiphany/frosty_flake/frosty_flake.h b/keyboards/bpiphany/frosty_flake/frosty_flake.h
index cc870c277e..f4f69f1a3d 100644
--- a/keyboards/bpiphany/frosty_flake/frosty_flake.h
+++ b/keyboards/bpiphany/frosty_flake/frosty_flake.h
@@ -111,12 +111,26 @@
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, KK6, KC0, KM3, KD0, KA1, KO0, KK0, KL0 \
-) LAYOUT_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, KC_NO, KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KN3, KO6, \
- KA4, KP2, KC6, KK6, KC0, KM3, KD0, KA1, KO0, KK0, KL0 \
-)
+) \
+{ \
+/* 0 1 2 3 4 5 6 7 */ \
+/* A */ { KC_NO, KA1, KC_NO, KC_NO, KA4, KA5, KC_NO, KA7, }, \
+/* B */ { KB0, KB1, KB2, KB3, KB4, KC_NO, KB6, KB7, }, \
+/* C */ { KC0, KC_NO, KC_NO, KC_NO, KC_NO, KC5, KC6, KC7, }, \
+/* D */ { KD0, KD1, KD2, KD3, KD4, KD5, KC_NO, KD7, }, \
+/* E */ { KC_NO, KE1, KE2, KE3, KE4, KE5, KE6, KE7, }, \
+/* F */ { KF0, KF1, KF2, KF3, KF4, KF5, KF6, KF7, }, \
+/* G */ { KG0, KG1, KG2, KG3, KG4, KG5, KG6, KG7, }, \
+/* H */ { KC_NO, KH1, KH2, KH3, KH4, KH5, KH6, KH7, }, \
+/* I */ { KC_NO, KI1, KI2, KI3, KI4, KI5, KC_NO, KI7, }, \
+/* J */ { KC_NO, KJ1, KJ2, KJ3, KJ4, KJ5, KJ6, KJ7, }, \
+/* K */ { KK0, KC_NO, KC_NO, KC_NO, KK4, KC_NO, KK6, KC_NO, }, \
+/* L */ { KL0, KC_NO, KC_NO, KC_NO, KL4, KC_NO, KC_NO, KC_NO, }, \
+/* M */ { KC_NO, KC_NO, KC_NO, KM3, KC_NO, KC_NO, KC_NO, KC_NO, }, \
+/* N */ { KC_NO, KC_NO, KN2, KN3, KC_NO, KC_NO, KC_NO, KC_NO, }, \
+/* O */ { KO0, KC_NO, KC_NO, KC_NO, KO4, KC_NO, KO6, KO7, }, \
+/* P */ { KC_NO, KC_NO, KP2, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, }, \
+/* Q */ { KC_NO, KC_NO, KC_NO, KC_NO, KQ4, KC_NO, KC_NO, KQ7, }, \
+/* R */ { KR0, KC_NO, KR2, KR3, KR4, KR5, KR6, KR7, }, \
+}
diff --git a/keyboards/bpiphany/kitten_paw/keymaps/ickerwx/keymap.c b/keyboards/bpiphany/kitten_paw/keymaps/ickerwx/keymap.c
index e2b56132bf..cc4d0bca63 100644
--- a/keyboards/bpiphany/kitten_paw/keymaps/ickerwx/keymap.c
+++ b/keyboards/bpiphany/kitten_paw/keymaps/ickerwx/keymap.c
@@ -1,12 +1,6 @@
#include QMK_KEYBOARD_H
#include "mousekey.h"
-#undef C
-#undef S
-#define C(kc) LCTL(KC_##kc)
-#define S(kc) LSFT(KC_##kc)
-#define RA(kc) RALT(KC_##kc)
-#define KC_SLCT KC_SELECT
#define MEDAPP LT(MEDIA, KC_APP)
uint8_t current_layer_global = 255;
@@ -21,19 +15,16 @@ enum layers {
MISC,
};
-enum function_id {
- LSHFT_PAREN,
+enum custom_keycodes {
+ LSHFT_PAREN = SAFE_RANGE,
RSHFT_PAREN,
LCTRL_BRACKET,
RCTRL_BRACKET,
LALT_CURLY,
RALT_CURLY,
- CTRL_CLICK
-};
-
-enum macro_id {
- GRV,
- CFLEX
+ CTRL_CLICK,
+ M_GRV,
+ M_CFLEX
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
@@ -42,25 +33,25 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_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,KC_BSPC, KC_INS,KC_HOME,KC_PGUP, KC_NLCK,KC_PSLS,KC_PAST,KC_PMNS, \
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_BSLS, KC_DEL, KC_END,KC_PGDN, KC_P7, KC_P8, KC_P9,KC_PPLS, \
TT(MOUSE1), 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_P4, KC_P5, KC_P6, \
- F(8),KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M,KC_COMM, KC_DOT,KC_SLSH, F(9), KC_UP, KC_P1, KC_P2, KC_P3,KC_PENT, \
- F(1),KC_LGUI, F(3), LT(MISC, KC_SPC), F(4),TT(PROG1), MEDAPP, F(2), KC_LEFT,KC_DOWN,KC_RGHT, KC_P0,KC_PDOT),
+ LSHFT_PAREN,KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M,KC_COMM, KC_DOT,KC_SLSH, RSHFT_PAREN, KC_UP, KC_P1, KC_P2, KC_P3,KC_PENT, \
+ LCTRL_BRACKET,KC_LGUI, LALT_CURLY, LT(MISC, KC_SPC), RALT_CURLY,TT(PROG1), MEDAPP, RCTRL_BRACKET, KC_LEFT,KC_DOWN,KC_RGHT, KC_P0,KC_PDOT),
/* Layer 1: Programming Layer 1, emulating US l ayout */
[PROG1] = LAYOUT(\
KC_ESC,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______,_______, \
- M(GRV),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,KC_SLSH, S(0),_______, _______,_______,_______, _______,_______,_______,_______, \
- _______,_______,_______,_______,_______,_______, KC_Z,_______,_______,_______,_______, RA(8), RA(9),RA(MINS), _______,_______,_______, _______,_______,_______,_______, \
- _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,S(COMM),S(BSLS), _______, _______,_______,_______, \
- MO(PROG2),_______, KC_Y,_______,_______,_______,_______,_______,_______,_______,_______, S(7), MO(PROG2), _______, _______,_______,_______,_______, \
+ M_GRV,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,KC_SLSH,S(KC_0),_______, _______,_______,_______, _______,_______,_______,_______, \
+ _______,_______,_______,_______,_______,_______, KC_Z,_______,_______,_______,_______,ALGR(KC_8),ALGR(KC_9),ALGR(KC_MINS), _______,_______,_______, _______,_______,_______,_______, \
+ _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,S(KC_COMM),S(KC_BSLS), _______, _______,_______,_______, \
+ MO(PROG2),_______, KC_Y,_______,_______,_______,_______,_______,_______,_______,_______, S(KC_7), MO(PROG2), _______, _______,_______,_______,_______, \
_______,_______,_______, _______, _______,_______,_______,_______, _______,_______,_______, _______,_______),
/* Layer 2: programming layer 2
all keys that are not FN keys are sent as LSFT+key on this layer
*/
[PROG2] = LAYOUT(\
_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______,_______, \
- RA(RBRC),_______, RA(Q),KC_BSLS,_______,_______,M(CFLEX), S(6),S(RBRC), S(8), S(9),S(SLSH),KC_RBRC,_______, _______,_______,_______, _______,_______,_______,_______, \
- _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, RA(7), RA(0),RA(NUBS), _______,_______,_______, _______,_______,_______,_______, \
- _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, S(DOT), S(2), _______, _______,_______,_______, \
- _______,S(NUBS),_______,_______,_______,_______,_______,_______,_______,KC_NUBS,S(NUBS),S(MINS), _______, _______, _______,_______,_______,_______, \
+ ALGR(KC_RBRC),_______, ALGR(KC_Q),KC_BSLS,_______,_______,M_CFLEX, S(KC_6),S(KC_RBRC), S(KC_8),S(KC_9),S(KC_SLSH),KC_RBRC,_______, _______,_______,_______, _______,_______,_______,_______, \
+ _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, ALGR(KC_7),ALGR(KC_0),ALGR(KC_NUBS), _______,_______,_______, _______,_______,_______,_______, \
+ _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, S(KC_DOT), S(KC_2), _______, _______,_______,_______, \
+ _______,S(KC_NUBS),_______,_______,_______,_______,_______,_______,_______,KC_NUBS,S(KC_NUBS),S(KC_MINS), _______, _______, _______,_______,_______,_______, \
_______,_______,_______, _______, _______,_______,_______,_______, _______,_______,_______, _______,_______),
/* Layer 3: media layer */
[MEDIA] = LAYOUT(\
@@ -72,11 +63,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
XXXXXXX,XXXXXXX,XXXXXXX, XXXXXXX, XXXXXXX,XXXXXXX,_______,XXXXXXX, KC_MRWD,KC_MSTP,KC_MFFD, XXXXXXX,XXXXXXX),
/* Layer 4: Mouse layer */
[MOUSE1] = LAYOUT(\
- F(6),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______,_______, \
+ TO(DEFAULT),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______,_______, \
_______,KC_ACL0,KC_ACL1,KC_ACL2,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______,_______, _______,_______,_______,_______, \
- _______,KC_BTN4,KC_WH_D,KC_MS_U,KC_WH_U,_______, C(Z),_______,_______,_______,_______,_______,_______,_______, _______,_______,_______, _______,_______,_______,_______, \
- _______,KC_BTN5,KC_MS_L,KC_MS_D,KC_MS_R, F(7),KC_WH_L,KC_WH_D,KC_WH_U,KC_WH_R,_______,_______, _______, _______,_______,_______, \
- MO(MOUSE2),_______, C(Y), C(X), C(C), C(V),_______,KC_BTN2,KC_BTN3,C(PGUP),C(PGDN),_______, KC_RSFT, _______, _______,_______,_______,_______, \
+ _______,KC_BTN4,KC_WH_D,KC_MS_U,KC_WH_U,_______, C(KC_Z),_______,_______,_______,_______,_______,_______,_______, _______,_______,_______, _______,_______,_______,_______, \
+ _______,KC_BTN5,KC_MS_L,KC_MS_D,KC_MS_R, CTRL_CLICK,KC_WH_L,KC_WH_D,KC_WH_U,KC_WH_R,_______,_______, _______, _______,_______,_______, \
+ MO(MOUSE2),_______,C(KC_Y),C(KC_X),C(KC_C),C(KC_V),_______,KC_BTN2,KC_BTN3,C(KC_PGUP),C(KC_PGDN),_______, KC_RSFT, _______, _______,_______,_______,_______, \
KC_LCTL,_______,KC_LALT, KC_BTN1, KC_RALT,KC_RGUI, KC_APP,KC_RCTL, _______,_______,_______, _______,_______),
/* Layer 5: Mouse layer 2*/
[MOUSE2] = LAYOUT(\
@@ -90,44 +81,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[MISC] = LAYOUT(\
_______, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, _______,_______,_______, \
_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______,_______, _______,_______,_______,_______, \
- _______,KC_SLCT, C(W), KC_UP,_______,_______,_______,_______,KC_BSPC, KC_DEL,_______,_______,_______,_______, _______,_______,_______, _______,_______,_______,_______, \
+ _______,KC_SLCT, C(KC_W), KC_UP,_______,_______,_______,_______,KC_BSPC, KC_DEL,_______,_______,_______,_______, _______,_______,_______, _______,_______,_______,_______, \
_______,_______,KC_LEFT,KC_DOWN,KC_RGHT,_______,KC_HOME,KC_PGDN,KC_PGUP,_______,_______,_______, _______, _______,_______,_______, \
- KC_LSFT,_______, C(Y), C(X), C(C), C(V), KC_SPC, KC_END,_______,C(PGUP),C(PGDN),_______, _______, _______, _______,_______,_______,_______, \
+ KC_LSFT,_______,C(KC_Y),C(KC_X),C(KC_C),C(KC_V), KC_SPC, KC_END,_______,C(KC_PGUP),C(KC_PGDN),_______, _______, _______, _______,_______,_______,_______, \
_______,_______,_______, LT(MISC, KC_SPC), _______,_______,_______,_______, _______,_______,_______, _______,_______),
};
-const uint16_t PROGMEM fn_actions[] = {
- [1] = ACTION_FUNCTION_TAP(LCTRL_BRACKET), // tap to print [
- [2] = ACTION_FUNCTION_TAP(RCTRL_BRACKET), // tap to print ]
- [3] = ACTION_FUNCTION_TAP(LALT_CURLY), // tap to print {
- [4] = ACTION_FUNCTION_TAP(RALT_CURLY), // tap to print }
- [6] = ACTION_LAYER_SET_CLEAR(DEFAULT),
- [7] = ACTION_FUNCTION_TAP(CTRL_CLICK),
- [8] = ACTION_FUNCTION_TAP(LSHFT_PAREN), // tap to print (
- [9] = ACTION_FUNCTION_TAP(RSHFT_PAREN), // tap to print )
-};
-
-const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
-{
- // MACRODOWN only works in this function
- switch(id) {
- case GRV: // macro to print accent grave
- return (record->event.pressed ?
- MACRO( D(LSFT), T(EQL), U(RALT), T(SPC), END) :
- MACRO_NONE );
- case CFLEX: // print accent circonflex
- return (record->event.pressed ?
- MACRO( T(GRV), T(SPC), END ) :
- MACRO_NONE );
- }
- return MACRO_NONE;
-};
-
-
-void matrix_init_user(void) {
-
-}
-
void matrix_scan_user(void) {
uint8_t layer;
layer = biton32(layer_state);
@@ -147,10 +106,6 @@ void matrix_scan_user(void) {
}
}
-void led_set_user(uint8_t usb_led) {
-
-}
-
void tap_helper(keyrecord_t *record, uint16_t orig_mod, uint16_t macro_mod, uint16_t macro_kc ) {
if (record->event.pressed) {
if (record->tap.count > 0 && !record->tap.interrupted) {
@@ -175,28 +130,45 @@ void tap_helper(keyrecord_t *record, uint16_t orig_mod, uint16_t macro_mod, uint
}
}
-/* if LCTRL is tabbed, print (, or ) if RCTRL is tabbed, same for LALT/RALT and [/] */
-void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
- // The code is copied from keymap_hasu.c in the tmk keyboards hhkb folder
- switch (id) {
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ uint8_t layer;
+ layer = biton32(layer_state);
+ if (layer == PROG2) {
+ if (keycode >= KC_A && keycode <= KC_EXSEL && \
+ !( // do not send LSFT + these keycodes, they are needed for emulating the US layout
+ keycode == KC_NONUS_BSLASH ||
+ keycode == KC_RBRC ||
+ keycode == KC_BSLS ||
+ keycode == KC_GRV
+ )) {
+ // LSFT is the modifier for this layer, so we set LSFT for every key to get the expected behavior
+ if (record->event.pressed) {
+ register_mods(MOD_LSFT);
+ } else {
+ unregister_mods(MOD_LSFT);
+ }
+ }
+ }
+
+ switch (keycode) {
case LCTRL_BRACKET:
tap_helper(record, KC_LCTL, KC_RALT, KC_8);
- break;
+ return false;
case RCTRL_BRACKET:
tap_helper(record, KC_RCTL, KC_RALT, KC_9);
- break;
+ return false;
case LALT_CURLY:
tap_helper(record, KC_LALT, KC_RALT, KC_7);
- break;
+ return false;
case RALT_CURLY:
tap_helper(record, KC_RALT, KC_RALT, KC_0);
- break;
+ return false;
case LSHFT_PAREN:
tap_helper(record, KC_LSFT, KC_LSFT, KC_8);
- break;
+ return false;
case RSHFT_PAREN:
tap_helper(record, KC_RSFT, KC_LSFT, KC_9);
- break;
+ return false;
case CTRL_CLICK:
if (record->event.pressed) {
mousekey_clear();
@@ -212,28 +184,16 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
unregister_mods(MOD_BIT(KC_LCTL));
send_keyboard_report();
}
- break;
+ return false;
+ case M_GRV:
+ tap_code16(S(KC_EQL));
+ tap_code(KC_SPC);
+ return false;
+ case M_CFLEX:
+ tap_code(KC_GRV);
+ tap_code(KC_SPC);
+ return false;
}
-}
-bool process_record_user(uint16_t keycode, keyrecord_t *record) {
- uint8_t layer;
- layer = biton32(layer_state);
- if (layer == PROG2) {
- if (keycode >= KC_A && keycode <= KC_EXSEL && \
- !( // do not send LSFT + these keycodes, they are needed for emulating the US layout
- keycode == KC_NONUS_BSLASH ||
- keycode == KC_RBRC ||
- keycode == KC_BSLS ||
- keycode == KC_GRV
- )) {
- // LSFT is the modifier for this layer, so we set LSFT for every key to get the expected behavior
- if (record->event.pressed) {
- register_mods(MOD_LSFT);
- } else {
- unregister_mods(MOD_LSFT);
- }
- }
- }
return true;
}
diff --git a/keyboards/bpiphany/pegasushoof/2013/2013.h b/keyboards/bpiphany/pegasushoof/2013/2013.h
index b3e911ab41..7a4d7f0b58 100644
--- a/keyboards/bpiphany/pegasushoof/2013/2013.h
+++ b/keyboards/bpiphany/pegasushoof/2013/2013.h
@@ -45,14 +45,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
KH2, KG3, KH3, KI3, KJ3, KJ6, KK6, KK3, KL3, KM3, KF3, KF6, KO1, \
KB2, KG1, KH1, KI1, KJ1, KJ0, KK0, KK1, KL1, KM1, KF0, KB3, KC6, \
KP4, KD2, KN6, KQ6, KN0, KA3, KM0, KP1, KC0, KQ0, KR0 \
- ) LAYOUT( \
- KG6, KH4, KI4, KI2, KI6, KP5, KL6, KM2, KM4, KO4, KO5, KO6, KO0, KN5, KN7, KP7, \
- KG4, KG5, KH5, KI5, KJ5, KJ4, KK4, KK5, KL5, KM5, KF5, KF4, KL4, KO2, KR4, KC4, KE4, \
- KG2, KG7, KH7, KI7, KJ7, KJ2, KK2, KK7, KL7, KM7, KF7, KF2, KL2, KO3, KQ4, KC5, KE5, \
- KH2, KG3, KH3, KI3, KJ3, KJ6, KK6, KK3, KL3, KM3, KF3, KF6, KO1, \
- KB2,KC_NO,KG1, KH1, KI1, KJ1, KJ0, KK0, KK1, KL1, KM1, KF0, KB3, KC6, \
- KP4, KD2, KN6, KQ6, KN0, KA3, KM0, KP1, KC0, KQ0, KR0 \
- )
+ ) { /* 00-A 01-B 02-C 03-D 04-E 05-F 06-G 07-H 08-I 09-J 10-K 11-L 12-M 13-N 14-O 15-P 16-Q 17-R */ \
+ /* 0 */ { KC_NO , KC_NO , KC0 , KC_NO , KC_NO , KF0 , KC_NO , KC_NO , KC_NO , KJ0 , KK0 , KC_NO , KM0 , KN0 , KO0 , KC_NO , KQ0 , KR0 }, \
+ /* 1 */ { KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KG1 , KH1 , KI1 , KJ1 , KK1 , KL1 , KM1 , KC_NO , KO1 , KP1 , KC_NO , KC_NO }, \
+ /* 2 */ { KC_NO , KB2 , KC_NO , KD2 , KC_NO , KF2 , KG2 , KH2 , KI2 , KJ2 , KK2 , KL2 , KM2 , KC_NO , KO2 , KC_NO , KC_NO , KC_NO }, \
+ /* 3 */ { KA3 , KB3 , KC_NO , KC_NO , KC_NO , KF3 , KG3 , KH3 , KI3 , KJ3 , KK3 , KL3 , KM3 , KC_NO , KO3 , KC_NO , KC_NO , KC_NO }, \
+ /* 4 */ { KC_NO , KC_NO , KC4 , KC_NO , KE4 , KF4 , KG4 , KH4 , KI4 , KJ4 , KK4 , KL4 , KM4 , KC_NO , KO4 , KP4 , KQ4 , KR4 }, \
+ /* 5 */ { KC_NO , KC_NO , KC5 , KC_NO , KE5 , KF5 , KG5 , KH5 , KI5 , KJ5 , KK5 , KL5 , KM5 , KN5 , KO5 , KP5 , KC_NO , KC_NO }, \
+ /* 6 */ { KC_NO , KC_NO , KC6 , KC_NO , KC_NO , KF6 , KG6 , KC_NO , KI6 , KJ6 , KK6 , KL6 , KC_NO , KN6 , KO6 , KC_NO , KQ6 , KC_NO }, \
+ /* 7 */ { KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KF7 , KG7 , KH7 , KI7 , KJ7 , KK7 , KL7 , KM7 , KN7 , KC_NO , KP7 , KC_NO , KC_NO } \
+ }
#define LAYOUT_tkl_jis( \
KG6, KH4, KI4, KI2, KI6, KP5, KL6, KM2, KM4, KO4, KO5, KO6, KO0, KN5, KN7, KP7, \
diff --git a/keyboards/bpiphany/pegasushoof/2015/2015.h b/keyboards/bpiphany/pegasushoof/2015/2015.h
index 8a0084d405..418772aa28 100644
--- a/keyboards/bpiphany/pegasushoof/2015/2015.h
+++ b/keyboards/bpiphany/pegasushoof/2015/2015.h
@@ -47,14 +47,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
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, KK6, KC0, KM3, KD0, KA1, KO0, KK0, KL0 \
- ) LAYOUT( \
- 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,KC_NO,KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KN3, KO6, \
- KA4, KP2, KC6, KK6, KC0, KM3, KD0, KA1, KO0, KK0, KL0 \
- )
+ ) { /* 00-A 01-B 02-C 03-D 04-E 05-F 06-G 07-H 08-I 09-J 10-K 11-L 12-M 13-N 14-O 15-P 16-Q 17-R */ \
+ /* 0 */ { ___ , KB0 , KC0 , KD0 , ___ , KF0 , KG0 , ___ , ___ , ___ , KK0 , KL0 , ___ , ___ , KO0 , ___ , ___ , KR0 }, \
+ /* 1 */ { KA1 , KB1 , ___ , KD1 , KE1 , KF1 , KG1 , KH1 , KI1 , KJ1 , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ }, \
+ /* 2 */ { ___ , KB2 , ___ , KD2 , KE2 , KF2 , KG2 , KH2 , KI2 , KJ2 , ___ , ___ , ___ , KN2 , ___ , KP2 , ___ , KR2 }, \
+ /* 3 */ { ___ , KB3 , ___ , KD3 , KE3 , KF3 , KG3 , KH3 , KI3 , KJ3 , ___ , ___ , KM3 , KN3 , ___ , ___ , ___ , KR3 }, \
+ /* 4 */ { KA4 , KB4 , ___ , KD4 , KE4 , KF4 , KG4 , KH4 , KI4 , KJ4 , KK4 , KL4 , ___ , ___ , KO4 , ___ , KQ4 , KR4 }, \
+ /* 5 */ { KA5 , ___ , KC5 , KD5 , KE5 , KF5 , KG5 , KH5 , KI5 , KJ5 , ___ , ___ , ___ , ___ , ___ , ___ , ___ , KR5 }, \
+ /* 6 */ { ___ , KB6 , KC6 , ___ , KE6 , KF6 , KG6 , KH6 , ___ , KJ6 , KK6 , ___ , ___ , ___ , KO6 , ___ , ___ , KR6 }, \
+ /* 7 */ { KA7 , KB7 , KC7 , KD7 , KE7 , KF7 , KG7 , KH7 , KI7 , KJ7 , ___ , ___ , ___ , ___ , KO7 , ___ , KQ7 , KR7 } \
+ }
#define LAYOUT_tkl_iso( \
KJ6, KI4, KH4, KH2, KH6, KA7, KE6, KD2, KD4, KB4, KB7, KB6, KB0, KC7, KC5, KA5, \
@@ -63,14 +65,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
KI2, KJ3, KI3, KH3, KG3, KG6, KF6, KF3, KE3, KD3, KR3, KR6, KB3, KB1, \
KN2, KI6, KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KN3, KO6, \
KA4, KP2, KC6, KK6, KC0, KM3, KD0, KA1, KO0, KK0, KL0 \
- ) LAYOUT( \
- 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, KI6 ,KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KN3, KO6, \
- KA4, KP2, KC6, KK6, KC0, KM3, KD0, KA1, KO0, KK0, KL0 \
- )
+ ) { /* 00-A 01-B 02-C 03-D 04-E 05-F 06-G 07-H 08-I 09-J 10-K 11-L 12-M 13-N 14-O 15-P 16-Q 17-R */ \
+ /* 0 */ { ___ , KB0 , KC0 , KD0 , ___ , KF0 , KG0 , ___ , ___ , ___ , KK0 , KL0 , ___ , ___ , KO0 , ___ , ___ , KR0 }, \
+ /* 1 */ { KA1 , KB1 , ___ , KD1 , KE1 , KF1 , KG1 , KH1 , KI1 , KJ1 , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ }, \
+ /* 2 */ { ___ , KB2 , ___ , KD2 , KE2 , KF2 , KG2 , KH2 , KI2 , KJ2 , ___ , ___ , ___ , KN2 , ___ , KP2 , ___ , KR2 }, \
+ /* 3 */ { ___ , KB3 , ___ , KD3 , KE3 , KF3 , KG3 , KH3 , KI3 , KJ3 , ___ , ___ , KM3 , KN3 , ___ , ___ , ___ , KR3 }, \
+ /* 4 */ { KA4 , KB4 , ___ , KD4 , KE4 , KF4 , KG4 , KH4 , KI4 , KJ4 , KK4 , KL4 , ___ , ___ , KO4 , ___ , KQ4 , KR4 }, \
+ /* 5 */ { KA5 , ___ , KC5 , KD5 , KE5 , KF5 , KG5 , KH5 , KI5 , KJ5 , ___ , ___ , ___ , ___ , ___ , ___ , ___ , KR5 }, \
+ /* 6 */ { ___ , KB6 , KC6 , ___ , KE6 , KF6 , KG6 , KH6 , KI6 , KJ6 , KK6 , ___ , ___ , ___ , KO6 , ___ , ___ , KR6 }, \
+ /* 7 */ { KA7 , KB7 , KC7 , KD7 , KE7 , KF7 , KG7 , KH7 , KI7 , KJ7 , ___ , ___ , ___ , ___ , KO7 , ___ , KQ7 , KR7 } \
+ }
#define LAYOUT_tkl_jis( \
KJ6, KI4, KH4, KH2, KH6, KA7, KE6, KD2, KD4, KB4, KB7, KB6, KB0, KC7, KC5, KA5, \
diff --git a/keyboards/bpiphany/pegasushoof/keymaps/blowrak/keymap.c b/keyboards/bpiphany/pegasushoof/keymaps/blowrak/keymap.c
index f9234a7b2f..7884462021 100644
--- a/keyboards/bpiphany/pegasushoof/keymaps/blowrak/keymap.c
+++ b/keyboards/bpiphany/pegasushoof/keymaps/blowrak/keymap.c
@@ -24,8 +24,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define SE_AO KC_LBRC
#define SE_CIRC KC_RBRC
#define SE_QUOT KC_BSLS
-#define SE_OE KC_SCLN
-#define SE_AE KC_QUOT
+#define SE_ODIA KC_SCLN
+#define SE_ADIA KC_QUOT
#define SE_MINS KC_SLSH
#define SE_LTGT KC_NUBS
#define SE_LCBR RALT(KC_7)
@@ -45,7 +45,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[KM_BLOWRAK] = LAYOUT( \
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,KC_PAUS, \
SE_HALF, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, SE_PLUS,SE_ACUT,KC_BSPC, KC_INS, KC_HOME,KC_PGUP, \
- KC_TAB, SE_AO, SE_AE, SE_OE, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_COMM,SE_CIRC,SE_QUOT, KC_DEL, KC_END, KC_PGDN, \
+ KC_TAB, SE_AO, SE_ADIA,SE_ODIA,KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_COMM,SE_CIRC,SE_QUOT, KC_DEL, KC_END, KC_PGDN, \
KC_LCTRL,KC_A, KC_O, KC_E, KC_U, KC_I, KC_H, KC_D, KC_T, KC_N, KC_S, SE_MINS, KC_ENT, \
KC_LSFT, SE_LTGT,KC_DOT, KC_Q, KC_J, KC_K, KC_B, KC_X, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, KC_UP, \
MO(KM_MEDIA),KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,KC_MENU,TG(KM_QWERTY), KC_LEFT,KC_DOWN,KC_RGHT),
@@ -54,7 +54,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
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,KC_PAUS, \
SE_HALF, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, SE_PLUS,SE_ACUT,KC_BSPC, KC_INS, KC_HOME,KC_PGUP, \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, SE_AO, SE_CIRC,SE_QUOT, KC_DEL, KC_END, KC_PGDN, \
- KC_LCTRL,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, SE_OE, SE_AE, KC_ENT, \
+ KC_LCTRL,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, SE_ODIA,SE_ADIA, KC_ENT, \
KC_LSFT, SE_LTGT,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, SE_MINS, KC_RSFT, KC_UP, \
MO(KM_MEDIA),KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,KC_MENU,TG(KM_QWERTY), KC_LEFT,KC_DOWN,KC_RGHT),
/* Layer 2: Media layer */
diff --git a/keyboards/checkerboards/nop60/info.json b/keyboards/checkerboards/nop60/info.json
index ab68c0cdac..b8d081c262 100644
--- a/keyboards/checkerboards/nop60/info.json
+++ b/keyboards/checkerboards/nop60/info.json
@@ -1,9 +1,9 @@
{
"keyboard_name": "nop60",
- "url": "",
"maintainer": "nasp",
- "width": 15,
"height": 5,
+ "width": 15,
+ "url": "",
"layout_aliases": {
"LAYOUT_2x3u": "LAYOUT_60_tsangan_hhkb_split_space",
"LAYOUT_7u": "LAYOUT_60_tsangan_hhkb"
diff --git a/keyboards/christmas_tree/rules.mk b/keyboards/christmas_tree/rules.mk
index da85eb3728..5e8cf32552 100644
--- a/keyboards/christmas_tree/rules.mk
+++ b/keyboards/christmas_tree/rules.mk
@@ -27,7 +27,6 @@ AUDIO_ENABLE = no # Audio output on port C6
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
-API_SYSEX_ENABLE = no
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
diff --git a/keyboards/clueboard/66/keymaps/magicmonty/keymap.c b/keyboards/clueboard/66/keymaps/magicmonty/keymap.c
index 54420d31b6..56d4c47071 100644
--- a/keyboards/clueboard/66/keymaps/magicmonty/keymap.c
+++ b/keyboards/clueboard/66/keymaps/magicmonty/keymap.c
@@ -40,8 +40,9 @@
// CTRL when held, ESC when tapped
#define CTL_ESC CTL_T(KC_ESC)
-// Reset RGB mode to layer signalling
-#define RGB_RST F(0)
+enum custom_keycodes {
+ RGB_RST = SAFE_RANGE
+};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap _BL: Base Layer (Default Layer) */
@@ -103,21 +104,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
#endif
};
-/* This is a list of user defined functions. F(N) corresponds to item N
- of this list.
- */
-const uint16_t PROGMEM fn_actions[] = {
- [0] = ACTION_FUNCTION(0), // Calls action_function()
-};
-
-void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
- switch (id) {
- case 0:
- if (record->event.pressed) {
- rgblight_mode(1);
- rgblight_sethsv(206, 255, 255);
- }
- }
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case RGB_RST:
+ if (record->event.pressed) {
+ rgblight_mode(1);
+ rgblight_sethsv(206, 255, 255);
+ }
+ return false;
+ }
+ return true;
}
enum layer_id {
diff --git a/keyboards/clueboard/66/keymaps/tetris/keymap.c b/keyboards/clueboard/66/keymaps/tetris/keymap.c
index ef3abd6672..26dd97feec 100644
--- a/keyboards/clueboard/66/keymaps/tetris/keymap.c
+++ b/keyboards/clueboard/66/keymaps/tetris/keymap.c
@@ -1,9 +1,6 @@
#include QMK_KEYBOARD_H
#include "tetris_text.h"
-// Helpful defines
-#define GRAVE_MODS (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)|MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT))
-
// 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
@@ -12,11 +9,15 @@
#define _FL 1
#define _CL 2
+enum custom_keycodes {
+ TETRIS_START = SAFE_RANGE
+};
+
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap _BL: Base Layer (Default Layer)
*/
[_BL] = LAYOUT(
- F(0), 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_GRV, KC_BSPC, KC_PGUP,
+ KC_GESC, 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_GRV, KC_BSPC, KC_PGUP,
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_BSLS, KC_PGDN,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT,
KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP,
@@ -41,71 +42,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, _______, _______,_______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI),
};
-/* This is a list of user defined functions. F(N) corresponds to item N
- of this list.
- */
-const uint16_t PROGMEM fn_actions[] = {
- [0] = ACTION_FUNCTION(0), // Calls action_function()
- [1] = ACTION_FUNCTION(1)
-};
-
static uint8_t tetris_key_presses = 0;
static uint16_t tetris_timer = 0;
static uint8_t tetris_running = 0;
static int tetris_keypress = 0;
-void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
- static uint8_t mods_pressed;
- static bool mod_flag;
-
- switch (id) {
- case 0:
- // clueboard specific hook to make escape quite tetris
- if (tetris_running) {
- tetris_running = 0;
- return;
- }
-
- /* Handle the combined Grave/Esc key
- */
- mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed
-
- if (record->event.pressed) {
- /* The key is being pressed.
- */
- if (mods_pressed) {
- mod_flag = true;
- add_key(KC_GRV);
- send_keyboard_report();
- } else {
- add_key(KC_ESC);
- send_keyboard_report();
- }
- } else {
- /* The key is being released.
- */
- if (mod_flag) {
- mod_flag = false;
- del_key(KC_GRV);
- send_keyboard_report();
- } else {
- del_key(KC_ESC);
- send_keyboard_report();
- }
- }
- break;
- case 1:
- if (record->event.pressed) {
- tetris_running = 1;
- tetris_timer = 0;
- tetris_keypress = 0;
- // set randomness using total number of key presses
- tetris_start(tetris_key_presses);
- }
- break;
- }
-}
-
/*
* Set up tetris
*/
@@ -130,6 +71,25 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
}
+ switch (keycode) {
+ case KC_GESC:
+ // clueboard specific hook to make escape quite tetris
+ if (tetris_running) {
+ tetris_running = 0;
+ return false;
+ }
+ break;
+ case TETRIS_START:
+ if (record->event.pressed) {
+ tetris_running = 1;
+ tetris_timer = 0;
+ tetris_keypress = 0;
+ // set randomness using total number of key presses
+ tetris_start(tetris_key_presses);
+ }
+ return false;
+ }
+
return true;
}
@@ -148,57 +108,45 @@ void matrix_scan_user(void) {
}
}
-void send_keycode(uint16_t keycode) {
- register_code(keycode);
- unregister_code(keycode);
-}
-
-void send_keycode_shift(uint16_t keycode) {
- register_code(KC_LSFT);
- register_code(keycode);
- unregister_code(keycode);
- unregister_code(KC_LSFT);
-}
-
void tetris_send_up(void) {
- send_keycode(KC_UP);
+ tap_code(KC_UP);
}
void tetris_send_left(void) {
- send_keycode(KC_LEFT);
+ tap_code(KC_LEFT);
}
void tetris_send_down(void) {
- send_keycode(KC_DOWN);
+ tap_code(KC_DOWN);
}
void tetris_send_right(void) {
- send_keycode(KC_RGHT);
+ tap_code(KC_RGHT);
}
void tetris_send_backspace(void) {
- send_keycode(KC_BSPC);
+ tap_code(KC_BSPC);
}
void tetris_send_delete(void) {
- send_keycode(KC_DEL);
+ tap_code(KC_DEL);
}
void tetris_send_string(const char *s) {
for (int i = 0; s[i] != 0; i++) {
if (s[i] >= 'a' && s[i] <= 'z') {
- send_keycode(KC_A + (s[i] - 'a'));
+ tap_code(KC_A + (s[i] - 'a'));
} else if (s[i] >= 'A' && s[i] <= 'Z') {
- send_keycode_shift(KC_A + (s[i] - 'A'));
+ tap_code16(S(KC_A + (s[i] - 'A')));
} else if (s[i] >= '1' && s[i] <= '9') {
- send_keycode(KC_1 + (s[i] - '1'));
+ tap_code(KC_1 + (s[i] - '1'));
} else {
switch (s[i]) {
- case ' ': send_keycode(KC_SPACE); break;
- case '.': send_keycode(KC_DOT); break;
- case '0': send_keycode(KC_0); break;
+ case ' ': tap_code(KC_SPACE); break;
+ case '.': tap_code(KC_DOT); break;
+ case '0': tap_code(KC_0); break;
}
}
}
}
void tetris_send_newline(void) {
- send_keycode(KC_ENT);
+ tap_code(KC_ENT);
}
int tetris_get_keypress(void) {
diff --git a/keyboards/comet46/keymaps/satt/keymap.c b/keyboards/comet46/keymaps/satt/keymap.c
index 98c3c175be..fc228c9956 100644
--- a/keyboards/comet46/keymaps/satt/keymap.c
+++ b/keyboards/comet46/keymaps/satt/keymap.c
@@ -30,7 +30,7 @@ enum custom_keycodes {
};
// JIS keycodes
-#define KC_JZHT JP_ZHTG // hankaku/zenkaku|kanzi
+#define KC_JZHT JP_ZKHK // hankaku/zenkaku|kanzi
#define KC_JCIR JP_CIRC // ^, ~
#define KC_JAT JP_AT // @, `
#define KC_JLBR JP_LBRC // [, {
@@ -40,8 +40,8 @@ enum custom_keycodes {
#define KC_JMHE JP_MHEN // muhenkan
#define KC_JHEN JP_HENK // henkan
#define KC_JKAN JP_KANA // katakana/hiragana|ro-mazi
-#define KC_JMKA JP_MKANA //kana on MacOSX
-#define KC_JMEI JP_MEISU //eisu on MacOSX
+#define KC_JMKA JP_LANG1 //kana on MacOSX
+#define KC_JMEI KC_LANG2 //eisu on MacOSX
#define KC_JAMP JP_AMPR // &
#define KC_JQUO JP_QUOT // '
#define KC_JLPR JP_LPRN // (
diff --git a/keyboards/contra/keymaps/deastiny/keymap.c b/keyboards/contra/keymaps/deastiny/keymap.c
index 846cbe9c7b..026db263ed 100644
--- a/keyboards/contra/keymaps/deastiny/keymap.c
+++ b/keyboards/contra/keymaps/deastiny/keymap.c
@@ -46,9 +46,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
`-----------------------------------------------------------------------------------'
**/
[_DVORAK] = LAYOUT_planck_mit(
- KC_ESC, DE_UE, DE_COMM, DE_DOT, DE_P, DE_Y, DE_F, DE_G, DE_C, DE_T, DE_Z, KC_BSPC,
+ KC_ESC, DE_UDIA, DE_COMM, DE_DOT, DE_P, DE_Y, DE_F, DE_G, DE_C, DE_T, DE_Z, KC_BSPC,
KC_TAB, DE_A, DE_O, DE_E, DE_I, DE_U, DE_H, DE_D, DE_R, DE_N, DE_S, DE_L,
- KC_LSFT, DE_AE, DE_OE, DE_Q, DE_J, DE_K, DE_X, DE_B, DE_M, DE_W, DE_V, KC_ENT ,
+ KC_LSFT, DE_ADIA, DE_ODIA, DE_Q, DE_J, DE_K, DE_X, DE_B, DE_M, DE_W, DE_V, KC_ENT ,
KC_LCTL, KC_LGUI, KC_LALT, MO(3), LOWER, KC_SPC, RAISE, KC_LEFT, KC_RIGHT, KC_UP, KC_DOWN
),
@@ -66,7 +66,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_LOWER] = LAYOUT_planck_mit(
DE_TILD, DE_EXLM, DE_AT, DE_HASH, DE_DLR, DE_PERC, DE_CIRC, DE_AMPR, DE_ASTR, DE_LPRN, DE_RPRN, KC_DEL,
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, DE_UNDS, DE_PLUS, DE_LCBR, DE_RCBR, DE_PIPE,
- _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, DE_QST,
+ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, DE_QUES,
_______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
),
diff --git a/keyboards/contra/keymaps/maxr1998/keymap.c b/keyboards/contra/keymaps/maxr1998/keymap.c
index c32a856611..044ed0c0cb 100644
--- a/keyboards/contra/keymaps/maxr1998/keymap.c
+++ b/keyboards/contra/keymaps/maxr1998/keymap.c
@@ -65,8 +65,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------------------'
*/
[_FN] = {
- {_______, _______, _______, _______, _______, _______, _______, DE_UE, _______, DE_OE, _______, KC_DEL },
- {KC_LOCK, DE_AE, DE_SS, _______, _______, G_1, _______, RGB_M_P, RGB_M_B, RGB_M_SW,_______, _______},
+ {_______, _______, _______, _______, _______, _______, _______, DE_UDIA, _______, DE_ODIA, _______, KC_DEL },
+ {KC_LOCK, DE_ADIA, DE_SS, _______, _______, G_1, _______, RGB_M_P, RGB_M_B, RGB_M_SW,_______, _______},
{_______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_TOG, RGB_HUI, KC_PGUP, _______},
{_______, _______, _______, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, KC_HOME, KC_PGDN, KC_END }
},
@@ -85,13 +85,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_NR] = {
{_______, DE_1, DE_2, DE_3, DE_4, DE_5, DE_6, DE_7, DE_8, DE_9, DE_0, _______},
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, DE_HASH, _______},
- {_______, DE_LESS, _______, _______, _______, _______, _______, _______, _______, _______, DE_MINS, _______},
+ {_______, DE_LABK, _______, _______, _______, _______, _______, _______, _______, _______, DE_MINS, _______},
{_______, _______, _______, XXXXXXX, _______, _______, _______, _______, XXXXXXX, _______, _______, _______}
},
[_NR_L3] = {
{_______, DE_1, DE_2, DE_3, DE_4, DE_5, DE_6, DE_7, DE_8, DE_9, DE_0, DE_SS },
{_______, DE_Q, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
- {_______, DE_LESS, _______, _______, _______, _______, _______, _______, _______, _______, DE_MINS, _______},
+ {_______, DE_LABK, _______, _______, _______, _______, _______, _______, _______, _______, DE_MINS, _______},
{_______, _______, _______, XXXXXXX, _______, _______, _______, _______, XXXXXXX, _______, _______, _______}
},
diff --git a/keyboards/converter/hp_46010a/rules.mk b/keyboards/converter/hp_46010a/rules.mk
index b7199d7f90..e154e380bc 100644
--- a/keyboards/converter/hp_46010a/rules.mk
+++ b/keyboards/converter/hp_46010a/rules.mk
@@ -27,7 +27,6 @@ AUDIO_ENABLE = no # Audio output on port C6
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
-API_SYSEX_ENABLE = no
SPLIT_KEYBOARD = no
WAIT_FOR_USB = yes
LAYOUTS_HAS_RGB = no
diff --git a/keyboards/converter/ibm_5291/config.h b/keyboards/converter/ibm_5291/config.h
index adf66cc697..59ec04cfb4 100644
--- a/keyboards/converter/ibm_5291/config.h
+++ b/keyboards/converter/ibm_5291/config.h
@@ -25,7 +25,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MANUFACTURER QMK
#define PRODUCT 5291 keyboard converter
-#define MATRIX_ROWS 24
+#define MATRIX_ROWS 5
#define MATRIX_COLS 4
#define MATRIX_ROW_PINS {B2, B3, B4, B5, B6}
diff --git a/keyboards/converter/ibm_5291/rules.mk b/keyboards/converter/ibm_5291/rules.mk
index 0b53753ebc..ba59d2ae9e 100644
--- a/keyboards/converter/ibm_5291/rules.mk
+++ b/keyboards/converter/ibm_5291/rules.mk
@@ -27,7 +27,6 @@ AUDIO_ENABLE = no # Audio output on port C6
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
-API_SYSEX_ENABLE = no
SPLIT_KEYBOARD = no
WAIT_FOR_USB = yes
LAYOUTS_HAS_RGB = no
diff --git a/keyboards/converter/ibm_terminal/keymaps/default/rules.mk b/keyboards/converter/ibm_terminal/keymaps/default/rules.mk
index 749b93312c..01664a445b 100644
--- a/keyboards/converter/ibm_terminal/keymaps/default/rules.mk
+++ b/keyboards/converter/ibm_terminal/keymaps/default/rules.mk
@@ -15,7 +15,6 @@ UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
PS2_USE_USART = yes
-API_SYSEX_ENABLE = no
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
diff --git a/keyboards/converter/ibm_terminal/keymaps/priyadi/rules.mk b/keyboards/converter/ibm_terminal/keymaps/priyadi/rules.mk
index 76d349920f..15ff28f350 100644
--- a/keyboards/converter/ibm_terminal/keymaps/priyadi/rules.mk
+++ b/keyboards/converter/ibm_terminal/keymaps/priyadi/rules.mk
@@ -16,7 +16,6 @@ UNICODEMAP_ENABLE = yes
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
PS2_USE_USART = yes
-API_SYSEX_ENABLE = no
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
diff --git a/keyboards/converter/ibm_terminal/rules.mk b/keyboards/converter/ibm_terminal/rules.mk
index 059d7b303e..8e30f5be5b 100644
--- a/keyboards/converter/ibm_terminal/rules.mk
+++ b/keyboards/converter/ibm_terminal/rules.mk
@@ -28,7 +28,6 @@ UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
PS2_USE_USART = yes
-API_SYSEX_ENABLE = no
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
CUSTOM_MATRIX = yes
diff --git a/keyboards/converter/siemens_tastatur/config.h b/keyboards/converter/siemens_tastatur/config.h
index ae6f1a209a..cd54ed3d83 100644
--- a/keyboards/converter/siemens_tastatur/config.h
+++ b/keyboards/converter/siemens_tastatur/config.h
@@ -26,11 +26,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define PRODUCT Siemens Tastatur
/* key matrix size */
-#define MATRIX_ROWS 4
+#define MATRIX_ROWS 5
#define MATRIX_COLS 19
//This is all fake and not used
-#define MATRIX_COL_PINS { B11, B10, B1, B0, A7, A6, A5, A4, A3, A2, A1, A0, C15, C14 }
+#define MATRIX_COL_PINS { B11, B10, B1, B0, A7, A6, A5, A4, A3, A2, A1, A0, C15, C14, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN }
#define MATRIX_ROW_PINS { B3, B4, B5, B6, B7 }
#define DIODE_DIRECTION COL2ROW
diff --git a/keyboards/converter/usb_usb/usb_usb.h b/keyboards/converter/usb_usb/usb_usb.h
index e0c7c9c0d4..1d1b6770d1 100644
--- a/keyboards/converter/usb_usb/usb_usb.h
+++ b/keyboards/converter/usb_usb/usb_usb.h
@@ -127,15 +127,40 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
K39,K04,K16,K07,K09,K0A,K0B,K0D,K0E,K0F,K33,K34, K28, K5C,K5D,K5E,K57, \
KE1,K1D,K1B,K06,K19,K05,K11,K10,K36,K37,K38, KE5, K52, K59,K5A,K5B, \
KE0,KE3,KE2, K2C, KE6,KE7,K65,KE4, K50,K51,K4F, K62, K63,K58 \
-) LAYOUT_all( \
- KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \
- K29, K3A, K3B, K3C, K3D, K3E, K3F, K40, K41, K42, K43, K44, K45, K46, K47, K48, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \
- K35, K1E, K1F, K20, K21, K22, K23, K24, K25, K26, K27, K2D, K2E, KC_NO, K2A, K49, K4A, K4B, K53, K54, K55, K56, KC_NO, KC_NO, \
- K2B, K14, K1A, K08, K15, K17, K1C, K18, K0C, K12, K13, K2F, K30, K31, K4C, K4D, K4E, K5F, K60, K61, K57, KC_NO, KC_NO, \
- K39, K04, K16, K07, K09, K0A, K0B, K0D, K0E, K0F, K33, K34, KC_NO, K28, K5C, K5D, K5E, KC_NO, KC_NO, KC_NO, \
- KE1, KC_NO, K1D, K1B, K06, K19, K05, K11, K10, K36, K37, K38, KC_NO, KE5, K52, K59, K5A, K5B, KC_NO, KC_NO, KC_NO, \
- KE0, KE3, KE2, KC_NO, KC_NO, K2C, KC_NO, KC_NO, KC_NO, KE6, KE7, K65, KE4, K50, K51, K4F, K62, K63, K58, KC_NO, KC_NO \
-)
+) { \
+ { KC_NO, KC_NO, KC_NO, KC_NO, K04, K05, K06, K07, /* 00-07 */ \
+ K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, /* 08-0F */ \
+ { K10, K11, K12, K13, K14, K15, K16, K17, /* 10-17 */ \
+ K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, /* 18-1F */ \
+ { K20, K21, K22, K23, K24, K25, K26, K27, /* 20-27 */ \
+ K28, K29, K2A, K2B, K2C, K2D, K2E, K2F }, /* 28-2F */ \
+ { K30, K31, KC_NO, K33, K34, K35, K36, K37, /* 30-37 */ \
+ K38, K39, K3A, K3B, K3C, K3D, K3E, K3F }, /* 38-3F */ \
+ { K40, K41, K42, K43, K44, K45, K46, K47, /* 40-47 */ \
+ K48, K49, K4A, K4B, K4C, K4D, K4E, K4F }, /* 48-4F */ \
+ { K50, K51, K52, K53, K54, K55, K56, K57, /* 50-57 */ \
+ K58, K59, K5A, K5B, K5C, K5D, K5E, K5F }, /* 58-5F */ \
+ { K60, K61, K62, K63, KC_NO, K65, KC_NO, KC_NO, /* 60-67 */ \
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, }, /* 68-6F */ \
+ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* 70-77 */ \
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, }, /* 78-7F */ \
+ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* 80-87 */ \
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* 88-8F */ \
+ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* 90-97 */ \
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* 98-9F */ \
+ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* A0-A7 */ \
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* A8-AF */ \
+ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* B0-B7 */ \
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* B8-BF */ \
+ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* C0-C7 */ \
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* C8-CF */ \
+ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* D0-D7 */ \
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* D8-DF */ \
+ { KE0, KE1, KE2, KE3, KE4, KE5, KE6, KE7, /* E0-E7 */ \
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* E8-EF */ \
+ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* F0-F7 */ \
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* F8-FF */ \
+}
/* ,---. ,---------------. ,---------------. ,---------------. ,-----------.
* |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau|
@@ -159,15 +184,40 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
K39,K04,K16,K07,K09,K0A,K0B,K0D,K0E,K0F,K33,K34,K32, K5C,K5D,K5E, \
KE1,K64,K1D,K1B,K06,K19,K05,K11,K10,K36,K37,K38, KE5, K52, K59,K5A,K5B,K58, \
KE0,KE3,KE2, K2C, KE6,KE7,K65,KE4, K50,K51,K4F, K62, K63 \
-) LAYOUT_all( \
- KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \
- K29, K3A, K3B, K3C, K3D, K3E, K3F, K40, K41, K42, K43, K44, K45, K46, K47, K48, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \
- K35, K1E, K1F, K20, K21, K22, K23, K24, K25, K26, K27, K2D, K2E, KC_NO, K2A, K49, K4A, K4B, K53, K54, K55, K56, KC_NO, KC_NO, \
- K2B, K14, K1A, K08, K15, K17, K1C, K18, K0C, K12, K13, K2F, K30, K32, K4C, K4D, K4E, K5F, K60, K61, K57, KC_NO, KC_NO, \
- K39, K04, K16, K07, K09, K0A, K0B, K0D, K0E, K0F, K33, K34, K32, K28, K5C, K5D, K5E, KC_NO, KC_NO, KC_NO, \
- KE1, K64, K1D, K1B, K06, K19, K05, K11, K10, K36, K37, K38, KC_NO, KE5, K52, K59, K5A, K5B, KC_NO, KC_NO, KC_NO, \
- KE0, KE3, KE2, KC_NO, KC_NO, K2C, KC_NO, KC_NO, KC_NO, KE6, KE7, K65, KE4, K50, K51, K4F, K62, K63, K58, KC_NO, KC_NO \
-)
+) { \
+ { KC_NO, KC_NO, KC_NO, KC_NO, K04, K05, K06, K07, /* 00-07 */ \
+ K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, /* 08-0F */ \
+ { K10, K11, K12, K13, K14, K15, K16, K17, /* 10-17 */ \
+ K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, /* 18-1F */ \
+ { K20, K21, K22, K23, K24, K25, K26, K27, /* 20-27 */ \
+ K28, K29, K2A, K2B, K2C, K2D, K2E, K2F }, /* 28-2F */ \
+ { K30, K31, K32, K33, K34, K35, K36, K37, /* 30-37 */ \
+ K38, K39, K3A, K3B, K3C, K3D, K3E, K3F }, /* 38-3F */ \
+ { K40, K41, K42, K43, K44, K45, K46, K47, /* 40-47 */ \
+ K48, K49, K4A, K4B, K4C, K4D, K4E, K4F }, /* 48-4F */ \
+ { K50, K51, K52, K53, K54, K55, K56, K57, /* 50-57 */ \
+ K58, K59, K5A, K5B, K5C, K5D, K5E, K5F }, /* 58-5F */ \
+ { K60, K61, K62, K63, K64, K65, KC_NO, KC_NO, /* 60-67 */ \
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, }, /* 68-6F */ \
+ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* 70-77 */ \
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, }, /* 78-7F */ \
+ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* 80-87 */ \
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* 88-8F */ \
+ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* 90-97 */ \
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* 98-9F */ \
+ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* A0-A7 */ \
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* A8-AF */ \
+ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* B0-B7 */ \
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* B8-BF */ \
+ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* C0-C7 */ \
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* C8-CF */ \
+ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* D0-D7 */ \
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* D8-DF */ \
+ { KE0, KE1, KE2, KE3, KE4, KE5, KE6, KE7, /* E0-E7 */ \
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* E8-EF */ \
+ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* F0-F7 */ \
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* F8-FF */ \
+}
/* ,---. ,---------------. ,---------------. ,---------------. ,-----------.
* |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau|
@@ -191,13 +241,38 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
K39,K04,K16,K07,K09,K0A,K0B,K0D,K0E,K0F,K33,K34,K32, K5C,K5D,K5E, \
KE1,K1D,K1B,K06,K19,K05,K11,K10,K36,K37,K38, K87,KE5, K52, K59,K5A,K5B,K58, \
KE0,KE3,KE2,K8B, K2C, K8A,K88,KE6,KE7,K65,KE4, K50,K51,K4F, K62, K63 \
-) LAYOUT_all( \
- KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \
- K29, K3A, K3B, K3C, K3D, K3E, K3F, K40, K41, K42, K43, K44, K45, K46, K47, K48, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \
- K35, K1E, K1F, K20, K21, K22, K23, K24, K25, K26, K27, K2D, K2E, K89, K2A, K49, K4A, K4B, K53, K54, K55, K56, KC_NO, KC_NO, \
- K2B, K14, K1A, K08, K15, K17, K1C, K18, K0C, K12, K13, K2F, K30, K32, K4C, K4D, K4E, K5F, K60, K61, K57, KC_NO, KC_NO, \
- K39, K04, K16, K07, K09, K0A, K0B, K0D, K0E, K0F, K33, K34, K32, K28, K5C, K5D, K5E, KC_NO, KC_NO, KC_NO, \
- KE1, KC_NO, K1D, K1B, K06, K19, K05, K11, K10, K36, K37, K38, K87, KE5, K52, K59, K5A, K5B, KC_NO, KC_NO, KC_NO, \
- KE0, KE3, KE2, K8B, KC_NO, K2C, KC_NO, K8A, K88, KE6, KE7, K65, KE4, K50, K51, K4F, K62, K63, K58, KC_NO, KC_NO \
-)
+) { \
+ { KC_NO, KC_NO, KC_NO, KC_NO, K04, K05, K06, K07, /* 00-07 */ \
+ K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, /* 08-0F */ \
+ { K10, K11, K12, K13, K14, K15, K16, K17, /* 10-17 */ \
+ K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, /* 18-1F */ \
+ { K20, K21, K22, K23, K24, K25, K26, K27, /* 20-27 */ \
+ K28, K29, K2A, K2B, K2C, K2D, K2E, K2F }, /* 28-2F */ \
+ { K30, K31, K32, K33, K34, K35, K36, K37, /* 30-37 */ \
+ K38, K39, K3A, K3B, K3C, K3D, K3E, K3F }, /* 38-3F */ \
+ { K40, K41, K42, K43, K44, K45, K46, K47, /* 40-47 */ \
+ K48, K49, K4A, K4B, K4C, K4D, K4E, K4F }, /* 48-4F */ \
+ { K50, K51, K52, K53, K54, K55, K56, K57, /* 50-57 */ \
+ K58, K59, K5A, K5B, K5C, K5D, K5E, K5F }, /* 58-5F */ \
+ { K60, K61, K62, K63, K64, K65, KC_NO, KC_NO, /* 60-67 */ \
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, }, /* 68-6F */ \
+ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* 70-77 */ \
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, }, /* 78-7F */ \
+ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K87, /* 80-87 */ \
+ K88, K89, K8A, K8B, KC_NO, KC_NO, KC_NO, KC_NO }, /* 88-8F */ \
+ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* 90-97 */ \
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* 98-9F */ \
+ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* A0-A7 */ \
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* A8-AF */ \
+ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* B0-B7 */ \
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* B8-BF */ \
+ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* C0-C7 */ \
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* C8-CF */ \
+ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* D0-D7 */ \
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* D8-DF */ \
+ { KE0, KE1, KE2, KE3, KE4, KE5, KE6, KE7, /* E0-E7 */ \
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* E8-EF */ \
+ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* F0-F7 */ \
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* F8-FF */ \
+}
#endif
diff --git a/keyboards/coseyfannitutti/mulletpad/config.h b/keyboards/coseyfannitutti/mulletpad/config.h
index 782bc16e76..92e2a747e3 100644
--- a/keyboards/coseyfannitutti/mulletpad/config.h
+++ b/keyboards/coseyfannitutti/mulletpad/config.h
@@ -41,7 +41,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#define MATRIX_ROW_PINS { F4, F1, F5, F6, F7 }
-#define MATRIX_COL_PINS { F0, C7, C6, B6, }
+#define MATRIX_COL_PINS { F0, C7, C6, B6 }
#define UNUSED_PINS
/* COL2ROW, ROW2COL */
diff --git a/keyboards/crkbd/keymaps/devdev/config.h b/keyboards/crkbd/keymaps/devdev/config.h
index 793c7b020b..c858f8f2d0 100644
--- a/keyboards/crkbd/keymaps/devdev/config.h
+++ b/keyboards/crkbd/keymaps/devdev/config.h
@@ -32,7 +32,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define CUSTOM_FONT
-#define CUSTOM_LAYER_READ //if you remove this it causes issues - needs better guarding
+#define CUSTOM_LAYER_READ //if you remove this it causes issues - needs better guarding
#define TAPPING_FORCE_HOLD
#define TAPPING_TERM 200
@@ -43,7 +43,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifdef RGBLIGHT_ENABLE
#undef RGBLED_NUM
-
+
//#define RGBLIGHT_ANIMATIONS
#define RGBLIGHT_EFFECT_BREATHING
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
@@ -55,11 +55,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#define RGBLIGHT_EFFECT_RGB_TEST
//#define RGBLIGHT_EFFECT_ALTERNATING
//#define RGBLIGHT_EFFECT_TWINKLE
-
+
//#define RGBLED_NUM 54
//#define RGBLED_SPLIT 27
- //#define RGBLED_SPLIT { 27, 27 } // haven't figured out how to use this yet
-
+ //#define RGBLED_SPLIT { 27, 27 } // haven't figured out how to use this yet
+
#define RGBLED_NUM 27
#define RGBLIGHT_LIMIT_VAL 120
#define RGBLIGHT_HUE_STEP 10
@@ -71,11 +71,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
# define RGB_MATRIX_KEYPRESSES // reacts to keypresses
// # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
// # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
# define RGB_MATRIX_FRAMEBUFFER_EFFECTS
// # define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness)
// # 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_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash.
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_GRADIENT_LEFT_RIGHT
diff --git a/keyboards/crkbd/keymaps/gotham/config.h b/keyboards/crkbd/keymaps/gotham/config.h
index dd58a0fe05..05b04e0aa3 100644
--- a/keyboards/crkbd/keymaps/gotham/config.h
+++ b/keyboards/crkbd/keymaps/gotham/config.h
@@ -39,7 +39,7 @@
#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_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
# 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 32
# define RGB_MATRIX_SAT_STEP 64
diff --git a/keyboards/crkbd/keymaps/kidbrazil/config.h b/keyboards/crkbd/keymaps/kidbrazil/config.h
index be1777e575..752ea862e0 100644
--- a/keyboards/crkbd/keymaps/kidbrazil/config.h
+++ b/keyboards/crkbd/keymaps/kidbrazil/config.h
@@ -56,7 +56,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//# define RGB_MATRIX_KEYPRESSES // reacts to keypresses
// # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
// # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
- #define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+ #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
// # define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness)
// # 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)
diff --git a/keyboards/crkbd/keymaps/rpbaptist/config.h b/keyboards/crkbd/keymaps/rpbaptist/config.h
index 6bd16725f5..9e5f75c362 100644
--- a/keyboards/crkbd/keymaps/rpbaptist/config.h
+++ b/keyboards/crkbd/keymaps/rpbaptist/config.h
@@ -42,7 +42,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define NO_ACTION_ONESHOT
#ifdef RGB_MATRIX_ENABLE
-# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150
# define RGB_MATRIX_HUE_STEP 8
diff --git a/keyboards/crkbd/keymaps/soundmonster/config.h b/keyboards/crkbd/keymaps/soundmonster/config.h
index 1e58af3abe..8235b48697 100644
--- a/keyboards/crkbd/keymaps/soundmonster/config.h
+++ b/keyboards/crkbd/keymaps/soundmonster/config.h
@@ -59,11 +59,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
# define RGB_MATRIX_KEYPRESSES // reacts to keypresses
// # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
// # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
# define RGB_MATRIX_FRAMEBUFFER_EFFECTS
# define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness)
# 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_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
diff --git a/keyboards/crkbd/readme.md b/keyboards/crkbd/readme.md
index 72d44fbbd5..f3bf152d20 100644
--- a/keyboards/crkbd/readme.md
+++ b/keyboards/crkbd/readme.md
@@ -44,7 +44,7 @@ And in your `config.h` file, add the following:
# define RGB_MATRIX_KEYPRESSES // reacts to keypresses
// # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
// # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
# define RGB_MATRIX_FRAMEBUFFER_EFFECTS
// # define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness)
// # 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)
diff --git a/keyboards/dc01/left/config.h b/keyboards/dc01/left/config.h
index 57614e84ab..8a166a2655 100644
--- a/keyboards/dc01/left/config.h
+++ b/keyboards/dc01/left/config.h
@@ -42,7 +42,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#define MATRIX_ROW_PINS { B6, B5, B4, D7, D6 }
-#define MATRIX_COL_PINS { F4, F1, F0, F7, F6, F5 }
+#define MATRIX_COL_PINS { F4, F1, F0, F7, F6, F5, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN }
#define UNUSED_PINS
#define F_SCL 350000UL
diff --git a/keyboards/draculad/config.h b/keyboards/draculad/config.h
index 8a27fdea4d..d8a9fbd37c 100644
--- a/keyboards/draculad/config.h
+++ b/keyboards/draculad/config.h
@@ -65,3 +65,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define UNUSED_PINS
#define EE_HANDS
+
+#define LAYER_STATE_8BIT \ No newline at end of file
diff --git a/keyboards/draculad/keymaps/pimoroni/keymap.c b/keyboards/draculad/keymaps/pimoroni/keymap.c
index 87cbe3cd3a..762ae26c70 100644
--- a/keyboards/draculad/keymaps/pimoroni/keymap.c
+++ b/keyboards/draculad/keymaps/pimoroni/keymap.c
@@ -16,7 +16,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H
-#include "pimoroni_trackball.h"
+#include "drivers/sensors/pimoroni_trackball.h"
#include "pointing_device.h"
diff --git a/keyboards/draculad/keymaps/pimoroni/rules.mk b/keyboards/draculad/keymaps/pimoroni/rules.mk
index 547a02f26f..d8dc92fbfc 100644
--- a/keyboards/draculad/keymaps/pimoroni/rules.mk
+++ b/keyboards/draculad/keymaps/pimoroni/rules.mk
@@ -1,6 +1,6 @@
# only uncomment on the side you have your trackball on
POINTING_DEVICE_ENABLE = yes
-SRC += pimoroni_trackball.c
+SRC += drivers/sensors/pimoroni_trackball.c
QUANTUM_LIB_SRC += i2c_master.c
OLED_DRIVER_ENABLE = yes
MOUSEKEY_ENABLE = no
diff --git a/keyboards/dz60/keymaps/default_abnt2/keymap.c b/keyboards/dz60/keymaps/default_abnt2/keymap.c
index d6273780f1..3ed1484bd7 100644
--- a/keyboards/dz60/keymaps/default_abnt2/keymap.c
+++ b/keyboards/dz60/keymaps/default_abnt2/keymap.c
@@ -45,7 +45,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_BL] = LAYOUT_60_abnt2(
KC_GESC, 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_BSPC,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, BR_ACUT, BR_LBRC,
- KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, BR_CCDL, BR_TILD, BR_RBRC, KC_ENT,
+ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, BR_CCED, BR_TILD, BR_RBRC, KC_ENT,
KC_LSFT, BR_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, BR_SCLN, BR_SLSH, KC_RSFT,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FL), KC_RCTL),
diff --git a/keyboards/dztech/dz60rgb/v1/config.h b/keyboards/dztech/dz60rgb/v1/config.h
index 6e5b3da6ff..f6ee7c4e2f 100644
--- a/keyboards/dztech/dz60rgb/v1/config.h
+++ b/keyboards/dztech/dz60rgb/v1/config.h
@@ -37,7 +37,7 @@
#ifdef RGB_MATRIX_ENABLE
# define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
# define RGB_MATRIX_KEYPRESSES
# define RGB_MATRIX_LED_PROCESS_LIMIT 4
# define RGB_MATRIX_LED_FLUSH_LIMIT 26
diff --git a/keyboards/dztech/dz60rgb/v2/config.h b/keyboards/dztech/dz60rgb/v2/config.h
index df84fff59a..6108e99034 100644
--- a/keyboards/dztech/dz60rgb/v2/config.h
+++ b/keyboards/dztech/dz60rgb/v2/config.h
@@ -37,7 +37,7 @@
#ifdef RGB_MATRIX_ENABLE
# define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
# define RGB_MATRIX_KEYPRESSES
# define RGB_MATRIX_FRAMEBUFFER_EFFECTS
# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
diff --git a/keyboards/dztech/dz60rgb_ansi/v1/config.h b/keyboards/dztech/dz60rgb_ansi/v1/config.h
index 8710f8d07b..dc2a6f4bc0 100644
--- a/keyboards/dztech/dz60rgb_ansi/v1/config.h
+++ b/keyboards/dztech/dz60rgb_ansi/v1/config.h
@@ -37,7 +37,7 @@
#ifdef RGB_MATRIX_ENABLE
# define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
# define RGB_MATRIX_KEYPRESSES
# define RGB_MATRIX_LED_PROCESS_LIMIT 4
# define RGB_MATRIX_LED_FLUSH_LIMIT 26
diff --git a/keyboards/dztech/dz60rgb_ansi/v2/config.h b/keyboards/dztech/dz60rgb_ansi/v2/config.h
index f3c9b73fb4..6c1e006821 100644
--- a/keyboards/dztech/dz60rgb_ansi/v2/config.h
+++ b/keyboards/dztech/dz60rgb_ansi/v2/config.h
@@ -37,7 +37,7 @@
#ifdef RGB_MATRIX_ENABLE
# define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
# define RGB_MATRIX_KEYPRESSES
# define RGB_MATRIX_FRAMEBUFFER_EFFECTS
# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
diff --git a/keyboards/dztech/dz60rgb_wkl/v1/config.h b/keyboards/dztech/dz60rgb_wkl/v1/config.h
index 9c630c75be..12317c2d35 100644
--- a/keyboards/dztech/dz60rgb_wkl/v1/config.h
+++ b/keyboards/dztech/dz60rgb_wkl/v1/config.h
@@ -37,7 +37,7 @@
#ifdef RGB_MATRIX_ENABLE
# define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
# define RGB_MATRIX_KEYPRESSES
# define RGB_MATRIX_LED_PROCESS_LIMIT 4
# define RGB_MATRIX_LED_FLUSH_LIMIT 26
diff --git a/keyboards/dztech/dz60rgb_wkl/v2/config.h b/keyboards/dztech/dz60rgb_wkl/v2/config.h
index a6145c2749..945b591ce6 100644
--- a/keyboards/dztech/dz60rgb_wkl/v2/config.h
+++ b/keyboards/dztech/dz60rgb_wkl/v2/config.h
@@ -37,7 +37,7 @@
#ifdef RGB_MATRIX_ENABLE
# define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
# define RGB_MATRIX_KEYPRESSES
# define RGB_MATRIX_FRAMEBUFFER_EFFECTS
# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
diff --git a/keyboards/dztech/dz65rgb/v1/config.h b/keyboards/dztech/dz65rgb/v1/config.h
index adfa934b04..1ecd9002cb 100644
--- a/keyboards/dztech/dz65rgb/v1/config.h
+++ b/keyboards/dztech/dz65rgb/v1/config.h
@@ -51,9 +51,9 @@
# define RGB_MATRIX_LED_FLUSH_LIMIT 26
# define DEBOUNCE 3
# define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
# define RGB_MATRIX_KEYPRESSES
-# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
+# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
# define DISABLE_RGB_MATRIX_BAND_SAT
# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
# define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT
diff --git a/keyboards/dztech/dz65rgb/v2/config.h b/keyboards/dztech/dz65rgb/v2/config.h
index f86d65cd06..1e1e21f5e9 100644
--- a/keyboards/dztech/dz65rgb/v2/config.h
+++ b/keyboards/dztech/dz65rgb/v2/config.h
@@ -51,7 +51,7 @@
# define RGB_MATRIX_LED_FLUSH_LIMIT 26
# define DEBOUNCE 3
# define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
# define RGB_MATRIX_KEYPRESSES
# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
# define DISABLE_RGB_MATRIX_BAND_SAT
diff --git a/keyboards/eco/rules.mk b/keyboards/eco/rules.mk
index 078131da7c..c0541a7bb3 100644
--- a/keyboards/eco/rules.mk
+++ b/keyboards/eco/rules.mk
@@ -27,7 +27,6 @@ AUDIO_ENABLE = no # Audio output
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
-API_SYSEX_ENABLE = no
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
diff --git a/keyboards/ergo42/keymaps/hdbx/keymap.c b/keyboards/ergo42/keymaps/hdbx/keymap.c
index da579de01a..1dff065b03 100644
--- a/keyboards/ergo42/keymaps/hdbx/keymap.c
+++ b/keyboards/ergo42/keymaps/hdbx/keymap.c
@@ -90,7 +90,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/
[_RAISE] = LAYOUT( \
_______, KC_EXLM, JP_AT, KC_HASH, KC_DLR, KC_PERC, JP_UNDS, JP_GRV, JP_CIRC, JP_AMPR, KC_INS, JP_YEN, KC_ALPS, _______, \
- _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, JP_LCBR, JP_RCBR, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_SCLN, JP_DQT, \
+ _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, JP_LCBR, JP_RCBR, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_SCLN, JP_DQUO, \
KC_LSFT, KC_MPLY, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MNXT, KC_PGUP, XXXXXXX, XXXXXXX, KC_LT, KC_GT, KC_QUES, KC_RSFT, \
_______, _______, JP_PIPE, _______, _______, _______, _______, KC_PGDN, _______, _______, _______, _______, _______, _______ \
),
diff --git a/keyboards/ergo42/keymaps/shinze/keymap.c b/keyboards/ergo42/keymaps/shinze/keymap.c
index e07ff9f9eb..f5cc3c520e 100644
--- a/keyboards/ergo42/keymaps/shinze/keymap.c
+++ b/keyboards/ergo42/keymaps/shinze/keymap.c
@@ -15,15 +15,15 @@ extern keymap_config_t keymap_config;
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[BASE] = LAYOUT( \
- KC_TAB, BP_B, BP_ECUT, BP_P, BP_O, BP_EGRV, KC_ESC, KC_BSPC, BP_DCRC, BP_V, BP_D, BP_L, BP_J, BP_Z, \
+ KC_TAB, BP_B, BP_EACU, BP_P, BP_O, BP_EGRV, KC_ESC, KC_BSPC, BP_DCIR, BP_V, BP_D, BP_L, BP_J, BP_Z, \
BP_W, BP_A, BP_U, BP_I, BP_E, BP_COMM, _______, _______, BP_C, BP_T, BP_S, BP_R, BP_N, BP_M, \
- KC_LSFT, BP_AGRV, BP_Y, BP_X, BP_DOT, BP_K, _______, _______, BP_APOS, BP_Q, BP_G, BP_H, BP_F, BP_CCED, \
+ KC_LSFT, BP_AGRV, BP_Y, BP_X, BP_DOT, BP_K, _______, _______, BP_QUOT, BP_Q, BP_G, BP_H, BP_F, BP_CCED, \
MO(SHORT), KC_LCTL, _______, KC_LALT, KC_LGUI, KC_SPC, MO(NUMB), KC_ENT , KC_RSFT, KC_SPC, _______, _______, _______, _______ \
),
[NUMB] = LAYOUT( \
- BP_HASH, BP_DQOT, BP_LDQU, BP_RDQU, BP_LPRN, BP_RPRN, BP_AT, BP_PLUS, BP_MINS, BP_SLSH, BP_ASTR, BP_EQL, BP_PERC, KC_BSPC, \
- BP_DLR, BP_1, BP_2, BP_3, BP_4, BP_5, KC_LBRC, KC_RBRC, BP_6, BP_7, BP_8, BP_9, BP_0, BP_DEGR, \
+ BP_HASH, BP_DQUO, BP_LDQU, BP_RDQU, BP_LPRN, BP_RPRN, BP_AT, BP_PLUS, BP_MINS, BP_SLSH, BP_ASTR, BP_EQL, BP_PERC, KC_BSPC, \
+ BP_DLR, BP_1, BP_2, BP_3, BP_4, BP_5, KC_LBRC, KC_RBRC, BP_6, BP_7, BP_8, BP_9, BP_0, BP_DEG, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
),
diff --git a/keyboards/ergo42/rules.mk b/keyboards/ergo42/rules.mk
index b593de2be3..29e7cf2b76 100644
--- a/keyboards/ergo42/rules.mk
+++ b/keyboards/ergo42/rules.mk
@@ -31,6 +31,4 @@ AUDIO_ENABLE = no # Audio output on port C6
SPLIT_KEYBOARD = yes
-LAYOUTS = ortho_4x14
-
DEFAULT_FOLDER = ergo42/rev1
diff --git a/keyboards/ergoarrows/keymaps/salicylic/keymap.c b/keyboards/ergoarrows/keymaps/salicylic/keymap.c
index a8211e65aa..c841371dba 100644
--- a/keyboards/ergoarrows/keymaps/salicylic/keymap.c
+++ b/keyboards/ergoarrows/keymaps/salicylic/keymap.c
@@ -52,7 +52,7 @@ LALT_T(KC_ZKHK),KC_LGUI, KC_UP, KC_MHEN,LT(_LOWER,KC_ENT),KC_BSPC,KC_DEL,KC_BSP
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
JP_DQUO, JP_EXLM, JP_QUES, JP_LBRC, JP_RBRC, JP_TILD, _______, _______, KC_P6, KC_P7, KC_P8, KC_P9, JP_ASTR, JP_SLSH,
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
- JP_QUOT, JP_HASH, JP_DQT, JP_LPRN, JP_RPRN, JP_AT, _______, _______, XXXXXXX, KC_P4, KC_P5, KC_P6, JP_MINS, JP_EQL,
+ JP_QUOT, JP_HASH, JP_DQUO, JP_LPRN, JP_RPRN, JP_AT, _______, _______, XXXXXXX, KC_P4, KC_P5, KC_P6, JP_MINS, JP_EQL,
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
JP_CIRC, JP_PERC, JP_AMPR, JP_SCLN, JP_COLN, JP_PIPE, _______, _______, KC_P0, KC_P1, KC_P2, KC_P3, JP_PLUS, _______,
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
diff --git a/keyboards/ergodash/rev1/keymaps/m47ch4n/keymap.c b/keyboards/ergodash/rev1/keymaps/m47ch4n/keymap.c
index 4d1d0131f5..4b102157d5 100644
--- a/keyboards/ergodash/rev1/keymaps/m47ch4n/keymap.c
+++ b/keyboards/ergodash/rev1/keymaps/m47ch4n/keymap.c
@@ -26,7 +26,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QWERTY] = LAYOUT( \
KC_ESC, CSTM_1, CSTM_2, CSTM_3, CSTM_4, CSTM_5, JP_KANA, JP_KANA, CSTM_6, CSTM_7, CSTM_8, CSTM_9, CSTM_0, GRV , \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, JP_MHEN, JP_HENK, KC_Y, KC_U, KC_I, KC_O, KC_P, BSLS , \
- KC_LGUI, KC_A, KC_S, KC_D, KC_F, KC_G, JP_MEISU, JP_MKANA,KC_H, KC_J, KC_K, KC_L, SCLN, QUOT , \
+ KC_LGUI, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LANG2, JP_LANG1,KC_H, KC_J, KC_K, KC_L, SCLN, QUOT , \
SHIFT, KC_Z, KC_X, KC_C, KC_V, KC_B, SHIFT , SHIFT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SHIFT , \
SHIFT, ADJUST, KC_LALT, KC_LCTL, LOWER, KC_SPC ,XXXXXXX, XXXXXXX,KC_ENT , RAISE, KC_LCTL, KC_LALT, ADJUST, SHIFT \
),
diff --git a/keyboards/ergodox_ez/config.h b/keyboards/ergodox_ez/config.h
index bc63f6108f..9dcfc341e1 100644
--- a/keyboards/ergodox_ez/config.h
+++ b/keyboards/ergodox_ez/config.h
@@ -129,7 +129,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGB_MATRIX_LED_PROCESS_LIMIT 5
#define RGB_MATRIX_LED_FLUSH_LIMIT 26
-#define RGB_DISABLE_WHEN_USB_SUSPENDED true
+#define RGB_DISABLE_WHEN_USB_SUSPENDED
// #define RGBLIGHT_COLOR_LAYER_0 0x00, 0x00, 0xFF
/* #define RGBLIGHT_COLOR_LAYER_1 0x00, 0x00, 0xFF */
diff --git a/keyboards/ergodox_ez/keymaps/bepo_tm_style/keymap.c b/keyboards/ergodox_ez/keymaps/bepo_tm_style/keymap.c
index b9c65944f6..64d91d12fb 100755
--- a/keyboards/ergodox_ez/keymaps/bepo_tm_style/keymap.c
+++ b/keyboards/ergodox_ez/keymaps/bepo_tm_style/keymap.c
@@ -54,19 +54,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// Layer 0: basic keys.
[BASE] = LAYOUT_ergodox(
/* left hand */
- BP_DLR, BP_DQOT, BP_LGIL, BP_RGIL, BP_LPRN, BP_RPRN, KC_DEL,
- KC_TAB, BP_B, BP_ECUT, BP_P, BP_O, BP_EGRV, KC_BSPC,
+ BP_DLR, BP_DQUO, BP_LDAQ, BP_RDAQ, BP_LPRN, BP_RPRN, KC_DEL,
+ KC_TAB, BP_B, BP_EACU, BP_P, BP_O, BP_EGRV, KC_BSPC,
KC_LSFT, BP_A, BP_U, BP_I, BP_E, BP_COMM,
KC_LCTRL, BP_AGRV, BP_Y, BP_X, BP_DOT, BP_K, KC_ENT,
- ESC_FN, BP_ECRC, KC_LGUI, KC_LALT, SPC_RALT,
+ ESC_FN, BP_ECIR, KC_LGUI, KC_LALT, SPC_RALT,
TT(SWAP), KC_MNXT,
KC_MPLY,
TT(FN), TT(NUMS), KC_MPRV,
/* right hand */
KC_DEL, BP_AT, BP_PLUS, BP_MINS, BP_SLSH, BP_ASTR, BP_EQL,
- KC_BSPC, BP_DCRC, BP_V, BP_D, BP_L, BP_J, BP_Z,
+ KC_BSPC, BP_DCIR, BP_V, BP_D, BP_L, BP_J, BP_Z,
BP_C, BP_T, BP_S, BP_R, BP_N, M_RSFT,
- KC_ENT, BP_APOS, BP_Q, BP_G, BP_H, BP_F, W_RCTL,
+ KC_ENT, BP_QUOT, BP_Q, BP_G, BP_H, BP_F, W_RCTL,
SPC_RALT, KC_LALT, TT(SYSLEDS), BP_CCED, PERC_FN,
KC_LEFT, KC_RIGHT,
KC_UP,
diff --git a/keyboards/ergodox_ez/keymaps/bepo_tm_style/rules.mk b/keyboards/ergodox_ez/keymaps/bepo_tm_style/rules.mk
index 6d20fcf762..3a1ee27ff8 100755
--- a/keyboards/ergodox_ez/keymaps/bepo_tm_style/rules.mk
+++ b/keyboards/ergodox_ez/keymaps/bepo_tm_style/rules.mk
@@ -10,6 +10,5 @@ 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/keyboards/ergodox_ez/keymaps/bpruitt-goddard/rules.mk b/keyboards/ergodox_ez/keymaps/bpruitt-goddard/rules.mk
index 6ed55e72b4..9c2dc61710 100644
--- a/keyboards/ergodox_ez/keymaps/bpruitt-goddard/rules.mk
+++ b/keyboards/ergodox_ez/keymaps/bpruitt-goddard/rules.mk
@@ -10,6 +10,5 @@ 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/keyboards/ergodox_ez/keymaps/colemak_es_osx/keymap.c b/keyboards/ergodox_ez/keymaps/colemak_es_osx/keymap.c
index 0abd028a01..15692b18d1 100644
--- a/keyboards/ergodox_ez/keymaps/colemak_es_osx/keymap.c
+++ b/keyboards/ergodox_ez/keymaps/colemak_es_osx/keymap.c
@@ -76,7 +76,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/
[BASE] = LAYOUT_ergodox(
// left hand
- KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, ES_LESS,
+ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, ES_LABK,
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_HOME,
KC_CAPS, KC_A, KC_R, KC_S, KC_T, KC_D,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_GRV,
@@ -88,7 +88,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// right hand
ES_IEXL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
- KC_END, KC_J, KC_L, KC_U, KC_Y, ES_NTIL, ES_APOS,
+ KC_END, KC_J, KC_L, KC_U, KC_Y, ES_NTIL, ES_QUOT,
KC_H, KC_N, KC_E, KC_I, KC_O, KC_ENT,
ES_MINS, KC_K, KC_M, KC_COMM, KC_DOT, KC_UP, KC_RSFT,
GUI_T(ES_ACUT), ALT_T(KC_BSLS), KC_LEFT, KC_DOWN, KC_RIGHT,
diff --git a/keyboards/ergodox_ez/keymaps/ericgebhart/keymap.c b/keyboards/ergodox_ez/keymaps/ericgebhart/keymap.c
index dc33e4e0a9..55bf4209fd 100644
--- a/keyboards/ergodox_ez/keymaps/ericgebhart/keymap.c
+++ b/keyboards/ergodox_ez/keymaps/ericgebhart/keymap.c
@@ -175,7 +175,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// Right hand
MDIA_SYMB_KP_LAYERS, ___SYMBOL_BEPO_R___, BP_EQL,
- BP_DCRC, ___BEPO_FR_R1___, BP_W,
+ BP_DCIR, ___BEPO_FR_R1___, BP_W,
/* */ ___BEPO_FR_R2___, BP_CCED,
BP_C, ___BEPO_FR_R3___, KC_RSFT,
diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/config.h b/keyboards/ergodox_ez/keymaps/hacker_dvorak/config.h
index a0ba655ede..da20820787 100644
--- a/keyboards/ergodox_ez/keymaps/hacker_dvorak/config.h
+++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/config.h
@@ -14,7 +14,7 @@
#undef IGNORE_MOD_TAP_INTERRUPT
#define IGNORE_MOD_TAP_INTERRUPT
-#define RGB_DISABLE_WHEN_USB_SUSPENDED true
+#define RGB_DISABLE_WHEN_USB_SUSPENDED
#undef FORCE_NKRO
#define FORCE_NKRO
diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/rules.mk b/keyboards/ergodox_ez/keymaps/hacker_dvorak/rules.mk
index 184a90228e..c4091010ff 100644
--- a/keyboards/ergodox_ez/keymaps/hacker_dvorak/rules.mk
+++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/rules.mk
@@ -22,7 +22,6 @@ SWAP_HANDS_ENABLE = no # Allow swapping hands of keyboard.
# KEY_LOCK_ENABLE = no # (+1730b)
# CONSOLE_ENABLE = no # Console for debug(+400b)
# BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000b)
-# API_SYSEX_ENABLE = no
# MIDI_ENABLE = no
# BLUETOOTH_ENABLE = no
# AUDIO_ENABLE = no
diff --git a/keyboards/ergodox_ez/keymaps/nathanvercaemert/keymap.c b/keyboards/ergodox_ez/keymaps/nathanvercaemert/keymap.c
index e06d0b769f..52c79a1e34 100644
--- a/keyboards/ergodox_ez/keymaps/nathanvercaemert/keymap.c
+++ b/keyboards/ergodox_ez/keymaps/nathanvercaemert/keymap.c
@@ -20,8 +20,8 @@
#define KC_PC_CUT LCTL(KC_X)
#define KC_PC_COPY LCTL(KC_C)
#define KC_PC_PASTE LCTL(KC_V)
-#define ES_LESS_MAC KC_GRAVE
-#define ES_GRTR_MAC LSFT(KC_GRAVE)
+#define ES_LABK_MAC KC_GRAVE
+#define ES_RABK_MAC LSFT(KC_GRAVE)
#define ES_BSLS_MAC ALGR(KC_6)
#define NO_PIPE_ALT KC_GRAVE
#define NO_BSLS_ALT KC_EQUAL
diff --git a/keyboards/ergodox_ez/keymaps/skug/keymap.c b/keyboards/ergodox_ez/keymaps/skug/keymap.c
index bebb8c6a6f..1446ea7466 100644
--- a/keyboards/ergodox_ez/keymaps/skug/keymap.c
+++ b/keyboards/ergodox_ez/keymaps/skug/keymap.c
@@ -27,9 +27,6 @@
#define MDIA 2 // media keys
#define ARRW 3 // arrow + soon mouse
-#define SE_LT SE_LESS
-#define SE_GT LSFT(SE_LESS)
-
enum custom_keycodes {
PLACEHOLDER = SAFE_RANGE, // can always be here
EPRM,
@@ -73,15 +70,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB),
MO(ARRW), KC_A, KC_S, KC_D, KC_F, KC_G,
KC_LSPO, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_WBAK,
- CTL_T(SE_APOS), SE_ACUT, KC_LALT, KC_BSPC, KC_SPC,
- SE_LESS, KC_END,
+ CTL_T(SE_QUOT), SE_ACUT, KC_LALT, KC_BSPC, KC_SPC,
+ SE_LABK, KC_END,
KC_LEFT, KC_RIGHT, KC_PGDN,
CTL_T(KC_ENT), ALT_T(KC_ESC), KC_LGUI,
// right hand
TO(ARRW), KC_6, KC_7, KC_8, KC_9, KC_0, SE_PLUS,
- TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, SE_AA,
- KC_H, KC_J, KC_K, KC_L, LT(MDIA, SE_OSLH), LT(SYMB, SE_AE),
+ TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, SE_ARNG,
+ KC_H, KC_J, KC_K, KC_L, LT(MDIA, SE_ODIA), LT(SYMB, SE_ADIA),
KC_WFWD, KC_N, KC_M, KC_COMM, KC_DOT, SE_MINS, KC_RSPC,
KC_SPC, KC_BSPC, KC_ALGR, SE_ASTR, CTL_T(SE_TILD),
KC_HOME, SE_CIRC,
@@ -116,7 +113,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______,KC_EXLM,SE_AT, SE_LCBR,SE_RCBR,SE_PIPE,_______,
_______,KC_HASH,SE_DLR, SE_LPRN,SE_RPRN,SE_GRV,
_______,KC_PERC,SE_CIRC,SE_LBRC,SE_RBRC,SE_TILD,_______,
- EPRM, _______, _______, SE_LT , SE_GT,
+ EPRM, _______, _______, SE_LABK , SE_RABK,
_______,_______,
_______,_______,_______,
_______,_______,_______,
diff --git a/keyboards/ergodox_ez/keymaps/stamm/keymap.c b/keyboards/ergodox_ez/keymaps/stamm/keymap.c
index 890fbdc023..19eecae03d 100644
--- a/keyboards/ergodox_ez/keymaps/stamm/keymap.c
+++ b/keyboards/ergodox_ez/keymaps/stamm/keymap.c
@@ -24,8 +24,8 @@
#define KC_PC_CUT LCTL(KC_X)
#define KC_PC_COPY LCTL(KC_C)
#define KC_PC_PASTE LCTL(KC_V)
-#define ES_LESS_MAC KC_GRAVE
-#define ES_GRTR_MAC LSFT(KC_GRAVE)
+#define ES_LABK_MAC KC_GRAVE
+#define ES_RABK_MAC LSFT(KC_GRAVE)
#define ES_BSLS_MAC ALGR(KC_6)
#define NO_PIPE_ALT KC_GRAVE
#define NO_BSLS_ALT KC_EQUAL
diff --git a/keyboards/ergodox_ez/rules.mk b/keyboards/ergodox_ez/rules.mk
index 1000ef7863..7b189be456 100644
--- a/keyboards/ergodox_ez/rules.mk
+++ b/keyboards/ergodox_ez/rules.mk
@@ -29,7 +29,6 @@ NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: ht
UNICODE_ENABLE = yes # Unicode
SWAP_HANDS_ENABLE= yes # Allow swapping hands of keyboard
SLEEP_LED_ENABLE = no
-API_SYSEX_ENABLE = no
RGB_MATRIX_ENABLE = no # enable later
RGB_MATRIX_DRIVER = IS31FL3731
diff --git a/keyboards/ergodox_infinity/config.h b/keyboards/ergodox_infinity/config.h
index a64f3f4a13..275d4e1dcf 100644
--- a/keyboards/ergodox_infinity/config.h
+++ b/keyboards/ergodox_infinity/config.h
@@ -62,6 +62,41 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define LED_BRIGHTNESS_LO 100
#define LED_BRIGHTNESS_HI 255
+/* LED matrix driver */
+#define LED_DRIVER_ADDR_1 0x74
+#define LED_DRIVER_COUNT 1
+#define DRIVER_LED_TOTAL 76
+#define LED_MATRIX_SPLIT { 38, 38 }
+#define LED_DISABLE_WHEN_USB_SUSPENDED
+
+/* i2c (for LED matrix) */
+#define I2C1_CLOCK_SPEED 400000
+#define I2C1_SCL_PAL_MODE PAL_MODE_ALTERNATIVE_2
+#define I2C1_SDA_PAL_MODE PAL_MODE_ALTERNATIVE_2
+#define I2C1_BANK GPIOB
+#define I2C1_SCL 0
+#define I2C1_SDA 1
+
+#ifdef ST7565_ENABLE
+/* LCD driver */
+# define ST7565_A0_PIN C7
+# define ST7565_RST_PIN C8
+# define ST7565_SS_PIN C4
+# define ST7565_SPI_CLK_DIVISOR 2
+# define ST7565_CONTRAST 22
+# define ST7565_DISPLAY_WIDTH 128
+# define ST7565_DISPLAY_HEIGHT 32
+
+/* SPI (for LCD) */
+# define SPI_DRIVER SPID1
+# define SPI_SCK_PIN C5
+# define SPI_SCK_PAL_MODE PAL_MODE_ALTERNATIVE_2
+# define SPI_MOSI_PIN C6
+# define SPI_MOSI_PAL_MODE PAL_MODE_ALTERNATIVE_2
+# define SPI_MISO_PIN A4 // Just an unused pin, the "normal" MISO pin (C7) is used for other things
+# define SPI_MISO_PAL_MODE PAL_MODE_ALTERNATIVE_7 // Default for A4
+#endif
+
/* define if matrix has ghost */
//#define MATRIX_HAS_GHOST
diff --git a/keyboards/ergodox_infinity/ergodox_infinity.c b/keyboards/ergodox_infinity/ergodox_infinity.c
index 97b628470b..b802bf014e 100644
--- a/keyboards/ergodox_infinity/ergodox_infinity.c
+++ b/keyboards/ergodox_infinity/ergodox_infinity.c
@@ -1,20 +1,45 @@
#include QMK_KEYBOARD_H
#include <ch.h>
#include <hal.h>
+#include <string.h>
+#include "eeconfig.h"
#include "serial_link/system/serial_link.h"
#ifdef VISUALIZER_ENABLE
-#include "lcd_backlight.h"
+# include "lcd_backlight.h"
#endif
-#ifdef WPM_ENABLE
-# include "serial_link/protocol/transport.h"
-# include "wpm.h"
+#if (defined(LED_MATRIX_ENABLE) || defined(WPM_ENABLE))
+# include "serial_link/protocol/transport.h"
+
+# ifdef LED_MATRIX_ENABLE
+MASTER_TO_ALL_SLAVES_OBJECT(led_matrix, led_eeconfig_t);
+MASTER_TO_ALL_SLAVES_OBJECT(led_suspend_state, bool);
+static led_eeconfig_t last_sent_led_matrix;
+static uint16_t led_matrix_sent_timer = 0;
+
+void send_led_suspend_state(void) {
+ if (is_serial_link_master()) {
+ *begin_write_led_suspend_state() = led_matrix_get_suspend_state();
+ end_write_led_suspend_state();
+ }
+}
+# endif
+# ifdef WPM_ENABLE
+# include "wpm.h"
MASTER_TO_ALL_SLAVES_OBJECT(current_wpm, uint8_t);
-static remote_object_t* remote_objects[] = {
+static uint8_t last_sent_wpm = 0;
+# endif
+
+static remote_object_t *remote_objects[] = {
+# ifdef LED_MATRIX_ENABLE
+ REMOTE_OBJECT(led_matrix),
+ REMOTE_OBJECT(led_suspend_state),
+# endif
+# ifdef WPM_ENABLE
REMOTE_OBJECT(current_wpm),
+# endif
};
-static uint8_t last_sent_wpm = 0;
#endif
void init_serial_link_hal(void) {
@@ -52,7 +77,7 @@ void init_serial_link_hal(void) {
void lcd_backlight_hal_init(void) {
// Setup Backlight
SIM->SCGC6 |= SIM_SCGC6_FTM0;
- FTM0->CNT = 0; // Reset counter
+ FTM0->CNT = 0; // Reset counter
// PWM Period
// 16-bit maximum
@@ -60,25 +85,25 @@ void lcd_backlight_hal_init(void) {
// Set FTM to PWM output - Edge Aligned, Low-true pulses
#define CNSC_MODE FTM_SC_CPWMS | FTM_SC_PS(4) | FTM_SC_CLKS(0)
- CHANNEL_RED.CnSC = CNSC_MODE;
+ CHANNEL_RED.CnSC = CNSC_MODE;
CHANNEL_GREEN.CnSC = CNSC_MODE;
- CHANNEL_BLUE.CnSC = CNSC_MODE;
+ CHANNEL_BLUE.CnSC = CNSC_MODE;
// System clock, /w prescalar setting
FTM0->SC = FTM_SC_CLKS(1) | FTM_SC_PS(PRESCALAR_DEFINE);
- CHANNEL_RED.CnV = 0;
+ CHANNEL_RED.CnV = 0;
CHANNEL_GREEN.CnV = 0;
- CHANNEL_BLUE.CnV = 0;
+ CHANNEL_BLUE.CnV = 0;
RGB_PORT_GPIO->PDDR |= (1 << RED_PIN);
RGB_PORT_GPIO->PDDR |= (1 << GREEN_PIN);
RGB_PORT_GPIO->PDDR |= (1 << BLUE_PIN);
#define RGB_MODE PORTx_PCRn_SRE | PORTx_PCRn_DSE | PORTx_PCRn_MUX(4)
- RGB_PORT->PCR[RED_PIN] = RGB_MODE;
+ RGB_PORT->PCR[RED_PIN] = RGB_MODE;
RGB_PORT->PCR[GREEN_PIN] = RGB_MODE;
- RGB_PORT->PCR[BLUE_PIN] = RGB_MODE;
+ RGB_PORT->PCR[BLUE_PIN] = RGB_MODE;
}
static uint16_t cie_lightness(uint16_t v) {
@@ -89,12 +114,11 @@ static uint16_t cie_lightness(uint16_t v) {
// Y = (L* / 902.3) if L* <= 8
// Y = ((L* + 16) / 116)^3 if L* > 8
- float l = 100.0f * (v / 65535.0f);
+ float l = 100.0f * (v / 65535.0f);
float y = 0.0f;
if (l <= 8.0f) {
- y = l / 902.3;
- }
- else {
+ y = l / 902.3;
+ } else {
y = ((l + 16.0f) / 116.0f);
y = y * y * y;
if (y > 1.0f) {
@@ -104,32 +128,56 @@ static uint16_t cie_lightness(uint16_t v) {
return y * 65535.0f;
}
+#ifdef VISUALIZER_ENABLE
void lcd_backlight_hal_color(uint16_t r, uint16_t g, uint16_t b) {
- CHANNEL_RED.CnV = cie_lightness(r);
+#else
+void ergodox_infinity_lcd_color(uint16_t r, uint16_t g, uint16_t b) {
+#endif
+ CHANNEL_RED.CnV = cie_lightness(r);
CHANNEL_GREEN.CnV = cie_lightness(g);
- CHANNEL_BLUE.CnV = cie_lightness(b);
+ CHANNEL_BLUE.CnV = cie_lightness(b);
}
-__attribute__ ((weak))
-void matrix_init_user(void) {
-}
+__attribute__ ((weak)) void matrix_init_user(void) {}
+
+__attribute__ ((weak)) void matrix_scan_user(void) {}
-__attribute__ ((weak))
-void matrix_scan_user(void) {
-}
+void keyboard_pre_init_kb() {
+#ifdef LED_MATRIX_ENABLE
+ // Turn on LED controller
+ setPinOutput(B16);
+ writePinHigh(B16);
+#endif
+#ifndef VISUALIZER_ENABLE
+ // The backlight always has to be initialized, otherwise it will stay lit
+ lcd_backlight_hal_init();
+# ifdef ST7565_ENABLE
+ ergodox_infinity_lcd_color(UINT16_MAX / 2, UINT16_MAX / 2, UINT16_MAX / 2);
+# endif
+#endif
+ keyboard_pre_init_user();
+}
void matrix_init_kb(void) {
// put your keyboard start-up code here
// runs once when the firmware starts up
- matrix_init_user();
- // The backlight always has to be initialized, otherwise it will stay lit
-#ifndef VISUALIZER_ENABLE
- lcd_backlight_hal_init();
+#ifdef LED_MATRIX_ENABLE
+ /*
+ * Since K20x is stuck with a 32 byte EEPROM (see tmk_core/common/chibios/eeprom_teensy.c),
+ * and neither led_matrix_eeconfig.speed or .flags fit in this boundary, just force their values to default on boot.
+ */
+# if !defined(LED_MATRIX_STARTUP_SPD)
+# define LED_MATRIX_STARTUP_SPD UINT8_MAX / 2
+# endif
+ led_matrix_set_speed(LED_MATRIX_STARTUP_SPD);
+ led_matrix_set_flags(LED_FLAG_ALL);
#endif
-#ifdef WPM_ENABLE
- add_remote_objects(remote_objects, sizeof(remote_objects) / sizeof(remote_object_t*));
+
+ matrix_init_user();
+#if (defined(LED_MATRIX_ENABLE) || defined(WPM_ENABLE))
+ add_remote_objects(remote_objects, sizeof(remote_objects) / sizeof(remote_object_t *));
#endif
}
@@ -137,6 +185,30 @@ void matrix_scan_kb(void) {
// put your looping keyboard code here
// runs every cycle (a lot)
+#ifdef LED_MATRIX_ENABLE
+ if (is_serial_link_master()) {
+ if (!led_matrix_get_suspend_state()) {
+ if (timer_elapsed(led_matrix_sent_timer) >= 5000 || memcmp((void *)&last_sent_led_matrix, (void *)&led_matrix_eeconfig, sizeof(last_sent_led_matrix))) {
+ led_matrix_sent_timer = timer_read();
+ memcpy((void *)&last_sent_led_matrix, (void *)&led_matrix_eeconfig, sizeof(last_sent_led_matrix));
+ *begin_write_led_matrix() = last_sent_led_matrix;
+ end_write_led_matrix();
+ }
+ }
+ } else if (is_serial_link_connected()) {
+ bool *new_led_suspend_state = read_led_suspend_state();
+ if (new_led_suspend_state) {
+ led_matrix_set_suspend_state(*new_led_suspend_state);
+ }
+ if (!led_matrix_get_suspend_state()) {
+ led_eeconfig_t *new_led_matrix = read_led_matrix();
+ if (new_led_matrix) {
+ memcpy((void *)&led_matrix_eeconfig, (void *)new_led_matrix, sizeof(last_sent_led_matrix));
+ }
+ }
+ }
+#endif
+
#ifdef WPM_ENABLE
if (is_serial_link_master()) {
uint8_t current_wpm = get_current_wpm();
@@ -146,67 +218,68 @@ void matrix_scan_kb(void) {
last_sent_wpm = current_wpm;
}
} else if (is_serial_link_connected()) {
- uint8_t* new_wpm = read_current_wpm();
+ uint8_t *new_wpm = read_current_wpm();
if (new_wpm) {
set_current_wpm(*new_wpm);
}
}
#endif
+
matrix_scan_user();
}
-bool is_keyboard_master(void) {
- return is_serial_link_master();
-}
+bool is_keyboard_master(void) { return is_serial_link_master(); }
-__attribute__ ((weak))
-void ergodox_board_led_on(void){
+bool is_keyboard_left(void) {
+#if defined(EE_HANDS)
+ return eeconfig_read_handedness();
+#elif defined(MASTER_IS_ON_RIGHT)
+ return !is_keyboard_master();
+#else
+ return is_keyboard_master();
+#endif
}
-__attribute__ ((weak))
-void ergodox_right_led_1_on(void){
-}
+__attribute__ ((weak)) void ergodox_board_led_on(void) {}
-__attribute__ ((weak))
-void ergodox_right_led_2_on(void){
-}
+__attribute__ ((weak)) void ergodox_right_led_1_on(void) {}
-__attribute__ ((weak))
-void ergodox_right_led_3_on(void){
-}
+__attribute__ ((weak)) void ergodox_right_led_2_on(void) {}
-__attribute__ ((weak))
-void ergodox_board_led_off(void){
-}
+__attribute__ ((weak)) void ergodox_right_led_3_on(void) {}
-__attribute__ ((weak))
-void ergodox_right_led_1_off(void){
-}
+__attribute__ ((weak)) void ergodox_board_led_off(void) {}
-__attribute__ ((weak))
-void ergodox_right_led_2_off(void){
-}
+__attribute__ ((weak)) void ergodox_right_led_1_off(void) {}
-__attribute__ ((weak))
-void ergodox_right_led_3_off(void){
-}
+__attribute__ ((weak)) void ergodox_right_led_2_off(void) {}
-__attribute__ ((weak))
-void ergodox_right_led_1_set(uint8_t n) {
-}
+__attribute__ ((weak)) void ergodox_right_led_3_off(void) {}
-__attribute__ ((weak))
-void ergodox_right_led_2_set(uint8_t n) {
+__attribute__ ((weak)) void ergodox_right_led_1_set(uint8_t n) {}
+
+__attribute__ ((weak)) void ergodox_right_led_2_set(uint8_t n) {}
+
+__attribute__ ((weak)) void ergodox_right_led_3_set(uint8_t n) {}
+
+void suspend_power_down_kb(void) {
+#ifdef LED_MATRIX_ENABLE
+ send_led_suspend_state();
+#endif
+ suspend_power_down_user();
}
-__attribute__ ((weak))
-void ergodox_right_led_3_set(uint8_t n) {
+void suspend_wakeup_init_kb(void) {
+#ifdef LED_MATRIX_ENABLE
+ send_led_suspend_state();
+#endif
+ suspend_wakeup_init_user();
}
#ifdef SWAP_HANDS_ENABLE
__attribute__ ((weak))
const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
- {{0, 9}, {1, 9}, {2, 9}, {3, 9}, {4, 9}},
+ {{0, 9}, {1, 9}, {2, 9}, {3, 9}, {4, 9}},
{{0, 10}, {1, 10}, {2, 10}, {3, 10}, {4, 10}},
{{0, 11}, {1, 11}, {2, 11}, {3, 11}, {4, 11}},
{{0, 12}, {1, 12}, {2, 12}, {3, 12}, {4, 12}},
@@ -226,3 +299,176 @@ const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
{{0, 8}, {1, 8}, {2, 8}, {3, 8}, {4, 8}},
};
#endif
+
+#ifdef LED_MATRIX_ENABLE
+const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
+// The numbers in the comments are the led numbers DXX on the PCB
+/* Refer to IS31 manual for these locations
+ * driver
+ * | LED address
+ * | | */
+// Left half
+// 45 44 43 42 41 40 39
+ { 0, C2_2 }, { 0, C1_2 }, { 0, C5_1 }, { 0, C4_1 }, { 0, C3_1 }, { 0, C2_1 }, { 0, C1_1 },
+// 52 51 50 49 48 47 46
+ { 0, C4_3 }, { 0, C3_3 }, { 0, C2_3 }, { 0, C1_3 }, { 0, C5_2 }, { 0, C4_2 }, { 0, C3_2 },
+// 58 57 56 55 54 53
+ { 0, C5_4 }, { 0, C4_4 }, { 0, C3_4 }, { 0, C2_4 }, { 0, C1_4 }, { 0, C5_3 },
+// 67 66 65 64 63 62 61
+ { 0, C4_6 }, { 0, C3_6 }, { 0, C2_6 }, { 0, C1_6 }, { 0, C5_5 }, { 0, C4_5 }, { 0, C3_5 },
+// 76 75 74 73 72
+ { 0, C4_8 }, { 0, C3_8 }, { 0, C2_8 }, { 0, C1_8 }, { 0, C4_7 },
+// 60 59
+ { 0, C2_5 }, { 0, C1_5 },
+// 68
+ { 0, C5_6 },
+// 71 70 69
+ { 0, C3_7 }, { 0, C2_7 }, { 0, C1_7 },
+// Right half (mirrored)
+// Due to how LED_MATRIX_SPLIT is implemented, only the first half of g_is31_leds is actually used.
+// Luckily, the right half has the same LED pinouts, just mirrored.
+// 45 44 43 42 41 40 39
+ { 0, C2_2 }, { 0, C1_2 }, { 0, C5_1 }, { 0, C4_1 }, { 0, C3_1 }, { 0, C2_1 }, { 0, C1_1 },
+// 52 51 50 49 48 47 46
+ { 0, C4_3 }, { 0, C3_3 }, { 0, C2_3 }, { 0, C1_3 }, { 0, C5_2 }, { 0, C4_2 }, { 0, C3_2 },
+// 58 57 56 55 54 53
+ { 0, C5_4 }, { 0, C4_4 }, { 0, C3_4 }, { 0, C2_4 }, { 0, C1_4 }, { 0, C5_3 },
+// 67 66 65 64 63 62 61
+ { 0, C4_6 }, { 0, C3_6 }, { 0, C2_6 }, { 0, C1_6 }, { 0, C5_5 }, { 0, C4_5 }, { 0, C3_5 },
+// 76 75 74 73 72
+ { 0, C4_8 }, { 0, C3_8 }, { 0, C2_8 }, { 0, C1_8 }, { 0, C4_7 },
+// 60 59
+ { 0, C2_5 }, { 0, C1_5 },
+// 68
+ { 0, C5_6 },
+// 71 70 69
+ { 0, C3_7 }, { 0, C2_7 }, { 0, C1_7 },
+};
+
+led_config_t g_led_config = {
+ {
+ // Key Matrix to LED Index
+ // Left half
+ { NO_LED, NO_LED, NO_LED, 33, 34 },
+ { NO_LED, NO_LED, NO_LED, 32, 37 },
+ { 6, 13, NO_LED, 26, 36 },
+ { 5, 12, 19, 25, 35 },
+ { 4, 11, 18, 24, 31 },
+ { 3, 10, 17, 23, 30 },
+ { 2, 9, 16, 22, 29 },
+ { 1, 8, 15, 21, 28 },
+ { 0, 7, 14, 20, 27 },
+ // Right half
+ { NO_LED, NO_LED, NO_LED, 71, 72 },
+ { NO_LED, NO_LED, NO_LED, 70, 75 },
+ { 44, 51, NO_LED, 64, 74 },
+ { 43, 50, 57, 63, 73 },
+ { 42, 49, 56, 62, 69 },
+ { 41, 48, 55, 61, 68 },
+ { 40, 47, 54, 60, 67 },
+ { 39, 46, 53, 59, 66 },
+ { 38, 45, 52, 58, 65 },
+ }, {
+ // LED Index to Physical Position (assumes a reasonable gap between halves)
+ // Left half
+ { 0, 3 }, { 15, 3 }, { 27, 1 }, { 39, 0 }, { 51, 1 }, { 63, 2 }, { 75, 2 },
+ { 0, 13 }, { 15, 13 }, { 27, 11 }, { 39, 10 }, { 51, 11 }, { 63, 12 }, { 78, 17 },
+ { 0, 23 }, { 15, 23 }, { 27, 21 }, { 39, 20 }, { 51, 21 }, { 63, 22 },
+ { 0, 33 }, { 15, 33 }, { 27, 31 }, { 39, 30 }, { 51, 31 }, { 63, 32 }, { 78, 32 },
+ { 4, 43 }, { 15, 43 }, { 27, 41 }, { 39, 40 }, { 51, 41 },
+ { 89, 41 }, { 100, 46 },
+ { 95, 55 },
+ { 72, 54 }, { 83, 59 }, { 90, 64 },
+ // Right half (mirrored)
+ { 224, 3 }, { 209, 3 }, { 197, 1 }, { 185, 0 }, { 173, 1 }, { 161, 2 }, { 149, 2 },
+ { 224, 13 }, { 209, 13 }, { 197, 11 }, { 185, 10 }, { 173, 11 }, { 161, 12 }, { 146, 17 },
+ { 224, 23 }, { 209, 23 }, { 197, 21 }, { 185, 20 }, { 173, 21 }, { 161, 22 },
+ { 224, 33 }, { 209, 33 }, { 197, 31 }, { 185, 30 }, { 173, 31 }, { 161, 32 }, { 146, 32 },
+ { 220, 43 }, { 209, 43 }, { 197, 41 }, { 185, 40 }, { 173, 41 },
+ { 135, 41 }, { 124, 46 },
+ { 129, 55 },
+ { 152, 54 }, { 141, 59 }, { 134, 64 },
+ }, {
+ // LED Index to Flag
+ // Left half
+ 1, 4, 4, 4, 4, 4, 1,
+ 1, 4, 4, 4, 4, 4, 1,
+ 1, 4, 4, 4, 4, 4,
+ 1, 4, 4, 4, 4, 4, 1,
+ 1, 1, 1, 1, 1,
+ 1, 1,
+ 1,
+ 1, 1, 1,
+ // Right half (mirrored)
+ 1, 4, 4, 4, 4, 4, 1,
+ 1, 4, 4, 4, 4, 4, 1,
+ 1, 4, 4, 4, 4, 4,
+ 1, 4, 4, 4, 4, 4, 1,
+ 1, 1, 1, 1, 1,
+ 1, 1,
+ 1,
+ 1, 1, 1,
+ }
+};
+#endif
+
+#ifdef ST7565_ENABLE
+__attribute__((weak)) void st7565_on_user(void) {
+ ergodox_infinity_lcd_color(UINT16_MAX / 2, UINT16_MAX / 2, UINT16_MAX / 2);
+}
+
+__attribute__((weak)) void st7565_off_user(void) {
+ ergodox_infinity_lcd_color(0, 0, 0);
+}
+
+static void format_layer_bitmap_string(char* buffer, uint8_t offset) {
+ for (int i = 0; i < 16 && i + offset < MAX_LAYER; i++) {
+ if (i == 0 || i == 4 || i == 8 || i == 12) {
+ *buffer = ' ';
+ ++buffer;
+ }
+
+ uint8_t layer = i + offset;
+ if (layer_state_cmp(default_layer_state, layer)) {
+ *buffer = 'D';
+ } else if (layer_state_is(layer)) {
+ *buffer = '1';
+ } else {
+ *buffer = '_';
+ }
+ ++buffer;
+ }
+ *buffer = 0;
+}
+
+__attribute__((weak)) void st7565_task_user(void) {
+ if (is_keyboard_master()) {
+ // Draw led and layer status
+ led_t leds = host_keyboard_led_state();
+ if(leds.num_lock) { st7565_write("Num ", false); }
+ if(leds.caps_lock) { st7565_write("Cap ", false); }
+ if(leds.scroll_lock) { st7565_write("Scrl ", false); }
+ if(leds.compose) { st7565_write("Com ", false); }
+ if(leds.kana) { st7565_write("Kana", false); }
+ st7565_advance_page(true);
+
+ char layer_buffer[16 + 5]; // 3 spaces and one null terminator
+ st7565_set_cursor(0, 1);
+ format_layer_bitmap_string(layer_buffer, 0);
+ st7565_write_ln(layer_buffer, false);
+ format_layer_bitmap_string(layer_buffer, 16);
+ st7565_write_ln(layer_buffer, false);
+ st7565_write_ln(" 1=On D=Default", false);
+ } else {
+ // Draw logo
+ static const char 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, 0x00
+ };
+
+ st7565_write(qmk_logo, false);
+ st7565_write(" Infinity Ergodox ", false);
+ }
+}
+#endif
diff --git a/keyboards/ergodox_infinity/ergodox_infinity.h b/keyboards/ergodox_infinity/ergodox_infinity.h
index 79f01b1849..81ac1f338a 100644
--- a/keyboards/ergodox_infinity/ergodox_infinity.h
+++ b/keyboards/ergodox_infinity/ergodox_infinity.h
@@ -80,6 +80,10 @@ inline void ergodox_led_all_set(uint8_t n) {
ergodox_right_led_3_set(n);
}
+#ifndef VISUALIZER_ENABLE
+void ergodox_infinity_lcd_color(uint16_t r, uint16_t g, uint16_t b);
+#endif
+
/*
* LEFT HAND: LINES 88-95
* RIGHT HAND: LINES 97-104
diff --git a/keyboards/ergodox_infinity/keymaps/default/keymap.c b/keyboards/ergodox_infinity/keymaps/default/keymap.c
index cd9b476bbd..ce8a3661e7 100644
--- a/keyboards/ergodox_infinity/keymaps/default/keymap.c
+++ b/keyboards/ergodox_infinity/keymaps/default/keymap.c
@@ -167,7 +167,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
// Runs just one time when the keyboard initializes.
void matrix_init_user(void) {
-};
+}
// Runs constantly in the background, in a loop.
@@ -192,4 +192,4 @@ void matrix_scan_user(void) {
break;
}
-};
+}
diff --git a/keyboards/ergodox_infinity/matrix.c b/keyboards/ergodox_infinity/matrix.c
index 7baacd24d0..0fca56a979 100644
--- a/keyboards/ergodox_infinity/matrix.c
+++ b/keyboards/ergodox_infinity/matrix.c
@@ -24,7 +24,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "print.h"
#include "debug.h"
#include "matrix.h"
-#include "eeconfig.h"
+#include "keyboard.h"
#include "serial_link/system/serial_link.h"
@@ -119,15 +119,9 @@ uint8_t matrix_scan(void)
}
uint8_t offset = 0;
-#if (defined(EE_HANDS) || defined(MASTER_IS_ON_RIGHT))
-#ifdef EE_HANDS
- if (is_serial_link_master() && !eeconfig_read_handedness()) {
-#else
- if (is_serial_link_master()) {
-#endif
+ if (is_serial_link_master() && !is_keyboard_left()) {
offset = MATRIX_ROWS - LOCAL_MATRIX_ROWS;
}
-#endif
if (debouncing && timer_elapsed(debouncing_time) > DEBOUNCE) {
for (int row = 0; row < LOCAL_MATRIX_ROWS; row++) {
@@ -167,17 +161,11 @@ void matrix_print(void)
void matrix_set_remote(matrix_row_t* rows, uint8_t index) {
uint8_t offset = 0;
-#ifdef EE_HANDS
- if (eeconfig_read_handedness()) {
+ if (is_keyboard_left()) {
offset = LOCAL_MATRIX_ROWS * (index + 1);
} else {
offset = MATRIX_ROWS - LOCAL_MATRIX_ROWS * (index + 2);
}
-#elif defined(MASTER_IS_ON_RIGHT)
- offset = MATRIX_ROWS - LOCAL_MATRIX_ROWS * (index + 2);
-#else
- offset = LOCAL_MATRIX_ROWS * (index + 1);
-#endif
for (int row = 0; row < LOCAL_MATRIX_ROWS; row++) {
matrix[offset + row] = rows[row];
}
diff --git a/keyboards/ergodox_infinity/rules.mk b/keyboards/ergodox_infinity/rules.mk
index b9ead9e87c..c7ff07d4ea 100644
--- a/keyboards/ergodox_infinity/rules.mk
+++ b/keyboards/ergodox_infinity/rules.mk
@@ -20,22 +20,22 @@ SWAP_HANDS_ENABLE= yes # Allow swapping hands of keyboard
CUSTOM_MATRIX = yes # Custom matrix file
SERIAL_LINK_ENABLE = yes
-VISUALIZER_ENABLE = yes
-LCD_ENABLE = yes
-BACKLIGHT_ENABLE = yes
-BACKLIGHT_DRIVER = custom
-LCD_BACKLIGHT_ENABLE = yes
+
MIDI_ENABLE = no
RGBLIGHT_ENABLE = no
+ST7565_ENABLE = yes
+
+LED_MATRIX_ENABLE = yes
+LED_MATRIX_DRIVER = IS31FL3731
+
+# Config for Visualizer (set VISUALIZER_ENABLE = yes and ST7565_ENABLE = no to use)
+LCD_ENABLE = yes
+LCD_BACKLIGHT_ENABLE = yes
LCD_DRIVER = st7565
LCD_WIDTH = 128
LCD_HEIGHT = 32
-LED_DRIVER = is31fl3731c
-LED_WIDTH = 7
-LED_HEIGHT = 7
-
# project specific files
SRC = matrix.c \
led.c
diff --git a/keyboards/evil80/rules.mk b/keyboards/evil80/rules.mk
index 46b76962b6..ebf0156df1 100644
--- a/keyboards/evil80/rules.mk
+++ b/keyboards/evil80/rules.mk
@@ -27,7 +27,6 @@ AUDIO_ENABLE = no # Audio output on port C6
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
-API_SYSEX_ENABLE = no
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
diff --git a/keyboards/evyd13/plain60/keymaps/kwerdenker/keymap.c b/keyboards/evyd13/plain60/keymaps/kwerdenker/keymap.c
index 25370823df..2d736212f4 100644
--- a/keyboards/evyd13/plain60/keymaps/kwerdenker/keymap.c
+++ b/keyboards/evyd13/plain60/keymaps/kwerdenker/keymap.c
@@ -36,9 +36,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_DL] = LAYOUT(
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, DE_SS, DE_ACUT, ______, KC_BSPC, \
- KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, DE_Z, KC_U, KC_I, KC_O, KC_P, DE_UE, DE_PLUS, ______, \
- SPECIAL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, DE_OE, DE_AE, DE_HASH, KC_ENT, \
- KC_LSFT, DE_LESS, DE_Y, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, DE_MINS, KC_RSFT, MONKEY, \
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, DE_Z, KC_U, KC_I, KC_O, KC_P, DE_UDIA, DE_PLUS, ______, \
+ SPECIAL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, DE_ODIA,DE_ADIA, DE_HASH, KC_ENT, \
+ KC_LSFT, DE_LABK, DE_Y, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, DE_MINS, KC_RSFT, MONKEY, \
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , ______, KC_ALGR, TG(_LED), KC_RCTL ),
[_FUN] = LAYOUT(
diff --git a/keyboards/geekboards/macropad_v2/config.h b/keyboards/geekboards/macropad_v2/config.h
index 5f11cdddb0..d0e208f9b9 100644
--- a/keyboards/geekboards/macropad_v2/config.h
+++ b/keyboards/geekboards/macropad_v2/config.h
@@ -41,7 +41,7 @@
#define WS2812_DMA_CHANNEL 3
#ifdef RGB_MATRIX_ENABLE
-#define RGB_MATRIX_KEYPRESSES
+#define RGB_MATRIX_KEYPRESSES
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
#define DISABLE_RGB_MATRIX_ALPHAS_MODS
#define DISABLE_RGB_MATRIX_BAND_SAT
@@ -67,7 +67,7 @@
#define RGB_MATRIX_STARTUP_SPD 30
#endif //RGB_MATRIX_ENABLE
-#define RGB_DISABLE_WHEN_USB_SUSPENDED true
+#define RGB_DISABLE_WHEN_USB_SUSPENDED
#define WAIT_FOR_USB
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
diff --git a/keyboards/geekboards/tester/config.h b/keyboards/geekboards/tester/config.h
index 4f072c0ee6..3e3daccd57 100644
--- a/keyboards/geekboards/tester/config.h
+++ b/keyboards/geekboards/tester/config.h
@@ -24,7 +24,7 @@
#define DEBOUNCE 3
#ifdef RGB_MATRIX_ENABLE
#define RGB_DISABLE_AFTER_TIMEOUT 0
-#define RGB_DISABLE_WHEN_USB_SUSPENDED true
+#define RGB_DISABLE_WHEN_USB_SUSPENDED
#define RGB_MATRIX_KEYPRESSES
#define DISABLE_RGB_MATRIX_SPLASH
#define DISABLE_RGB_MATRIX_MULTISPLASH
@@ -36,4 +36,4 @@
#define DRIVER_1_LED_TOTAL 8
#define DRIVER_2_LED_TOTAL 0
#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
-#endif \ No newline at end of file
+#endif
diff --git a/keyboards/ggkeyboards/genesis/hotswap/config.h b/keyboards/ggkeyboards/genesis/hotswap/config.h
index d435612f17..27f1aced34 100644
--- a/keyboards/ggkeyboards/genesis/hotswap/config.h
+++ b/keyboards/ggkeyboards/genesis/hotswap/config.h
@@ -26,7 +26,7 @@
#define PRODUCT Genesis
/* key matrix size */
-#define MATRIX_ROWS 7
+#define MATRIX_ROWS 6
#define MATRIX_COLS 18
/*
@@ -46,4 +46,4 @@
// generated by KBFirmware JSON to QMK Parser
-// https://noroadsleft.github.io/kbf_qmk_converter/ \ No newline at end of file
+// https://noroadsleft.github.io/kbf_qmk_converter/
diff --git a/keyboards/ggkeyboards/genesis/solder/config.h b/keyboards/ggkeyboards/genesis/solder/config.h
index 76586262ab..74a098f41a 100644
--- a/keyboards/ggkeyboards/genesis/solder/config.h
+++ b/keyboards/ggkeyboards/genesis/solder/config.h
@@ -26,7 +26,7 @@
#define PRODUCT Genesis
/* key matrix size */
-#define MATRIX_ROWS 7
+#define MATRIX_ROWS 6
#define MATRIX_COLS 18
/*
@@ -46,4 +46,4 @@
// generated by KBFirmware JSON to QMK Parser
-// https://noroadsleft.github.io/kbf_qmk_converter/ \ No newline at end of file
+// https://noroadsleft.github.io/kbf_qmk_converter/
diff --git a/keyboards/gh60/revc/keymaps/dbroqua/keymap.c b/keyboards/gh60/revc/keymaps/dbroqua/keymap.c
index 9666199f3c..964f40f1c0 100644
--- a/keyboards/gh60/revc/keymaps/dbroqua/keymap.c
+++ b/keyboards/gh60/revc/keymaps/dbroqua/keymap.c
@@ -94,79 +94,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_SFX] = LAYOUT_60_ansi_split_bs_rshift(
______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \
______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \
- ______, F(0), F(1), ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \
- ______, F(2), F(3), F(4), F(5), F(6), F(7), ______, ______, ______, ______, ______, ______, \
+ ______, RGB_TOG,RGB_MOD,______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \
+ ______, RGB_HUI,RGB_HUD,RGB_SAI,RGB_SAD,RGB_VAI,RGB_VAD,______, ______, ______, ______, ______, ______, \
______, ______, ______, ______, ______, ______, ______, ______ \
)
};
-enum function_id {
- RGBLED_TOGGLE,
- RGBLED_STEP_MODE,
- RGBLED_INCREASE_HUE,
- RGBLED_DECREASE_HUE,
- RGBLED_INCREASE_SAT,
- RGBLED_DECREASE_SAT,
- RGBLED_INCREASE_VAL,
- RGBLED_DECREASE_VAL
-};
-
-const uint16_t PROGMEM fn_actions[] = {
- [0] = ACTION_FUNCTION(RGBLED_TOGGLE),
- [1] = ACTION_FUNCTION(RGBLED_STEP_MODE),
- [2] = ACTION_FUNCTION(RGBLED_INCREASE_HUE),
- [3] = ACTION_FUNCTION(RGBLED_DECREASE_HUE),
- [4] = ACTION_FUNCTION(RGBLED_INCREASE_SAT),
- [5] = ACTION_FUNCTION(RGBLED_DECREASE_SAT),
- [6] = ACTION_FUNCTION(RGBLED_INCREASE_VAL),
- [7] = ACTION_FUNCTION(RGBLED_DECREASE_VAL)
-};
-
-void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
- switch (id) {
- case RGBLED_TOGGLE:
- if (record->event.pressed) {
- rgblight_toggle();
- }
- break;
- case RGBLED_INCREASE_HUE:
- if (record->event.pressed) {
- rgblight_increase_hue();
- }
- break;
- case RGBLED_DECREASE_HUE:
- if (record->event.pressed) {
- rgblight_decrease_hue();
- }
- break;
- case RGBLED_INCREASE_SAT:
- if (record->event.pressed) {
- rgblight_increase_sat();
- }
- break;
- case RGBLED_DECREASE_SAT:
- if (record->event.pressed) {
- rgblight_decrease_sat();
- }
- break;
- case RGBLED_INCREASE_VAL:
- if (record->event.pressed) {
- rgblight_increase_val();
- }
- break;
- case RGBLED_DECREASE_VAL:
- if (record->event.pressed) {
- rgblight_decrease_val();
- }
- break;
- case RGBLED_STEP_MODE:
- if (record->event.pressed) {
- rgblight_step();
- }
- break;
- }
-}
-
void matrix_scan_user(void) {
uint32_t layer = layer_state;
diff --git a/keyboards/gh60/revc/keymaps/dbroqua_7U/keymap.c b/keyboards/gh60/revc/keymaps/dbroqua_7U/keymap.c
index 5b58d7686a..a79b89e9c2 100644
--- a/keyboards/gh60/revc/keymaps/dbroqua_7U/keymap.c
+++ b/keyboards/gh60/revc/keymaps/dbroqua_7U/keymap.c
@@ -3,6 +3,10 @@
#define _DEFAULT 0
#define _FN 1
+enum custom_keycodes {
+ LED_TOGGLE = SAFE_RANGE
+};
+
int esc_led = 0;
// Fillers to make layering more clear
@@ -44,7 +48,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------'
*/
[_FN] = LAYOUT_60_ansi_split_bs_rshift( /* Layer 1 */
- F(0), 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_INS, KC_DEL, \
+ LED_TOGGLE,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_INS, KC_DEL, \
KC_CAPS, ______, ______, ______, ______, ______, ______, ______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, ______, ______, \
______, KC_VOLD, KC_VOLU, KC_MUTE, ______, ______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT,______, \
______, KC_MPRV, KC_MPLY, KC_MNXT, ______, ______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, ______, ______, \
@@ -52,14 +56,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
-enum function_id {
- LED_TOGGLE
-};
-
-const uint16_t PROGMEM fn_actions[] = {
- [0] = ACTION_FUNCTION(LED_TOGGLE)
-};
-
void esc_led_toggle(void) {
if (esc_led == 0){
esc_led = 1;
@@ -70,12 +66,13 @@ void esc_led_toggle(void) {
}
}
-void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
- switch (id) {
- case LED_TOGGLE:
- if (record->event.pressed) {
- esc_led_toggle();
- }
- break;
- }
-} \ No newline at end of file
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case LED_TOGGLE:
+ if (record->event.pressed) {
+ esc_led_toggle();
+ }
+ return false;
+ }
+ return true;
+}
diff --git a/keyboards/gh60/revc/keymaps/default_abnt2/keymap.c b/keyboards/gh60/revc/keymaps/default_abnt2/keymap.c
index 633b053e69..493bee1cd4 100644
--- a/keyboards/gh60/revc/keymaps/default_abnt2/keymap.c
+++ b/keyboards/gh60/revc/keymaps/default_abnt2/keymap.c
@@ -41,7 +41,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_BL] = LAYOUT_60_abnt2(
KC_GESC, 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_BSPC,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, BR_ACUT, BR_LBRC,
- KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, BR_CCDL, BR_TILD, BR_RBRC, KC_ENT,
+ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, BR_CCED, BR_TILD, BR_RBRC, KC_ENT,
KC_LSFT, BR_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, BR_SCLN, BR_SLSH, KC_RSFT,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FL), KC_RCTL),
diff --git a/keyboards/gh60/revc/keymaps/robotmaxtron/keymap.c b/keyboards/gh60/revc/keymaps/robotmaxtron/keymap.c
index 770fe723b5..b84e7564fc 100644
--- a/keyboards/gh60/revc/keymaps/robotmaxtron/keymap.c
+++ b/keyboards/gh60/revc/keymaps/robotmaxtron/keymap.c
@@ -21,7 +21,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------'
*/
[_BL] = LAYOUT(
- F(12),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_BSPC, \
+ KC_GESC,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_BSPC, \
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_BSLS, \
LT(2, KC_CAPS),KC_A,KC_S,KC_D,KC_F,KC_G,KC_H,KC_J,KC_K,KC_L,KC_SCLN,KC_QUOT,KC_NO,KC_ENT, \
KC_LSFT,KC_NO,KC_Z,KC_X,KC_C,KC_V,KC_B,KC_N,KC_M,KC_COMM,KC_DOT,KC_SLSH,KC_NO,KC_RSFT, \
@@ -88,35 +88,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_UL] = LAYOUT(
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, \
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, \
- KC_TRNS,F(4),F(5),KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, \
- KC_TRNS,KC_TRNS,KC_TRNS,F(6),F(7),F(8),F(9),F(10),F(11),KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, \
+ KC_TRNS,RGB_TOG,RGB_MOD,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, \
+ KC_TRNS,KC_TRNS,KC_TRNS,RGB_HUI,RGB_HUD,RGB_SAI,RGB_SAD,RGB_VAI,RGB_VAD,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, \
KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS),
};
-enum function_id {
- RGBLED_TOGGLE,
- RGBLED_STEP_MODE,
- RGBLED_INCREASE_HUE,
- RGBLED_DECREASE_HUE,
- RGBLED_INCREASE_SAT,
- RGBLED_DECREASE_SAT,
- RGBLED_INCREASE_VAL,
- RGBLED_DECREASE_VAL,
- SHIFT_ESC,
-};
-
-const uint16_t PROGMEM fn_actions[] = {
- [4] = ACTION_FUNCTION(RGBLED_TOGGLE), //Turn on/off underglow
- [5] = ACTION_FUNCTION(RGBLED_STEP_MODE), // Change underglow mode
- [6] = ACTION_FUNCTION(RGBLED_INCREASE_HUE),
- [7] = ACTION_FUNCTION(RGBLED_DECREASE_HUE),
- [8] = ACTION_FUNCTION(RGBLED_INCREASE_SAT),
- [9] = ACTION_FUNCTION(RGBLED_DECREASE_SAT),
- [10] = ACTION_FUNCTION(RGBLED_INCREASE_VAL),
- [11] = ACTION_FUNCTION(RGBLED_DECREASE_VAL),
- [12] = ACTION_FUNCTION(SHIFT_ESC),
-};
-
void matrix_scan_user(void) {
// Layer LED indicators
@@ -134,73 +110,3 @@ void matrix_scan_user(void) {
gh60_esc_led_off();
}
};
-
-#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))
-
-void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
- switch (id) {
- case RGBLED_TOGGLE:
- //led operations
- if (record->event.pressed) {
- rgblight_toggle();
- }
- break;
- case RGBLED_INCREASE_HUE:
- if (record->event.pressed) {
- rgblight_increase_hue();
- }
- break;
- case RGBLED_DECREASE_HUE:
- if (record->event.pressed) {
- rgblight_decrease_hue();
- }
- break;
- case RGBLED_INCREASE_SAT:
- if (record->event.pressed) {
- rgblight_increase_sat();
- }
- break;
- case RGBLED_DECREASE_SAT:
- if (record->event.pressed) {
- rgblight_decrease_sat();
- }
- break;
- case RGBLED_INCREASE_VAL:
- if (record->event.pressed) {
- rgblight_increase_val();
- }
- break;
- case RGBLED_DECREASE_VAL:
- if (record->event.pressed) {
- rgblight_decrease_val();
- }
- break;
- case RGBLED_STEP_MODE:
- if (record->event.pressed) {
- rgblight_step();
- }
- break;
- static uint8_t shift_esc_shift_mask;
- // Shift + ESC = ~
- case SHIFT_ESC:
- shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK;
- if (record->event.pressed) {
- if (shift_esc_shift_mask) {
- add_key(KC_GRV);
- send_keyboard_report();
- } else {
- add_key(KC_ESC);
- send_keyboard_report();
- }
- } else {
- if (shift_esc_shift_mask) {
- del_key(KC_GRV);
- send_keyboard_report();
- } else {
- del_key(KC_ESC);
- send_keyboard_report();
- }
- }
- break;
- }
-};
diff --git a/keyboards/gh60/revc/keymaps/sethbc/keymap.c b/keyboards/gh60/revc/keymaps/sethbc/keymap.c
index 09a8d49eeb..1557d109b4 100644
--- a/keyboards/gh60/revc/keymaps/sethbc/keymap.c
+++ b/keyboards/gh60/revc/keymaps/sethbc/keymap.c
@@ -1,12 +1,9 @@
#include QMK_KEYBOARD_H
-#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))
-
-
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* 0: qwerty */
LAYOUT_60_ansi_split_bs_rshift(
- F(0),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_GESC,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,\
KC_LCTL,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(1),\
@@ -19,37 +16,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_PPLS,KC_PMNS,KC_END,KC_PGDN,KC_DOWN,KC_TRNS,KC_TRNS,\
KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS),
};
-
-enum function_id {
- SHIFT_ESC,
-};
-
-const uint16_t PROGMEM fn_actions[] = {
- [0] = ACTION_FUNCTION(SHIFT_ESC),
-};
-
-void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
- static uint8_t shift_esc_shift_mask;
- switch (id) {
- case SHIFT_ESC:
- shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK;
- if (record->event.pressed) {
- if (shift_esc_shift_mask) {
- add_key(KC_GRV);
- send_keyboard_report();
- } else {
- add_key(KC_ESC);
- send_keyboard_report();
- }
- } else {
- if (shift_esc_shift_mask) {
- del_key(KC_GRV);
- send_keyboard_report();
- } else {
- del_key(KC_ESC);
- send_keyboard_report();
- }
- }
- break;
- }
-}
diff --git a/keyboards/gh60/satan/keymaps/addcninblue/rules.mk b/keyboards/gh60/satan/keymaps/addcninblue/rules.mk
index fd7f34300b..2193708706 100644
--- a/keyboards/gh60/satan/keymaps/addcninblue/rules.mk
+++ b/keyboards/gh60/satan/keymaps/addcninblue/rules.mk
@@ -18,4 +18,3 @@ UCIS_ENABLE = no # Keep in mind that not all will work (See WinCompose
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
-API_SYSEX_ENABLE = no # This enables using the Quantum SYSEX API to send strings
diff --git a/keyboards/gh60/satan/keymaps/admiralStrokers/rules.mk b/keyboards/gh60/satan/keymaps/admiralStrokers/rules.mk
index 7c3f5bd90b..b409d10bd6 100644
--- a/keyboards/gh60/satan/keymaps/admiralStrokers/rules.mk
+++ b/keyboards/gh60/satan/keymaps/admiralStrokers/rules.mk
@@ -18,5 +18,3 @@ UCIS_ENABLE = no # Keep in mind that not all will work (See WinCompose for detai
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
SLEEP_LED_ENABLE = no# Breathing sleep LED during USB suspend
-API_SYSEX_ENABLE = no # This enables using the Quantum SYSEX API to send strings
-
diff --git a/keyboards/gh60/satan/keymaps/chaser/keymap.c b/keyboards/gh60/satan/keymaps/chaser/keymap.c
index edba9a3091..4427f793e8 100644
--- a/keyboards/gh60/satan/keymaps/chaser/keymap.c
+++ b/keyboards/gh60/satan/keymaps/chaser/keymap.c
@@ -1,10 +1,5 @@
#include QMK_KEYBOARD_H
-
-
-// Used for SHIFT_ESC
-#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))
-
// 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
@@ -27,7 +22,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------'
*/
[_BL] = LAYOUT_all(
- F(0) ,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_BSPC , _______, \
+ KC_GESC ,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_BSPC , _______, \
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_BSLS , \
KC_CAPS ,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_LSHIFT ,_______,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_N ,KC_M ,KC_COMM,KC_DOT ,KC_SLSH,KC_UP ,MO(_FL) , \
@@ -52,37 +47,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______ ,_______ ,_______ ,_______ ,_______ ,_______,_______,_______,_______,_______,_______,_______,KC_PGUP ,_______ , \
KC_LCTL ,_______ ,KC_LALT , _______, KC_RCTL,KC_HOME,KC_PGDOWN ,KC_END ),
};
-
-enum function_id {
- SHIFT_ESC,
-};
-
-const uint16_t PROGMEM fn_actions[] = {
- [0] = ACTION_FUNCTION(SHIFT_ESC),
-};
-
-void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
- static uint8_t shift_esc_shift_mask;
- switch (id) {
- case SHIFT_ESC:
- shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK;
- if (record->event.pressed) {
- if (shift_esc_shift_mask) {
- add_key(KC_GRV);
- send_keyboard_report();
- } else {
- add_key(KC_ESC);
- send_keyboard_report();
- }
- } else {
- if (shift_esc_shift_mask) {
- del_key(KC_GRV);
- send_keyboard_report();
- } else {
- del_key(KC_ESC);
- send_keyboard_report();
- }
- }
- break;
- }
-}
diff --git a/keyboards/gh60/satan/keymaps/dbroqua/keymap.c b/keyboards/gh60/satan/keymaps/dbroqua/keymap.c
index a9a54bf764..79fa86d18d 100644
--- a/keyboards/gh60/satan/keymaps/dbroqua/keymap.c
+++ b/keyboards/gh60/satan/keymaps/dbroqua/keymap.c
@@ -71,75 +71,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_SFX] = LAYOUT_60_ansi_split_bs_rshift(
______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, RESET, \
______, BL_DEC, BL_INC, BL_TOGG,______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \
- ______, F(0), F(1), ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \
- ______, F(2), F(3), F(4), F(5), F(6), F(7), ______, ______, ______, ______, ______, ______, \
+ ______, RGB_TOG,RGB_MOD,______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \
+ ______, RGB_HUI,RGB_HUD,RGB_SAI,RGB_SAD,RGB_VAI,RGB_VAD,______, ______, ______, ______, ______, ______, \
______, ______, ______, ______, ______, ______, ______, ______ \
)
};
-
-enum function_id {
- RGBLED_TOGGLE,
- RGBLED_STEP_MODE,
- RGBLED_INCREASE_HUE,
- RGBLED_DECREASE_HUE,
- RGBLED_INCREASE_SAT,
- RGBLED_DECREASE_SAT,
- RGBLED_INCREASE_VAL,
- RGBLED_DECREASE_VAL
-};
-
-const uint16_t PROGMEM fn_actions[] = {
- [0] = ACTION_FUNCTION(RGBLED_TOGGLE),
- [1] = ACTION_FUNCTION(RGBLED_STEP_MODE),
- [2] = ACTION_FUNCTION(RGBLED_INCREASE_HUE),
- [3] = ACTION_FUNCTION(RGBLED_DECREASE_HUE),
- [4] = ACTION_FUNCTION(RGBLED_INCREASE_SAT),
- [5] = ACTION_FUNCTION(RGBLED_DECREASE_SAT),
- [6] = ACTION_FUNCTION(RGBLED_INCREASE_VAL),
- [7] = ACTION_FUNCTION(RGBLED_DECREASE_VAL)
-};
-
-void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
- switch (id) {
- case RGBLED_TOGGLE:
- if (record->event.pressed) {
- rgblight_toggle();
- }
- break;
- case RGBLED_INCREASE_HUE:
- if (record->event.pressed) {
- rgblight_increase_hue();
- }
- break;
- case RGBLED_DECREASE_HUE:
- if (record->event.pressed) {
- rgblight_decrease_hue();
- }
- break;
- case RGBLED_INCREASE_SAT:
- if (record->event.pressed) {
- rgblight_increase_sat();
- }
- break;
- case RGBLED_DECREASE_SAT:
- if (record->event.pressed) {
- rgblight_decrease_sat();
- }
- break;
- case RGBLED_INCREASE_VAL:
- if (record->event.pressed) {
- rgblight_increase_val();
- }
- break;
- case RGBLED_DECREASE_VAL:
- if (record->event.pressed) {
- rgblight_decrease_val();
- }
- break;
- case RGBLED_STEP_MODE:
- if (record->event.pressed) {
- rgblight_step();
- }
- break;
- }
-}
diff --git a/keyboards/gh60/satan/keymaps/dende_iso/keymap.c b/keyboards/gh60/satan/keymaps/dende_iso/keymap.c
index e6187c1615..48cd66d415 100644
--- a/keyboards/gh60/satan/keymaps/dende_iso/keymap.c
+++ b/keyboards/gh60/satan/keymaps/dende_iso/keymap.c
@@ -29,9 +29,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/
[_DEF] = LAYOUT_60_iso_split_bs_rshift(
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, DE_SS, DE_ACUT, KC_BSPC, MO(_FNK), \
- KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, DE_Z, KC_U, KC_I, KC_O, KC_P, DE_UE, DE_PLUS, \
- FN_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, DE_OE, DE_AE, DE_HASH, KC_ENT, \
- KC_LSFT, DE_LESS, DE_Y, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, DE_MINS, KC_RSFT, KC_DELETE, \
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, DE_Z, KC_U, KC_I, KC_O, KC_P, DE_UDIA, DE_PLUS, \
+ FN_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, DE_ODIA, DE_ADIA, DE_HASH, KC_ENT, \
+ KC_LSFT, DE_LABK, DE_Y, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, DE_MINS, KC_RSFT, KC_DELETE, \
KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_ALGR, KC_RGUI, KC_APP, KC_RCTL),
diff --git a/keyboards/gh60/satan/keymaps/denolfe/keymap.c b/keyboards/gh60/satan/keymaps/denolfe/keymap.c
index a70c409fe8..612c5075e6 100644
--- a/keyboards/gh60/satan/keymaps/denolfe/keymap.c
+++ b/keyboards/gh60/satan/keymaps/denolfe/keymap.c
@@ -5,9 +5,6 @@
#include "rgblight.h"
#endif
-// Used for SHIFT_ESC
-#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))
-
// 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
@@ -31,7 +28,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------'
*/
[_BL] = LAYOUT_60_ansi(
- F(0), 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_BSPC, \
+ KC_GESC, 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_BSPC, \
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_BSLS, \
MO(_FL), 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, \
@@ -55,7 +52,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_GRV, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, \
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, BL_DEC, BL_INC, BL_TOGG, \
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
- KC_TRNS, F(1), F(2), F(3), F(4), F(5), F(6), F(7), F(8), KC_TRNS, KC_TRNS, KC_TRNS, \
+ KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, \
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
#else
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, KC_DEL, \
@@ -72,100 +69,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS, KC_TRNS, KC_TRNS, BL_DEC, BL_TOGG, BL_INC, LSFT(KC_HOME), LCTL(LSFT(KC_LEFT)), LCTL(LSFT(KC_END)), LCTL(LSFT(KC_RIGHT)), KC_TRNS, RESET, \
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
};
-
-enum function_id {
- SHIFT_ESC,
- #ifdef RGBLIGHT_ENABLE
- RGBLED_TOGGLE,
- RGBLED_STEP_MODE,
- RGBLED_INCREASE_HUE,
- RGBLED_DECREASE_HUE,
- RGBLED_INCREASE_SAT,
- RGBLED_DECREASE_SAT,
- RGBLED_INCREASE_VAL,
- RGBLED_DECREASE_VAL
- #endif
-};
-
-const uint16_t PROGMEM fn_actions[] = {
- [0] = ACTION_FUNCTION(SHIFT_ESC),
- #ifdef RGBLIGHT_ENABLE
- [1] = ACTION_FUNCTION(RGBLED_TOGGLE),
- [2] = ACTION_FUNCTION(RGBLED_STEP_MODE),
- [3] = ACTION_FUNCTION(RGBLED_INCREASE_HUE),
- [4] = ACTION_FUNCTION(RGBLED_DECREASE_HUE),
- [5] = ACTION_FUNCTION(RGBLED_INCREASE_SAT),
- [6] = ACTION_FUNCTION(RGBLED_DECREASE_SAT),
- [7] = ACTION_FUNCTION(RGBLED_INCREASE_VAL),
- [8] = ACTION_FUNCTION(RGBLED_DECREASE_VAL),
- #endif
-};
-
-void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
- static uint8_t shift_esc_shift_mask;
- switch (id) {
- case SHIFT_ESC:
- shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK;
- if (record->event.pressed) {
- if (shift_esc_shift_mask) {
- add_key(KC_GRV);
- send_keyboard_report();
- } else {
- add_key(KC_ESC);
- send_keyboard_report();
- }
- } else {
- if (shift_esc_shift_mask) {
- del_key(KC_GRV);
- send_keyboard_report();
- } else {
- del_key(KC_ESC);
- send_keyboard_report();
- }
- }
- break;
- //led operations
- #ifdef RGBLIGHT_ENABLE
- case RGBLED_TOGGLE:
- if (record->event.pressed) {
- rgblight_toggle();
- }
- break;
- case RGBLED_INCREASE_HUE:
- if (record->event.pressed) {
- rgblight_increase_hue();
- }
- break;
- case RGBLED_DECREASE_HUE:
- if (record->event.pressed) {
- rgblight_decrease_hue();
- }
- break;
- case RGBLED_INCREASE_SAT:
- if (record->event.pressed) {
- rgblight_increase_sat();
- }
- break;
- case RGBLED_DECREASE_SAT:
- if (record->event.pressed) {
- rgblight_decrease_sat();
- }
- break;
- case RGBLED_INCREASE_VAL:
- if (record->event.pressed) {
- rgblight_increase_val();
- }
- break;
- case RGBLED_DECREASE_VAL:
- if (record->event.pressed) {
- rgblight_decrease_val();
- }
- break;
- case RGBLED_STEP_MODE:
- if (record->event.pressed) {
- rgblight_step();
- }
- break;
- #endif
- }
-}
diff --git a/keyboards/gh60/satan/keymaps/isoHHKB/keymap.c b/keyboards/gh60/satan/keymaps/isoHHKB/keymap.c
index 46d66e5db6..d6647cbb30 100644
--- a/keyboards/gh60/satan/keymaps/isoHHKB/keymap.c
+++ b/keyboards/gh60/satan/keymaps/isoHHKB/keymap.c
@@ -1,8 +1,5 @@
#include QMK_KEYBOARD_H
-// Used for SHIFT_ESC
-#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))
-
// 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
@@ -31,7 +28,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*
*/
[_BL] = LAYOUT_60_iso_split_rshift( \
- F(0), 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_BSPC,
+ KC_GESC, 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_BSPC,
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_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENYE, KC_SCLN, KC_QUOT, KC_ENT,
OSM(MOD_LSFT), _______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, OSM(MOD_RSFT), MO(_FL),
@@ -61,40 +58,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
-enum function_id {
- SHIFT_ESC,
-};
-
-const uint16_t PROGMEM fn_actions[] = {
- [0] = ACTION_FUNCTION(SHIFT_ESC),
-};
-
-void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
- static uint8_t shift_esc_shift_mask;
- switch (id) {
- case SHIFT_ESC:
- shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK;
- if (record->event.pressed) {
- if (shift_esc_shift_mask) {
- add_key(KC_GRV);
- send_keyboard_report();
- } else {
- add_key(KC_ESC);
- send_keyboard_report();
- }
- } else {
- if (shift_esc_shift_mask) {
- del_key(KC_GRV);
- send_keyboard_report();
- } else {
- del_key(KC_ESC);
- send_keyboard_report();
- }
- }
- break;
- }
-};
-
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if (record->event.pressed) {
switch(keycode) {
diff --git a/keyboards/gh60/satan/keymaps/sethbc/keymap.c b/keyboards/gh60/satan/keymaps/sethbc/keymap.c
index 2a25b2b6b4..63d65ca23c 100644
--- a/keyboards/gh60/satan/keymaps/sethbc/keymap.c
+++ b/keyboards/gh60/satan/keymaps/sethbc/keymap.c
@@ -1,9 +1,5 @@
#include QMK_KEYBOARD_H
-
-// Used for SHIFT_ESC
-#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))
-
// 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
@@ -26,7 +22,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------'
*/
[_BL] = LAYOUT_60_ansi_split_bs_rshift(
- F(0), 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_GESC, 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, \
KC_LCTL, 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(_FL), \
@@ -49,37 +45,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
#endif
),
};
-
-enum function_id {
- SHIFT_ESC,
-};
-
-const uint16_t PROGMEM fn_actions[] = {
- [0] = ACTION_FUNCTION(SHIFT_ESC),
-};
-
-void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
- static uint8_t shift_esc_shift_mask;
- switch (id) {
- case SHIFT_ESC:
- shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK;
- if (record->event.pressed) {
- if (shift_esc_shift_mask) {
- add_key(KC_GRV);
- send_keyboard_report();
- } else {
- add_key(KC_ESC);
- send_keyboard_report();
- }
- } else {
- if (shift_esc_shift_mask) {
- del_key(KC_GRV);
- send_keyboard_report();
- } else {
- del_key(KC_ESC);
- send_keyboard_report();
- }
- }
- break;
- }
-}
diff --git a/keyboards/gh60/satan/keymaps/stanleylai/keymap.c b/keyboards/gh60/satan/keymaps/stanleylai/keymap.c
index 633719a88b..e3cbae285d 100644
--- a/keyboards/gh60/satan/keymaps/stanleylai/keymap.c
+++ b/keyboards/gh60/satan/keymaps/stanleylai/keymap.c
@@ -1,9 +1,5 @@
#include QMK_KEYBOARD_H
-
-// Used for SHIFT_ESC
-#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))
-
// 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
@@ -19,7 +15,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// Base Default Layer
// Mac Modifier Layout. Use BootMagic to toggle GUI and ALT positions.
[_BL] = LAYOUT_60_ansi_split_bs_rshift(
- F(0), 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_BSPC, XXXXXXX, \
+ KC_GESC, 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_BSPC, XXXXXXX, \
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_BSLS, \
LT(_FL, KC_CAPS), 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_UP, MO(_FL), \
@@ -52,37 +48,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
#endif
),
};
-
-enum function_id {
- SHIFT_ESC,
-};
-
-const uint16_t PROGMEM fn_actions[] = {
- [0] = ACTION_FUNCTION(SHIFT_ESC),
-};
-
-void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
- static uint8_t shift_esc_shift_mask;
- switch (id) {
- case SHIFT_ESC:
- shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK;
- if (record->event.pressed) {
- if (shift_esc_shift_mask) {
- add_key(KC_GRV);
- send_keyboard_report();
- } else {
- add_key(KC_ESC);
- send_keyboard_report();
- }
- } else {
- if (shift_esc_shift_mask) {
- del_key(KC_GRV);
- send_keyboard_report();
- } else {
- del_key(KC_ESC);
- send_keyboard_report();
- }
- }
- break;
- }
-}
diff --git a/keyboards/gh60/satan/keymaps/unxmaal/keymap.c b/keyboards/gh60/satan/keymaps/unxmaal/keymap.c
index f311ebeebb..8d9b1dc45d 100644
--- a/keyboards/gh60/satan/keymaps/unxmaal/keymap.c
+++ b/keyboards/gh60/satan/keymaps/unxmaal/keymap.c
@@ -1,10 +1,5 @@
#include QMK_KEYBOARD_H
-
-
-// Used for SHIFT_ESC
-#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))
-
// 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
@@ -87,37 +82,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
#endif
),
};
-
-enum function_id {
- SHIFT_ESC,
-};
-
-const uint16_t PROGMEM fn_actions[] = {
- [0] = ACTION_FUNCTION(SHIFT_ESC),
-};
-
-void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
- static uint8_t shift_esc_shift_mask;
- switch (id) {
- case SHIFT_ESC:
- shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK;
- if (record->event.pressed) {
- if (shift_esc_shift_mask) {
- add_key(KC_GRV);
- send_keyboard_report();
- } else {
- add_key(KC_ESC);
- send_keyboard_report();
- }
- } else {
- if (shift_esc_shift_mask) {
- del_key(KC_GRV);
- send_keyboard_report();
- } else {
- del_key(KC_ESC);
- send_keyboard_report();
- }
- }
- break;
- }
-}
diff --git a/keyboards/gmmk/pro/config.h b/keyboards/gmmk/pro/config.h
index 7f3977c106..1bb8d6eef7 100644
--- a/keyboards/gmmk/pro/config.h
+++ b/keyboards/gmmk/pro/config.h
@@ -47,6 +47,22 @@
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
+/* SPI Config for LED Driver */
+#define SPI_DRIVER SPID1
+#define SPI_SCK_PIN A5
+#define SPI_MOSI_PIN A6
+#define SPI_MISO_PIN A7
+
+#define DRIVER_1_CS B13
+#define DRIVER_2_CS B14
+#define DRIVER_1_EN C13
+#define DRIVER_2_EN C13
+
+#define DRIVER_COUNT 2
+#define DRIVER_1_LED_TOTAL 66
+#define DRIVER_2_LED_TOTAL 32
+#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
+
/* 1000Hz USB polling - it's the default on stock firmware */
#define USB_POLLING_INTERVAL_MS 1
diff --git a/keyboards/gmmk/pro/halconf.h b/keyboards/gmmk/pro/halconf.h
new file mode 100644
index 0000000000..23ecb202a1
--- /dev/null
+++ b/keyboards/gmmk/pro/halconf.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#define HAL_USE_SPI TRUE
+#define SPI_USE_WAIT TRUE
+#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
+
+#include_next <halconf.h>
diff --git a/keyboards/gmmk/pro/keymaps/alexmarmon/keymap.c b/keyboards/gmmk/pro/keymaps/alexmarmon/keymap.c
new file mode 100644
index 0000000000..99504de956
--- /dev/null
+++ b/keyboards/gmmk/pro/keymaps/alexmarmon/keymap.c
@@ -0,0 +1,66 @@
+/* Copyright 2021 Glorious, LLC <salman@pcgamingrace.com>
+ Copyright 2021 alexmarmon
+
+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 <http://www.gnu.org/licenses/>.
+*/
+
+#include QMK_KEYBOARD_H
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+// ESC F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Prt Rotary(Mute)
+// ~ 1 2 3 4 5 6 7 8 9 0 - (=) BackSpc Del
+// Tab Q W E R T Y U I O P [ ] \ PgUp
+// Caps A S D F G H J K L ; " Enter PgDn
+// Sh_L Z X C V B N M , . ? Sh_R Up End
+// Ct_L Alt_L Win_L SPACE Ct_R Alt_R FN Left Down Right
+
+
+ // The FN key by default maps to a momentary toggle to layer 1 to provide access to the RESET key (to put the board into bootloader mode). Without
+ // this mapping, you have to open the case to hit the button on the bottom of the PCB (near the USB cable attachment) while plugging in the USB
+ // cable to get the board into bootloader mode - definitely not fun when you're working on your QMK builds. Remove this and put it back to KC_RGUI
+ // if that's your preference.
+ //
+ // To put the keyboard in bootloader mode, use FN+backslash. If you accidentally put it into bootloader, you can just unplug the USB cable and
+ // it'll be back to normal when you plug it back in.
+ [0] = LAYOUT(
+ 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_MUTE,
+ KC_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, KC_BSPC, KC_DEL,
+ 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_BSLS, KC_PGUP,
+ KC_CAPS, 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_PGDN,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END,
+ KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RCTL, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT
+ ),
+
+ [1] = LAYOUT(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, RGB_MODE_FORWARD,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MODE_REVERSE,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG,
+ _______, _______, _______, _______, _______, _______, _______, KC_MEDIA_PREV_TRACK, _______, KC_MEDIA_NEXT_TRACK
+ ),
+
+
+};
+
+
+bool encoder_update_user(uint8_t index, bool clockwise) {
+ if (clockwise) {
+ tap_code(KC_VOLU);
+ } else {
+ tap_code(KC_VOLD);
+ }
+ return true;
+}
diff --git a/keyboards/gmmk/pro/keymaps/alexmarmon/readme.md b/keyboards/gmmk/pro/keymaps/alexmarmon/readme.md
new file mode 100644
index 0000000000..36ad42b1af
--- /dev/null
+++ b/keyboards/gmmk/pro/keymaps/alexmarmon/readme.md
@@ -0,0 +1,7 @@
+![Layout Image](https://i.imgur.com/MizMvsI.jpg)
+
+# Simple MacOS like keymap with RGB
+
+* Working basic RGB thanks to https://github.com/qmk/qmk_firmware/pull/13430
+* Restore working rotary knob volume control
+* Add media_previous and media_next to FN+left and FN+right \ No newline at end of file
diff --git a/keyboards/gmmk/pro/mcuconf.h b/keyboards/gmmk/pro/mcuconf.h
new file mode 100644
index 0000000000..bb1c0acde2
--- /dev/null
+++ b/keyboards/gmmk/pro/mcuconf.h
@@ -0,0 +1,6 @@
+#pragma once
+
+#include_next <mcuconf.h>
+
+#undef STM32_SPI_USE_SPI1
+#define STM32_SPI_USE_SPI1 TRUE
diff --git a/keyboards/gmmk/pro/pro.c b/keyboards/gmmk/pro/pro.c
index 816d089a58..9ed7ac8865 100644
--- a/keyboards/gmmk/pro/pro.c
+++ b/keyboards/gmmk/pro/pro.c
@@ -14,3 +14,225 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "pro.h"
+
+#ifdef RGB_MATRIX_ENABLE
+led_config_t g_led_config = { {
+ { 4, NO_LED, NO_LED, 95, 65, 79, 5, 28 },
+ { 8, 2, 9, 0, 10, 75, 1, 7 },
+ { 14, 3, 15, NO_LED, 16, 86, 6, 13 },
+ { 20, 18, 21, 23, 22, 94, 12, 19 },
+ { 25, 30, 26, 31, 27, 32, 29, 24 },
+ { 41, 36, 42, 37, 43, 38, 35, 40 },
+ { 46, 89, 47, 34, 48, 72, 78, 45 },
+ { 52, 39, 53, 97, 54, 82, 44, 51 },
+ { 58, 63, 59, 64, NO_LED, 60, 62, 57 },
+ { 11, 90, 55, 17, 33, 49, NO_LED, 69 },
+ { NO_LED, 85, 93, 61, 96, 66, 50, 56 }
+}, {
+ { 0, 0 }, // 0, ESC, k13
+ { 0, 15 }, // 1, ~, k16
+ { 4, 26 }, // 2, Tab, k11
+ { 5, 38 }, // 3, Caps, k21
+ { 9, 49 }, // 4, Sh_L, k00
+ { 2, 61 }, // 5, Ct_L, k06
+ { 18, 0 }, // 6, F1, k26
+ { 14, 15 }, // 7, 1, k17
+ { 22, 26 }, // 8, Q, k10
+ { 25, 38 }, // 9, A, k12
+ { 33, 49 }, // 10, Z, k14
+ { 20, 61 }, // 11, Win_L, k90
+ { 33, 0 }, // 12, F2, k36
+ { 29, 15 }, // 13, 2, k27
+ { 36, 26 }, // 14, W, k20
+ { 40, 38 }, // 15, S, k22
+ { 47, 49 }, // 16, X, k24
+ { 38, 61 }, // 17, Alt_L, k93
+ { 47, 0 }, // 18, F3, k31
+ { 43, 15 }, // 19, 3, k37
+ { 51, 26 }, // 20, E, k30
+ { 54, 38 }, // 21, D, k32
+ { 61, 49 }, // 22, C, k34
+ { 61, 0 }, // 23, F4, k33
+ { 58, 15 }, // 24, 4, k47
+ { 65, 26 }, // 25, R, k40
+ { 69, 38 }, // 26, F, k42
+ { 76, 49 }, // 27, V, k44
+ { 79, 0 }, // 28, F5, k07
+ { 72, 15 }, // 29, 5, k46
+ { 79, 26 }, // 30, T, k41
+ { 83, 38 }, // 31, G, k43
+ { 90, 49 }, // 32, B, k45
+ { 92, 61 }, // 33, SPACE, k94
+ { 94, 0 }, // 34, F6, k63
+ { 87, 15 }, // 35, 6, k56
+ { 94, 26 }, // 36, Y, k51
+ { 98, 38 }, // 37, H, k53
+ { 105, 49 }, // 38, N, k55
+ { 108, 0 }, // 39, F7, k71
+ { 101, 15 }, // 40, 7, k57
+ { 108, 26 }, // 41, U, k50
+ { 112, 38 }, // 42, J, k52
+ { 119, 49 }, // 43, M, k54
+ { 123, 0 }, // 44, F8, k76
+ { 116, 15 }, // 45, 8, k67
+ { 123, 26 }, // 46, I, k60
+ { 126, 38 }, // 47, K, k62
+ { 134, 49 }, // 48, ,, k64
+ { 145, 61 }, // 49, Alt_R, k95
+ { 141, 0 }, // 50, F9, ka6
+ { 130, 15 }, // 51, 9, k77
+ { 137, 26 }, // 52, O, k70
+ { 141, 38 }, // 53, L, k72
+ { 148, 49 }, // 54, ., k74
+ { 159, 61 }, // 55, FN, k92
+ { 155, 0 }, // 56, F10, ka7
+ { 145, 15 }, // 57, 0, k87
+ { 152, 26 }, // 58, P, k80
+ { 155, 38 }, // 59, ;, k82
+ { 163, 49 }, // 60, ?, k85
+ { 170, 0 }, // 61, F11, ka3
+ { 159, 15 }, // 62, -, k86
+ { 166, 26 }, // 63, [, k81
+ { 170, 38 }, // 64, ", k83
+ { 173, 61 }, // 65, Ct_R, k04
+ { 184, 0 }, // 66, F12, ka5
+ { 0, 8 }, // 67, LED, l01
+ { 224, 8 }, // 68, LED, l11
+ { 202, 0 }, // 69, Prt, k97
+ { 0, 15 }, // 70, LED, l02
+ { 224, 15 }, // 71, LED, l12
+ { 224, 15 }, // 72, Del, k65
+ { 0, 21 }, // 73, LED, l03
+ { 224, 21 }, // 74, LED, l13
+ { 224, 26 }, // 75, PgUp, k15
+ { 0, 28 }, // 76, LED, l04
+ { 224, 28 }, // 77, LED, l14
+ { 173, 15 }, // 78, =, k66
+ { 220, 64 }, // 79, Right, k05
+ { 0, 35 }, // 80, LED, l05
+ { 224, 35 }, // 81, LED, l15
+ { 224, 49 }, // 82, End, k75
+ { 0, 42 }, // 83, LED, l06
+ { 224, 42 }, // 84, LED, l16
+ { 195, 15 }, // 85, BSpc, ka1
+ { 224, 38 }, // 86, PgDn, k25
+ { 0, 48 }, // 87, LED, l07
+ { 224, 48 }, // 88, LED, l17
+ { 181, 26 }, // 89, ], k61
+ { 182, 49 }, // 90, Sh_R, k91
+ { 0, 55 }, // 91, LED, l08
+ { 224, 55 }, // 92, LED, l18
+ { 199, 26 }, // 93, \, ka2
+ { 206, 52 }, // 94, Up, k35
+ { 191, 64 }, // 95, Left, k03
+ { 193, 38 }, // 96, Enter, ka4
+ { 206, 64 } // 97, Down, k73
+}, {
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 4, 2, 2, 4, 2, 2,
+ 4, 2, 2, 4, 4, 2, 2, 4, 2, 2, 4, 4, 2, 2, 4, 4, 2, 2, 4, 4, 4, 4, 4
+} };
+
+const aw_led g_aw_leds[DRIVER_LED_TOTAL] = {
+ { 0, CS1_SW1, CS2_SW1, CS3_SW1 }, // 0, ESC, k13
+ { 0, CS4_SW1, CS5_SW1, CS6_SW1 }, // 1, ~, k16
+ { 0, CS7_SW1, CS8_SW1, CS9_SW1 }, // 2, Tab, k11
+ { 0, CS10_SW1, CS11_SW1, CS12_SW1 }, // 3, Caps, k21
+ { 0, CS13_SW1, CS14_SW1, CS15_SW1 }, // 4, Sh_L, k00
+ { 0, CS16_SW1, CS17_SW1, CS18_SW1 }, // 5, Ct_L, k06
+ { 0, CS1_SW2, CS2_SW2, CS3_SW2 }, // 6, F1, k26
+ { 0, CS4_SW2, CS5_SW2, CS6_SW2 }, // 7, 1, k17
+ { 0, CS7_SW2, CS8_SW2, CS9_SW2 }, // 8, Q, k10
+ { 0, CS10_SW2, CS11_SW2, CS12_SW2 }, // 9, A, k12
+ { 0, CS13_SW2, CS14_SW2, CS15_SW2 }, // 10, Z, k14
+ { 0, CS16_SW2, CS17_SW2, CS18_SW2 }, // 11, Win_L, k90
+ { 0, CS1_SW3, CS2_SW3, CS3_SW3 }, // 12, F2, k36
+ { 0, CS4_SW3, CS5_SW3, CS6_SW3 }, // 13, 2, k27
+ { 0, CS7_SW3, CS8_SW3, CS9_SW3 }, // 14, W, k20
+ { 0, CS10_SW3, CS11_SW3, CS12_SW3 }, // 15, S, k22
+ { 0, CS13_SW3, CS14_SW3, CS15_SW3 }, // 16, X, k24
+ { 0, CS16_SW3, CS17_SW3, CS18_SW3 }, // 17, Alt_L, k93
+ { 0, CS1_SW4, CS2_SW4, CS3_SW4 }, // 18, F3, k31
+ { 0, CS4_SW4, CS5_SW4, CS6_SW4 }, // 19, 3, k37
+ { 0, CS7_SW4, CS8_SW4, CS9_SW4 }, // 20, E, k30
+ { 0, CS10_SW4, CS11_SW4, CS12_SW4 }, // 21, D, k32
+ { 0, CS13_SW4, CS14_SW4, CS15_SW4 }, // 22, C, k34
+ { 0, CS1_SW5, CS2_SW5, CS3_SW5 }, // 23, F4, k33
+ { 0, CS4_SW5, CS5_SW5, CS6_SW5 }, // 24, 4, k47
+ { 0, CS7_SW5, CS8_SW5, CS9_SW5 }, // 25, R, k40
+ { 0, CS10_SW5, CS11_SW5, CS12_SW5 }, // 26, F, k42
+ { 0, CS13_SW5, CS14_SW5, CS15_SW5 }, // 27, V, k44
+ { 0, CS1_SW6, CS2_SW6, CS3_SW6 }, // 28, F5, k07
+ { 0, CS4_SW6, CS5_SW6, CS6_SW6 }, // 29, 5, k46
+ { 0, CS7_SW6, CS8_SW6, CS9_SW6 }, // 30, T, k41
+ { 0, CS10_SW6, CS11_SW6, CS12_SW6 }, // 31, G, k43
+ { 0, CS13_SW6, CS14_SW6, CS15_SW6 }, // 32, B, k45
+ { 0, CS16_SW6, CS17_SW6, CS18_SW6 }, // 33, SPACE, k94
+ { 0, CS1_SW7, CS2_SW7, CS3_SW7 }, // 34, F6, k63
+ { 0, CS4_SW7, CS5_SW7, CS6_SW7 }, // 35, 6, k56
+ { 0, CS7_SW7, CS8_SW7, CS9_SW7 }, // 36, Y, k51
+ { 0, CS10_SW7, CS11_SW7, CS12_SW7 }, // 37, H, k53
+ { 0, CS13_SW7, CS14_SW7, CS15_SW7 }, // 38, N, k55
+ { 0, CS1_SW8, CS2_SW8, CS3_SW8 }, // 39, F7, k71
+ { 0, CS4_SW8, CS5_SW8, CS6_SW8 }, // 40, 7, k57
+ { 0, CS7_SW8, CS8_SW8, CS9_SW8 }, // 41, U, k50
+ { 0, CS10_SW8, CS11_SW8, CS12_SW8 }, // 42, J, k52
+ { 0, CS13_SW8, CS14_SW8, CS15_SW8 }, // 43, M, k54
+ { 0, CS1_SW9, CS2_SW9, CS3_SW9 }, // 44, F8, k76
+ { 0, CS4_SW9, CS5_SW9, CS6_SW9 }, // 45, 8, k67
+ { 0, CS7_SW9, CS8_SW9, CS9_SW9 }, // 46, I, k60
+ { 0, CS10_SW9, CS11_SW9, CS12_SW9 }, // 47, K, k62
+ { 0, CS13_SW9, CS14_SW9, CS15_SW9 }, // 48, ,, k64
+ { 0, CS16_SW9, CS17_SW9, CS18_SW9 }, // 49, Alt_R, k95
+ { 0, CS1_SW10, CS2_SW10, CS3_SW10 }, // 50, F9, ka6
+ { 0, CS4_SW10, CS5_SW10, CS6_SW10 }, // 51, 9, k77
+ { 0, CS7_SW10, CS8_SW10, CS9_SW10 }, // 52, O, k70
+ { 0, CS10_SW10, CS11_SW10, CS12_SW10 }, // 53, L, k72
+ { 0, CS13_SW10, CS14_SW10, CS15_SW10 }, // 54, ., k74
+ { 0, CS16_SW10, CS17_SW10, CS18_SW10 }, // 55, FN, k92
+ { 0, CS1_SW11, CS2_SW11, CS3_SW11 }, // 56, F10, ka7
+ { 0, CS4_SW11, CS5_SW11, CS6_SW11 }, // 57, 0, k87
+ { 0, CS7_SW11, CS8_SW11, CS9_SW11 }, // 58, P, k80
+ { 0, CS10_SW11, CS11_SW11, CS12_SW11 }, // 59, ;, k82
+ { 0, CS13_SW11, CS14_SW11, CS15_SW11 }, // 60, ?, k85
+ { 0, CS1_SW12, CS2_SW12, CS3_SW12 }, // 61, F11, ka3
+ { 0, CS4_SW12, CS5_SW12, CS6_SW12 }, // 62, -, k86
+ { 0, CS7_SW12, CS8_SW12, CS9_SW12 }, // 63, [, k81
+ { 0, CS10_SW12, CS11_SW12, CS12_SW12 }, // 64, ", k83
+ { 0, CS16_SW12, CS17_SW12, CS18_SW12 }, // 65, Ct_R, k04
+
+ { 1, CS1_SW1, CS2_SW1, CS3_SW1 }, // 66, F12, ka5
+ { 1, CS13_SW1, CS14_SW1, CS15_SW1 }, // 67, LED, l01
+ { 1, CS16_SW1, CS17_SW1, CS18_SW1 }, // 68, LED, l11
+ { 1, CS4_SW2, CS5_SW2, CS6_SW2 }, // 69, Prt, k97
+ { 1, CS13_SW2, CS14_SW2, CS15_SW2 }, // 70, LED, l02
+ { 1, CS16_SW2, CS17_SW2, CS18_SW2 }, // 71, LED, l12
+ { 1, CS4_SW3, CS5_SW3, CS6_SW3 }, // 72, Del, k65
+ { 1, CS13_SW3, CS14_SW3, CS15_SW3 }, // 73, LED, l03
+ { 1, CS16_SW3, CS17_SW3, CS18_SW3 }, // 74, LED, l13
+ { 1, CS4_SW4, CS5_SW4, CS6_SW4 }, // 75, PgUp, k15
+ { 1, CS13_SW4, CS14_SW4, CS15_SW4 }, // 76, LED, l04
+ { 1, CS16_SW4, CS17_SW4, CS18_SW4 }, // 77, LED, l14
+ { 1, CS1_SW5, CS2_SW5, CS3_SW5 }, // 78, =, k66
+ { 1, CS10_SW5, CS11_SW5, CS12_SW5 }, // 79, Right, k05
+ { 1, CS13_SW5, CS14_SW5, CS15_SW5 }, // 80, LED, l05
+ { 1, CS16_SW5, CS17_SW5, CS18_SW5 }, // 81, LED, l15
+ { 1, CS4_SW6, CS5_SW6, CS6_SW6 }, // 82, End, k75
+ { 1, CS13_SW6, CS14_SW6, CS15_SW6 }, // 83, LED, l06
+ { 1, CS16_SW6, CS17_SW6, CS18_SW6 }, // 84, LED, l16
+ { 1, CS1_SW7, CS2_SW7, CS3_SW7 }, // 85, BSpc, ka1
+ { 1, CS4_SW7, CS5_SW7, CS6_SW7 }, // 86, PgDn, k25
+ { 1, CS13_SW7, CS14_SW7, CS15_SW7 }, // 87, LED, l07
+ { 1, CS16_SW7, CS17_SW7, CS18_SW7 }, // 88, LED, l17
+ { 1, CS1_SW8, CS2_SW8, CS3_SW8 }, // 89, ], k61
+ { 1, CS4_SW8, CS5_SW8, CS6_SW8 }, // 90, Sh_R, k91
+ { 1, CS13_SW8, CS14_SW8, CS15_SW8 }, // 91, LED, l08
+ { 1, CS16_SW8, CS17_SW8, CS18_SW8 }, // 92, LED, l18
+ { 1, CS1_SW9, CS2_SW9, CS3_SW9 }, // 93, \, ka2
+ { 1, CS4_SW9, CS5_SW9, CS6_SW9 }, // 94, Up, k35
+ { 1, CS4_SW10, CS5_SW10, CS6_SW10 }, // 95, Left, k03
+ { 1, CS1_SW11, CS2_SW11, CS3_SW11 }, // 96, Enter, ka4
+ { 1, CS4_SW11, CS5_SW11, CS6_SW11 }, // 97, Down, k73
+};
+#endif
diff --git a/keyboards/gmmk/pro/rules.mk b/keyboards/gmmk/pro/rules.mk
index b12d055a3d..6221d64082 100644
--- a/keyboards/gmmk/pro/rules.mk
+++ b/keyboards/gmmk/pro/rules.mk
@@ -21,3 +21,5 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
BLUETOOTH_ENABLE = no # Enable Bluetooth
AUDIO_ENABLE = no # Audio output
ENCODER_ENABLE = yes
+RGB_MATRIX_ENABLE = yes
+RGB_MATRIX_DRIVER = AW20216
diff --git a/keyboards/gon/nerdtkl/keymaps/gam3cat/rules.mk b/keyboards/gon/nerdtkl/keymaps/gam3cat/rules.mk
index 6151bcf231..3880c80669 100644
--- a/keyboards/gon/nerdtkl/keymaps/gam3cat/rules.mk
+++ b/keyboards/gon/nerdtkl/keymaps/gam3cat/rules.mk
@@ -18,7 +18,6 @@ UNICODEMAP_ENABLE = no # Enable extended unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
AUDIO_ENABLE = no # Audio output on port C6
#VARIABLE_TRACE = no # Use this to debug changes to variable values
-API_SYSEX_ENABLE = no # This enables using the Quantum SYSEX API to send strings
KEY_LOCK_ENABLE = no # This enables key lock
SPLIT_KEYBOARD = no # This enables split keyboard support and includes all necessary files located at quantum/split_common
TAP_DANCE_ENABLE = no # Enable TapDance functionality
diff --git a/keyboards/hadron/ver2/rules.mk b/keyboards/hadron/ver2/rules.mk
index 7e2ebf5671..a142b92703 100644
--- a/keyboards/hadron/ver2/rules.mk
+++ b/keyboards/hadron/ver2/rules.mk
@@ -27,7 +27,6 @@ AUDIO_ENABLE = no # Audio output on port C6
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
-API_SYSEX_ENABLE = yes
SWAP_HANDS_ENABLE = no # Enable one-hand typing
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
diff --git a/keyboards/handwired/412_64/rules.mk b/keyboards/handwired/412_64/rules.mk
index 044a6d01e9..bf8ddad456 100644
--- a/keyboards/handwired/412_64/rules.mk
+++ b/keyboards/handwired/412_64/rules.mk
@@ -28,5 +28,3 @@ MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
AUDIO_ENABLE = no # Audio output on port C6
-
-LAYOUTS = ortho_4x16
diff --git a/keyboards/handwired/6key/keymaps/default/keymap.c b/keyboards/handwired/6key/keymaps/default/keymap.c
index 509d999e54..ad73597bab 100644
--- a/keyboards/handwired/6key/keymaps/default/keymap.c
+++ b/keyboards/handwired/6key/keymaps/default/keymap.c
@@ -1,17 +1,17 @@
- /* Copyright 2020 Bratzworth
- *
- * 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 <http://www.gnu.org/licenses/>.
+ /* Copyright 2020 Bratzworth
+ *
+ * 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 <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H
@@ -33,7 +33,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
-void dip_switch_update_user(uint8_t index, bool active) {
+bool dip_switch_update_user(uint8_t index, bool active) {
switch (index) {
case 0: {
if (active) {
@@ -43,4 +43,5 @@ void dip_switch_update_user(uint8_t index, bool active) {
}
}
}
-} \ No newline at end of file
+ return true;
+}
diff --git a/keyboards/handwired/colorlice/config.h b/keyboards/handwired/colorlice/config.h
index 206a4004ea..0148817f3f 100644
--- a/keyboards/handwired/colorlice/config.h
+++ b/keyboards/handwired/colorlice/config.h
@@ -49,7 +49,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* RGB LEDs */
#define RGB_DI_PIN B1
#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
#define RGB_MATRIX_KEYPRESSES
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
#define RGB_MATRIX_LED_PROCESS_LIMIT 4
diff --git a/keyboards/handwired/dactyl/rules.mk b/keyboards/handwired/dactyl/rules.mk
index 2e740e3847..202882c720 100644
--- a/keyboards/handwired/dactyl/rules.mk
+++ b/keyboards/handwired/dactyl/rules.mk
@@ -26,7 +26,6 @@ NKRO_ENABLE = yes # USB Nkey Rollover
UNICODE_ENABLE = yes # Unicode
SWAP_HANDS_ENABLE = yes # Allow swapping hands of keyboard
SLEEP_LED_ENABLE = no
-API_SYSEX_ENABLE = no
RGBLIGHT_ENABLE = no
# project specific files
diff --git a/keyboards/handwired/dactyl_manuform/5x6/keymaps/swedish/keymap.c b/keyboards/handwired/dactyl_manuform/5x6/keymaps/swedish/keymap.c
index f8dfb2718c..de931feabd 100644
--- a/keyboards/handwired/dactyl_manuform/5x6/keymaps/swedish/keymap.c
+++ b/keyboards/handwired/dactyl_manuform/5x6/keymaps/swedish/keymap.c
@@ -16,16 +16,13 @@ enum dactyl_layers {
#define KILL LGUI(LSFT(KC_C))
#define OPEN LGUI(KC_P)
#define KC_QSM LSFT(SE_PLUS)
-#define KC_AA SE_AA
-#define KC_AE SE_AE
-#define KC_OE SE_OSLH
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QWERTY] = LAYOUT_5x6(
- KC_ESC , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , SE_APOS,
- KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_AA ,
- KC_LSFT, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_OE , KC_AE ,
+ KC_ESC , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , SE_QUOT,
+ KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , SE_ARNG,
+ KC_LSFT, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , SE_ODIA, SE_ADIA,
KC_LCTL, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , SE_SLSH, SE_MINS,
KC_EXLM, KC_QSM , SE_PLUS, SE_EQL ,
RAISE , KC_SPC , KC_ENT , LOWER ,
@@ -37,7 +34,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
SE_TILD, KC_EXLM, SE_AT , KC_HASH, SE_DLR , KC_PERC, SE_CIRC, SE_AMPR, SE_ASTR, SE_SLSH, SE_LPRN, SE_RPRN,
SE_ACUT, _______, _______, _______, _______, _______, _______, _______, _______, _______, SE_LCBR, SE_RCBR,
_______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, SE_LBRC, SE_RBRC,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, SE_LESS, SE_GRTR,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, SE_LABK, SE_RABK,
_______, _______, _______, _______,
_______, _______, _______, _______,
_______, _______, _______, _______,
diff --git a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/default/rules.mk b/keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/default/rules.mk
deleted file mode 100644
index 457cda5b0a..0000000000
--- a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/default/rules.mk
+++ /dev/null
@@ -1,4 +0,0 @@
-USER_NAME := drashna
-SRC += ../drashna/keymap.c
-
-include $(KEYBOARD_PATH_1)/keymaps/drashna/rules.mk
diff --git a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/pmw3360.h b/keyboards/handwired/dactyl_manuform/5x6_right_trackball/pmw3360.h
deleted file mode 100644
index c1d5e3badb..0000000000
--- a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/pmw3360.h
+++ /dev/null
@@ -1,103 +0,0 @@
-/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
- * Copyright 2019 Sunjun Kim
- * Copyright 2020 Ploopy Corporation
- *
- * 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 <http://www.gnu.org/licenses/>.
- */
-
-#pragma once
-
-#include "spi_master.h"
-
-// Registers
-#define REG_Product_ID 0x00
-#define REG_Revision_ID 0x01
-#define REG_Motion 0x02
-#define REG_Delta_X_L 0x03
-#define REG_Delta_X_H 0x04
-#define REG_Delta_Y_L 0x05
-#define REG_Delta_Y_H 0x06
-#define REG_SQUAL 0x07
-#define REG_Raw_Data_Sum 0x08
-#define REG_Maximum_Raw_data 0x09
-#define REG_Minimum_Raw_data 0x0A
-#define REG_Shutter_Lower 0x0B
-#define REG_Shutter_Upper 0x0C
-#define REG_Control 0x0D
-#define REG_Config1 0x0F
-#define REG_Config2 0x10
-#define REG_Angle_Tune 0x11
-#define REG_Frame_Capture 0x12
-#define REG_SROM_Enable 0x13
-#define REG_Run_Downshift 0x14
-#define REG_Rest1_Rate_Lower 0x15
-#define REG_Rest1_Rate_Upper 0x16
-#define REG_Rest1_Downshift 0x17
-#define REG_Rest2_Rate_Lower 0x18
-#define REG_Rest2_Rate_Upper 0x19
-#define REG_Rest2_Downshift 0x1A
-#define REG_Rest3_Rate_Lower 0x1B
-#define REG_Rest3_Rate_Upper 0x1C
-#define REG_Observation 0x24
-#define REG_Data_Out_Lower 0x25
-#define REG_Data_Out_Upper 0x26
-#define REG_Raw_Data_Dump 0x29
-#define REG_SROM_ID 0x2A
-#define REG_Min_SQ_Run 0x2B
-#define REG_Raw_Data_Threshold 0x2C
-#define REG_Config5 0x2F
-#define REG_Power_Up_Reset 0x3A
-#define REG_Shutdown 0x3B
-#define REG_Inverse_Product_ID 0x3F
-#define REG_LiftCutoff_Tune3 0x41
-#define REG_Angle_Snap 0x42
-#define REG_LiftCutoff_Tune1 0x4A
-#define REG_Motion_Burst 0x50
-#define REG_LiftCutoff_Tune_Timeout 0x58
-#define REG_LiftCutoff_Tune_Min_Length 0x5A
-#define REG_SROM_Load_Burst 0x62
-#define REG_Lift_Config 0x63
-#define REG_Raw_Data_Burst 0x64
-#define REG_LiftCutoff_Tune2 0x65
-
-#ifdef CONSOLE_ENABLE
-void print_byte(uint8_t byte);
-#endif
-
-typedef struct {
- int8_t motion;
- bool isMotion; // True if a motion is detected.
- bool isOnSurface; // True when a chip is on a surface
- int16_t dx; // displacement on x directions. Unit: Count. (CPI * Count = Inch value)
- int8_t mdx;
- int16_t dy; // displacement on y directions.
- int8_t mdy;
-} report_pmw_t;
-
-
-
-bool spi_start_adv(void);
-void spi_stop_adv(void);
-spi_status_t spi_write_adv(uint8_t reg_addr, uint8_t data);
-uint8_t spi_read_adv(uint8_t reg_addr);
-bool pmw_spi_init(void);
-void pmw_set_cpi(uint16_t cpi);
-void pmw_upload_firmware(void);
-bool pmw_check_signature(void);
-report_pmw_t pmw_read_burst(void);
-
-
-#define degToRad(angleInDegrees) ((angleInDegrees)*M_PI / 180.0)
-#define radToDeg(angleInRadians) ((angleInRadians)*180.0 / M_PI)
-#define constrain(amt, low, high) ((amt) < (low) ? (low) : ((amt) > (high) ? (high) : (amt)))
diff --git a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/pointer_transport.c b/keyboards/handwired/dactyl_manuform/5x6_right_trackball/pointer_transport.c
deleted file mode 100644
index 1a9aeb2e32..0000000000
--- a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/pointer_transport.c
+++ /dev/null
@@ -1,616 +0,0 @@
-/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
- *
- * 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 <http://www.gnu.org/licenses/>.
- */
-
-#include <string.h>
-#include <stddef.h>
-
-#include "matrix.h"
-#include QMK_KEYBOARD_H
-
-#define ROWS_PER_HAND (MATRIX_ROWS / 2)
-#define SYNC_TIMER_OFFSET 2
-
-#ifdef RGBLIGHT_ENABLE
-# include "rgblight.h"
-#endif
-
-#ifdef BACKLIGHT_ENABLE
-# include "backlight.h"
-#endif
-
-#ifdef ENCODER_ENABLE
-# include "encoder.h"
-static pin_t encoders_pad[] = ENCODERS_PAD_A;
-# define NUMBER_OF_ENCODERS (sizeof(encoders_pad) / sizeof(pin_t))
-#endif
-
-#if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
-# include "led_matrix.h"
-#endif
-#if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
-# include "rgb_matrix.h"
-#endif
-
-#ifdef POINTING_DEVICE_ENABLE
-static uint16_t device_cpi = 0;
-static int8_t split_mouse_x = 0, split_mouse_y = 0;
-#endif
-
-#ifdef OLED_DRIVER_ENABLE
-# include "oled_driver.h"
-#endif
-
-#if defined(USE_I2C)
-
-# include "i2c_master.h"
-# include "i2c_slave.h"
-
-typedef struct _I2C_slave_buffer_t {
-# ifndef DISABLE_SYNC_TIMER
- uint32_t sync_timer;
-# endif
-# ifdef SPLIT_TRANSPORT_MIRROR
- matrix_row_t mmatrix[ROWS_PER_HAND];
-# endif
- matrix_row_t smatrix[ROWS_PER_HAND];
-# ifdef SPLIT_MODS_ENABLE
- uint8_t real_mods;
- uint8_t weak_mods;
-# ifndef NO_ACTION_ONESHOT
- uint8_t oneshot_mods;
-# endif
-# endif
-# ifdef BACKLIGHT_ENABLE
- uint8_t backlight_level;
-# endif
-# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT)
- rgblight_syncinfo_t rgblight_sync;
-# endif
-# ifdef ENCODER_ENABLE
- uint8_t encoder_state[NUMBER_OF_ENCODERS];
-# endif
-# ifdef WPM_ENABLE
- uint8_t current_wpm;
-# endif
- int8_t mouse_x;
- int8_t mouse_y;
- uint16_t device_cpi;
- bool oled_on;
- layer_state_t t_layer_state;
- layer_state_t t_default_layer_state;
-# if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
- led_eeconfig_t led_matrix;
- bool led_suspend_state;
-# endif
-# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
- rgb_config_t rgb_matrix;
- bool rgb_suspend_state;
-# endif
-} __attribute__((packed)) I2C_slave_buffer_t;
-
-static I2C_slave_buffer_t *const i2c_buffer = (I2C_slave_buffer_t *)i2c_slave_reg;
-
-# define I2C_BACKLIGHT_START offsetof(I2C_slave_buffer_t, backlight_level)
-# define I2C_RGB_START offsetof(I2C_slave_buffer_t, rgblight_sync)
-# define I2C_KEYMAP_MASTER_START offsetof(I2C_slave_buffer_t, mmatrix)
-# define I2C_KEYMAP_SLAVE_START offsetof(I2C_slave_buffer_t, smatrix)
-# define I2C_SYNC_TIME_START offsetof(I2C_slave_buffer_t, sync_timer)
-# define I2C_REAL_MODS_START offsetof(I2C_slave_buffer_t, real_mods)
-# define I2C_WEAK_MODS_START offsetof(I2C_slave_buffer_t, weak_mods)
-# define I2C_ONESHOT_MODS_START offsetof(I2C_slave_buffer_t, oneshot_mods)
-# define I2C_ENCODER_START offsetof(I2C_slave_buffer_t, encoder_state)
-# define I2C_WPM_START offsetof(I2C_slave_buffer_t, current_wpm)
-# define I2C_MOUSE_X_START offsetof(I2C_slave_buffer_t, mouse_x)
-# define I2C_MOUSE_Y_START offsetof(I2C_slave_buffer_t, mouse_y)
-# define I2C_MOUSE_DPI_START offsetof(I2C_slave_buffer_t, device_cpi)
-# define I2C_OLED_ON_START offsetof(I2C_slave_buffer_t, oled_on)
-# define I2C_LAYER_STATE_START offsetof(I2C_slave_buffer_t, t_layer_state)
-# define I2C_DEFAULT_LAYER_STATE_START offsetof(I2C_slave_buffer_t, t_default_layer_state)
-# define I2C_LED_MATRIX_START offsetof(I2C_slave_buffer_t, led_matrix)
-# define I2C_LED_SUSPEND_START offsetof(I2C_slave_buffer_t, led_suspend_state)
-# define I2C_RGB_MATRIX_START offsetof(I2C_slave_buffer_t, rgb_matrix)
-# define I2C_RGB_SUSPEND_START offsetof(I2C_slave_buffer_t, rgb_suspend_state)
-
-# define TIMEOUT 100
-
-# ifndef SLAVE_I2C_ADDRESS
-# define SLAVE_I2C_ADDRESS 0x32
-# endif
-
-// Get rows from other half over i2c
-bool transport_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) {
- i2c_readReg(SLAVE_I2C_ADDRESS, I2C_KEYMAP_SLAVE_START, (void *)slave_matrix, sizeof(i2c_buffer->smatrix), TIMEOUT);
-# ifdef SPLIT_TRANSPORT_MIRROR
- i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_KEYMAP_MASTER_START, (void *)master_matrix, sizeof(i2c_buffer->mmatrix), TIMEOUT);
-# endif
- // write backlight info
-# ifdef BACKLIGHT_ENABLE
- uint8_t level = is_backlight_enabled() ? get_backlight_level() : 0;
- if (level != i2c_buffer->backlight_level) {
- if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_BACKLIGHT_START, (void *)&level, sizeof(level), TIMEOUT) >= 0) {
- i2c_buffer->backlight_level = level;
- }
- }
-# endif
-
-# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT)
- if (rgblight_get_change_flags()) {
- rgblight_syncinfo_t rgblight_sync;
- rgblight_get_syncinfo(&rgblight_sync);
- if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_RGB_START, (void *)&rgblight_sync, sizeof(rgblight_sync), TIMEOUT) >= 0) {
- rgblight_clear_change_flags();
- }
- }
-# endif
-
-# ifdef ENCODER_ENABLE
- i2c_readReg(SLAVE_I2C_ADDRESS, I2C_ENCODER_START, (void *)i2c_buffer->encoder_state, sizeof(i2c_buffer->encoder_state), TIMEOUT);
- encoder_update_raw(i2c_buffer->encoder_state);
-# endif
-
-# ifdef WPM_ENABLE
- uint8_t current_wpm = get_current_wpm();
- if (current_wpm != i2c_buffer->current_wpm) {
- if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_WPM_START, (void *)&current_wpm, sizeof(current_wpm), TIMEOUT) >= 0) {
- i2c_buffer->current_wpm = current_wpm;
- }
- }
-# endif
-
-# ifdef POINTING_DEVICE_ENABLE
- if (is_keyboard_left()) {
- report_mouse_t temp_report = pointing_device_get_report();
- i2c_readReg(SLAVE_I2C_ADDRESS, I2C_MOUSE_X_START, (void *)&i2c_buffer->mouse_x, sizeof(i2c_buffer->mouse_x), TIMEOUT);
- temp_report.x = i2c_buffer->mouse_x;
- i2c_readReg(SLAVE_I2C_ADDRESS, I2C_MOUSE_Y_START, (void *)&i2c_buffer->mouse_y, sizeof(i2c_buffer->mouse_y), TIMEOUT);
- temp_report.y = i2c_buffer->mouse_y;
- pointing_device_set_report(temp_report);
-
- if (device_cpi != i2c_buffer->device_cpi) {
- if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_MOUSE_DPI_START, (void *)&device_cpi, sizeof(device_cpi), TIMEOUT) >= 0) {
- i2c_buffer->device_cpi = device_cpi
- }
- }
- }
-# endif
-
-# ifdef SPLIT_MODS_ENABLE
- uint8_t real_mods = get_mods();
- if (real_mods != i2c_buffer->real_mods) {
- if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_REAL_MODS_START, (void *)&real_mods, sizeof(real_mods), TIMEOUT) >= 0) {
- i2c_buffer->real_mods = real_mods;
- }
- }
-
- uint8_t weak_mods = get_weak_mods();
- if (weak_mods != i2c_buffer->weak_mods) {
- if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_WEAK_MODS_START, (void *)&weak_mods, sizeof(weak_mods), TIMEOUT) >= 0) {
- i2c_buffer->weak_mods = weak_mods;
- }
- }
-
-# ifndef NO_ACTION_ONESHOT
- uint8_t oneshot_mods = get_oneshot_mods();
- if (oneshot_mods != i2c_buffer->oneshot_mods) {
- if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_ONESHOT_MODS_START, (void *)&oneshot_mods, sizeof(oneshot_mods), TIMEOUT) >= 0) {
- i2c_buffer->oneshot_mods = oneshot_mods;
- }
- }
-# endif
-# endif
-
- if (layer_state != i2c_buffer->t_layer_state) {
- if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_LAYER_STATE_START, (void *)&layer_state, sizeof(layer_state), TIMEOUT) >= 0) {
- i2c_buffer->t_layer_state = layer_state;
- }
- }
-
- if (default_layer_state != i2c_buffer->t_default_layer_state) {
- if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_DEFAULT_LAYER_STATE_START, (void *)&default_layer_state, sizeof(default_layer_state), TIMEOUT) >= 0) {
- i2c_buffer->t_default_layer_state = default_layer_state;
- }
- }
-
-# ifdef OLED_DRIVER_ENABLE
- bool is_oled_on = is_oled_on();
- if (is_oled_on != i2c_buffer->oled_on) {
- if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_LAYER_STATE_START, (void *)&is_oled_on, sizeof(is_oled_on), TIMEOUT) >= 0) {
- i2c_buffer->oled_on = is_oled_on;
- }
- }
-# endif
-
-# if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
- i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_LED_MATRIX_START, (void *)led_matrix_eeconfig, sizeof(i2c_buffer->led_matrix), TIMEOUT);
- bool suspend_state = led_matrix_get_suspend_state();
- i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_LED_SUSPEND_START, (void *)suspend_state, sizeof(i2c_buffer->led_suspend_state), TIMEOUT);
-# endif
-# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
- i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_RGB_MATRIX_START, (void *)rgb_matrix_config, sizeof(i2c_buffer->rgb_matrix), TIMEOUT);
- bool suspend_state = rgb_matrix_get_suspend_state();
- i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_RGB_SUSPEND_START, (void *)suspend_state, sizeof(i2c_buffer->rgb_suspend_state), TIMEOUT);
-# endif
-
-# ifndef DISABLE_SYNC_TIMER
- i2c_buffer->sync_timer = sync_timer_read32() + SYNC_TIMER_OFFSET;
- i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_SYNC_TIME_START, (void *)&i2c_buffer->sync_timer, sizeof(i2c_buffer->sync_timer), TIMEOUT);
-# endif
-
- return true;
-}
-
-void transport_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) {
-# ifndef DISABLE_SYNC_TIMER
- sync_timer_update(i2c_buffer->sync_timer);
-# endif
- // Copy matrix to I2C buffer
- memcpy((void *)i2c_buffer->smatrix, (void *)slave_matrix, sizeof(i2c_buffer->smatrix));
-# ifdef SPLIT_TRANSPORT_MIRROR
- memcpy((void *)master_matrix, (void *)i2c_buffer->mmatrix, sizeof(i2c_buffer->mmatrix));
-# endif
-
-// Read Backlight Info
-# ifdef BACKLIGHT_ENABLE
- backlight_set(i2c_buffer->backlight_level);
-# endif
-
-# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT)
- // Update the RGB with the new data
- if (i2c_buffer->rgblight_sync.status.change_flags != 0) {
- rgblight_update_sync(&i2c_buffer->rgblight_sync, false);
- i2c_buffer->rgblight_sync.status.change_flags = 0;
- }
-# endif
-
-# ifdef ENCODER_ENABLE
- encoder_state_raw(i2c_buffer->encoder_state);
-# endif
-
-# ifdef WPM_ENABLE
- set_current_wpm(i2c_buffer->current_wpm);
-# endif
-
-# ifdef POINTING_DEVICE_ENABLE
- if (!is_keyboard_left()) {
- static uint16_t cpi;
- if (cpi != i2c_buffer->device_cpi) {
- cpi = i2c_buffer->device_cpi;
- pmw_set_cpi(cpi);
- }
- i2c_buffer->mouse_x = split_mouse_x;
- i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_MOUSE_X_START, (void *)&i2c_buffer->mouse_x, sizeof(i2c_buffer->mouse_x), TIMEOUT);
- i2c_buffer->mouse_y = split_mouse_y;
- i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_MOUSE_Y_START, (void *)&i2c_buffer->mouse_y, sizeof(i2c_buffer->mouse_y), TIMEOUT);
- }
-
-# endif
-
-# ifdef SPLIT_MODS_ENABLE
- set_mods(i2c_buffer->real_mods);
- set_weak_mods(i2c_buffer->weak_mods);
-# ifndef NO_ACTION_ONESHOT
- set_oneshot_mods(i2c_buffer->oneshot_mods);
-# endif
-# endif
-
- if (layer_state != i2c_buffer->t_layer_state) {
- layer_state = i2c_buffer->t_layer_state;
- }
- if (default_layer_state != i2c_buffer->t_default_layer_state) {
- default_layer_state = i2c_buffer->t_default_layer_state;
- }
-
-# ifdef OLED_DRIVER_ENABLE
- if (i2c_buffer->oled_on) {
- oled_on();
- } else {
- oled_off();
- }
-# endif
-
-# if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
- memcpy((void *)i2c_buffer->led_matrix, (void *)led_matrix_eeconfig, sizeof(i2c_buffer->led_matrix));
- led_matrix_set_suspend_state(i2c_buffer->led_suspend_state);
-# endif
-# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
- memcpy((void *)i2c_buffer->rgb_matrix, (void *)rgb_matrix_config, sizeof(i2c_buffer->rgb_matrix));
- rgb_matrix_set_suspend_state(i2c_buffer->rgb_suspend_state);
-# endif
-}
-
-void transport_master_init(void) { i2c_init(); }
-
-void transport_slave_init(void) { i2c_slave_init(SLAVE_I2C_ADDRESS); }
-
-#else // USE_SERIAL
-
-# include "serial.h"
-
-typedef struct _Serial_s2m_buffer_t {
- // TODO: if MATRIX_COLS > 8 change to uint8_t packed_matrix[] for pack/unpack
- matrix_row_t smatrix[ROWS_PER_HAND];
-# ifdef ENCODER_ENABLE
- uint8_t encoder_state[NUMBER_OF_ENCODERS];
-# endif
- int8_t mouse_x;
- int8_t mouse_y;
-} __attribute__((packed)) Serial_s2m_buffer_t;
-
-typedef struct _Serial_m2s_buffer_t {
-# ifdef SPLIT_MODS_ENABLE
- uint8_t real_mods;
- uint8_t weak_mods;
-# ifndef NO_ACTION_ONESHOT
- uint8_t oneshot_mods;
-# endif
-# endif
-# ifndef DISABLE_SYNC_TIMER
- uint32_t sync_timer;
-# endif
-# ifdef SPLIT_TRANSPORT_MIRROR
- matrix_row_t mmatrix[ROWS_PER_HAND];
-# endif
-# ifdef BACKLIGHT_ENABLE
- uint8_t backlight_level;
-# endif
-# ifdef WPM_ENABLE
- uint8_t current_wpm;
-# endif
- uint16_t device_cpi;
- bool oled_on;
- layer_state_t t_layer_state;
- layer_state_t t_default_layer_state;
-# if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
- led_eeconfig_t led_matrix;
- bool led_suspend_state;
-# endif
-# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
- rgb_config_t rgb_matrix;
- bool rgb_suspend_state;
-# endif
-} __attribute__((packed)) Serial_m2s_buffer_t;
-
-# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT)
-// When MCUs on both sides drive their respective RGB LED chains,
-// it is necessary to synchronize, so it is necessary to communicate RGB
-// information. In that case, define RGBLIGHT_SPLIT with info on the number
-// of LEDs on each half.
-//
-// Otherwise, if the master side MCU drives both sides RGB LED chains,
-// there is no need to communicate.
-
-typedef struct _Serial_rgblight_t {
- rgblight_syncinfo_t rgblight_sync;
-} Serial_rgblight_t;
-
-volatile Serial_rgblight_t serial_rgblight = {};
-uint8_t volatile status_rgblight = 0;
-# endif
-
-volatile Serial_s2m_buffer_t serial_s2m_buffer = {};
-volatile Serial_m2s_buffer_t serial_m2s_buffer = {};
-uint8_t volatile status0 = 0;
-
-enum serial_transaction_id {
- GET_SLAVE_MATRIX = 0,
-# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT)
- PUT_RGBLIGHT,
-# endif
-};
-
-SSTD_t transactions[] = {
- [GET_SLAVE_MATRIX] =
- {
- (uint8_t *)&status0,
- sizeof(serial_m2s_buffer),
- (uint8_t *)&serial_m2s_buffer,
- sizeof(serial_s2m_buffer),
- (uint8_t *)&serial_s2m_buffer,
- },
-# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT)
- [PUT_RGBLIGHT] =
- {
- (uint8_t *)&status_rgblight, sizeof(serial_rgblight), (uint8_t *)&serial_rgblight, 0, NULL // no slave to master transfer
- },
-# endif
-};
-
-void transport_master_init(void) { soft_serial_initiator_init(transactions, TID_LIMIT(transactions)); }
-
-void transport_slave_init(void) { soft_serial_target_init(transactions, TID_LIMIT(transactions)); }
-
-# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT)
-
-// rgblight synchronization information communication.
-
-void transport_rgblight_master(void) {
- if (rgblight_get_change_flags()) {
- rgblight_get_syncinfo((rgblight_syncinfo_t *)&serial_rgblight.rgblight_sync);
- if (soft_serial_transaction(PUT_RGBLIGHT) == TRANSACTION_END) {
- rgblight_clear_change_flags();
- }
- }
-}
-
-void transport_rgblight_slave(void) {
- if (status_rgblight == TRANSACTION_ACCEPTED) {
- rgblight_update_sync((rgblight_syncinfo_t *)&serial_rgblight.rgblight_sync, false);
- status_rgblight = TRANSACTION_END;
- }
-}
-
-# else
-# define transport_rgblight_master()
-# define transport_rgblight_slave()
-# endif
-
-bool transport_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) {
-# ifndef SERIAL_USE_MULTI_TRANSACTION
- if (soft_serial_transaction() != TRANSACTION_END) {
- return false;
- }
-# else
- transport_rgblight_master();
- if (soft_serial_transaction(GET_SLAVE_MATRIX) != TRANSACTION_END) {
- return false;
- }
-# endif
-
- // TODO: if MATRIX_COLS > 8 change to unpack()
- for (int i = 0; i < ROWS_PER_HAND; ++i) {
- slave_matrix[i] = serial_s2m_buffer.smatrix[i];
-# ifdef SPLIT_TRANSPORT_MIRROR
- serial_m2s_buffer.mmatrix[i] = master_matrix[i];
-# endif
- }
-
-# ifdef BACKLIGHT_ENABLE
- // Write backlight level for slave to read
- serial_m2s_buffer.backlight_level = is_backlight_enabled() ? get_backlight_level() : 0;
-# endif
-
-# ifdef ENCODER_ENABLE
- encoder_update_raw((uint8_t *)serial_s2m_buffer.encoder_state);
-# endif
-
-# ifdef WPM_ENABLE
- // Write wpm to slave
- serial_m2s_buffer.current_wpm = get_current_wpm();
-# endif
-
-# ifdef SPLIT_MODS_ENABLE
- serial_m2s_buffer.real_mods = get_mods();
- serial_m2s_buffer.weak_mods = get_weak_mods();
-# ifndef NO_ACTION_ONESHOT
- serial_m2s_buffer.oneshot_mods = get_oneshot_mods();
-# endif
-# endif
-
-# ifdef POINTING_DEVICE_ENABLE
- if (is_keyboard_left()) {
- report_mouse_t temp_report = pointing_device_get_report();
- temp_report.x = serial_s2m_buffer.mouse_x;
- temp_report.y = serial_s2m_buffer.mouse_y;
- pointing_device_set_report(temp_report);
- serial_m2s_buffer.device_cpi = device_cpi;
- }
-# endif
-
- serial_m2s_buffer.t_layer_state = layer_state;
- serial_m2s_buffer.t_default_layer_state = default_layer_state;
-# ifdef OLED_DRIVER_ENABLE
- serial_m2s_buffer.oled_on = is_oled_on();
-# endif
-
-# if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
- serial_m2s_buffer.led_matrix = led_matrix_eeconfig;
- serial_m2s_buffer.led_suspend_state = led_matrix_get_suspend_state();
-# endif
-# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
- serial_m2s_buffer.rgb_matrix = rgb_matrix_config;
- serial_m2s_buffer.rgb_suspend_state = rgb_matrix_get_suspend_state();
-# endif
-# ifndef DISABLE_SYNC_TIMER
- serial_m2s_buffer.sync_timer = sync_timer_read32() + SYNC_TIMER_OFFSET;
-# endif
- return true;
-}
-
-void transport_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) {
- transport_rgblight_slave();
-# ifndef DISABLE_SYNC_TIMER
- sync_timer_update(serial_m2s_buffer.sync_timer);
-# endif
-
- // TODO: if MATRIX_COLS > 8 change to pack()
- for (int i = 0; i < ROWS_PER_HAND; ++i) {
- serial_s2m_buffer.smatrix[i] = slave_matrix[i];
-# ifdef SPLIT_TRANSPORT_MIRROR
- master_matrix[i] = serial_m2s_buffer.mmatrix[i];
-# endif
- }
-
-# ifdef BACKLIGHT_ENABLE
- backlight_set(serial_m2s_buffer.backlight_level);
-# endif
-
-# ifdef ENCODER_ENABLE
- encoder_state_raw((uint8_t *)serial_s2m_buffer.encoder_state);
-# endif
-
-# ifdef WPM_ENABLE
- set_current_wpm(serial_m2s_buffer.current_wpm);
-# endif
-
-# ifdef SPLIT_MODS_ENABLE
- set_mods(serial_m2s_buffer.real_mods);
- set_weak_mods(serial_m2s_buffer.weak_mods);
-# ifndef NO_ACTION_ONESHOT
- set_oneshot_mods(serial_m2s_buffer.oneshot_mods);
-# endif
-# endif
-
-# ifdef POINTING_DEVICE_ENABLE
- if (!is_keyboard_left()) {
- static uint16_t cpi;
- if (cpi != serial_m2s_buffer.device_cpi) {
- cpi = serial_m2s_buffer.device_cpi;
- pmw_set_cpi(cpi);
- }
- serial_s2m_buffer.mouse_x = split_mouse_x;
- serial_s2m_buffer.mouse_y = split_mouse_y;
- }
-# endif
-
- if (layer_state != serial_m2s_buffer.t_layer_state) {
- layer_state = serial_m2s_buffer.t_layer_state;
- }
- if (default_layer_state != serial_m2s_buffer.t_default_layer_state) {
- default_layer_state = serial_m2s_buffer.t_default_layer_state;
- }
-# ifdef OLED_DRIVER_ENABLE
- if (serial_m2s_buffer.oled_on) {
- oled_on();
- } else {
- oled_off();
- }
-# endif
-
-# if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
- led_matrix_eeconfig = serial_m2s_buffer.led_matrix;
- led_matrix_set_suspend_state(serial_m2s_buffer.led_suspend_state);
-# endif
-# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
- rgb_matrix_config = serial_m2s_buffer.rgb_matrix;
- rgb_matrix_set_suspend_state(serial_m2s_buffer.rgb_suspend_state);
-# endif
-}
-
-#endif
-
-#ifdef POINTING_DEVICE_ENABLE
-void master_mouse_send(int8_t x, int8_t y) {
- split_mouse_x = x;
- split_mouse_y = y;
-}
-void trackball_set_cpi(uint16_t cpi) {
- if (!is_keyboard_left()) {
- pmw_set_cpi(cpi);
- } else {
- device_cpi = cpi;
- }
-}
-#endif
diff --git a/keyboards/handwired/dactyl_manuform/dactyl_manuform.h b/keyboards/handwired/dactyl_manuform/dactyl_manuform.h
index 1b6b105ece..f0a7ee2f3b 100644
--- a/keyboards/handwired/dactyl_manuform/dactyl_manuform.h
+++ b/keyboards/handwired/dactyl_manuform/dactyl_manuform.h
@@ -16,8 +16,6 @@
#include "6x6.h"
#elif KEYBOARD_handwired_dactyl_manuform_dmote_62key
#include "62key.h"
-#elif KEYBOARD_handwired_dactyl_manuform_5x6_right_trackball
-# include "5x6_right_trackball.h"
#endif
#include "quantum.h"
diff --git a/keyboards/handwired/frankie_macropad/keymaps/default/config.h b/keyboards/handwired/frankie_macropad/keymaps/default/config.h
new file mode 100644
index 0000000000..dd687cad58
--- /dev/null
+++ b/keyboards/handwired/frankie_macropad/keymaps/default/config.h
@@ -0,0 +1,19 @@
+/* Copyright 2021 QMK
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+
+#define LAYER_STATE_8BIT
diff --git a/keyboards/handwired/frenchdev/keymaps/default/keymap.c b/keyboards/handwired/frenchdev/keymaps/default/keymap.c
index b0713b730c..2ef10ca11f 100644
--- a/keyboards/handwired/frenchdev/keymaps/default/keymap.c
+++ b/keyboards/handwired/frenchdev/keymaps/default/keymap.c
@@ -65,9 +65,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/
[_BASE] = LAYOUT(
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_ESC, BP_DQOT, BP_LGIL, BP_RGIL, BP_LPRN, BP_RPRN, BP_DTRM, BP_DCRC, BP_AT, BP_PLUS, BP_MINS, BP_SLSH, BP_ASTR, KC_BSPC, \
- KC_TAB, BP_B, BP_ECUT, BP_O, BP_P, BP_EGRV, BP_UNDS, BP_EQL, BP_K, BP_V, BP_D, BP_L, BP_J, KC_ENT, \
- BP_GRV, BP_A, BP_U, BP_E, BP_I, BP_F, BP_SCLN, BP_EXLM, BP_C, BP_T, BP_S, BP_R, BP_N, BP_APOS, \
+ KC_ESC, BP_DQUO, BP_LDAQ, BP_RDAQ, BP_LPRN, BP_RPRN, BP_DIAE, BP_DCIR, BP_AT, BP_PLUS, BP_MINS, BP_SLSH, BP_ASTR, KC_BSPC, \
+ KC_TAB, BP_B, BP_EACU, BP_O, BP_P, BP_EGRV, BP_UNDS, BP_EQL, BP_K, BP_V, BP_D, BP_L, BP_J, KC_ENT, \
+ BP_GRV, BP_A, BP_U, BP_E, BP_I, BP_F, BP_SCLN, BP_EXLM, BP_C, BP_T, BP_S, BP_R, BP_N, BP_QUOT, \
M_SF, BP_Z, BP_AGRV, BP_Y, BP_X, KC_RBRC, M_SFS, BP_CBSP, L2INS, L2LOC, BP_CDEL, M_SFS, BP_M, BP_G, KC_UP, BP_H, BP_Q, M_SF, \
KC_LCTL, KC_LGUI, KC_PSLS, BP_DOT, BP_COMM, KC_SPACE,M_L1E, KC_LALT, KC_CAPS, M_L1E, KC_SPACE, KC_LEFT, KC_DOWN, KC_RIGHT,BP_COLN, KC_RCTL, \
//left pedals
@@ -97,9 +97,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/
[_SYMBOLS] = LAYOUT(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
- KC_TRNS, BP_DCUR, BP_PARG, BP_SECT, BP_DGRK, KC_TRNS, BP_TILD, BP_DCAR, BP_LEQL, BP_GEQL, BP_PSMS, BP_OBEL, BP_TIMS, KC_TRNS, \
- KC_TRNS, BP_BSLS, BP_ASTR, BP_LCBR, BP_RCBR, BP_GRV, KC_TRNS, BP_DIFF, BP_HASH, BP_LBRC, BP_RBRC, BP_PERC, BP_PMIL, KC_TRNS, \
- KC_TRNS, BP_EQL, BP_UGRV, BP_LPRN, BP_RPRN, BP_PLUS, BP_COLN, BP_QEST, BP_CCED, BP_LESS, BP_GRTR, BP_AMPR, BP_UNDS, KC_TRNS, \
+ KC_TRNS, BP_CURR, BP_PARA, BP_SECT, BP_DGRK, KC_TRNS, BP_TILD, BP_CARN, BP_LEQL, BP_GEQL, BP_PLMN, BP_DIV, BP_MUL, KC_TRNS, \
+ KC_TRNS, BP_BSLS, BP_ASTR, BP_LCBR, BP_RCBR, BP_GRV, KC_TRNS, BP_NEQL, BP_HASH, BP_LBRC, BP_RBRC, BP_PERC, BP_PERM, KC_TRNS, \
+ KC_TRNS, BP_EQL, BP_UGRV, BP_LPRN, BP_RPRN, BP_PLUS, BP_COLN, BP_QUES, BP_CCED, BP_LABK, BP_RABK, BP_AMPR, BP_UNDS, KC_TRNS, \
KC_TRNS, M_UN, M_CUT, M_CP, M_PS, M_SE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, BP_DLR, BP_EQL, KC_PGUP, BP_PIPE, BP_SLSH, KC_TRNS, \
KC_TRNS, KC_TRNS, BP_BSLS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END, KC_TRNS, KC_TRNS, \
//left pedals
diff --git a/keyboards/handwired/frenchdev/rules.mk b/keyboards/handwired/frenchdev/rules.mk
index abf4e62c4b..a77baaa9a7 100644
--- a/keyboards/handwired/frenchdev/rules.mk
+++ b/keyboards/handwired/frenchdev/rules.mk
@@ -29,7 +29,6 @@ UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
AUDIO_ENABLE = no # Audio output on port C6
RGBLIGHT_ENABLE = no
-API_SYSEX_ENABLE = no
# project specific files
SRC = i2c_master.c \
diff --git a/keyboards/handwired/freoduo/rules.mk b/keyboards/handwired/freoduo/rules.mk
index e3da3753e4..d8923557d6 100644
--- a/keyboards/handwired/freoduo/rules.mk
+++ b/keyboards/handwired/freoduo/rules.mk
@@ -11,7 +11,7 @@ BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
MOUSEKEY_ENABLE = yes # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug
-COMMAND_ENABLE = yes # Commands for debug and configuration
+COMMAND_ENABLE = no # Commands for debug and configuration
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
@@ -21,4 +21,4 @@ RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
BLUETOOTH_ENABLE = no # Enable Bluetooth
AUDIO_ENABLE = no # Audio output
VELOCIKEY_ENABLE = yes
-SPLIT_KEYBOARD = yes \ No newline at end of file
+SPLIT_KEYBOARD = yes
diff --git a/keyboards/handwired/hnah40rgb/config.h b/keyboards/handwired/hnah40rgb/config.h
index e6271738c0..3d558f97fc 100644
--- a/keyboards/handwired/hnah40rgb/config.h
+++ b/keyboards/handwired/hnah40rgb/config.h
@@ -60,7 +60,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-#define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended
+// #define RGB_DISABLE_WHEN_USB_SUSPENDED // 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 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_PINWHEEL // Sets the default mode, if none has been set
diff --git a/keyboards/handwired/jot50/rules.mk b/keyboards/handwired/jot50/rules.mk
index d01dfefa5e..bc18e18601 100644
--- a/keyboards/handwired/jot50/rules.mk
+++ b/keyboards/handwired/jot50/rules.mk
@@ -28,7 +28,6 @@ AUDIO_ENABLE = no # Audio output on port C6
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
-API_SYSEX_ENABLE = no
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
diff --git a/keyboards/handwired/jotanck/rules.mk b/keyboards/handwired/jotanck/rules.mk
index 2a233cccd0..6f9f693f5c 100644
--- a/keyboards/handwired/jotanck/rules.mk
+++ b/keyboards/handwired/jotanck/rules.mk
@@ -28,7 +28,6 @@ AUDIO_ENABLE = no # Audio output on port C6
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
-API_SYSEX_ENABLE = no
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
diff --git a/keyboards/handwired/jotpad16/rules.mk b/keyboards/handwired/jotpad16/rules.mk
index 79c32c5c35..73e87b906c 100644
--- a/keyboards/handwired/jotpad16/rules.mk
+++ b/keyboards/handwired/jotpad16/rules.mk
@@ -28,7 +28,6 @@ AUDIO_ENABLE = no # Audio output on port C6
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
-API_SYSEX_ENABLE = no
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
diff --git a/keyboards/handwired/p1800fl/rules.mk b/keyboards/handwired/p1800fl/rules.mk
deleted file mode 100644
index cde197a0db..0000000000
--- a/keyboards/handwired/p1800fl/rules.mk
+++ /dev/null
@@ -1,30 +0,0 @@
-# MCU name
-MCU = atmega32u4
-
-# Bootloader selection
-# Teensy halfkay
-# Pro Micro caterina
-# Atmel DFU atmel-dfu
-# LUFA DFU lufa-dfu
-# QMK DFU qmk-dfu
-# ATmega32A bootloadHID
-# ATmega328P USBasp
-BOOTLOADER = qmk-dfu
-
-# Build Options
-# change yes to no to disable
-#
-BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration
-MOUSEKEY_ENABLE = yes # Mouse keys
-EXTRAKEY_ENABLE = yes # Audio control and System control
-CONSOLE_ENABLE = yes # Console for debug
-COMMAND_ENABLE = yes # Commands for debug and configuration
-# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
-SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
-# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
-NKRO_ENABLE = yes # USB Nkey Rollover
-BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
-RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
-MIDI_ENABLE = no # MIDI support
-BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
-AUDIO_ENABLE = no # Audio output on port C6
diff --git a/keyboards/handwired/p65rgb/config.h b/keyboards/handwired/p65rgb/config.h
index c50fc2826a..142d3c03ea 100644
--- a/keyboards/handwired/p65rgb/config.h
+++ b/keyboards/handwired/p65rgb/config.h
@@ -40,7 +40,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGB_DI_PIN B4
#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
#define RGB_MATRIX_KEYPRESSES
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
#define RGB_MATRIX_LED_PROCESS_LIMIT 4
diff --git a/keyboards/handwired/promethium/config.h b/keyboards/handwired/promethium/config.h
index ba2c25ea1d..ba7ae9d252 100644
--- a/keyboards/handwired/promethium/config.h
+++ b/keyboards/handwired/promethium/config.h
@@ -31,7 +31,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* key matrix size */
#define MATRIX_COLS 6
-#define MATRIX_ROWS 9
+#define MATRIX_ROWS 3
/* default pin-out */
#define MATRIX_COL_PINS { F4, F1, F0, D6, D0, D1 }
diff --git a/keyboards/handwired/promethium/rules.mk b/keyboards/handwired/promethium/rules.mk
index 4b96e2f691..52caf4b594 100644
--- a/keyboards/handwired/promethium/rules.mk
+++ b/keyboards/handwired/promethium/rules.mk
@@ -33,7 +33,6 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
PS2_MOUSE_ENABLE = yes
PS2_USE_INT = yes
-API_SYSEX_ENABLE = no
CUSTOM_MATRIX = yes
BLUETOOTH = AdafruitBLE
diff --git a/keyboards/handwired/reddot/keymaps/default/keymap.c b/keyboards/handwired/reddot/keymaps/default/keymap.c
index 246a03b4d7..9ac394f7f7 100644
--- a/keyboards/handwired/reddot/keymaps/default/keymap.c
+++ b/keyboards/handwired/reddot/keymaps/default/keymap.c
@@ -5,18 +5,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TAB, KC_CAPS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, TG(1), KC_PSLS, KC_PAST, KC_PMNS, \
- KC_LALT, FR_AMP, FR_EACU, FR_QUOT, FR_APOS, FR_LPRN, KC_BSPC, KC_DEL, FR_MINS, FR_EGRV, FR_UNDS, FR_CCED, FR_AGRV, FR_RPRN, FR_EQL, KC_INS, KC_HOME, KC_PGUP, \
+ KC_LALT, FR_AMPR, FR_EACU, FR_DQUO, FR_QUOT, FR_LPRN, KC_BSPC, KC_DEL, FR_MINS, FR_EGRV, FR_UNDS, FR_CCED, FR_AGRV, FR_RPRN, FR_EQL, KC_INS, KC_HOME, KC_PGUP, \
KC_LGUI, FR_A, FR_Z, KC_E, KC_R, KC_T, KC_LSFT, KC_ENT, KC_ENT, KC_Y, KC_U, KC_I, KC_O, KC_P, FR_CIRC, FR_DLR, KC_DEL, KC_END, KC_PGDN, KC_PPLS, \
KC_LCTL, FR_Q, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, FR_M, FR_UGRV, FR_ASTR, KC_P1, KC_UP, KC_P3, \
- FR_LESS, FR_W, KC_X, KC_C, KC_V, KC_B, KC_SPC, KC_SPC, KC_N, FR_COMM, FR_SCLN, FR_COLN, FR_EXLM, KC_ALGR, KC_LEFT, KC_DOWN, KC_RGHT, KC_PENT \
+ FR_LABK, FR_W, KC_X, KC_C, KC_V, KC_B, KC_SPC, KC_SPC, KC_N, FR_COMM, FR_SCLN, FR_COLN, FR_EXLM, KC_ALGR, KC_LEFT, KC_DOWN, KC_RGHT, KC_PENT \
),
[1] = LAYOUT(
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TAB, KC_CAPS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_PSLS, KC_PAST, KC_PMNS, \
- KC_LALT, FR_AMP, FR_EACU, FR_QUOT, FR_APOS, FR_LPRN, KC_BSPC, KC_DEL, FR_MINS, FR_EGRV, FR_UNDS, FR_CCED, FR_AGRV, FR_RPRN, FR_EQL, KC_7, KC_8, KC_9, \
+ KC_LALT, FR_AMPR, FR_EACU, FR_DQUO, FR_QUOT, FR_LPRN, KC_BSPC, KC_DEL, FR_MINS, FR_EGRV, FR_UNDS, FR_CCED, FR_AGRV, FR_RPRN, FR_EQL, KC_7, KC_8, KC_9, \
KC_LGUI, FR_A, FR_Z, KC_E, KC_R, KC_T, KC_LSFT, KC_ENT, KC_ENT, KC_Y, KC_U, KC_I, KC_O, KC_P, FR_CIRC, FR_DLR, KC_4, KC_5, KC_6, KC_PPLS, \
KC_LCTL, FR_Q, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, FR_M, FR_UGRV, FR_ASTR, KC_1, KC_2, KC_3, \
- FR_LESS, FR_W, KC_X, KC_C, KC_V, KC_B, KC_SPC, KC_SPC, KC_N, FR_COMM, FR_SCLN, FR_COLN, FR_EXLM, KC_ALGR, KC_LEFT, KC_DOWN, KC_RGHT, KC_PENT \
+ FR_LABK, FR_W, KC_X, KC_C, KC_V, KC_B, KC_SPC, KC_SPC, KC_N, FR_COMM, FR_SCLN, FR_COLN, FR_EXLM, KC_ALGR, KC_LEFT, KC_DOWN, KC_RGHT, KC_PENT \
),
};
diff --git a/keyboards/handwired/swiftrax/astro65/config.h b/keyboards/handwired/swiftrax/astro65/config.h
index 84cc9b53c5..75ab5ee2f7 100644
--- a/keyboards/handwired/swiftrax/astro65/config.h
+++ b/keyboards/handwired/swiftrax/astro65/config.h
@@ -27,7 +27,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define PRODUCT Astro65
/* key matrix size */
#define MATRIX_ROWS 5
-#define MATRIX_COLS 16
+#define MATRIX_COLS 15
// ROWS: Top to bottom, COLS: Left to right
diff --git a/keyboards/handwired/tractyl_manuform/4x6_right/4x6_right.c b/keyboards/handwired/tractyl_manuform/4x6_right/4x6_right.c
new file mode 100644
index 0000000000..7ea4d97472
--- /dev/null
+++ b/keyboards/handwired/tractyl_manuform/4x6_right/4x6_right.c
@@ -0,0 +1,67 @@
+/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
+#include "4x6_right.h"
+
+#ifdef RGB_MATRIX_ENABLE
+led_config_t g_led_config = { {
+ { 24, 23, 18, 17, 10, 9 },
+ { 25, 22, 19, 16, 11, 8 },
+ { 26, 21, 20, 15, 12, 7 },
+ { NO_LED, NO_LED, NO_LED, 14, 13, 6 },
+ { NO_LED, NO_LED, NO_LED, 14, 13, 6 },
+ { 51, 50, 45, 44, 37, 36 },
+ { 52, 49, 46, 43, 38, 35 },
+ { 53, 48, 47, 42, 39, 34 },
+ { NO_LED, NO_LED, NO_LED, 41, 40, 33 },
+ { NO_LED, NO_LED, NO_LED, 41, 40, 33 }
+}, {
+ { 85, 16 }, { 50, 13 }, { 16, 20 }, { 16, 38 }, { 50, 48 }, { 85, 52 }, { 95, 63 },
+ { 85, 39 }, { 85, 21 }, { 85, 4 }, { 68, 2 }, { 68, 19 }, { 68, 37 }, { 80, 58 },
+ { 60, 55 }, { 50, 35 }, { 50, 13 }, { 50, 0 }, { 33, 3 }, { 33, 20 }, { 33, 37 },
+ { 16, 42 }, { 16, 24 }, { 16, 7 }, { 0, 7 }, { 0, 24 }, { 0, 41 }, { 139, 16 },
+ { 174, 13 }, { 208, 20 }, { 208, 38 }, { 174, 48 }, { 139, 52 }, { 129, 63 }, { 139, 39 },
+ { 139, 21 }, { 139, 4 }, { 156, 2 }, { 156, 19 }, { 156, 37 }, { 144, 58 }, { 164, 55 },
+ { 174, 35 }, { 174, 13 }, { 174, 0 }, { 191, 3 }, { 191, 20 }, { 191, 37 }, { 208, 42 },
+ { 208, 24 }, { 208, 7 }, { 224, 7 }, { 224, 24 }, { 224, 41 }
+}, {
+ 2, 2, 2, 2, 2, 2, 1,
+ 4, 4, 4, 4, 4, 4, 1,
+ 1, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 1, 1, 1, 2,
+ 2, 2, 2, 2, 2, 1, 4,
+ 4, 4, 4, 4, 4, 1, 1,
+ 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 1, 1, 1
+} };
+#endif
+
+#ifdef SWAP_HANDS_ENABLE
+const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
+ /* Left hand, matrix positions */
+ {{5, 5}, {4, 5}, {3, 5}, {2, 5}, {1, 5}, {0, 5}},
+ {{5, 6}, {4, 6}, {3, 6}, {2, 6}, {1, 6}, {0, 6}},
+ {{5, 7}, {4, 7}, {3, 7}, {2, 7}, {1, 7}, {0, 7}},
+ {{5, 8}, {4, 8}, {3, 8}, {2, 8}, {1, 8}, {0, 8}},
+ {{5, 9}, {4, 9}, {3, 9}, {2, 9}, {1, 9}, {0, 9}},
+ /* Right hand, matrix positions */
+ {{5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0}},
+ {{5, 1}, {4, 1}, {3, 1}, {2, 1}, {1, 1}, {0, 1}},
+ {{5, 2}, {4, 2}, {3, 2}, {2, 2}, {1, 2}, {0, 2}},
+ {{5, 3}, {4, 3}, {3, 3}, {2, 3}, {1, 3}, {0, 3}},
+ {{5, 4}, {4, 4}, {3, 4}, {2, 4}, {1, 4}, {0, 4}}
+};
+#endif
diff --git a/keyboards/handwired/tractyl_manuform/4x6_right/4x6_right.h b/keyboards/handwired/tractyl_manuform/4x6_right/4x6_right.h
new file mode 100644
index 0000000000..66b5880785
--- /dev/null
+++ b/keyboards/handwired/tractyl_manuform/4x6_right/4x6_right.h
@@ -0,0 +1,47 @@
+/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+
+#include "tractyl_manuform.h"
+#include "quantum.h"
+
+#define ___ KC_NO
+
+// clang-format off
+#define LAYOUT_4x6_right(\
+ L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
+ L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
+ L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
+ L32, L33, R32, R33, \
+ L34, L35, R31, \
+ L44, L45, R41, \
+ L42, L43, R42, R43 \
+ ) \
+ { \
+ { L00, L01, L02, L03, L04, L05 }, \
+ { L10, L11, L12, L13, L14, L15 }, \
+ { L20, L21, L22, L23, L24, L25 }, \
+ { ___, ___, L32, L33, L34, L35 }, \
+ { ___, ___, L42, L43, L44, L45 }, \
+ \
+ { R00, R01, R02, R03, R04, R05 }, \
+ { R10, R11, R12, R13, R14, R15 }, \
+ { R20, R21, R22, R23, R24, R25 }, \
+ { ___, R31, R32, R33, ___, ___ }, \
+ { ___, R41, R42, R43, ___, ___ } \
+}
+// clang-format on
diff --git a/keyboards/handwired/tractyl_manuform/4x6_right/config.h b/keyboards/handwired/tractyl_manuform/4x6_right/config.h
new file mode 100644
index 0000000000..05a1c5f3be
--- /dev/null
+++ b/keyboards/handwired/tractyl_manuform/4x6_right/config.h
@@ -0,0 +1,91 @@
+/*
+Copyright 2012 Jun Wako <wakojun@gmail.com>
+Copyright 2015 Jack Humbert
+
+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 <http://www.gnu.org/licenses/>.
+*/
+
+#pragma once
+
+#include "config_common.h"
+
+#define PRODUCT_ID 0x3537
+#define DEVICE_VER 0x0001
+#define PRODUCT Tractyl Manuform(4x6)
+
+/* key matrix size */
+// Rows are doubled-up
+#define MATRIX_ROWS 10
+#define MATRIX_COLS 6
+
+// wiring of each half
+#define MATRIX_COL_PINS { C0, C1, C2, C3, C4, C5 }
+#define MATRIX_ROW_PINS { A0, A1, A2, A3, A4 }
+
+#define DIODE_DIRECTION COL2ROW
+
+// WS2812 RGB LED strip input and number of LEDs
+#define RGB_DI_PIN E7
+#define DRIVER_LED_TOTAL 62
+#define RGB_MATRIX_SPLIT { 32, 30 }
+#define RGB_DISABLE_WHEN_USB_SUSPENDED true
+#define RGB_MATRIX_KEYPRESSES
+// #define RGB_MATRIX_KEYRELEASES
+#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
+#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 80
+
+#define SPLIT_TRANSPORT_MIRROR
+#define SPLIT_HAND_PIN A6
+
+
+/* define if matrix has ghost */
+//#define MATRIX_HAS_GHOST
+
+/* number of backlight levels */
+// #define BACKLIGHT_LEVELS 3
+
+// #define DEBUG_LED_PIN D6
+
+#define ROTATIONAL_TRANSFORM_ANGLE -25
+
+/* Bootmagic Lite key configuration */
+#define BOOTMAGIC_LITE_ROW 0
+#define BOOTMAGIC_LITE_COLUMN 0
+#define BOOTMAGIC_LITE_ROW_RIGHT 4
+#define BOOTMAGIC_LITE_COLUMN_RIGHT 5
+
+#define AUDIO_PIN C6
+#define AUDIO_PIN_ALT B7
+
+#define DYNAMIC_KEYMAP_EEPROM_MAX_ADDR 4095
+#define DYNAMIC_KEYMAP_LAYER_COUNT 16
+#define LAYER_STATE_16BIT
+
+/* serial.c configuration for split keyboard */
+#define SOFT_SERIAL_PIN D3
+#define EE_HANDS
+
+
+/* Set 0 if debouncing isn't needed */
+#define DEBOUNCE 5
+
+/* disable action features */
+//#define NO_ACTION_LAYER
+//#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
+#define NO_ACTION_MACRO
+#define NO_ACTION_FUNCTION
+
+#define SERIAL_USE_MULTI_TRANSACTION
+#define SPLIT_TRANSACTION_IDS_KB RPC_ID_STATE_SYNC, RPC_ID_SLAVE_STATE
diff --git a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/info.json b/keyboards/handwired/tractyl_manuform/4x6_right/info.json
index 8a413ec44f..03a570730f 100644
--- a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/info.json
+++ b/keyboards/handwired/tractyl_manuform/4x6_right/info.json
@@ -1,11 +1,11 @@
{
- "keyboard_name": "Dactyl Manuform 5x6",
+ "keyboard_name": "Tractyl Manuform 4x6",
"url": "",
- "maintainer": "qmk",
+ "maintainer": "drashna",
"width": 17,
"height": 8,
"layouts": {
- "LAYOUT_5x6_right_trackball": {
+ "LAYOUT_5x6_right": {
"layout": [
{"label":"L00", "x":0, "y":0},
{"label":"L01", "x":1, "y":0},
diff --git a/keyboards/handwired/tractyl_manuform/4x6_right/keymaps/default/keymap.c b/keyboards/handwired/tractyl_manuform/4x6_right/keymaps/default/keymap.c
new file mode 100644
index 0000000000..d79f60b12c
--- /dev/null
+++ b/keyboards/handwired/tractyl_manuform/4x6_right/keymaps/default/keymap.c
@@ -0,0 +1,62 @@
+/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
+#include QMK_KEYBOARD_H
+
+enum custom_layers {
+ _QWERTY,
+ _LOWER,
+ _RAISE,
+};
+
+#define RAISE MO(_RAISE)
+#define LOWER MO(_LOWER)
+
+#define RAISE MO(_RAISE)
+#define LOWER MO(_LOWER)
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+[_QWERTY] = LAYOUT_4x6_right(
+ KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS,
+ KC_TAB, 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_BSLASH,
+ KC_LBRC,KC_RBRC, KC_PLUS, KC_EQL,
+ RAISE, KC_SPC, LOWER,
+ KC_TAB, KC_HOME, KC_ENT,
+ KC_BSPC,KC_GRV, KC_LGUI,KC_DEL
+),
+
+[_LOWER] = LAYOUT_4x6_right(
+ _______,_______,_______,_______,_______,KC_LBRC, KC_RBRC, KC_P7, KC_P8, KC_P9, RESET, KC_PLUS,
+ _______,KC_HOME,KC_PGUP,KC_PGDN,KC_END ,KC_LPRN, KC_RPRN, KC_P4, KC_P5, KC_P6, KC_MINS,KC_PIPE,
+ _______,_______,_______,_______,_______,_______, _______, KC_P1, KC_P2, KC_P3, KC_EQL, KC_UNDS,
+ _______,KC_PSCR, _______, KC_P0,
+ _______,_______, _______,
+ _______,_______, _______,
+ _______,_______, _______,_______
+),
+
+[_RAISE] = LAYOUT_4x6_right(
+ _______,RESET, _______,_______,_______,KC_LBRC, KC_RBRC,_______,KC_NLCK,KC_INS, KC_SLCK,KC_MUTE,
+ _______,KC_LEFT,KC_UP ,KC_DOWN,KC_RGHT,KC_LPRN, KC_RPRN,KC_MPRV,KC_MPLY,KC_MNXT,_______,KC_VOLU,
+ _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,KC_VOLD,
+ _______,_______, KC_EQL ,_______,
+ _______,_______, _______,
+ _______,_______, _______,
+ _______,_______, _______,_______
+),
+};
diff --git a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/drashna/config.h b/keyboards/handwired/tractyl_manuform/4x6_right/keymaps/drashna/config.h
index dedd1f5fe2..21bc8e616a 100644
--- a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/drashna/config.h
+++ b/keyboards/handwired/tractyl_manuform/4x6_right/keymaps/drashna/config.h
@@ -17,13 +17,12 @@
#pragma once
// #define USE_I2C
-#define SELECT_SOFT_SERIAL_SPEED 0
+// #define SELECT_SOFT_SERIAL_SPEED 1
// #define SERIAL_USE_MULTI_TRANSACTION
#define SPLIT_MODS_ENABLE
#define EE_HANDS
-#define TRACKBALL_DPI_OPTIONS \
- { 1200, 1800, 2600, 3400 }
+#define TRACKBALL_DPI_OPTIONS { 1200, 1800, 2600, 3400 }
#define RGBLIGHT_MAX_BRIGHTNESS 60
@@ -35,5 +34,3 @@
#define OLED_DISPLAY_128X64
#define OLED_BRIGHTNESS 50
-
-#define MK_KINETIC_SPEED
diff --git a/keyboards/handwired/tractyl_manuform/4x6_right/keymaps/drashna/keymap.c b/keyboards/handwired/tractyl_manuform/4x6_right/keymaps/drashna/keymap.c
new file mode 100644
index 0000000000..7e3c356bd9
--- /dev/null
+++ b/keyboards/handwired/tractyl_manuform/4x6_right/keymaps/drashna/keymap.c
@@ -0,0 +1,243 @@
+/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
+#include "drashna.h"
+
+// clang-format off
+#define LAYOUT_4x6_right_wrapper(...) LAYOUT_4x6_right(__VA_ARGS__)
+#define LAYOUT_4x6_right_base( \
+ K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \
+ K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \
+ K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \
+ ) \
+ LAYOUT_4x6_right_wrapper( \
+ SH_TT, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, SH_TT, \
+ LALT_T(KC_TAB), K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(K1B), \
+ OS_LSFT, CTL_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \
+ OS_LGUI, OS_LALT, OS_RGUI, OS_RALT, \
+ KC_PSCR, KC_GRV, MEH_T(KC_BTN3), \
+ KC_SPC, OS_LGUI, KC_ENT, \
+ BK_LWER, TT(_MOUSE), TT(_MOUSE), DL_RAIS \
+ )
+#define LAYOUT_4x6_right_base_wrapper(...) LAYOUT_4x6_right_base(__VA_ARGS__)
+
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [_QWERTY] = LAYOUT_4x6_right_base_wrapper(
+ _________________QWERTY_L1_________________, _________________QWERTY_R1_________________,
+ _________________QWERTY_L2_________________, _________________QWERTY_R2_________________,
+ _________________QWERTY_L3_________________, _________________QWERTY_R3_________________
+ ),
+
+ [_COLEMAK] = LAYOUT_4x6_right_base_wrapper(
+ _________________COLEMAK_L1________________, _________________COLEMAK_R1________________,
+ _________________COLEMAK_L2________________, _________________COLEMAK_R2________________,
+ _________________COLEMAK_L3________________, _________________COLEMAK_R3________________
+ ),
+
+ [_DVORAK] = LAYOUT_4x6_right_base_wrapper(
+ _________________DVORAK_L1_________________, _________________DVORAK_R1_________________,
+ _________________DVORAK_L2_________________, _________________DVORAK_R2_________________,
+ _________________DVORAK_L3_________________, _________________DVORAK_R3_________________
+ ),
+
+ [_WORKMAN] = LAYOUT_4x6_right_base_wrapper(
+ _________________WORKMAN_L1________________, _________________WORKMAN_R1________________,
+ _________________WORKMAN_L2________________, _________________WORKMAN_R2________________,
+ _________________WORKMAN_L3________________, _________________WORKMAN_R3________________
+ ),
+
+ [_NORMAN] = LAYOUT_4x6_right_base_wrapper(
+ _________________NORMAN_L1_________________, _________________NORMAN_L1_________________,
+ _________________NORMAN_L2_________________, _________________NORMAN_R2_________________,
+ _________________NORMAN_L3_________________, _________________NORMAN_R3_________________
+ ),
+
+ [_MALTRON] = LAYOUT_4x6_right_base_wrapper(
+ _________________MALTRON_L1________________, _________________MALTRON_R1________________,
+ _________________MALTRON_L2________________, _________________MALTRON_R2________________,
+ _________________MALTRON_L3________________, _________________MALTRON_R3________________
+ ),
+
+ [_EUCALYN] = LAYOUT_4x6_right_base_wrapper(
+ _________________EUCALYN_L1________________, _________________EUCALYN_R1________________,
+ _________________EUCALYN_L2________________, _________________EUCALYN_R2________________,
+ _________________EUCALYN_L3________________, _________________EUCALYN_R3________________
+ ),
+
+ [_CARPLAX] = LAYOUT_4x6_right_base_wrapper(
+ _____________CARPLAX_QFMLWY_L1_____________, _____________CARPLAX_QFMLWY_R1_____________,
+ _____________CARPLAX_QFMLWY_L2_____________, _____________CARPLAX_QFMLWY_R2_____________,
+ _____________CARPLAX_QFMLWY_L3_____________, _____________CARPLAX_QFMLWY_R3_____________
+ ),
+
+ [_MOUSE] = LAYOUT_4x6_right(
+ _______, _______, _______, _______, _______, _______, KC_WH_U, _______, _______, _______, DPI_CONFIG, _______,
+ _______, _______, _______, _______, _______, _______, KC_WH_D, KC_BTN1, KC_BTN3, KC_BTN2, KC_BTN6, _______,
+ _______, _______, _______, _______, _______, _______, KC_BTN7, KC_BTN4, KC_BTN5, KC_BTN8, _______, _______,
+ _______, _______, _______, _______,
+ _______, _______, _______,
+ _______, _______, _______,
+ _______, _______, _______, _______
+ ),
+ [_GAMEPAD] = LAYOUT_4x6_right(
+ KC_F1, KC_K, KC_Q, KC_W, KC_E, KC_R, _______, _______, _______, _______, _______, _______,
+ KC_TAB, KC_G, KC_A, KC_S, KC_D, KC_F, _______, _______, _______, _______, _______, _______,
+ KC_LCTL, KC_LSFT, KC_Z, KC_X, KC_C, KC_H, _______, _______, _______, _______, _______, _______,
+ KC_I, KC_T, TG_GAME, KC_NO,
+ KC_V, KC_O, _______,
+ KC_SPC, KC_P, _______,
+ KC_H, KC_LGUI, _______, _______
+ ),
+ [_DIABLO] = LAYOUT_4x6_right(
+ KC_TAB, KC_S, KC_I, KC_F, KC_M, KC_T, _______, _______, _______, _______, _______, _______,
+ KC_Q, KC_1, KC_2, KC_3, KC_4, KC_G, _______, _______, _______, _______, _______, _______,
+ KC_LCTL, KC_D3_1, KC_D3_2, KC_D3_3, KC_D3_4, KC_Z, _______, _______, _______, _______, _______, _______,
+ KC_F, KC_L, KC_NO, TG_DBLO,
+ KC_DIABLO_CLEAR, KC_F, _______,
+ SFT_T(KC_SPC), KC_J, _______,
+ ALT_T(KC_Q), KC_LGUI, _______, _______
+ ),
+ [_LOWER] = LAYOUT_4x6_right_wrapper(
+ KC_F12, _________________LOWER_L1__________________, _________________LOWER_R1__________________, KC_F11,
+ _______, _________________LOWER_L2__________________, _________________LOWER_R2__________________, KC_PIPE,
+ _______, _________________LOWER_L3__________________, _________________LOWER_R3__________________, _______,
+ _______, _______, _______, _______,
+ _______, _______, _______,
+ _______, _______, _______,
+ _______, _______, _______, _______
+ ),
+ [_RAISE] = LAYOUT_4x6_right_wrapper(
+ KC_F12, _________________RAISE_L1__________________, _________________RAISE_R1__________________, KC_F11,
+ _______, _________________RAISE_L2__________________, _________________RAISE_R2__________________, KC_BSLS,
+ _______, _________________RAISE_L3__________________, _________________RAISE_R3__________________, _______,
+ _______, _______, _______, _______,
+ _______, _______, _______,
+ _______, _______, _______,
+ _______, _______, _______, _______
+ ),
+ [_ADJUST] = LAYOUT_4x6_right_wrapper(
+ KC_MAKE, _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, KC_RST,
+ VRSN, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, EEP_RST,
+ UC_MOD, _________________ADJUST_L3_________________, _________________ADJUST_R3_________________, TG_MODS,
+ HPT_DWLI, HPT_DWLD, TG_GAME, TG_DBLO,
+ HPT_TOG, HPT_BUZ, KC_NUKE,
+ _______, _______, _______,
+ _______, _______, KC_NUKE, _______
+ ),
+};
+// clang-format on
+
+#ifdef POINTING_DEVICE_ENABLE
+static uint16_t mouse_timer = 0;
+static uint16_t mouse_debounce_timer = 0;
+static uint8_t mouse_keycode_tracker = 0;
+bool tap_toggling = false;
+
+void process_mouse_user(report_mouse_t* mouse_report, int16_t x, int16_t y) {
+ if ((x || y) && timer_elapsed(mouse_timer) > 125) {
+ mouse_timer = timer_read();
+ if (!layer_state_is(_MOUSE) && !(layer_state_is(_GAMEPAD) || layer_state_is(_DIABLO)) && timer_elapsed(mouse_debounce_timer) > 125) {
+ layer_on(_MOUSE);
+ }
+ }
+
+# ifdef TAPPING_TERM_PER_KEY
+ if (timer_elapsed(mouse_debounce_timer) > get_tapping_term(KC_BTN1, NULL)
+# else
+ if (timer_elapsed(mouse_debounce_timer) > TAPPING_TERM
+# endif
+ || (layer_state_is(_GAMEPAD) || layer_state_is(_DIABLO))) {
+ mouse_report->x = x;
+ mouse_report->y = y;
+ }
+# ifdef OLED_DRIVER_ENABLE
+ if (x || y) oled_timer = timer_read32();
+# endif
+}
+
+void matrix_scan_keymap(void) {
+ if (timer_elapsed(mouse_timer) > 650 && layer_state_is(_MOUSE) && !mouse_keycode_tracker && !tap_toggling) {
+ layer_off(_MOUSE);
+ }
+ if (tap_toggling) {
+ if (!layer_state_is(_MOUSE)) {
+ layer_on(_MOUSE);
+ }
+ }
+}
+
+bool process_record_keymap(uint16_t keycode, keyrecord_t* record) {
+ switch (keycode) {
+ case TT(_MOUSE): {
+ if (record->event.pressed) {
+ mouse_keycode_tracker++;
+ } else {
+# if TAPPING_TOGGLE != 0
+ if (record->tap.count == TAPPING_TOGGLE) {
+ tap_toggling ^= 1;
+# if TAPPING_TOGGLE == 1
+ if (!tap_toggling) mouse_keycode_tracker -= record->tap.count + 1;
+# else
+ if (!tap_toggling) mouse_keycode_tracker -= record->tap.count;
+# endif
+ } else {
+ mouse_keycode_tracker--;
+ }
+# endif
+ }
+ mouse_timer = timer_read();
+ break;
+ }
+ case MO(_MOUSE):
+ case DPI_CONFIG:
+ case KC_MS_UP ... KC_MS_WH_RIGHT:
+ record->event.pressed ? mouse_keycode_tracker++ : mouse_keycode_tracker--;
+ mouse_timer = timer_read();
+ break;
+ default:
+ if (layer_state_is(_MOUSE) && !mouse_keycode_tracker) {
+ layer_off(_MOUSE);
+ }
+ mouse_keycode_tracker = 0;
+ mouse_debounce_timer = timer_read();
+ break;
+ }
+ return true;
+}
+
+layer_state_t layer_state_set_keymap(layer_state_t state) {
+ if (layer_state_cmp(state, _GAMEPAD) || layer_state_cmp(state, _DIABLO)) {
+ state |= (1UL << _MOUSE);
+ }
+ return state;
+}
+#endif
+
+void matrix_init_keymap(void) {
+#ifdef AUDIO_ENABLE
+ extern audio_config_t audio_config;
+
+ if (!is_keyboard_master()) {
+ audio_stop_all();
+ audio_config.enable = false;
+ }
+#endif
+}
+
+void keyboard_post_init_keymap(void) {
+ matrix_init_keymap();
+}
diff --git a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/drashna/rules.mk b/keyboards/handwired/tractyl_manuform/4x6_right/keymaps/drashna/rules.mk
index 754f0e45de..d658d45bfc 100644
--- a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/drashna/rules.mk
+++ b/keyboards/handwired/tractyl_manuform/4x6_right/keymaps/drashna/rules.mk
@@ -1,6 +1,7 @@
RGBLIGHT_STARTUP_ANIMATION = yes
-COMMAND_ENABLE = no
AUDIO_ENABLE = yes
+HAPTIC_ENABLE = no
+COMMAND_ENABLE = no
TAP_DANCE_ENABLE = yes
UNICODE_ENABLE = yes
OLED_DRIVER_ENABLE = yes
diff --git a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/readme.md b/keyboards/handwired/tractyl_manuform/4x6_right/readme.md
index b6e38dc845..b6e38dc845 100644
--- a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/readme.md
+++ b/keyboards/handwired/tractyl_manuform/4x6_right/readme.md
diff --git a/keyboards/handwired/tractyl_manuform/4x6_right/rules.mk b/keyboards/handwired/tractyl_manuform/4x6_right/rules.mk
new file mode 100644
index 0000000000..6be8a89f6d
--- /dev/null
+++ b/keyboards/handwired/tractyl_manuform/4x6_right/rules.mk
@@ -0,0 +1,33 @@
+# MCU name
+MCU = at90usb1286
+
+# Bootloader selection
+BOOTLOADER = atmel-dfu
+
+# Build Options
+# change yes to no to disable
+#
+BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
+MOUSEKEY_ENABLE = yes # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = no # Console for debug
+COMMAND_ENABLE = no # Commands for debug and configuration
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+NKRO_ENABLE = yes # USB Nkey Rollover
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
+RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
+BLUETOOTH_ENABLE = no # Enable Bluetooth
+AUDIO_ENABLE = no # Audio output
+RGB_MATRIX_ENABLE = no
+RGB_MATRIX_DRIVER = WS2812
+
+
+POINTING_DEVICE_ENABLE = yes
+MOUSE_SHARED_EP = no
+
+SPLIT_KEYBOARD = yes
+
+SRC += drivers/sensors/pmw3360.c
+QUANTUM_LIB_SRC += spi_master.c tm_sync.c
diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/5x6_right.c b/keyboards/handwired/tractyl_manuform/5x6_right/5x6_right.c
new file mode 100644
index 0000000000..1766312e1b
--- /dev/null
+++ b/keyboards/handwired/tractyl_manuform/5x6_right/5x6_right.c
@@ -0,0 +1,35 @@
+/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
+#include "5x6_right.h"
+
+#ifdef SWAP_HANDS_ENABLE
+const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
+ /* Left hand, matrix positions */
+ {{5, 6}, {4, 6}, {3, 6}, {2, 6}, {1, 6}, {0, 6}},
+ {{5, 7}, {4, 7}, {3, 7}, {2, 7}, {1, 7}, {0, 7}},
+ {{5, 8}, {4, 8}, {3, 8}, {2, 8}, {1, 8}, {0, 8}},
+ {{5, 9}, {4, 9}, {3, 9}, {2, 9}, {1, 9}, {0, 9}},
+ {{5, 10}, {4, 10}, {3, 10}, {2, 10}, {1, 10}, {0, 10}},
+ {{5, 11}, {4, 11}, {3, 11}, {2, 11}, {1, 11}, {0, 11}},
+ /* Right hand, matrix positions */
+ {{5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0}},
+ {{5, 1}, {4, 1}, {3, 1}, {2, 1}, {1, 1}, {0, 1}},
+ {{5, 2}, {4, 2}, {3, 2}, {2, 2}, {1, 2}, {0, 2}},
+ {{5, 3}, {4, 3}, {3, 3}, {2, 3}, {1, 3}, {0, 3}},
+ {{5, 4}, {4, 4}, {3, 4}, {2, 4}, {1, 4}, {0, 4}},
+ {{5, 5}, {4, 5}, {3, 5}, {2, 5}, {1, 5}, {0, 5}}};
+#endif
diff --git a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/5x6_right_trackball.h b/keyboards/handwired/tractyl_manuform/5x6_right/5x6_right.h
index c8650f73d3..90dc46d7e2 100644
--- a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/5x6_right_trackball.h
+++ b/keyboards/handwired/tractyl_manuform/5x6_right/5x6_right.h
@@ -16,16 +16,13 @@
#pragma once
-#include "dactyl_manuform.h"
+#include "tractyl_manuform.h"
#include "quantum.h"
-#include "spi_master.h"
-#include "pmw3360.h"
-#include "pointing_device.h"
-
#define ___ KC_NO
-#define LAYOUT_5x6_right_trackball(\
+// clang-format off
+#define LAYOUT_5x6_right(\
L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
@@ -50,24 +47,4 @@
{ ___, R41, R42, R43, ___, ___ }, \
{ ___, R51, R52, R53, ___, ___ } \
}
-
-
-void process_wheel(report_mouse_t* mouse_report);
-void process_wheel_user(report_mouse_t* mouse_report, int16_t h, int16_t v);
-
-typedef union {
- uint32_t raw;
- struct {
- uint8_t dpi_config;
- };
-} keyboard_config_t;
-
-extern keyboard_config_t keyboard_config;
-
-enum ploopy_keycodes {
- DPI_CONFIG = SAFE_RANGE,
- KEYMAP_SAFE_RANGE,
-};
-
-void master_mouse_send(int8_t x, int8_t y);
-void trackball_set_cpi(uint16_t cpi);
+// clang-format on
diff --git a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/config.h b/keyboards/handwired/tractyl_manuform/5x6_right/config.h
index bc6d66bb9d..9dc46f2e60 100644
--- a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/config.h
+++ b/keyboards/handwired/tractyl_manuform/5x6_right/config.h
@@ -20,9 +20,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "config_common.h"
-#define PRODUCT_ID 0x3536
-#define DEVICE_VER 0x0001
-#define PRODUCT Tractyl-Manuform (5x6 with right side Trackball)
+#define PRODUCT_ID 0x3536
+#define DEVICE_VER 0x0001
+#define PRODUCT Tractyl Manuform(5x6)
/* key matrix size */
// Rows are doubled-up
@@ -36,37 +36,53 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DIODE_DIRECTION COL2ROW
// WS2812 RGB LED strip input and number of LEDs
-#define RGB_DI_PIN E7
-#define RGBLED_NUM 58
+#define RGB_DI_PIN E7
+#define RGBLED_NUM 58
#define RGBLIGHT_SPLIT
-#define RGBLED_SPLIT { 30 , 28 }
+#define RGBLED_SPLIT { 30, 28 }
#define RGBLIGHT_SLEEP
// #define RGBW
-#define RGBLIGHT_LIMIT_VAL 100
+#define RGBLIGHT_LIMIT_VAL 50
/* define if matrix has ghost */
//#define MATRIX_HAS_GHOST
/* number of backlight levels */
// #define BACKLIGHT_LEVELS 3
-#define DEBUG_LED_PIN D6
+#define DEBUG_LED_PIN D6
-#define USB_POLLING_INTERVAL_MS 1
-
-#define ROTATIONAL_TRANSFORM_ANGLE -25
+#define ROTATIONAL_TRANSFORM_ANGLE -25
/* Bootmagic Lite key configuration */
-#define BOOTMAGIC_LITE_ROW 0
-#define BOOTMAGIC_LITE_COLUMN 0
-#define BOOTMAGIC_LITE_ROW_RIGHT 6
-#define BOOTMAGIC_LITE_COLUMN_RIGHT 5
+#define BOOTMAGIC_LITE_ROW 0
+#define BOOTMAGIC_LITE_COLUMN 0
+#define BOOTMAGIC_LITE_ROW_RIGHT 6
+#define BOOTMAGIC_LITE_COLUMN_RIGHT 5
-#define AUDIO_PIN C6
-#define AUDIO_PIN_ALT B7
+#define AUDIO_PIN C6
+#define AUDIO_PIN_ALT B7
#define DYNAMIC_KEYMAP_EEPROM_MAX_ADDR 4095
-#define DYNAMIC_KEYMAP_LAYER_COUNT 16
+#define DYNAMIC_KEYMAP_LAYER_COUNT 16
+#define LAYER_STATE_16BIT
/* serial.c configuration for split keyboard */
-#undef SOFT_SERIAL_PIN
#define SOFT_SERIAL_PIN D2
+#define EE_HANDS
+
+#define ENCODERS_PAD_A { D5 }
+#define ENCODERS_PAD_B { D6 }
+#define ENCODER_RESOLUTION 1
+
+/* Set 0 if debouncing isn't needed */
+#define DEBOUNCE 5
+
+/* disable action features */
+//#define NO_ACTION_LAYER
+//#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
+#define NO_ACTION_MACRO
+#define NO_ACTION_FUNCTION
+
+#define SERIAL_USE_MULTI_TRANSACTION
+#define SPLIT_TRANSACTION_IDS_KB RPC_ID_STATE_SYNC, RPC_ID_SLAVE_STATE
diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/info.json b/keyboards/handwired/tractyl_manuform/5x6_right/info.json
new file mode 100644
index 0000000000..b6d4db4e7b
--- /dev/null
+++ b/keyboards/handwired/tractyl_manuform/5x6_right/info.json
@@ -0,0 +1,75 @@
+{
+ "keyboard_name": "Tractyl Manuform 5x6",
+ "url": "",
+ "maintainer": "drashna",
+ "width": 17,
+ "height": 8,
+ "layouts": {
+ "LAYOUT_5x6_right": {
+ "layout": [
+ {"label":"L00", "x":0, "y":0},
+ {"label":"L01", "x":1, "y":0},
+ {"label":"L02", "x":2, "y":0},
+ {"label":"L03", "x":3, "y":0},
+ {"label":"L04", "x":4, "y":0},
+ {"label":"L05", "x":5, "y":0},
+ {"label":"R00", "x":11, "y":0},
+ {"label":"R01", "x":12, "y":0},
+ {"label":"R02", "x":13, "y":0},
+ {"label":"R03", "x":14, "y":0},
+ {"label":"R04", "x":15, "y":0},
+ {"label":"R05", "x":16, "y":0},
+ {"label":"L10", "x":0, "y":1},
+ {"label":"L11", "x":1, "y":1},
+ {"label":"L12", "x":2, "y":1},
+ {"label":"L13", "x":3, "y":1},
+ {"label":"L14", "x":4, "y":1},
+ {"label":"L15", "x":5, "y":1},
+ {"label":"R10", "x":11, "y":1},
+ {"label":"R11", "x":12, "y":1},
+ {"label":"R12", "x":13, "y":1},
+ {"label":"R13", "x":14, "y":1},
+ {"label":"R14", "x":15, "y":1},
+ {"label":"R15", "x":16, "y":1},
+ {"label":"L20", "x":0, "y":2},
+ {"label":"L21", "x":1, "y":2},
+ {"label":"L22", "x":2, "y":2},
+ {"label":"L23", "x":3, "y":2},
+ {"label":"L24", "x":4, "y":2},
+ {"label":"L25", "x":5, "y":2},
+ {"label":"R20", "x":11, "y":2},
+ {"label":"R21", "x":12, "y":2},
+ {"label":"R22", "x":13, "y":2},
+ {"label":"R23", "x":14, "y":2},
+ {"label":"R24", "x":15, "y":2},
+ {"label":"R25", "x":16, "y":2},
+ {"label":"L30", "x":0, "y":3},
+ {"label":"L31", "x":1, "y":3},
+ {"label":"L32", "x":2, "y":3},
+ {"label":"L33", "x":3, "y":3},
+ {"label":"L34", "x":4, "y":3},
+ {"label":"L35", "x":5, "y":3},
+ {"label":"R30", "x":11, "y":3},
+ {"label":"R31", "x":12, "y":3},
+ {"label":"R32", "x":13, "y":3},
+ {"label":"R33", "x":14, "y":3},
+ {"label":"R34", "x":15, "y":3},
+ {"label":"R35", "x":16, "y":3},
+ {"label":"L42", "x":2, "y":4},
+ {"label":"L43", "x":3, "y":4},
+ {"label":"R42", "x":13, "y":4},
+ {"label":"R43", "x":14, "y":4},
+ {"label":"L44", "x":4, "y":5},
+ {"label":"L45", "x":5, "y":5},
+ {"label":"R41", "x":12, "y":5},
+ {"label":"L54", "x":6, "y":6},
+ {"label":"L55", "x":7, "y":6},
+ {"label":"R51", "x":10, "y":6},
+ {"label":"L52", "x":6, "y":7},
+ {"label":"L53", "x":7, "y":7},
+ {"label":"R52", "x":9, "y":7},
+ {"label":"R53", "x":10, "y":7}
+ ]
+ }
+ }
+}
diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/default/keymap.c b/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/default/keymap.c
new file mode 100644
index 0000000000..30dafdf516
--- /dev/null
+++ b/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/default/keymap.c
@@ -0,0 +1,63 @@
+/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
+#include QMK_KEYBOARD_H
+
+enum custom_layers {
+ _QWERTY,
+ _LOWER,
+ _RAISE,
+};
+
+
+#define RAISE MO(_RAISE)
+#define LOWER MO(_LOWER)
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [_QWERTY] = LAYOUT_5x6_right(
+ KC_ESC , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 ,KC_BSPC,
+ KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P ,KC_MINS,
+ 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 , KC_N , KC_M ,KC_COMM,KC_DOT ,KC_SLSH,KC_BSLASH,
+ KC_LBRC,KC_RBRC, KC_PLUS, KC_EQL,
+ RAISE,KC_SPC, LOWER,
+ KC_TAB,KC_HOME, KC_DEL,
+ KC_BSPC, KC_GRV, KC_LGUI, KC_ENT
+ ),
+
+ [_LOWER] = LAYOUT_5x6_right(
+ KC_TILD,KC_EXLM, KC_AT ,KC_HASH,KC_DLR ,KC_PERC, KC_CIRC,KC_AMPR,KC_ASTR,KC_LPRN,KC_RPRN,KC_DEL,
+ _______,_______,_______,_______,_______,KC_LBRC, KC_RBRC, KC_P7 , KC_P8 , KC_P9 ,_______,KC_PLUS,
+ _______,KC_HOME,KC_PGUP,KC_PGDN,KC_END ,KC_LPRN, KC_RPRN, KC_P4 , KC_P5 , KC_P6 ,KC_MINS,KC_PIPE,
+ _______,_______,_______,_______,_______,_______, _______, KC_P1 , KC_P2 , KC_P3 ,KC_EQL ,KC_UNDS,
+ _______,KC_PSCR, _______, KC_P0,
+ _______,_______, _______,
+ _______,_______, _______,
+ _______,_______, _______,_______
+
+ ),
+
+ [_RAISE] = LAYOUT_5x6_right(
+ KC_F12 , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 ,KC_F10 ,KC_F11 ,
+ _______,_______,_______,_______,_______,KC_LBRC, KC_RBRC,_______,KC_NLCK,KC_INS ,KC_SLCK,KC_MUTE,
+ _______,KC_LEFT,KC_UP ,KC_DOWN,KC_RGHT,KC_LPRN, KC_RPRN,KC_MPRV,KC_MPLY,KC_MNXT,_______,KC_VOLU,
+ _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,KC_VOLD,
+ _______,_______, KC_EQL ,_______,
+ _______,_______, _______,
+ _______,_______, _______,
+ _______,_______, _______,_______
+ ),
+};
diff --git a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/post_config.h b/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/config.h
index 40f1029b5d..21bc8e616a 100644
--- a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/post_config.h
+++ b/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/config.h
@@ -16,18 +16,21 @@
#pragma once
-#ifndef MOUSEKEY_WHEEL_DELTA
-# define MOUSEKEY_WHEEL_DELTA 1
-#endif
-#ifndef MOUSEKEY_WHEEL_DELAY
-# define MOUSEKEY_WHEEL_DELAY 200
-#endif
-#ifndef MOUSEKEY_WHEEL_INTERVAL
-# define MOUSEKEY_WHEEL_INTERVAL 50
-#endif
-#ifndef MOUSEKEY_WHEEL_MAX_SPEED
-# define MOUSEKEY_WHEEL_MAX_SPEED 8
-#endif
-#ifndef MOUSEKEY_WHEEL_TIME_TO_MAX
-# define MOUSEKEY_WHEEL_TIME_TO_MAX 80
-#endif
+// #define USE_I2C
+// #define SELECT_SOFT_SERIAL_SPEED 1
+// #define SERIAL_USE_MULTI_TRANSACTION
+#define SPLIT_MODS_ENABLE
+#define EE_HANDS
+
+#define TRACKBALL_DPI_OPTIONS { 1200, 1800, 2600, 3400 }
+
+#define RGBLIGHT_MAX_BRIGHTNESS 60
+
+#undef DEBOUNCE
+#define DEBOUNCE 10
+
+#define SOLENOID_PIN F1
+#define SOLENOID_DEFAULT_DWELL 8
+
+#define OLED_DISPLAY_128X64
+#define OLED_BRIGHTNESS 50
diff --git a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/drashna/keymap.c b/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/keymap.c
index b3300daa9c..6b6d1ab83c 100644
--- a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/drashna/keymap.c
+++ b/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/keymap.c
@@ -17,75 +17,75 @@
#include "drashna.h"
// clang-format off
-#define LAYOUT_5x6_right_trackball_wrapper(...) LAYOUT_5x6_right_trackball(__VA_ARGS__)
-#define LAYOUT_5x6_right_trackball_base( \
+#define LAYOUT_5x6_right_wrapper(...) LAYOUT_5x6_right(__VA_ARGS__)
+#define LAYOUT_5x6_right_base( \
K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \
K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \
K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \
) \
- LAYOUT_5x6_right_trackball_wrapper( \
- KC_ESC, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS, \
+ LAYOUT_5x6_right_wrapper( \
+ KC_ESC, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, UC_IRNY, \
SH_TT, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, SH_TT, \
LALT_T(KC_TAB), K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(K1B), \
OS_LSFT, CTL_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \
- OS_LALT, OS_LGUI, TG_GAME, TG_DBLO, \
- OS_LGUI, KC_GRV, OS_RGUI, \
+ OS_LGUI, OS_LALT, OS_RGUI, OS_RALT, \
+ KC_PSCR, KC_GRV, MEH_T(KC_BTN3), \
KC_SPC, OS_LGUI, KC_ENT, \
BK_LWER, TT(_MOUSE), TT(_MOUSE), DL_RAIS \
)
-#define LAYOUT_5x6_right_trackball_base_wrapper(...) LAYOUT_5x6_right_trackball_base(__VA_ARGS__)
+#define LAYOUT_5x6_right_base_wrapper(...) LAYOUT_5x6_right_base(__VA_ARGS__)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [_QWERTY] = LAYOUT_5x6_right_trackball_base_wrapper(
+ [_QWERTY] = LAYOUT_5x6_right_base_wrapper(
_________________QWERTY_L1_________________, _________________QWERTY_R1_________________,
_________________QWERTY_L2_________________, _________________QWERTY_R2_________________,
_________________QWERTY_L3_________________, _________________QWERTY_R3_________________
),
- [_COLEMAK] = LAYOUT_5x6_right_trackball_base_wrapper(
+ [_COLEMAK] = LAYOUT_5x6_right_base_wrapper(
_________________COLEMAK_L1________________, _________________COLEMAK_R1________________,
_________________COLEMAK_L2________________, _________________COLEMAK_R2________________,
_________________COLEMAK_L3________________, _________________COLEMAK_R3________________
),
- [_DVORAK] = LAYOUT_5x6_right_trackball_base_wrapper(
+ [_DVORAK] = LAYOUT_5x6_right_base_wrapper(
_________________DVORAK_L1_________________, _________________DVORAK_R1_________________,
_________________DVORAK_L2_________________, _________________DVORAK_R2_________________,
_________________DVORAK_L3_________________, _________________DVORAK_R3_________________
),
- [_WORKMAN] = LAYOUT_5x6_right_trackball_base_wrapper(
+ [_WORKMAN] = LAYOUT_5x6_right_base_wrapper(
_________________WORKMAN_L1________________, _________________WORKMAN_R1________________,
_________________WORKMAN_L2________________, _________________WORKMAN_R2________________,
_________________WORKMAN_L3________________, _________________WORKMAN_R3________________
),
- [_NORMAN] = LAYOUT_5x6_right_trackball_base_wrapper(
+ [_NORMAN] = LAYOUT_5x6_right_base_wrapper(
_________________NORMAN_L1_________________, _________________NORMAN_L1_________________,
_________________NORMAN_L2_________________, _________________NORMAN_R2_________________,
_________________NORMAN_L3_________________, _________________NORMAN_R3_________________
),
- [_MALTRON] = LAYOUT_5x6_right_trackball_base_wrapper(
+ [_MALTRON] = LAYOUT_5x6_right_base_wrapper(
_________________MALTRON_L1________________, _________________MALTRON_R1________________,
_________________MALTRON_L2________________, _________________MALTRON_R2________________,
_________________MALTRON_L3________________, _________________MALTRON_R3________________
),
- [_EUCALYN] = LAYOUT_5x6_right_trackball_base_wrapper(
+ [_EUCALYN] = LAYOUT_5x6_right_base_wrapper(
_________________EUCALYN_L1________________, _________________EUCALYN_R1________________,
_________________EUCALYN_L2________________, _________________EUCALYN_R2________________,
_________________EUCALYN_L3________________, _________________EUCALYN_R3________________
),
- [_CARPLAX] = LAYOUT_5x6_right_trackball_base_wrapper(
+ [_CARPLAX] = LAYOUT_5x6_right_base_wrapper(
_____________CARPLAX_QFMLWY_L1_____________, _____________CARPLAX_QFMLWY_R1_____________,
_____________CARPLAX_QFMLWY_L2_____________, _____________CARPLAX_QFMLWY_R2_____________,
_____________CARPLAX_QFMLWY_L3_____________, _____________CARPLAX_QFMLWY_R3_____________
),
- [_MOUSE] = LAYOUT_5x6_right_trackball(
+ [_MOUSE] = LAYOUT_5x6_right(
_______, _______, _______, _______, _______, _______, DPI_CONFIG, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, KC_WH_U, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, KC_WH_D, KC_BTN1, KC_BTN3, KC_BTN2, KC_BTN6, _______,
@@ -95,7 +95,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, _______, _______,
_______, _______, _______, _______
),
- [_GAMEPAD] = LAYOUT_5x6_right_trackball(
+ [_GAMEPAD] = LAYOUT_5x6_right(
KC_ESC, KC_NO, KC_1, KC_2, KC_3, KC_4, DPI_CONFIG, _______, _______, _______, _______, _______,
KC_F1, KC_K, KC_Q, KC_W, KC_E, KC_R, _______, _______, _______, _______, _______, _______,
KC_TAB, KC_G, KC_A, KC_S, KC_D, KC_F, _______, _______, _______, _______, _______, _______,
@@ -105,7 +105,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_SPC, KC_P, _______,
KC_H, KC_LGUI, _______, _______
),
- [_DIABLO] = LAYOUT_5x6_right_trackball(
+ [_DIABLO] = LAYOUT_5x6_right(
KC_ESC, KC_V, KC_D, KC_LALT, KC_NO, KC_NO, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO,
KC_TAB, KC_S, KC_I, KC_F, KC_M, KC_T, _______, _______, _______, _______, _______, _______,
KC_Q, KC_1, KC_2, KC_3, KC_4, KC_G, _______, _______, _______, _______, _______, _______,
@@ -115,7 +115,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
SFT_T(KC_SPC), KC_J, _______,
ALT_T(KC_Q), KC_LGUI, _______, _______
),
- [_LOWER] = LAYOUT_5x6_right_trackball_wrapper(
+ [_LOWER] = LAYOUT_5x6_right_wrapper(
KC_F12, _________________FUNC_LEFT_________________, _________________FUNC_RIGHT________________, KC_F11,
_______, _________________LOWER_L1__________________, _________________LOWER_R1__________________, _______,
_______, _________________LOWER_L2__________________, _________________LOWER_R2__________________, KC_PIPE,
@@ -125,7 +125,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, _______, _______,
_______, _______, _______, _______
),
- [_RAISE] = LAYOUT_5x6_right_trackball_wrapper(
+ [_RAISE] = LAYOUT_5x6_right_wrapper(
KC_F12, _________________FUNC_LEFT_________________, _________________FUNC_RIGHT________________, KC_F11,
KC_GRV, _________________RAISE_L1__________________, _________________RAISE_R1__________________, _______,
_______, _________________RAISE_L2__________________, _________________RAISE_R2__________________, KC_BSLS,
@@ -135,12 +135,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, _______, _______,
_______, _______, _______, _______
),
- [_ADJUST] = LAYOUT_5x6_right_trackball_wrapper(
+ [_ADJUST] = LAYOUT_5x6_right_wrapper(
KC_MAKE, ___________________BLANK___________________, _________________ADJUST_R1_________________, KC_RST,
VRSN, _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, EEP_RST,
- _______, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, TG_MODS,
+ UC_MOD, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, TG_MODS,
_______, _________________ADJUST_L3_________________, _________________ADJUST_R3_________________, KC_MPLY,
- HPT_DWLI, HPT_DWLD, _______, _______,
+ HPT_DWLI, HPT_DWLD, TG_GAME, TG_DBLO,
HPT_TOG, HPT_BUZ, KC_NUKE,
_______, _______, _______,
_______, _______, KC_NUKE, _______
diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/rules.mk b/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/rules.mk
new file mode 100644
index 0000000000..7e0eee8bdc
--- /dev/null
+++ b/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/rules.mk
@@ -0,0 +1,11 @@
+RGBLIGHT_ENABLE = yes
+RGBLIGHT_STARTUP_ANIMATION = yes
+AUDIO_ENABLE = yes
+HAPTIC_ENABLE = no
+COMMAND_ENABLE = no
+TAP_DANCE_ENABLE = yes
+UNICODE_ENABLE = yes
+OLED_DRIVER_ENABLE = yes
+WPM_ENABLE = yes
+ENCODER_ENABLE = yes
+# DEBOUNCE_TYPE = sym_eager_pk
diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/readme.md b/keyboards/handwired/tractyl_manuform/5x6_right/readme.md
new file mode 100644
index 0000000000..b6e38dc845
--- /dev/null
+++ b/keyboards/handwired/tractyl_manuform/5x6_right/readme.md
@@ -0,0 +1,21 @@
+# Drashna's Dactyl Manuform (5x6) with a right side trackball
+
+![](https://preview.redd.it/zwt91036m3y51.jpg?width=960&crop=smart&auto=webp&s=e030deb7d8285c95a1a30c69a7e7a71f750e87bb)
+
+It's a Dactyl Manuform with an integrated thumb based trackball, using the pmw3360 optical sensor.
+
+It's powered by 2x Teensy++ 2.0's, using Drashna's [Teensy VBUS Hack](https://docs.qmk.fm/#/feature_split_keyboard?id=hardware-considerations-and-mods) for better detection.
+
+
+* Keyboard Maintainer: [Drashna Jael're](https://github.com/drashna)
+* Hardware Supported: [Design files](https://gitlab.com/keyboards1/dm_r_track/-/tree/master/boolean), [Teensy++ 2.0 (2x)](https://www.pjrc.com/store/teensypp.html), [PMW3360 Optical Sensor](https://www.tindie.com/products/jkicklighter/pmw3360-motion-sensor/)
+
+Make example for this keyboard (after setting up your build environment):
+
+ make handwired/dactyl_manuform/5x6_right_trackball:default
+
+Flashing example for this keyboard:
+
+ make handwired/dactyl_manuform/5x6_right_trackball:default:flash
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/rules.mk b/keyboards/handwired/tractyl_manuform/5x6_right/rules.mk
index 3fb9ab2a84..a71929a543 100644
--- a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/rules.mk
+++ b/keyboards/handwired/tractyl_manuform/5x6_right/rules.mk
@@ -11,21 +11,21 @@ BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
MOUSEKEY_ENABLE = yes # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug
-COMMAND_ENABLE = no # Commands for debug and configuration
+COMMAND_ENABLE = no # Commands for debug and configuration
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
-NKRO_ENABLE = yes # USB Nkey Rollover
+NKRO_ENABLE = yes # USB Nkey Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
-RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
+RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
BLUETOOTH_ENABLE = no # Enable Bluetooth
AUDIO_ENABLE = no # Audio output
SWAP_HANDS_ENABLE = yes
+
POINTING_DEVICE_ENABLE = yes
MOUSE_SHARED_EP = no
SPLIT_KEYBOARD = yes
-SPLIT_TRANSPORT = custom
-SRC += pmw3360.c
-QUANTUM_LIB_SRC += pointer_transport.c serial.c i2c_master.c i2c_slave.c spi_master.c
+SRC += drivers/sensors/pmw3360.c
+QUANTUM_LIB_SRC += spi_master.c tm_sync.c
diff --git a/keyboards/handwired/tractyl_manuform/config.h b/keyboards/handwired/tractyl_manuform/config.h
new file mode 100644
index 0000000000..e6ab57da9e
--- /dev/null
+++ b/keyboards/handwired/tractyl_manuform/config.h
@@ -0,0 +1,43 @@
+/*
+Copyright 2012 Jun Wako <wakojun@gmail.com>
+Copyright 2015 Jack Humbert
+
+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 <http://www.gnu.org/licenses/>.
+*/
+
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0x44DD
+#define MANUFACTURER Drashna
+
+/* Set 0 if debouncing isn't needed */
+#define DEBOUNCE 5
+
+#define USB_POLLING_INTERVAL_MS 1
+
+/* disable debug print */
+// #define NO_DEBUG
+
+/* disable print */
+// #define NO_PRINT
+
+/* disable action features */
+//#define NO_ACTION_LAYER
+//#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
+#define NO_ACTION_MACRO
+#define NO_ACTION_FUNCTION
diff --git a/keyboards/handwired/tractyl_manuform/post_config.h b/keyboards/handwired/tractyl_manuform/post_config.h
new file mode 100644
index 0000000000..147e928735
--- /dev/null
+++ b/keyboards/handwired/tractyl_manuform/post_config.h
@@ -0,0 +1,96 @@
+/*
+Copyright 2012 Jun Wako <wakojun@gmail.com>
+Copyright 2015 Jack Humbert
+
+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 <http://www.gnu.org/licenses/>.
+*/
+
+#pragma once
+
+// mouse config
+# ifndef MOUSEKEY_MOVE_DELTA
+# ifndef MK_KINETIC_SPEED
+# define MOUSEKEY_MOVE_DELTA 5
+# else
+# define MOUSEKEY_MOVE_DELTA 25
+# endif
+# endif
+# ifndef MOUSEKEY_DELAY
+# ifndef MK_KINETIC_SPEED
+# define MOUSEKEY_DELAY 300
+# else
+# define MOUSEKEY_DELAY 8
+# endif
+# endif
+# ifndef MOUSEKEY_INTERVAL
+# ifndef MK_KINETIC_SPEED
+# define MOUSEKEY_INTERVAL 50
+# else
+# define MOUSEKEY_INTERVAL 20
+# endif
+# endif
+# ifndef MOUSEKEY_MAX_SPEED
+# define MOUSEKEY_MAX_SPEED 7
+# endif
+# ifndef MOUSEKEY_TIME_TO_MAX
+# define MOUSEKEY_TIME_TO_MAX 60
+# endif
+# ifndef MOUSEKEY_INITIAL_SPEED
+# define MOUSEKEY_INITIAL_SPEED 100
+# endif
+# ifndef MOUSEKEY_BASE_SPEED
+# define MOUSEKEY_BASE_SPEED 1000
+# endif
+# ifndef MOUSEKEY_DECELERATED_SPEED
+# define MOUSEKEY_DECELERATED_SPEED 400
+# endif
+# ifndef MOUSEKEY_ACCELERATED_SPEED
+# define MOUSEKEY_ACCELERATED_SPEED 3000
+# endif
+
+
+// mouse scroll config
+# ifndef MOUSEKEY_WHEEL_DELAY
+# define MOUSEKEY_WHEEL_DELAY 15
+# endif
+# ifndef MOUSEKEY_WHEEL_DELTA
+# define MOUSEKEY_WHEEL_DELTA 1
+# endif
+# ifndef MOUSEKEY_WHEEL_INTERVAL
+# define MOUSEKEY_WHEEL_INTERVAL 50
+# endif
+# ifndef MOUSEKEY_WHEEL_MAX_SPEED
+# define MOUSEKEY_WHEEL_MAX_SPEED 8
+# endif
+# ifndef MOUSEKEY_WHEEL_TIME_TO_MAX
+# define MOUSEKEY_WHEEL_TIME_TO_MAX 80
+# endif
+
+# ifndef MOUSEKEY_WHEEL_INITIAL_MOVEMENTS
+# define MOUSEKEY_WHEEL_INITIAL_MOVEMENTS 8
+# endif
+# ifndef MOUSEKEY_WHEEL_BASE_MOVEMENTS
+# define MOUSEKEY_WHEEL_BASE_MOVEMENTS 48
+# endif
+# ifndef MOUSEKEY_WHEEL_ACCELERATED_MOVEMENTS
+# define MOUSEKEY_WHEEL_ACCELERATED_MOVEMENTS 48
+# endif
+# ifndef MOUSEKEY_WHEEL_DECELERATED_MOVEMENTS
+# define MOUSEKEY_WHEEL_DECELERATED_MOVEMENTS 8
+# endif
+
+
+#ifndef DEBOUNCE
+# define DEBOUNCE 5
+#endif
diff --git a/keyboards/handwired/tractyl_manuform/readme.md b/keyboards/handwired/tractyl_manuform/readme.md
new file mode 100644
index 0000000000..3221da0e9d
--- /dev/null
+++ b/keyboards/handwired/tractyl_manuform/readme.md
@@ -0,0 +1,159 @@
+Dactyl Manuform (4x5, 5x6, 5x7, 6x6)
+======
+the [Dactyl-Manuform](https://github.com/tshort/dactyl-keyboard) is a split curved keyboard based on the design of [adereth dactyl](https://github.com/adereth/dactyl-keyboard) and thumb cluster design of the [manuform](https://geekhack.org/index.php?topic=46015.0) keyboard, the hardware is similar to the let's split keyboard. all information needed for making one is in the first link.
+![Imgur](https://i.imgur.com/7y0Vbyd.jpg)
+
+
+## First Time Setup
+
+Download or clone the `qmk_firmware` repo and navigate to its top level directory. Once your build environment is setup, you'll be able to generate the default .hex using:
+
+Depending on your Layout chose one of the follwing commands:
+
+```
+$ make handwired/dactyl_manuform/YOUR_LAYOUT:YOUR_KEYMAP_NAME
+```
+
+example:
+```
+$ make handwired/dactyl_manuform/4x5:default
+```
+
+If everything worked correctly you will see a file:
+
+```
+dactyl_manuform_YOUR_LAYOUT_YOUR_KEYMAP_NAME.hex
+```
+
+For more information on customizing keymaps, take a look at the primary documentation for [Customizing Your Keymap](/docs/faq_keymap.md) in the main readme.md.
+
+
+## Keymaps
+
+### [Keymaps 4x5](/keyboards/handwired/dactyl_manuform/4x5/keymaps/)
+
+#### Default
+Simple QWERTY layout with 3 Layers.
+#### Dvorak
+
+### [Keymaps 5x6](/keyboards/handwired/dactyl_manuform/5x6/keymaps/)
+
+#### Default
+Just a copy of the Impstyle keymap. Feel free to adjust it.
+
+#### Impstyle
+A simple QWERTY keymap with 3 Layers. Both sides are connected via serial and the Left ist the master.
+
+### [Keymaps 5x7 aka almost Ergodox](/keyboards/handwired/dactyl_manuform/5x7/keymaps/)
+#### Default
+Keymap of Loligagger from geekhack.
+
+### [Keymaps 6x6](/keyboards/handwired/dactyl_manuform/6x6/keymaps/)
+
+#### Default
+Simple QWERTY layout with 3 Layers.
+
+## Required Hardware
+
+Apart from diodes and key switches for the keyboard matrix in each half, you
+will need:
+
+* 2 Arduino Pro Micros. You can find these on AliExpress for ≈3.50USD each.
+* 2 TRRS sockets and 1 TRRS cable, or 2 TRS sockets and 1 TRS cable
+
+Alternatively, you can use any sort of cable and socket that has at least 3
+wires. If you want to use I2C to communicate between halves, you will need a
+cable with at least 4 wires and 2x 4.7kΩ pull-up resistors
+
+## Optional Hardware
+A speaker can be hooked-up to either side to the `5` (`C6`) pin and `GND`, and turned on via `AUDIO_ENABLE`.
+
+## Wiring
+
+The 3 wires of the TRS/TRRS cable need to connect GND, VCC, and digital pin 3 (i.e.
+PD0 on the ATmega32u4) between the two Pro Micros.
+
+Next, wire your key matrix to any of the remaining 17 IO pins of the pro micro
+and modify the `matrix.c` accordingly.
+
+The wiring for serial:
+
+![serial wiring](https://i.imgur.com/C3D1GAQ.png)
+
+The wiring for i2c:
+
+![i2c wiring](https://i.imgur.com/Hbzhc6E.png)
+
+The pull-up resistors may be placed on either half. It is also possible
+to use 4 resistors and have the pull-ups in both halves, but this is
+unnecessary in simple use cases.
+
+You can change your configuration between serial and i2c by modifying your `config.h` file.
+
+## Notes on Software Configuration
+
+the keymaps in here are for the 4x5 layout of the keyboard only.
+
+## Flashing
+
+To flash your firmware take a look at: [Flashing Instructions and Bootloader Information](https://docs.qmk.fm/#/flashing)
+
+
+## Choosing which board to plug the USB cable into (choosing Master)
+
+Because the two boards are identical, the firmware has logic to differentiate the left and right board.
+
+It uses two strategies to figure things out: looking at the EEPROM (memory on the chip) or looking if the current board has the usb cable.
+
+The EEPROM approach requires additional setup (flashing the eeprom) but allows you to swap the usb cable to either side.
+
+The USB cable approach is easier to setup and if you just want the usb cable on the left board, you do not need to do anything extra.
+
+### Setting the left hand as master
+
+If you always plug the usb cable into the left board, nothing extra is needed as this is the default. Comment out `EE_HANDS` and comment out `I2C_MASTER_RIGHT` or `MASTER_RIGHT` if for some reason it was set.
+
+### Setting the right hand as master
+
+If you always plug the usb cable into the right board, add an extra flag to your `config.h`
+```
+ #define MASTER_RIGHT
+```
+
+### Setting EE_hands to use either hands as master
+
+If you define `EE_HANDS` in your `config.h`, you will need to set the
+EEPROM for the left and right halves.
+
+The EEPROM is used to store whether the
+half is left handed or right handed. This makes it so that the same firmware
+file will run on both hands instead of having to flash left and right handed
+versions of the firmware to each half. To flash the EEPROM file for the left
+half run:
+```
+make handwired/dactyl_promicro:default:dfu-split-left
+make handwired/dactyl_promicro:default:dfu-split-right
+```
+
+After you have flashed the EEPROM, you then need to set `EE_HANDS` in your config.h, rebuild the hex files and reflash.
+
+Note that you need to program both halves, but you have the option of using
+different keymaps for each half. You could program the left half with a QWERTY
+layout and the right half with a Colemak layout using bootmagic's default layout option.
+Then if you connect the left half to a computer by USB the keyboard will use QWERTY and Colemak when the
+right half is connected.
+
+
+Notes on Using Pro Micro 3.3V
+-----------------------------
+
+Do update the `F_CPU` parameter in `rules.mk` to `8000000` which reflects
+the frequency on the 3.3V board.
+
+Also, if the slave board is producing weird characters in certain columns,
+update the following line in `matrix.c` to the following:
+
+```
+// wait_us(30); // without this wait read unstable value.
+wait_us(300); // without this wait read unstable value.
+```
diff --git a/keyboards/handwired/tractyl_manuform/tm_sync.c b/keyboards/handwired/tractyl_manuform/tm_sync.c
new file mode 100644
index 0000000000..f0a611206d
--- /dev/null
+++ b/keyboards/handwired/tractyl_manuform/tm_sync.c
@@ -0,0 +1,132 @@
+/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
+#ifdef SPLIT_TRANSACTION_IDS_KB
+
+# include "tractyl_manuform.h"
+# include "transactions.h"
+# include <string.h>
+# include "drivers/sensors/pmw3360.h"
+
+kb_runtime_config_t kb_state;
+kb_slave_data_t kb_slave;
+
+void slave_state_sync(uint8_t initiator2target_buffer_size, const void* initiator2target_buffer, uint8_t target2initiator_buffer_size, void* target2initiator_buffer) {
+ if (target2initiator_buffer_size == sizeof(kb_slave)) {
+ memcpy(target2initiator_buffer, &kb_slave, sizeof(kb_slave));
+ if (kb_slave.mouse_x > 127) {
+ kb_slave.mouse_x -= 127;
+ } else if (kb_slave.mouse_x < -127) {
+ kb_slave.mouse_x += 127;
+ } else {
+ kb_slave.mouse_x = 0;
+ }
+
+ if (kb_slave.mouse_y > 127) {
+ kb_slave.mouse_y -= 127;
+ } else if (kb_slave.mouse_y < -127) {
+ kb_slave.mouse_y += 127;
+ } else {
+ kb_slave.mouse_y = 0;
+ }
+ }
+}
+
+void pointer_state_sync(uint8_t initiator2target_buffer_size, const void* initiator2target_buffer, uint8_t target2initiator_buffer_size, void* target2initiator_buffer) {
+ if (initiator2target_buffer_size == sizeof(kb_state)) {
+ memcpy(&kb_state, initiator2target_buffer, sizeof(kb_state));
+ }
+}
+
+void keyboard_post_init_kb(void) {
+ // Register keyboard state sync split transaction
+ transaction_register_rpc(RPC_ID_STATE_SYNC, pointer_state_sync);
+ transaction_register_rpc(RPC_ID_SLAVE_STATE, slave_state_sync);
+
+ keyboard_post_init_user();
+}
+
+void kb_state_update(void) {
+# ifdef POINTING_DEVICE_ENABLE
+ if (is_keyboard_master() && !is_keyboard_left()) {
+ static uint16_t cpi = 0;
+ if (cpi != kb_state.device_cpi) {
+ cpi = kb_state.device_cpi;
+ pmw_set_cpi(cpi);
+ }
+ }
+# endif
+}
+
+void kb_post_state_update(void) {
+# ifdef POINTING_DEVICE_ENABLE
+ if (is_keyboard_master() && is_keyboard_left()) {
+ report_mouse_t temp_report = pointing_device_get_report();
+ temp_report.x = kb_slave.mouse_x;
+ temp_report.y = kb_slave.mouse_y;
+ pointing_device_set_report(temp_report);
+ }
+# endif
+}
+
+void kb_state_sync(void) {
+ if (is_keyboard_master()) {
+ // Keep track of the last state, so that we can tell if we need to propagate to slave
+ static kb_runtime_config_t last_kb_state;
+ static uint32_t last_sync = 0;
+ static uint32_t mouse_sync = 0;
+ bool needs_sync = false;
+
+ // Check if the state values are different
+ if (memcmp(&kb_state, &last_kb_state, sizeof(kb_runtime_config_t))) {
+ needs_sync = true;
+ memcpy(&last_kb_state, &kb_state, sizeof(kb_runtime_config_t));
+ }
+ // Send to slave every 500ms regardless of state change
+ if (timer_elapsed32(last_sync) > 500) {
+ needs_sync = true;
+ }
+
+ // Perform the sync if requested
+ if (needs_sync) {
+ if (transaction_rpc_send(RPC_ID_STATE_SYNC, sizeof(kb_runtime_config_t), &kb_state)) {
+ last_sync = timer_read32();
+ }
+ }
+
+ if (is_keyboard_left()) {
+ if (timer_elapsed32(mouse_sync) >= 5) {
+ // always sync slave data, since it may contain device reports.
+ if (transaction_rpc_recv(RPC_ID_SLAVE_STATE, sizeof(kb_slave_data_t), &kb_slave)) {
+ if (kb_slave.mouse_x >= -127 && kb_slave.mouse_x <= 127 && kb_slave.mouse_y >= -127 && kb_slave.mouse_y <= 127) {
+ mouse_sync = timer_read32();
+ }
+ }
+ }
+ }
+ }
+}
+
+void housekeeping_task_kb(void) {
+ // Update kb_state so we can send to slave
+ kb_state_update();
+
+ // Data sync from master to slave
+ kb_state_sync();
+
+ kb_post_state_update();
+}
+#endif
diff --git a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/5x6_right_trackball.c b/keyboards/handwired/tractyl_manuform/tractyl_manuform.c
index 4048fb233c..49a8336829 100644
--- a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/5x6_right_trackball.c
+++ b/keyboards/handwired/tractyl_manuform/tractyl_manuform.c
@@ -1,4 +1,4 @@
-/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
+/* Copyright 2020 Christopher Courtney <drashna@live.com> (@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
@@ -14,10 +14,14 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "5x6_right_trackball.h"
+#include "tractyl_manuform.h"
+#include "transactions.h"
+#include <string.h>
+#include "drivers/sensors/pmw3360.h"
#ifndef TRACKBALL_DPI_OPTIONS
-# define TRACKBALL_DPI_OPTIONS { 1200, 1600, 2400 }
+# define TRACKBALL_DPI_OPTIONS \
+ { 1200, 1600, 2400 }
# ifndef TRACKBALL_DPI_DEFAULT
# define TRACKBALL_DPI_DEFAULT 1
# endif
@@ -26,12 +30,15 @@
# define TRACKBALL_DPI_DEFAULT 0
#endif
+extern kb_runtime_config_t kb_state;
+extern kb_slave_data_t kb_slave;
+
keyboard_config_t keyboard_config;
-uint16_t dpi_array[] = TRACKBALL_DPI_OPTIONS;
+uint16_t dpi_array[] = TRACKBALL_DPI_OPTIONS;
#define DPI_OPTION_SIZE (sizeof(dpi_array) / sizeof(uint16_t))
-bool BurstState = false; // init burst state for Trackball module
-uint16_t MotionStart = 0; // Timer for accel, 0 is resting state
+bool BurstState = false; // init burst state for Trackball module
+uint16_t MotionStart = 0; // Timer for accel, 0 is resting state
__attribute__((weak)) void process_mouse_user(report_mouse_t* mouse_report, int16_t x, int16_t y) {
mouse_report->x = x;
@@ -53,12 +60,8 @@ __attribute__((weak)) void process_mouse(report_mouse_t* mouse_report) {
MotionStart = timer_read();
}
- if (debug_mouse) {
- dprintf("Delt] d: %d t: %u\n", abs(data.dx) + abs(data.dy), MotionStart);
- }
- if (debug_mouse) {
- dprintf("Pre ] X: %d, Y: %d\n", data.dx, data.dy);
- }
+ if (debug_mouse) { dprintf("Delt] d: %d t: %u\n", abs(data.dx) + abs(data.dy), MotionStart); }
+ if (debug_mouse) { dprintf("Pre ] X: %d, Y: %d\n", data.dx, data.dy); }
#if defined(PROFILE_LINEAR)
float scale = float(timer_elaspsed(MotionStart)) / 1000.0;
data.dx *= scale;
@@ -85,7 +88,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t* record) {
#ifdef POINTING_DEVICE_ENABLE
if (keycode == DPI_CONFIG && record->event.pressed) {
- if ((get_mods()|get_oneshot_mods()) & MOD_MASK_SHIFT) {
+ if ((get_mods() | get_oneshot_mods()) & MOD_MASK_SHIFT) {
keyboard_config.dpi_config = (keyboard_config.dpi_config - 1) % DPI_OPTION_SIZE;
} else {
keyboard_config.dpi_config = (keyboard_config.dpi_config + 1) % DPI_OPTION_SIZE;
@@ -146,19 +149,11 @@ void pointing_device_init(void) {
trackball_set_cpi(dpi_array[keyboard_config.dpi_config]);
}
-static bool has_report_changed(report_mouse_t new, report_mouse_t old) {
- return (new.buttons != old.buttons) ||
- (new.x && new.x != old.x) ||
- (new.y && new.y != old.y) ||
- (new.h && new.h != old.h) ||
- (new.v && new.v != old.v);
-}
+static bool has_report_changed(report_mouse_t new, report_mouse_t old) { return (new.buttons != old.buttons) || (new.x&& new.x != old.x) || (new.y&& new.y != old.y) || (new.h&& new.h != old.h) || (new.v&& new.v != old.v); }
void pointing_device_task(void) {
report_mouse_t mouse_report = pointing_device_get_report();
- if (!is_keyboard_left()) {
- process_mouse(&mouse_report);
- }
+ if (!is_keyboard_left()) { process_mouse(&mouse_report); }
pointing_device_set_report(mouse_report);
pointing_device_send();
@@ -178,24 +173,20 @@ void matrix_init_kb(void) {
// is safe to just read DPI setting since matrix init
// comes before pointing device init.
keyboard_config.raw = eeconfig_read_kb();
- if (keyboard_config.dpi_config > DPI_OPTION_SIZE) {
- eeconfig_init_kb();
- }
+ if (keyboard_config.dpi_config > DPI_OPTION_SIZE) { eeconfig_init_kb(); }
matrix_init_user();
}
#ifdef POINTING_DEVICE_ENABLE
void pointing_device_send(void) {
- static report_mouse_t old_report = {};
- report_mouse_t mouseReport = pointing_device_get_report();
+ static report_mouse_t old_report = {};
+ report_mouse_t mouseReport = pointing_device_get_report();
if (is_keyboard_master()) {
int8_t x = mouseReport.x, y = mouseReport.y;
mouseReport.x = 0;
mouseReport.y = 0;
process_mouse_user(&mouseReport, x, y);
- if (has_report_changed(mouseReport, old_report)) {
- host_mouse_send(&mouseReport);
- }
+ if (has_report_changed(mouseReport, old_report)) { host_mouse_send(&mouseReport); }
} else {
master_mouse_send(mouseReport.x, mouseReport.y);
}
@@ -203,26 +194,25 @@ void pointing_device_send(void) {
mouseReport.y = 0;
mouseReport.v = 0;
mouseReport.h = 0;
- old_report = mouseReport;
+ old_report = mouseReport;
pointing_device_set_report(mouseReport);
}
#endif
-#ifdef SWAP_HANDS_ENABLE
-const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
- /* Left hand, matrix positions */
- {{5, 6}, {4, 6}, {3, 6}, {2, 6}, {1, 6}, {0, 6}},
- {{5, 7}, {4, 7}, {3, 7}, {2, 7}, {1, 7}, {0, 7}},
- {{5, 8}, {4, 8}, {3, 8}, {2, 8}, {1, 8}, {0, 8}},
- {{5, 9}, {4, 9}, {3, 9}, {2, 9}, {1, 9}, {0, 9}},
- {{5, 10}, {4, 10}, {3, 10}, {2, 10}, {1, 10}, {0, 10}},
- {{5, 11}, {4, 11}, {3, 11}, {2, 11}, {1, 11}, {0, 11}},
- /* Right hand, matrix positions */
- {{5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0}},
- {{5, 1}, {4, 1}, {3, 1}, {2, 1}, {1, 1}, {0, 1}},
- {{5, 2}, {4, 2}, {3, 2}, {2, 2}, {1, 2}, {0, 2}},
- {{5, 3}, {4, 3}, {3, 3}, {2, 3}, {1, 3}, {0, 3}},
- {{5, 4}, {4, 4}, {3, 4}, {2, 4}, {1, 4}, {0, 4}},
- {{5, 5}, {4, 5}, {3, 5}, {2, 5}, {1, 5}, {0, 5}}
-};
+#ifdef POINTING_DEVICE_ENABLE
+void master_mouse_send(int8_t x, int8_t y) {
+#ifdef SPLIT_TRANSACTION_IDS_KB
+ kb_slave.mouse_x += x;
+ kb_slave.mouse_y += y;
+#endif
+}
+void trackball_set_cpi(uint16_t cpi) {
+ if (!is_keyboard_left()) {
+ pmw_set_cpi(cpi);
+ } else {
+#ifdef SPLIT_TRANSACTION_IDS_KB
+ kb_state.device_cpi = cpi;
+#endif
+ }
+}
#endif
diff --git a/keyboards/draculad/keymaps/pimoroni/pimoroni_trackball.h b/keyboards/handwired/tractyl_manuform/tractyl_manuform.h
index cfcd5a47a1..151e496fc6 100644
--- a/keyboards/draculad/keymaps/pimoroni/pimoroni_trackball.h
+++ b/keyboards/handwired/tractyl_manuform/tractyl_manuform.h
@@ -19,17 +19,37 @@
#include "quantum.h"
#include "pointing_device.h"
-#ifndef TRACKBALL_ADDRESS
-# define TRACKBALL_ADDRESS 0x0A
+#if defined(KEYBOARD_handwired_tractyl_manuform_5x6_right)
+# include "5x6_right.h"
+#elif defined(KEYBOARD_handwired_tractyl_manuform_4x6_right)
+# include "4x6_right.h"
#endif
-#define TRACKBALL_WRITE ((TRACKBALL_ADDRESS << 1) | I2C_WRITE)
-#define TRACKBALL_READ ((TRACKBALL_ADDRESS << 1) | I2C_READ)
-void trackball_set_rgbw(uint8_t red, uint8_t green, uint8_t blue, uint8_t white);
-void trackball_check_click(bool pressed, report_mouse_t *mouse);
-void trackball_register_button(bool pressed, enum mouse_buttons button);
+void process_mouse(report_mouse_t* mouse_report);
+void process_mouse_user(report_mouse_t* mouse_report, int16_t x, int16_t y);
-float trackball_get_precision(void);
-void trackball_set_precision(float precision);
-bool trackball_is_scrolling(void);
-void trackball_set_scrolling(bool scroll); \ No newline at end of file
+typedef union {
+ uint32_t raw;
+ struct {
+ uint8_t dpi_config;
+ };
+} keyboard_config_t;
+
+extern keyboard_config_t keyboard_config;
+
+enum ploopy_keycodes {
+ DPI_CONFIG = SAFE_RANGE,
+ KEYMAP_SAFE_RANGE,
+};
+
+void master_mouse_send(int8_t x, int8_t y);
+void trackball_set_cpi(uint16_t cpi);
+
+typedef struct {
+ uint16_t device_cpi;
+} kb_runtime_config_t;
+
+typedef struct {
+ int16_t mouse_x;
+ int16_t mouse_y;
+} kb_slave_data_t;
diff --git a/keyboards/handwired/tritium_numpad/rules.mk b/keyboards/handwired/tritium_numpad/rules.mk
index 42dfc5cbec..ddb43bdb56 100644
--- a/keyboards/handwired/tritium_numpad/rules.mk
+++ b/keyboards/handwired/tritium_numpad/rules.mk
@@ -27,4 +27,4 @@ AUDIO_ENABLE = no
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
-LAYOUTS = numpad_6x4 ortho_6x4 nontra_6x4
+LAYOUTS = numpad_6x4 ortho_6x4
diff --git a/keyboards/handwired/wulkan/keymaps/default/keymap.c b/keyboards/handwired/wulkan/keymaps/default/keymap.c
index fec8442ee3..ad503114fc 100644
--- a/keyboards/handwired/wulkan/keymaps/default/keymap.c
+++ b/keyboards/handwired/wulkan/keymaps/default/keymap.c
@@ -8,21 +8,21 @@ enum layers {
};
enum unicode_names {
- SE_AA_HIGH,
- SE_AE_HIGH,
- SE_OE_HIGH,
- SE_AA_LOW,
- SE_AE_LOW,
- SE_OE_LOW,
+ SE_ARNG_HIGH,
+ SE_ADIA_HIGH,
+ SE_ODIA_HIGH,
+ SE_ARNG_LOW,
+ SE_ADIA_LOW,
+ SE_ODIA_LOW,
};
const uint32_t PROGMEM unicode_map[] = {
- [SE_AA_HIGH] = 0x00C5,
- [SE_AE_HIGH] = 0x00C4,
- [SE_OE_HIGH] = 0x00D6,
- [SE_AA_LOW] = 0x00E5,
- [SE_AE_LOW] = 0x00E4,
- [SE_OE_LOW] = 0x00F6,
+ [SE_ARNG_HIGH] = 0x00C5,
+ [SE_ADIA_HIGH] = 0x00C4,
+ [SE_ODIA_HIGH] = 0x00D6,
+ [SE_ARNG_LOW] = 0x00E5,
+ [SE_ADIA_LOW] = 0x00E4,
+ [SE_ODIA_LOW] = 0x00F6,
};
#define LOWER MO(_LOWER)
@@ -95,8 +95,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------------------'
*/
[_ADJUST] = LAYOUT_ortho_4x12(
- _______, RESET, _______, _______, KC_WH_U, _______, _______, KC_MS_U, _______, _______, XP(SE_AA_LOW, SE_AA_HIGH), KC_DEL,
- _______, _______, _______, _______, KC_WH_D, _______, KC_MS_L, KC_MS_D, KC_MS_R, XP(SE_OE_LOW, SE_OE_HIGH), XP(SE_AE_LOW, SE_AE_HIGH), _______,
+ _______, RESET, _______, _______, KC_WH_U, _______, _______, KC_MS_U, _______, _______, XP(SE_ARNG_LOW, SE_ARNG_HIGH), KC_DEL,
+ _______, _______, _______, _______, KC_WH_D, _______, KC_MS_L, KC_MS_D, KC_MS_R, XP(SE_ODIA_LOW, SE_ODIA_HIGH), XP(SE_ADIA_LOW, SE_ADIA_HIGH), _______,
_______, KC_ACL0, KC_ACL1, KC_ACL2, _______, _______, KC_BTN1, _______, KC_BTN2, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
)
diff --git a/keyboards/handwired/xealous/rules.mk b/keyboards/handwired/xealous/rules.mk
index 2d816ab7ce..93dd6cf232 100644
--- a/keyboards/handwired/xealous/rules.mk
+++ b/keyboards/handwired/xealous/rules.mk
@@ -36,6 +36,4 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
SRC += matrix.c
DEBOUNCE_TYPE = eager_pk
-LAYOUTS = split60
-
DEFAULT_FOLDER = handwired/xealous/rev1
diff --git a/keyboards/helix/rev2/keymaps/default/rules.mk b/keyboards/helix/rev2/keymaps/default/rules.mk
index 206e836ec0..c16f3e2b87 100644
--- a/keyboards/helix/rev2/keymaps/default/rules.mk
+++ b/keyboards/helix/rev2/keymaps/default/rules.mk
@@ -5,7 +5,7 @@
# See TOP/keyboards/helix/rules.mk for a list of options that can be set.
# See TOP/docs/config_options.md for more information.
#
-LTO_ENABLE = no # if firmware size over limit, try this option
+LTO_ENABLE = yes # if firmware size over limit, try this option
# Helix Spacific Build Options
# you can uncomment and edit follows 7 Variables
diff --git a/keyboards/helix/rev2/keymaps/five_rows_jis/keymap.c b/keyboards/helix/rev2/keymaps/five_rows_jis/keymap.c
index 0dae2524d8..a22a4b1663 100644
--- a/keyboards/helix/rev2/keymaps/five_rows_jis/keymap.c
+++ b/keyboards/helix/rev2/keymaps/five_rows_jis/keymap.c
@@ -72,7 +72,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/
[_BASE] = LAYOUT( \
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, \
- JP_ZHTG, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JP_AT, \
+ JP_ZKHK, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JP_AT, \
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, JP_COLN, \
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_ENT, \
KC_LCTL, KC_LALT, KC_LGUI, ML_ADJ, ML_LOW, KC_SPC, KC_BSPC, KC_SPC, KC_SPC, ML_RAI, KC_APP, KC_LEFT, KC_DOWN, KC_RGHT \
@@ -95,7 +95,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, \
KC_Y, KC_U, KC_I, KC_O, KC_P, JP_AT, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, \
KC_H, KC_J, KC_K, KC_L, KC_SCLN, JP_COLN, XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, \
- KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_UP, KC_ENT, JP_ZHTG, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, \
+ KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_UP, KC_ENT, JP_ZKHK, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, \
KC_SPC, ML_RAIE, JP_RBRC, KC_APP, KC_LEFT, KC_DOWN, KC_RGHT, ML_ADJ, KC_LCTL, KC_LALT, KC_LGUI, JP_LBRC, ML_LOWE, KC_BSPC \
),
diff --git a/keyboards/helix/rev2/keymaps/froggy_106/keymap.c b/keyboards/helix/rev2/keymaps/froggy_106/keymap.c
index d32c4fa0ca..3a433e56fd 100644
--- a/keyboards/helix/rev2/keymaps/froggy_106/keymap.c
+++ b/keyboards/helix/rev2/keymaps/froggy_106/keymap.c
@@ -103,7 +103,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
OSM(MOD_LCTL), OSM(MOD_LALT), OSM(MOD_LGUI), L_SYM, L_NUM, OPT_TAP_SP, KC_ENT, _______, _______, _______, _______, _______, _______, _______ \
),
[_BASE_106] = LAYOUT( \
- LCTL(KC_Z), JP_SCLN, JP_LBRC, JP_LPRN, JP_LT, JP_LCBR, _______, _______, _______, _______, _______, _______, \
+ LCTL(KC_Z), JP_SCLN, JP_LBRC, JP_LPRN, JP_LABK, JP_LCBR, _______, _______, _______, _______, _______, _______, \
KANA, KC_P, KC_K, KC_R, KC_A, KC_F, _______, _______, _______, _______, _______, _______, \
KC_BSPC, KC_D, KC_T, KC_H, KC_E, KC_O, _______, _______, _______, _______, _______, _______, \
OSM(MOD_LSFT), KC_Y, KC_S, KC_N, KC_I, KC_U, KC_SPC, _______, _______, _______, _______, _______, _______, _______, \
@@ -131,7 +131,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, _______,_______, KC_COMM,DESKTOP, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
),
[_OPT_106] = LAYOUT( \
- KC_ESC, JP_COLN,JP_RBRC, JP_RPRN,JP_GT, JP_RCBR, _______, _______, _______, _______, _______, _______, \
+ KC_ESC, JP_COLN,JP_RBRC, JP_RPRN,JP_RABK, JP_RCBR, _______, _______, _______, _______, _______, _______, \
EISU, KC_J, KC_M, KC_B, JP_QUOT, KC_TAB, _______, _______, _______, _______, _______, _______, \
KC_DOT, KC_V, KC_C, KC_L, KC_Z, KC_Q, _______, _______, _______, _______, _______, _______, \
_______, KC_X, KC_G, KC_W, JP_MINS, KC_DEL, KC_ESC, _______, _______, _______, _______, _______, _______, _______, \
@@ -363,7 +363,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
//case JP_SCLN: // == KC_SCLN
case JP_LBRC:
case JP_LPRN:
- //case JP_LT: // == KC_LT
+ //case JP_LABK: // == KC_LT
case JP_LCBR:
if (IS_MODE_106()) {
if (keycode == KC_LBRC || keycode == KC_LPRN || keycode == KC_LCBR)
diff --git a/keyboards/helix/rev3_4rows/config.h b/keyboards/helix/rev3_4rows/config.h
index 9102104bfc..95eb8bf0cf 100644
--- a/keyboards/helix/rev3_4rows/config.h
+++ b/keyboards/helix/rev3_4rows/config.h
@@ -68,7 +68,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
# define RGB_MATRIX_KEYPRESSES // reacts to keypresses
// # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
// # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
# define RGB_MATRIX_FRAMEBUFFER_EFFECTS
// # define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness)
// # 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)
diff --git a/keyboards/helix/rev3_4rows/rev3_4rows.c b/keyboards/helix/rev3_4rows/rev3_4rows.c
index c034c83381..884c244e30 100644
--- a/keyboards/helix/rev3_4rows/rev3_4rows.c
+++ b/keyboards/helix/rev3_4rows/rev3_4rows.c
@@ -30,7 +30,7 @@ void set_mac_mode(bool macmode) {
eeconfig_update_keymap(keymap_config.raw);
}
-void dip_switch_update_kb(uint8_t index, bool active) {
+bool dip_switch_update_kb(uint8_t index, bool active) {
switch (index) {
case 0:
if(active) { // Left no.1 Helix rev3 common
@@ -43,4 +43,5 @@ void dip_switch_update_kb(uint8_t index, bool active) {
dip_switch_update_user(index, active);
break;
}
+ return true;
}
diff --git a/keyboards/helix/rev3_5rows/config.h b/keyboards/helix/rev3_5rows/config.h
index 4dda76206b..a373de7d12 100644
--- a/keyboards/helix/rev3_5rows/config.h
+++ b/keyboards/helix/rev3_5rows/config.h
@@ -68,7 +68,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
# define RGB_MATRIX_KEYPRESSES // reacts to keypresses
// # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
// # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
# define RGB_MATRIX_FRAMEBUFFER_EFFECTS
// # define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness)
// # 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)
diff --git a/keyboards/helix/rev3_5rows/rev3_5rows.c b/keyboards/helix/rev3_5rows/rev3_5rows.c
index c034c83381..884c244e30 100644
--- a/keyboards/helix/rev3_5rows/rev3_5rows.c
+++ b/keyboards/helix/rev3_5rows/rev3_5rows.c
@@ -30,7 +30,7 @@ void set_mac_mode(bool macmode) {
eeconfig_update_keymap(keymap_config.raw);
}
-void dip_switch_update_kb(uint8_t index, bool active) {
+bool dip_switch_update_kb(uint8_t index, bool active) {
switch (index) {
case 0:
if(active) { // Left no.1 Helix rev3 common
@@ -43,4 +43,5 @@ void dip_switch_update_kb(uint8_t index, bool active) {
dip_switch_update_user(index, active);
break;
}
+ return true;
}
diff --git a/keyboards/hhkb/ansi/keymaps/shela/keymap_jis2us.h b/keyboards/hhkb/ansi/keymaps/shela/keymap_jis2us.h
index 916a403eb6..0b811fd03a 100644
--- a/keyboards/hhkb/ansi/keymaps/shela/keymap_jis2us.h
+++ b/keyboards/hhkb/ansi/keymaps/shela/keymap_jis2us.h
@@ -40,10 +40,10 @@ const uint16_t PROGMEM keymap_jis2us[][2] = {
[KC_BSLS] = { JP_YEN, JP_PIPE }, /* ] and } -> \ and | */
[KC_NUHS] = { JP_YEN, JP_PIPE }, /* ] and } -> \ and | */
[KC_SCLN] = { JP_SCLN, JP_COLN }, /* ; and + -> ; and : */
- [KC_QUOT] = { JP_QUOT, JP_DQT }, /* : and * -> ' and " */
+ [KC_QUOT] = { JP_QUOT, JP_DQUO }, /* : and * -> ' and " */
[KC_GRV] = { JP_GRV, JP_TILD }, /* Han/Zen -> ` and ~ */
- [KC_COMM] = { JP_COMM, JP_LT }, /* , and < -> , and < */
- [KC_DOT] = { JP_DOT, JP_GT }, /* . and > -> . and > */
+ [KC_COMM] = { JP_COMM, JP_LABK }, /* , and < -> , and < */
+ [KC_DOT] = { JP_DOT, JP_RABK }, /* . and > -> . and > */
[KC_SLSH] = { JP_SLSH, JP_QUES }, /* / and ? -> / and ? */
};
// clang-format on
diff --git a/keyboards/hineybush/h87a/keymaps/gam3cat/rules.mk b/keyboards/hineybush/h87a/keymaps/gam3cat/rules.mk
index 8ac43eadbc..a54fb01f97 100644
--- a/keyboards/hineybush/h87a/keymaps/gam3cat/rules.mk
+++ b/keyboards/hineybush/h87a/keymaps/gam3cat/rules.mk
@@ -18,6 +18,5 @@ UNICODEMAP_ENABLE = no # Enable extended unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
AUDIO_ENABLE = no # Audio output on port C6
#VARIABLE_TRACE = no # Use this to debug changes to variable values
-API_SYSEX_ENABLE = no # This enables using the Quantum SYSEX API to send strings(+5390)
KEY_LOCK_ENABLE = no # This enables key lock(+260)
SPLIT_KEYBOARD = no # This enables split keyboard support and includes all necessary files located at quantum/split_common
diff --git a/keyboards/hs60/v1/config.h b/keyboards/hs60/v1/config.h
index 68c75b2af0..41246b6ee8 100644
--- a/keyboards/hs60/v1/config.h
+++ b/keyboards/hs60/v1/config.h
@@ -118,7 +118,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#define RGB_MATRIX_KEYPRESSES // reacts to keypresses (will slow down matrix scan by a lot)
#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-#define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended
+// #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 215
#define DRIVER_ADDR_1 0b1110100
diff --git a/keyboards/infinity60/keymaps/jpetermans/keymap.c b/keyboards/infinity60/keymaps/jpetermans/keymap.c
index c34d56ec85..3c2e0d4da8 100644
--- a/keyboards/infinity60/keymaps/jpetermans/keymap.c
+++ b/keyboards/infinity60/keymaps/jpetermans/keymap.c
@@ -11,20 +11,25 @@
//IS31 chip has 8 available led pages, using 0 for all leds and 7 for single toggles
#define max_pages 6
-enum ic60_keycodes {
- NUMPAD,
- FNAV,
- MEDIA,
- BACKLIGHT,
- BRIGHT,
- DIM,
- ALL,
- GAME,
+enum led_modes {
+ MODE_ALL,
+ MODE_GAME,
MODE_SINGLE,
MODE_PAGE,
MODE_FLASH
};
+enum macro_id {
+ LED_ALL = SAFE_RANGE,
+ LED_GAME,
+ LED_BACKLIGHT,
+ LED_BRIGHT,
+ LED_DIM,
+ LED_SINGLE,
+ LED_PAGE,
+ LED_FLASH
+};
+
uint8_t current_layer_global = 0;
uint8_t led_mode_global = MODE_SINGLE;
uint8_t backlight_status_global = 1; //init on/off state of backlight
@@ -77,10 +82,10 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* media */
[_MEDIA] = LAYOUT_60_ansi_split_bs_rshift( \
- _______,F(MODE_SINGLE),F(MODE_PAGE),F(MODE_FLASH),_______,_______,_______, _______, _______, _______,KC_MUTE, KC_VOLD, KC_VOLU,_______,KC_NO,\
+ _______,LED_SINGLE,LED_PAGE,LED_FLASH,_______,_______,_______, _______, _______, _______,KC_MUTE, KC_VOLD, KC_VOLU,_______,KC_NO,\
_______,_______,_______,_______,_______,_______,_______, _______, _______, _______,_______, _______,_______,_______,\
- _______,_______,_______,_______,_______,F(GAME),_______, _______, _______, _______,_______, _______,_______, \
- _______,_______,F(ALL) ,F(BRIGHT),F(DIM),F(BACKLIGHT),_______, _______, KC_MPRV, KC_MNXT,KC_MSTP, _______,KC_NO, \
+ _______,_______,_______,_______,_______,LED_GAME,_______, _______, _______, _______,_______, _______,_______, \
+ _______,_______,LED_ALL ,LED_BRIGHT,LED_DIM,LED_BACKLIGHT,_______, _______, KC_MPRV, KC_MNXT,KC_MSTP, _______,KC_NO, \
_______,_______,_______, KC_MPLY, _______,_______, _______,_______ \
),
/* ~ */
@@ -101,22 +106,6 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
};
-//id for user defined functions and macros
-enum function_id {
- NONE,
-};
-
-enum macro_id {
- ACTION_LEDS_ALL,
- ACTION_LEDS_GAME,
- ACTION_LEDS_BACKLIGHT,
- ACTION_LEDS_BRIGHT,
- ACTION_LEDS_DIM,
- ACTION_LEDS_SINGLE,
- ACTION_LEDS_PAGE,
- ACTION_LEDS_FLASH
-};
-
/* ==================================
* LED MAPPING
* ==================================*/
@@ -158,74 +147,62 @@ uint8_t led_game[5] = {
47,48,51
};
-//======== qmk functions =========
-const uint16_t fn_actions[] = {
- [ALL] = ACTION_FUNCTION(ACTION_LEDS_ALL),
- [GAME] = ACTION_FUNCTION(ACTION_LEDS_GAME),
- [BACKLIGHT] = ACTION_FUNCTION(ACTION_LEDS_BACKLIGHT),
- [BRIGHT] = ACTION_FUNCTION(ACTION_LEDS_BRIGHT),
- [DIM] = ACTION_FUNCTION(ACTION_LEDS_DIM),
- [MODE_SINGLE] = ACTION_FUNCTION(ACTION_LEDS_SINGLE),
- [MODE_PAGE] = ACTION_FUNCTION(ACTION_LEDS_PAGE),
- [MODE_FLASH] = ACTION_FUNCTION(ACTION_LEDS_FLASH),
-};
-
-/* custom action function */
-void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
msg_t msg;
- switch(id) {
- case ACTION_LEDS_ALL:
+ switch(keycode) {
+ case LED_ALL:
if(record->event.pressed) {
- led_mode_global = led_mode_global == ALL ? MODE_SINGLE : ALL;
+ led_mode_global = led_mode_global == MODE_ALL ? MODE_SINGLE : MODE_ALL;
msg=TOGGLE_ALL;
chMBPost(&led_mailbox, msg, TIME_IMMEDIATE);
}
- break;
+ return false;
- case ACTION_LEDS_BACKLIGHT:
+ case LED_BACKLIGHT:
if(record->event.pressed) {
backlight_status_global ^= 1;
msg=(backlight_status_global << 8) | TOGGLE_BACKLIGHT;
chMBPost(&led_mailbox, msg, TIME_IMMEDIATE);
}
- break;
+ return false;
- case ACTION_LEDS_GAME:
+ case LED_GAME:
if(record->event.pressed) {
- led_mode_global = led_mode_global == GAME ? MODE_SINGLE : GAME;
+ led_mode_global = led_mode_global == MODE_GAME ? MODE_SINGLE : MODE_GAME;
msg=(4 << 8) | DISPLAY_PAGE;
chMBPost(&led_mailbox, msg, TIME_IMMEDIATE);
}
- break;
+ return false;
- case ACTION_LEDS_BRIGHT:
+ case LED_BRIGHT:
if(record->event.pressed) {
msg=(1 << 8) | STEP_BRIGHTNESS;
chMBPost(&led_mailbox, msg, TIME_IMMEDIATE);
}
- break;
+ return false;
- case ACTION_LEDS_DIM:
+ case LED_DIM:
if(record->event.pressed) {
msg=(0 << 8) | STEP_BRIGHTNESS;
chMBPost(&led_mailbox, msg, TIME_IMMEDIATE);
}
- break;
+ return false;
//set led_mode for matrix_scan to toggle leds
- case ACTION_LEDS_SINGLE:
+ case LED_SINGLE:
led_mode_global = MODE_SINGLE;
- break;
- case ACTION_LEDS_PAGE:
+ return false;
+ case LED_PAGE:
led_mode_global = MODE_PAGE;
- break;
- case ACTION_LEDS_FLASH:
+ return false;
+ case LED_FLASH:
led_mode_global = MODE_FLASH;
- break;
+ return false;
}
+ return true;
}
// Runs just one time when the keyboard initializes.
@@ -257,7 +234,7 @@ void matrix_scan_user(void) {
return;
}
- if (led_layer_state != layer_state && led_mode_global != GAME && led_mode_global != ALL) {
+ if (led_layer_state != layer_state && led_mode_global != MODE_GAME && led_mode_global != MODE_ALL) {
//check mode
//Turn on layer indicator or page depending on mode
switch(led_mode_global) {
diff --git a/keyboards/ivy/rules.mk b/keyboards/ivy/rules.mk
index 97c9aa1364..e3499b6306 100644
--- a/keyboards/ivy/rules.mk
+++ b/keyboards/ivy/rules.mk
@@ -27,7 +27,6 @@ AUDIO_ENABLE = no # Audio output on port C6
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
-API_SYSEX_ENABLE = no
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
diff --git a/keyboards/jc65/v32u4/keymaps/gam3cat/rules.mk b/keyboards/jc65/v32u4/keymaps/gam3cat/rules.mk
index aaffae573b..e0bce1611d 100644
--- a/keyboards/jc65/v32u4/keymaps/gam3cat/rules.mk
+++ b/keyboards/jc65/v32u4/keymaps/gam3cat/rules.mk
@@ -17,6 +17,5 @@ UNICODE_ENABLE = no # Unicode
UNICODEMAP_ENABLE = no # Enable extended unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
AUDIO_ENABLE = no # Audio output on port C6#VARIABLE_TRACE = no # Use this to debug changes to variable values
-API_SYSEX_ENABLE = no # This enables using the Quantum SYSEX API to send strings(+5390)
KEY_LOCK_ENABLE = no # This enables key lock(+260)
SPLIT_KEYBOARD = no # This enables split keyboard support and includes all necessary files located at quantum/split_common
diff --git a/keyboards/jisplit89/keymaps/salicylic/keymap.c b/keyboards/jisplit89/keymaps/salicylic/keymap.c
index a4c7c99f1d..ffd3b853b5 100644
--- a/keyboards/jisplit89/keymaps/salicylic/keymap.c
+++ b/keyboards/jisplit89/keymaps/salicylic/keymap.c
@@ -84,7 +84,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------|
JP_QUOT, JP_EXLM, JP_QUES, JP_LBRC, JP_RBRC, JP_TILD, KC_P6, KC_P7, KC_P8, KC_P9, JP_ASTR, JP_SLSH, _______, _______, KC_HOME,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------|
-LCTL_T(JP_QUOT),JP_HASH, JP_DQT, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_P4, KC_P5, KC_P6, JP_MINS, JP_EQL, _______, KC_END,
+LCTL_T(JP_QUOT),JP_HASH,JP_DQUO, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_P4, KC_P5, KC_P6, JP_MINS, JP_EQL, _______, KC_END,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------|
SFT_T(JP_CIRC),JP_PERC, JP_AMPR, JP_SCLN, JP_COLN, JP_PIPE, KC_P0, KC_P1, KC_P2, KC_P3, JP_PLUS, _______, KC_PGDN, KC_UP, KC_PGUP,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------|
diff --git a/keyboards/jj40/keymaps/skewwhiffy/keymap.c b/keyboards/jj40/keymaps/skewwhiffy/keymap.c
index 6b193a15cb..e6eef65d50 100644
--- a/keyboards/jj40/keymaps/skewwhiffy/keymap.c
+++ b/keyboards/jj40/keymaps/skewwhiffy/keymap.c
@@ -56,19 +56,19 @@ enum Layers {
// Custom hotkeys
#define _TERM LCTL(UK_QUOT) // Hotkey for terminal
-#define _S_TAB S(UK_TAB)
-#define _C_LEFT LCTL(UK_LEFT)
-#define _C_RGHT LCTL(UK_RGHT)
-#define _A_LEFT LALT(UK_LEFT)
-#define _A_RGHT LALT(UK_RGHT)
+#define _S_TAB S(KC_TAB)
+#define _C_LEFT LCTL(KC_LEFT)
+#define _C_RGHT LCTL(KC_RGHT)
+#define _A_LEFT LALT(KC_LEFT)
+#define _A_RGHT LALT(KC_RGHT)
// Custom hotkeys
#define _TERM LCTL(UK_QUOT) // Hotkey for terminal
-#define _S_TAB S(UK_TAB)
-#define _C_LEFT LCTL(UK_LEFT)
-#define _C_RGHT LCTL(UK_RGHT)
-#define _A_LEFT LALT(UK_LEFT)
-#define _A_RGHT LALT(UK_RGHT)
+#define _S_TAB S(KC_TAB)
+#define _C_LEFT LCTL(KC_LEFT)
+#define _C_RGHT LCTL(KC_RGHT)
+#define _A_LEFT LALT(KC_LEFT)
+#define _A_RGHT LALT(KC_RGHT)
enum custom_keycodes {
IJ_OMN = SAFE_RANGE // IntelliJ Omnibox
@@ -92,7 +92,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
UK_Q, UK_W, UK_F, UK_P, UK_G, _______, _______, UK_J, UK_L, UK_U, UK_Y, UK_SCLN, \
UK_A, UK_R, UK_S, UK_T, UK_D, _______, _______, UK_H, UK_N, UK_E, UK_I, UK_O, \
_Z_SFT, _X_NB, _C_SY, _V_NAL, UK_B, _______, _______, UK_K, _M_NAR, _COM_SY, _DOT_NB, _SLSH, \
- UK_LSFT, UK_LCTL, UK_LALT, UK_LGUI, UK_SPC, UK_ENT, UK_DEL, UK_BSPC, UK_RGUI, UK_RALT, UK_RCTL, UK_RSFT \
+ KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_ENT, KC_DEL, KC_BSPC, KC_RGUI, KC_RALT, KC_RCTL, KC_RSFT \
),
/* Dvorak
@@ -145,15 +145,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* '-----------------------------------------------------------------------------------------------------------'
*/
[nbl] = LAYOUT_ortho_4x12( \
- _______, UK_F7, UK_F8, UK_F9, UK_F10, _______, _______, _______, UK_7, UK_8, UK_9, _______, \
- _______, UK_F4, UK_F5, UK_F6, UK_F11, _______, _______, _______, UK_4, UK_5, UK_6, _______, \
- _______, __NBL, UK_F2, UK_F3, UK_F12, _______, _______, UK_0, UK_1, UK_2, UK_3, UK_DOT, \
+ _______, KC_F7, KC_F8, KC_F9, KC_F10, _______, _______, _______, UK_7, UK_8, UK_9, _______, \
+ _______, KC_F4, KC_F5, KC_F6, KC_F11, _______, _______, _______, UK_4, UK_5, UK_6, _______, \
+ _______, __NBL, KC_F2, KC_F3, KC_F12, _______, _______, UK_0, UK_1, UK_2, UK_3, UK_DOT, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
),
[nbr] = LAYOUT_ortho_4x12( \
- _______, UK_F7, UK_F8, UK_F9, UK_F10, _______, _______, _______, UK_7, UK_8, UK_9, _______, \
- _______, UK_F4, UK_F5, UK_F6, UK_F11, _______, _______, _______, UK_4, UK_5, UK_6, _______, \
- _______, UK_F1, UK_F2, UK_F3, UK_F12, _______, _______, UK_0, UK_1, UK_2, __NBR, UK_DOT, \
+ _______, KC_F7, KC_F8, KC_F9, KC_F10, _______, _______, _______, UK_7, UK_8, UK_9, _______, \
+ _______, KC_F4, KC_F5, KC_F6, KC_F11, _______, _______, _______, UK_4, UK_5, UK_6, _______, \
+ _______, KC_F1, KC_F2, KC_F3, KC_F12, _______, _______, UK_0, UK_1, UK_2, __NBR, UK_DOT, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
),
@@ -194,15 +194,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* '-----------------------------------------------------------------------------------------------------------'
*/
[nal] = LAYOUT_ortho_4x12( \
- UK_ESC, _C_LEFT, UK_UP, _C_RGHT, RGB_RMOD,RGB_HUD, RGB_HUI, RGB_TOG, UK_PSCR, UK_SLCK, UK_PAUS, DF(dv), \
- UK_TAB, UK_LEFT, UK_DOWN, UK_RGHT, RGB_MOD, RGB_SAD, RGB_SAI, DF(cm), UK_INS, UK_HOME, UK_PGUP, _TERM, \
- _S_TAB, _A_LEFT, IJ_OMN, __NAL, _______, RGB_VAD, RGB_VAI, _______, UK_SLCK, UK_END, UK_PGDN, DF(qw), \
+ KC_ESC, _C_LEFT, KC_UP, _C_RGHT, RGB_RMOD,RGB_HUD, RGB_HUI, RGB_TOG, KC_PSCR, KC_SLCK, KC_PAUS, DF(dv), \
+ KC_TAB, KC_LEFT, KC_DOWN, KC_RGHT, RGB_MOD, RGB_SAD, RGB_SAI, DF(cm), KC_INS, KC_HOME, KC_PGUP, _TERM, \
+ _S_TAB, _A_LEFT, IJ_OMN, __NAL, _______, RGB_VAD, RGB_VAI, _______, KC_SLCK, KC_END, KC_PGDN, DF(qw), \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
),
[nar] = LAYOUT_ortho_4x12( \
- UK_ESC, _C_LEFT, UK_UP, _C_RGHT, RGB_RMOD,RGB_HUD, RGB_HUI, RGB_TOG, UK_PSCR, UK_SLCK, UK_PAUS, DF(dv), \
- UK_TAB, UK_LEFT, UK_DOWN, UK_RGHT, RGB_MOD, RGB_SAD, RGB_SAI, DF(cm), UK_INS, UK_HOME, UK_PGUP, _TERM, \
- _S_TAB, _A_LEFT, IJ_OMN, _A_RGHT, _______, RGB_VAD, RGB_VAI, _______, __NAR, UK_END, UK_PGDN, DF(qw), \
+ KC_ESC, _C_LEFT, KC_UP, _C_RGHT, RGB_RMOD,RGB_HUD, RGB_HUI, RGB_TOG, KC_PSCR, KC_SLCK, KC_PAUS, DF(dv), \
+ KC_TAB, KC_LEFT, KC_DOWN, KC_RGHT, RGB_MOD, RGB_SAD, RGB_SAI, DF(cm), KC_INS, KC_HOME, KC_PGUP, _TERM, \
+ _S_TAB, _A_LEFT, IJ_OMN, _A_RGHT, _______, RGB_VAD, RGB_VAI, _______, __NAR, KC_END, KC_PGDN, DF(qw), \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
),
};
diff --git a/keyboards/kbdfans/bella/rgb/config.h b/keyboards/kbdfans/bella/rgb/config.h
index f56049690b..07594a34ab 100644
--- a/keyboards/kbdfans/bella/rgb/config.h
+++ b/keyboards/kbdfans/bella/rgb/config.h
@@ -37,7 +37,7 @@
/* disable these deprecated features by default */
#ifdef RGB_MATRIX_ENABLE
#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
#define RGB_MATRIX_KEYPRESSES
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
#define RGB_MATRIX_LED_PROCESS_LIMIT 4
diff --git a/keyboards/kbdfans/bella/rgb_iso/config.h b/keyboards/kbdfans/bella/rgb_iso/config.h
index fc7a9d7c08..4fda998677 100644
--- a/keyboards/kbdfans/bella/rgb_iso/config.h
+++ b/keyboards/kbdfans/bella/rgb_iso/config.h
@@ -37,7 +37,7 @@
/* disable these deprecated features by default */
#ifdef RGB_MATRIX_ENABLE
#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
#define RGB_MATRIX_KEYPRESSES
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
#define RGB_MATRIX_LED_PROCESS_LIMIT 4
diff --git a/keyboards/kbdfans/kbd67/mkiirgb/v1/config.h b/keyboards/kbdfans/kbd67/mkiirgb/v1/config.h
index a832110d3c..b0b7e1dad2 100644
--- a/keyboards/kbdfans/kbd67/mkiirgb/v1/config.h
+++ b/keyboards/kbdfans/kbd67/mkiirgb/v1/config.h
@@ -16,9 +16,9 @@
#define RGB_MATRIX_LED_FLUSH_LIMIT 26
#define DEBOUNCE 3
#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
#define RGB_MATRIX_KEYPRESSES
-#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
+#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
#define DISABLE_RGB_MATRIX_BAND_SAT
#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT
diff --git a/keyboards/kbdfans/kbd67/mkiirgb/v2/config.h b/keyboards/kbdfans/kbd67/mkiirgb/v2/config.h
index 1ac9c770db..51e732f101 100644
--- a/keyboards/kbdfans/kbd67/mkiirgb/v2/config.h
+++ b/keyboards/kbdfans/kbd67/mkiirgb/v2/config.h
@@ -16,10 +16,10 @@
#define RGB_MATRIX_LED_FLUSH_LIMIT 26
#define DEBOUNCE 3
#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
#define RGB_MATRIX_KEYPRESSES
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL
-#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
+#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
#define DISABLE_RGB_MATRIX_BAND_SAT
#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT
diff --git a/keyboards/kbdfans/kbd67/rev1/keymaps/default/config.h b/keyboards/kbdfans/kbd67/rev1/keymaps/default/config.h
index a3ed4f762a..90fb10ebbe 100644
--- a/keyboards/kbdfans/kbd67/rev1/keymaps/default/config.h
+++ b/keyboards/kbdfans/kbd67/rev1/keymaps/default/config.h
@@ -16,4 +16,4 @@
#pragma once
-// place overrides here
+#define LAYER_STATE_8BIT
diff --git a/keyboards/kbdfans/kbd67/rev2/info.json b/keyboards/kbdfans/kbd67/rev2/info.json
index b5cc796544..208a13c586 100644
--- a/keyboards/kbdfans/kbd67/rev2/info.json
+++ b/keyboards/kbdfans/kbd67/rev2/info.json
@@ -235,7 +235,7 @@
{"x":14, "y":4},
{"x":15, "y":4}]
},
- "LAYOUT_65_ansi_blocker_splitbs": {
+ "LAYOUT_65_ansi_blocker_split_bs": {
"layout": [
{"x":0, "y":0},
{"x":1, "y":0},
diff --git a/keyboards/kbdfans/kbd6x/keymaps/othi/keymap.c b/keyboards/kbdfans/kbd6x/keymaps/othi/keymap.c
index 1e0fc8ad7e..7bf6d06117 100644
--- a/keyboards/kbdfans/kbd6x/keymaps/othi/keymap.c
+++ b/keyboards/kbdfans/kbd6x/keymaps/othi/keymap.c
@@ -29,13 +29,13 @@
void eeconfig_init_user(void) {
set_unicode_input_mode(UC_LNX);
}
-#define DE_AE UC(0x00E4)
-#define DE_SS UC(0x00DF)
-#define DE_OE UC(0x00F6)
-#define DE_UE UC(0x00FC)
-#define DE_AE_CAP UC(0x00C4)
-#define DE_OE_CAP UC(0x00D6)
-#define DE_UE_CAP UC(0x00DC)
+#define DE_ADIA UC(0x00E4)
+#define DE_SS UC(0x00DF)
+#define DE_ODIA UC(0x00F6)
+#define DE_UDIA UC(0x00FC)
+#define DE_ADIA_CAP UC(0x00C4)
+#define DE_ODIA_CAP UC(0x00D6)
+#define DE_UDIA_CAP UC(0x00DC)
uint32_t layer_state_set_user(uint32_t state) {
switch (biton32(state)) {
@@ -174,15 +174,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
[ACCENT] = LAYOUT(
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______,
- _______, RGB_TOG, RGB_MODE_PLAIN, _______, _______, _______, _______, _______, DE_UE, _______, _______, _______, _______, _______,
- _______, DE_AE, UC_Z, DE_SS, _______, _______, _______, _______, _______, _______, DE_OE, _______, _______,
+ _______, RGB_TOG, RGB_MODE_PLAIN, _______, _______, _______, _______, _______, DE_UDIA, _______, _______, _______, _______, _______,
+ _______, DE_ADIA, UC_Z, DE_SS, _______, _______, _______, _______, _______, _______, DE_ODIA, _______, _______,
OSL(ACCENT_CAP), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, TO(CL),
_______, _______, _______, _______, _______, _______, _______
),
[ACCENT_CAP] = LAYOUT(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, DE_UE_CAP, _______, _______, _______, _______, _______,
- _______, DE_AE_CAP, _______, DE_SS, _______, _______, _______, _______, _______, _______, DE_OE_CAP, _______, TO(CL),
+ _______, _______, _______, _______, _______, _______, _______, _______, DE_UDIA_CAP, _______, _______, _______, _______, _______,
+ _______, DE_ADIA_CAP, _______, DE_SS, _______, _______, _______, _______, _______, _______, DE_ODIA_CAP, _______, TO(CL),
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______
),
diff --git a/keyboards/kbdfans/kbd75/keymaps/adit/keymap.c b/keyboards/kbdfans/kbd75/keymaps/adit/keymap.c
index 7785157880..af4243c49d 100644
--- a/keyboards/kbdfans/kbd75/keymaps/adit/keymap.c
+++ b/keyboards/kbdfans/kbd75/keymaps/adit/keymap.c
@@ -1,7 +1,5 @@
#include QMK_KEYBOARD_H
-#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))
-
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(
@@ -23,37 +21,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
-
-enum function_id {
- SHIFT_ESC,
-};
-
-const uint16_t PROGMEM fn_actions[] = {
- [0] = ACTION_FUNCTION(SHIFT_ESC),
-};
-
-void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
- static uint8_t shift_esc_shift_mask;
- switch (id) {
- case SHIFT_ESC:
- shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK;
- if (record->event.pressed) {
- if (shift_esc_shift_mask) {
- add_key(KC_GRV);
- send_keyboard_report();
- } else {
- add_key(KC_ESC);
- send_keyboard_report();
- }
- } else {
- if (shift_esc_shift_mask) {
- del_key(KC_GRV);
- send_keyboard_report();
- } else {
- del_key(KC_ESC);
- send_keyboard_report();
- }
- }
- break;
- }
-}
diff --git a/keyboards/kbdfans/kbdmini/config.h b/keyboards/kbdfans/kbdmini/config.h
index 5a36e983d1..fc65f43411 100644
--- a/keyboards/kbdfans/kbdmini/config.h
+++ b/keyboards/kbdfans/kbdmini/config.h
@@ -35,7 +35,7 @@
#ifdef RGB_MATRIX_ENABLE
#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
#define RGB_MATRIX_KEYPRESSES
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
diff --git a/keyboards/kbdfans/maja/config.h b/keyboards/kbdfans/maja/config.h
index d8553766bb..3722c8381d 100755
--- a/keyboards/kbdfans/maja/config.h
+++ b/keyboards/kbdfans/maja/config.h
@@ -18,9 +18,9 @@
#define RGB_MATRIX_LED_FLUSH_LIMIT 26
#define DEBOUNCE 3
#define RGB_DISABLE_AFTER_TIMEOUT 0
-#define RGB_DISABLE_WHEN_USB_SUSPENDED true
+#define RGB_DISABLE_WHEN_USB_SUSPENDED
#define RGB_MATRIX_KEYPRESSES
-#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
+#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
#define DISABLE_RGB_MATRIX_BAND_SAT
#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT
diff --git a/keyboards/kc60/keymaps/stanleylai/keymap.c b/keyboards/kc60/keymaps/stanleylai/keymap.c
index 887b5da728..54428f2875 100644
--- a/keyboards/kc60/keymaps/stanleylai/keymap.c
+++ b/keyboards/kc60/keymaps/stanleylai/keymap.c
@@ -16,7 +16,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// Base Default Layer
// Mac Modifier Layout. Use BootMagic to toggle GUI and ALT positions.
[_BL] = LAYOUT(
- F(0), 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_BSPC, \
+ KC_GESC, 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_BSPC, \
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_BSLS, \
LT(_FL, KC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_NO, KC_ENT, \
KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, MO(_FL), KC_UP, \
@@ -46,39 +46,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_NO, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS),
#endif
};
-
-
-enum function_id {
- SHIFT_ESC,
-};
-
-const uint16_t PROGMEM fn_actions[] = {
- [0] = ACTION_FUNCTION(SHIFT_ESC),
-};
-
-#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))
-void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
- static uint8_t shift_esc_shift_mask;
- switch (id) {
- case SHIFT_ESC:
- shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK;
- if (record->event.pressed) {
- if (shift_esc_shift_mask) {
- add_key(KC_GRV);
- send_keyboard_report();
- } else {
- add_key(KC_ESC);
- send_keyboard_report();
- }
- } else {
- if (shift_esc_shift_mask) {
- del_key(KC_GRV);
- send_keyboard_report();
- } else {
- del_key(KC_ESC);
- send_keyboard_report();
- }
- }
- break;
- }
-}
diff --git a/keyboards/keebio/iris/keymaps/antonlindstrom/keymap.c b/keyboards/keebio/iris/keymaps/antonlindstrom/keymap.c
index ce2fee792a..ff98545ba3 100644
--- a/keyboards/keebio/iris/keymaps/antonlindstrom/keymap.c
+++ b/keyboards/keebio/iris/keymaps/antonlindstrom/keymap.c
@@ -13,10 +13,6 @@
#define KC_RASE MO(_RAISE)
#define KC_RST RESET
-#define KC_AA SE_AA
-#define KC_AE SE_AE
-#define KC_OE SE_OSLH
-
#define KC_LBR SE_LBRC
#define KC_RBR SE_RBRC
@@ -26,9 +22,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
KC_ESC , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 ,KC_BSPC,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
- KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_AA ,
+ KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , SE_ARNG ,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
- KC_LSFT, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_OE , KC_AE ,
+ KC_LSFT, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , SE_ODIA , SE_ADIA ,
//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
KC_LCTL, KC_Z , KC_X , KC_C , KC_V , KC_B ,KC_LBR ,KC_RBR , KC_N , KC_M ,KC_COMM,KC_DOT ,KC_SLSH,KC_MINS,
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
@@ -42,7 +38,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
SE_ACUT,RGB_TOG,RGB_MOD,RGB_M_B,RGB_M_K,_______, _______,_______,_______,_______,_______,SE_ASTR,
//|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
- _______,_______,SE_LESS,SE_GRTR,SE_PIPE,SE_SLSH, SE_BSLS,SE_LCBR,SE_RCBR,SE_LBRC,SE_RBRC,SE_APOS,
+ _______,_______,SE_LABK,SE_RABK,SE_PIPE,SE_SLSH, SE_BSLS,SE_LCBR,SE_RCBR,SE_LBRC,SE_RBRC,SE_QUOT,
//|-------+-------+-------+-------+-------+-------+-------. ,-------|-------+-------+-------+-------+-------+-------|
_______,KC_NUBS,_______,_______,_______,_______,SE_LCBR, SE_RCBR,_______,_______,_______,_______,_______,_______,
//`-------+-------+-------+--+----+-------+-------+-------/ \-------+-------+-------+-------+-------+-------+-------'
diff --git a/keyboards/keebio/iris/keymaps/olligranlund_nordic/keymap.c b/keyboards/keebio/iris/keymaps/olligranlund_nordic/keymap.c
index 9027bdab64..dd7996a28d 100644
--- a/keyboards/keebio/iris/keymaps/olligranlund_nordic/keymap.c
+++ b/keyboards/keebio/iris/keymaps/olligranlund_nordic/keymap.c
@@ -38,19 +38,15 @@ enum custom_keycodes {
#define KC_ADJ ADJUST
#define KC_RST RESET
-#define KC_AA SE_AA
-#define KC_AE SE_AE
-#define KC_OE SE_OSLH
-
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QWERTY] = LAYOUT(
//┌────────┬────────┬────────┬────────┬────────┬────────┠┌────────┬────────┬────────┬────────┬────────┬────────â”
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
-LT(_LOWER, KC_TAB),KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_AA,
+LT(_LOWER, KC_TAB),KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, SE_ARNG,
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
- KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_OE, KC_AE,
+ KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, SE_ODIA, SE_ADIA,
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┠┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, RAISE, KC_BSPC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_MINS,
//└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘
@@ -66,7 +62,7 @@ LT(_LOWER, KC_TAB),KC_Q, KC_W, KC_E, KC_R, KC_T, KC_
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
KC_TRNS, KC_VOLD, KC_MUTE, KC_VOLU, KC_TRNS, SE_BSLS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, SE_LBRC, SE_RBRC,
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┠┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, KC_TRNS, KC_GRAVE, KC_CIRC, KC_QUOTE, SE_LESS, SE_GRTR,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, KC_TRNS, KC_GRAVE, KC_CIRC, KC_QUOTE, SE_LABK, SE_RABK,
//└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
// └────────┴────────┴────────┘ └────────┴────────┴────────┘
diff --git a/keyboards/keebio/iris/rev2/rules.mk b/keyboards/keebio/iris/rev2/rules.mk
index 765fa7f07a..197bad4764 100644
--- a/keyboards/keebio/iris/rev2/rules.mk
+++ b/keyboards/keebio/iris/rev2/rules.mk
@@ -32,3 +32,5 @@ RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
SPLIT_KEYBOARD = yes
+
+LTO_ENABLE = yes \ No newline at end of file
diff --git a/keyboards/keebio/iris/rev3/rules.mk b/keyboards/keebio/iris/rev3/rules.mk
index ea92bc98f5..b64eab5a4b 100644
--- a/keyboards/keebio/iris/rev3/rules.mk
+++ b/keyboards/keebio/iris/rev3/rules.mk
@@ -33,3 +33,4 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
SPLIT_KEYBOARD = yes
ENCODER_ENABLE = yes
+LTO_ENABLE = yes \ No newline at end of file
diff --git a/keyboards/keebio/iris/rev4/rules.mk b/keyboards/keebio/iris/rev4/rules.mk
index ea92bc98f5..9bf5688da0 100644
--- a/keyboards/keebio/iris/rev4/rules.mk
+++ b/keyboards/keebio/iris/rev4/rules.mk
@@ -33,3 +33,5 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
SPLIT_KEYBOARD = yes
ENCODER_ENABLE = yes
+
+LTO_ENABLE = yes \ No newline at end of file
diff --git a/keyboards/keebio/nyquist/keymaps/skug/keymap.c b/keyboards/keebio/nyquist/keymaps/skug/keymap.c
index be77cb24b6..f9f66892a3 100644
--- a/keyboards/keebio/nyquist/keymaps/skug/keymap.c
+++ b/keyboards/keebio/nyquist/keymaps/skug/keymap.c
@@ -19,12 +19,10 @@
extern keymap_config_t keymap_config;
-#define CT_APOS CTL_T(SE_APOS)
+#define CT_APOS CTL_T(SE_QUOT)
#define CT_TILD CTL_T(SE_TILD)
-#define MD_OSLH LT(MDIA, SE_OSLH)
-#define SM_AE LT(SYMB, SE_AE)
-#define SE_LT SE_LESS
-#define SE_GT LSFT(SE_LESS)
+#define MD_ODIA LT(MDIA, SE_ODIA)
+#define SM_ADIA LT(SYMB, SE_ADIA)
enum layer_names {
BASE,
@@ -61,8 +59,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[BASE] = LAYOUT( \
// LEFT HAND RIGHT HAND
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, SE_PLUS, \
- KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, SE_AA, \
- MO(ARRW), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, MD_OSLH, SM_AE, \
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, SE_ARNG, \
+ MO(ARRW), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, MD_ODIA, SM_ADIA, \
KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, SE_MINS, KC_RSPC, \
CT_APOS, SE_ACUT, KC_LALT, KC_BSPC, KC_SPC, KC_LGUI, KC_ENT, KC_SPC, KC_BSPC, KC_ALGR, SE_ASTR, CT_TILD \
),
@@ -83,8 +81,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[GAME] = LAYOUT( \
// LEFT HAND RIGHT HAND
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, SE_PLUS, \
- KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, SE_AA, \
- MO(ARRW), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, MD_OSLH, SM_AE, \
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, SE_ARNG, \
+ MO(ARRW), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, MD_ODIA, SM_ADIA, \
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, SE_MINS, KC_RSFT, \
KC_LCTL, SE_ACUT, KC_LALT, KC_BSPC, KC_SPC, KC_LGUI, KC_ENT, KC_SPC, KC_BSPC, KC_ALGR, SE_ASTR, KC_RCTL \
),
@@ -107,7 +105,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, KC_EXLM, SE_AT, SE_LCBR, SE_RCBR, SE_PIPE, KC_UP, KC_7, KC_8, KC_9, SE_ASTR, KC_F12, \
_______, KC_HASH, SE_DLR, SE_LPRN, SE_RPRN, SE_GRV, KC_DOWN, KC_4, KC_5, KC_6, SE_PLUS, _______, \
_______, KC_PERC, SE_CIRC, SE_LBRC, SE_RBRC, SE_TILD, SE_AMPR, KC_1, KC_2, KC_3, SE_MINS, _______, \
- _______, _______, _______, SE_LT, SE_GT, _______, _______, _______, KC_DOT, KC_0, SE_EQL, _______ \
+ _______, _______, _______, SE_LABK, SE_RABK, _______, _______, _______, KC_DOT, KC_0, SE_EQL, _______ \
),
/* Media layer
diff --git a/keyboards/keebio/nyquist/nyquist.h b/keyboards/keebio/nyquist/nyquist.h
index 25da44172b..63d7680f06 100644
--- a/keyboards/keebio/nyquist/nyquist.h
+++ b/keyboards/keebio/nyquist/nyquist.h
@@ -11,17 +11,3 @@
#endif
#include "quantum.h"
-
-#define LAYOUT_ortho_4x12( \
- L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
- L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
- L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
- L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \
- ) \
- LAYOUT_ortho_5x12( \
- L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
- L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
- L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
- L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35, \
- KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO \
- )
diff --git a/keyboards/keebio/nyquist/rev1/rev1.h b/keyboards/keebio/nyquist/rev1/rev1.h
index 20f53b3b44..5896a826cc 100644
--- a/keyboards/keebio/nyquist/rev1/rev1.h
+++ b/keyboards/keebio/nyquist/rev1/rev1.h
@@ -34,6 +34,22 @@
{ R35, R34, R33, R32, R31, R30 }, \
{ R45, R44, R43, R42, R41, R40 } \
}
+#define LAYOUT_ortho_4x12( \
+ L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
+ L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
+ L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
+ L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \
+ ) \
+ { \
+ { L00, L01, L02, L03, L04, L05 }, \
+ { L10, L11, L12, L13, L14, L15 }, \
+ { L20, L21, L22, L23, L24, L25 }, \
+ { L30, L31, L32, L33, L34, L35 }, \
+ { R05, R04, R03, R02, R01, R00 }, \
+ { R15, R14, R13, R12, R11, R10 }, \
+ { R25, R24, R23, R22, R21, R20 }, \
+ { R35, R34, R33, R32, R31, R30 } \
+ }
#else
// Keymap with right side flipped
// (TRRS jack on both halves are to the right)
@@ -56,6 +72,22 @@
{ R30, R31, R32, R33, R34, R35 }, \
{ R40, R41, R42, R43, R44, R45 } \
}
+#define LAYOUT_ortho_4x12( \
+ L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
+ L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
+ L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
+ L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \
+ ) \
+ { \
+ { L00, L01, L02, L03, L04, L05 }, \
+ { L10, L11, L12, L13, L14, L15 }, \
+ { L20, L21, L22, L23, L24, L25 }, \
+ { L30, L31, L32, L33, L34, L35 }, \
+ { R00, R01, R02, R03, R04, R05 }, \
+ { R10, R11, R12, R13, R14, R15 }, \
+ { R20, R21, R22, R23, R24, R25 }, \
+ { R30, R31, R32, R33, R34, R35 } \
+ }
#endif
#define LAYOUT_ortho_5x12 LAYOUT
diff --git a/keyboards/keebio/nyquist/rev2/rev2.h b/keyboards/keebio/nyquist/rev2/rev2.h
index 20f53b3b44..5896a826cc 100644
--- a/keyboards/keebio/nyquist/rev2/rev2.h
+++ b/keyboards/keebio/nyquist/rev2/rev2.h
@@ -34,6 +34,22 @@
{ R35, R34, R33, R32, R31, R30 }, \
{ R45, R44, R43, R42, R41, R40 } \
}
+#define LAYOUT_ortho_4x12( \
+ L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
+ L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
+ L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
+ L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \
+ ) \
+ { \
+ { L00, L01, L02, L03, L04, L05 }, \
+ { L10, L11, L12, L13, L14, L15 }, \
+ { L20, L21, L22, L23, L24, L25 }, \
+ { L30, L31, L32, L33, L34, L35 }, \
+ { R05, R04, R03, R02, R01, R00 }, \
+ { R15, R14, R13, R12, R11, R10 }, \
+ { R25, R24, R23, R22, R21, R20 }, \
+ { R35, R34, R33, R32, R31, R30 } \
+ }
#else
// Keymap with right side flipped
// (TRRS jack on both halves are to the right)
@@ -56,6 +72,22 @@
{ R30, R31, R32, R33, R34, R35 }, \
{ R40, R41, R42, R43, R44, R45 } \
}
+#define LAYOUT_ortho_4x12( \
+ L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
+ L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
+ L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
+ L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \
+ ) \
+ { \
+ { L00, L01, L02, L03, L04, L05 }, \
+ { L10, L11, L12, L13, L14, L15 }, \
+ { L20, L21, L22, L23, L24, L25 }, \
+ { L30, L31, L32, L33, L34, L35 }, \
+ { R00, R01, R02, R03, R04, R05 }, \
+ { R10, R11, R12, R13, R14, R15 }, \
+ { R20, R21, R22, R23, R24, R25 }, \
+ { R30, R31, R32, R33, R34, R35 } \
+ }
#endif
#define LAYOUT_ortho_5x12 LAYOUT
diff --git a/keyboards/keebio/nyquist/rev3/rev3.h b/keyboards/keebio/nyquist/rev3/rev3.h
index 274b83926b..506fcc6e36 100644
--- a/keyboards/keebio/nyquist/rev3/rev3.h
+++ b/keyboards/keebio/nyquist/rev3/rev3.h
@@ -31,4 +31,21 @@
{ R40, R41, R42, R43, R44, R45 } \
}
+#define LAYOUT_ortho_4x12( \
+ L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
+ L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
+ L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
+ L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \
+ ) \
+ { \
+ { L00, L01, L02, L03, L04, L05 }, \
+ { L10, L11, L12, L13, L14, L15 }, \
+ { L20, L21, L22, L23, L24, L25 }, \
+ { L30, L31, L32, L33, L34, L35 }, \
+ { R00, R01, R02, R03, R04, R05 }, \
+ { R10, R11, R12, R13, R14, R15 }, \
+ { R20, R21, R22, R23, R24, R25 }, \
+ { R30, R31, R32, R33, R34, R35 } \
+ }
+
#define LAYOUT_ortho_5x12 LAYOUT
diff --git a/keyboards/keebio/quefrency/rules.mk b/keyboards/keebio/quefrency/rules.mk
index 2c5ad0c36b..c674e10162 100644
--- a/keyboards/keebio/quefrency/rules.mk
+++ b/keyboards/keebio/quefrency/rules.mk
@@ -19,3 +19,4 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
SPLIT_KEYBOARD = yes
DEFAULT_FOLDER = keebio/quefrency/rev1
+LTO_ENABLE = yes
diff --git a/keyboards/keebio/viterbi/rev2/rules.mk b/keyboards/keebio/viterbi/rev2/rules.mk
index f95e7ae6a4..829d6a56e0 100644
--- a/keyboards/keebio/viterbi/rev2/rules.mk
+++ b/keyboards/keebio/viterbi/rev2/rules.mk
@@ -1,3 +1,5 @@
BACKLIGHT_ENABLE = yes
LAYOUTS = ortho_5x14
+
+LTO_ENABLE = yes \ No newline at end of file
diff --git a/keyboards/keebio/viterbi/rules.mk b/keyboards/keebio/viterbi/rules.mk
index 0b746d1720..92576d33e8 100644
--- a/keyboards/keebio/viterbi/rules.mk
+++ b/keyboards/keebio/viterbi/rules.mk
@@ -19,16 +19,16 @@ BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
MOUSEKEY_ENABLE = yes # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug
-COMMAND_ENABLE = yes # Commands for debug and configuration
+COMMAND_ENABLE = no # Commands for debug and configuration
NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
-BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
MIDI_ENABLE = no # MIDI controls
AUDIO_ENABLE = no # Audio output on port C6
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
-RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
+RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
-SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
SPLIT_KEYBOARD = yes
diff --git a/keyboards/keyboardio/model01/keymaps/tw1t611/keymap.c b/keyboards/keyboardio/model01/keymaps/tw1t611/keymap.c
index b4bd53e3fe..3171dd36f9 100644
--- a/keyboards/keyboardio/model01/keymaps/tw1t611/keymap.c
+++ b/keyboards/keyboardio/model01/keymaps/tw1t611/keymap.c
@@ -11,9 +11,9 @@ enum {
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[DEF] = LAYOUT(
_______, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , DE_SS ,
- KC_ESC , KC_Q , KC_W , KC_E , KC_R , KC_T , RGB_MOD, KC_MUTE, KC_Y , KC_U , KC_I , KC_O , KC_P , DE_AE ,
- KC_TAB , KC_A , KC_S , KC_D , KC_F , KC_G , DE_PARA, _______, KC_H , KC_J , KC_K , KC_L , DE_SLSH, DE_OE ,
- DE_PIPE, KC_Z , KC_X , KC_C , KC_V , KC_B , _______, _______, KC_N , KC_M , DE_COMM, DE_DOT , DE_MINS, DE_UE ,
+ KC_ESC , KC_Q , KC_W , KC_E , KC_R , KC_T , RGB_MOD, KC_MUTE, KC_Y , KC_U , KC_I , KC_O , KC_P , DE_ADIA,
+ KC_TAB , KC_A , KC_S , KC_D , KC_F , KC_G , DE_SECT, _______, KC_H , KC_J , KC_K , KC_L , DE_SLSH, DE_ODIA,
+ DE_PIPE, KC_Z , KC_X , KC_C , KC_V , KC_B , _______, _______, KC_N , KC_M , DE_COMM, DE_DOT , DE_MINS, DE_UDIA,
KC_LALT, KC_LGUI,
KC_SPC , KC_ENT ,
KC_LSFT, MO(MOD),
@@ -22,9 +22,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
[MOD] = LAYOUT(
KC_F12 , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 ,
- DE_CIRC, DE_QUOT, DE_DQOT, DE_LCBR, DE_RCBR, DE_GRV , RGB_TOG, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END , DE_EQL , DE_PERC,
- DE_TILD, DE_EXLM, DE_DLR , DE_LPRN, DE_RPRN, DE_AMPR, _______, _______, KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, DE_QST , DE_ASTR,
- DE_BSLS, DE_HASH, DE_LESS, DE_LBRC, DE_RBRC, DE_MORE, _______, RESET , DE_AT , DE_EURO, DE_SCLN, DE_COLN, DE_UNDS, DE_PLUS,
+ DE_CIRC, DE_QUOT, DE_DQUO, DE_LCBR, DE_RCBR, DE_GRV , RGB_TOG, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END , DE_EQL , DE_PERC,
+ DE_TILD, DE_EXLM, DE_DLR , DE_LPRN, DE_RPRN, DE_AMPR, _______, _______, KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, DE_QUES, DE_ASTR,
+ DE_BSLS, DE_HASH, DE_LABK, DE_LBRC, DE_RBRC, DE_RABK, _______, RESET , DE_AT , DE_EURO, DE_SCLN, DE_COLN, DE_UNDS, DE_PLUS,
_______, _______,
_______, _______,
_______, _______,
diff --git a/keyboards/kindakeyboards/conone65/rules.mk b/keyboards/kindakeyboards/conone65/rules.mk
index 7210ffcf0f..10b93d7b43 100644
--- a/keyboards/kindakeyboards/conone65/rules.mk
+++ b/keyboards/kindakeyboards/conone65/rules.mk
@@ -21,4 +21,4 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
BLUETOOTH_ENABLE = no # Enable Bluetooth
AUDIO_ENABLE = no # Audio output
-LAYOUTS = 65_ansi 65_ansi_split_bs 65_iso 65_iso_split_bs \ No newline at end of file
+LAYOUTS = 65_ansi 65_ansi_split_bs 65_iso
diff --git a/keyboards/kinesis/alvicstep/config.h b/keyboards/kinesis/alvicstep/config.h
index 73aa4dd4dc..02c7725cec 100644
--- a/keyboards/kinesis/alvicstep/config.h
+++ b/keyboards/kinesis/alvicstep/config.h
@@ -23,7 +23,7 @@
*
*/
//Passed through the port multipler, so 4 pins =16
-#define MATRIX_ROW_PINS { F0,F1, F2, F3 }
+#define MATRIX_ROW_PINS { F0, F1, F2, F3, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN }
// May be upside down.
#define MATRIX_COL_PINS { B0,B1, B2, B3, B4, B5, B6, B7 }
diff --git a/keyboards/kinesis/keymaps/tw1t611/keymap.c b/keyboards/kinesis/keymaps/tw1t611/keymap.c
index afeaf77114..c94f06bbb9 100644
--- a/keyboards/kinesis/keymaps/tw1t611/keymap.c
+++ b/keyboards/kinesis/keymaps/tw1t611/keymap.c
@@ -17,9 +17,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_SPC ,KC_LSFT,KC_BSPC ,
KC_F9 ,KC_F10 ,KC_F11 ,KC_F12 ,KC_PSCR,KC_SLCK,KC_PAUS,KC_FN0 ,RESET,
KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,DE_SS ,
- KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,DE_AE ,
- KC_H ,KC_J ,KC_K ,KC_L ,DE_SLSH,DE_OE ,
- KC_N ,KC_M ,DE_COMM,DE_DOT ,DE_MINS,DE_UE ,
+ KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,DE_ADIA,
+ KC_H ,KC_J ,KC_K ,KC_L ,DE_SLSH,DE_ODIA,
+ KC_N ,KC_M ,DE_COMM,DE_DOT ,DE_MINS,DE_UDIA,
_______,_______,_______,_______,
KC_LGUI,KC_LCTL,
KC_END ,
@@ -28,9 +28,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[MOD] = LAYOUT(
_______,_______,_______,_______,_______,_______,_______,_______,_______,
_______,_______,_______,_______,_______,_______,
- DE_CIRC,DE_QUOT,DE_DQOT,DE_LCBR,DE_RCBR,DE_GRV ,
+ DE_CIRC,DE_QUOT,DE_DQUO,DE_LCBR,DE_RCBR,DE_GRV ,
DE_TILD,DE_EXLM,DE_DLR ,DE_LPRN,DE_RPRN,DE_AMPR,
- DE_BSLS,DE_HASH,DE_LESS,DE_LBRC,DE_RBRC,DE_MORE,
+ DE_BSLS,DE_HASH,DE_LABK,DE_LBRC,DE_RBRC,DE_RABK,
_______,_______,_______,_______,
_______,_______,
_______,
@@ -38,7 +38,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______,_______,_______,_______,_______,_______,_______,_______,_______,
_______,_______,_______,_______,_______,_______,
KC_HOME,KC_PGDN,KC_PGUP,KC_END ,DE_EQL ,DE_PERC,
- KC_LEFT,KC_DOWN,KC_UP ,KC_RGHT,DE_QST ,DE_ASTR,
+ KC_LEFT,KC_DOWN,KC_UP ,KC_RGHT,DE_QUES,DE_ASTR,
DE_AT ,DE_EURO,DE_SCLN,DE_COLN,DE_UNDS,DE_PLUS,
_______,_______,_______,_______,
_______,_______,
diff --git a/keyboards/kinesis/kinesis.h b/keyboards/kinesis/kinesis.h
index 0833992b81..1635c34436 100644
--- a/keyboards/kinesis/kinesis.h
+++ b/keyboards/kinesis/kinesis.h
@@ -16,6 +16,9 @@
#ifdef KEYBOARD_kinesis_kint36
#include "kint36.h"
#endif
+#ifdef KEYBOARD_kinesis_kint41
+ #include "kint41.h"
+#endif
#include "quantum.h"
diff --git a/keyboards/kinesis/kint36/config.h b/keyboards/kinesis/kint36/config.h
index 17a2b715f0..ab34daa7b8 100644
--- a/keyboards/kinesis/kint36/config.h
+++ b/keyboards/kinesis/kint36/config.h
@@ -68,3 +68,5 @@
#define LED_CAPS_LOCK_PIN C7
#define LED_SCROLL_LOCK_PIN A5
#define LED_COMPOSE_PIN E26
+
+#define EEPROM_SIZE 4096
diff --git a/keyboards/kinesis/kint41/chconf.h b/keyboards/kinesis/kint41/chconf.h
new file mode 100644
index 0000000000..0cd253b95d
--- /dev/null
+++ b/keyboards/kinesis/kint41/chconf.h
@@ -0,0 +1,33 @@
+/* Copyright 2020 QMK
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
+/*
+ * This file was auto-generated by:
+ * `qmk chibios-confmigrate -i keyboards/kinesis/kint36/chconf.h -r platforms/chibios/common/configs/chconf.h`
+ */
+
+#pragma once
+
+#define CH_CFG_ST_TIMEDELTA 0
+
+#define CH_CFG_TIME_QUANTUM 20
+
+// One tick (minimum sleep interval) will be 100 μs. This value cannot be
+// increased arbitrarily: chSysTimerHandlerI() must be executed in less than one
+// tick as per http://forum.chibios.org/viewtopic.php?t=3712#p27851
+#define CH_CFG_ST_FREQUENCY 10000
+
+#include_next <chconf.h>
diff --git a/keyboards/kinesis/kint41/config.h b/keyboards/kinesis/kint41/config.h
new file mode 100644
index 0000000000..349d3ee364
--- /dev/null
+++ b/keyboards/kinesis/kint41/config.h
@@ -0,0 +1,105 @@
+/* Copyright 2020 QMK
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+
+/* USB Device descriptor parameter */
+#undef VENDOR_ID
+#define VENDOR_ID 0x1209
+#undef PRODUCT_ID
+#define PRODUCT_ID 0x345C
+#undef DEVICE_VER
+#define DEVICE_VER 0x0001
+#undef MANUFACTURER
+#define MANUFACTURER "https://github.com/stapelberg"
+#undef PRODUCT
+#define PRODUCT "kinT (kint41)"
+
+/* key matrix size */
+#define MATRIX_ROWS 15
+#define MATRIX_COLS 7
+
+/*
+ * Keyboard Matrix Assignments
+ *
+ * Change this to how you wired your keyboard
+ * COLS: AVR pins used for columns, left to right
+ * ROWS: AVR pins used for rows, top to bottom
+ * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
+ * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
+ *
+ */
+#define MATRIX_ROW_PINS \
+ { \
+ LINE_PIN8, /* ROW_EQL */ \
+ LINE_PIN9, /* ROW_1 */ \
+ LINE_PIN10, /* ROW_2 */ \
+ LINE_PIN11, /* ROW_3 */ \
+ LINE_PIN7, /* ROW_4 */ \
+ LINE_PIN16, /* ROW_5 */ \
+ LINE_PIN5, /* ROW_6 */ \
+ LINE_PIN3, /* ROW_7 */ \
+ LINE_PIN4, /* ROW_8 */ \
+ LINE_PIN1, /* ROW_9 */ \
+ LINE_PIN0, /* ROW_0 */ \
+ LINE_PIN2, /* ROW_MIN */ \
+ LINE_PIN17, /* ROW_ESC */ \
+ LINE_PIN23, /* ROW_F1 */ \
+ LINE_PIN21 /* ROW_F2 */ \
+ }
+
+#define MATRIX_COL_PINS \
+ { \
+ LINE_PIN18, /* COL_0 */ \
+ LINE_PIN14, /* COL_1 */ \
+ LINE_PIN15, /* COL_2 */ \
+ LINE_PIN20, /* COL_3 */ \
+ LINE_PIN22, /* COL_4 */ \
+ LINE_PIN19, /* COL_5 */ \
+ LINE_PIN6 /* COL_6 */ \
+ }
+
+#define UNUSED_PINS
+
+/* COL2ROW or ROW2COL */
+#define DIODE_DIRECTION COL2ROW
+
+/* Well-worn Cherry MX key switches can bounce for up to 20ms, despite the
+ * Cherry data sheet specifying 5ms. Because we use the sym_eager_pk debounce
+ * algorithm, this debounce latency only affects key releases (not key
+ * presses). */
+#undef DEBOUNCE
+#define DEBOUNCE 20
+
+#define IGNORE_MOD_TAP_INTERRUPT
+
+// Reduce input latency by lowering the USB polling interval
+// from its 10ms default to the 125μs minimum that USB 2.x (High Speed) allows:
+#define USB_POLLING_INTERVAL_MS 1
+
+/* We use the i.MX RT1060 high-speed GPIOs (GPIO6-9) which are connected to the
+ * AHB bus (AHB_CLK_ROOT), which runs at the same speed as the ARM Core Clock,
+ * i.e. 600 MHz. See MIMXRT1062, page 949, 12.1 Chip-specific GPIO information.
+ * No additional delay is necessary. */
+
+// in clock cycles
+#define GPIO_INPUT_PIN_DELAY 0
+
+#define LED_PIN_ON_STATE 0
+#define LED_NUM_LOCK_PIN LINE_PIN26
+#define LED_CAPS_LOCK_PIN LINE_PIN12
+#define LED_SCROLL_LOCK_PIN LINE_PIN25
+#define LED_COMPOSE_PIN LINE_PIN24
diff --git a/keyboards/kinesis/kint41/kint41.c b/keyboards/kinesis/kint41/kint41.c
new file mode 100644
index 0000000000..e23a639f9f
--- /dev/null
+++ b/keyboards/kinesis/kint41/kint41.c
@@ -0,0 +1,52 @@
+/* Copyright 2020 QMK
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
+#include "kint41.h"
+
+void matrix_init_kb(void) {
+ matrix_init_user();
+
+// Turn on the Teensy 4.x Power LED:
+#define LED_POWER LINE_PIN13
+ setPinOutput(LED_POWER);
+ writePinHigh(LED_POWER);
+}
+
+// delay_inline sleeps for |cycles| (e.g. sleeping for F_CPU will sleep 1s).
+// delay_inline assumes the cycle counter has already been initialized and
+// should not be modified, i.e. it is safe to call during keyboard matrix scan.
+//
+// ChibiOS enables the cycle counter in chcore_v7m.c:
+// https://github.com/ChibiOS/ChibiOS/blob/b63023915c304092acb9f33bbab40f3ec07a7f0e/os/common/ports/ARMCMx/chcore_v7m.c#L263
+static void delay_inline(const uint32_t cycles) {
+ const uint32_t start = DWT->CYCCNT;
+ while ((DWT->CYCCNT - start) < cycles) {
+ // busy-loop until time has passed
+ }
+}
+
+void matrix_output_unselect_delay(void) {
+ // Use the cycle counter to do precise timing in microseconds. The ChibiOS
+ // thread sleep functions only allow sleep durations starting at 1 tick, which
+ // is 100μs in our configuration.
+
+ // Empirically: e.g. 5μs is not enough, will result in keys that don’t work
+ // and ghost key presses. 10μs seems to work well.
+
+ // 600 cycles at 0.6 cycles/ns == 1μs
+ const uint32_t cycles_per_us = 600;
+ delay_inline(10 * cycles_per_us);
+}
diff --git a/keyboards/kinesis/kint41/kint41.h b/keyboards/kinesis/kint41/kint41.h
new file mode 100644
index 0000000000..d427a1c2d6
--- /dev/null
+++ b/keyboards/kinesis/kint41/kint41.h
@@ -0,0 +1,92 @@
+/* Copyright 2020 QMK
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+
+#include "quantum.h"
+
+#define ___ KC_NO
+
+// This a shortcut to help you visually see your layout.
+// The first section contains all of the arguments as on the physical keyboard
+// The second converts the arguments into the 2-D scanned array
+
+#define LAYOUT( \
+ kC0, kD0, kE0, kC1, kD1, kE1, kC2, kD2, kE2, \
+ k00, k10, k20, k30, k40, k50, \
+ k01, k11, k21, k31, k41, k51, \
+ k02, k12, k22, k32, k42, k52, \
+ k03, k13, k23, k33, k43, k53, \
+ k14, k24, k34, k54, \
+ k56, k55, \
+ k35, \
+ k36, k46, k25, \
+ \
+ kC3, kD3, kE3, kC4, kD4, kE4, kC5, kE5, kD5, \
+ k60, k70, k80, k90, kA0, kB0, \
+ k61, k71, k81, k91, kA1, kB1, \
+ k62, k72, k82, k92, kA2, kB2, \
+ k63, k73, k83, k93, kA3, kB3, \
+ k64, k84, k94, kA4, \
+ k96, k85, \
+ k86, \
+ k66, k75, k65 \
+) { \
+ { k00, k01, k02, k03, ___, ___, ___ }, \
+ { k10, k11, k12, k13, k14, ___, ___ }, \
+ { k20, k21, k22, k23, k24, k25, ___ }, \
+ { k30, k31, k32, k33, k34, k35, k36 }, \
+ { k40, k41, k42, k43, ___, ___, k46 }, \
+ { k50, k51, k52, k53, k54, k55, k56 }, \
+ { k60, k61, k62, k63, k64, k65, k66 }, \
+ { k70, k71, k72, k73, ___, k75, ___ }, \
+ { k80, k81, k82, k83, k84, k85, k86 }, \
+ { k90, k91, k92, k93, k94, ___, k96 }, \
+ { kA0, kA1, kA2, kA3, kA4, ___, ___ }, \
+ { kB0, kB1, kB2, kB3, ___, ___, ___ }, \
+ { kC0, kC1, kC2, kC3, kC4, kC5, ___ }, \
+ { kD0, kD1, kD2, kD3, kD4, kD5, ___ }, \
+ { kE0, kE1, kE2, kE3, kE4, kE5, ___ }, \
+}
+
+/* ---------------- LEFT HAND ----------------- ---------------- RIGHT HAND ---------------- */
+#define LAYOUT_pretty( \
+ kC0, kD0, kE0, kC1, kD1, kE1, kC2, kD2, kE2, kC3, kD3, kE3, kC4, kD4, kE4, kC5, kE5, kD5, \
+ k00, k10, k20, k30, k40, k50, k60, k70, k80, k90, kA0, kB0, \
+ k01, k11, k21, k31, k41, k51, k61, k71, k81, k91, kA1, kB1, \
+ k02, k12, k22, k32, k42, k52, k62, k72, k82, k92, kA2, kB2, \
+ k03, k13, k23, k33, k43, k53, k63, k73, k83, k93, kA3, kB3, \
+ k14, k24, k34, k54, k64, k84, k94, kA4, \
+ k56, k55, k96, k85, \
+ k35, k86, \
+ k36, k46, k25, k66, k75, k65 \
+) { \
+ { k00, k01, k02, k03, ___, ___, ___ }, \
+ { k10, k11, k12, k13, k14, ___, ___ }, \
+ { k20, k21, k22, k23, k24, k25, ___ }, \
+ { k30, k31, k32, k33, k34, k35, k36 }, \
+ { k40, k41, k42, k43, ___, ___, k46 }, \
+ { k50, k51, k52, k53, k54, k55, k56 }, \
+ { k60, k61, k62, k63, k64, k65, k66 }, \
+ { k70, k71, k72, k73, ___, k75, ___ }, \
+ { k80, k81, k82, k83, k84, k85, k86 }, \
+ { k90, k91, k92, k93, k94, ___, k96 }, \
+ { kA0, kA1, kA2, kA3, kA4, ___, ___ }, \
+ { kB0, kB1, kB2, kB3, ___, ___, ___ }, \
+ { kC0, kC1, kC2, kC3, kC4, kC5, ___ }, \
+ { kD0, kD1, kD2, kD3, kD4, kD5, ___ }, \
+ { kE0, kE1, kE2, kE3, kE4, kE5, ___ } \
+}
diff --git a/keyboards/kinesis/kint41/mcuconf.h b/keyboards/kinesis/kint41/mcuconf.h
new file mode 100644
index 0000000000..1ab5054ff3
--- /dev/null
+++ b/keyboards/kinesis/kint41/mcuconf.h
@@ -0,0 +1,22 @@
+/*
+ ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+#ifndef _MCUCONF_H_
+#define _MCUCONF_H_
+
+#define MIMXRT1062_MCUCONF
+
+#endif /* _MCUCONF_H_ */
diff --git a/keyboards/kinesis/kint41/readme.md b/keyboards/kinesis/kint41/readme.md
new file mode 100644
index 0000000000..90781dc97d
--- /dev/null
+++ b/keyboards/kinesis/kint41/readme.md
@@ -0,0 +1,3 @@
+# kinesis_kint41 keyboard firmware
+
+Please see https://github.com/kinx-project/kint for details.
diff --git a/keyboards/kinesis/kint41/rules.mk b/keyboards/kinesis/kint41/rules.mk
new file mode 100644
index 0000000000..4d77da4271
--- /dev/null
+++ b/keyboards/kinesis/kint41/rules.mk
@@ -0,0 +1,12 @@
+MCU_FAMILY = MIMXRT1062
+MCU_SERIES = MIMXRT1062
+MCU_LDSCRIPT = MIMXRT1062
+MCU_STARTUP = MIMXRT1062
+BOARD = IC_TEENSY_4_1
+MCU = cortex-m4
+ARMV = 7
+
+# Debounce eagerly (report change immediately), keep per-key timers. We can use
+# this because the Cherry MX keyswitches on the Kinesis only produce noise while
+# pressed.
+DEBOUNCE_TYPE = sym_eager_pk
diff --git a/keyboards/kinesis/nguyenvietyen/config.h b/keyboards/kinesis/nguyenvietyen/config.h
index 52f4c8054b..f1b41e61bc 100644
--- a/keyboards/kinesis/nguyenvietyen/config.h
+++ b/keyboards/kinesis/nguyenvietyen/config.h
@@ -19,7 +19,7 @@
*
*/
// Passed through the port multipler, so 4 pins =16
-#define MATRIX_ROW_PINS { D0, D1, D2, D3 }
+#define MATRIX_ROW_PINS { D0, D1, D2, D3, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN }
#define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6, F5, F4 }
#define UNUSED_PINS
diff --git a/keyboards/kmac/config.h b/keyboards/kmac/config.h
index 45cbff9fa2..54d29dd626 100644
--- a/keyboards/kmac/config.h
+++ b/keyboards/kmac/config.h
@@ -38,7 +38,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_ROW_PINS \
{ D0, D1, D2, D3, D5, B7 }
#define MATRIX_COL_PINS \
- { B6, C6, C7, F1, F0, B5 }
+ { B6, C6, C7, F1, F0, B5, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN }
#define UNUSED_PINS
/* COL2ROW, ROW2COL*/
diff --git a/keyboards/kyria/keymaps/drashna/keymap.c b/keyboards/kyria/keymaps/drashna/keymap.c
index 4563a3c622..14287d0ec6 100644
--- a/keyboards/kyria/keymaps/drashna/keymap.c
+++ b/keyboards/kyria/keymaps/drashna/keymap.c
@@ -131,7 +131,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// clang-format on
#ifdef OLED_DRIVER_ENABLE
-oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; }
+oled_rotation_t oled_init_keymap(oled_rotation_t rotation) { return OLED_ROTATION_180; }
#endif
#ifdef ENCODER_ENABLE
diff --git a/keyboards/kyria/keymaps/drashna/rules.mk b/keyboards/kyria/keymaps/drashna/rules.mk
index fb3c1cf843..4036f91453 100644
--- a/keyboards/kyria/keymaps/drashna/rules.mk
+++ b/keyboards/kyria/keymaps/drashna/rules.mk
@@ -3,19 +3,13 @@ ENCODER_ENABLE = yes # ENables the use of one or more encoders
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
RGBLIGHT_STARTUP_ANIMATION = no
-BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
+BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
MOUSEKEY_ENABLE = no # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = no # Commands for debug and configuration
-NKRO_ENABLE = no # USB Nkey Rollover
-BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
-MIDI_ENABLE = no # MIDI support
-UNICODE_ENABLE = no # Unicode
-BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
-AUDIO_ENABLE = no # Audio output on port C6
+NKRO_ENABLE = yes # USB Nkey Rollover
+UNICODE_ENABLE = yes # Unicode
BOOTLOADER = atmel-dfu
-# SPLIT_TRANSPORT = mirror
-
# TAP_DANCE_ENABLE = yes
diff --git a/keyboards/kyria/keymaps/shinze/keymap.c b/keyboards/kyria/keymaps/shinze/keymap.c
index 29f6dc079f..98e127960c 100644
--- a/keyboards/kyria/keymaps/shinze/keymap.c
+++ b/keyboards/kyria/keymaps/shinze/keymap.c
@@ -24,15 +24,15 @@ enum layers {
};
#define RESC LT(_RAISE, KC_ESC)
-#define BP_EA BP_E_ACUTE
+#define BP_EA BP_EACU
#define BP_AG BP_AGRV
-#define BP_EG BP_E_GRAVE
-#define BP_DC BP_DCRC
-#define BP_AP BP_APOS
+#define BP_EG BP_EGRV
+#define BP_DC BP_DCIR
+#define BP_AP BP_QUOT
#define BP_CO BP_COMM
#define BP_DT BP_DOT
#define LS KC_LSFT
-#define BP_DOL BP_DOLLAR
+#define BP_DOL BP_DLR
/* Bottom Row */
#define BR01 KC_LCTL
@@ -86,8 +86,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `----------------------------------' `----------------------------------'
*/
[_LOWER] = LAYOUT(
- BP_DOL , BP_DQUO, BP_LGIL, BP_RGIL, BP_LPRN, BP_RPRN, BP_AT, BP_PLUS, BP_MINS, BP_SLASH, BP_ASTR, BP_EQL,
- BP_HASH, BP_1, BP_2, BP_3, BP_4, BP_5, BP_6, BP_7, BP_8, BP_9, BP_0, BP_DEGR,
+ BP_DOL , BP_DQUO, BP_LDAQ, BP_RDAQ, BP_LPRN, BP_RPRN, BP_AT, BP_PLUS, BP_MINS, BP_SLSH, BP_ASTR, BP_EQL,
+ BP_HASH, BP_1, BP_2, BP_3, BP_4, BP_5, BP_6, BP_7, BP_8, BP_9, BP_0, BP_DEG,
BP_PERC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, BP_GRV,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
diff --git a/keyboards/latin17rgb/config.h b/keyboards/latin17rgb/config.h
index 013899f600..6a7ea8e781 100644
--- a/keyboards/latin17rgb/config.h
+++ b/keyboards/latin17rgb/config.h
@@ -1,18 +1,18 @@
/* Copyright 2021 18438880
- *
- * 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 <http://www.gnu.org/licenses/>.
- */
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
#pragma once
@@ -56,7 +56,7 @@
#ifdef RGB_MATRIX_ENABLE
# define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
# define RGB_MATRIX_KEYPRESSES
# define RGB_MATRIX_FRAMEBUFFER_EFFECTS
# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
@@ -100,5 +100,3 @@
#define RGBLIGHT_VAL_STEP 5
#define RGBLIGHT_SLEEP
#endif
-
-
diff --git a/keyboards/latin60rgb/config.h b/keyboards/latin60rgb/config.h
index bbe502054a..97b4812910 100644
--- a/keyboards/latin60rgb/config.h
+++ b/keyboards/latin60rgb/config.h
@@ -1,18 +1,18 @@
/* Copyright 2021 latincompass
- *
- * 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 <http://www.gnu.org/licenses/>.
- */
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
#pragma once
/* USB Device descriptor parameter */
@@ -53,7 +53,7 @@
#ifdef RGB_MATRIX_ENABLE
# define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
# define RGB_MATRIX_KEYPRESSES
# define RGB_MATRIX_FRAMEBUFFER_EFFECTS
# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
@@ -77,4 +77,3 @@
# define DRIVER_1_LED_TOTAL 60
# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
#endif
-
diff --git a/keyboards/latinpadble/rules.mk b/keyboards/latinpadble/rules.mk
index e74c2da14a..d4c69eb5e6 100644
--- a/keyboards/latinpadble/rules.mk
+++ b/keyboards/latinpadble/rules.mk
@@ -7,7 +7,6 @@ F_CPU = 8000000
# Bootloader selection
BOOTLOADER = caterina
-
# Build Options
# change yes to no to disable
#
diff --git a/keyboards/launchpad/rules.mk b/keyboards/launchpad/rules.mk
index 2b115b1e1e..9396f5e3a6 100644
--- a/keyboards/launchpad/rules.mk
+++ b/keyboards/launchpad/rules.mk
@@ -27,7 +27,6 @@ AUDIO_ENABLE = no # Audio output on port C6
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
-API_SYSEX_ENABLE = no
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
diff --git a/keyboards/le_chiffre/config.h b/keyboards/le_chiffre/config.h
index e14b4665f2..af4d1e49cf 100644
--- a/keyboards/le_chiffre/config.h
+++ b/keyboards/le_chiffre/config.h
@@ -69,7 +69,7 @@
#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_DISABLE_WHEN_USB_SUSPENDED // 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
diff --git a/keyboards/lets_split/keymaps/DE_programming/keymap.c b/keyboards/lets_split/keymaps/DE_programming/keymap.c
index 32231f8831..a72ba4f865 100644
--- a/keyboards/lets_split/keymaps/DE_programming/keymap.c
+++ b/keyboards/lets_split/keymaps/DE_programming/keymap.c
@@ -47,9 +47,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------------------'
*/
[_LOWER] = LAYOUT(
- DE_CIRC, DE_EXLM, DE_QST, DE_PARA, DE_EURO, DE_TILD, DE_DLR, DE_LPRN, DE_RPRN, DE_LESS, DE_MORE, KC_BSPC,
+ DE_CIRC, DE_EXLM, DE_QUES, DE_SECT, DE_EURO, DE_TILD, DE_DLR, DE_LPRN, DE_RPRN, DE_LABK, DE_RABK, KC_BSPC,
KC_DEL, KC_VOLU, KC_MPRV, KC_MNXT, KC_MPLY, DE_AMPR, DE_AT, DE_LCBR, DE_RCBR, DE_LBRC, DE_RBRC, KC_ENT,
- KC_LSFT, KC_VOLD, _______, _______, _______, DE_PIPE, DE_PERC, DE_SLSH, DE_BSLS, DE_QUOT, DE_DQOT, KC_RSFT,
+ KC_LSFT, KC_VOLD, _______, _______, _______, DE_PIPE, DE_PERC, DE_SLSH, DE_BSLS, DE_QUOT, DE_DQUO, KC_RSFT,
KC_LCTL, _______, _______, _______, _______, _______, _______, _______, DE_EQL, DE_ASTR, _______, _______
),
@@ -66,7 +66,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/
[_RAISE] = LAYOUT(
DE_SLSH, KC_7, KC_8, KC_9, DE_ASTR, _______, _______, _______, DE_HASH, KC_LALT, DE_ACUT, KC_BSPC,
- KC_DEL, KC_4, KC_5, KC_6, DE_MINS, KC_HOME, KC_END, DE_AE, DE_OE, DE_UE, DE_SS, KC_ENT,
+ KC_DEL, KC_4, KC_5, KC_6, DE_MINS, KC_HOME, KC_END, DE_ADIA, DE_ODIA, DE_UDIA, DE_SS, KC_ENT,
KC_LSFT, KC_1, KC_2, KC_3, DE_PLUS, KC_PGUP, KC_PGDN, _______, _______, _______, _______, KC_LSFT,
_______, DE_DOT, KC_0, DE_EQL, _______, _______, _______, _______, _______, _______, _______, _______
),
diff --git a/keyboards/lets_split/keymaps/DE_simple/keymap.c b/keyboards/lets_split/keymaps/DE_simple/keymap.c
index 32383ec67b..c49da49cf0 100644
--- a/keyboards/lets_split/keymaps/DE_simple/keymap.c
+++ b/keyboards/lets_split/keymaps/DE_simple/keymap.c
@@ -51,8 +51,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------------------'
*/
[_LOWER] = LAYOUT( \
- DE_CIRC, DE_EXLM, DE_DQOT, DE_PARA, DE_DLR, DE_PERC, DE_AMPR, DE_SLSH, DE_LPRN, DE_RPRN, DE_EQL, KC_BSPC, \
- KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, DE_AT , DE_EURO, KC_LBRC, DE_QST, DE_QUOT, \
+ DE_CIRC, DE_EXLM, DE_DQUO, DE_SECT, DE_DLR, DE_PERC, DE_AMPR, DE_SLSH, DE_LPRN, DE_RPRN, DE_EQL, KC_BSPC, \
+ KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, DE_AT , DE_EURO, KC_LBRC, DE_QUES, DE_QUOT, \
KC_LSFT, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, DE_PIPE , KC_SCLN, KC_QUOT, _______, KC_ENT, \
_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
),
diff --git a/keyboards/lets_split/keymaps/bbaserdem_right/rules.mk b/keyboards/lets_split/keymaps/bbaserdem_right/rules.mk
index 377a0ded11..c4994dc94a 100755
--- a/keyboards/lets_split/keymaps/bbaserdem_right/rules.mk
+++ b/keyboards/lets_split/keymaps/bbaserdem_right/rules.mk
@@ -15,7 +15,5 @@ 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
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
UNICODE_ENABLE = no # Used for unicode character emulation
EXTRAKEY_ENABLE = no # OS signals like volume control
diff --git a/keyboards/lets_split_eh/rules.mk b/keyboards/lets_split_eh/rules.mk
index fe3face86b..9f1e01772e 100644
--- a/keyboards/lets_split_eh/rules.mk
+++ b/keyboards/lets_split_eh/rules.mk
@@ -27,7 +27,6 @@ AUDIO_ENABLE = no # Audio output on port C6
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
-API_SYSEX_ENABLE = no
SPLIT_KEYBOARD = yes
diff --git a/keyboards/lizard_trick/tenkey_plusplus/config.h b/keyboards/lizard_trick/tenkey_plusplus/config.h
index d962e67dae..d1087851cb 100644
--- a/keyboards/lizard_trick/tenkey_plusplus/config.h
+++ b/keyboards/lizard_trick/tenkey_plusplus/config.h
@@ -41,7 +41,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-#define MATRIX_ROW_PINS { B7, D4, B5, B6, C6, C7, }
+#define MATRIX_ROW_PINS { B7, D4, B5, B6, C6, C7 }
#define MATRIX_COL_PINS { D5, D3, D2, F7 }
#define UNUSED_PINS
diff --git a/keyboards/m10a/keymaps/gam3cat/rules.mk b/keyboards/m10a/keymaps/gam3cat/rules.mk
index 374f522425..7b387d27c4 100644
--- a/keyboards/m10a/keymaps/gam3cat/rules.mk
+++ b/keyboards/m10a/keymaps/gam3cat/rules.mk
@@ -18,6 +18,5 @@ UNICODEMAP_ENABLE = no # Enable extended unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
AUDIO_ENABLE = no # Audio output on port C6
#VARIABLE_TRACE = no # Use this to debug changes to variable values
-API_SYSEX_ENABLE = no # This enables using the Quantum SYSEX API to send strings(+5390)
KEY_LOCK_ENABLE = no # This enables key lock(+260)
SPLIT_KEYBOARD = no # This enables split keyboard support and includes all necessary files located at quantum/split_common
diff --git a/keyboards/m10a/rules.mk b/keyboards/m10a/rules.mk
index 0f8368e637..27bf6d0113 100644
--- a/keyboards/m10a/rules.mk
+++ b/keyboards/m10a/rules.mk
@@ -22,4 +22,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth
AUDIO_ENABLE = no # Audio output
UNICODE_ENABLE = yes # Unicode
-API_SYSEX_ENABLE = yes
diff --git a/keyboards/manyboard/macro/config.h b/keyboards/manyboard/macro/config.h
new file mode 100644
index 0000000000..d7a950f2e6
--- /dev/null
+++ b/keyboards/manyboard/macro/config.h
@@ -0,0 +1,53 @@
+/*
+Copyright 2020 William Ehman
+
+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 <http://www.gnu.org/licenses/>.
+*/
+
+#pragma once
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0x4D42 // MB
+#define PRODUCT_ID 0x0015 // 15 keys
+#define DEVICE_VER 0x0103
+#define MANUFACTURER Manyboard
+#define PRODUCT MB_Macro
+
+/* key matrix size */
+#define MATRIX_ROWS 4
+#define MATRIX_COLS 4
+
+/* key matrix pins */
+#define MATRIX_ROW_PINS { D0, D1, D2, D3 }
+#define MATRIX_COL_PINS { D4, D5, D6, D7 }
+#define UNUSED_PINS
+
+/*Encoder Pins*/
+#define ENCODERS_PAD_A { C6 }
+#define ENCODERS_PAD_B { C7 }
+
+/* COL2ROW, ROW2COL */
+#define DIODE_DIRECTION ROW2COL
+
+/* RGB Pins */
+#define RGB_DI_PIN B6
+#define RGBLED_NUM 2
+#define RGBLIGHT_LIMIT_VAL 10
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCE 5
+/* disable these deprecated features by default */
+#define NO_ACTION_MACRO
+#define NO_ACTION_FUNCTION
diff --git a/keyboards/manyboard/macro/info.json b/keyboards/manyboard/macro/info.json
new file mode 100644
index 0000000000..8155672a7e
--- /dev/null
+++ b/keyboards/manyboard/macro/info.json
@@ -0,0 +1,29 @@
+{
+ "keyboard_name": "manyboard_macro",
+ "url": "https://github.com/WillEhman/qmk_firmware/tree/dev_create_mb_macro",
+ "maintainer": "William Ehman",
+ "width": 4,
+ "height": 4,
+ "layouts": {
+ "LAYOUT_ortho_4x4": {
+ "layout": [
+ {"x": 0, "y": 0},
+ {"x": 1, "y": 0},
+ {"x": 2, "y": 0},
+ {"x": 3, "y": 0},
+ {"x": 0, "y": 1},
+ {"x": 1, "y": 1},
+ {"x": 2, "y": 1},
+ {"x": 3, "y": 1},
+ {"x": 0, "y": 2},
+ {"x": 1, "y": 2},
+ {"x": 2, "y": 2},
+ {"x": 3, "y": 2},
+ {"x": 0, "y": 3},
+ {"x": 1, "y": 3},
+ {"x": 2, "y": 3},
+ {"x": 3, "y": 3}
+ ]
+ }
+ }
+}
diff --git a/keyboards/manyboard/macro/keymaps/default/keymap.c b/keyboards/manyboard/macro/keymaps/default/keymap.c
new file mode 100644
index 0000000000..4feda50808
--- /dev/null
+++ b/keyboards/manyboard/macro/keymaps/default/keymap.c
@@ -0,0 +1,73 @@
+/* Copyright 2020 William Ehman
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+#include QMK_KEYBOARD_H
+
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [0] = LAYOUT_ortho_4x4(
+ 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_F13, KC_F14, KC_F15, TO(1)
+ ),
+ [1] = LAYOUT_ortho_4x4(
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, TO(2)
+ ),
+ [2] = LAYOUT_ortho_4x4(
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, TO(0)
+ ),
+};
+
+layer_state_t layer_state_set_user(layer_state_t state) {
+ switch (get_highest_layer(state)) {
+ case 0:
+ sethsv(HSV_WHITE, (LED_TYPE *)&led[0]);
+ rgblight_set();
+ break;
+ case 1:
+ sethsv(HSV_GREEN, (LED_TYPE *)&led[0]);
+ rgblight_set();
+ break;
+ case 2:
+ sethsv(HSV_BLUE, (LED_TYPE *)&led[0]);
+ rgblight_set();
+ break;
+ }
+ return state;
+}
+
+void encoder_update_user(uint8_t index, bool clockwise) {
+ /* With an if statement we can check which encoder was turned. */
+ if (index == 0) { /* First encoder */
+ /* And with another if statement we can check the direction. */
+ if (clockwise) {
+ /* This is where the actual magic happens: this bit of code taps on the
+ Page Down key. You can do anything QMK allows you to do here.
+ You'll want to replace these lines with the things you want your
+ encoders to do. */
+ tap_code(KC_AUDIO_VOL_UP);
+ } else {
+ /* And likewise for the other direction, this time Vol Down is pressed. */
+ tap_code(KC_AUDIO_VOL_DOWN);
+ }
+ }
+}
diff --git a/keyboards/manyboard/macro/keymaps/via/keymap.c b/keyboards/manyboard/macro/keymaps/via/keymap.c
new file mode 100644
index 0000000000..ce32d6d242
--- /dev/null
+++ b/keyboards/manyboard/macro/keymaps/via/keymap.c
@@ -0,0 +1,72 @@
+/* Copyright 2020 William Ehman
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+#include QMK_KEYBOARD_H
+
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [0] = LAYOUT_ortho_4x4(
+ 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_F13, KC_F14, KC_F15, TO(1)
+ ),
+ [1] = LAYOUT_ortho_4x4(
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, TO(2)
+ ),
+ [2] = LAYOUT_ortho_4x4(
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, TO(0)
+ ),
+};
+layer_state_t layer_state_set_user(layer_state_t state) {
+ switch (get_highest_layer(state)) {
+ case 0:
+ sethsv(HSV_WHITE, (LED_TYPE *)&led[0]);
+ rgblight_set();
+ break;
+ case 1:
+ sethsv(HSV_GREEN, (LED_TYPE *)&led[0]);
+ rgblight_set();
+ break;
+ case 2:
+ sethsv(HSV_BLUE, (LED_TYPE *)&led[0]);
+ rgblight_set();
+ break;
+ }
+ return state;
+}
+
+void encoder_update_user(uint8_t index, bool clockwise) {
+ /* With an if statement we can check which encoder was turned. */
+ if (index == 0) { /* First encoder */
+ /* And with another if statement we can check the direction. */
+ if (clockwise) {
+ /* This is where the actual magic happens: this bit of code taps on the
+ Page Down key. You can do anything QMK allows you to do here.
+ You'll want to replace these lines with the things you want your
+ encoders to do. */
+ tap_code(KC_AUDIO_VOL_UP);
+ } else {
+ /* And likewise for the other direction, this time Vol Down is pressed. */
+ tap_code(KC_AUDIO_VOL_DOWN);
+ }
+ }
+}
diff --git a/keyboards/manyboard/macro/keymaps/via/rules.mk b/keyboards/manyboard/macro/keymaps/via/rules.mk
new file mode 100644
index 0000000000..036bd6d1c3
--- /dev/null
+++ b/keyboards/manyboard/macro/keymaps/via/rules.mk
@@ -0,0 +1 @@
+VIA_ENABLE = yes \ No newline at end of file
diff --git a/keyboards/manyboard/macro/macro.c b/keyboards/manyboard/macro/macro.c
new file mode 100644
index 0000000000..eb8a188f3c
--- /dev/null
+++ b/keyboards/manyboard/macro/macro.c
@@ -0,0 +1,17 @@
+/* Copyright 2020 WillEhman
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
+#include "macro.h"
diff --git a/keyboards/manyboard/macro/macro.h b/keyboards/manyboard/macro/macro.h
new file mode 100644
index 0000000000..0dccdbebfb
--- /dev/null
+++ b/keyboards/manyboard/macro/macro.h
@@ -0,0 +1,31 @@
+/* Copyright 2020 WillEhman
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+
+#include "quantum.h"
+
+#define LAYOUT_ortho_4x4( \
+ K00, K01, K02, K03, \
+ K10, K11, K12, K13, \
+ K20, K21, K22, K23, \
+ K30, K31, K32, K33 \
+) { \
+ { K00, K01, K02, K03 }, \
+ { K10, K11, K12, K13 }, \
+ { K20, K21, K22, K23 }, \
+ { K30, K31, K32, K33 } \
+}
diff --git a/keyboards/manyboard/macro/readme.md b/keyboards/manyboard/macro/readme.md
new file mode 100644
index 0000000000..ca400b30e7
--- /dev/null
+++ b/keyboards/manyboard/macro/readme.md
@@ -0,0 +1,15 @@
+# manyboard_macro
+
+* Keyboard Maintainer: [WillEhman](https://github.com/WillEhman)
+* Hardware Supported: The Manyboard Family of keyboards
+* Hardware Availability: TBA
+
+Make example for this keyboard (after setting up your build environment):
+
+ make manyboard/macro:default
+
+Flashing example for this keyboard:
+
+ make manyboard/macro:default:flash
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/manyboard/macro/rules.mk b/keyboards/manyboard/macro/rules.mk
new file mode 100644
index 0000000000..fd709670b6
--- /dev/null
+++ b/keyboards/manyboard/macro/rules.mk
@@ -0,0 +1,23 @@
+# MCU name
+MCU = atmega32u4
+
+# Bootloader selection
+BOOTLOADER = atmel-dfu
+
+# Build Options
+# change yes to no to disable
+#
+BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
+MOUSEKEY_ENABLE = yes # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = no # Console for debug
+COMMAND_ENABLE = no # Commands for debug and configuration
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+NKRO_ENABLE = no # USB Nkey Rollover
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
+RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
+BLUETOOTH_ENABLE = no # Enable Bluetooth
+AUDIO_ENABLE = no # Audio output
+ENCODER_ENABLE = yes # Encoder Input
diff --git a/keyboards/marksard/rhymestone/rev1/config.h b/keyboards/marksard/rhymestone/rev1/config.h
index 9a1bf0a1d8..9833925110 100644
--- a/keyboards/marksard/rhymestone/rev1/config.h
+++ b/keyboards/marksard/rhymestone/rev1/config.h
@@ -93,7 +93,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGB_MATRIX_KEYPRESSES // reacts to keypresses
// #define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
// #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
- #define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+ #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
// #define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness)
// #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 200 out of 255. If not defined maximum brightness is set to 255
diff --git a/keyboards/massdrop/alt/keymaps/pregame/config.h b/keyboards/massdrop/alt/keymaps/pregame/config.h
index acd041ce14..32dee56d30 100644
--- a/keyboards/massdrop/alt/keymaps/pregame/config.h
+++ b/keyboards/massdrop/alt/keymaps/pregame/config.h
@@ -89,7 +89,7 @@
// #define RGBLIGHT_SAT_STEP 25 // Units to step when in/decreasing saturation
// #define RGBLIGHT_VAL_STEP 12 // Units to step when in/decreasing value (brightness)
// #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-// #define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended
+// #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
// #define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness)
// #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 RGBLIGHT_ANIMATIONS // Run RGB animations
@@ -103,7 +103,7 @@
// #define RGBLIGHT_EFFECT_RGB_TEST // Enable RGB test animation mode.
// #define RGBLIGHT_EFFECT_SNAKE // Enable snake animation mode.
// #define RGBLIGHT_EFFECT_STATIC_GRADIENT // Enable static gradient mode.
-
+
// #define RGBLIGHT_EFFECT_BREATHE_CENTER // If defined, used to calculate the curve for the breathing animation. Valid values are 1.0 to 2.7
// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // The maximum brightness for the breathing mode. Valid values are 1 to 255
// #define RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL 1000 // How long to wait between light changes for the "Christmas" animation, in milliseconds
diff --git a/keyboards/massdrop/alt/keymaps/urbanvanilla/config.h b/keyboards/massdrop/alt/keymaps/urbanvanilla/config.h
index 0f2740013d..f2a7e50386 100644
--- a/keyboards/massdrop/alt/keymaps/urbanvanilla/config.h
+++ b/keyboards/massdrop/alt/keymaps/urbanvanilla/config.h
@@ -24,4 +24,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGB_MATRIX_LED_PROCESS_LIMIT 15
#define RGB_MATRIX_LED_FLUSH_LIMIT 10
-#define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended
+// #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
diff --git a/keyboards/massdrop/ctrl/keymaps/endgame/config.h b/keyboards/massdrop/ctrl/keymaps/endgame/config.h
index 0ef485591f..ad738347ab 100644
--- a/keyboards/massdrop/ctrl/keymaps/endgame/config.h
+++ b/keyboards/massdrop/ctrl/keymaps/endgame/config.h
@@ -49,7 +49,7 @@
// #define RGBLIGHT_SAT_STEP 25 // Units to step when in/decreasing saturation
// #define RGBLIGHT_VAL_STEP 12 // Units to step when in/decreasing value (brightness)
// #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-// #define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended
+// #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
// #define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness)
// #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 RGBLIGHT_ANIMATIONS // Run RGB animations
diff --git a/keyboards/massdrop/ctrl/keymaps/matthewrobo/config.h b/keyboards/massdrop/ctrl/keymaps/matthewrobo/config.h
index 6e16c3a5f9..89c129c58e 100644
--- a/keyboards/massdrop/ctrl/keymaps/matthewrobo/config.h
+++ b/keyboards/massdrop/ctrl/keymaps/matthewrobo/config.h
@@ -67,7 +67,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// #define RGBLIGHT_SAT_STEP 25 // Units to step when in/decreasing saturation
// #define RGBLIGHT_VAL_STEP 12 // Units to step when in/decreasing value (brightness)
// #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-// #define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended
+// #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
// #define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness)
// #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 RGBLIGHT_ANIMATIONS // Run RGB animations
diff --git a/keyboards/masterworks/classy_tkl/rev_a/rules.mk b/keyboards/masterworks/classy_tkl/rev_a/rules.mk
index 68d6bc50c1..ba09a6cb6a 100644
--- a/keyboards/masterworks/classy_tkl/rev_a/rules.mk
+++ b/keyboards/masterworks/classy_tkl/rev_a/rules.mk
@@ -21,6 +21,3 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
BLUETOOTH_ENABLE = no # Enable Bluetooth
AUDIO_ENABLE = no # Audio output
-
-# Supported layouts
-LAYOUTS = tkl_ansi_wkl tkl_iso_wkl
diff --git a/keyboards/maxr1998/phoebe/keymaps/default/keymap.c b/keyboards/maxr1998/phoebe/keymaps/default/keymap.c
index 11df63bb17..11ac657751 100644
--- a/keyboards/maxr1998/phoebe/keymaps/default/keymap.c
+++ b/keyboards/maxr1998/phoebe/keymaps/default/keymap.c
@@ -31,7 +31,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* └─────┴─────┴─────┴─────┴─────┴───────────┴─────┴─────┴─────┴─────┴─────┘
*/
[_QWERTZ] = LAYOUT(
- KC_ESC, DE_1, DE_2, DE_3, DE_4, DE_5, DE_6, DE_7, DE_8, DE_9, DE_0, DE_QST,
+ KC_ESC, DE_1, DE_2, DE_3, DE_4, DE_5, DE_6, DE_7, DE_8, DE_9, DE_0, DE_QUES,
KC_GRV, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, DE_PLUS, KC_ENT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_RSPC,
@@ -55,7 +55,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
DE_ACUT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, DE_HASH, _______,
- _______, DE_LESS, _______, _______, _______, _______, _______, _______, _______, _______, DE_MINS, _______,
+ _______, DE_LABK, _______, _______, _______, _______, _______, _______, _______, _______, DE_MINS, _______,
_______, _______, _______, XXXXXXX, _______, _______, _______, XXXXXXX, _______, _______, _______
),
@@ -74,8 +74,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/
[_FN] = LAYOUT(
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F10, KC_F11, KC_F12,
- _______, _______, _______, _______, _______, _______, _______, DE_UE, KC_F9, DE_OE, _______, KC_DEL,
- KC_LOCK, DE_AE, DE_SS, _______, _______, G_1, _______, RGB_M_P, RGB_M_SW,RGB_M_SN,_______, _______,
+ _______, _______, _______, _______, _______, _______, _______, DE_UDIA, KC_F9, DE_ODIA, _______, KC_DEL,
+ KC_LOCK, DE_ADIA, DE_SS, _______, _______, G_1, _______, RGB_M_P, RGB_M_SW,RGB_M_SN,_______, _______,
_______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_TOG, RGB_HUI, KC_PGUP, _______,
XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, KC_HOME, KC_PGDN, KC_END
),
@@ -106,7 +106,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
- case DE_QST:
+ case DE_QUES:
if (get_mods() & MODS_ALGR_MASK) {
if (record->event.pressed) {
register_code(DE_SS);
@@ -119,9 +119,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
case KC_Z:
if (get_mods() & MODS_ALGR_MASK) {
if (record->event.pressed) {
- register_code(DE_LESS);
+ register_code(DE_LABK);
} else {
- unregister_code(DE_LESS);
+ unregister_code(DE_LABK);
}
return false;
}
diff --git a/keyboards/maxr1998/phoebe/rules.mk b/keyboards/maxr1998/phoebe/rules.mk
index f60274e515..16d797d41b 100644
--- a/keyboards/maxr1998/phoebe/rules.mk
+++ b/keyboards/maxr1998/phoebe/rules.mk
@@ -30,5 +30,4 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
KEY_LOCK_ENABLE = yes
LEADER_ENABLE = yes # Enable leader key
-API_SYSEX_ENABLE = no
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
diff --git a/keyboards/maxr1998/pulse4k/rules.mk b/keyboards/maxr1998/pulse4k/rules.mk
index 71d9b5debf..084db7fee8 100644
--- a/keyboards/maxr1998/pulse4k/rules.mk
+++ b/keyboards/maxr1998/pulse4k/rules.mk
@@ -29,5 +29,4 @@ AUDIO_ENABLE = no # Audio output on port C6
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
-API_SYSEX_ENABLE = no
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
diff --git a/keyboards/mechlovin/adelais/rgb_led/rev1/config.h b/keyboards/mechlovin/adelais/rgb_led/rev1/config.h
index 1ba7d27dff..d75cbd3f2a 100644
--- a/keyboards/mechlovin/adelais/rgb_led/rev1/config.h
+++ b/keyboards/mechlovin/adelais/rgb_led/rev1/config.h
@@ -13,7 +13,7 @@
#define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-#define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended
+// #define RGB_DISABLE_WHEN_USB_SUSPENDED // 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 220 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
-#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_PINWHEEL // Sets the default mode, if none has been set \ No newline at end of file
+#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_PINWHEEL // Sets the default mode, if none has been set
diff --git a/keyboards/mechlovin/adelais/rgb_led/rev2/config.h b/keyboards/mechlovin/adelais/rgb_led/rev2/config.h
index 38ffdd40ae..c830edce26 100644
--- a/keyboards/mechlovin/adelais/rgb_led/rev2/config.h
+++ b/keyboards/mechlovin/adelais/rgb_led/rev2/config.h
@@ -1,7 +1,7 @@
#pragma once
#define PRODUCT_ID 0xAEC2
-#define PRODUCT Adelais En Ciel Rev2
+#define PRODUCT Adelais En Ciel Rev2
#define MATRIX_ROW_PINS { B1, A0, C13, A1, A2}
#define MATRIX_COL_PINS { A10, A9, A8, B15, B14, B13, B12, B11, B10, B8, B4, B5, B3, C14, A7 }
@@ -31,7 +31,7 @@
#define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-#define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended
+// #define RGB_DISABLE_WHEN_USB_SUSPENDED // 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 255 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_PINWHEEL // Sets the default mode, if none has been set
@@ -42,4 +42,4 @@
#define ENCODERS_PAD_B { A3 }
#define ENCODER_RESOLUTION 4
-#define TAP_CODE_DELAY 10 \ No newline at end of file
+#define TAP_CODE_DELAY 10
diff --git a/keyboards/mechlovin/delphine/rgb_led/config.h b/keyboards/mechlovin/delphine/rgb_led/config.h
index 4d5c853d0c..9a653d7595 100644
--- a/keyboards/mechlovin/delphine/rgb_led/config.h
+++ b/keyboards/mechlovin/delphine/rgb_led/config.h
@@ -24,7 +24,7 @@
// #define RGBLIGHT_EFFECT_RGB_TEST
// #define RGBLIGHT_EFFECT_ALTERNATING
#endif
-
+
//rgb matrix setting// This is a 7-bit address, that gets left-shifted and bit 0
// set to 0 for write, 1 for read (as per I2C protocol)
// The address will vary depending on your wiring:
@@ -41,7 +41,7 @@
#define RGB_MATRIX_KEYPRESSES // reacts to keypresses
#define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-#define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended
+// #define RGB_DISABLE_WHEN_USB_SUSPENDED // 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 255 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_PINWHEEL // Sets the default mode, if none has been set
diff --git a/keyboards/mechlovin/hannah60rgb/rev1/config.h b/keyboards/mechlovin/hannah60rgb/rev1/config.h
index 20873e7161..fd45ecca6c 100644
--- a/keyboards/mechlovin/hannah60rgb/rev1/config.h
+++ b/keyboards/mechlovin/hannah60rgb/rev1/config.h
@@ -11,8 +11,8 @@
# define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
# define RGB_MATRIX_FRAMEBUFFER_EFFECTS
# define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-# define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended
+// # define RGB_DISABLE_WHEN_USB_SUSPENDED // 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 255 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
# define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_PINWHEEL // Sets the default mode, if none has been set
-#endif \ No newline at end of file
+#endif
diff --git a/keyboards/mechlovin/hannah60rgb/rev2/config.h b/keyboards/mechlovin/hannah60rgb/rev2/config.h
index 2bcffbc856..5e57f985d3 100644
--- a/keyboards/mechlovin/hannah60rgb/rev2/config.h
+++ b/keyboards/mechlovin/hannah60rgb/rev2/config.h
@@ -30,11 +30,11 @@
#define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-#define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended
+// #define RGB_DISABLE_WHEN_USB_SUSPENDED // 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 255 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_PINWHEEL // Sets the default mode, if none has been set
#if defined(RGBLIGHT_ENABLE) && defined(RGB_MATRIX_ENABLE)
# define RGB_MATRIX_DISABLE_KEYCODES
-#endif \ No newline at end of file
+#endif
diff --git a/keyboards/mechlovin/infinity87/rgb_rev1/config.h b/keyboards/mechlovin/infinity87/rgb_rev1/config.h
index 0c16c684cf..76c6e0db73 100644
--- a/keyboards/mechlovin/infinity87/rgb_rev1/config.h
+++ b/keyboards/mechlovin/infinity87/rgb_rev1/config.h
@@ -35,7 +35,7 @@
// 0b0110001 AD <-> SCL
// 0b0110010 AD <-> SDA
#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
#define RGB_MATRIX_KEYPRESSES
#define DISABLE_RGB_MATRIX_SPLASH
#define DISABLE_RGB_MATRIX_MULTISPLASH
diff --git a/keyboards/mechlovin/tmkl/config.h b/keyboards/mechlovin/tmkl/config.h
index e36470a9bd..9a1d865e29 100644
--- a/keyboards/mechlovin/tmkl/config.h
+++ b/keyboards/mechlovin/tmkl/config.h
@@ -40,7 +40,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
*
*/
-#define MATRIX_ROW_PINS { A8, A4, A5, A3, A2, A1, }
+#define MATRIX_ROW_PINS { A8, A4, A5, A3, A2, A1 }
#define MATRIX_COL_PINS { B11, B10, B2, B1, B0, A7, A6, A0, C15, B4, B5, B3, C13, C14 }
#define DIODE_DIRECTION COL2ROW
@@ -58,4 +58,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define LED_CAPS_LOCK_PIN B9
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
-#define LOCKING_SUPPORT_ENABLE \ No newline at end of file
+#define LOCKING_SUPPORT_ENABLE
diff --git a/keyboards/mechmini/v2/keymaps/2u_space_ortho/keymap.c b/keyboards/mechmini/v2/keymaps/2u_space_ortho/keymap.c
index 1b21750035..90bb2ddd60 100644
--- a/keyboards/mechmini/v2/keymaps/2u_space_ortho/keymap.c
+++ b/keyboards/mechmini/v2/keymaps/2u_space_ortho/keymap.c
@@ -4,11 +4,10 @@
#define _FN1 1
#define _FN2 2
-#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_BL] = LAYOUT_2u_space_ortho(
- F(0), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
+ KC_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
KC_TAB, 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,
KC_CAPS, KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT),
@@ -44,81 +43,3 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
}
return MACRO_NONE;
}
-
-void matrix_init_user(void) {
-}
-
-void matrix_scan_user(void) {
-}
-
-bool process_record_user(uint16_t keycode, keyrecord_t *record) {
- return true;
-}
-
-void led_set_user(uint8_t usb_led) {
-
- if (usb_led & (1 << USB_LED_NUM_LOCK)) {
-
- } else {
-
- }
-
- if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
-
- } else {
-
- }
-
- if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
-
- } else {
-
- }
-
- if (usb_led & (1 << USB_LED_COMPOSE)) {
-
- } else {
-
- }
-
- if (usb_led & (1 << USB_LED_KANA)) {
-
- } else {
-
- }
-
-}
-
-enum function_id {
- SHIFT_ESC,
-};
-
-const uint16_t PROGMEM fn_actions[] = {
- [0] = ACTION_FUNCTION(SHIFT_ESC),
-};
-
-void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
- static uint8_t shift_esc_shift_mask;
- switch (id) {
- case SHIFT_ESC:
- shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK;
- if (record->event.pressed) {
- if (shift_esc_shift_mask) {
- add_key(KC_GRV);
- send_keyboard_report();
- } else {
- add_key(KC_ESC);
- send_keyboard_report();
- }
- } else {
- if (shift_esc_shift_mask) {
- del_key(KC_GRV);
- send_keyboard_report();
- } else {
- del_key(KC_ESC);
- send_keyboard_report();
- }
- }
- break;
- }
-}
diff --git a/keyboards/mechmini/v2/keymaps/625_space/keymap.c b/keyboards/mechmini/v2/keymaps/625_space/keymap.c
index 0746b8aec9..4344d6d2bc 100755
--- a/keyboards/mechmini/v2/keymaps/625_space/keymap.c
+++ b/keyboards/mechmini/v2/keymaps/625_space/keymap.c
@@ -4,11 +4,10 @@
#define _FN1 1
#define _FN2 2
-#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_BL] = LAYOUT_625_space(
- F(0), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
+ KC_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_LSFT, KC_DOT,
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, MO(1), MO(2)),
@@ -27,37 +26,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
-
-enum function_id {
- SHIFT_ESC,
-};
-
-const uint16_t PROGMEM fn_actions[] = {
- [0] = ACTION_FUNCTION(SHIFT_ESC),
-};
-
-void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
- static uint8_t shift_esc_shift_mask;
- switch (id) {
- case SHIFT_ESC:
- shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK;
- if (record->event.pressed) {
- if (shift_esc_shift_mask) {
- add_key(KC_GRV);
- send_keyboard_report();
- } else {
- add_key(KC_ESC);
- send_keyboard_report();
- }
- } else {
- if (shift_esc_shift_mask) {
- del_key(KC_GRV);
- send_keyboard_report();
- } else {
- del_key(KC_ESC);
- send_keyboard_report();
- }
- }
- break;
- }
-}
diff --git a/keyboards/mechmini/v2/keymaps/ortho/keymap.c b/keyboards/mechmini/v2/keymaps/ortho/keymap.c
index 3b8fbb168f..31ccfa82a3 100755
--- a/keyboards/mechmini/v2/keymaps/ortho/keymap.c
+++ b/keyboards/mechmini/v2/keymaps/ortho/keymap.c
@@ -4,11 +4,10 @@
#define _FN1 1
#define _FN2 2
-#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_BL] = LAYOUT_ortho(
- F(0), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
+ KC_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
KC_TAB, 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,
KC_CAPS, KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT),
@@ -44,81 +43,3 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
}
return MACRO_NONE;
}
-
-void matrix_init_user(void) {
-}
-
-void matrix_scan_user(void) {
-}
-
-bool process_record_user(uint16_t keycode, keyrecord_t *record) {
- return true;
-}
-
-void led_set_user(uint8_t usb_led) {
-
- if (usb_led & (1 << USB_LED_NUM_LOCK)) {
-
- } else {
-
- }
-
- if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
-
- } else {
-
- }
-
- if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
-
- } else {
-
- }
-
- if (usb_led & (1 << USB_LED_COMPOSE)) {
-
- } else {
-
- }
-
- if (usb_led & (1 << USB_LED_KANA)) {
-
- } else {
-
- }
-
-}
-
-enum function_id {
- SHIFT_ESC,
-};
-
-const uint16_t PROGMEM fn_actions[] = {
- [0] = ACTION_FUNCTION(SHIFT_ESC),
-};
-
-void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
- static uint8_t shift_esc_shift_mask;
- switch (id) {
- case SHIFT_ESC:
- shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK;
- if (record->event.pressed) {
- if (shift_esc_shift_mask) {
- add_key(KC_GRV);
- send_keyboard_report();
- } else {
- add_key(KC_ESC);
- send_keyboard_report();
- }
- } else {
- if (shift_esc_shift_mask) {
- del_key(KC_GRV);
- send_keyboard_report();
- } else {
- del_key(KC_ESC);
- send_keyboard_report();
- }
- }
- break;
- }
-}
diff --git a/keyboards/mechmini/v2/keymaps/spacebarracecar/keymap.c b/keyboards/mechmini/v2/keymaps/spacebarracecar/keymap.c
index a7e06c6043..c0fb3695f9 100644
--- a/keyboards/mechmini/v2/keymaps/spacebarracecar/keymap.c
+++ b/keyboards/mechmini/v2/keymaps/spacebarracecar/keymap.c
@@ -44,7 +44,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
`-----------------------------------------------------------------------------------------------------------------------'
*/
[_LOWER] = LAYOUT_ortho(
- DE_TILD, DE_EXLM, DE_DQOT, DE_HASH, DE_DLR, DE_PERC, CU_CIRC, DE_AMPR, DE_ASTR, DE_LPRN, DE_RPRN, _______,
+ DE_TILD, DE_EXLM, DE_DQUO, DE_HASH, DE_DLR, DE_PERC, CU_CIRC, DE_AMPR, DE_ASTR, DE_LPRN, DE_RPRN, _______,
_______, DE_AT, CTRLX, CTRLC, CTRLV, XXXXXXX, XXXXXXX, DE_UNDS, DE_PLUS, DE_LCBR, DE_RCBR, DE_PIPE,
_______, DE_EURO, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DE_MINS, CU_EQL, CU_LBRC, CU_RBRC, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
diff --git a/keyboards/mechmini/v2/keymaps/split_space/keymap.c b/keyboards/mechmini/v2/keymaps/split_space/keymap.c
index e332c641a6..635b4eacb3 100755
--- a/keyboards/mechmini/v2/keymaps/split_space/keymap.c
+++ b/keyboards/mechmini/v2/keymaps/split_space/keymap.c
@@ -4,11 +4,10 @@
#define _FN1 1
#define _FN2 2
-#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_BL] = LAYOUT_split_space(
- F(0), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
+ KC_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_RSFT, KC_DOT,
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_RCTL, MO(1), MO(2)),
@@ -26,37 +25,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
};
-
-enum function_id {
- SHIFT_ESC,
-};
-
-const uint16_t PROGMEM fn_actions[] = {
- [0] = ACTION_FUNCTION(SHIFT_ESC),
-};
-
-void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
- static uint8_t shift_esc_shift_mask;
- switch (id) {
- case SHIFT_ESC:
- shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK;
- if (record->event.pressed) {
- if (shift_esc_shift_mask) {
- add_key(KC_GRV);
- send_keyboard_report();
- } else {
- add_key(KC_ESC);
- send_keyboard_report();
- }
- } else {
- if (shift_esc_shift_mask) {
- del_key(KC_GRV);
- send_keyboard_report();
- } else {
- del_key(KC_ESC);
- send_keyboard_report();
- }
- }
- break;
- }
-}
diff --git a/keyboards/meira/featherble/config.h b/keyboards/meira/featherble/config.h
index e8db87acbb..dadc10d600 100644
--- a/keyboards/meira/featherble/config.h
+++ b/keyboards/meira/featherble/config.h
@@ -32,7 +32,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#define MATRIX_ROW_PINS { F7, F6, F5, F4 }
// Column pins to demux in LSB order
-#define MATRIX_COL_PINS { C7, B7, B6, C6 }
+#define MATRIX_COL_PINS { C7, B7, B6, C6, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN }
#define LED_EN_PIN D2
#define UNUSED_PINS
diff --git a/keyboards/meira/meira.h b/keyboards/meira/meira.h
index cad590477c..d968394400 100644
--- a/keyboards/meira/meira.h
+++ b/keyboards/meira/meira.h
@@ -25,7 +25,7 @@ void reset_keyboard_kb(void);
// The following is an example using the Planck MIT layout
// The first section contains all of the arguments
// The second converts the arguments into a two-dimensional array
-#define LAYOUT( \
+#define LAYOUT_ortho_4x12( \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
@@ -38,7 +38,7 @@ void reset_keyboard_kb(void);
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b } \
}
-#define LAYOUT_ortho_4x12 LAYOUT
+#define LAYOUT LAYOUT_ortho_4x12
#endif
diff --git a/keyboards/meira/promicro/config.h b/keyboards/meira/promicro/config.h
index bb88f9e08e..be5fae9aa9 100644
--- a/keyboards/meira/promicro/config.h
+++ b/keyboards/meira/promicro/config.h
@@ -32,7 +32,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#define MATRIX_ROW_PINS { F7, F6, F5, F4 }
// Column pins to demux in LSB order
-#define MATRIX_COL_PINS { B1, B3, B2, B6 }
+#define MATRIX_COL_PINS { B1, B3, B2, B6, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN }
#define LED_EN_PIN D2
#define UNUSED_PINS
diff --git a/keyboards/melgeek/mj61/config.h b/keyboards/melgeek/mj61/config.h
index 164c04fb50..6ba19dd757 100644
--- a/keyboards/melgeek/mj61/config.h
+++ b/keyboards/melgeek/mj61/config.h
@@ -37,7 +37,7 @@
#define NO_ACTION_FUNCTION
#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
#define RGB_MATRIX_KEYPRESSES
#define RGB_MATRIX_LED_PROCESS_LIMIT 4
#define RGB_MATRIX_LED_FLUSH_LIMIT 26
diff --git a/keyboards/melgeek/mj63/config.h b/keyboards/melgeek/mj63/config.h
index 47ad2f96cf..46d3b0fb7b 100644
--- a/keyboards/melgeek/mj63/config.h
+++ b/keyboards/melgeek/mj63/config.h
@@ -37,7 +37,7 @@
#define NO_ACTION_FUNCTION
#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
#define RGB_MATRIX_KEYPRESSES
#define RGB_MATRIX_LED_PROCESS_LIMIT 4
#define RGB_MATRIX_LED_FLUSH_LIMIT 26
diff --git a/keyboards/melgeek/mj64/config.h b/keyboards/melgeek/mj64/config.h
index 29cb95f171..920d34acd5 100644
--- a/keyboards/melgeek/mj64/config.h
+++ b/keyboards/melgeek/mj64/config.h
@@ -37,7 +37,7 @@
#define NO_ACTION_FUNCTION
#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
#define RGB_MATRIX_KEYPRESSES
#define RGB_MATRIX_LED_PROCESS_LIMIT 4
#define RGB_MATRIX_LED_FLUSH_LIMIT 26
diff --git a/keyboards/melgeek/mj65/config.h b/keyboards/melgeek/mj65/config.h
index 12a7c7ce18..399c243ac6 100644
--- a/keyboards/melgeek/mj65/config.h
+++ b/keyboards/melgeek/mj65/config.h
@@ -37,7 +37,7 @@
#define NO_ACTION_FUNCTION
#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
#define RGB_MATRIX_KEYPRESSES
#define RGB_MATRIX_LED_PROCESS_LIMIT 4
#define RGB_MATRIX_LED_FLUSH_LIMIT 26
diff --git a/keyboards/melgeek/mojo75/config.h b/keyboards/melgeek/mojo75/config.h
index c1a8083f1c..d5bb4b4547 100644
--- a/keyboards/melgeek/mojo75/config.h
+++ b/keyboards/melgeek/mojo75/config.h
@@ -37,7 +37,7 @@
#define NO_ACTION_FUNCTION
#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
#define RGB_MATRIX_KEYPRESSES
#define RGB_MATRIX_LED_PROCESS_LIMIT 4
#define RGB_MATRIX_LED_FLUSH_LIMIT 26
diff --git a/keyboards/melgeek/z70ultra/config.h b/keyboards/melgeek/z70ultra/config.h
index d5a9d0a894..e4530e2eaa 100644
--- a/keyboards/melgeek/z70ultra/config.h
+++ b/keyboards/melgeek/z70ultra/config.h
@@ -36,7 +36,7 @@
#define NO_ACTION_FUNCTION
#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
#define RGB_MATRIX_KEYPRESSES
#define RGB_MATRIX_LED_PROCESS_LIMIT 4
#define RGB_MATRIX_LED_FLUSH_LIMIT 26
diff --git a/keyboards/miller/gm862/config.h b/keyboards/miller/gm862/config.h
index 2b084efc25..e6e1b4c1df 100644
--- a/keyboards/miller/gm862/config.h
+++ b/keyboards/miller/gm862/config.h
@@ -36,10 +36,10 @@
#define DEBOUNCE 3
#ifdef RGB_MATRIX_ENABLE
# define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
# define RGB_MATRIX_KEYPRESSES
# define RGB_MATRIX_FRAMEBUFFER_EFFECTS
-# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
+# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
# define DISABLE_RGB_MATRIX_BAND_SAT
# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
# define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT
diff --git a/keyboards/minidox/keymaps/bepo/keymap.c b/keyboards/minidox/keymaps/bepo/keymap.c
index 95b9ef30c0..331a22314d 100644
--- a/keyboards/minidox/keymaps/bepo/keymap.c
+++ b/keyboards/minidox/keymaps/bepo/keymap.c
@@ -30,8 +30,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `------' `------'
*/
[_BEPO] = LAYOUT(
- BP_B, BP_W, BP_P, BP_O, BP_APOS, BP_DCRC, BP_V , BP_D, BP_L, BP_J,
- BP_A, BP_U, BP_I, BP_E, BP_COMMA, BP_C, BP_T, BP_S, BP_R, BP_N,
+ BP_B, BP_W, BP_P, BP_O, BP_QUOT, BP_DCIR, BP_V , BP_D, BP_L, BP_J,
+ BP_A, BP_U, BP_I, BP_E, BP_COMM, BP_C, BP_T, BP_S, BP_R, BP_N,
LGUI_T(BP_Z), ALT_T(BP_Y), CTL_T(BP_X), SFT_T(BP_DOT), BP_K, BP_M, SFT_T(BP_Q), CTL_T(BP_G), ALT_T(BP_H), LGUI_T(BP_F),
KC_DEL, TABLO, KC_SPC, KC_BSPC, ENTRA , KC_ESC
),
@@ -52,8 +52,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `------' `------'
*/
[_LOWER] = LAYOUT(
- ALGR(BP_B), BP_E_ACUTE, ALGR(BP_P), ALGR(BP_O), BP_E_GRAVE, KC_PGUP, KC_HOME, KC_UP, KC_END, KC_MS_WH_UP,
- ALGR(BP_A), ALGR(BP_U), ALGR(BP_I), ALGR(BP_E), BP_DOLLAR, KC_PGDOWN, KC_LEFT, KC_DOWN, KC_RIGHT, KC_MS_WH_DOWN,
+ ALGR(BP_B), BP_EACU, ALGR(BP_P), ALGR(BP_O), BP_EGRV, KC_PGUP, KC_HOME, KC_UP, KC_END, KC_MS_WH_UP,
+ ALGR(BP_A), ALGR(BP_U), ALGR(BP_I), ALGR(BP_E), BP_DLR, KC_PGDOWN, KC_LEFT, KC_DOWN, KC_RIGHT, KC_MS_WH_DOWN,
BP_AGRV, KC_LALT, KC_LCTL, KC_LSFT, BP_CCED, _______, KC_LSFT, KC_LCTL, KC_LALT, _______,
_______, _______, _______, _______, _______, _______
),
@@ -74,8 +74,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `------' `------'
*/
[_RAISE] = LAYOUT(
- BP_DQOT, ALGR(BP_LGIL), ALGR(BP_RGIL), BP_LPRN, BP_RPRN, BP_AT, BP_PLUS, BP_MINUS, BP_SLASH, BP_ASTR,
- S(BP_PERCENT), ALGR(BP_Y), ALGR(BP_X), ALGR(BP_LPRN), ALGR(BP_RPRN), ALGR(BP_K), BP_EQUAL, BP_PERCENT, ALGR(BP_A_GRAVE), S(BP_DOLLAR),
+ BP_DQUO, ALGR(BP_LDAQ), ALGR(BP_RDAQ), BP_LPRN, BP_RPRN, BP_AT, BP_PLUS, BP_MINS, BP_SLSH, BP_ASTR,
+ S(BP_PERC), ALGR(BP_Y), ALGR(BP_X), ALGR(BP_LPRN), ALGR(BP_RPRN), ALGR(BP_K), BP_EQL, BP_PERC, ALGR(BP_AGRV), S(BP_DLR),
ALGR(BP_B), KC_LALT, KC_LCTL, KC_LSFT, ALGR(BP_COMM), _______, KC_LSFT, KC_LCTL, KC_LALT, ALGR(BP_P),
_______, _______, ALGR(KC_SPC), _______, _______, _______
),
@@ -98,7 +98,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/
[_ADJUST] = LAYOUT(
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10,
- S(BP_DQOT), S(BP_LGIL), S(BP_RGIL), S(BP_LPRN), S(BP_RPRN), S(BP_AT), S(BP_PLUS), S(BP_MINUS), S(BP_SLASH), S(BP_ASTR),
+ S(BP_DQUO), S(BP_LDAQ), S(BP_RDAQ), S(BP_LPRN), S(BP_RPRN), S(BP_AT), S(BP_PLUS), S(BP_MINS), S(BP_SLSH), S(BP_ASTR),
KC_F11, KC_LALT, KC_LCTL, KC_LSFT, _______, _______, KC_LSFT, KC_LCTL, KC_LALT, KC_F12 ,
_______, _______, _______, _______, _______, _______
)
diff --git a/keyboards/minidox/keymaps/tw1t611/keymap.c b/keyboards/minidox/keymaps/tw1t611/keymap.c
index e94625516e..f479b10f67 100644
--- a/keyboards/minidox/keymaps/tw1t611/keymap.c
+++ b/keyboards/minidox/keymaps/tw1t611/keymap.c
@@ -34,16 +34,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
[_RAISE] = LAYOUT( \
- DE_EXLM, DE_QST, DE_PARA, DE_DLR, DE_HASH, DE_PLUS, DE_7, DE_8, DE_9, DE_0, \
- DE_CIRC, DE_QUOT, DE_DQOT, DE_GRV, DE_AMPR, DE_ASTR, DE_4, DE_5, DE_6, DE_EQL, \
+ DE_EXLM, DE_QUES, DE_SECT, DE_DLR, DE_HASH, DE_PLUS, DE_7, DE_8, DE_9, DE_0, \
+ DE_CIRC, DE_QUOT, DE_DQUO, DE_GRV, DE_AMPR, DE_ASTR, DE_4, DE_5, DE_6, DE_EQL, \
DE_SLSH, DE_PIPE, DE_BSLS, DE_AT, DE_EURO, DE_PERC, DE_1, DE_2, DE_3, KC_TAB, \
_______, _______, _______, _______, _______, _______ \
),
[_LOWER] = LAYOUT( \
KC_AUDIO_MUTE, KC_AUDIO_VOL_DOWN, DE_LBRC, DE_RBRC, KC_AUDIO_VOL_UP, KC_HOME, KC_PGDOWN, KC_PGUP, KC_END, DE_TILD, \
- KC_ESC, DE_LESS, DE_LPRN, DE_RPRN, DE_MORE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_ENT, \
- KC_BSPC, KC_DEL, DE_LCBR, DE_RCBR, KC_PSCR, _______, DE_AE, DE_OE, DE_UE, DE_SS, \
+ KC_ESC, DE_LABK, DE_LPRN, DE_RPRN, DE_RABK, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_ENT, \
+ KC_BSPC, KC_DEL, DE_LCBR, DE_RCBR, KC_PSCR, _______, DE_ADIA, DE_ODIA, DE_UDIA, DE_SS, \
_______, _______, _______, _______, MO(_ADJUST), _______ \
),
diff --git a/keyboards/mitosis/keymaps/mjt/rules.mk b/keyboards/mitosis/keymaps/mjt/rules.mk
index 0259657677..5279bcf6bb 100644
--- a/keyboards/mitosis/keymaps/mjt/rules.mk
+++ b/keyboards/mitosis/keymaps/mjt/rules.mk
@@ -10,5 +10,3 @@ AUDIO_ENABLE = yes # Audio output on port C6
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
-API_SYSEX_ENABLE = no
-
diff --git a/keyboards/monstargear/xo87/rgb/config.h b/keyboards/monstargear/xo87/rgb/config.h
index 83eee83492..5ed0ed445d 100644
--- a/keyboards/monstargear/xo87/rgb/config.h
+++ b/keyboards/monstargear/xo87/rgb/config.h
@@ -36,7 +36,7 @@
#define DIODE_DIRECTION ROW2COL
#define RGB_DI_PIN D7
#define DRIVER_LED_TOTAL 110
-#define RGB_DISABLE_WHEN_USB_SUSPENDED true
+#define RGB_DISABLE_WHEN_USB_SUSPENDED
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 100 // limits maximum brightness of LEDs to 100 out of 255.
#define RGBLIGHT_LIMIT_VAL 100 // limits maximum brightness of LEDs to 100 out of 255.
diff --git a/keyboards/moonlander/config.h b/keyboards/moonlander/config.h
index c88feea3d0..c1a139dc77 100644
--- a/keyboards/moonlander/config.h
+++ b/keyboards/moonlander/config.h
@@ -91,7 +91,7 @@
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 175
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
#define RGB_MATRIX_KEYPRESSES
-#define RGB_DISABLE_WHEN_USB_SUSPENDED true
+#define RGB_DISABLE_WHEN_USB_SUSPENDED
#define MUSIC_MAP
diff --git a/keyboards/mt84/keymaps/default/config.h b/keyboards/mt84/keymaps/default/config.h
new file mode 100644
index 0000000000..dd687cad58
--- /dev/null
+++ b/keyboards/mt84/keymaps/default/config.h
@@ -0,0 +1,19 @@
+/* Copyright 2021 QMK
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+
+#define LAYER_STATE_8BIT
diff --git a/keyboards/mt84/mt84.c b/keyboards/mt84/mt84.c
index d9f509e14d..e15a1ff951 100644
--- a/keyboards/mt84/mt84.c
+++ b/keyboards/mt84/mt84.c
@@ -1,22 +1,22 @@
- /* Copyright 2020 MT<704340378@qq.com>
- *
- * 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 <http://www.gnu.org/licenses/>.
- */
+ /* Copyright 2020 MT<704340378@qq.com>
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
#include "mt84.h"
#ifdef RGB_MATRIX_ENABLE
-const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
+const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
@@ -40,7 +40,7 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
{1, D_12, E_12, F_12},
{1, G_12, H_12, I_12},
{1, J_12, K_12, L_12},
-
+
{0, A_1, B_1, C_1},
{0, D_1, E_1, F_1},
{0, G_1, H_1, I_1},
@@ -72,7 +72,7 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
{1, A_7, B_7, C_7},
{1, D_7, E_7, F_7},
{1, G_7, H_7, I_7},
-
+
{0, A_3, B_3, C_3},
{0, D_3, E_3, F_3},
{0, G_3, H_3, I_3},
@@ -87,7 +87,7 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
{1, J_3, K_3, L_3},
{1, A_8, B_8, C_8},
{1, G_8, H_8, I_8},
-
+
{0, A_4, B_4, C_4},
{0, D_4, E_4, F_4},
{0, G_4, H_4, I_4},
@@ -130,7 +130,7 @@ led_config_t g_led_config = {{
{ 9, 52 }, { 27, 52 }, { 43, 52 }, { 59, 52 }, { 75, 52 }, { 91, 52 }, { 107, 52 }, { 123, 52 }, { 139, 52 }, { 155, 52 }, { 171, 52 }, { 187, 52 }, { 212, 52 }, { 224, 52 },
{ 2, 64 }, { 18, 64 }, { 33, 64 }, { 93, 64 }, { 150, 64 }, { 165, 64 }, { 180, 64 }, { 195, 64 }, { 210, 64 }, { 224, 64 }
}, {
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 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, 4, 1,
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, 4, 1,
diff --git a/keyboards/mxss/rules.mk b/keyboards/mxss/rules.mk
index 7dc98d4739..40de15828a 100644
--- a/keyboards/mxss/rules.mk
+++ b/keyboards/mxss/rules.mk
@@ -2,39 +2,31 @@
MCU = atmega32u4
# Bootloader selection
-# Teensy halfkay
-# Pro Micro caterina
-# Atmel DFU atmel-dfu
-# LUFA DFU lufa-dfu
-# QMK DFU qmk-dfu
-# ATmega32A bootloadHID
-# ATmega328P USBasp
BOOTLOADER = atmel-dfu
# Build Options
# change yes to no to disable
#
-BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
+BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
MOUSEKEY_ENABLE = yes # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
-CONSOLE_ENABLE = no # Console for debug
+CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = yes # Commands for debug and configuration
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
NKRO_ENABLE = no # USB Nkey Rollover
-BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
-MIDI_ENABLE = no # MIDI support
-UNICODE_ENABLE = no # Unicode
-BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
-AUDIO_ENABLE = no # Audio output on port C6
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
+BLUETOOTH_ENABLE = no # Enable Bluetooth
+AUDIO_ENABLE = no # Audio output
SRC += mxss_frontled.c
# Remove the common RGB light code and use my iteration instead
+COMMON_VPATH += $(QUANTUM_DIR)/rgblight
OPT_DEFS += -DRGBLIGHT_ENABLE
-SRC += $(QUANTUM_DIR)/process_keycode/process_rgb.c
SRC += rgblight.c
-SRC += color.c
-SRC += ws2812.c
+SRC += $(QUANTUM_DIR)/color.c
+WS2812_DRIVER_REQUIRED = yes
CIE1931_CURVE = yes
+RGB_KEYCODES_ENABLE = yes
diff --git a/keyboards/naked48/keymaps/salicylic/config.h b/keyboards/naked48/keymaps/salicylic/config.h
index b6372db3b9..71a43e208c 100644
--- a/keyboards/naked48/keymaps/salicylic/config.h
+++ b/keyboards/naked48/keymaps/salicylic/config.h
@@ -31,7 +31,7 @@
# define RGB_MATRIX_KEYPRESSES // reacts to keypresses
// # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
// # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
// # define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness)
// # 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 200 out of 255. If not defined maximum brightness is set to 255
@@ -41,4 +41,3 @@
# define RGB_MATRIX_VAL_STEP 5
# define RGB_MATRIX_SPD_STEP 10
#endif
-
diff --git a/keyboards/naked48/keymaps/salicylic/keymap.c b/keyboards/naked48/keymaps/salicylic/keymap.c
index 8b5e15c139..e84cb0bd6a 100644
--- a/keyboards/naked48/keymaps/salicylic/keymap.c
+++ b/keyboards/naked48/keymaps/salicylic/keymap.c
@@ -44,7 +44,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//,-----------------------------------------------------| |-----------------------------------------------------.
KC_ESC, JP_EXLM, JP_QUES, JP_LBRC, JP_RBRC, JP_TILD, KC_6, KC_7, KC_8, KC_9, JP_ASTR, JP_SLSH,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
- JP_QUOT, JP_HASH, JP_DQT, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_4, KC_5, KC_6, JP_MINS, JP_EQL,
+ JP_QUOT, JP_HASH, JP_DQUO, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_4, KC_5, KC_6, JP_MINS, JP_EQL,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
JP_CIRC, JP_PERC, JP_AMPR, JP_SCLN, JP_COLN, JP_PIPE, KC_0, KC_1, KC_2, KC_3, JP_PLUS, KC_ENT,
//|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
diff --git a/keyboards/naked48/keymaps/salicylic_with_nafuda/keymap.c b/keyboards/naked48/keymaps/salicylic_with_nafuda/keymap.c
index 5a99b8c0ad..1d10ac653f 100644
--- a/keyboards/naked48/keymaps/salicylic_with_nafuda/keymap.c
+++ b/keyboards/naked48/keymaps/salicylic_with_nafuda/keymap.c
@@ -68,7 +68,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------|
KC_ESC, JP_EXLM, JP_QUES, JP_LBRC, JP_RBRC, JP_TILD, KC_6, KC_7, KC_8, KC_9, JP_ASTR, JP_SLSH, TG(_MOUSE),
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------|
- JP_QUOT, JP_HASH, JP_DQT, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_4, KC_5, KC_6, JP_MINS, JP_EQL,LT(_ADJUST, KC_BSPC),KC_UP,TG(_BROWSER),
+ JP_QUOT, JP_HASH, JP_DQUO, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_4, KC_5, KC_6, JP_MINS, JP_EQL,LT(_ADJUST, KC_BSPC),KC_UP,TG(_BROWSER),
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------|
JP_CIRC, JP_PERC, JP_AMPR, JP_SCLN, JP_COLN, JP_PIPE, KC_0, KC_1, KC_2, KC_3, JP_PLUS, KC_ENT, KC_LEFT, KC_DOWN,KC_RIGHT,
//|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------------------------|
diff --git a/keyboards/naked48/keymaps/salicylic_with_setta21/keymap.c b/keyboards/naked48/keymaps/salicylic_with_setta21/keymap.c
index cbe65fe660..45fa336373 100644
--- a/keyboards/naked48/keymaps/salicylic_with_setta21/keymap.c
+++ b/keyboards/naked48/keymaps/salicylic_with_setta21/keymap.c
@@ -47,7 +47,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//,-----------------------------------------------------| |-----------------------------------------------------. |-----------------------------------------------|
KC_ESC, JP_EXLM, JP_QUES, JP_LBRC, JP_RBRC, JP_TILD, KC_6, KC_7, KC_8, KC_9, JP_ASTR, JP_SLSH, MO(_LOWER),XXXXXXX,KC_LEFT,XXXXXXX,XXXXXXX, KC_ESC,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------|
- JP_QUOT, JP_HASH, JP_DQT, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_4, KC_5, KC_6, JP_MINS, JP_EQL, KC_DOWN,KC_DOWN, KC_UP,KC_PSLS, KC_F2,
+ JP_QUOT, JP_HASH, JP_DQUO, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_4, KC_5, KC_6, JP_MINS, JP_EQL, KC_DOWN,KC_DOWN, KC_UP,KC_PSLS, KC_F2,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------|
JP_CIRC, JP_PERC, JP_AMPR, JP_SCLN, JP_COLN, JP_PIPE, KC_0, KC_1, KC_2, KC_3, JP_PLUS, KC_ENT, MO(_RAISE),XXXXXXX,KC_RIGHT,XXXXXXX,KC_PAST, JP_EQL,
//|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |---------------+---------------+-------+-------|
diff --git a/keyboards/naked60/keymaps/salicylic/keymap.c b/keyboards/naked60/keymaps/salicylic/keymap.c
index 17172f77b9..56b80de9fe 100644
--- a/keyboards/naked60/keymaps/salicylic/keymap.c
+++ b/keyboards/naked60/keymaps/salicylic/keymap.c
@@ -64,7 +64,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
JP_COLN, JP_EXLM, JP_QUES, JP_LBRC, JP_RBRC, JP_TILD, KC_6, KC_7, KC_8, KC_9, JP_ASTR, JP_SLSH,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
- JP_QUOT, JP_HASH, JP_DQT, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_4, KC_5, KC_6, JP_MINS, JP_EQL,
+ JP_QUOT, JP_HASH, JP_DQUO, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_4, KC_5, KC_6, JP_MINS, JP_EQL,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
JP_CIRC, JP_PERC, JP_AMPR, JP_SCLN, JP_COLN, JP_PIPE, KC_0, KC_1, KC_2, KC_3, JP_PLUS, KC_ENT,
//|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
diff --git a/keyboards/naked60/keymaps/salicylic_with_nafuda/keymap.c b/keyboards/naked60/keymaps/salicylic_with_nafuda/keymap.c
index 3a2cd9eb85..474f57244d 100644
--- a/keyboards/naked60/keymaps/salicylic_with_nafuda/keymap.c
+++ b/keyboards/naked60/keymaps/salicylic_with_nafuda/keymap.c
@@ -101,7 +101,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------|
JP_COLN, JP_EXLM, JP_QUES, JP_LBRC, JP_RBRC, JP_TILD, KC_6, KC_7, KC_8, KC_9, JP_ASTR, JP_SLSH,LT(_ADJUST, KC_BSPC),KC_UP,TG(_BROWSER),
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------|
- JP_QUOT, JP_HASH, JP_DQT, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_4, KC_5, KC_6, JP_MINS, JP_EQL, KC_LEFT, KC_DOWN,KC_RIGHT,
+ JP_QUOT, JP_HASH, JP_DQUO, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_4, KC_5, KC_6, JP_MINS, JP_EQL, KC_LEFT, KC_DOWN,KC_RIGHT,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------------------------|
JP_CIRC, JP_PERC, JP_AMPR, JP_SCLN, JP_COLN, JP_PIPE, KC_0, KC_1, KC_2, KC_3, JP_PLUS, KC_ENT,
//|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
diff --git a/keyboards/naked60/keymaps/salicylic_with_setta21/keymap.c b/keyboards/naked60/keymaps/salicylic_with_setta21/keymap.c
index a1f5a6e21a..a5b762711c 100644
--- a/keyboards/naked60/keymaps/salicylic_with_setta21/keymap.c
+++ b/keyboards/naked60/keymaps/salicylic_with_setta21/keymap.c
@@ -71,7 +71,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------|
JP_COLN, JP_EXLM, JP_QUES, JP_LBRC, JP_RBRC, JP_TILD, KC_6, KC_7, KC_8, KC_9, JP_ASTR, JP_SLSH, KC_DOWN,KC_DOWN, KC_UP,KC_PSLS, KC_F2,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------|
- JP_QUOT, JP_HASH, JP_DQT, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_4, KC_5, KC_6, JP_MINS, JP_EQL, MO(_RAISE),XXXXXXX,KC_RIGHT,XXXXXXX,KC_PAST, JP_EQL,
+ JP_QUOT, JP_HASH, JP_DQUO, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_4, KC_5, KC_6, JP_MINS, JP_EQL, MO(_RAISE),XXXXXXX,KC_RIGHT,XXXXXXX,KC_PAST, JP_EQL,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |---------------+---------------+-------+-------|
JP_CIRC, JP_PERC, JP_AMPR, JP_SCLN, JP_COLN, JP_PIPE, KC_0, KC_1, KC_2, KC_3, JP_PLUS, KC_ENT, KC_PENT, KC_PPLS,KC_PMNS, KC_DEL,
//|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |-----------------------------------------------|
diff --git a/keyboards/naked64/keymaps/salicylic/keymap.c b/keyboards/naked64/keymaps/salicylic/keymap.c
index 06665092f8..40e92393da 100644
--- a/keyboards/naked64/keymaps/salicylic/keymap.c
+++ b/keyboards/naked64/keymaps/salicylic/keymap.c
@@ -100,7 +100,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
_______, JP_QUOT, JP_EXLM, JP_QUES, JP_LBRC, JP_RBRC, JP_TILD, KC_P6, KC_P7, KC_P8, KC_P9, JP_ASTR, JP_SLSH, XXXXXXX, \
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
- JP_QUOT, JP_HASH, JP_DQT, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_P4, KC_P5, KC_P6, JP_MINS, JP_EQL, KC_ENT, \
+ JP_QUOT, JP_HASH, JP_DQUO, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_P4, KC_P5, KC_P6, JP_MINS, JP_EQL, KC_ENT, \
// |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
JP_CIRC, JP_PERC, JP_AMPR, JP_SCLN, JP_COLN, JP_PIPE, KC_P0, KC_P1, KC_P2, KC_P3, JP_PLUS, KC_UP, KC_RSFT, \
// |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
diff --git a/keyboards/naked64/keymaps/salicylic_with_setta21/keymap.c b/keyboards/naked64/keymaps/salicylic_with_setta21/keymap.c
index 28522c5e9d..df80e0772b 100644
--- a/keyboards/naked64/keymaps/salicylic_with_setta21/keymap.c
+++ b/keyboards/naked64/keymaps/salicylic_with_setta21/keymap.c
@@ -121,7 +121,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------|
_______, JP_QUOT, JP_EXLM, JP_QUES, JP_LBRC, JP_RBRC, JP_TILD, KC_P6, KC_P7, KC_P8, KC_P9, JP_ASTR, JP_SLSH, XXXXXXX, XXXXXXX, KC_PSLS, KC_PAST, KC_PMNS,
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------|
- JP_QUOT, JP_HASH, JP_DQT, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_P4, KC_P5, KC_P6, JP_MINS, JP_EQL, KC_ENT, XXXXXXX, KC_UP, XXXXXXX,
+ JP_QUOT, JP_HASH, JP_DQUO, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_P4, KC_P5, KC_P6, JP_MINS, JP_EQL, KC_ENT, XXXXXXX, KC_UP, XXXXXXX,
// |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------| |
JP_CIRC, JP_PERC, JP_AMPR, JP_SCLN, JP_COLN, JP_PIPE, KC_P0, KC_P1, KC_P2, KC_P3, JP_PLUS, KC_UP, KC_RSFT, KC_LEFT, KC_DOWN, KC_RGHT, KC_PPLS,
// |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------|
diff --git a/keyboards/namecard2x4/keymaps/brainfuck/keymap.c b/keyboards/namecard2x4/keymaps/brainfuck/keymap.c
index 287e011def..28640db0fd 100644
--- a/keyboards/namecard2x4/keymaps/brainfuck/keymap.c
+++ b/keyboards/namecard2x4/keymaps/brainfuck/keymap.c
@@ -27,7 +27,7 @@ enum Layer
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[JP] = LAYOUT(
- JP_LT,JP_GT,JP_PLUS,JP_MINS,\
+ JP_LABK,JP_RABK,JP_PLUS,JP_MINS,\
LT(CONFIG,JP_DOT),JP_COMM,JP_LBRC,LT(CONFIG,JP_RBRC)\
),
[EN] = LAYOUT(
diff --git a/keyboards/ncc1701kb/rules.mk b/keyboards/ncc1701kb/rules.mk
index 791d82b401..35228c5019 100644
--- a/keyboards/ncc1701kb/rules.mk
+++ b/keyboards/ncc1701kb/rules.mk
@@ -29,6 +29,5 @@ MIDI_ENABLE = no # MIDI controls
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
AUDIO_ENABLE = no # Audio output on port C6
UNICODE_ENABLE = yes # Unicode
-API_SYSEX_ENABLE = yes
TAP_DANCE_ENABLE = no
ENCODER_ENABLE = yes \ No newline at end of file
diff --git a/keyboards/niu_mini/rules.mk b/keyboards/niu_mini/rules.mk
index 1059ed2f70..7467bf81b0 100644
--- a/keyboards/niu_mini/rules.mk
+++ b/keyboards/niu_mini/rules.mk
@@ -27,7 +27,6 @@ AUDIO_ENABLE = no # Audio output on port C6
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
-API_SYSEX_ENABLE = no
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
diff --git a/keyboards/nknl7en/keymaps/salicylic/keymap.c b/keyboards/nknl7en/keymaps/salicylic/keymap.c
index aff4b6e36f..e7de4e50f0 100644
--- a/keyboards/nknl7en/keymaps/salicylic/keymap.c
+++ b/keyboards/nknl7en/keymaps/salicylic/keymap.c
@@ -58,7 +58,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------|
JP_DQUO, JP_EXLM, JP_QUES, JP_LBRC, JP_RBRC, JP_TILD, KC_P6, KC_P7, KC_P8, KC_P9, JP_ASTR, JP_SLSH, _______, _______, LALT(KC_PSCR),
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------|
- JP_QUOT, JP_HASH, JP_DQT, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_P4, KC_P5, KC_P6, JP_MINS, JP_EQL, _______, _______,
+ JP_QUOT, JP_HASH, JP_DQUO, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_P4, KC_P5, KC_P6, JP_MINS, JP_EQL, _______, _______,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------|
JP_CIRC, JP_PERC, JP_AMPR, JP_SCLN, JP_COLN, JP_PIPE, KC_P0, KC_P1, KC_P2, KC_P3, JP_PLUS, _______, _______, _______,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------|
diff --git a/keyboards/nknl7jp/keymaps/salicylic/keymap.c b/keyboards/nknl7jp/keymaps/salicylic/keymap.c
index 2eaf185665..65f95f0173 100644
--- a/keyboards/nknl7jp/keymaps/salicylic/keymap.c
+++ b/keyboards/nknl7jp/keymaps/salicylic/keymap.c
@@ -56,7 +56,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------|
JP_DQUO, JP_EXLM, JP_QUES, JP_LBRC, JP_RBRC, JP_TILD, KC_P6, KC_P7, KC_P8, KC_P9, JP_ASTR, JP_SLSH, _______, _______, LALT(KC_PSCR),
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------|
- JP_QUOT, JP_HASH, JP_DQT, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_P4, KC_P5, KC_P6, JP_MINS, JP_EQL, _______, _______,
+ JP_QUOT, JP_HASH, JP_DQUO, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_P4, KC_P5, KC_P6, JP_MINS, JP_EQL, _______, _______,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------|
JP_CIRC, JP_PERC, JP_AMPR, JP_SCLN, JP_COLN, JP_PIPE, KC_P0, KC_P1, KC_P2, KC_P3, JP_PLUS, _______, _______, _______,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------|
diff --git a/keyboards/nopunin10did/jabberwocky/config.h b/keyboards/nopunin10did/jabberwocky/config.h
index b49a98ba80..84c3cec451 100644
--- a/keyboards/nopunin10did/jabberwocky/config.h
+++ b/keyboards/nopunin10did/jabberwocky/config.h
@@ -22,7 +22,6 @@
#define VENDOR_ID 0x4E50 // "NP"
#define PRODUCT_ID 0x4A57 // "JW"
#define DEVICE_VER 0x0001
-#define MANUFACTURER NoPunIn10Did
#define PRODUCT Jabberwocky
/* key matrix size */
diff --git a/keyboards/numatreus/keymaps/hdbx/keymap.c b/keyboards/numatreus/keymaps/hdbx/keymap.c
index 98fe4d67d8..44b3fffe24 100644
--- a/keyboards/numatreus/keymaps/hdbx/keymap.c
+++ b/keyboards/numatreus/keymaps/hdbx/keymap.c
@@ -123,7 +123,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_EXLM, JP_AT, KC_HASH, KC_DLR, KC_PERC, KC_HOME, KC_APP, KC_INS, KC_CALC, KC_PSCR,
JP_CIRC, JP_AMPR, JP_ASTR, JP_YEN, JP_PIPE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_SCLN,
JP_GRV, JP_LCBR, JP_RCBR, KC_LT, KC_GT, KC_END, KC_MUTE, JP_LPRN, JP_RPRN, KC_QUES,
- KC_LALT, KC_LGUI, JP_GRV, KC_DEL, _______, KC_LCTL, WN_CAPS, _______, KC_RCTL, JP_UNDS, JP_DQT, KC_RSFT
+ KC_LALT, KC_LGUI, JP_GRV, KC_DEL, _______, KC_LCTL, WN_CAPS, _______, KC_RCTL, JP_UNDS, JP_DQUO, KC_RSFT
),
/* GAME ゲームやテンキー固定ã§ä½¿ç”¨ã™ã‚‹ãƒ¬ã‚¤ãƒ¤ãƒ¼ã§ã™ã€‚Adjustレイヤーã§Gを押下ã—ã¦é·ç§»ã€‚戻るã¨ãã¯toBaseã‹ã‚‰ã€‚
diff --git a/keyboards/oddball/optical_sensor/optical_sensor.h b/keyboards/oddball/optical_sensor/optical_sensor.h
index a152d02cf1..00955209e2 100644
--- a/keyboards/oddball/optical_sensor/optical_sensor.h
+++ b/keyboards/oddball/optical_sensor/optical_sensor.h
@@ -17,7 +17,7 @@
/* common interface for opitcal sensors */
#if defined ADNS_9800
- #include "../adns/adns.h"
+ #include "drivers/sensors/adns9800.h"
#define config_optical_sensor_t config_adns_t
#define report_optical_sensor_t report_adns_t
#define optical_sensor_init adns_init
diff --git a/keyboards/oddball/rules.mk b/keyboards/oddball/rules.mk
index e9e540c3ca..8fc86b570d 100644
--- a/keyboards/oddball/rules.mk
+++ b/keyboards/oddball/rules.mk
@@ -25,5 +25,5 @@ POINTING_DEVICE_ENABLE = yes
DEFAULT_FOLDER = oddball/v1
SRC += spi_master.c
-SRC += adns/adns.c
+SRC += drivers/sensors/adns9800.c
SRC += pmw/pmw.c
diff --git a/keyboards/ok60/rules.mk b/keyboards/ok60/rules.mk
index f2801c9459..e664640bac 100644
--- a/keyboards/ok60/rules.mk
+++ b/keyboards/ok60/rules.mk
@@ -27,4 +27,4 @@ RGBLIGHT_ENABLE = yes # Enable the RGB backlight
# UNICODE_ENABLE = YES # Unicode
# BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID
-LAYOUTS = 60_ansi 60_ansi_split_bksp_rshift 60_iso 60_hhkb
+LAYOUTS = 60_ansi 60_iso 60_hhkb
diff --git a/keyboards/opendeck/32/rev1/config.h b/keyboards/opendeck/32/rev1/config.h
index 9f8ed74278..8b25ab2564 100644
--- a/keyboards/opendeck/32/rev1/config.h
+++ b/keyboards/opendeck/32/rev1/config.h
@@ -38,7 +38,7 @@
#define DRIVER_COUNT 1
#define DRIVER_1_LED_TOTAL (4 * 8 * 3)
#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL)
-#define RGB_DISABLE_WHEN_USB_SUSPENDED true
+#define RGB_DISABLE_WHEN_USB_SUSPENDED
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_SPIRAL
#define RGB_MATRIX_DISABLE_KEYCODES
diff --git a/keyboards/orthodox/rev3/config.h b/keyboards/orthodox/rev3/config.h
index 3f7a17b6bc..ae51281647 100644
--- a/keyboards/orthodox/rev3/config.h
+++ b/keyboards/orthodox/rev3/config.h
@@ -38,12 +38,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// wiring of each half
//REV.3 PRO MICRO
-#define MATRIX_ROW_PINS { D2, B4, B5, }
+#define MATRIX_ROW_PINS { D2, B4, B5 }
#define MATRIX_COL_PINS { D7, F4, F5, B6, B2, B3, B1, F7, F6 }
/*/
//REV.3 TEENSY
-#define MATRIX_ROW_PINS { B0, C6, C7, }
+#define MATRIX_ROW_PINS { B0, C6, C7 }
#define MATRIX_COL_PINS { D2, F5, F6, D6, D7, B4, B5, B6, F7 }
/*/
diff --git a/keyboards/orthodox/rev3_teensy/config.h b/keyboards/orthodox/rev3_teensy/config.h
index 37c8a7e734..a35c276d95 100644
--- a/keyboards/orthodox/rev3_teensy/config.h
+++ b/keyboards/orthodox/rev3_teensy/config.h
@@ -38,7 +38,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// wiring of each half
//REV.3 TEENSY
-#define MATRIX_ROW_PINS { B0, C6, C7, }
+#define MATRIX_ROW_PINS { B0, C6, C7 }
#define MATRIX_COL_PINS { D2, F5, F6, D6, D7, B4, B5, B6, F7 }
/* COL2ROW or ROW2COL */
diff --git a/keyboards/pandora/keymaps/default/keymap.c b/keyboards/pandora/keymaps/default/keymap.c
index eea641d195..1878f078ce 100644
--- a/keyboards/pandora/keymaps/default/keymap.c
+++ b/keyboards/pandora/keymaps/default/keymap.c
@@ -30,7 +30,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
}
// Encoder click function
-void dip_switch_update_user(uint8_t index, bool active) {
+bool dip_switch_update_user(uint8_t index, bool active) {
switch (index) {
/* First encoder */
case 0:
@@ -39,4 +39,5 @@ void dip_switch_update_user(uint8_t index, bool active) {
}
break;
}
+ return true;
}
diff --git a/keyboards/pandora/keymaps/via/keymap.c b/keyboards/pandora/keymaps/via/keymap.c
index ae97463f61..eb2007447b 100644
--- a/keyboards/pandora/keymaps/via/keymap.c
+++ b/keyboards/pandora/keymaps/via/keymap.c
@@ -45,7 +45,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
}
// Encoder click function
-void dip_switch_update_user(uint8_t index, bool active) {
+bool dip_switch_update_user(uint8_t index, bool active) {
switch (index) {
/* First encoder */
case 0:
@@ -54,4 +54,5 @@ void dip_switch_update_user(uint8_t index, bool active) {
}
break;
}
+ return true;
}
diff --git a/keyboards/percent/canoe_gen2/config.h b/keyboards/percent/canoe_gen2/config.h
index bac5ebb3f3..6409371d40 100644
--- a/keyboards/percent/canoe_gen2/config.h
+++ b/keyboards/percent/canoe_gen2/config.h
@@ -64,4 +64,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGB_MATRIX_STARTUP_SAT 255
#define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS
#define RGB_MATRIX_STARTUP_SPD 127
-#define RGB_DISABLE_WHEN_USB_SUSPENDED true
+#define RGB_DISABLE_WHEN_USB_SUSPENDED
diff --git a/keyboards/phase_studio/titan65/hotswap/config.h b/keyboards/phase_studio/titan65/hotswap/config.h
index 9a9e74bf1b..2b8320814e 100644
--- a/keyboards/phase_studio/titan65/hotswap/config.h
+++ b/keyboards/phase_studio/titan65/hotswap/config.h
@@ -47,5 +47,5 @@
#define RGB_DI_PIN E6
#define DRIVER_LED_TOTAL 67
#define RGB_MATRIX_KEYPRESSES // reacts to keypresses
-#define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended
+// #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
diff --git a/keyboards/planck/ez/config.h b/keyboards/planck/ez/config.h
index 7f88764963..5317a51568 100644
--- a/keyboards/planck/ez/config.h
+++ b/keyboards/planck/ez/config.h
@@ -147,7 +147,7 @@
#define RGB_MATRIX_KEYPRESSES
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
-#define RGB_DISABLE_WHEN_USB_SUSPENDED true
+#define RGB_DISABLE_WHEN_USB_SUSPENDED
#define RGB_MATRIX_LED_PROCESS_LIMIT 5
#define RGB_MATRIX_LED_FLUSH_LIMIT 26
diff --git a/keyboards/planck/ez/ez.c b/keyboards/planck/ez/ez.c
index 8c498a5520..818dc66587 100644
--- a/keyboards/planck/ez/ez.c
+++ b/keyboards/planck/ez/ez.c
@@ -19,7 +19,7 @@
keyboard_config_t keyboard_config;
#ifdef RGB_MATRIX_ENABLE
-const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
+const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
diff --git a/keyboards/planck/ez/ez.h b/keyboards/planck/ez/ez.h
index d11929d3ef..14506dd727 100644
--- a/keyboards/planck/ez/ez.h
+++ b/keyboards/planck/ez/ez.h
@@ -39,17 +39,21 @@
}
#define LAYOUT_ortho_4x12( \
- k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
- k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
- k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
- k30, k31, k32, k33, k34, k35, KC_NO, k37, k38, k39, k3a, k3b \
-) \
-LAYOUT_planck_1x2uC( \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
- k30, k31, k32, k33, k34, k35, k37, k38, k39, k3a, k3b \
-)
+ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \
+) \
+{ \
+ { k00, k01, k02, k03, k04, k05 }, \
+ { k10, k11, k12, k13, k14, k15 }, \
+ { k20, k21, k22, k23, k24, k25 }, \
+ { k30, k31, k32, k3a, k3b, k36 }, \
+ { k06, k07, k08, k09, k0a, k0b }, \
+ { k16, k17, k18, k19, k1a, k1b }, \
+ { k26, k27, k28, k29, k2a, k2b }, \
+ { k37, k38, k39, k33, k34, k35 } \
+}
#define LAYOUT_planck_mit LAYOUT_planck_1x2uC
#define LAYOUT_planck_grid LAYOUT_ortho_4x12
diff --git a/keyboards/planck/ez/rules.mk b/keyboards/planck/ez/rules.mk
index 8d221767e9..0f7161d3cf 100644
--- a/keyboards/planck/ez/rules.mk
+++ b/keyboards/planck/ez/rules.mk
@@ -21,7 +21,6 @@ AUDIO_ENABLE = yes # Audio output on port C6
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
-API_SYSEX_ENABLE = no
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
diff --git a/keyboards/planck/keymaps/abishalom/keymap.c b/keyboards/planck/keymaps/abishalom/keymap.c
index bd53cfb7af..e2ca81cc06 100644
--- a/keyboards/planck/keymaps/abishalom/keymap.c
+++ b/keyboards/planck/keymaps/abishalom/keymap.c
@@ -254,7 +254,7 @@ bool encoder_update(bool clockwise) {
return true;
}
-void dip_switch_update_user(uint8_t index, bool active) {
+bool dip_switch_update_user(uint8_t index, bool active) {
switch (index) {
case 0: {
#ifdef AUDIO_ENABLE
@@ -283,6 +283,7 @@ void dip_switch_update_user(uint8_t index, bool active) {
muse_mode = false;
}
}
+ return true;
}
void matrix_scan_user(void) {
diff --git a/keyboards/planck/keymaps/atreus/keymap.c b/keyboards/planck/keymaps/atreus/keymap.c
index c9a721a1fa..ce3d254d42 100644
--- a/keyboards/planck/keymaps/atreus/keymap.c
+++ b/keyboards/planck/keymaps/atreus/keymap.c
@@ -177,7 +177,7 @@ bool encoder_update(bool clockwise) {
return true;
}
-void dip_switch_update_user(uint8_t index, bool active) {
+bool dip_switch_update_user(uint8_t index, bool active) {
switch (index) {
case 0: {
#ifdef AUDIO_ENABLE
@@ -206,6 +206,7 @@ void dip_switch_update_user(uint8_t index, bool active) {
muse_mode = false;
}
}
+ return true;
}
void matrix_scan_user(void) {
diff --git a/keyboards/planck/keymaps/bone2planck/keymap.c b/keyboards/planck/keymaps/bone2planck/keymap.c
index 18b71bfc47..22bd50b297 100644
--- a/keyboards/planck/keymaps/bone2planck/keymap.c
+++ b/keyboards/planck/keymaps/bone2planck/keymap.c
@@ -32,7 +32,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
DE_SS, DE_J, DE_D, DE_U, DE_A, DE_X, DE_P, DE_H, DE_L, DE_M, DE_W, DE_Q ,
// LT(1,KC_TAB), DE_C, DE_T, DE_I, DE_E, DE_O, DE_B, DE_N, DE_R, DE_S, DE_G, LT(1,KC_ENT) ,
MO(1), DE_C, DE_T, DE_I, DE_E, DE_O, DE_B, DE_N, DE_R, DE_S, DE_G, LT(1,KC_ENT) ,
- KC_LSFT, DE_F, DE_V, DE_UE, DE_AE, DE_OE, DE_Y, DE_Z, DE_COMM, DE_DOT, DE_K, KC_LSFT ,
+ KC_LSFT, DE_F, DE_V, DE_UDIA, DE_ADIA, DE_ODIA, DE_Y, DE_Z, DE_COMM, DE_DOT, DE_K, KC_LSFT ,
KC_LCTL, KC_LGUI, KC_LALT, MO(4), MO(2), KC_SPC, KC_SPC, MO(2), MO(4), KC_RALT, KC_ESC, KC_RCTL
),
@@ -49,9 +49,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------------------'
*/
[1] = LAYOUT_planck_grid(
- DE_RING, DE_AT, DE_UNDS, DE_LBRC, DE_RBRC, DE_CIRC, DE_EXLM, DE_LESS, DE_MORE, DE_EQL, DE_AMPR, DE_ACUT ,
- _______, DE_BSLS, DE_SLSH, DE_LCBR, DE_RCBR, DE_ASTR, DE_QST, DE_LPRN, DE_RPRN, DE_MINS, DE_COLN, _______ ,
- _______, DE_HASH, DE_TILD, DE_PIPE, DE_DLR, DE_EURO, DE_PLUS, DE_PERC, DE_DQOT, DE_QUOT, DE_SCLN, _______ ,
+ DE_DEG, DE_AT, DE_UNDS, DE_LBRC, DE_RBRC, DE_CIRC, DE_EXLM, DE_LABK, DE_RABK, DE_EQL, DE_AMPR, DE_ACUT ,
+ _______, DE_BSLS, DE_SLSH, DE_LCBR, DE_RCBR, DE_ASTR, DE_QUES, DE_LPRN, DE_RPRN, DE_MINS, DE_COLN, _______ ,
+ _______, DE_HASH, DE_TILD, DE_PIPE, DE_DLR, DE_EURO, DE_PLUS, DE_PERC, DE_DQUO, DE_QUOT, DE_SCLN, _______ ,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
@@ -108,8 +108,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/
[4] = LAYOUT_planck_grid(
XXXXXXX, XXXXXXX, KC_PSCR, KC_SLCK, KC_PAUS, XXXXXXX, XXXXXXX, KC_F7, KC_F8, KC_F9, KC_F12, XXXXXXX ,
- KC_TAB, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, DE_SQ3, KC_F4, KC_F5, KC_F6, KC_F11, KC_ENT ,
- _______, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, DE_SQ2, KC_F1, KC_F2, KC_F3, KC_F10, _______ ,
+ KC_TAB, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, DE_SUP3, KC_F4, KC_F5, KC_F6, KC_F11, KC_ENT ,
+ _______, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, DE_SUP2, KC_F1, KC_F2, KC_F3, KC_F10, _______ ,
_______, _______, _______, _______, MO(5), _______, _______, MO(5), _______, _______, _______, _______
),
@@ -128,8 +128,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/
[5] = LAYOUT_planck_grid(
XXXXXXX, XXXXXXX, KC_F7, KC_F8, KC_F9, KC_F12, XXXXXXX, KC_PSCR, KC_SLCK, KC_PAUS, XXXXXXX, XXXXXXX ,
- _______, DE_SQ3, KC_F4, KC_F5, KC_F6, KC_F11, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, _______ ,
- _______, DE_SQ2, KC_F1, KC_F2, KC_F3, KC_F10, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, _______ ,
+ _______, DE_SUP3, KC_F4, KC_F5, KC_F6, KC_F11, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, _______ ,
+ _______, DE_SUP2, KC_F1, KC_F2, KC_F3, KC_F10, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, _______ ,
_______, _______, _______, XXXXXXX, _______, _______, _______, _______, XXXXXXX, _______, _______, _______
)
};
diff --git a/keyboards/planck/keymaps/cbbrowne/rules.mk b/keyboards/planck/keymaps/cbbrowne/rules.mk
index 45d6837399..906ece8344 100644
--- a/keyboards/planck/keymaps/cbbrowne/rules.mk
+++ b/keyboards/planck/keymaps/cbbrowne/rules.mk
@@ -14,7 +14,6 @@ AUDIO_ENABLE = no # Audio output on port C6
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
-API_SYSEX_ENABLE = no # Enable SYSEX API (+5390)
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
diff --git a/keyboards/planck/keymaps/charlesrocket/keymap.c b/keyboards/planck/keymaps/charlesrocket/keymap.c
index 47cb8865d7..9d60b0db9d 100644
--- a/keyboards/planck/keymaps/charlesrocket/keymap.c
+++ b/keyboards/planck/keymaps/charlesrocket/keymap.c
@@ -12,8 +12,8 @@
#define KC_PC_CUT LCTL(KC_X)
#define KC_PC_COPY LCTL(KC_C)
#define KC_PC_PASTE LCTL(KC_V)
-#define ES_LESS_MAC KC_GRAVE
-#define ES_GRTR_MAC LSFT(KC_GRAVE)
+#define ES_LABK_MAC KC_GRAVE
+#define ES_RABK_MAC LSFT(KC_GRAVE)
#define ES_BSLS_MAC ALGR(KC_6)
#define NO_PIPE_ALT KC_GRAVE
#define NO_BSLS_ALT KC_EQUAL
diff --git a/keyboards/planck/keymaps/corvec/rules.mk b/keyboards/planck/keymaps/corvec/rules.mk
index c17a31a233..4398ea5452 100644
--- a/keyboards/planck/keymaps/corvec/rules.mk
+++ b/keyboards/planck/keymaps/corvec/rules.mk
@@ -1,5 +1,4 @@
AUTO_SHIFT_ENABLE = yes
TAP_DANCE_ENABLE = yes
-API_SYSEX_ENABLE = no
CONSOLE_ENABLE = no
EXTRAKEY_ENABLE = no
diff --git a/keyboards/planck/keymaps/dear_vehicle_owner/keymap.c b/keyboards/planck/keymaps/dear_vehicle_owner/keymap.c
index aec7bcdd7d..d83df6d4b1 100644
--- a/keyboards/planck/keymaps/dear_vehicle_owner/keymap.c
+++ b/keyboards/planck/keymaps/dear_vehicle_owner/keymap.c
@@ -296,7 +296,7 @@ bool encoder_update(bool clockwise) {
return true;
}
-void dip_switch_update_user(uint8_t index, bool active) {
+bool dip_switch_update_user(uint8_t index, bool active) {
switch (index) {
case 0: {
#ifdef AUDIO_ENABLE
@@ -325,6 +325,7 @@ void dip_switch_update_user(uint8_t index, bool active) {
muse_mode = false;
}
}
+ return true;
}
void matrix_scan_user(void) {
diff --git a/keyboards/planck/keymaps/default/keymap.c b/keyboards/planck/keymaps/default/keymap.c
index 304d320b69..644dae6b99 100644
--- a/keyboards/planck/keymaps/default/keymap.c
+++ b/keyboards/planck/keymaps/default/keymap.c
@@ -289,7 +289,7 @@ bool encoder_update(bool clockwise) {
return true;
}
-void dip_switch_update_user(uint8_t index, bool active) {
+bool dip_switch_update_user(uint8_t index, bool active) {
switch (index) {
case 0: {
#ifdef AUDIO_ENABLE
@@ -318,6 +318,7 @@ void dip_switch_update_user(uint8_t index, bool active) {
muse_mode = false;
}
}
+ return true;
}
void matrix_scan_user(void) {
diff --git a/keyboards/planck/keymaps/dvorak2space/rules.mk b/keyboards/planck/keymaps/dvorak2space/rules.mk
index 59f9f1dff2..b17bae4d2a 100644
--- a/keyboards/planck/keymaps/dvorak2space/rules.mk
+++ b/keyboards/planck/keymaps/dvorak2space/rules.mk
@@ -11,7 +11,6 @@ AUDIO_ENABLE = no # Audio output on port C6
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
-API_SYSEX_ENABLE = no
TAP_DANCE_ENABLE = yes
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
diff --git a/keyboards/planck/keymaps/gitdrik/keymap.c b/keyboards/planck/keymaps/gitdrik/keymap.c
index 9cc5f7517f..e3e03929a1 100644
--- a/keyboards/planck/keymaps/gitdrik/keymap.c
+++ b/keyboards/planck/keymaps/gitdrik/keymap.c
@@ -170,7 +170,7 @@ bool encoder_update(bool clockwise) {
return true;
}
-void dip_switch_update_user(uint8_t index, bool active) {
+bool dip_switch_update_user(uint8_t index, bool active) {
switch (index) {
case 0: {
#ifdef AUDIO_ENABLE
@@ -199,6 +199,7 @@ void dip_switch_update_user(uint8_t index, bool active) {
muse_mode = false;
}
}
+ return true;
}
void matrix_scan_user(void) {
diff --git a/keyboards/planck/keymaps/grant24/keymap.c b/keyboards/planck/keymaps/grant24/keymap.c
index 7ed9a794e4..469cf08c70 100644
--- a/keyboards/planck/keymaps/grant24/keymap.c
+++ b/keyboards/planck/keymaps/grant24/keymap.c
@@ -312,7 +312,7 @@ bool encoder_update(bool clockwise) {
return true;
}
-void dip_switch_update_user(uint8_t index, bool active) {
+bool dip_switch_update_user(uint8_t index, bool active) {
switch (index) {
case 0: {
#ifdef AUDIO_ENABLE
@@ -341,6 +341,7 @@ void dip_switch_update_user(uint8_t index, bool active) {
muse_mode = false;
}
}
+ return true;
}
void matrix_scan_user(void) {
diff --git a/keyboards/planck/keymaps/hvp/keymap.c b/keyboards/planck/keymaps/hvp/keymap.c
index 1af3771ae0..c8325b6468 100644
--- a/keyboards/planck/keymaps/hvp/keymap.c
+++ b/keyboards/planck/keymaps/hvp/keymap.c
@@ -122,7 +122,7 @@ bool encoder_update(bool clockwise) {
return true;
}
-void dip_switch_update_user(uint8_t index, bool active) {
+bool dip_switch_update_user(uint8_t index, bool active) {
switch (index) {
case 0: {
#ifdef AUDIO_ENABLE
@@ -151,6 +151,7 @@ void dip_switch_update_user(uint8_t index, bool active) {
muse_mode = false;
}
}
+ return true;
}
void matrix_scan_user(void) {
diff --git a/keyboards/planck/keymaps/jdelkins/keymap.c b/keyboards/planck/keymaps/jdelkins/keymap.c
index 3d109e9e8c..620c36129f 100644
--- a/keyboards/planck/keymaps/jdelkins/keymap.c
+++ b/keyboards/planck/keymaps/jdelkins/keymap.c
@@ -291,7 +291,7 @@ void encoder_update(bool clockwise) {
}
}
-void dip_switch_update_user(uint8_t index, bool active) {
+bool dip_switch_update_user(uint8_t index, bool active) {
switch (index) {
case 0: {
#ifdef AUDIO_ENABLE
@@ -320,6 +320,7 @@ void dip_switch_update_user(uint8_t index, bool active) {
muse_mode = false;
}
}
+ return true;
}
void keyboard_post_init_keymap(void) {
diff --git a/keyboards/planck/keymaps/lja83/keymap.c b/keyboards/planck/keymaps/lja83/keymap.c
index d42c5b645e..2b4b9adcc2 100644
--- a/keyboards/planck/keymaps/lja83/keymap.c
+++ b/keyboards/planck/keymaps/lja83/keymap.c
@@ -299,7 +299,7 @@ bool encoder_update_user(uint16_t index, bool clockwise) {
return true;
}
-void dip_switch_update_user(uint8_t index, bool active) {
+bool dip_switch_update_user(uint8_t index, bool active) {
switch (index) {
case 0: {
#ifdef AUDIO_ENABLE
@@ -328,6 +328,7 @@ void dip_switch_update_user(uint8_t index, bool active) {
muse_mode = false;
}
}
+ return true;
}
void matrix_scan_user(void) {
diff --git a/keyboards/planck/keymaps/lucas/keymap.c b/keyboards/planck/keymaps/lucas/keymap.c
index 26ca6a5505..01a2af7b19 100644
--- a/keyboards/planck/keymaps/lucas/keymap.c
+++ b/keyboards/planck/keymaps/lucas/keymap.c
@@ -42,8 +42,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------'
*/
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, DE_DOT, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, DE_DQOT,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M(1), DE_MORE, DE_QST, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, DE_DQUO,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M(1), DE_RABK, DE_QUES, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
),
[2] = LAYOUT_planck_grid( /* Raise
@@ -57,8 +57,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |LCTL |LGUI | Tab |LALT |Lower| Space | |Mute |Vol- |Vol+ | P/P |
* `-----------------------------------------------------------------------'
*/
- KC_NO, S(DE_AE), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, S(DE_UE), S(DE_OE), KC_NO, TG(5),
- KC_DEL, DE_AE, KC_NO, DE_SS, KC_NO, KC_NO, KC_NO, KC_NO, DE_UE, DE_OE, KC_NO, RALT(KC_F12),
+ KC_NO, S(DE_ADIA), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, S(DE_UDIA), S(DE_ODIA), KC_NO, TG(5),
+ KC_DEL, DE_ADIA, KC_NO, DE_SS, KC_NO, KC_NO, KC_NO, KC_NO, DE_UDIA, DE_ODIA, KC_NO, RALT(KC_F12),
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MSTP, KC_MPRV, KC_MNXT, RALT(KC_F11),
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY
),
@@ -144,9 +144,9 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
case 1: // M(1)
if (record->event.pressed) {
unregister_code(KC_LSFT);
- register_code(DE_LESS);
+ register_code(DE_LABK);
} else {
- unregister_code(DE_LESS);
+ unregister_code(DE_LABK);
}
break;
}
diff --git a/keyboards/planck/keymaps/mjuma/keymap.c b/keyboards/planck/keymaps/mjuma/keymap.c
index 2204fb2881..8aaa05864f 100644
--- a/keyboards/planck/keymaps/mjuma/keymap.c
+++ b/keyboards/planck/keymaps/mjuma/keymap.c
@@ -190,7 +190,7 @@ uint16_t muse_counter = 0;
uint8_t muse_offset = 70;
uint16_t muse_tempo = 50;
-void dip_switch_update_user(uint8_t index, bool active) {
+bool dip_switch_update_user(uint8_t index, bool active) {
switch (index) {
case 1:
if (active) {
@@ -199,6 +199,7 @@ void dip_switch_update_user(uint8_t index, bool active) {
muse_mode = false;
}
}
+ return true;
}
void matrix_scan_user(void) {
diff --git a/keyboards/planck/keymaps/motform/keymap.c b/keyboards/planck/keymaps/motform/keymap.c
index 6414b5db74..03ddfde42f 100644
--- a/keyboards/planck/keymaps/motform/keymap.c
+++ b/keyboards/planck/keymaps/motform/keymap.c
@@ -51,8 +51,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/
[_COLEMAK] = LAYOUT_planck_grid
(
- KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, SE_OSLH, SE_AA,
- KC_ECTL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, SE_AE,
+ KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, SE_ODIA, SE_ARNG,
+ KC_ECTL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, SE_ADIA,
KC_SFTENT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, SE_MINS, KC_SFTENT,
KC_ESC, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_BSPC, RAISE, KC_RGUI, KC_RALT, KC_HYPR, KC_MEH
),
@@ -70,9 +70,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/
[_LOWER] = LAYOUT_planck_grid
(
- _______, SE_PIPE_MAC, SE_APOS, SE_AT_MAC_V, SE_AMPR, _______, KC_DOWN, KC_NO, KC_RGHT, SE_GRV, SE_GRV, SE_TILD,
- _______, KC_EXLM, SE_QUO2, KC_HASH, SE_QUES, KC_PERC, KC_LEFT, SE_SLSH, SE_BSLS_MAC, SE_EQL, KC_PPLS, KC_PAST,
- _______, KC_NO, KC_NO, SE_LBRC, SE_RBRC, KC_NO, KC_UP, SE_LCBR_MAC, SE_RCBR_MAC, KC_NO, KC_NO, _______,
+ _______, SE_LCBR, SE_QUOT, SE_AT_MAC_V, SE_AMPR, _______, KC_DOWN, KC_NO, KC_RGHT, SE_GRV, SE_GRV, SE_TILD,
+ _______, KC_EXLM, SE_DQUO, KC_HASH, SE_QUES, KC_PERC, KC_LEFT, SE_SLSH, S(SE_LCBR), SE_EQL, KC_PPLS, KC_PAST,
+ _______, KC_NO, KC_NO, SE_LBRC, SE_RBRC, KC_NO, KC_UP, S(SE_LBRC), S(SE_RBRC), KC_NO, KC_NO, _______,
_______, _______, _______, _______, _______, _______, KC_DEL, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
),
@@ -89,9 +89,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/
[_RAISE] = LAYOUT_planck_grid
(
- KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
- SE_CIRC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, SE_DLR_MAC_V,
- _______, KC_NO, KC_NO, SE_LESS_MAC, SE_GRTR_MAC, KC_NO, KC_NO, SE_LPRN, SE_RPRN, KC_PGUP, KC_PGDN, KC_NO,
+ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
+ SE_CIRC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, SE_DLR_MAC_V,
+ _______, KC_NO, KC_NO, SE_SECT, SE_HALF, KC_NO, KC_NO, SE_LPRN, SE_RPRN, KC_PGUP, KC_PGDN, KC_NO,
_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
),
diff --git a/keyboards/planck/keymaps/neo2planck/keymap.c b/keyboards/planck/keymaps/neo2planck/keymap.c
index d09103c1e5..9684dd19d0 100644
--- a/keyboards/planck/keymaps/neo2planck/keymap.c
+++ b/keyboards/planck/keymaps/neo2planck/keymap.c
@@ -29,7 +29,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_planck_grid(
KC_ESC, DE_X, DE_V, DE_L, DE_C, DE_W, DE_K, DE_H, DE_G, DE_F, DE_Q, KC_BSPC ,
KC_ENT, DE_U, DE_I, DE_A, DE_E, DE_O, DE_S, DE_N, DE_R, DE_T, DE_D, DE_Y ,
- KC_LSFT, DE_UE, DE_OE, DE_AE, DE_P, DE_Z, DE_B, DE_M, DE_COMM, DE_DOT, DE_J, KC_LSFT ,
+ KC_LSFT, DE_UDIA, DE_ODIA, DE_ADIA, DE_P, DE_Z, DE_B, DE_M, DE_COMM, DE_DOT, DE_J, KC_LSFT ,
KC_LCTL , KC_RGUI, KC_LALT, MO(2), MO(1), KC_SPC, KC_SPC, MO(1), MO(2), KC_RALT, KC_BTN2, KC_RCTL
),
@@ -45,9 +45,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
`-----------------------------------------------------------------------------------'
*/
[1] = LAYOUT_planck_grid(
- _______, _______, DE_UNDS, DE_LBRC, DE_RBRC, DE_CIRC, DE_EXLM, DE_LESS, DE_MORE, DE_EQL, DE_AMPR, DE_SS ,
- KC_TAB, DE_BSLS, DE_SLSH, DE_LCBR, DE_RCBR, DE_ASTR, DE_QST, DE_LPRN, DE_RPRN, DE_MINS, DE_COLN, DE_AT ,
- _______, DE_HASH, DE_DLR, DE_PIPE, DE_TILD, DE_ACUT, DE_PLUS, DE_PERC, DE_DQOT, DE_QUOT, DE_SCLN, _______ ,
+ _______, _______, DE_UNDS, DE_LBRC, DE_RBRC, DE_CIRC, DE_EXLM, DE_LABK, DE_RABK, DE_EQL, DE_AMPR, DE_SS ,
+ KC_TAB, DE_BSLS, DE_SLSH, DE_LCBR, DE_RCBR, DE_ASTR, DE_QUES, DE_LPRN, DE_RPRN, DE_MINS, DE_COLN, DE_AT ,
+ _______, DE_HASH, DE_DLR, DE_PIPE, DE_TILD, DE_ACUT, DE_PLUS, DE_PERC, DE_DQUO, DE_QUOT, DE_SCLN, _______ ,
_______, _______, _______, MO(3), _______, _______, _______, _______, MO(3), _______, _______, _______
),
@@ -83,8 +83,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/
[3] = LAYOUT_planck_grid(
XXXXXXX, XXXXXXX, KC_PSCR, KC_SLCK, KC_PAUS, XXXXXXX, XXXXXXX, KC_F7, KC_F8, KC_F9, KC_F12, XXXXXXX ,
- KC_TAB, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, DE_SQ3, KC_F4, KC_F5, KC_F6, KC_F11, KC_ENT ,
- _______, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, DE_SQ2, KC_F1, KC_F2, KC_F3, KC_F10, _______ ,
+ KC_TAB, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, DE_SUP3, KC_F4, KC_F5, KC_F6, KC_F11, KC_ENT ,
+ _______, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, DE_SUP2, KC_F1, KC_F2, KC_F3, KC_F10, _______ ,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
};
diff --git a/keyboards/planck/keymaps/priyadi/rules.mk b/keyboards/planck/keymaps/priyadi/rules.mk
index 1ce96968bc..b2abe4f076 100644
--- a/keyboards/planck/keymaps/priyadi/rules.mk
+++ b/keyboards/planck/keymaps/priyadi/rules.mk
@@ -13,7 +13,6 @@ UNICODE_ENABLE = no # Unicode
UNICODEMAP_ENABLE = yes # Unicode map
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
-API_SYSEX_ENABLE = no
ifeq ($(strip $(KEYBOARD)), planck/rev4)
BACKLIGHT_ENABLE = yes
diff --git a/keyboards/planck/keymaps/rjhilgefort/keymap.c b/keyboards/planck/keymaps/rjhilgefort/keymap.c
index d832e70515..9eb178823c 100644
--- a/keyboards/planck/keymaps/rjhilgefort/keymap.c
+++ b/keyboards/planck/keymaps/rjhilgefort/keymap.c
@@ -187,7 +187,7 @@ bool encoder_update(bool clockwise) {
return true;
}
-void dip_switch_update_user(uint8_t index, bool active) {
+bool dip_switch_update_user(uint8_t index, bool active) {
switch (index) {
case 0: {
#ifdef AUDIO_ENABLE
@@ -216,6 +216,7 @@ void dip_switch_update_user(uint8_t index, bool active) {
muse_mode = false;
}
}
+ return true;
}
void matrix_scan_user(void) {
diff --git a/keyboards/planck/keymaps/rodhaene/rules.mk b/keyboards/planck/keymaps/rodhaene/rules.mk
index 7db994581a..a754257523 100644
--- a/keyboards/planck/keymaps/rodhaene/rules.mk
+++ b/keyboards/planck/keymaps/rodhaene/rules.mk
@@ -14,7 +14,6 @@ AUDIO_ENABLE = yes # Audio output on port C6
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
-API_SYSEX_ENABLE = no
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend \ No newline at end of file
diff --git a/keyboards/planck/keymaps/sgoodwin/rules.mk b/keyboards/planck/keymaps/sgoodwin/rules.mk
index cdcb4a887d..1e877943d9 100644
--- a/keyboards/planck/keymaps/sgoodwin/rules.mk
+++ b/keyboards/planck/keymaps/sgoodwin/rules.mk
@@ -14,7 +14,6 @@ AUDIO_ENABLE = yes # Audio output on port C6
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
-API_SYSEX_ENABLE = no # Disable extra stuff for ergodoxen
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend \ No newline at end of file
diff --git a/keyboards/planck/keymaps/sigul/keymap.c b/keyboards/planck/keymaps/sigul/keymap.c
index bdbf21b113..c22d272dff 100644
--- a/keyboards/planck/keymaps/sigul/keymap.c
+++ b/keyboards/planck/keymaps/sigul/keymap.c
@@ -49,9 +49,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/
[_LOWER] = LAYOUT_ortho_4x12(
- IT_TILDE, IT_EXLM, IT_AT, IT_SHRP, IT_DLR, IT_PERC, IT_CRC, IT_AMPR, IT_ASTR, IT_LPRN, IT_RPRN, KC_DEL,
- KC_ENT, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, S(IT_MINS), IT_EQL, S(IT_EACC), IT_OACC, IT_AACC,
- _______, KC_F6, KC_F7, KC_F8, KC_F9, _______, NUMPAD, S(IT_UACC), IT_PLMN, IT_LCBR, IT_RCBR, IT_PIPE,
+ IT_TILD, IT_EXLM, IT_AT, IT_HASH, IT_DLR, IT_PERC, IT_CIRC, IT_AMPR, IT_ASTR, IT_LPRN, IT_RPRN, KC_DEL,
+ KC_ENT, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, S(IT_MINS), IT_EQL, S(IT_EGRV), IT_OGRV, IT_AGRV,
+ _______, KC_F6, KC_F7, KC_F8, KC_F9, _______, NUMPAD, S(IT_UGRV), IT_PLMN, IT_LCBR, IT_RCBR, IT_PIPE,
_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
),
@@ -67,8 +67,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------------------'
*/
[_RAISE] = LAYOUT_ortho_4x12(
- IT_GRAVE, IT_1, IT_2, IT_3, IT_4, IT_5, IT_6, IT_7, IT_8, IT_9, IT_0, _______,
- _______, _______, SECRET0, SECRET1, _______, _______, _______, IT_MINS, IT_PLUS, IT_EACC, IT_IACC, IT_UACC,
+ IT_GRV, IT_1, IT_2, IT_3, IT_4, IT_5, IT_6, IT_7, IT_8, IT_9, IT_0, _______,
+ _______, _______, SECRET0, SECRET1, _______, _______, _______, IT_MINS, IT_PLUS, IT_EGRV, IT_IGRV, IT_UGRV,
KC_CAPS, _______, SECRET2, SECRET3, SECRET4, _______, NUMPAD, SECRET5, _______, IT_LBRC, IT_RBRC, IT_BSLS,
_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END
),
diff --git a/keyboards/planck/keymaps/skug/keymap.c b/keyboards/planck/keymaps/skug/keymap.c
index a2162d9112..4f84a18bfd 100644
--- a/keyboards/planck/keymaps/skug/keymap.c
+++ b/keyboards/planck/keymaps/skug/keymap.c
@@ -39,7 +39,7 @@ enum planck_keycodes {
#define ESC_LOW LT(_LOWER, KC_ESC)
#define BSP_RAI LT(_RAISE, KC_BSPC)
-#define LFT_CTR CTL_T(SE_APOS)
+#define LFT_CTR CTL_T(SE_QUOT)
#define RGT_CTR CTL_T(KC_TILD)
#define UTILITY MO(_UTILITY)
@@ -57,8 +57,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------------------'
*/
[_DEFAULT] = LAYOUT_planck_grid(
- KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , SE_AA ,
- UTILITY, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , SE_OSLH, SE_AE ,
+ KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , SE_ARNG,
+ UTILITY, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , SE_ODIA, SE_ADIA,
KC_LSPO, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , SE_MINS, KC_RSPC,
LFT_CTR, KC_LALT, KC_LGUI, SE_AT , ESC_LOW, KC_ENT , KC_SPC , BSP_RAI, _______, KC_ALGR, SE_ASTR, RGT_CTR
),
@@ -77,7 +77,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_RAISE] = LAYOUT_planck_grid(
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_PLUS,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, SE_GRTR, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, SE_RABK, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
@@ -93,9 +93,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------------------'
*/
[_LOWER] = LAYOUT_planck_grid(
- SE_HALF, LSFT(KC_1), SE_QUO2, LSFT(KC_3), SE_BULT, LSFT(KC_5), SE_AMPR, SE_SLSH, SE_LPRN, SE_RPRN, SE_EQL , SE_QUES,
+ SE_HALF, LSFT(KC_1), SE_DQUO, LSFT(KC_3), SE_CURR, LSFT(KC_5), SE_AMPR, SE_SLSH, SE_LPRN, SE_RPRN, SE_EQL , SE_QUES,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, SE_LESS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, SE_LABK, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
diff --git a/keyboards/planck/keymaps/spacebarracecar/keymap.c b/keyboards/planck/keymaps/spacebarracecar/keymap.c
index 71f44c996e..5efced81a3 100644
--- a/keyboards/planck/keymaps/spacebarracecar/keymap.c
+++ b/keyboards/planck/keymaps/spacebarracecar/keymap.c
@@ -44,7 +44,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
`-----------------------------------------------------------------------------------------------------------------------'
*/
[_LOWER] = LAYOUT_ortho_4x12(
- DE_TILD, DE_EXLM, DE_DQOT, DE_HASH, DE_DLR, DE_PERC, CU_CIRC, DE_AMPR, DE_ASTR, DE_LPRN, DE_RPRN, _______,
+ DE_TILD, DE_EXLM, DE_DQUO, DE_HASH, DE_DLR, DE_PERC, CU_CIRC, DE_AMPR, DE_ASTR, DE_LPRN, DE_RPRN, _______,
_______, DE_AT, CTRLX, CTRLC, CTRLV, XXXXXXX, XXXXXXX, DE_UNDS, DE_PLUS, DE_LCBR, DE_RCBR, DE_PIPE,
_______, DE_EURO, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DE_MINS, CU_EQL, CU_LBRC, CU_RBRC, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
diff --git a/keyboards/planck/keymaps/vifon/rules.mk b/keyboards/planck/keymaps/vifon/rules.mk
index 3f9b4544e1..654667eb69 100644
--- a/keyboards/planck/keymaps/vifon/rules.mk
+++ b/keyboards/planck/keymaps/vifon/rules.mk
@@ -16,7 +16,6 @@ AUDIO_ENABLE = no # Audio output on port C6
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
-API_SYSEX_ENABLE = no # https://www.reddit.com/r/olkb/comments/5swhij/_/ddie6zq/
KEY_LOCK_ENABLE = yes
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
diff --git a/keyboards/planck/light/rules.mk b/keyboards/planck/light/rules.mk
index fc6243c3fb..78314b3e84 100644
--- a/keyboards/planck/light/rules.mk
+++ b/keyboards/planck/light/rules.mk
@@ -29,7 +29,6 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
RGB_MATRIX_ENABLE = yes
RGB_MATRIX_DRIVER = IS31FL3731
-API_SYSEX_ENABLE = no
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
diff --git a/keyboards/planck/rev1/rules.mk b/keyboards/planck/rev1/rules.mk
index 98ae26cbed..afc369a7d9 100644
--- a/keyboards/planck/rev1/rules.mk
+++ b/keyboards/planck/rev1/rules.mk
@@ -27,7 +27,6 @@ AUDIO_ENABLE = no # Audio output on port C6
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
-API_SYSEX_ENABLE = no
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
diff --git a/keyboards/planck/rev2/rules.mk b/keyboards/planck/rev2/rules.mk
index 98ae26cbed..afc369a7d9 100644
--- a/keyboards/planck/rev2/rules.mk
+++ b/keyboards/planck/rev2/rules.mk
@@ -27,7 +27,6 @@ AUDIO_ENABLE = no # Audio output on port C6
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
-API_SYSEX_ENABLE = no
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
diff --git a/keyboards/planck/rev3/rules.mk b/keyboards/planck/rev3/rules.mk
index 98ae26cbed..afc369a7d9 100644
--- a/keyboards/planck/rev3/rules.mk
+++ b/keyboards/planck/rev3/rules.mk
@@ -27,7 +27,6 @@ AUDIO_ENABLE = no # Audio output on port C6
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
-API_SYSEX_ENABLE = no
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
diff --git a/keyboards/planck/rev4/rules.mk b/keyboards/planck/rev4/rules.mk
index 8454ea0e72..6212437180 100644
--- a/keyboards/planck/rev4/rules.mk
+++ b/keyboards/planck/rev4/rules.mk
@@ -27,7 +27,6 @@ AUDIO_ENABLE = yes # Audio output on port C6
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
-API_SYSEX_ENABLE = no
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
diff --git a/keyboards/planck/rev5/rules.mk b/keyboards/planck/rev5/rules.mk
index 4958572545..492c70b65f 100644
--- a/keyboards/planck/rev5/rules.mk
+++ b/keyboards/planck/rev5/rules.mk
@@ -27,7 +27,6 @@ AUDIO_ENABLE = yes # Audio output on port C6
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
-API_SYSEX_ENABLE = no
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
diff --git a/keyboards/planck/rev6/config.h b/keyboards/planck/rev6/config.h
index 4bc8a509f6..18bb740968 100644
--- a/keyboards/planck/rev6/config.h
+++ b/keyboards/planck/rev6/config.h
@@ -141,7 +141,7 @@
#define WS2812_DMA_CHANNEL 2
#ifndef RGB_DISABLE_WHEN_USB_SUSPENDED
-# define RGB_DISABLE_WHEN_USB_SUSPENDED true
+# define RGB_DISABLE_WHEN_USB_SUSPENDED
#endif
#endif
diff --git a/keyboards/planck/rev6/rev6.c b/keyboards/planck/rev6/rev6.c
index 4f2ff86812..e6c49ae1c8 100644
--- a/keyboards/planck/rev6/rev6.c
+++ b/keyboards/planck/rev6/rev6.c
@@ -61,10 +61,10 @@ void matrix_scan_kb(void) {
#ifdef DIP_SWITCH_ENABLE
__attribute__((weak))
-void dip_update(uint8_t index, bool active) {}
+bool dip_update(uint8_t index, bool active) { return true; }
__attribute__((weak))
-void dip_switch_update_user(uint8_t index, bool active) {
- dip_update(index, active);
+bool dip_switch_update_user(uint8_t index, bool active) {
+ return dip_update(index, active);
}
#endif
diff --git a/keyboards/planck/rev6/rules.mk b/keyboards/planck/rev6/rules.mk
index 7760353e33..a26fbc1477 100644
--- a/keyboards/planck/rev6/rules.mk
+++ b/keyboards/planck/rev6/rules.mk
@@ -22,7 +22,6 @@ UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
WS2812_DRIVER = pwm
-API_SYSEX_ENABLE = no
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
diff --git a/keyboards/planck/thk/info.json b/keyboards/planck/thk/info.json
index cffc9fd364..558597b4d8 100644
--- a/keyboards/planck/thk/info.json
+++ b/keyboards/planck/thk/info.json
@@ -1,53 +1,13 @@
{
- "manufacturer": "OLKB",
"keyboard_name": "Planck THK",
"maintainer": "Erovia",
- "height": 4,
- "width": 12,
- "bootloader": "USBasp",
- "debounce": 5,
- "diode_direction": "COL2ROW",
- "features": {
- "audio": false,
- "backlight": false,
- "bluetooth": false,
- "bootmagic_lite": true,
- "command": false,
- "console": false,
- "dip_switch": true,
- "encoder": true,
- "extrakey": true,
- "mousekey": true,
- "nkro": false,
- "rgblight": false,
- "sleep_led": false
- },
- "matrix_pins": {
- "cols": ["D7", "C2", "C3", "C4", "C5", "C6", "C7", "A3", "A2", "A1", "A0", "B0"],
- "rows": ["A7", "A6", "A5", "A4"]
- },
- "processor": "atmega32a",
- "qmk_lufa_bootloader": {
- "esc_input": "D5",
- "esc_output": "F1",
- "led": "E6",
- "speaker": "C6"
- },
"url": "https://olkb.com/planck",
- "usb": {
- "device_ver": "0x0000",
- "pid": "0x25A7",
- "vid": "0x03A8"
- },
- "community_layouts": ["ortho_4x12", "planck_mit"],
"layout_aliases": {
"LAYOUT_planck_grid": "LAYOUT_ortho_4x12",
"LAYOUT_planck_mit": "LAYOUT_planck_1x2uC"
},
"layouts": {
"LAYOUT_ortho_4x12": {
- "c_macro": true,
- "filename": "keyboards/planck/thk/thk.h",
"key_count": 48,
"layout": [
{ "label": "k00", "matrix": [0, 0], "w": 1, "x": 0, "y": 0 },
@@ -101,8 +61,6 @@
]
},
"LAYOUT_planck_1x2uC": {
- "c_macro": true,
- "filename": "keyboards/planck/thk/thk.h",
"key_count": 47,
"layout": [
{ "label": "k00", "matrix": [0, 0], "w": 1, "x": 0, "y": 0 },
diff --git a/keyboards/planck/thk/keymaps/thk/keymap.c b/keyboards/planck/thk/keymaps/thk/keymap.c
index 948393b532..ae2420250e 100644
--- a/keyboards/planck/thk/keymaps/thk/keymap.c
+++ b/keyboards/planck/thk/keymaps/thk/keymap.c
@@ -213,7 +213,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
return true;
}
-void dip_switch_update_user(uint8_t index, bool active) {
+bool dip_switch_update_user(uint8_t index, bool active) {
switch (index) {
case 0: {
if (active) {
@@ -237,4 +237,5 @@ void dip_switch_update_user(uint8_t index, bool active) {
SEND_STRING("This is a Planck THK");
break;
}
+ return true;
}
diff --git a/keyboards/ploopyco/mouse/mouse.h b/keyboards/ploopyco/mouse/mouse.h
index 5d49d2f2d2..d11aa5e9a4 100644
--- a/keyboards/ploopyco/mouse/mouse.h
+++ b/keyboards/ploopyco/mouse/mouse.h
@@ -20,7 +20,7 @@
#include "quantum.h"
#include "spi_master.h"
-#include "pmw3360.h"
+#include "drivers/sensors/pmw3360.h"
#include "analog.h"
#include "opt_encoder.h"
#include "pointing_device.h"
diff --git a/keyboards/ploopyco/mouse/rules.mk b/keyboards/ploopyco/mouse/rules.mk
index f998672f14..17aac98016 100644
--- a/keyboards/ploopyco/mouse/rules.mk
+++ b/keyboards/ploopyco/mouse/rules.mk
@@ -27,4 +27,4 @@ POINTING_DEVICE_ENABLE = yes
MOUSEKEY_ENABLE = yes # Mouse keys
QUANTUM_LIB_SRC += analog.c spi_master.c
-SRC += pmw3360.c opt_encoder.c
+SRC += drivers/sensors/pmw3360.c opt_encoder.c
diff --git a/keyboards/ploopyco/pmw3360.c b/keyboards/ploopyco/pmw3360.c
deleted file mode 100644
index 5f9f72a9ec..0000000000
--- a/keyboards/ploopyco/pmw3360.c
+++ /dev/null
@@ -1,218 +0,0 @@
-/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
- * Copyright 2019 Sunjun Kim
- * Copyright 2020 Ploopy Corporation
- *
- * 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 <http://www.gnu.org/licenses/>.
- */
-
-#include "wait.h"
-#include "debug.h"
-#include "print.h"
-#include "pmw3360.h"
-#include "pmw3360_firmware.h"
-
-bool _inBurst = false;
-
-#ifndef PMW_CPI
-# define PMW_CPI 1600
-#endif
-#ifndef SPI_DIVISOR
-# define SPI_DIVISOR 2
-#endif
-#ifndef ROTATIONAL_TRANSFORM_ANGLE
-# define ROTATIONAL_TRANSFORM_ANGLE 0x00
-#endif
-
-void print_byte(uint8_t byte) { dprintf("%c%c%c%c%c%c%c%c|", (byte & 0x80 ? '1' : '0'), (byte & 0x40 ? '1' : '0'), (byte & 0x20 ? '1' : '0'), (byte & 0x10 ? '1' : '0'), (byte & 0x08 ? '1' : '0'), (byte & 0x04 ? '1' : '0'), (byte & 0x02 ? '1' : '0'), (byte & 0x01 ? '1' : '0')); }
-
-
-bool spi_start_adv(void) {
- bool status = spi_start(SPI_SS_PIN, false, 3, SPI_DIVISOR);
- wait_us(1);
- return status;
-}
-
-void spi_stop_adv(void) {
- wait_us(1);
- spi_stop();
-}
-
-spi_status_t spi_write_adv(uint8_t reg_addr, uint8_t data) {
- if (reg_addr != REG_Motion_Burst) {
- _inBurst = false;
- }
-
- spi_start_adv();
- // send address of the register, with MSBit = 1 to indicate it's a write
- spi_status_t status = spi_write(reg_addr | 0x80);
- status = spi_write(data);
-
- // tSCLK-NCS for write operation
- wait_us(20);
-
- // tSWW/tSWR (=120us) minus tSCLK-NCS. Could be shortened, but is looks like a safe lower bound
- wait_us(100);
- spi_stop();
- return status;
-}
-
-uint8_t spi_read_adv(uint8_t reg_addr) {
- spi_start_adv();
- // send adress of the register, with MSBit = 0 to indicate it's a read
- spi_write(reg_addr & 0x7f);
-
- uint8_t data = spi_read();
-
- // tSCLK-NCS for read operation is 120ns
- wait_us(1);
-
- // tSRW/tSRR (=20us) minus tSCLK-NCS
- wait_us(19);
-
- spi_stop();
- return data;
-}
-
-void pmw_set_cpi(uint16_t cpi) {
- int cpival = constrain((cpi / 100) - 1, 0, 0x77); // limits to 0--119
-
- spi_start_adv();
- spi_write_adv(REG_Config1, cpival);
- spi_stop();
-}
-
-bool pmw_spi_init(void) {
- spi_init();
- _inBurst = false;
-
- spi_stop();
- spi_start_adv();
- spi_stop();
-
- spi_write_adv(REG_Shutdown, 0xb6); // Shutdown first
- wait_ms(300);
-
- spi_start_adv();
- wait_us(40);
- spi_stop_adv();
- wait_us(40);
-
- spi_write_adv(REG_Power_Up_Reset, 0x5a);
- wait_ms(50);
-
- spi_read_adv(REG_Motion);
- spi_read_adv(REG_Delta_X_L);
- spi_read_adv(REG_Delta_X_H);
- spi_read_adv(REG_Delta_Y_L);
- spi_read_adv(REG_Delta_Y_H);
-
- pmw_upload_firmware();
-
- spi_stop_adv();
-
- wait_ms(10);
- pmw_set_cpi(PMW_CPI);
-
- wait_ms(1);
-
- return pmw_check_signature();
-}
-
-void pmw_upload_firmware(void) {
- spi_write_adv(REG_Config2, 0x00);
-
- spi_write_adv(REG_Angle_Tune, constrain(ROTATIONAL_TRANSFORM_ANGLE, -30, 30));
-
- spi_write_adv(REG_SROM_Enable, 0x1d);
-
- wait_ms(10);
-
- spi_write_adv(REG_SROM_Enable, 0x18);
-
- spi_start_adv();
- spi_write(REG_SROM_Load_Burst | 0x80);
- wait_us(15);
-
- unsigned char c;
- for (int i = 0; i < firmware_length; i++) {
- c = (unsigned char)pgm_read_byte(firmware_data + i);
- spi_write(c);
- wait_us(15);
- }
- wait_us(200);
-
- spi_read_adv(REG_SROM_ID);
-
- spi_write_adv(REG_Config2, 0x00);
-
- spi_stop();
- wait_ms(10);
-}
-
-bool pmw_check_signature(void) {
- uint8_t pid = spi_read_adv(REG_Product_ID);
- uint8_t iv_pid = spi_read_adv(REG_Inverse_Product_ID);
- uint8_t SROM_ver = spi_read_adv(REG_SROM_ID);
- return (pid == 0x42 && iv_pid == 0xBD && SROM_ver == 0x04); // signature for SROM 0x04
-}
-
-report_pmw_t pmw_read_burst(void) {
- if (!_inBurst) {
- dprintf("burst on");
- spi_write_adv(REG_Motion_Burst, 0x00);
- _inBurst = true;
- }
-
- spi_start_adv();
- spi_write(REG_Motion_Burst);
- wait_us(35); // waits for tSRAD
-
- report_pmw_t data;
- data.motion = 0;
- data.dx = 0;
- data.mdx = 0;
- data.dy = 0;
- data.mdx = 0;
-
- data.motion = spi_read();
- spi_write(0x00); // skip Observation
- data.dx = spi_read();
- data.mdx = spi_read();
- data.dy = spi_read();
- data.mdy = spi_read();
-
- spi_stop();
-
- print_byte(data.motion);
- print_byte(data.dx);
- print_byte(data.mdx);
- print_byte(data.dy);
- print_byte(data.mdy);
- dprintf("\n");
-
- data.isMotion = (data.motion & 0x80) != 0;
- data.isOnSurface = (data.motion & 0x08) == 0;
- data.dx |= (data.mdx << 8);
- data.dx = data.dx * -1;
- data.dy |= (data.mdy << 8);
- data.dy = data.dy * -1;
-
- spi_stop();
-
- if (data.motion & 0b111) { // panic recovery, sometimes burst mode works weird.
- _inBurst = false;
- }
-
- return data;
-}
diff --git a/keyboards/ploopyco/pmw3360_firmware.h b/keyboards/ploopyco/pmw3360_firmware.h
deleted file mode 100644
index cca5a6a4d8..0000000000
--- a/keyboards/ploopyco/pmw3360_firmware.h
+++ /dev/null
@@ -1,300 +0,0 @@
-/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
- * Copyright 2019 Sunjun Kim
- * Copyright 2020 Ploopy Corporation
- *
- * 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 <http://www.gnu.org/licenses/>.
- */
-
-#pragma once
-
-// clang-format off
-// Firmware Blob foor PMW3360
-const uint16_t firmware_length = 4094;
-// clang-format off
-const uint8_t firmware_data[] PROGMEM = { // SROM 0x04
-0x01, 0x04, 0x8e, 0x96, 0x6e, 0x77, 0x3e, 0xfe, 0x7e, 0x5f, 0x1d, 0xb8, 0xf2, 0x66, 0x4e,
-0xff, 0x5d, 0x19, 0xb0, 0xc2, 0x04, 0x69, 0x54, 0x2a, 0xd6, 0x2e, 0xbf, 0xdd, 0x19, 0xb0,
-0xc3, 0xe5, 0x29, 0xb1, 0xe0, 0x23, 0xa5, 0xa9, 0xb1, 0xc1, 0x00, 0x82, 0x67, 0x4c, 0x1a,
-0x97, 0x8d, 0x79, 0x51, 0x20, 0xc7, 0x06, 0x8e, 0x7c, 0x7c, 0x7a, 0x76, 0x4f, 0xfd, 0x59,
-0x30, 0xe2, 0x46, 0x0e, 0x9e, 0xbe, 0xdf, 0x1d, 0x99, 0x91, 0xa0, 0xa5, 0xa1, 0xa9, 0xd0,
-0x22, 0xc6, 0xef, 0x5c, 0x1b, 0x95, 0x89, 0x90, 0xa2, 0xa7, 0xcc, 0xfb, 0x55, 0x28, 0xb3,
-0xe4, 0x4a, 0xf7, 0x6c, 0x3b, 0xf4, 0x6a, 0x56, 0x2e, 0xde, 0x1f, 0x9d, 0xb8, 0xd3, 0x05,
-0x88, 0x92, 0xa6, 0xce, 0x1e, 0xbe, 0xdf, 0x1d, 0x99, 0xb0, 0xe2, 0x46, 0xef, 0x5c, 0x07,
-0x11, 0x5d, 0x98, 0x0b, 0x9d, 0x94, 0x97, 0xee, 0x4e, 0x45, 0x33, 0x6b, 0x44, 0xc7, 0x29,
-0x56, 0x27, 0x30, 0xc6, 0xa7, 0xd5, 0xf2, 0x56, 0xdf, 0xb4, 0x38, 0x62, 0xcb, 0xa0, 0xb6,
-0xe3, 0x0f, 0x84, 0x06, 0x24, 0x05, 0x65, 0x6f, 0x76, 0x89, 0xb5, 0x77, 0x41, 0x27, 0x82,
-0x66, 0x65, 0x82, 0xcc, 0xd5, 0xe6, 0x20, 0xd5, 0x27, 0x17, 0xc5, 0xf8, 0x03, 0x23, 0x7c,
-0x5f, 0x64, 0xa5, 0x1d, 0xc1, 0xd6, 0x36, 0xcb, 0x4c, 0xd4, 0xdb, 0x66, 0xd7, 0x8b, 0xb1,
-0x99, 0x7e, 0x6f, 0x4c, 0x36, 0x40, 0x06, 0xd6, 0xeb, 0xd7, 0xa2, 0xe4, 0xf4, 0x95, 0x51,
-0x5a, 0x54, 0x96, 0xd5, 0x53, 0x44, 0xd7, 0x8c, 0xe0, 0xb9, 0x40, 0x68, 0xd2, 0x18, 0xe9,
-0xdd, 0x9a, 0x23, 0x92, 0x48, 0xee, 0x7f, 0x43, 0xaf, 0xea, 0x77, 0x38, 0x84, 0x8c, 0x0a,
-0x72, 0xaf, 0x69, 0xf8, 0xdd, 0xf1, 0x24, 0x83, 0xa3, 0xf8, 0x4a, 0xbf, 0xf5, 0x94, 0x13,
-0xdb, 0xbb, 0xd8, 0xb4, 0xb3, 0xa0, 0xfb, 0x45, 0x50, 0x60, 0x30, 0x59, 0x12, 0x31, 0x71,
-0xa2, 0xd3, 0x13, 0xe7, 0xfa, 0xe7, 0xce, 0x0f, 0x63, 0x15, 0x0b, 0x6b, 0x94, 0xbb, 0x37,
-0x83, 0x26, 0x05, 0x9d, 0xfb, 0x46, 0x92, 0xfc, 0x0a, 0x15, 0xd1, 0x0d, 0x73, 0x92, 0xd6,
-0x8c, 0x1b, 0x8c, 0xb8, 0x55, 0x8a, 0xce, 0xbd, 0xfe, 0x8e, 0xfc, 0xed, 0x09, 0x12, 0x83,
-0x91, 0x82, 0x51, 0x31, 0x23, 0xfb, 0xb4, 0x0c, 0x76, 0xad, 0x7c, 0xd9, 0xb4, 0x4b, 0xb2,
-0x67, 0x14, 0x09, 0x9c, 0x7f, 0x0c, 0x18, 0xba, 0x3b, 0xd6, 0x8e, 0x14, 0x2a, 0xe4, 0x1b,
-0x52, 0x9f, 0x2b, 0x7d, 0xe1, 0xfb, 0x6a, 0x33, 0x02, 0xfa, 0xac, 0x5a, 0xf2, 0x3e, 0x88,
-0x7e, 0xae, 0xd1, 0xf3, 0x78, 0xe8, 0x05, 0xd1, 0xe3, 0xdc, 0x21, 0xf6, 0xe1, 0x9a, 0xbd,
-0x17, 0x0e, 0xd9, 0x46, 0x9b, 0x88, 0x03, 0xea, 0xf6, 0x66, 0xbe, 0x0e, 0x1b, 0x50, 0x49,
-0x96, 0x40, 0x97, 0xf1, 0xf1, 0xe4, 0x80, 0xa6, 0x6e, 0xe8, 0x77, 0x34, 0xbf, 0x29, 0x40,
-0x44, 0xc2, 0xff, 0x4e, 0x98, 0xd3, 0x9c, 0xa3, 0x32, 0x2b, 0x76, 0x51, 0x04, 0x09, 0xe7,
-0xa9, 0xd1, 0xa6, 0x32, 0xb1, 0x23, 0x53, 0xe2, 0x47, 0xab, 0xd6, 0xf5, 0x69, 0x5c, 0x3e,
-0x5f, 0xfa, 0xae, 0x45, 0x20, 0xe5, 0xd2, 0x44, 0xff, 0x39, 0x32, 0x6d, 0xfd, 0x27, 0x57,
-0x5c, 0xfd, 0xf0, 0xde, 0xc1, 0xb5, 0x99, 0xe5, 0xf5, 0x1c, 0x77, 0x01, 0x75, 0xc5, 0x6d,
-0x58, 0x92, 0xf2, 0xb2, 0x47, 0x00, 0x01, 0x26, 0x96, 0x7a, 0x30, 0xff, 0xb7, 0xf0, 0xef,
-0x77, 0xc1, 0x8a, 0x5d, 0xdc, 0xc0, 0xd1, 0x29, 0x30, 0x1e, 0x77, 0x38, 0x7a, 0x94, 0xf1,
-0xb8, 0x7a, 0x7e, 0xef, 0xa4, 0xd1, 0xac, 0x31, 0x4a, 0xf2, 0x5d, 0x64, 0x3d, 0xb2, 0xe2,
-0xf0, 0x08, 0x99, 0xfc, 0x70, 0xee, 0x24, 0xa7, 0x7e, 0xee, 0x1e, 0x20, 0x69, 0x7d, 0x44,
-0xbf, 0x87, 0x42, 0xdf, 0x88, 0x3b, 0x0c, 0xda, 0x42, 0xc9, 0x04, 0xf9, 0x45, 0x50, 0xfc,
-0x83, 0x8f, 0x11, 0x6a, 0x72, 0xbc, 0x99, 0x95, 0xf0, 0xac, 0x3d, 0xa7, 0x3b, 0xcd, 0x1c,
-0xe2, 0x88, 0x79, 0x37, 0x11, 0x5f, 0x39, 0x89, 0x95, 0x0a, 0x16, 0x84, 0x7a, 0xf6, 0x8a,
-0xa4, 0x28, 0xe4, 0xed, 0x83, 0x80, 0x3b, 0xb1, 0x23, 0xa5, 0x03, 0x10, 0xf4, 0x66, 0xea,
-0xbb, 0x0c, 0x0f, 0xc5, 0xec, 0x6c, 0x69, 0xc5, 0xd3, 0x24, 0xab, 0xd4, 0x2a, 0xb7, 0x99,
-0x88, 0x76, 0x08, 0xa0, 0xa8, 0x95, 0x7c, 0xd8, 0x38, 0x6d, 0xcd, 0x59, 0x02, 0x51, 0x4b,
-0xf1, 0xb5, 0x2b, 0x50, 0xe3, 0xb6, 0xbd, 0xd0, 0x72, 0xcf, 0x9e, 0xfd, 0x6e, 0xbb, 0x44,
-0xc8, 0x24, 0x8a, 0x77, 0x18, 0x8a, 0x13, 0x06, 0xef, 0x97, 0x7d, 0xfa, 0x81, 0xf0, 0x31,
-0xe6, 0xfa, 0x77, 0xed, 0x31, 0x06, 0x31, 0x5b, 0x54, 0x8a, 0x9f, 0x30, 0x68, 0xdb, 0xe2,
-0x40, 0xf8, 0x4e, 0x73, 0xfa, 0xab, 0x74, 0x8b, 0x10, 0x58, 0x13, 0xdc, 0xd2, 0xe6, 0x78,
-0xd1, 0x32, 0x2e, 0x8a, 0x9f, 0x2c, 0x58, 0x06, 0x48, 0x27, 0xc5, 0xa9, 0x5e, 0x81, 0x47,
-0x89, 0x46, 0x21, 0x91, 0x03, 0x70, 0xa4, 0x3e, 0x88, 0x9c, 0xda, 0x33, 0x0a, 0xce, 0xbc,
-0x8b, 0x8e, 0xcf, 0x9f, 0xd3, 0x71, 0x80, 0x43, 0xcf, 0x6b, 0xa9, 0x51, 0x83, 0x76, 0x30,
-0x82, 0xc5, 0x6a, 0x85, 0x39, 0x11, 0x50, 0x1a, 0x82, 0xdc, 0x1e, 0x1c, 0xd5, 0x7d, 0xa9,
-0x71, 0x99, 0x33, 0x47, 0x19, 0x97, 0xb3, 0x5a, 0xb1, 0xdf, 0xed, 0xa4, 0xf2, 0xe6, 0x26,
-0x84, 0xa2, 0x28, 0x9a, 0x9e, 0xdf, 0xa6, 0x6a, 0xf4, 0xd6, 0xfc, 0x2e, 0x5b, 0x9d, 0x1a,
-0x2a, 0x27, 0x68, 0xfb, 0xc1, 0x83, 0x21, 0x4b, 0x90, 0xe0, 0x36, 0xdd, 0x5b, 0x31, 0x42,
-0x55, 0xa0, 0x13, 0xf7, 0xd0, 0x89, 0x53, 0x71, 0x99, 0x57, 0x09, 0x29, 0xc5, 0xf3, 0x21,
-0xf8, 0x37, 0x2f, 0x40, 0xf3, 0xd4, 0xaf, 0x16, 0x08, 0x36, 0x02, 0xfc, 0x77, 0xc5, 0x8b,
-0x04, 0x90, 0x56, 0xb9, 0xc9, 0x67, 0x9a, 0x99, 0xe8, 0x00, 0xd3, 0x86, 0xff, 0x97, 0x2d,
-0x08, 0xe9, 0xb7, 0xb3, 0x91, 0xbc, 0xdf, 0x45, 0xc6, 0xed, 0x0f, 0x8c, 0x4c, 0x1e, 0xe6,
-0x5b, 0x6e, 0x38, 0x30, 0xe4, 0xaa, 0xe3, 0x95, 0xde, 0xb9, 0xe4, 0x9a, 0xf5, 0xb2, 0x55,
-0x9a, 0x87, 0x9b, 0xf6, 0x6a, 0xb2, 0xf2, 0x77, 0x9a, 0x31, 0xf4, 0x7a, 0x31, 0xd1, 0x1d,
-0x04, 0xc0, 0x7c, 0x32, 0xa2, 0x9e, 0x9a, 0xf5, 0x62, 0xf8, 0x27, 0x8d, 0xbf, 0x51, 0xff,
-0xd3, 0xdf, 0x64, 0x37, 0x3f, 0x2a, 0x6f, 0x76, 0x3a, 0x7d, 0x77, 0x06, 0x9e, 0x77, 0x7f,
-0x5e, 0xeb, 0x32, 0x51, 0xf9, 0x16, 0x66, 0x9a, 0x09, 0xf3, 0xb0, 0x08, 0xa4, 0x70, 0x96,
-0x46, 0x30, 0xff, 0xda, 0x4f, 0xe9, 0x1b, 0xed, 0x8d, 0xf8, 0x74, 0x1f, 0x31, 0x92, 0xb3,
-0x73, 0x17, 0x36, 0xdb, 0x91, 0x30, 0xd6, 0x88, 0x55, 0x6b, 0x34, 0x77, 0x87, 0x7a, 0xe7,
-0xee, 0x06, 0xc6, 0x1c, 0x8c, 0x19, 0x0c, 0x48, 0x46, 0x23, 0x5e, 0x9c, 0x07, 0x5c, 0xbf,
-0xb4, 0x7e, 0xd6, 0x4f, 0x74, 0x9c, 0xe2, 0xc5, 0x50, 0x8b, 0xc5, 0x8b, 0x15, 0x90, 0x60,
-0x62, 0x57, 0x29, 0xd0, 0x13, 0x43, 0xa1, 0x80, 0x88, 0x91, 0x00, 0x44, 0xc7, 0x4d, 0x19,
-0x86, 0xcc, 0x2f, 0x2a, 0x75, 0x5a, 0xfc, 0xeb, 0x97, 0x2a, 0x70, 0xe3, 0x78, 0xd8, 0x91,
-0xb0, 0x4f, 0x99, 0x07, 0xa3, 0x95, 0xea, 0x24, 0x21, 0xd5, 0xde, 0x51, 0x20, 0x93, 0x27,
-0x0a, 0x30, 0x73, 0xa8, 0xff, 0x8a, 0x97, 0xe9, 0xa7, 0x6a, 0x8e, 0x0d, 0xe8, 0xf0, 0xdf,
-0xec, 0xea, 0xb4, 0x6c, 0x1d, 0x39, 0x2a, 0x62, 0x2d, 0x3d, 0x5a, 0x8b, 0x65, 0xf8, 0x90,
-0x05, 0x2e, 0x7e, 0x91, 0x2c, 0x78, 0xef, 0x8e, 0x7a, 0xc1, 0x2f, 0xac, 0x78, 0xee, 0xaf,
-0x28, 0x45, 0x06, 0x4c, 0x26, 0xaf, 0x3b, 0xa2, 0xdb, 0xa3, 0x93, 0x06, 0xb5, 0x3c, 0xa5,
-0xd8, 0xee, 0x8f, 0xaf, 0x25, 0xcc, 0x3f, 0x85, 0x68, 0x48, 0xa9, 0x62, 0xcc, 0x97, 0x8f,
-0x7f, 0x2a, 0xea, 0xe0, 0x15, 0x0a, 0xad, 0x62, 0x07, 0xbd, 0x45, 0xf8, 0x41, 0xd8, 0x36,
-0xcb, 0x4c, 0xdb, 0x6e, 0xe6, 0x3a, 0xe7, 0xda, 0x15, 0xe9, 0x29, 0x1e, 0x12, 0x10, 0xa0,
-0x14, 0x2c, 0x0e, 0x3d, 0xf4, 0xbf, 0x39, 0x41, 0x92, 0x75, 0x0b, 0x25, 0x7b, 0xa3, 0xce,
-0x39, 0x9c, 0x15, 0x64, 0xc8, 0xfa, 0x3d, 0xef, 0x73, 0x27, 0xfe, 0x26, 0x2e, 0xce, 0xda,
-0x6e, 0xfd, 0x71, 0x8e, 0xdd, 0xfe, 0x76, 0xee, 0xdc, 0x12, 0x5c, 0x02, 0xc5, 0x3a, 0x4e,
-0x4e, 0x4f, 0xbf, 0xca, 0x40, 0x15, 0xc7, 0x6e, 0x8d, 0x41, 0xf1, 0x10, 0xe0, 0x4f, 0x7e,
-0x97, 0x7f, 0x1c, 0xae, 0x47, 0x8e, 0x6b, 0xb1, 0x25, 0x31, 0xb0, 0x73, 0xc7, 0x1b, 0x97,
-0x79, 0xf9, 0x80, 0xd3, 0x66, 0x22, 0x30, 0x07, 0x74, 0x1e, 0xe4, 0xd0, 0x80, 0x21, 0xd6,
-0xee, 0x6b, 0x6c, 0x4f, 0xbf, 0xf5, 0xb7, 0xd9, 0x09, 0x87, 0x2f, 0xa9, 0x14, 0xbe, 0x27,
-0xd9, 0x72, 0x50, 0x01, 0xd4, 0x13, 0x73, 0xa6, 0xa7, 0x51, 0x02, 0x75, 0x25, 0xe1, 0xb3,
-0x45, 0x34, 0x7d, 0xa8, 0x8e, 0xeb, 0xf3, 0x16, 0x49, 0xcb, 0x4f, 0x8c, 0xa1, 0xb9, 0x36,
-0x85, 0x39, 0x75, 0x5d, 0x08, 0x00, 0xae, 0xeb, 0xf6, 0xea, 0xd7, 0x13, 0x3a, 0x21, 0x5a,
-0x5f, 0x30, 0x84, 0x52, 0x26, 0x95, 0xc9, 0x14, 0xf2, 0x57, 0x55, 0x6b, 0xb1, 0x10, 0xc2,
-0xe1, 0xbd, 0x3b, 0x51, 0xc0, 0xb7, 0x55, 0x4c, 0x71, 0x12, 0x26, 0xc7, 0x0d, 0xf9, 0x51,
-0xa4, 0x38, 0x02, 0x05, 0x7f, 0xb8, 0xf1, 0x72, 0x4b, 0xbf, 0x71, 0x89, 0x14, 0xf3, 0x77,
-0x38, 0xd9, 0x71, 0x24, 0xf3, 0x00, 0x11, 0xa1, 0xd8, 0xd4, 0x69, 0x27, 0x08, 0x37, 0x35,
-0xc9, 0x11, 0x9d, 0x90, 0x1c, 0x0e, 0xe7, 0x1c, 0xff, 0x2d, 0x1e, 0xe8, 0x92, 0xe1, 0x18,
-0x10, 0x95, 0x7c, 0xe0, 0x80, 0xf4, 0x96, 0x43, 0x21, 0xf9, 0x75, 0x21, 0x64, 0x38, 0xdd,
-0x9f, 0x1e, 0x95, 0x16, 0xda, 0x56, 0x1d, 0x4f, 0x9a, 0x53, 0xb2, 0xe2, 0xe4, 0x18, 0xcb,
-0x6b, 0x1a, 0x65, 0xeb, 0x56, 0xc6, 0x3b, 0xe5, 0xfe, 0xd8, 0x26, 0x3f, 0x3a, 0x84, 0x59,
-0x72, 0x66, 0xa2, 0xf3, 0x75, 0xff, 0xfb, 0x60, 0xb3, 0x22, 0xad, 0x3f, 0x2d, 0x6b, 0xf9,
-0xeb, 0xea, 0x05, 0x7c, 0xd8, 0x8f, 0x6d, 0x2c, 0x98, 0x9e, 0x2b, 0x93, 0xf1, 0x5e, 0x46,
-0xf0, 0x87, 0x49, 0x29, 0x73, 0x68, 0xd7, 0x7f, 0xf9, 0xf0, 0xe5, 0x7d, 0xdb, 0x1d, 0x75,
-0x19, 0xf3, 0xc4, 0x58, 0x9b, 0x17, 0x88, 0xa8, 0x92, 0xe0, 0xbe, 0xbd, 0x8b, 0x1d, 0x8d,
-0x9f, 0x56, 0x76, 0xad, 0xaf, 0x29, 0xe2, 0xd9, 0xd5, 0x52, 0xf6, 0xb5, 0x56, 0x35, 0x57,
-0x3a, 0xc8, 0xe1, 0x56, 0x43, 0x19, 0x94, 0xd3, 0x04, 0x9b, 0x6d, 0x35, 0xd8, 0x0b, 0x5f,
-0x4d, 0x19, 0x8e, 0xec, 0xfa, 0x64, 0x91, 0x0a, 0x72, 0x20, 0x2b, 0xbc, 0x1a, 0x4a, 0xfe,
-0x8b, 0xfd, 0xbb, 0xed, 0x1b, 0x23, 0xea, 0xad, 0x72, 0x82, 0xa1, 0x29, 0x99, 0x71, 0xbd,
-0xf0, 0x95, 0xc1, 0x03, 0xdd, 0x7b, 0xc2, 0xb2, 0x3c, 0x28, 0x54, 0xd3, 0x68, 0xa4, 0x72,
-0xc8, 0x66, 0x96, 0xe0, 0xd1, 0xd8, 0x7f, 0xf8, 0xd1, 0x26, 0x2b, 0xf7, 0xad, 0xba, 0x55,
-0xca, 0x15, 0xb9, 0x32, 0xc3, 0xe5, 0x88, 0x97, 0x8e, 0x5c, 0xfb, 0x92, 0x25, 0x8b, 0xbf,
-0xa2, 0x45, 0x55, 0x7a, 0xa7, 0x6f, 0x8b, 0x57, 0x5b, 0xcf, 0x0e, 0xcb, 0x1d, 0xfb, 0x20,
-0x82, 0x77, 0xa8, 0x8c, 0xcc, 0x16, 0xce, 0x1d, 0xfa, 0xde, 0xcc, 0x0b, 0x62, 0xfe, 0xcc,
-0xe1, 0xb7, 0xf0, 0xc3, 0x81, 0x64, 0x73, 0x40, 0xa0, 0xc2, 0x4d, 0x89, 0x11, 0x75, 0x33,
-0x55, 0x33, 0x8d, 0xe8, 0x4a, 0xfd, 0xea, 0x6e, 0x30, 0x0b, 0xd7, 0x31, 0x2c, 0xde, 0x47,
-0xe3, 0xbf, 0xf8, 0x55, 0x42, 0xe2, 0x7f, 0x59, 0xe5, 0x17, 0xef, 0x99, 0x34, 0x69, 0x91,
-0xb1, 0x23, 0x8e, 0x20, 0x87, 0x2d, 0xa8, 0xfe, 0xd5, 0x8a, 0xf3, 0x84, 0x3a, 0xf0, 0x37,
-0xe4, 0x09, 0x00, 0x54, 0xee, 0x67, 0x49, 0x93, 0xe4, 0x81, 0x70, 0xe3, 0x90, 0x4d, 0xef,
-0xfe, 0x41, 0xb7, 0x99, 0x7b, 0xc1, 0x83, 0xba, 0x62, 0x12, 0x6f, 0x7d, 0xde, 0x6b, 0xaf,
-0xda, 0x16, 0xf9, 0x55, 0x51, 0xee, 0xa6, 0x0c, 0x2b, 0x02, 0xa3, 0xfd, 0x8d, 0xfb, 0x30,
-0x17, 0xe4, 0x6f, 0xdf, 0x36, 0x71, 0xc4, 0xca, 0x87, 0x25, 0x48, 0xb0, 0x47, 0xec, 0xea,
-0xb4, 0xbf, 0xa5, 0x4d, 0x9b, 0x9f, 0x02, 0x93, 0xc4, 0xe3, 0xe4, 0xe8, 0x42, 0x2d, 0x68,
-0x81, 0x15, 0x0a, 0xeb, 0x84, 0x5b, 0xd6, 0xa8, 0x74, 0xfb, 0x7d, 0x1d, 0xcb, 0x2c, 0xda,
-0x46, 0x2a, 0x76, 0x62, 0xce, 0xbc, 0x5c, 0x9e, 0x8b, 0xe7, 0xcf, 0xbe, 0x78, 0xf5, 0x7c,
-0xeb, 0xb3, 0x3a, 0x9c, 0xaa, 0x6f, 0xcc, 0x72, 0xd1, 0x59, 0xf2, 0x11, 0x23, 0xd6, 0x3f,
-0x48, 0xd1, 0xb7, 0xce, 0xb0, 0xbf, 0xcb, 0xea, 0x80, 0xde, 0x57, 0xd4, 0x5e, 0x97, 0x2f,
-0x75, 0xd1, 0x50, 0x8e, 0x80, 0x2c, 0x66, 0x79, 0xbf, 0x72, 0x4b, 0xbd, 0x8a, 0x81, 0x6c,
-0xd3, 0xe1, 0x01, 0xdc, 0xd2, 0x15, 0x26, 0xc5, 0x36, 0xda, 0x2c, 0x1a, 0xc0, 0x27, 0x94,
-0xed, 0xb7, 0x9b, 0x85, 0x0b, 0x5e, 0x80, 0x97, 0xc5, 0xec, 0x4f, 0xec, 0x88, 0x5d, 0x50,
-0x07, 0x35, 0x47, 0xdc, 0x0b, 0x3b, 0x3d, 0xdd, 0x60, 0xaf, 0xa8, 0x5d, 0x81, 0x38, 0x24,
-0x25, 0x5d, 0x5c, 0x15, 0xd1, 0xde, 0xb3, 0xab, 0xec, 0x05, 0x69, 0xef, 0x83, 0xed, 0x57,
-0x54, 0xb8, 0x64, 0x64, 0x11, 0x16, 0x32, 0x69, 0xda, 0x9f, 0x2d, 0x7f, 0x36, 0xbb, 0x44,
-0x5a, 0x34, 0xe8, 0x7f, 0xbf, 0x03, 0xeb, 0x00, 0x7f, 0x59, 0x68, 0x22, 0x79, 0xcf, 0x73,
-0x6c, 0x2c, 0x29, 0xa7, 0xa1, 0x5f, 0x38, 0xa1, 0x1d, 0xf0, 0x20, 0x53, 0xe0, 0x1a, 0x63,
-0x14, 0x58, 0x71, 0x10, 0xaa, 0x08, 0x0c, 0x3e, 0x16, 0x1a, 0x60, 0x22, 0x82, 0x7f, 0xba,
-0xa4, 0x43, 0xa0, 0xd0, 0xac, 0x1b, 0xd5, 0x6b, 0x64, 0xb5, 0x14, 0x93, 0x31, 0x9e, 0x53,
-0x50, 0xd0, 0x57, 0x66, 0xee, 0x5a, 0x4f, 0xfb, 0x03, 0x2a, 0x69, 0x58, 0x76, 0xf1, 0x83,
-0xf7, 0x4e, 0xba, 0x8c, 0x42, 0x06, 0x60, 0x5d, 0x6d, 0xce, 0x60, 0x88, 0xae, 0xa4, 0xc3,
-0xf1, 0x03, 0xa5, 0x4b, 0x98, 0xa1, 0xff, 0x67, 0xe1, 0xac, 0xa2, 0xb8, 0x62, 0xd7, 0x6f,
-0xa0, 0x31, 0xb4, 0xd2, 0x77, 0xaf, 0x21, 0x10, 0x06, 0xc6, 0x9a, 0xff, 0x1d, 0x09, 0x17,
-0x0e, 0x5f, 0xf1, 0xaa, 0x54, 0x34, 0x4b, 0x45, 0x8a, 0x87, 0x63, 0xa6, 0xdc, 0xf9, 0x24,
-0x30, 0x67, 0xc6, 0xb2, 0xd6, 0x61, 0x33, 0x69, 0xee, 0x50, 0x61, 0x57, 0x28, 0xe7, 0x7e,
-0xee, 0xec, 0x3a, 0x5a, 0x73, 0x4e, 0xa8, 0x8d, 0xe4, 0x18, 0xea, 0xec, 0x41, 0x64, 0xc8,
-0xe2, 0xe8, 0x66, 0xb6, 0x2d, 0xb6, 0xfb, 0x6a, 0x6c, 0x16, 0xb3, 0xdd, 0x46, 0x43, 0xb9,
-0x73, 0x00, 0x6a, 0x71, 0xed, 0x4e, 0x9d, 0x25, 0x1a, 0xc3, 0x3c, 0x4a, 0x95, 0x15, 0x99,
-0x35, 0x81, 0x14, 0x02, 0xd6, 0x98, 0x9b, 0xec, 0xd8, 0x23, 0x3b, 0x84, 0x29, 0xaf, 0x0c,
-0x99, 0x83, 0xa6, 0x9a, 0x34, 0x4f, 0xfa, 0xe8, 0xd0, 0x3c, 0x4b, 0xd0, 0xfb, 0xb6, 0x68,
-0xb8, 0x9e, 0x8f, 0xcd, 0xf7, 0x60, 0x2d, 0x7a, 0x22, 0xe5, 0x7d, 0xab, 0x65, 0x1b, 0x95,
-0xa7, 0xa8, 0x7f, 0xb6, 0x77, 0x47, 0x7b, 0x5f, 0x8b, 0x12, 0x72, 0xd0, 0xd4, 0x91, 0xef,
-0xde, 0x19, 0x50, 0x3c, 0xa7, 0x8b, 0xc4, 0xa9, 0xb3, 0x23, 0xcb, 0x76, 0xe6, 0x81, 0xf0,
-0xc1, 0x04, 0x8f, 0xa3, 0xb8, 0x54, 0x5b, 0x97, 0xac, 0x19, 0xff, 0x3f, 0x55, 0x27, 0x2f,
-0xe0, 0x1d, 0x42, 0x9b, 0x57, 0xfc, 0x4b, 0x4e, 0x0f, 0xce, 0x98, 0xa9, 0x43, 0x57, 0x03,
-0xbd, 0xe7, 0xc8, 0x94, 0xdf, 0x6e, 0x36, 0x73, 0x32, 0xb4, 0xef, 0x2e, 0x85, 0x7a, 0x6e,
-0xfc, 0x6c, 0x18, 0x82, 0x75, 0x35, 0x90, 0x07, 0xf3, 0xe4, 0x9f, 0x3e, 0xdc, 0x68, 0xf3,
-0xb5, 0xf3, 0x19, 0x80, 0x92, 0x06, 0x99, 0xa2, 0xe8, 0x6f, 0xff, 0x2e, 0x7f, 0xae, 0x42,
-0xa4, 0x5f, 0xfb, 0xd4, 0x0e, 0x81, 0x2b, 0xc3, 0x04, 0xff, 0x2b, 0xb3, 0x74, 0x4e, 0x36,
-0x5b, 0x9c, 0x15, 0x00, 0xc6, 0x47, 0x2b, 0xe8, 0x8b, 0x3d, 0xf1, 0x9c, 0x03, 0x9a, 0x58,
-0x7f, 0x9b, 0x9c, 0xbf, 0x85, 0x49, 0x79, 0x35, 0x2e, 0x56, 0x7b, 0x41, 0x14, 0x39, 0x47,
-0x83, 0x26, 0xaa, 0x07, 0x89, 0x98, 0x11, 0x1b, 0x86, 0xe7, 0x73, 0x7a, 0xd8, 0x7d, 0x78,
-0x61, 0x53, 0xe9, 0x79, 0xf5, 0x36, 0x8d, 0x44, 0x92, 0x84, 0xf9, 0x13, 0x50, 0x58, 0x3b,
-0xa4, 0x6a, 0x36, 0x65, 0x49, 0x8e, 0x3c, 0x0e, 0xf1, 0x6f, 0xd2, 0x84, 0xc4, 0x7e, 0x8e,
-0x3f, 0x39, 0xae, 0x7c, 0x84, 0xf1, 0x63, 0x37, 0x8e, 0x3c, 0xcc, 0x3e, 0x44, 0x81, 0x45,
-0xf1, 0x4b, 0xb9, 0xed, 0x6b, 0x36, 0x5d, 0xbb, 0x20, 0x60, 0x1a, 0x0f, 0xa3, 0xaa, 0x55,
-0x77, 0x3a, 0xa9, 0xae, 0x37, 0x4d, 0xba, 0xb8, 0x86, 0x6b, 0xbc, 0x08, 0x50, 0xf6, 0xcc,
-0xa4, 0xbd, 0x1d, 0x40, 0x72, 0xa5, 0x86, 0xfa, 0xe2, 0x10, 0xae, 0x3d, 0x58, 0x4b, 0x97,
-0xf3, 0x43, 0x74, 0xa9, 0x9e, 0xeb, 0x21, 0xb7, 0x01, 0xa4, 0x86, 0x93, 0x97, 0xee, 0x2f,
-0x4f, 0x3b, 0x86, 0xa1, 0x41, 0x6f, 0x41, 0x26, 0x90, 0x78, 0x5c, 0x7f, 0x30, 0x38, 0x4b,
-0x3f, 0xaa, 0xec, 0xed, 0x5c, 0x6f, 0x0e, 0xad, 0x43, 0x87, 0xfd, 0x93, 0x35, 0xe6, 0x01,
-0xef, 0x41, 0x26, 0x90, 0x99, 0x9e, 0xfb, 0x19, 0x5b, 0xad, 0xd2, 0x91, 0x8a, 0xe0, 0x46,
-0xaf, 0x65, 0xfa, 0x4f, 0x84, 0xc1, 0xa1, 0x2d, 0xcf, 0x45, 0x8b, 0xd3, 0x85, 0x50, 0x55,
-0x7c, 0xf9, 0x67, 0x88, 0xd4, 0x4e, 0xe9, 0xd7, 0x6b, 0x61, 0x54, 0xa1, 0xa4, 0xa6, 0xa2,
-0xc2, 0xbf, 0x30, 0x9c, 0x40, 0x9f, 0x5f, 0xd7, 0x69, 0x2b, 0x24, 0x82, 0x5e, 0xd9, 0xd6,
-0xa7, 0x12, 0x54, 0x1a, 0xf7, 0x55, 0x9f, 0x76, 0x50, 0xa9, 0x95, 0x84, 0xe6, 0x6b, 0x6d,
-0xb5, 0x96, 0x54, 0xd6, 0xcd, 0xb3, 0xa1, 0x9b, 0x46, 0xa7, 0x94, 0x4d, 0xc4, 0x94, 0xb4,
-0x98, 0xe3, 0xe1, 0xe2, 0x34, 0xd5, 0x33, 0x16, 0x07, 0x54, 0xcd, 0xb7, 0x77, 0x53, 0xdb,
-0x4f, 0x4d, 0x46, 0x9d, 0xe9, 0xd4, 0x9c, 0x8a, 0x36, 0xb6, 0xb8, 0x38, 0x26, 0x6c, 0x0e,
-0xff, 0x9c, 0x1b, 0x43, 0x8b, 0x80, 0xcc, 0xb9, 0x3d, 0xda, 0xc7, 0xf1, 0x8a, 0xf2, 0x6d,
-0xb8, 0xd7, 0x74, 0x2f, 0x7e, 0x1e, 0xb7, 0xd3, 0x4a, 0xb4, 0xac, 0xfc, 0x79, 0x48, 0x6c,
-0xbc, 0x96, 0xb6, 0x94, 0x46, 0x57, 0x2d, 0xb0, 0xa3, 0xfc, 0x1e, 0xb9, 0x52, 0x60, 0x85,
-0x2d, 0x41, 0xd0, 0x43, 0x01, 0x1e, 0x1c, 0xd5, 0x7d, 0xfc, 0xf3, 0x96, 0x0d, 0xc7, 0xcb,
-0x2a, 0x29, 0x9a, 0x93, 0xdd, 0x88, 0x2d, 0x37, 0x5d, 0xaa, 0xfb, 0x49, 0x68, 0xa0, 0x9c,
-0x50, 0x86, 0x7f, 0x68, 0x56, 0x57, 0xf9, 0x79, 0x18, 0x39, 0xd4, 0xe0, 0x01, 0x84, 0x33,
-0x61, 0xca, 0xa5, 0xd2, 0xd6, 0xe4, 0xc9, 0x8a, 0x4a, 0x23, 0x44, 0x4e, 0xbc, 0xf0, 0xdc,
-0x24, 0xa1, 0xa0, 0xc4, 0xe2, 0x07, 0x3c, 0x10, 0xc4, 0xb5, 0x25, 0x4b, 0x65, 0x63, 0xf4,
-0x80, 0xe7, 0xcf, 0x61, 0xb1, 0x71, 0x82, 0x21, 0x87, 0x2c, 0xf5, 0x91, 0x00, 0x32, 0x0c,
-0xec, 0xa9, 0xb5, 0x9a, 0x74, 0x85, 0xe3, 0x36, 0x8f, 0x76, 0x4f, 0x9c, 0x6d, 0xce, 0xbc,
-0xad, 0x0a, 0x4b, 0xed, 0x76, 0x04, 0xcb, 0xc3, 0xb9, 0x33, 0x9e, 0x01, 0x93, 0x96, 0x69,
-0x7d, 0xc5, 0xa2, 0x45, 0x79, 0x9b, 0x04, 0x5c, 0x84, 0x09, 0xed, 0x88, 0x43, 0xc7, 0xab,
-0x93, 0x14, 0x26, 0xa1, 0x40, 0xb5, 0xce, 0x4e, 0xbf, 0x2a, 0x42, 0x85, 0x3e, 0x2c, 0x3b,
-0x54, 0xe8, 0x12, 0x1f, 0x0e, 0x97, 0x59, 0xb2, 0x27, 0x89, 0xfa, 0xf2, 0xdf, 0x8e, 0x68,
-0x59, 0xdc, 0x06, 0xbc, 0xb6, 0x85, 0x0d, 0x06, 0x22, 0xec, 0xb1, 0xcb, 0xe5, 0x04, 0xe6,
-0x3d, 0xb3, 0xb0, 0x41, 0x73, 0x08, 0x3f, 0x3c, 0x58, 0x86, 0x63, 0xeb, 0x50, 0xee, 0x1d,
-0x2c, 0x37, 0x74, 0xa9, 0xd3, 0x18, 0xa3, 0x47, 0x6e, 0x93, 0x54, 0xad, 0x0a, 0x5d, 0xb8,
-0x2a, 0x55, 0x5d, 0x78, 0xf6, 0xee, 0xbe, 0x8e, 0x3c, 0x76, 0x69, 0xb9, 0x40, 0xc2, 0x34,
-0xec, 0x2a, 0xb9, 0xed, 0x7e, 0x20, 0xe4, 0x8d, 0x00, 0x38, 0xc7, 0xe6, 0x8f, 0x44, 0xa8,
-0x86, 0xce, 0xeb, 0x2a, 0xe9, 0x90, 0xf1, 0x4c, 0xdf, 0x32, 0xfb, 0x73, 0x1b, 0x6d, 0x92,
-0x1e, 0x95, 0xfe, 0xb4, 0xdb, 0x65, 0xdf, 0x4d, 0x23, 0x54, 0x89, 0x48, 0xbf, 0x4a, 0x2e,
-0x70, 0xd6, 0xd7, 0x62, 0xb4, 0x33, 0x29, 0xb1, 0x3a, 0x33, 0x4c, 0x23, 0x6d, 0xa6, 0x76,
-0xa5, 0x21, 0x63, 0x48, 0xe6, 0x90, 0x5d, 0xed, 0x90, 0x95, 0x0b, 0x7a, 0x84, 0xbe, 0xb8,
-0x0d, 0x5e, 0x63, 0x0c, 0x62, 0x26, 0x4c, 0x14, 0x5a, 0xb3, 0xac, 0x23, 0xa4, 0x74, 0xa7,
-0x6f, 0x33, 0x30, 0x05, 0x60, 0x01, 0x42, 0xa0, 0x28, 0xb7, 0xee, 0x19, 0x38, 0xf1, 0x64,
-0x80, 0x82, 0x43, 0xe1, 0x41, 0x27, 0x1f, 0x1f, 0x90, 0x54, 0x7a, 0xd5, 0x23, 0x2e, 0xd1,
-0x3d, 0xcb, 0x28, 0xba, 0x58, 0x7f, 0xdc, 0x7c, 0x91, 0x24, 0xe9, 0x28, 0x51, 0x83, 0x6e,
-0xc5, 0x56, 0x21, 0x42, 0xed, 0xa0, 0x56, 0x22, 0xa1, 0x40, 0x80, 0x6b, 0xa8, 0xf7, 0x94,
-0xca, 0x13, 0x6b, 0x0c, 0x39, 0xd9, 0xfd, 0xe9, 0xf3, 0x6f, 0xa6, 0x9e, 0xfc, 0x70, 0x8a,
-0xb3, 0xbc, 0x59, 0x3c, 0x1e, 0x1d, 0x6c, 0xf9, 0x7c, 0xaf, 0xf9, 0x88, 0x71, 0x95, 0xeb,
-0x57, 0x00, 0xbd, 0x9f, 0x8c, 0x4f, 0xe1, 0x24, 0x83, 0xc5, 0x22, 0xea, 0xfd, 0xd3, 0x0c,
-0xe2, 0x17, 0x18, 0x7c, 0x6a, 0x4c, 0xde, 0x77, 0xb4, 0x53, 0x9b, 0x4c, 0x81, 0xcd, 0x23,
-0x60, 0xaa, 0x0e, 0x25, 0x73, 0x9c, 0x02, 0x79, 0x32, 0x30, 0xdf, 0x74, 0xdf, 0x75, 0x19,
-0xf4, 0xa5, 0x14, 0x5c, 0xf7, 0x7a, 0xa8, 0xa5, 0x91, 0x84, 0x7c, 0x60, 0x03, 0x06, 0x3b,
-0xcd, 0x50, 0xb6, 0x27, 0x9c, 0xfe, 0xb1, 0xdd, 0xcc, 0xd3, 0xb0, 0x59, 0x24, 0xb2, 0xca,
-0xe2, 0x1c, 0x81, 0x22, 0x9d, 0x07, 0x8f, 0x8e, 0xb9, 0xbe, 0x4e, 0xfa, 0xfc, 0x39, 0x65,
-0xba, 0xbf, 0x9d, 0x12, 0x37, 0x5e, 0x97, 0x7e, 0xf3, 0x89, 0xf5, 0x5d, 0xf5, 0xe3, 0x09,
-0x8c, 0x62, 0xb5, 0x20, 0x9d, 0x0c, 0x53, 0x8a, 0x68, 0x1b, 0xd2, 0x8f, 0x75, 0x17, 0x5d,
-0xd4, 0xe5, 0xda, 0x75, 0x62, 0x19, 0x14, 0x6a, 0x26, 0x2d, 0xeb, 0xf8, 0xaf, 0x37, 0xf0,
-0x6c, 0xa4, 0x55, 0xb1, 0xbc, 0xe2, 0x33, 0xc0, 0x9a, 0xca, 0xb0, 0x11, 0x49, 0x4f, 0x68,
-0x9b, 0x3b, 0x6b, 0x3c, 0xcc, 0x13, 0xf6, 0xc7, 0x85, 0x61, 0x68, 0x42, 0xae, 0xbb, 0xdd,
-0xcd, 0x45, 0x16, 0x29, 0x1d, 0xea, 0xdb, 0xc8, 0x03, 0x94, 0x3c, 0xee, 0x4f, 0x82, 0x11,
-0xc3, 0xec, 0x28, 0xbd, 0x97, 0x05, 0x99, 0xde, 0xd7, 0xbb, 0x5e, 0x22, 0x1f, 0xd4, 0xeb,
-0x64, 0xd9, 0x92, 0xd9, 0x85, 0xb7, 0x6a, 0x05, 0x6a, 0xe4, 0x24, 0x41, 0xf1, 0xcd, 0xf0,
-0xd8, 0x3f, 0xf8, 0x9e, 0x0e, 0xcd, 0x0b, 0x7a, 0x70, 0x6b, 0x5a, 0x75, 0x0a, 0x6a, 0x33,
-0x88, 0xec, 0x17, 0x75, 0x08, 0x70, 0x10, 0x2f, 0x24, 0xcf, 0xc4, 0xe9, 0x42, 0x00, 0x61,
-0x94, 0xca, 0x1f, 0x3a, 0x76, 0x06, 0xfa, 0xd2, 0x48, 0x81, 0xf0, 0x77, 0x60, 0x03, 0x45,
-0xd9, 0x61, 0xf4, 0xa4, 0x6f, 0x3d, 0xd9, 0x30, 0xc3, 0x04, 0x6b, 0x54, 0x2a, 0xb7, 0xec,
-0x3b, 0xf4, 0x4b, 0xf5, 0x68, 0x52, 0x26, 0xce, 0xff, 0x5d, 0x19, 0x91, 0xa0, 0xa3, 0xa5,
-0xa9, 0xb1, 0xe0, 0x23, 0xc4, 0x0a, 0x77, 0x4d, 0xf9, 0x51, 0x20, 0xa3, 0xa5, 0xa9, 0xb1,
-0xc1, 0x00, 0x82, 0x86, 0x8e, 0x7f, 0x5d, 0x19, 0x91, 0xa0, 0xa3, 0xc4, 0xeb, 0x54, 0x0b,
-0x75, 0x68, 0x52, 0x07, 0x8c, 0x9a, 0x97, 0x8d, 0x79, 0x70, 0x62, 0x46, 0xef, 0x5c, 0x1b,
-0x95, 0x89, 0x71, 0x41, 0xe1, 0x21, 0xa1, 0xa1, 0xa1, 0xc0, 0x02, 0x67, 0x4c, 0x1a, 0xb6,
-0xcf, 0xfd, 0x78, 0x53, 0x24, 0xab, 0xb5, 0xc9, 0xf1, 0x60, 0x23, 0xa5, 0xc8, 0x12, 0x87,
-0x6d, 0x58, 0x13, 0x85, 0x88, 0x92, 0x87, 0x6d, 0x58, 0x32, 0xc7, 0x0c, 0x9a, 0x97, 0xac,
-0xda, 0x36, 0xee, 0x5e, 0x3e, 0xdf, 0x1d, 0xb8, 0xf2, 0x66, 0x2f, 0xbd, 0xf8, 0x72, 0x47,
-0xed, 0x58, 0x13, 0x85, 0x88, 0x92, 0x87, 0x8c, 0x7b, 0x55, 0x09, 0x90, 0xa2, 0xc6, 0xef,
-0x3d, 0xf8, 0x53, 0x24, 0xab, 0xd4, 0x2a, 0xb7, 0xec, 0x5a, 0x36, 0xee, 0x5e, 0x3e, 0xdf,
-0x3c, 0xfa, 0x76, 0x4f, 0xfd, 0x59, 0x30, 0xe2, 0x46, 0xef, 0x3d, 0xf8, 0x53, 0x05, 0x69,
-0x31, 0xc1, 0x00, 0x82, 0x86, 0x8e, 0x7f, 0x5d, 0x19, 0xb0, 0xe2, 0x27, 0xcc, 0xfb, 0x74,
-0x4b, 0x14, 0x8b, 0x94, 0x8b, 0x75, 0x68, 0x33, 0xc5, 0x08, 0x92, 0x87, 0x8c, 0x9a, 0xb6,
-0xcf, 0x1c, 0xba, 0xd7, 0x0d, 0x98, 0xb2, 0xe6, 0x2f, 0xdc, 0x1b, 0x95, 0x89, 0x71, 0x60,
-0x23, 0xc4, 0x0a, 0x96, 0x8f, 0x9c, 0xba, 0xf6, 0x6e, 0x3f, 0xfc, 0x5b, 0x15, 0xa8, 0xd2,
-0x26, 0xaf, 0xbd, 0xf8, 0x72, 0x66, 0x2f, 0xdc, 0x1b, 0xb4, 0xcb, 0x14, 0x8b, 0x94, 0xaa,
-0xb7, 0xcd, 0xf9, 0x51, 0x01, 0x80, 0x82, 0x86, 0x6f, 0x3d, 0xd9, 0x30, 0xe2, 0x27, 0xcc,
-0xfb, 0x74, 0x4b, 0x14, 0xaa, 0xb7, 0xcd, 0xf9, 0x70, 0x43, 0x04, 0x6b, 0x35, 0xc9, 0xf1,
-0x60, 0x23, 0xa5, 0xc8, 0xf3, 0x45, 0x08, 0x92, 0x87, 0x6d, 0x58, 0x32, 0xe6, 0x2f, 0xbd,
-0xf8, 0x72, 0x66, 0x4e, 0x1e, 0xbe, 0xfe, 0x7e, 0x7e, 0x7e, 0x5f, 0x1d, 0x99, 0x91, 0xa0,
-0xa3, 0xc4, 0x0a, 0x77, 0x4d, 0x18, 0x93, 0xa4, 0xab, 0xd4, 0x0b, 0x75, 0x49, 0x10, 0xa2,
-0xc6, 0xef, 0x3d, 0xf8, 0x53, 0x24, 0xab, 0xb5, 0xe8, 0x33, 0xe4, 0x4a, 0x16, 0xae, 0xde,
-0x1f, 0xbc, 0xdb, 0x15, 0xa8, 0xb3, 0xc5, 0x08, 0x73, 0x45, 0xe9, 0x31, 0xc1, 0xe1, 0x21,
-0xa1, 0xa1, 0xa1, 0xc0, 0x02, 0x86, 0x6f, 0x5c, 0x3a, 0xd7, 0x0d, 0x98, 0x93, 0xa4, 0xca,
-0x16, 0xae, 0xde, 0x1f, 0x9d, 0x99, 0xb0, 0xe2, 0x46, 0xef, 0x3d, 0xf8, 0x72, 0x47, 0x0c,
-0x9a, 0xb6, 0xcf, 0xfd, 0x59, 0x11, 0xa0, 0xa3, 0xa5, 0xc8, 0xf3, 0x45, 0x08, 0x92, 0x87,
-0x6d, 0x39, 0xf0, 0x43, 0x04, 0x8a, 0x96, 0xae, 0xde, 0x3e, 0xdf, 0x1d, 0x99, 0x91, 0xa0,
-0xc2, 0x06, 0x6f, 0x3d, 0xf8, 0x72, 0x47, 0x0c, 0x9a, 0x97, 0x8d, 0x98, 0x93, 0x85, 0x88,
-0x73, 0x45, 0xe9, 0x31, 0xe0, 0x23, 0xa5, 0xa9, 0xd0, 0x03, 0x84, 0x8a, 0x96, 0xae, 0xde,
-0x1f, 0xbc, 0xdb, 0x15, 0xa8, 0xd2, 0x26, 0xce, 0xff, 0x5d, 0x19, 0x91, 0x81, 0x80, 0x82,
-0x67, 0x2d, 0xd8, 0x13, 0xa4, 0xab, 0xd4, 0x0b, 0x94, 0xaa, 0xb7, 0xcd, 0xf9, 0x51, 0x20,
-0xa3, 0xa5, 0xc8, 0xf3, 0x45, 0xe9, 0x50, 0x22, 0xc6, 0xef, 0x5c, 0x3a, 0xd7, 0x0d, 0x98,
-0x93, 0x85, 0x88, 0x73, 0x64, 0x4a, 0xf7, 0x4d, 0xf9, 0x51, 0x20, 0xa3, 0xc4, 0x0a, 0x96,
-0xae, 0xde, 0x3e, 0xfe, 0x7e, 0x7e, 0x7e, 0x5f, 0x3c, 0xfa, 0x76, 0x4f, 0xfd, 0x78, 0x72,
-0x66, 0x2f, 0xbd, 0xd9, 0x30, 0xc3, 0xe5, 0x48, 0x12, 0x87, 0x8c, 0x7b, 0x55, 0x28, 0xd2,
-0x07, 0x8c, 0x9a, 0x97, 0xac, 0xda, 0x17, 0x8d, 0x79, 0x51, 0x20, 0xa3, 0xc4, 0xeb, 0x54,
-0x0b, 0x94, 0x8b, 0x94, 0xaa, 0xd6, 0x2e, 0xbf, 0xfc, 0x5b, 0x15, 0xa8, 0xd2, 0x26, 0xaf,
-0xdc, 0x1b, 0xb4, 0xea, 0x37, 0xec, 0x3b, 0xf4, 0x6a, 0x37, 0xcd, 0x18, 0x93, 0x85, 0x69,
-0x31, 0xc1, 0xe1, 0x40, 0xe3, 0x25, 0xc8, 0x12, 0x87, 0x8c, 0x9a, 0xb6, 0xcf, 0xfd, 0x59,
-0x11, 0xa0, 0xc2, 0x06, 0x8e, 0x7f, 0x5d, 0x38, 0xf2, 0x47, 0x0c, 0x7b, 0x74, 0x6a, 0x37,
-0xec, 0x5a, 0x36, 0xee, 0x3f, 0xfc, 0x7a, 0x76, 0x4f, 0x1c, 0x9b, 0x95, 0x89, 0x71, 0x41,
-0x00, 0x63, 0x44, 0xeb, 0x54, 0x2a, 0xd6, 0x0f, 0x9c, 0xba, 0xd7, 0x0d, 0x98, 0x93, 0x85,
-0x69, 0x31, 0xc1, 0x00, 0x82, 0x86, 0x8e, 0x9e, 0xbe, 0xdf, 0x3c, 0xfa, 0x57, 0x2c, 0xda,
-0x36, 0xee, 0x3f, 0xfc, 0x5b, 0x15, 0x89, 0x71, 0x41, 0x00, 0x82, 0x86, 0x8e, 0x7f, 0x5d,
-0x38, 0xf2, 0x47, 0xed, 0x58, 0x13, 0xa4, 0xca, 0xf7, 0x4d, 0xf9, 0x51, 0x01, 0x80, 0x63,
-0x44, 0xeb, 0x54, 0x2a, 0xd6, 0x2e, 0xbf, 0xdd, 0x19, 0x91, 0xa0, 0xa3, 0xa5, 0xa9, 0xb1,
-0xe0, 0x42, 0x06, 0x8e, 0x7f, 0x5d, 0x19, 0x91, 0xa0, 0xa3, 0xc4, 0x0a, 0x96, 0x8f, 0x7d,
-0x78, 0x72, 0x47, 0x0c, 0x7b, 0x74, 0x6a, 0x56, 0x2e, 0xde, 0x1f, 0xbc, 0xfa, 0x57, 0x0d,
-0x79, 0x51, 0x01, 0x61, 0x21, 0xa1, 0xc0, 0xe3, 0x25, 0xa9, 0xb1, 0xc1, 0xe1, 0x40, 0x02,
-0x67, 0x4c, 0x1a, 0x97, 0x8d, 0x98, 0x93, 0xa4, 0xab, 0xd4, 0x2a, 0xd6, 0x0f, 0x9c, 0x9b,
-0xb4, 0xcb, 0x14, 0xaa, 0xb7, 0xcd, 0xf9, 0x51, 0x20, 0xa3, 0xc4, 0xeb, 0x35, 0xc9, 0xf1,
-0x60, 0x42, 0x06, 0x8e, 0x7f, 0x7c, 0x7a, 0x76, 0x6e, 0x3f, 0xfc, 0x7a, 0x76, 0x6e, 0x5e,
-0x3e, 0xfe, 0x7e, 0x5f, 0x3c, 0xdb, 0x15, 0x89, 0x71, 0x41, 0xe1, 0x21, 0xc0, 0xe3, 0x44,
-0xeb, 0x54, 0x2a, 0xb7, 0xcd, 0xf9, 0x70, 0x62, 0x27, 0xad, 0xd8, 0x32, 0xc7, 0x0c, 0x7b,
-0x74, 0x4b, 0x14, 0xaa, 0xb7, 0xec, 0x3b, 0xd5, 0x28, 0xd2, 0x07, 0x6d, 0x39, 0xd1, 0x20,
-0xc2, 0xe7, 0x4c, 0x1a, 0x97, 0x8d, 0x98, 0xb2, 0xc7, 0x0c, 0x59, 0x28, 0xf3, 0x9b };
-
-// clang-format off
diff --git a/keyboards/ploopyco/trackball/rules.mk b/keyboards/ploopyco/trackball/rules.mk
index e1eb998fe0..4ac92ebf64 100644
--- a/keyboards/ploopyco/trackball/rules.mk
+++ b/keyboards/ploopyco/trackball/rules.mk
@@ -24,6 +24,6 @@ POINTING_DEVICE_ENABLE = yes
MOUSEKEY_ENABLE = yes # Mouse keys
QUANTUM_LIB_SRC += analog.c spi_master.c
-SRC += pmw3360.c opt_encoder.c
+SRC += drivers/sensors/pmw3360.c opt_encoder.c
DEFAULT_FOLDER = ploopyco/trackball/rev1_005
diff --git a/keyboards/ploopyco/trackball/trackball.h b/keyboards/ploopyco/trackball/trackball.h
index fd2bf465a5..70f5d83b11 100644
--- a/keyboards/ploopyco/trackball/trackball.h
+++ b/keyboards/ploopyco/trackball/trackball.h
@@ -20,7 +20,7 @@
#include "quantum.h"
#include "spi_master.h"
-#include "pmw3360.h"
+#include "drivers/sensors/pmw3360.h"
#include "analog.h"
#include "opt_encoder.h"
#include "pointing_device.h"
diff --git a/keyboards/ploopyco/trackball_mini/rules.mk b/keyboards/ploopyco/trackball_mini/rules.mk
index 58fad239f4..22c5e3c062 100644
--- a/keyboards/ploopyco/trackball_mini/rules.mk
+++ b/keyboards/ploopyco/trackball_mini/rules.mk
@@ -27,6 +27,6 @@ POINTING_DEVICE_ENABLE = yes
MOUSEKEY_ENABLE = no # Mouse keys
QUANTUM_LIB_SRC += analog.c
-SRC += adns5050.c opt_encoder.c
+SRC += drivers/sensors/adns5050.c opt_encoder.c
DEFAULT_FOLDER = ploopyco/trackball_mini/rev1_001
diff --git a/keyboards/ploopyco/trackball_mini/trackball_mini.h b/keyboards/ploopyco/trackball_mini/trackball_mini.h
index a12d12a0c8..7bcb02a940 100644
--- a/keyboards/ploopyco/trackball_mini/trackball_mini.h
+++ b/keyboards/ploopyco/trackball_mini/trackball_mini.h
@@ -20,7 +20,7 @@
#pragma once
#include "quantum.h"
-#include "adns5050.h"
+#include "drivers/sensors/adns5050.h"
#include "analog.h"
#include "opt_encoder.h"
#include "pointing_device.h"
diff --git a/keyboards/ploopyco/trackball_nano/rules.mk b/keyboards/ploopyco/trackball_nano/rules.mk
index 0286194b9f..f47c316153 100644
--- a/keyboards/ploopyco/trackball_nano/rules.mk
+++ b/keyboards/ploopyco/trackball_nano/rules.mk
@@ -27,6 +27,6 @@ POINTING_DEVICE_ENABLE = yes
MOUSEKEY_ENABLE = no # Mouse keys
QUANTUM_LIB_SRC += analog.c
-SRC += adns5050.c opt_encoder.c
+SRC += drivers/sensors/adns5050.c opt_encoder.c
DEFAULT_FOLDER = ploopyco/trackball_nano/rev1_001
diff --git a/keyboards/ploopyco/trackball_nano/trackball_nano.h b/keyboards/ploopyco/trackball_nano/trackball_nano.h
index 5692383b1e..6c8ecace7d 100644
--- a/keyboards/ploopyco/trackball_nano/trackball_nano.h
+++ b/keyboards/ploopyco/trackball_nano/trackball_nano.h
@@ -20,7 +20,7 @@
#pragma once
#include "quantum.h"
-#include "adns5050.h"
+#include "drivers/sensors/adns5050.h"
#include "analog.h"
#include "opt_encoder.h"
#include "pointing_device.h"
diff --git a/keyboards/preonic/keymaps/AlexDaigre/keymap.c b/keyboards/preonic/keymaps/AlexDaigre/keymap.c
index 3ea61a26ee..ef4707f64b 100644
--- a/keyboards/preonic/keymaps/AlexDaigre/keymap.c
+++ b/keyboards/preonic/keymaps/AlexDaigre/keymap.c
@@ -276,7 +276,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
return true;
}
-void dip_switch_update_user(uint8_t index, bool active) {
+bool dip_switch_update_user(uint8_t index, bool active) {
switch (index) {
case 0:
if (active) {
@@ -292,6 +292,7 @@ void dip_switch_update_user(uint8_t index, bool active) {
muse_mode = false;
}
}
+ return true;
}
diff --git a/keyboards/preonic/keymaps/default/keymap.c b/keyboards/preonic/keymaps/default/keymap.c
index b70aa31c14..3a82f7151b 100644
--- a/keyboards/preonic/keymaps/default/keymap.c
+++ b/keyboards/preonic/keymaps/default/keymap.c
@@ -263,7 +263,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
return true;
}
-void dip_switch_update_user(uint8_t index, bool active) {
+bool dip_switch_update_user(uint8_t index, bool active) {
switch (index) {
case 0:
if (active) {
@@ -279,6 +279,7 @@ void dip_switch_update_user(uint8_t index, bool active) {
muse_mode = false;
}
}
+ return true;
}
diff --git a/keyboards/preonic/keymaps/drasbeck/keymap.c b/keyboards/preonic/keymaps/drasbeck/keymap.c
index 909e86a97d..ae4804ce3f 100644
--- a/keyboards/preonic/keymaps/drasbeck/keymap.c
+++ b/keyboards/preonic/keymaps/drasbeck/keymap.c
@@ -190,7 +190,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
return true;
}
-void dip_switch_update_user(uint8_t index, bool active) {
+bool dip_switch_update_user(uint8_t index, bool active) {
switch (index) {
case 0:
if (active) {
@@ -206,6 +206,7 @@ void dip_switch_update_user(uint8_t index, bool active) {
muse_mode = false;
}
}
+ return true;
}
diff --git a/keyboards/preonic/keymaps/elisiano/keymap.c b/keyboards/preonic/keymaps/elisiano/keymap.c
index 8d3898922f..d885d1f028 100644
--- a/keyboards/preonic/keymaps/elisiano/keymap.c
+++ b/keyboards/preonic/keymaps/elisiano/keymap.c
@@ -257,7 +257,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
return true;
}
-void dip_switch_update_user(uint8_t index, bool active) {
+bool dip_switch_update_user(uint8_t index, bool active) {
switch (index) {
case 0:
if (active) {
@@ -273,6 +273,7 @@ void dip_switch_update_user(uint8_t index, bool active) {
muse_mode = false;
}
}
+ return true;
}
diff --git a/keyboards/preonic/keymaps/keelhauler/keymap.c b/keyboards/preonic/keymaps/keelhauler/keymap.c
index c7e0766920..dc0cffe094 100644
--- a/keyboards/preonic/keymaps/keelhauler/keymap.c
+++ b/keyboards/preonic/keymaps/keelhauler/keymap.c
@@ -264,7 +264,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
return true;
}
-void dip_switch_update_user(uint8_t index, bool active) {
+bool dip_switch_update_user(uint8_t index, bool active) {
switch (index) {
case 0:
if (active) {
@@ -280,6 +280,7 @@ void dip_switch_update_user(uint8_t index, bool active) {
muse_mode = false;
}
}
+ return true;
}
diff --git a/keyboards/preonic/keymaps/kjwon15/keymap.c b/keyboards/preonic/keymaps/kjwon15/keymap.c
index 6f1d5f30af..2f25cdfa85 100644
--- a/keyboards/preonic/keymaps/kjwon15/keymap.c
+++ b/keyboards/preonic/keymaps/kjwon15/keymap.c
@@ -327,7 +327,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
return true;
}
-void dip_switch_update_user(uint8_t index, bool active) {
+bool dip_switch_update_user(uint8_t index, bool active) {
switch (index) {
case 0:
if (active) {
@@ -343,6 +343,7 @@ void dip_switch_update_user(uint8_t index, bool active) {
muse_mode = false;
}
}
+ return true;
}
void matrix_scan_user(void) {
diff --git a/keyboards/preonic/keymaps/laurentlaurent/keymap.c b/keyboards/preonic/keymaps/laurentlaurent/keymap.c
index b1a73035b3..62943a420c 100644
--- a/keyboards/preonic/keymaps/laurentlaurent/keymap.c
+++ b/keyboards/preonic/keymaps/laurentlaurent/keymap.c
@@ -554,7 +554,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
return true;
}
-void dip_switch_update_user(uint8_t index, bool active) {
+bool dip_switch_update_user(uint8_t index, bool active) {
switch (index) {
case 0:
if (active) {
@@ -570,6 +570,7 @@ void dip_switch_update_user(uint8_t index, bool active) {
muse_mode = false;
}
}
+ return true;
}
void matrix_scan_user(void) {
diff --git a/keyboards/preonic/keymaps/mguterl/keymap.c b/keyboards/preonic/keymaps/mguterl/keymap.c
index 4e8738be2d..87a9cd32b3 100644
--- a/keyboards/preonic/keymaps/mguterl/keymap.c
+++ b/keyboards/preonic/keymaps/mguterl/keymap.c
@@ -273,7 +273,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
return true;
}
-void dip_switch_update_user(uint8_t index, bool active) {
+bool dip_switch_update_user(uint8_t index, bool active) {
switch (index) {
case 0:
if (active) {
@@ -289,6 +289,7 @@ void dip_switch_update_user(uint8_t index, bool active) {
muse_mode = false;
}
}
+ return true;
}
diff --git a/keyboards/preonic/keymaps/mverteuil/keymap.c b/keyboards/preonic/keymaps/mverteuil/keymap.c
index 60677701c7..ef01851690 100644
--- a/keyboards/preonic/keymaps/mverteuil/keymap.c
+++ b/keyboards/preonic/keymaps/mverteuil/keymap.c
@@ -459,7 +459,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
return true;
}
-void dip_switch_update_user(uint8_t index, bool active) {
+bool dip_switch_update_user(uint8_t index, bool active) {
switch (index) {
case 0:
if (active) {
@@ -475,6 +475,7 @@ void dip_switch_update_user(uint8_t index, bool active) {
muse_mode = false;
}
}
+ return true;
}
void matrix_scan_user(void) {
diff --git a/keyboards/preonic/keymaps/mverteuil_2x2u/keymap.c b/keyboards/preonic/keymaps/mverteuil_2x2u/keymap.c
index 290ea16387..4b28058540 100644
--- a/keyboards/preonic/keymaps/mverteuil_2x2u/keymap.c
+++ b/keyboards/preonic/keymaps/mverteuil_2x2u/keymap.c
@@ -395,7 +395,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
return true;
}
-void dip_switch_update_user(uint8_t index, bool active) {
+bool dip_switch_update_user(uint8_t index, bool active) {
switch (index) {
case 0:
if (active) {
@@ -411,4 +411,5 @@ void dip_switch_update_user(uint8_t index, bool active) {
muse_mode = false;
}
}
+ return true;
}
diff --git a/keyboards/preonic/keymaps/pezhore/keymap.c b/keyboards/preonic/keymaps/pezhore/keymap.c
index 71d9306dc5..c41fb4500f 100644
--- a/keyboards/preonic/keymaps/pezhore/keymap.c
+++ b/keyboards/preonic/keymaps/pezhore/keymap.c
@@ -257,7 +257,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
return true;
}
-void dip_switch_update_user(uint8_t index, bool active) {
+bool dip_switch_update_user(uint8_t index, bool active) {
switch (index) {
case 0:
if (active) {
@@ -273,6 +273,7 @@ void dip_switch_update_user(uint8_t index, bool active) {
muse_mode = false;
}
}
+ return true;
}
diff --git a/keyboards/preonic/keymaps/pitty/keymap.c b/keyboards/preonic/keymaps/pitty/keymap.c
index 10957d8ac2..25c648eea6 100644
--- a/keyboards/preonic/keymaps/pitty/keymap.c
+++ b/keyboards/preonic/keymaps/pitty/keymap.c
@@ -50,9 +50,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------------------'
*/
[_QWERTY] = LAYOUT_preonic_grid( \
- HU_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, HU_OE, HU_UE, \
- KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, HU_Z, KC_U, KC_I, KC_O, KC_P, HU_OEE, \
- KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, HU_EE, HU_AA, \
+ HU_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, HU_ODIA, HU_UDIA, \
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, HU_Z, KC_U, KC_I, KC_O, KC_P, HU_ODAC, \
+ KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, HU_EACU, HU_AACU, \
MT(MOD_LSFT, KC_NUBS), HU_Y, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, HU_COMM, HU_DOT, HU_MINS, KC_RSFT, \
KC_LCTL, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, KC_ENT, KC_BSPC, KC_RALT, RAISE, KC_INS, KC_DEL \
),
@@ -72,9 +72,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------------------'
*/
[_GAME] = LAYOUT_preonic_grid( \
- HU_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, HU_OE, HU_UE, \
- KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, HU_Z, KC_U, KC_I, KC_O, KC_P, HU_OEE, \
- KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, HU_EE, HU_AA, \
+ HU_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, HU_ODIA, HU_UDIA, \
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, HU_Z, KC_U, KC_I, KC_O, KC_P, HU_ODAC, \
+ KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, HU_EACU, HU_AACU, \
KC_LSFT, HU_Y, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, HU_COMM, HU_DOT, HU_MINS, KC_RSFT, \
KC_LCTL, KC_LGUI, KC_LALT, RAISE, KC_SPC, KC_SPC, KC_ENT, KC_BSPC, KC_RALT, LOWER, KC_INS, KC_DEL \
),
diff --git a/keyboards/preonic/keymaps/senseored/keymap.c b/keyboards/preonic/keymaps/senseored/keymap.c
index c78528d8c3..cf354eed12 100644
--- a/keyboards/preonic/keymaps/senseored/keymap.c
+++ b/keyboards/preonic/keymaps/senseored/keymap.c
@@ -345,7 +345,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
return true;
}
-void dip_switch_update_user(uint8_t index, bool active) {
+bool dip_switch_update_user(uint8_t index, bool active) {
switch (index) {
case 0:
if (active) {
@@ -361,6 +361,7 @@ void dip_switch_update_user(uint8_t index, bool active) {
muse_mode = false;
}
}
+ return true;
}
diff --git a/keyboards/preonic/keymaps/via/keymap.c b/keyboards/preonic/keymaps/via/keymap.c
index 5df57fd3d2..fe62441049 100644
--- a/keyboards/preonic/keymaps/via/keymap.c
+++ b/keyboards/preonic/keymaps/via/keymap.c
@@ -147,7 +147,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
return true;
}
-void dip_switch_update_user(uint8_t index, bool active) {
+bool dip_switch_update_user(uint8_t index, bool active) {
switch (index) {
case 0:
if (active) {
@@ -163,6 +163,7 @@ void dip_switch_update_user(uint8_t index, bool active) {
muse_mode = false;
}
}
+ return true;
}
diff --git a/keyboards/preonic/rev1/rules.mk b/keyboards/preonic/rev1/rules.mk
index dea2bbbca9..d6c61f2868 100644
--- a/keyboards/preonic/rev1/rules.mk
+++ b/keyboards/preonic/rev1/rules.mk
@@ -27,7 +27,6 @@ AUDIO_ENABLE = yes # Audio output
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
-API_SYSEX_ENABLE = no
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
diff --git a/keyboards/preonic/rev2/rules.mk b/keyboards/preonic/rev2/rules.mk
index 1b72a622a2..677a0700b8 100644
--- a/keyboards/preonic/rev2/rules.mk
+++ b/keyboards/preonic/rev2/rules.mk
@@ -27,7 +27,6 @@ AUDIO_ENABLE = yes # Audio output
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
-API_SYSEX_ENABLE = no
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
diff --git a/keyboards/preonic/rev3/rev3.c b/keyboards/preonic/rev3/rev3.c
index ec8a56108e..0410d9a298 100644
--- a/keyboards/preonic/rev3/rev3.c
+++ b/keyboards/preonic/rev3/rev3.c
@@ -53,11 +53,11 @@ void matrix_scan_kb(void) {
#ifdef DIP_SWITCH_ENABLE
__attribute__((weak))
-void dip_update(uint8_t index, bool active) {}
+bool dip_update(uint8_t index, bool active) { return true;}
__attribute__((weak))
-void dip_switch_update_user(uint8_t index, bool active) {
- dip_update(index, active);
+bool dip_switch_update_user(uint8_t index, bool active) {
+ return dip_update(index, active);
}
#endif
diff --git a/keyboards/preonic/rev3/rules.mk b/keyboards/preonic/rev3/rules.mk
index 034ace02ad..3c330d02dd 100644
--- a/keyboards/preonic/rev3/rules.mk
+++ b/keyboards/preonic/rev3/rules.mk
@@ -22,7 +22,6 @@ UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
WS2812_DRIVER = pwm
-API_SYSEX_ENABLE = no
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
diff --git a/keyboards/primekb/prime_m/rules.mk b/keyboards/primekb/prime_m/rules.mk
index a2e427b671..6988d7e996 100644
--- a/keyboards/primekb/prime_m/rules.mk
+++ b/keyboards/primekb/prime_m/rules.mk
@@ -30,4 +30,4 @@ UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
AUDIO_ENABLE = no # Audio output on port C6
-LAYOUTS = ortho_5x6 numpad_5x6
+LAYOUTS = numpad_5x6
diff --git a/keyboards/primekb/prime_o/keymaps/spacebarracecar/keymap.c b/keyboards/primekb/prime_o/keymaps/spacebarracecar/keymap.c
index 9014fbc5b6..dbcc8c31a3 100644
--- a/keyboards/primekb/prime_o/keymaps/spacebarracecar/keymap.c
+++ b/keyboards/primekb/prime_o/keymaps/spacebarracecar/keymap.c
@@ -51,7 +51,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_LOWER] = LAYOUT(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, DE_TILD, DE_EXLM, DE_DQOT, DE_HASH, DE_DLR, DE_PERC, CU_CIRC, DE_AMPR, DE_ASTR, DE_LPRN, DE_RPRN, _______,
+ _______, _______, _______, _______, DE_TILD, DE_EXLM, DE_DQUO, DE_HASH, DE_DLR, DE_PERC, CU_CIRC, DE_AMPR, DE_ASTR, DE_LPRN, DE_RPRN, _______,
_______, _______, _______, _______, _______, DE_AT, CTRLX, CTRLC, CTRLV, XXXXXXX, XXXXXXX, DE_UNDS, DE_PLUS, DE_LCBR, DE_RCBR, DE_PIPE,
_______, _______, _______, _______, _______, DE_EURO, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DE_MINS, CU_EQL, CU_LBRC, CU_RBRC, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
diff --git a/keyboards/ramonimbao/wete/keymaps/jis/keymap.c b/keyboards/ramonimbao/wete/keymaps/jis/keymap.c
index 14dfb1ca6d..8d65932219 100644
--- a/keyboards/ramonimbao/wete/keymaps/jis/keymap.c
+++ b/keyboards/ramonimbao/wete/keymaps/jis/keymap.c
@@ -22,7 +22,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_jis_rhnp(
KC_INSERT, KC_PSCREEN, KC_PAUSE, KC_SLCK, 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_DEL,
- KC_NUMLOCK, KC_KP_SLASH, KC_KP_ASTERISK, KC_KP_MINUS, JP_ZHTG, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, JP_MINS, JP_CIRC, JP_YEN, KC_BSPC, KC_HOME,
+ KC_NUMLOCK, KC_KP_SLASH, KC_KP_ASTERISK, KC_KP_MINUS, JP_ZKHK, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, JP_MINS, JP_CIRC, JP_YEN, KC_BSPC, KC_HOME,
KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_PLUS, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JP_AT, JP_LBRC, KC_ENTER, KC_END,
KC_KP_4, KC_KP_5, KC_KP_6, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, JP_SCLN, JP_COLN, JP_RBRC, KC_PGUP,
KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_ENTER, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, JP_COMM, JP_DOT, JP_SLSH, JP_BSLS, KC_RSFT, KC_PGDN,
diff --git a/keyboards/redox/keymaps/german/keymap.c b/keyboards/redox/keymaps/german/keymap.c
index f94cd164a8..06928b2304 100644
--- a/keyboards/redox/keymaps/german/keymap.c
+++ b/keyboards/redox/keymaps/german/keymap.c
@@ -40,9 +40,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//┌────────┬────────┬────────┬────────┬────────┬────────┠┌────────┬────────┬────────┬────────┬────────┬────────â”
KC_NAGR ,DE_1 ,DE_2 ,DE_3 ,DE_4 ,DE_5 , DE_6 ,DE_7 ,DE_8 ,DE_9 ,DE_0 ,KC_NAMI ,
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┠┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
- KC_TAB ,DE_Q ,DE_W ,DE_E ,DE_R ,DE_T ,SYM_L , SYM_L ,DE_Z ,DE_U ,DE_I ,DE_O ,DE_P ,DE_UE ,
+ KC_TAB ,DE_Q ,DE_W ,DE_E ,DE_R ,DE_T ,SYM_L , SYM_L ,DE_Z ,DE_U ,DE_I ,DE_O ,DE_P ,DE_UDIA ,
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤
- KC_ESC ,DE_A ,DE_S ,DE_D ,DE_F ,DE_G ,DE_ACUT , DE_PLUS ,DE_H ,DE_J ,DE_K ,DE_L ,DE_OE ,DE_AE ,
+ KC_ESC ,DE_A ,DE_S ,DE_D ,DE_F ,DE_G ,DE_ACUT , DE_PLUS ,DE_H ,DE_J ,DE_K ,DE_L ,DE_ODIA ,DE_ADIA ,
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┠┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤
KC_LSFT ,DE_Y ,DE_X ,DE_C ,DE_V ,DE_B ,KC_ADPU ,KC_PGDN , KC_HOME ,KC_ADEN ,DE_N ,DE_M ,DE_COMM ,DE_DOT ,DE_MINS ,KC_RSFT ,
//├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤
diff --git a/keyboards/redox/keymaps/italian/keymap.c b/keyboards/redox/keymaps/italian/keymap.c
index 1eb34ff104..5059a810b9 100644
--- a/keyboards/redox/keymaps/italian/keymap.c
+++ b/keyboards/redox/keymaps/italian/keymap.c
@@ -34,8 +34,8 @@ enum custom_keycodes {
#define KC_ADPU LT(_ADJUST, KC_PGUP)
// Italian specific shortcuts
-#define ALT_IACC RALT_T(IT_IACC)
-#define GUI_LESS LGUI_T(IT_LESS)
+#define ALT_IACC RALT_T(IT_IGRV)
+#define GUI_LESS LGUI_T(IT_LABK)
#define IT_SHSL RSFT_T(KC_SLSH)
#define IT_GRV RALT(KC_MINS)
@@ -47,11 +47,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//┌────────┬────────┬────────┬────────┬────────┬────────┠┌────────┬────────┬────────┬────────┬────────┬────────â”
KC_NAGR ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 , KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_NAMI ,
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┠┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
- KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,SYM_L , SYM_L ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,IT_EACC ,
+ KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,SYM_L , SYM_L ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,IT_EGRV ,
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤
- KC_ESC ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G ,IT_LBRC , IT_RBRC ,KC_H ,KC_J ,KC_K ,KC_L ,IT_OACC ,IT_AACC ,
+ KC_ESC ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G ,IT_LBRC , IT_RBRC ,KC_H ,KC_J ,KC_K ,KC_L ,IT_OGRV ,IT_AGRV ,
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┠┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤
- KC_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_ADPU ,KC_PGDN , KC_HOME ,KC_ADEN ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,IT_UACC ,IT_SHSL ,
+ KC_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_ADPU ,KC_PGDN , KC_HOME ,KC_ADEN ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,IT_UGRV ,IT_SHSL ,
//├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤
GUI_LESS,KC_PPLS ,KC_PMNS ,KC_ALAS , KC_CTPL , KC_BSPC ,KC_DEL , KC_ENT ,KC_SPC , ALT_IACC, KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT
//└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘
@@ -63,9 +63,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┠┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
_______ ,IT_EXLM ,IT_AT ,IT_LCBR ,IT_RCBR ,IT_PIPE ,_______ , _______ ,XXXXXXX ,KC_KP_7 ,KC_KP_8 ,KC_KP_9 ,XXXXXXX ,XXXXXXX ,
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤
- _______ ,IT_SHRP ,IT_DLR ,IT_LBRC ,IT_RBRC ,IT_GRV ,_______ , _______ ,XXXXXXX ,KC_KP_4 ,KC_KP_5 ,KC_KP_6 ,XXXXXXX ,XXXXXXX ,
+ _______ ,IT_HASH ,IT_DLR ,IT_LBRC ,IT_RBRC ,IT_GRV ,_______ , _______ ,XXXXXXX ,KC_KP_4 ,KC_KP_5 ,KC_KP_6 ,XXXXXXX ,XXXXXXX ,
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┠┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤
- _______ ,IT_PERC ,IT_CRC ,IT_LPRN ,IT_RPRN ,IT_TILD ,_______ ,_______ , _______ ,_______ ,XXXXXXX ,KC_KP_1 ,KC_KP_2 ,KC_KP_3 ,XXXXXXX ,XXXXXXX ,
+ _______ ,IT_PERC ,IT_CIRC ,IT_LPRN ,IT_RPRN ,IT_TILD ,_______ ,_______ , _______ ,_______ ,XXXXXXX ,KC_KP_1 ,KC_KP_2 ,KC_KP_3 ,XXXXXXX ,XXXXXXX ,
//├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤
_______ ,_______ ,_______ ,_______ , _______ , _______ ,_______ , _______ ,_______ , KC_KP_0 , KC_KP_0 ,KC_PDOT ,XXXXXXX ,XXXXXXX
//└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘
diff --git a/keyboards/redox/keymaps/tw1t611/keymap.c b/keyboards/redox/keymaps/tw1t611/keymap.c
index 1309831b23..3ea10a7528 100644
--- a/keyboards/redox/keymaps/tw1t611/keymap.c
+++ b/keyboards/redox/keymaps/tw1t611/keymap.c
@@ -11,11 +11,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//┌────────┬────────┬────────┬────────┬────────┬────────┠┌────────┬────────┬────────┬────────┬────────┬────────â”
_______ ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 , KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,_______ ,
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┠┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
- KC_ESC ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,_______ , _______ ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,DE_AE ,
+ KC_ESC ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,_______ , _______ ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,DE_ADIA ,
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤
- KC_TAB ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G ,KC_BSPC , KC_DEL ,KC_H ,KC_J ,KC_K ,KC_L ,DE_EQL ,DE_OE ,
+ KC_TAB ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G ,KC_BSPC , KC_DEL ,KC_H ,KC_J ,KC_K ,KC_L ,DE_EQL ,DE_ODIA ,
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┠┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤
- DE_UNDS ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_LCTL ,KC_BSPC , KC_DEL ,KC_RCTL ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,DE_SS ,DE_UE ,
+ DE_UNDS ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_LCTL ,KC_BSPC , KC_DEL ,KC_RCTL ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,DE_SS ,DE_UDIA ,
//├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤
_______ ,_______ ,_______ ,_______ , KC_LALT , KC_SPC ,KC_LSFT , MO(MOD) ,KC_ENT , KC_LGUI , _______ ,_______ ,_______ ,_______
//└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘
@@ -24,11 +24,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//┌────────┬────────┬────────┬────────┬────────┬────────┠┌────────┬────────┬────────┬────────┬────────┬────────â”
KC_F12 ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 , KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_F11,
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┠┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
- DE_CIRC ,DE_QUOT ,DE_DQOT ,DE_LCBR ,DE_RCBR ,DE_GRV ,RGB_MOD , RESET ,DE_PERC ,DE_PLUS ,DE_MINS ,DE_ASTR ,DE_SLSH ,DE_BSLS ,
+ DE_CIRC ,DE_QUOT ,DE_DQUO ,DE_LCBR ,DE_RCBR ,DE_GRV ,RGB_MOD , RESET ,DE_PERC ,DE_PLUS ,DE_MINS ,DE_ASTR ,DE_SLSH ,DE_BSLS ,
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤
- DE_TILD ,DE_EXLM ,DE_DLR ,DE_LPRN ,DE_RPRN ,DE_AMPR ,RGB_TOG , _______ ,KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT ,DE_QST ,DE_PIPE ,
+ DE_TILD ,DE_EXLM ,DE_DLR ,DE_LPRN ,DE_RPRN ,DE_AMPR ,RGB_TOG , _______ ,KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT ,DE_QUES ,DE_PIPE ,
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┠┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤
- _______ ,DE_AT ,DE_EURO ,DE_LBRC ,DE_RBRC ,_______ ,RGB_M_P ,_______ , _______ ,_______ ,DE_HASH ,DE_LESS ,DE_SCLN ,DE_COLN ,DE_MORE ,DE_PARA ,
+ _______ ,DE_AT ,DE_EURO ,DE_LBRC ,DE_RBRC ,_______ ,RGB_M_P ,_______ , _______ ,_______ ,DE_HASH ,DE_LABK ,DE_SCLN ,DE_COLN ,DE_RABK ,DE_SECT ,
//├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤
_______ ,_______ ,_______ ,_______ , _______ , _______ ,_______ , _______ ,_______ , _______ , _______ ,_______ ,_______ ,_______
//└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘
diff --git a/keyboards/redox_w/keymaps/italian/keymap.c b/keyboards/redox_w/keymaps/italian/keymap.c
index 6e23a32d4d..e67742c6a1 100644
--- a/keyboards/redox_w/keymaps/italian/keymap.c
+++ b/keyboards/redox_w/keymaps/italian/keymap.c
@@ -34,8 +34,8 @@ enum custom_keycodes {
#define KC_ADPU LT(_ADJUST, KC_PGUP)
// Italian specific shortcuts
-#define ALT_IACC RALT_T(IT_IACC)
-#define GUI_LESS LGUI_T(IT_LESS)
+#define ALT_IACC RALT_T(IT_IGRV)
+#define GUI_LESS LGUI_T(IT_LABK)
#define IT_SHSL RSFT_T(KC_SLSH)
#define IT_GRV RALT(KC_MINS)
@@ -47,11 +47,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//┌────────┬────────┬────────┬────────┬────────┬────────┠┌────────┬────────┬────────┬────────┬────────┬────────â”
KC_NAGR ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 , KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_NAMI ,
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┠┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
- KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,SYM_L , SYM_L ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,IT_EACC ,
+ KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,SYM_L , SYM_L ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,IT_EGRV ,
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤
- KC_ESC ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G ,IT_LBRC , IT_RBRC ,KC_H ,KC_J ,KC_K ,KC_L ,IT_OACC ,IT_AACC ,
+ KC_ESC ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G ,IT_LBRC , IT_RBRC ,KC_H ,KC_J ,KC_K ,KC_L ,IT_OGRV ,IT_AGRV ,
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┠┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤
- KC_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_ADPU ,KC_PGDN , KC_HOME ,KC_ADEN ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,IT_UACC ,IT_SHSL ,
+ KC_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_ADPU ,KC_PGDN , KC_HOME ,KC_ADEN ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,IT_UGRV ,IT_SHSL ,
//├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤
GUI_LESS,KC_PPLS ,KC_PMNS ,KC_ALAS , KC_CTPL , KC_BSPC ,KC_DEL , KC_ENT ,KC_SPC , ALT_IACC, KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT
//└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘
@@ -63,9 +63,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┠┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
_______ ,IT_EXLM ,IT_AT ,IT_LCBR ,IT_RCBR ,IT_PIPE ,_______ , _______ ,XXXXXXX ,KC_KP_7 ,KC_KP_8 ,KC_KP_9 ,XXXXXXX ,XXXXXXX ,
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤
- _______ ,IT_SHRP ,IT_DLR ,IT_LBRC ,IT_RBRC ,IT_GRV ,_______ , _______ ,XXXXXXX ,KC_KP_4 ,KC_KP_5 ,KC_KP_6 ,XXXXXXX ,XXXXXXX ,
+ _______ ,IT_HASH ,IT_DLR ,IT_LBRC ,IT_RBRC ,IT_GRV ,_______ , _______ ,XXXXXXX ,KC_KP_4 ,KC_KP_5 ,KC_KP_6 ,XXXXXXX ,XXXXXXX ,
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┠┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤
- _______ ,IT_PERC ,IT_CRC ,IT_LPRN ,IT_RPRN ,IT_TILD ,_______ ,_______ , _______ ,_______ ,XXXXXXX ,KC_KP_1 ,KC_KP_2 ,KC_KP_3 ,XXXXXXX ,XXXXXXX ,
+ _______ ,IT_PERC ,IT_CIRC ,IT_LPRN ,IT_RPRN ,IT_TILD ,_______ ,_______ , _______ ,_______ ,XXXXXXX ,KC_KP_1 ,KC_KP_2 ,KC_KP_3 ,XXXXXXX ,XXXXXXX ,
//├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤
_______ ,_______ ,_______ ,_______ , _______ , _______ ,_______ , _______ ,_______ , KC_KP_0 , KC_KP_0 ,KC_PDOT ,XXXXXXX ,XXXXXXX
//└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘
diff --git a/keyboards/rgbkb/common/common_oled.c b/keyboards/rgbkb/common/common_oled.c
new file mode 100644
index 0000000000..b6ea6b20af
--- /dev/null
+++ b/keyboards/rgbkb/common/common_oled.c
@@ -0,0 +1,101 @@
+/*
+ * ----------------------------------------------------------------------------
+ * "THE BEER-WARE LICENSE" (Revision 42):
+ * <https://github.com/Legonut> wrote this file. As long as you retain this
+ * notice you can do whatever you want with this stuff. If we meet some day, and
+ * you think this stuff is worth it, you can buy me a beer in return. David Rauseo
+ * ----------------------------------------------------------------------------
+ */
+
+#include "common_oled.h"
+#include "oled_driver.h"
+#include "rgb_matrix.h"
+
+// for memcpy
+#include <string.h>
+#include <transactions.h>
+
+typedef struct {
+ bool selecting;
+ uint8_t selection;
+} kb_menu_status_t;
+
+static kb_menu_status_t rgb_menu = { false, 4 };
+static bool rgb_menu_changed = false;
+
+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);
+}
+
+void render_icon(void) {
+ static const char PROGMEM font_icon[] = {
+ 0x9b,0x9c,0x9d,0x9e,0x9f,
+ 0xbb,0xbc,0xbd,0xbe,0xbf,
+ 0xdb,0xdc,0xdd,0xde,0xdf,0
+ };
+ oled_write_P(font_icon, false);
+}
+
+#define RGB_FUNCTION_COUNT 6
+typedef void (*rgb_matrix_f)(void);
+const rgb_matrix_f rgb_matrix_functions[RGB_FUNCTION_COUNT][2] = {
+ { 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_toggle, rgb_matrix_toggle }
+};
+
+void render_rgb_menu(void) {
+ static char buffer[63] = {0};
+ snprintf(buffer, sizeof(buffer), "Hue %3dSatrn %3dValue %3dSpeed %3dMode %3dEnbld %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_config.enable);
+
+ if (rgb_menu.selecting) {
+ buffer[5 + rgb_menu.selection * 10] = '*';
+ }
+ else {
+ buffer[5 + rgb_menu.selection * 10] = '>';
+ }
+ oled_write(buffer, false);
+}
+
+void rgb_menu_selection(void) {
+ if (!is_keyboard_master()) return;
+ rgb_menu.selecting = !rgb_menu.selecting;
+ rgb_menu_changed = true;
+}
+
+void rgb_menu_action(bool clockwise) {
+ if (!is_keyboard_master()) return;
+ if (rgb_menu.selecting) {
+ if (!clockwise) {
+ rgb_menu.selection = (rgb_menu.selection - 1);
+ if (rgb_menu.selection >= RGB_FUNCTION_COUNT)
+ rgb_menu.selection = RGB_FUNCTION_COUNT - 1;
+ }
+ else {
+ rgb_menu.selection = (rgb_menu.selection + 1) % RGB_FUNCTION_COUNT;
+ }
+ }
+ else {
+ (*rgb_matrix_functions[rgb_menu.selection][clockwise])();
+ }
+ rgb_menu_changed = true;
+}
+
+void rgb_menu_update(int8_t transaction_id) {
+ if (!is_keyboard_master()) return;
+ if (!rgb_menu_changed) return;
+ rgb_menu_changed = false;
+ transaction_rpc_send(transaction_id, sizeof(kb_menu_status_t), &rgb_menu);
+}
+
+void rgb_menu_slave_sync(uint8_t initiator2target_buffer_size, const void* initiator2target_buffer, uint8_t target2initiator_buffer_size, void* target2initiator_buffer) {
+ memcpy(&rgb_menu, initiator2target_buffer, sizeof(kb_menu_status_t));
+} \ No newline at end of file
diff --git a/keyboards/rgbkb/common/common_oled.h b/keyboards/rgbkb/common/common_oled.h
new file mode 100644
index 0000000000..a99988b2a8
--- /dev/null
+++ b/keyboards/rgbkb/common/common_oled.h
@@ -0,0 +1,21 @@
+/*
+ * ----------------------------------------------------------------------------
+ * "THE BEER-WARE LICENSE" (Revision 42):
+ * <https://github.com/Legonut> wrote this file. As long as you retain this
+ * notice you can do whatever you want with this stuff. If we meet some day, and
+ * you think this stuff is worth it, you can buy me a beer in return. David Rauseo
+ * ----------------------------------------------------------------------------
+ */
+
+#pragma once
+
+#include <stdint.h>
+#include <stdbool.h>
+
+void render_logo(void);
+void render_icon(void);
+void render_rgb_menu(void);
+void rgb_menu_selection(void);
+void rgb_menu_action(bool clockwise);
+void rgb_menu_update(int8_t transaction_id);
+void rgb_menu_slave_sync(uint8_t initiator2target_buffer_size, const void* initiator2target_buffer, uint8_t target2initiator_buffer_size, void* target2initiator_buffer); \ No newline at end of file
diff --git a/keyboards/rgbkb/common/glcdfont.c b/keyboards/rgbkb/common/glcdfont.c
new file mode 100644
index 0000000000..320925a8f7
--- /dev/null
+++ b/keyboards/rgbkb/common/glcdfont.c
@@ -0,0 +1,240 @@
+/*
+ * ----------------------------------------------------------------------------
+ * "THE BEER-WARE LICENSE" (Revision 42):
+ * <https://github.com/Legonut> wrote this file. As long as you retain this
+ * notice you can do whatever you want with this stuff. If we meet some day, and
+ * you think this stuff is worth it, you can buy me a beer in return. David Rauseo
+ * ----------------------------------------------------------------------------
+ */
+
+#include "progmem.h"
+
+// Helidox 8x6 font with RGBKB SOL Logo
+// Online editor: http://teripom.x0.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, 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, 0x00, 0x00, 0x00, 0x80, 0x00,
+ 0x00, 0x00, 0x00, 0x80, 0x80, 0x80,
+ 0x00, 0x00, 0x00, 0x00, 0x80, 0x80,
+ 0x80, 0x80, 0x80, 0x80, 0x80, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x80, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x80, 0x00, 0x00, 0x0C, 0x90,
+ 0xB0, 0xE0, 0x72, 0x31, 0x9B, 0xDE,
+ 0xCE, 0xEC, 0xEE, 0xE9, 0xE9, 0xEC,
+ 0xCF, 0xDA, 0x99, 0x3E, 0x62, 0xE4,
+ 0xC4, 0x70, 0x10, 0x10, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
+ 0xC0, 0xC0, 0x80, 0x80, 0x02, 0x85,
+ 0x85, 0x87, 0x85, 0x89, 0x89, 0x92,
+ 0xEA, 0xC6, 0xC4, 0x48, 0x50, 0x60,
+ 0x40, 0x40, 0x40, 0x40, 0xC0, 0xE0,
+ 0x50, 0x28, 0x10, 0x10, 0x60, 0xC0,
+ 0x40, 0x40, 0x40, 0x40, 0x80, 0x80,
+ 0x80, 0x80, 0x80, 0xE0, 0xF8, 0xFC,
+ 0xF8, 0xF0, 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,
+ 0x00, 0x00, 0xF0, 0xF4, 0xEC, 0xDE,
+ 0xDE, 0xBE, 0x3E, 0x3E, 0x3F, 0x3F,
+ 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x3F,
+ 0x3F, 0x3E, 0x3E, 0xBE, 0xDE, 0xDE,
+ 0xEC, 0xF4, 0xF0, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x7F, 0x80, 0x80,
+ 0x80, 0x70, 0x0F, 0x00, 0x00, 0x80,
+ 0x7F, 0x00, 0x00, 0x7F, 0x80, 0x80,
+ 0x80, 0x80, 0x80, 0x80, 0x80, 0x7F,
+ 0x00, 0x00, 0x80, 0x80, 0x80, 0x80,
+ 0x80, 0x80, 0x80, 0xFF, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x40, 0x21, 0x33, 0x3B, 0x7B,
+ 0xFF, 0x00, 0x7C, 0xFF, 0xFF, 0xFF,
+ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+ 0xFF, 0xFF, 0xFF, 0xFF, 0x7C, 0x01,
+ 0xFF, 0xDE, 0x8C, 0x04, 0x0C, 0x08,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x01, 0x01, 0x01, 0x7F, 0x80,
+ 0x80, 0xBE, 0xBE, 0x80, 0x80, 0x80,
+ 0xC1, 0xFF, 0x80, 0x04, 0x32, 0x5E,
+ 0x1C, 0x3D, 0x26, 0x10, 0xC1, 0xFF,
+ 0x3E, 0x00, 0x00, 0x08, 0x36, 0xC1,
+ 0x08, 0x08, 0x14, 0x77, 0x94, 0x94,
+ 0x94, 0xF7, 0x94, 0xF7, 0x9C, 0x9C,
+ 0xFF, 0xFF, 0x1E, 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,
+ 0x00, 0x00, 0x01, 0x0F, 0x3F, 0xFF,
+ 0xFF, 0xFF, 0xFC, 0xE0, 0x80, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x80, 0xE0, 0xFC, 0xFF, 0xFF, 0xFF,
+ 0x3F, 0x0F, 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, 0x06, 0x02, 0x06,
+ 0x4D, 0x4F, 0x8C, 0xF9, 0x73, 0x37,
+ 0x27, 0x2F, 0x2F, 0xAF, 0xEF, 0x6F,
+ 0x77, 0x17, 0x33, 0x79, 0xCC, 0x1F,
+ 0x31, 0x20, 0x21, 0x02, 0x02, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x40, 0xE0,
+ 0xA0, 0xA0, 0xD0, 0x90, 0x48, 0x48,
+ 0x25, 0x2B, 0x11, 0x09, 0x05, 0x03,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x03, 0x02, 0x04, 0x03, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x00,
+ 0x00, 0x00, 0x00, 0x03, 0x0F, 0x1F,
+ 0x0F, 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,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x03, 0x07, 0x0F, 0x1F, 0x3F, 0x7F,
+ 0xFE, 0xFC, 0x00, 0xFC, 0xFE, 0x7F,
+ 0x3F, 0x1F, 0x0F, 0x07, 0x03, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+};
diff --git a/keyboards/rgbkb/common/touch_encoder.c b/keyboards/rgbkb/common/touch_encoder.c
new file mode 100644
index 0000000000..6293739ec9
--- /dev/null
+++ b/keyboards/rgbkb/common/touch_encoder.c
@@ -0,0 +1,310 @@
+/*
+ * ----------------------------------------------------------------------------
+ * "THE BEER-WARE LICENSE" (Revision 42):
+ * <https://github.com/XScorpion2> wrote this file. As long as you retain this
+ * notice you can do whatever you want with this stuff. If we meet some day, and
+ * you think this stuff is worth it, you can buy me a beer in return. Ryan Caltabiano
+ * ----------------------------------------------------------------------------
+ */
+
+#include "i2c_master.h"
+#include "keyboard.h"
+#include "touch_encoder.h"
+#include "print.h"
+#include "wait.h"
+#include "timer.h"
+
+// for memcpy
+#include <string.h>
+#include <transactions.h>
+
+#define I2C_ADDRESS 0x1C
+#define CALIBRATION_BIT 0x80
+#define OVERFLOW_BIT 0x40
+#define SLIDER_BIT 0x02
+
+#ifndef TOUCH_UPDATE_INTERVAL
+# define TOUCH_UPDATE_INTERVAL 33
+#endif
+
+enum { // QT2120 registers
+ QT_CHIP_ID = 0,
+ QT_FIRMWARE_VERSION,
+ QT_DETECTION_STATUS,
+ QT_KEY_STATUS,
+ QT_SLIDER_POSITION = 5,
+ QT_CALIBRATE,
+ QT_RESET,
+ QT_LP,
+ QT_TTD,
+ QT_ATD,
+ QT_DI,
+ QT_TRD,
+ QT_DHT,
+ QT_SLIDER_OPTION,
+ QT_CHARDE_TIME,
+ QT_KEY0_DTHR,
+ QT_KEY1_DTHR,
+ QT_KEY2_DTHR,
+ QT_KEY3_DTHR,
+ QT_KEY4_DTHR,
+ QT_KEY5_DTHR,
+ QT_KEY6_DTHR,
+ QT_KEY7_DTHR,
+ QT_KEY8_DTHR,
+ QT_KEY9_DTHR,
+ QT_KEY10_DTHR,
+ QT_KEY11_DTHR,
+ QT_KEY0_CTRL,
+ QT_KEY1_CTRL,
+ QT_KEY2_CTRL,
+ QT_KEY3_CTRL,
+ QT_KEY4_CTRL,
+ QT_KEY5_CTRL,
+ QT_KEY6_CTRL,
+ QT_KEY7_CTRL,
+ QT_KEY8_CTRL,
+ QT_KEY9_CTRL,
+ QT_KEY10_CTRL,
+ QT_KEY11_CTRL,
+ QT_KEY0_PULSE_SCALE,
+ QT_KEY1_PULSE_SCALE,
+ QT_KEY2_PULSE_SCALE,
+ QT_KEY3_PULSE_SCALE,
+ QT_KEY4_PULSE_SCALE,
+ QT_KEY5_PULSE_SCALE,
+ QT_KEY6_PULSE_SCALE,
+ QT_KEY7_PULSE_SCALE,
+ QT_KEY8_PULSE_SCALE,
+ QT_KEY9_PULSE_SCALE,
+ QT_KEY10_PULSE_SCALE,
+ QT_KEY11_PULSE_SCALE,
+ QT_KEY0_SIGNAL,
+ QT_KEY1_SIGNAL = 54,
+ QT_KEY2_SIGNAL = 56,
+ QT_KEY3_SIGNAL = 58,
+ QT_KEY4_SIGNAL = 60,
+ QT_KEY5_SIGNAL = 62,
+ QT_KEY6_SIGNAL = 64,
+ QT_KEY7_SIGNAL = 66,
+ QT_KEY8_SIGNAL = 68,
+ QT_KEY9_SIGNAL = 70,
+ QT_KEY10_SIGNAL = 72,
+ QT_KEY11_SIGNAL = 74,
+ QT_KEY0_REFERENCE = 76,
+ QT_KEY1_REFERENCE = 78,
+ QT_KEY2_REFERENCE = 80,
+ QT_KEY3_REFERENCE = 82,
+ QT_KEY4_REFERENCE = 84,
+ QT_KEY5_REFERENCE = 86,
+ QT_KEY6_REFERENCE = 88,
+ QT_KEY7_REFERENCE = 90,
+ QT_KEY8_REFERENCE = 92,
+ QT_KEY9_REFERENCE = 94,
+ QT_KEY10_REFERENCE = 96,
+ QT_KEY11_REFERENCE = 98,
+};
+
+bool touch_initialized = false;
+bool touch_disabled = false;
+uint8_t touch_handness = 0;
+// touch_raw & touch_processed store the Detection Status, Key Status (x2), and Slider Position values
+uint8_t touch_raw[4] = { 0 };
+uint8_t touch_processed[4] = { 0 };
+
+uint16_t touch_timer = 0;
+uint16_t touch_update_timer = 0;
+
+// For split transport only
+typedef struct {
+ uint8_t position;
+ uint8_t taps;
+} slave_touch_status_t;
+
+bool touch_slave_init = false;
+slave_touch_status_t touch_slave_state = { 0, 0 };
+
+static bool write_register8(uint8_t address, uint8_t data) {
+ i2c_status_t status = i2c_writeReg((I2C_ADDRESS << 1), address, &data, sizeof(data), I2C_TIMEOUT);
+ if (status != I2C_STATUS_SUCCESS) {
+ xprintf("write_register8 %d failed %d\n", address, status);
+ }
+ return status == I2C_STATUS_SUCCESS;
+}
+
+static bool read_register(uint8_t address, uint8_t* data, uint16_t length) {
+ i2c_status_t status = i2c_readReg((I2C_ADDRESS << 1), address, data, length, I2C_TIMEOUT);
+ if (status != I2C_STATUS_SUCCESS) {
+ xprintf("read_register %d failed %d\n", address, status);
+ return false;
+ }
+ return true;
+}
+
+void touch_encoder_init(void) {
+ i2c_init();
+
+ touch_handness = is_keyboard_left() ? 0 : 1;
+
+ // Set QT to slider mode
+ touch_initialized = write_register8(QT_SLIDER_OPTION, 0x80);
+ touch_initialized &= write_register8(QT_TTD, 4); // Toward Drift - 20 @ 3.2s
+ touch_initialized &= write_register8(QT_ATD, 1); // Away Drift - 5 @ 0.8s
+ touch_initialized &= write_register8(QT_DI, 4); // Detection Integrator - 4
+ touch_initialized &= write_register8(QT_TRD, 0); // Touch Recall - 48
+ touch_encoder_calibrate();
+}
+
+__attribute__((weak)) bool touch_encoder_tapped_kb(uint8_t index, uint8_t section) { return touch_encoder_tapped_user(index, section); }
+__attribute__((weak)) bool touch_encoder_update_kb(uint8_t index, bool clockwise) { return touch_encoder_update_user(index, clockwise); }
+
+__attribute__((weak)) bool touch_encoder_tapped_user(uint8_t index, uint8_t section) { return true; }
+__attribute__((weak)) bool touch_encoder_update_user(uint8_t index, bool clockwise) { return true; }
+
+static void touch_encoder_update_tapped(void) {
+ // Started touching, being counter for TOUCH_TERM
+ if (touch_processed[0] & SLIDER_BIT) {
+ touch_timer = timer_read() + TOUCH_TERM;
+ return;
+ }
+
+ // Touch held too long, bail
+ if (timer_expired(timer_read(), touch_timer)) return;
+
+ uint8_t section = touch_processed[3] / (UINT8_MAX / TOUCH_SEGMENTS + 1);
+ xprintf("tap %d %d\n", touch_handness, section);
+ if (is_keyboard_master()) {
+ if (!touch_disabled) {
+ touch_encoder_tapped_kb(touch_handness, section);
+ }
+ }
+ else {
+ touch_slave_state.taps ^= (1 << section);
+ }
+}
+
+static void touch_encoder_update_position_common(uint8_t* position, uint8_t raw, uint8_t index) {
+ int8_t delta = (*position - raw) / TOUCH_RESOLUTION;
+ bool clockwise = raw > *position;
+ if (delta == 0) return;
+
+ // Don't store raw directly, as we want to ensure any remainder is kept and used next time this is called
+ *position -= delta * TOUCH_RESOLUTION;
+ xprintf("pos %d %d\n", index, raw);
+ //uint8_t u_delta = delta < 0 ? -delta : delta;
+ if (!touch_disabled) {
+ //for (uint8_t i = 0; i < u_delta; i++)
+ touch_encoder_update_kb(index, clockwise);
+ }
+}
+
+static void touch_encoder_update_position(void) {
+ // If the user touchs and moves enough, expire touch_timer faster and do encoder position logic instead
+ if (!timer_expired(timer_read(), touch_timer)) {
+ if ((uint8_t)(touch_raw[3] - touch_processed[3]) <= TOUCH_DEADZONE) return;
+ touch_timer = timer_read();
+ }
+
+ if (is_keyboard_master()) {
+ touch_encoder_update_position_common(&touch_processed[3], touch_raw[3], touch_handness);
+ }
+ else {
+ touch_slave_state.position = touch_raw[3];
+ }
+}
+
+void touch_encoder_update_slave(slave_touch_status_t slave_state) {
+ if (!touch_slave_init) {
+ touch_slave_state = slave_state;
+ touch_slave_init = true;
+ return;
+ }
+
+ if (touch_slave_state.position != slave_state.position) {
+ // Did a new slide event start?
+ uint8_t mask = (1 << 7);
+ if ((touch_slave_state.taps & mask) != (slave_state.taps & mask)) {
+ touch_slave_state.position = slave_state.position;
+ }
+ touch_encoder_update_position_common(&touch_slave_state.position, slave_state.position, !touch_handness);
+ }
+
+ if (touch_slave_state.taps != slave_state.taps) {
+ if (!touch_disabled) {
+ for (uint8_t section = 0; section < TOUCH_SEGMENTS; section++) {
+ uint8_t mask = (1 << section);
+ if ((touch_slave_state.taps & mask) != (slave_state.taps & mask)) {
+ xprintf("tap %d %d\n", !touch_handness, section);
+ touch_encoder_tapped_kb(!touch_handness, section);
+ }
+ }
+ }
+ touch_slave_state.taps = slave_state.taps;
+ }
+}
+
+void touch_encoder_update(int8_t transaction_id) {
+ if (!touch_initialized) return;
+#if TOUCH_UPDATE_INTERVAL > 0
+ if (!timer_expired(timer_read(), touch_update_timer)) return;
+ touch_update_timer = timer_read() + TOUCH_UPDATE_INTERVAL;
+#endif
+
+ read_register(QT_DETECTION_STATUS, &touch_raw[0], sizeof(touch_raw));
+ touch_processed[1] = touch_raw[1];
+ touch_processed[2] = touch_raw[2];
+
+ if (touch_raw[0] != touch_processed[0]) {
+ uint8_t delta = touch_raw[0] ^ touch_processed[0];
+ touch_processed[0] = touch_raw[0];
+ // When calibrating, normal sensor behavior is supended
+ if (delta & CALIBRATION_BIT) {
+ xprintf("calibration %d\n", touch_processed[0] >> 7 & 1);
+ }
+ if (delta & OVERFLOW_BIT) {
+ xprintf("overflow %d\n", touch_processed[0] >> 6 & 1);
+ }
+ if (delta & SLIDER_BIT) {
+ touch_processed[3] = touch_raw[3];
+ if (!is_keyboard_master()) {
+ touch_slave_state.position = touch_raw[3];
+ touch_slave_state.taps ^= (1 << 7);
+ }
+ touch_encoder_update_tapped();
+ }
+ }
+
+ if ((touch_raw[0] & SLIDER_BIT) && touch_processed[3] != touch_raw[3]) {
+ touch_encoder_update_position();
+ }
+
+ if (is_keyboard_master()) {
+ slave_touch_status_t slave_state;
+ if (transaction_rpc_exec(transaction_id, sizeof(bool), &touch_disabled, sizeof(slave_touch_status_t), &slave_state)) {
+ if (memcmp(&touch_slave_state, &slave_state, sizeof(slave_touch_status_t)))
+ touch_encoder_update_slave(slave_state);
+ }
+ }
+}
+
+void touch_encoder_calibrate(void) {
+ if (!touch_initialized) return;
+ write_register8(QT_CALIBRATE, 0x01);
+}
+
+bool touch_encoder_calibrating(void) {
+ return touch_raw[0] & CALIBRATION_BIT;
+}
+
+void touch_encoder_toggle(void) {
+ touch_disabled = !touch_disabled;
+}
+
+bool touch_encoder_toggled(void) {
+ return touch_disabled;
+}
+
+void touch_encoder_slave_sync(uint8_t initiator2target_buffer_size, const void* initiator2target_buffer, uint8_t target2initiator_buffer_size, void* target2initiator_buffer) {
+ touch_disabled = *(bool*)initiator2target_buffer;
+ memcpy(target2initiator_buffer, &touch_slave_state, sizeof(slave_touch_status_t));
+}
diff --git a/keyboards/rgbkb/common/touch_encoder.h b/keyboards/rgbkb/common/touch_encoder.h
new file mode 100644
index 0000000000..022f619063
--- /dev/null
+++ b/keyboards/rgbkb/common/touch_encoder.h
@@ -0,0 +1,54 @@
+/*
+ * ----------------------------------------------------------------------------
+ * "THE BEER-WARE LICENSE" (Revision 42):
+ * <https://github.com/XScorpion2> wrote this file. As long as you retain this
+ * notice you can do whatever you want with this stuff. If we meet some day, and
+ * you think this stuff is worth it, you can buy me a beer in return. Ryan Caltabiano
+ * ----------------------------------------------------------------------------
+ */
+
+#pragma once
+
+#include <stdint.h>
+#include <stdbool.h>
+
+#ifndef TOUCH_TERM
+# define TOUCH_TERM 350
+#endif
+
+#ifndef TOUCH_SEGMENTS
+# define TOUCH_SEGMENTS 3
+#elif TOUCH_SEGMENTS < 1 || TOUCH_SEGMENTS > 5
+# error TOUCH_SEGMENTS must be between 1 and 5.
+#endif
+
+#ifndef TOUCH_DEADZONE
+# define TOUCH_DEADZONE 50
+#endif
+
+#ifndef TOUCH_RESOLUTION
+# define TOUCH_RESOLUTION 25
+#endif
+
+void touch_encoder_init(void);
+void touch_encoder_update(int8_t transaction_id);
+
+void touch_encoder_calibrate(void);
+bool touch_encoder_calibrating(void);
+
+void touch_encoder_toggle(void);
+bool touch_encoder_toggled(void);
+
+// Called when touch encoder is tapped, weak function overridable by the kb
+bool touch_encoder_tapped_kb(uint8_t index, uint8_t section);
+
+// Called when touch encoder is slid, weak function overridable by the kb
+bool touch_encoder_update_kb(uint8_t index, bool clockwise);
+
+// Called when touch encoder is tapped, weak function overridable by the user
+bool touch_encoder_tapped_user(uint8_t index, uint8_t section);
+
+// Called when touch encoder is slid, weak function overridable by the user
+bool touch_encoder_update_user(uint8_t index, bool clockwise);
+
+void touch_encoder_slave_sync(uint8_t initiator2target_buffer_size, const void* initiator2target_buffer, uint8_t target2initiator_buffer_size, void* target2initiator_buffer);
diff --git a/keyboards/rgbkb/mun/.noci b/keyboards/rgbkb/mun/.noci
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/keyboards/rgbkb/mun/.noci
diff --git a/keyboards/rgbkb/mun/config.h b/keyboards/rgbkb/mun/config.h
new file mode 100644
index 0000000000..802672e14d
--- /dev/null
+++ b/keyboards/rgbkb/mun/config.h
@@ -0,0 +1,106 @@
+/*
+ * ----------------------------------------------------------------------------
+ * "THE BEER-WARE LICENSE" (Revision 42):
+ * <https://github.com/Legonut> wrote this file. As long as you retain this
+ * notice you can do whatever you want with this stuff. If we meet some day, and
+ * you think this stuff is worth it, you can buy me a beer in return. David Rauseo
+ * ----------------------------------------------------------------------------
+ */
+
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0x3535
+#define PRODUCT_ID 0x3505
+#define MANUFACTURER RGBKB
+#define PRODUCT Mün
+
+#define USB_POLLING_INTERVAL_MS 1
+
+/* Matrix Configuration - Rows are doubled up */
+#define MATRIX_ROWS 14
+// B1, A2 reserved for encoder / touch encoder support
+#define MATRIX_ROW_PINS { A1, A3, B3, A13, B15, B1, A2 }
+#define MATRIX_COLS 7
+#define MATRIX_COL_PINS { A0, B11, B0, B10, B12, B2, A8 }
+#define MATRIX_IO_DELAY 5
+
+#define BUSY_WAIT
+#define BUSY_WAIT_INSTRUCTIONS 35 // Increase if two rows are pressed at the same time.
+#define GPIO_INPUT_PIN_DELAY 10
+
+/* Touchbar adjustments */
+#define TOUCH_DEADZONE 50 // width of a "button", wider inputs will be interpreted as a swipe
+#define TOUCH_TERM 350 // time of a "button" touch, longer inputs will be a swipe
+#define TOUCH_RESOLUTION 25 // sensitivity of swipes, lower=faster
+
+/* Encoder Configuration */
+#define ENCODERS_PAD_A { B8, B9 }
+#define ENCODERS_PAD_B { A14, A15 }
+#define TOUCH_SEGMENTS 3
+
+/* COL2ROW or ROW2COL */
+#define DIODE_DIRECTION COL2ROW
+
+/* CRC Configuration */
+#define CRC8_OPTIMIZE_SPEED
+#define CRC8_USE_TABLE
+
+/* Split Keyboard Configuration */
+#define EE_HANDS
+#define SPLIT_USB_DETECT
+// also handles the SERIAL_USART_TX_PIN define
+#define SOFT_SERIAL_PIN A9
+#define SERIAL_USART_TX_PAL_MODE 7
+#define SERIAL_USART_TIMEOUT 5
+#define SERIAL_USART_DRIVER SD1
+//#define SERIAL_USART_FULL_DUPLEX - Waiting on reunification pr
+#if SERIAL_USART_FULL_DUPLEX
+ #define SERIAL_USART_RX_PIN A10
+ #define SERIAL_USART_RX_PAL_MODE 7
+ // Mun connects TX to TX and RX to RX as we were planning on i2c split, so we need pin swap for full duplex
+ #define SERIAL_USART_PIN_SWAP
+ #define SERIAL_USART_SPEED (2 * 1024 * 1024)
+#else
+ #define SERIAL_USART_SPEED (1 * 1024 * 1024)
+#endif
+
+/* Split Transport Features */
+#define SPLIT_TRANSPORT_MIRROR
+#define SPLIT_LAYER_STATE_ENABLE
+#define SPLIT_LED_STATE_ENABLE
+#define SPLIT_TRANSACTION_IDS_KB TOUCH_ENCODER_SYNC, RGB_MENU_SYNC
+
+/* RGB LED Configuration */
+#define RGB_DI_PIN B5
+#define RGBLED_NUM 98
+#define RGBLED_SPLIT { 49, 49 }
+#define RGBLIGHT_ANIMATIONS
+
+#define DRIVER_LED_TOTAL RGBLED_NUM
+#define RGB_MATRIX_SPLIT RGBLED_SPLIT
+#define RGB_MATRIX_CENTER { 128, 34 }
+#define RGB_MATRIX_LED_FLUSH_LIMIT 33
+#define RGB_MATRIX_LED_PROCESS_LIMIT 10
+#define RGB_MATRIX_KEYPRESSES
+#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
+#define RGB_DISABLE_WHEN_USB_SUSPENDED true
+
+#if RGB_UNLIMITED_POWER
+ #define RGBLIGHT_LIMIT_VAL 255
+#else
+ #define RGBLIGHT_LIMIT_VAL 127
+#endif
+#define RGB_MATRIX_MAXIMUM_BRIGHTNESS RGBLIGHT_LIMIT_VAL
+
+#define WS2812_PWM_DRIVER PWMD3
+#define WS2812_PWM_CHANNEL 2
+#define WS2812_PWM_PAL_MODE 2
+#define WS2812_DMA_STREAM STM32_DMA1_STREAM3
+#define WS2812_DMA_CHANNEL 3
+
+#define TOUCH_UPDATE_INTERVAL 33
+#define OLED_UPDATE_INTERVAL 33
+#define TAP_CODE_DELAY 5
diff --git a/keyboards/rgbkb/mun/halconf.h b/keyboards/rgbkb/mun/halconf.h
new file mode 100644
index 0000000000..c8d832a81d
--- /dev/null
+++ b/keyboards/rgbkb/mun/halconf.h
@@ -0,0 +1,24 @@
+/*
+ * ----------------------------------------------------------------------------
+ * "THE BEER-WARE LICENSE" (Revision 42):
+ * <https://github.com/Legonut> wrote this file. As long as you retain this
+ * notice you can do whatever you want with this stuff. If we meet some day, and
+ * you think this stuff is worth it, you can buy me a beer in return. David Rauseo
+ * ----------------------------------------------------------------------------
+ */
+
+#pragma once
+
+//#define HAL_USE_DAC TRUE
+
+//#define HAL_USE_GPT TRUE
+
+#define HAL_USE_I2C TRUE
+
+#define HAL_USE_PWM TRUE
+
+#define HAL_USE_SERIAL TRUE
+
+#define HAL_USE_SERIAL_USB TRUE
+
+#include_next <halconf.h>
diff --git a/keyboards/rgbkb/mun/keymaps/default/config.h b/keyboards/rgbkb/mun/keymaps/default/config.h
new file mode 100644
index 0000000000..3d9aff94a6
--- /dev/null
+++ b/keyboards/rgbkb/mun/keymaps/default/config.h
@@ -0,0 +1,32 @@
+/*
+ * ----------------------------------------------------------------------------
+ * "THE BEER-WARE LICENSE" (Revision 42):
+ * <https://github.com/Legonut> wrote this file. As long as you retain this
+ * notice you can do whatever you want with this stuff. If we meet some day, and
+ * you think this stuff is worth it, you can buy me a beer in return. David Rauseo
+ * ----------------------------------------------------------------------------
+ */
+
+#pragma once
+
+// 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 RGB_DISABLE_WHEN_USB_SUSPENDED true
+
+
+#define VIA_EEPROM_LAYOUT_OPTIONS_SIZE 2
+// 224B per layer right now
+#define DYNAMIC_KEYMAP_LAYER_COUNT 8
+#define DYNAMIC_KEYMAP_EEPROM_MAX_ADDR 2047
+
+#define VIA_QMK_RGBLIGHT_ENABLE
+
+#define STM32_ONBOARD_EEPROM_SIZE 2048
+
diff --git a/keyboards/rgbkb/mun/keymaps/default/keymap.c b/keyboards/rgbkb/mun/keymaps/default/keymap.c
new file mode 100644
index 0000000000..b120c3a37a
--- /dev/null
+++ b/keyboards/rgbkb/mun/keymaps/default/keymap.c
@@ -0,0 +1,252 @@
+/*
+ * ----------------------------------------------------------------------------
+ * "THE BEER-WARE LICENSE" (Revision 42):
+ * <https://github.com/Legonut> wrote this file. As long as you retain this
+ * notice you can do whatever you want with this stuff. If we meet some day, and
+ * you think this stuff is worth it, you can buy me a beer in return. David Rauseo
+ * ----------------------------------------------------------------------------
+ */
+
+#include QMK_KEYBOARD_H
+#include "common_oled.h"
+
+enum keymap_layers {
+ _QWERTY,
+ _COLEMAK,
+ _GAME,
+ _FN,
+ _ADJUST,
+ _VIA1,
+ _VIA2,
+ _VIA3
+};
+
+enum keymap_keycodes {
+ // Disables touch processing
+ TCH_TOG = SAFE_RANGE,
+ MENU_BTN,
+ MENU_UP,
+ MENU_DN
+};
+
+// Default Layers
+#define QWERTY DF(_QWERTY)
+#define COLEMAK DF(_COLEMAK)
+#define GAME DF(_GAME)
+
+// Momentary Layers
+#define FN MO(_FN)
+#define ADJUST MO(_ADJUST)
+
+#define FN_CAPS LT(_FN, KC_CAPS)
+#define FN_ESC LT(_FN, KC_ESC)
+
+/* This keyboard is enabled with an RGB Menu Control system.
+This functionality is enabled, but still requires a little configuration based on your exact setup.
+The RGB Menu will appear on the Right Half's OLED and can be controlled by the MENU keycodes:
+MENU_BTN - Triggers a button action for the menu
+MENU_UP - Triggers an increase action for the menu
+MENU_DN - Triggers a decrease action for the menu
+
+To finish configuration for your board, you will want to change the default keycodes for an encoder on the right half.
+Encoder press keycode should be set to MENU_BTN, Clockwise should be MENU_UP, and Counter Clockwise should be MENU_DN.
+Depending on where you add an encoder to the right half will determin in the default keymap where you should put those keycodes.
+*/
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ /* QWERTY
+ * .--------------------------------------------------------------. .--------------------------------------------------------------.
+ * | `~/ESC | 1 | 2 | 3 | 4 | 5 | - | | = | 6 | 7 | 8 | 9 | 0 | Bckspc |
+ * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
+ * | Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | \ |
+ * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
+ * | FN/Caps| A | S | D | F | G | ( | | ) | H | J | K | L | : | ' |
+ * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
+ * | Shift | Z | X | C | V | B | { | | } | N | M | , | . | / |Shft/Ent|
+ * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
+ * | Ctrl | Win | Alt | RGBTOG | Adjust | Space | Bksp | | Enter | Space | Left | Down | Up | Right | Ctrl |
+ * '--------+--------+--------+--------+--------+--------+--------' '--------+--------+--------+--------+--------+--------+--------'
+ * Encoder 1 Encoder 2 Encoder 3 Encoder 4
+ * .-----------------------------------. .-----------------------------------.
+ * | VolUp | VolDn | VolUp | VolDn | | PgUp | PgDn | PgUp | PgDn |
+ * |--------+--------+--------+--------+--------. .--------+--------+--------+--------+--------|
+ * | VolDn | VolUp | Next | Play | Prev | Touch Encoder Touch Encoder | RgbHuI | RgbHuD | RgbMdD | RgbTog | RgbMdI |
+ * '--------+--------+--------+--------+--------' '--------+--------+--------+--------+--------'
+ */
+ [_QWERTY] = LAYOUT(
+ KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLASH,
+ FN_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LPRN, KC_RPRN, 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_LCBR, KC_RCBR, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_SFTENT,
+ KC_LCTL, KC_LGUI, KC_LALT, RGB_TOG, ADJUST, KC_SPC, KC_DEL, KC_ENT, KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,KC_RCTL,
+
+ KC_VOLU, KC_VOLD, KC_VOLU, KC_VOLD, KC_PGDN, KC_PGUP, KC_PGDN, KC_PGUP,
+ KC_VOLD, KC_VOLU, KC_MNXT, KC_MPLY, KC_MPRV, RGB_HUI, RGB_HUD, RGB_RMOD,RGB_TOG, RGB_MOD
+ ),
+
+ [_COLEMAK] = LAYOUT(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, KC_Q, KC_W, KC_F, KC_P, KC_G, _______, _______, KC_J, KC_L, KC_U, KC_Y, KC_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, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+
+ _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ ),
+
+ [_GAME] = LAYOUT(
+ _______, _______, _______, _______, _______, _______, KC_F1, KC_F5, _______, _______, _______, _______, _______, _______,
+ _______, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_F2, KC_F6, KC_Y, KC_U, KC_I, KC_O, KC_P, _______,
+ _______, KC_A, KC_S, KC_D, KC_F, KC_G, KC_F3, KC_F7, KC_H, KC_J, KC_K, KC_L, KC_SCLN, _______,
+ _______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_F4, KC_F8, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______,
+ _______, KC_NO, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+
+ _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ ),
+
+ [_FN] = LAYOUT(
+ _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______,
+ _______, KC_HOME, KC_UP, KC_END, _______, _______, _______, _______, _______, KC_HOME, KC_UP, KC_END, KC_PSCR, KC_PGUP,
+ _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_INS, KC_PGDN,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, TCH_TOG, _______, _______, _______, _______, _______, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU,
+
+ _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ ),
+
+ [_ADJUST] = LAYOUT(
+ _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______,
+ _______, RGB_SAD, RGB_VAI, RGB_SAI, RESET, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, _______, _______,
+ _______, RGB_HUD, RGB_VAD, RGB_HUI, _______, _______, _______, _______, _______, KC_P4, KC_P5, KC_P6, _______, _______,
+ _______, RGB_SPD, _______, RGB_SPI, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, _______, GAME,
+ _______, RGB_RMOD,_______, RGB_MOD, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, KC_NLCK, QWERTY, COLEMAK,
+
+ _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ ),
+
+ [_VIA1] = LAYOUT(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+
+ _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ ),
+
+ [_VIA2] = LAYOUT(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+
+ _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ ),
+
+ [_VIA3] = LAYOUT(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+
+ _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ ),
+};
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode)
+ {
+ case MENU_BTN:
+ if (record->event.pressed) {
+ rgb_menu_selection();
+ }
+ return false;
+ case MENU_UP:
+ if (record->event.pressed) {
+ rgb_menu_action(true);
+ }
+ return false;
+ case MENU_DN:
+ if (record->event.pressed) {
+ rgb_menu_action(false);
+ }
+ return false;
+ case TCH_TOG:
+ if (record->event.pressed) {
+ touch_encoder_toggle();
+ }
+ return false; // Skip all further processing of this key
+ default:
+ return true;
+ }
+}
+
+static void render_layer(void) {
+ // Host Keyboard Layer Status
+ oled_write_P(PSTR("Layer"), false);
+ switch (get_highest_layer(layer_state)) {
+ case _QWERTY:
+ oled_write_ln_P(PSTR("QWRTY"), false);
+ break;
+ case _COLEMAK:
+ oled_write_ln_P(PSTR("Colemk"), false);
+ break;
+ case _GAME:
+ oled_write_ln_P(PSTR("Game "), false);
+ break;
+ case _FN:
+ oled_write_ln_P(PSTR("FN "), false);
+ break;
+ case _ADJUST:
+ oled_write_ln_P(PSTR("Adjst"), false);
+ break;
+ default:
+ oled_write_ln_P(PSTR("Undef"), false);
+ }
+}
+
+static void render_leds(void)
+{
+ // Host Keyboard LED Status
+ led_t led_state = host_keyboard_led_state();
+ oled_write_P(led_state.num_lock ? PSTR("NUMLK") : PSTR(" "), false);
+ oled_write_P(led_state.caps_lock ? PSTR("CAPLK") : PSTR(" "), false);
+ oled_write_P(led_state.scroll_lock ? PSTR("SCRLK") : PSTR(" "), false);
+}
+
+static void render_touch(void)
+{
+ // Host Touch LED Status
+ oled_write_P(!touch_encoder_toggled() ? PSTR("TOUCH") : PSTR(" "), false);
+ oled_write_P(touch_encoder_calibrating() ? PSTR("CLBRT") : PSTR(" "), false);
+}
+
+void oled_task_user(void) {
+ if (is_keyboard_left()) {
+ render_icon();
+ oled_write_P(PSTR(" "), false);
+ render_layer();
+ oled_write_P(PSTR(" "), false);
+ render_leds();
+ oled_write_P(PSTR(" "), false);
+ render_touch();
+ }
+ else {
+ render_icon();
+ oled_write_P(PSTR(" "), false);
+ render_rgb_menu();
+ }
+}
+
+oled_rotation_t oled_init_user(oled_rotation_t rotation) {
+ return OLED_ROTATION_270;
+}
diff --git a/keyboards/rgbkb/mun/keymaps/default/rules.mk b/keyboards/rgbkb/mun/keymaps/default/rules.mk
new file mode 100644
index 0000000000..1e5b99807c
--- /dev/null
+++ b/keyboards/rgbkb/mun/keymaps/default/rules.mk
@@ -0,0 +1 @@
+VIA_ENABLE = yes
diff --git a/keyboards/rgbkb/mun/keymaps/xulkal2/config.h b/keyboards/rgbkb/mun/keymaps/xulkal2/config.h
new file mode 100644
index 0000000000..f78d0103c1
--- /dev/null
+++ b/keyboards/rgbkb/mun/keymaps/xulkal2/config.h
@@ -0,0 +1,42 @@
+/*
+ * ----------------------------------------------------------------------------
+ * "THE BEER-WARE LICENSE" (Revision 42):
+ * <https://github.com/Legonut> wrote this file. As long as you retain this
+ * notice you can do whatever you want with this stuff. If we meet some day, and
+ * you think this stuff is worth it, you can buy me a beer in return. David Rauseo
+ * ----------------------------------------------------------------------------
+ */
+
+#pragma once
+
+// Xulkal custom stuff
+#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
+
+// 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 RGB_DISABLE_WHEN_USB_SUSPENDED true
+#define OLED_SCROLL_TIMEOUT 20000
+#define ONESHOT_TAP_TOGGLE 2
+
+#define RGB_MATRIX_HUE_STEP 8
+#define RGB_MATRIX_SAT_STEP 8
+#define RGB_MATRIX_VAL_STEP 8
+#define RGB_MATRIX_SPD_STEP 8
+
+#define ENCODER_RESOLUTION 2 \ No newline at end of file
diff --git a/keyboards/rgbkb/mun/keymaps/xulkal2/keymap.c b/keyboards/rgbkb/mun/keymaps/xulkal2/keymap.c
new file mode 100644
index 0000000000..2de5888f17
--- /dev/null
+++ b/keyboards/rgbkb/mun/keymaps/xulkal2/keymap.c
@@ -0,0 +1,246 @@
+/*
+ * ----------------------------------------------------------------------------
+ * "THE BEER-WARE LICENSE" (Revision 42):
+ * <https://github.com/Legonut> wrote this file. As long as you retain this
+ * notice you can do whatever you want with this stuff. If we meet some day, and
+ * you think this stuff is worth it, you can buy me a beer in return. David Rauseo
+ * ----------------------------------------------------------------------------
+ */
+
+#include QMK_KEYBOARD_H
+#include "common_oled.h"
+
+enum keymap_layers {
+ _QWERTY,
+ _FUNCTION,
+ _ADJUST
+};
+
+enum keymap_keycodes {
+ // Disables touch processing
+ TCH_TOG = SAFE_RANGE,
+ MENU_BTN,
+ MENU_UP,
+ MENU_DN,
+ RGB_RST
+};
+
+// Default Layers
+#define QWERTY DF(_QWERTY)
+
+// Momentary Layers
+#define FN OSL(_FUNCTION)
+#define ADJ OSL(_ADJUST)
+
+// clang-format off
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ /* QWERTY
+ * .--------------------------------------------------------------. .--------------------------------------------------------------.
+ * | `~/ESC | 1 | 2 | 3 | 4 | 5 | | | | 6 | 7 | 8 | 9 | 0 | Bckspc |
+ * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
+ * | Tab | Q | W | E | R | T | | | | Y | U | I | O | P | \ |
+ * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
+ * | Caps | A | S | D | F | G | Play | | MN BTN | H | J | K | L | : | Enter |
+ * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
+ * | Shft[ | Z | X | C | V | B | { | | } | N | M | , | . | / | Shft] |
+ * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
+ * | Ctrl- | Win | Alt | Del | Space | | ADJ | | FN | | Space | '" | Alt | App | Ctrl= |
+ * '--------+--------+--------+--------|--------+--------+--------' '--------+--------+--------+--------+--------+--------+--------'
+ * Encoder 1 Encoder 2 Encoder 3 Encoder 4
+ * .-----------------------------------. .-----------------------------------.
+ * | VolUp | VolDn | VolUp | VolDn | | PgUp | PgDn | PgUp | PgDn |
+ * |--------+--------+--------+--------+--------. .--------+--------+--------+--------+--------|
+ * | VolDn | VolUp | Next | Play | Prev | Touch Encoder Touch Encoder | RgbHuI | RgbHuD | RgbMdD | RgbTog | RgbMdI |
+ * '--------+--------+--------+--------+--------' '--------+--------+--------+--------+--------'
+ */
+ [_QWERTY] = LAYOUT(
+ KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_NO, KC_NO, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_NO, KC_NO, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
+ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_MPLY, MENU_BTN,KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT,
+ KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LCBR, KC_RCBR, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC,
+ KC_LCPO, KC_LGUI, KC_LALT, KC_DEL, KC_SPC, KC_NO, ADJ, FN, KC_NO, KC_SPC, KC_QUOTE,KC_RALT, KC_APP, KC_RCPC,
+
+ KC_VOLU, KC_VOLD, KC_VOLU, KC_VOLD, MENU_DN, MENU_UP, MENU_DN, MENU_UP,
+ KC_VOLD, KC_VOLU, KC_MNXT, KC_MPLY, KC_MPRV, RGB_HUI, RGB_HUD, RGB_RMOD,RGB_TOG, RGB_MOD
+ ),
+
+ /* Function
+ * .--------------------------------------------------------------. .--------------------------------------------------------------.
+ * | F12 | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
+ * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
+ * | | SPDI | SAI | VAI | HUI | RGBMD | | | | | | PrtScr | ScrLck | PseBrk | |
+ * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
+ * | | SPDD | SAD | VAD | HUD | RGBRMD | | | | | | Ins | Home | PgUp | |
+ * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
+ * | | RGBRST | | | | RGBTOG | | | | | | Del | End | PgDn | |
+ * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
+ * | | | | | | | | | | | Play | Prev | Next | VolUp | VolDn |
+ * '--------+--------+--------+--------+--------+--------+--------' '--------+--------+--------+--------+--------+--------+--------'
+ * Encoder 1 Encoder 2 Encoder 3 Encoder 4
+ * .-----------------------------------. .-----------------------------------.
+ * | | | | | | | | | |
+ * |--------+--------+--------+--------+--------. .--------+--------+--------+--------+--------|
+ * | | | | | | Touch Encoder Touch Encoder | | | | | |
+ * '--------+--------+--------+--------+--------' '--------+--------+--------+--------+--------'
+ */
+ [_FUNCTION] = LAYOUT(
+ KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
+ _______, RGB_SPI, RGB_SAI, RGB_VAI, RGB_HUI, RGB_MOD, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______,
+ _______, RGB_SPD, RGB_SAD, RGB_VAD, RGB_HUD, RGB_RMOD,_______, _______, _______, _______, KC_INS, KC_HOME, KC_PGUP, _______,
+ _______, RGB_RST, _______, _______, _______, RGB_TOG, _______, _______, _______, _______, KC_DEL, KC_END, KC_PGDN, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MPRV, KC_MNXT, KC_VOLU, KC_VOLD,
+
+ _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ ),
+
+ /* Adjust
+ * .--------------------------------------------------------------. .--------------------------------------------------------------.
+ * | | | | | | | | | | | NumLck | / | * | - | Del |
+ * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
+ * | | Home | Up | End | Reset | T_TOG | | | | | 7 | 8 | 9 | + | |
+ * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
+ * | | Left | Down | Right | | | | | | | 4 | 5 | 6 | + | |
+ * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
+ * | | | | | | EepRst | | | | | 1 | 2 | 3 | Enter | |
+ * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
+ * | | | | | | | | | | | | 0 | . | Enter | |
+ * '--------+--------+--------+--------+--------+--------+--------' '--------+--------+--------+--------+--------+--------+--------'
+ * Encoder 1 Encoder 2 Encoder 3 Encoder 4
+ * .-----------------------------------. .-----------------------------------.
+ * | | | | | | | | | |
+ * |--------+--------+--------+--------+--------. .--------+--------+--------+--------+--------|
+ * | | | | | | Touch Encoder Touch Encoder | | | | | |
+ * '--------+--------+--------+--------+--------' '--------+--------+--------+--------+--------'
+ */
+ [_ADJUST] = LAYOUT(
+ KC_GRV, _______, _______, _______, _______, _______, _______, _______, _______, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, KC_DEL,
+ _______, KC_HOME, KC_UP, KC_END, RESET, TCH_TOG, _______, _______, _______, KC_KP_7, KC_KP_8, KC_KP_9, KC_PPLS, _______,
+ _______, KC_LEFT, KC_DOWN, KC_RIGHT,_______, _______, _______, _______, _______, KC_KP_4, KC_KP_5, KC_KP_6, KC_PPLS, _______,
+ _______, _______, _______, _______, _______, EEP_RST, _______, _______, _______, KC_KP_1, KC_KP_2, KC_KP_3, KC_PENT, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_KP_0, KC_PDOT, KC_PENT, _______,
+
+ _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ )
+};
+// clang-format on
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode)
+ {
+ case MENU_BTN:
+ if (record->event.pressed) {
+ rgb_menu_selection();
+ }
+ return false;
+ case MENU_UP:
+ if (record->event.pressed) {
+ rgb_menu_action(true);
+ }
+ return false;
+ case MENU_DN:
+ if (record->event.pressed) {
+ rgb_menu_action(false);
+ }
+ return false;
+ case RGB_RST:
+ if (record->event.pressed) {
+ eeconfig_update_rgb_matrix_default();
+ }
+ return false;
+ case TCH_TOG:
+ if (record->event.pressed) {
+ touch_encoder_toggle();
+ }
+ return false; // Skip all further processing of this key
+ default:
+ return true;
+ }
+}
+
+static void render_layer(void) {
+ // Host Keyboard Layer Status
+ oled_write_P(PSTR("Layer"), false);
+ switch (get_highest_layer(layer_state)) {
+ case _QWERTY:
+ oled_write_ln_P(PSTR("BASE "), false);
+ break;
+ case _FUNCTION:
+ oled_write_ln_P(PSTR("FUNC "), false);
+ break;
+ case _ADJUST:
+ oled_write_ln_P(PSTR("ADJS "), false);
+ break;
+ }
+}
+
+static void render_leds(void)
+{
+ // Host Keyboard LED Status
+ led_t led_state = host_keyboard_led_state();
+ oled_write_P(led_state.num_lock ? PSTR("NUMLK") : PSTR(" "), false);
+ oled_write_P(led_state.caps_lock ? PSTR("CAPLK") : PSTR(" "), false);
+ oled_write_P(led_state.scroll_lock ? PSTR("SCRLK") : PSTR(" "), false);
+}
+
+static void render_touch(void)
+{
+ // Host Touch LED Status
+ oled_write_P(!touch_encoder_toggled() ? PSTR("TOUCH") : PSTR(" "), false);
+ oled_write_P(touch_encoder_calibrating() ? PSTR("CLBRT") : PSTR(" "), false);
+}
+
+/*static uint32_t scan_counter = 0;
+static uint32_t scan_value = 0;
+static uint16_t scan_timer = 1000;
+
+void do_counters(void) {
+ scan_counter++;
+ uint16_t now = sync_timer_read();
+ if (timer_expired(now, scan_timer))
+ {
+ scan_timer += 1000;
+ scan_value = (scan_value + scan_counter) / 2;
+ scan_counter = 0;
+ }
+}
+
+void matrix_scan_user(void) {
+ do_counters();
+}
+
+void matrix_slave_scan_user(void) {
+ do_counters();
+}
+
+void render_debug_scan(void) {
+ static char buffer[6] = {0};
+ snprintf(buffer, sizeof(buffer), "%5d", scan_value);
+ oled_write_ln_P(buffer, false);
+}*/
+
+void oled_task_user(void) {
+ if (is_keyboard_left()) {
+ render_layer();
+ oled_write_P(PSTR(" "), false);
+ render_leds();
+ oled_write_P(PSTR(" "), false);
+ render_touch();
+ //oled_write_P(PSTR(" "), false);
+ //render_debug_scan();
+ oled_set_cursor(0, 12);
+ render_icon();
+ }
+ else {
+ render_rgb_menu();
+ //oled_write_P(PSTR(" "), false);
+ //render_debug_scan();
+ oled_set_cursor(0, 12);
+ render_icon();
+ }
+}
+
+oled_rotation_t oled_init_user(oled_rotation_t rotation) {
+ return OLED_ROTATION_270;
+} \ No newline at end of file
diff --git a/keyboards/rgbkb/mun/keymaps/xulkal2/rules.mk b/keyboards/rgbkb/mun/keymaps/xulkal2/rules.mk
new file mode 100644
index 0000000000..b626305163
--- /dev/null
+++ b/keyboards/rgbkb/mun/keymaps/xulkal2/rules.mk
@@ -0,0 +1,4 @@
+MOUSEKEY_ENABLE = yes # using for mouse wheel up and down, more granular than page up/down
+
+OPT_DEFS += -DRGB_UNLIMITED_POWER
+DEBOUNCE_TYPE = sym_eager_pk \ No newline at end of file
diff --git a/keyboards/rgbkb/mun/matrix.c b/keyboards/rgbkb/mun/matrix.c
new file mode 100644
index 0000000000..a0cb7df512
--- /dev/null
+++ b/keyboards/rgbkb/mun/matrix.c
@@ -0,0 +1,156 @@
+/*
+ * ----------------------------------------------------------------------------
+ * "THE BEER-WARE LICENSE" (Revision 42):
+ * <https://github.com/KarlK90> wrote this file. As long as you retain this
+ * notice you can do whatever you want with this stuff. If we meet some day, and
+ * you think this stuff is worth it, you can buy me a beer in return. KarlK90
+ * ----------------------------------------------------------------------------
+ */
+
+#include <stdint.h>
+#include <stdbool.h>
+#include <string.h>
+#include "util.h"
+#include "matrix.h"
+#include "debounce.h"
+#include "quantum.h"
+#include "split_util.h"
+#include "config.h"
+#include "transactions.h"
+
+#define ERROR_DISCONNECT_COUNT 5
+#define ROWS_PER_HAND (MATRIX_ROWS / 2)
+
+static const pin_t row_pins[ROWS_PER_HAND] = MATRIX_ROW_PINS;
+static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
+
+/* matrix state(1:on, 0:off) */
+extern matrix_row_t raw_matrix[MATRIX_ROWS]; // raw values
+extern matrix_row_t matrix[MATRIX_ROWS]; // debounced values
+
+// row offsets for each hand
+uint8_t thisHand, thatHand;
+
+// user-defined overridable functions
+__attribute__((weak)) void matrix_slave_scan_kb(void) { matrix_slave_scan_user(); }
+__attribute__((weak)) void matrix_slave_scan_user(void) {}
+
+static void init_pins(void) {
+ for (size_t i = 0; i < MATRIX_COLS; i++) {
+ setPinInputHigh(col_pins[i]);
+ }
+ for (size_t i = 0; i < ROWS_PER_HAND; i++) {
+ setPinOutput(row_pins[i]);
+ writePinHigh(row_pins[i]);
+ }
+}
+
+void matrix_init(void) {
+ split_pre_init();
+
+ thisHand = isLeftHand ? 0 : (ROWS_PER_HAND);
+ thatHand = ROWS_PER_HAND - thisHand;
+
+ // initialize key pins
+ init_pins();
+
+ // initialize matrix state: all keys off
+ memset(raw_matrix, 0, sizeof(raw_matrix));
+ memset(matrix, 0, sizeof(matrix));
+
+ debounce_init(ROWS_PER_HAND);
+
+ matrix_init_quantum();
+
+ split_post_init();
+}
+
+bool matrix_post_scan(void) {
+ bool changed = false;
+ if (is_keyboard_master()) {
+ static uint8_t error_count;
+
+ matrix_row_t slave_matrix[ROWS_PER_HAND] = {0};
+ if (!transport_master(matrix + thisHand, slave_matrix)) {
+ error_count++;
+
+ if (error_count > ERROR_DISCONNECT_COUNT) {
+ // reset other half if disconnected
+ memset(&matrix[thatHand], 0, sizeof(slave_matrix));
+ memset(slave_matrix, 0, sizeof(slave_matrix));
+
+ changed = true;
+ }
+ } else {
+ error_count = 0;
+
+ if (memcmp(&matrix[thatHand], slave_matrix, sizeof(slave_matrix)) != 0) {
+ memcpy(&matrix[thatHand], slave_matrix, sizeof(slave_matrix));
+ changed = true;
+ }
+ }
+
+ matrix_scan_quantum();
+ } else {
+ transport_slave(matrix + thatHand, matrix + thisHand);
+
+ matrix_slave_scan_kb();
+ }
+
+ return changed;
+}
+
+uint8_t matrix_scan(void) {
+ bool local_changed = false;
+ matrix_row_t current_matrix[ROWS_PER_HAND];
+
+ for (size_t row_idx = 0; row_idx < ROWS_PER_HAND; row_idx++) {
+ /* Drive row pin low. */
+ ATOMIC_BLOCK_FORCEON { writePinLow(row_pins[row_idx]); }
+ matrix_output_select_delay();
+
+ /* Read all columns in one go, aka port scanning. */
+ uint16_t porta = palReadPort(GPIOA);
+ uint16_t portb = palReadPort(GPIOB);
+
+ /* Order of pins on the mun is: A0, B11, B0, B10, B12, B2, A8
+ Pin is active low, therefore we have to invert the result. */
+ matrix_row_t cols = ~(((porta & (0x1 << 0)) >> 0) // A0 (0)
+ | ((portb & (0x1 << 11)) >> 10) // B11 (1)
+ | ((portb & (0x1 << 0)) << 2) // B0 (2)
+ | ((portb & (0x1 << 10)) >> 7) // B10 (3)
+ | ((portb & (0x1 << 12)) >> 8) // B12 (4)
+ | ((portb & (0x1 << 2)) << 3) // B2 (5)
+ | ((porta & (0x1 << 8)) >> 2)); // A8 (6)
+
+ /* Reverse the order of columns for left hand as the board is flipped. */
+ // if (isLeftHand) {
+ // #if defined(__arm__)
+ // /* rbit assembly reverses bit order of 32bit registers. */
+ // uint32_t temp = cols;
+ // __asm__("rbit %0, %1" : "=r"(temp) : "r"(temp));
+ // cols = temp >> 24;
+ // #else
+ // /* RISC-V bit manipulation extension not present. Use bit-hack.
+ // https://graphics.stanford.edu/~seander/bithacks.html#ReverseByteWith32Bits */
+ // cols = (matrix_row_t)(((cols * 0x0802LU & 0x22110LU) | (cols * 0x8020LU & 0x88440LU)) * 0x10101LU >> 16);
+ // #endif
+ // }
+
+ current_matrix[row_idx] = cols;
+
+ /* Drive row pin high again. */
+ ATOMIC_BLOCK_FORCEON { writePinHigh(row_pins[row_idx]); }
+ matrix_output_unselect_delay();
+ }
+
+ if (memcmp(raw_matrix, current_matrix, sizeof(current_matrix)) != 0) {
+ memcpy(raw_matrix, current_matrix, sizeof(current_matrix));
+ local_changed = true;
+ }
+
+ debounce(raw_matrix, matrix + thisHand, ROWS_PER_HAND, local_changed);
+
+ bool remote_changed = matrix_post_scan();
+ return (uint8_t)(local_changed || remote_changed);
+} \ No newline at end of file
diff --git a/keyboards/rgbkb/mun/mcuconf.h b/keyboards/rgbkb/mun/mcuconf.h
new file mode 100644
index 0000000000..acc083d8a5
--- /dev/null
+++ b/keyboards/rgbkb/mun/mcuconf.h
@@ -0,0 +1,42 @@
+/*
+ * ----------------------------------------------------------------------------
+ * "THE BEER-WARE LICENSE" (Revision 42):
+ * <https://github.com/Legonut> wrote this file. As long as you retain this
+ * notice you can do whatever you want with this stuff. If we meet some day, and
+ * you think this stuff is worth it, you can buy me a beer in return. David Rauseo
+ * ----------------------------------------------------------------------------
+ */
+
+#pragma once
+
+#include_next <mcuconf.h>
+
+#undef STM32_DAC_USE_DAC1_CH1
+#define STM32_DAC_USE_DAC1_CH1 TRUE
+
+#undef STM32_DAC_USE_DAC1_CH2
+#define STM32_DAC_USE_DAC1_CH2 TRUE
+
+#undef STM32_GPT_USE_TIM6
+#define STM32_GPT_USE_TIM6 TRUE
+
+#undef STM32_GPT_USE_TIM7
+#define STM32_GPT_USE_TIM7 TRUE
+
+#undef STM32_GPT_USE_TIM8
+#define STM32_GPT_USE_TIM8 TRUE
+
+#undef STM32_GPT_USE_TIM15
+#define STM32_GPT_USE_TIM15 TRUE
+
+#undef STM32_I2C_USE_I2C1
+#define STM32_I2C_USE_I2C1 TRUE
+
+#undef STM32_PWM_USE_TIM3
+#define STM32_PWM_USE_TIM3 TRUE
+
+#undef STM32_PWM_USE_TIM4
+#define STM32_PWM_USE_TIM4 TRUE
+
+#undef STM32_SERIAL_USE_USART1
+#define STM32_SERIAL_USE_USART1 TRUE \ No newline at end of file
diff --git a/keyboards/rgbkb/mun/mun.c b/keyboards/rgbkb/mun/mun.c
new file mode 100644
index 0000000000..5dabecc134
--- /dev/null
+++ b/keyboards/rgbkb/mun/mun.c
@@ -0,0 +1,35 @@
+/*
+ * ----------------------------------------------------------------------------
+ * "THE BEER-WARE LICENSE" (Revision 42):
+ * <https://github.com/Legonut> wrote this file. As long as you retain this
+ * notice you can do whatever you want with this stuff. If we meet some day, and
+ * you think this stuff is worth it, you can buy me a beer in return. David Rauseo
+ * ----------------------------------------------------------------------------
+ */
+
+#include "mun.h"
+#include "touch_encoder.h"
+#include "common_oled.h"
+#include <transactions.h>
+
+void keyboard_post_init_kb(void)
+{
+ touch_encoder_init();
+ transaction_register_rpc(TOUCH_ENCODER_SYNC, touch_encoder_slave_sync);
+ transaction_register_rpc(RGB_MENU_SYNC, rgb_menu_slave_sync);
+ keyboard_post_init_user();
+}
+
+void housekeeping_task_kb(void)
+{
+ touch_encoder_update(TOUCH_ENCODER_SYNC);
+ rgb_menu_update(RGB_MENU_SYNC);
+}
+
+#if defined(BUSY_WAIT)
+void matrix_output_unselect_delay(void) {
+ for (int32_t i = 0; i < BUSY_WAIT_INSTRUCTIONS; i++) {
+ __asm__ volatile("nop" ::: "memory");
+ }
+}
+#endif \ No newline at end of file
diff --git a/keyboards/rgbkb/mun/mun.h b/keyboards/rgbkb/mun/mun.h
new file mode 100644
index 0000000000..beb132f0ec
--- /dev/null
+++ b/keyboards/rgbkb/mun/mun.h
@@ -0,0 +1,16 @@
+/*
+ * ----------------------------------------------------------------------------
+ * "THE BEER-WARE LICENSE" (Revision 42):
+ * <https://github.com/Legonut> wrote this file. As long as you retain this
+ * notice you can do whatever you want with this stuff. If we meet some day, and
+ * you think this stuff is worth it, you can buy me a beer in return. David Rauseo
+ * ----------------------------------------------------------------------------
+ */
+
+#pragma once
+
+#if defined(KEYBOARD_rgbkb_mun_rev1)
+# include "rev1.h"
+#endif
+
+#include "quantum.h" \ No newline at end of file
diff --git a/keyboards/rgbkb/mun/readme.md b/keyboards/rgbkb/mun/readme.md
new file mode 100644
index 0000000000..6a18611539
--- /dev/null
+++ b/keyboards/rgbkb/mun/readme.md
@@ -0,0 +1,15 @@
+# Mün
+
+![Mün](https://i.redd.it/zw534js2o5861.jpg)
+
+Mün is powered by STM32 with full QMK support. Each key has super-bright RGB backlighting and MX Kailh hotswap sockets. No soldering is required to get a fully functioning keyboard. There are an additional 14 rear-facing RGB LEDs on each side. Each half can be configured to run as master or slave with the two USB-C ports. They also support up to two rotary encoders and one OLED panel per half.
+
+Keyboard Maintainer: [Legonut](https://github.com/Legonut)
+Hardware Supported: Mün PCB R1.0, R1.1, R1.2
+Hardware Availability: [RGBKB](https://www.rgbkb.net)
+
+Make example for this keyboard (after setting up your build environment):
+
+ make rgbkb/mun:default
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/rgbkb/mun/rev1/config.h b/keyboards/rgbkb/mun/rev1/config.h
new file mode 100644
index 0000000000..7ff0b54903
--- /dev/null
+++ b/keyboards/rgbkb/mun/rev1/config.h
@@ -0,0 +1,12 @@
+/*
+ * ----------------------------------------------------------------------------
+ * "THE BEER-WARE LICENSE" (Revision 42):
+ * <https://github.com/Legonut> wrote this file. As long as you retain this
+ * notice you can do whatever you want with this stuff. If we meet some day, and
+ * you think this stuff is worth it, you can buy me a beer in return. David Rauseo
+ * ----------------------------------------------------------------------------
+ */
+
+#pragma once
+
+#define DEVICE_VER 0x0001
diff --git a/keyboards/rgbkb/mun/rev1/info.json b/keyboards/rgbkb/mun/rev1/info.json
new file mode 100644
index 0000000000..c644b9bdc8
--- /dev/null
+++ b/keyboards/rgbkb/mun/rev1/info.json
@@ -0,0 +1,101 @@
+{
+ "keyboard_name": "Mun",
+ "url": "https://www.rgbkb.net/products/mun",
+ "maintainer": "Legonut",
+ "width": 13.5,
+ "height": 6.5,
+ "layouts": {
+ "LAYOUT": {
+ "layout": [
+ {"label":"L00", "x":0, "y":0},
+ {"label":"L01", "x":1, "y":0},
+ {"label":"L02", "x":2, "y":0},
+ {"label":"L03", "x":3, "y":0},
+ {"label":"L04", "x":4, "y":0},
+ {"label":"L05", "x":5, "y":0},
+ {"label":"L06", "x":6, "y":0},
+ {"label":"R00", "x":7.5, "y":0},
+ {"label":"R01", "x":8.5, "y":0},
+ {"label":"R02", "x":9.5, "y":0},
+ {"label":"R03", "x":10.5, "y":0},
+ {"label":"R04", "x":11.5, "y":0},
+ {"label":"R05", "x":12.5, "y":0},
+ {"label":"R06", "x":13.5, "y":0},
+ {"label":"L10", "x":0, "y":1},
+ {"label":"L11", "x":1, "y":1},
+ {"label":"L12", "x":2, "y":1},
+ {"label":"L13", "x":3, "y":1},
+ {"label":"L14", "x":4, "y":1},
+ {"label":"L15", "x":5, "y":1},
+ {"label":"L16", "x":6, "y":1},
+ {"label":"R10", "x":7.5, "y":1},
+ {"label":"R11", "x":8.5, "y":1},
+ {"label":"R12", "x":9.5, "y":1},
+ {"label":"R13", "x":10.5, "y":1},
+ {"label":"R14", "x":11.5, "y":1},
+ {"label":"R15", "x":12.5, "y":1},
+ {"label":"R16", "x":13.5, "y":1},
+ {"label":"L20", "x":0, "y":2},
+ {"label":"L21", "x":1, "y":2},
+ {"label":"L22", "x":2, "y":2},
+ {"label":"L23", "x":3, "y":2},
+ {"label":"L24", "x":4, "y":2},
+ {"label":"L25", "x":5, "y":2},
+ {"label":"L26", "x":6, "y":2},
+ {"label":"R20", "x":7.5, "y":2},
+ {"label":"R21", "x":8.5, "y":2},
+ {"label":"R22", "x":9.5, "y":2},
+ {"label":"R23", "x":10.5, "y":2},
+ {"label":"R24", "x":11.5, "y":2},
+ {"label":"R25", "x":12.5, "y":2},
+ {"label":"R26", "x":13.5, "y":2},
+ {"label":"L30", "x":0, "y":3},
+ {"label":"L31", "x":1, "y":3},
+ {"label":"L32", "x":2, "y":3},
+ {"label":"L33", "x":3, "y":3},
+ {"label":"L34", "x":4, "y":3},
+ {"label":"L35", "x":5, "y":3},
+ {"label":"L36", "x":6, "y":3},
+ {"label":"R30", "x":7.5, "y":3},
+ {"label":"R21", "x":8.5, "y":3},
+ {"label":"R32", "x":9.5, "y":3},
+ {"label":"R33", "x":10.5, "y":3},
+ {"label":"R34", "x":11.5, "y":3},
+ {"label":"R35", "x":12.5, "y":3},
+ {"label":"R36", "x":13.5, "y":3},
+ {"label":"L40", "x":0, "y":4},
+ {"label":"L41", "x":1, "y":4},
+ {"label":"L42", "x":2, "y":4},
+ {"label":"L43", "x":3, "y":4},
+ {"label":"L44", "x":4, "y":4},
+ {"label":"L45", "x":5, "y":4},
+ {"label":"L46", "x":6, "y":4},
+ {"label":"R40", "x":7.5, "y":4},
+ {"label":"R41", "x":8.5, "y":4},
+ {"label":"R42", "x":9.5, "y":4},
+ {"label":"R43", "x":10.5, "y":4},
+ {"label":"R44", "x":11.5, "y":4},
+ {"label":"R45", "x":12.5, "y":4},
+ {"label":"R46", "x":13.5, "y":4},
+ {"label":"E00", "x":0, "y":5.5},
+ {"label":"E01", "x":1, "y":5.5},
+ {"label":"E10", "x":2, "y":5.5},
+ {"label":"E11", "x":3, "y":5.5},
+ {"label":"E20", "x":10.5, "y":5.5},
+ {"label":"E21", "x":11.5, "y":5.5},
+ {"label":"E30", "x":12.5, "y":5.5},
+ {"label":"E31", "x":13.5, "y":5.5},
+ {"label":"T00", "x":0, "y":6.5},
+ {"label":"T01", "x":1, "y":6.5},
+ {"label":"T02", "x":2, "y":6.5},
+ {"label":"T03", "x":3, "y":6.5},
+ {"label":"T04", "x":4, "y":6.5},
+ {"label":"T10", "x":9.5, "y":6.5},
+ {"label":"T11", "x":10.5, "y":6.5},
+ {"label":"T12", "x":11.5, "y":6.5},
+ {"label":"T13", "x":12.5, "y":6.5},
+ {"label":"T14", "x":13.5, "y":6.5}
+ ]
+ }
+ }
+}
diff --git a/keyboards/rgbkb/mun/rev1/readme.md b/keyboards/rgbkb/mun/rev1/readme.md
new file mode 100644
index 0000000000..6a18611539
--- /dev/null
+++ b/keyboards/rgbkb/mun/rev1/readme.md
@@ -0,0 +1,15 @@
+# Mün
+
+![Mün](https://i.redd.it/zw534js2o5861.jpg)
+
+Mün is powered by STM32 with full QMK support. Each key has super-bright RGB backlighting and MX Kailh hotswap sockets. No soldering is required to get a fully functioning keyboard. There are an additional 14 rear-facing RGB LEDs on each side. Each half can be configured to run as master or slave with the two USB-C ports. They also support up to two rotary encoders and one OLED panel per half.
+
+Keyboard Maintainer: [Legonut](https://github.com/Legonut)
+Hardware Supported: Mün PCB R1.0, R1.1, R1.2
+Hardware Availability: [RGBKB](https://www.rgbkb.net)
+
+Make example for this keyboard (after setting up your build environment):
+
+ make rgbkb/mun:default
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/rgbkb/mun/rev1/rev1.c b/keyboards/rgbkb/mun/rev1/rev1.c
new file mode 100644
index 0000000000..28ad843b52
--- /dev/null
+++ b/keyboards/rgbkb/mun/rev1/rev1.c
@@ -0,0 +1,122 @@
+/*
+ * ----------------------------------------------------------------------------
+ * "THE BEER-WARE LICENSE" (Revision 42):
+ * <https://github.com/Legonut> wrote this file. As long as you retain this
+ * notice you can do whatever you want with this stuff. If we meet some day, and
+ * you think this stuff is worth it, you can buy me a beer in return. David Rauseo
+ * ----------------------------------------------------------------------------
+ */
+
+#include "rev1.h"
+
+#define NUMBER_OF_TOUCH_ENCODERS 2
+#define TOUCH_ENCODER_OPTIONS TOUCH_SEGMENTS + 2
+
+#define NUMBER_OF_ENCODERS 4
+#define ENCODER_OPTIONS 2
+
+typedef struct PACKED {
+ uint8_t r;
+ uint8_t c;
+} encodermap_t;
+
+// this maps encoders and then touch encoders to their respective electrical matrix entry
+// mapping is row (y) then column (x) when looking at the electrical layout
+const encodermap_t encoder_map[NUMBER_OF_ENCODERS][ENCODER_OPTIONS] =
+{
+ { { 5, 0 }, { 5, 1 } }, // Encoder 1 matrix entries
+ { { 5, 2 }, { 5, 3 } }, // Encoder 2 matrix entries
+ { { 12, 0 }, { 12, 1 } }, // Encoder 3 matrix entries
+ { { 12, 2 }, { 12, 3 } }, // Encoder 4 matrix entries
+};
+
+const encodermap_t touch_encoder_map[NUMBER_OF_TOUCH_ENCODERS][TOUCH_ENCODER_OPTIONS] =
+{
+ { { 6, 0 }, { 6, 1 }, { 6, 2 }, { 6, 3 }, { 6, 4 } }, // Touch Encoder 1 matrix entries
+ { { 13, 0 }, { 13, 1 }, { 13, 2 }, { 13, 3 }, { 13, 4 } } // Touch Encoder 2 matrix entries
+};
+
+static void process_encoder_matrix(encodermap_t pos) {
+ action_exec((keyevent_t){
+ .key = (keypos_t){.row = pos.r, .col = pos.c}, .pressed = true, .time = (timer_read() | 1) /* time should not be 0 */
+ });
+#if TAP_CODE_DELAY > 0
+ wait_ms(TAP_CODE_DELAY);
+#endif
+ action_exec((keyevent_t){
+ .key = (keypos_t){.row = pos.r, .col = pos.c}, .pressed = false, .time = (timer_read() | 1) /* time should not be 0 */
+ });
+}
+
+bool encoder_update_kb(uint8_t index, bool clockwise) {
+ if (!encoder_update_user(index, clockwise))
+ return false;
+
+ // Mapping clockwise (typically increase) to zero, and counter clockwise (decrease) to 1
+ process_encoder_matrix(encoder_map[index][clockwise ? 0 : 1]);
+ return false;
+}
+
+bool touch_encoder_update_kb(uint8_t index, bool clockwise) {
+ if (!touch_encoder_update_user(index, clockwise))
+ return false;
+
+ // Mapping clockwise (typically increase) to zero, and counter clockwise (decrease) to 1
+ process_encoder_matrix(touch_encoder_map[index][clockwise ? 0 : 1]);
+ return false;
+}
+
+bool touch_encoder_tapped_kb(uint8_t index, uint8_t section) {
+ if (!touch_encoder_tapped_user(index, section))
+ return false;
+
+ process_encoder_matrix(touch_encoder_map[index][section + 2]);
+ return false;
+}
+
+#ifdef RGB_MATRIX_ENABLE
+// clang-format off
+led_config_t g_led_config = { {
+ { 0, 1, 2, 3, 4, 5, 6 },
+ { 13, 12, 11, 10, 9, 8, 7 },
+ { 14, 15, 16, 17, 18, 19, 20 },
+ { 27, 26, 25, 24, 23, 22, 21 },
+ { 28, 29, 30, 31, 32, 33, 34 },
+ { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED },
+ { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED },
+ { 49, 50, 51, 52, 53, 54, 55 },
+ { 62, 61, 60, 59, 58, 57, 56 },
+ { 63, 64, 65, 66, 67, 68, 69 },
+ { 76, 75, 74, 73, 72, 71, 70 },
+ { 77, 78, 79, 80, 81, 82, 83 },
+ { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED },
+ { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED }
+}, {
+ { 16, 16},{ 34, 16},{ 49, 16},{ 64, 16},{ 79, 16},{ 94, 16},{ 109, 16},
+ { 109, 31},{ 94, 31},{ 79, 31},{ 64, 31},{ 49, 31},{ 34, 31},{ 16, 31},
+ { 16, 46},{ 34, 46},{ 49, 46},{ 64, 46},{ 79, 46},{ 94, 46},{ 109, 46},
+ { 109, 61},{ 94, 61},{ 79, 61},{ 64, 61},{ 49, 61},{ 34, 61},{ 16, 61},
+ { 16, 76},{ 34, 76},{ 49, 76},{ 64, 76},{ 83, 72},{ 98, 72},{ 113, 72},
+ { 97, 5},{ 91, 5},{ 86, 5},{ 80, 5},{ 75, 5},{ 69, 5},{ 63, 5},{ 58, 5},{ 52, 5},{ 46, 5},{ 41, 5},{ 35, 5},{ 30, 5},{ 24, 5},
+ { 240, 16},{ 222, 16},{ 207, 16},{ 192, 16},{ 177, 16},{ 162, 16},{ 147, 16},
+ { 147, 31},{ 162, 31},{ 177, 31},{ 192, 31},{ 207, 31},{ 222, 31},{ 240, 31},
+ { 240, 46},{ 222, 46},{ 207, 46},{ 192, 46},{ 177, 46},{ 162, 46},{ 147, 46},
+ { 147, 61},{ 162, 61},{ 177, 61},{ 192, 61},{ 207, 61},{ 222, 61},{ 240, 61},
+ { 240, 76},{ 222, 76},{ 207, 76},{ 192, 76},{ 180, 72},{ 165, 72},{ 150, 72},
+ { 159, 5},{ 164, 5},{ 170, 5},{ 176, 5},{ 181, 5},{ 187, 5},{ 192, 5},{ 198, 5},{ 204, 5},{ 209, 5},{ 215, 5},{ 221, 5},{ 226, 5},{ 232, 5},
+}, {
+ 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, 4, 1,
+ 1, 1, 1, 1, 1, 1, 1,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 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, 4, 1,
+ 1, 1, 1, 1, 1, 1, 1,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
+} };
+// clang-format on
+#endif
diff --git a/keyboards/rgbkb/mun/rev1/rev1.h b/keyboards/rgbkb/mun/rev1/rev1.h
new file mode 100644
index 0000000000..8e7b65f45c
--- /dev/null
+++ b/keyboards/rgbkb/mun/rev1/rev1.h
@@ -0,0 +1,43 @@
+/*
+ * ----------------------------------------------------------------------------
+ * "THE BEER-WARE LICENSE" (Revision 42):
+ * <https://github.com/Legonut> wrote this file. As long as you retain this
+ * notice you can do whatever you want with this stuff. If we meet some day, and
+ * you think this stuff is worth it, you can buy me a beer in return. David Rauseo
+ * ----------------------------------------------------------------------------
+ */
+
+#pragma once
+
+#include "mun.h"
+#include "touch_encoder.h"
+
+// clang-format off
+#define LAYOUT( \
+ 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, L36, R30, R31, R32, R33, R34, R35, R36, \
+ L40, L41, L42, L43, L44, L45, L46, R40, R41, R42, R43, R44, R45, R46, \
+ E00, E01, E10, E11, E20, E21, E30, E31, \
+ T00, T01, T02, T03, T04, T10, T11, T12, T13, T14 \
+) \
+{ \
+ /* Left Half */ \
+ { 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 }, \
+ { E00, E01, E10, E11, KC_NO, KC_NO, KC_NO }, \
+ { T00, T01, T02, T03, T04, KC_NO, KC_NO }, \
+ /* Right Half */ \
+ { 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 }, \
+ { E20, E21, E30, E31, KC_NO, KC_NO, KC_NO }, \
+ { T10, T11, T12, T13, T14, KC_NO, KC_NO } \
+}
+// clang-format on
diff --git a/keyboards/rgbkb/mun/rev1/rgbkb_mun_rev1_default.json b/keyboards/rgbkb/mun/rev1/rgbkb_mun_rev1_default.json
new file mode 100644
index 0000000000..ccf70ef5f9
--- /dev/null
+++ b/keyboards/rgbkb/mun/rev1/rgbkb_mun_rev1_default.json
@@ -0,0 +1,13 @@
+{
+ "keyboard": "rgbkb/mun/rev1",
+ "keymap": "default",
+ "commit": "xxxxxxxxxxxxxxxxxxxxx",
+ "layout": "LAYOUT",
+ "layers": [
+ ["KC_GESC","KC_1","KC_2","KC_3","KC_4","KC_5","KC_MINS","KC_EQL","KC_6","KC_7","KC_8","KC_9","KC_0","KC_BSPC","KC_TAB","KC_Q","KC_W","KC_E","KC_R","KC_T","KC_LBRC","KC_RBRC","KC_Y","KC_U","KC_I","KC_O","KC_P","KC_BSLS","LT(3,KC_CAPS)","KC_A","KC_S","KC_D","KC_F","KC_G","KC_LPRN","KC_RPRN","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_LCBR","KC_RCBR","KC_N","KC_M","KC_COMM","KC_DOT","KC_SLSH","KC_SFTENT","KC_LCTL","KC_LGUI","KC_LALT","RGB_TOG","MO(4)","KC_SPC","KC_BSPC","KC_ENT","KC_SPC","KC_LEFT","KC_DOWN","KC_UP","KC_RGHT","KC_RCTL","KC_VOLU","KC_VOLD","KC_VOLU","KC_VOLD","KC_PGUP","KC_PGDN","KC_PGUP","KC_PGDN","KC_VOLD","KC_VOLU","KC_MRWD","KC_MPLY","KC_MFFD","RGB_HUI","RGB_HUD","RGB_RMOD","RGB_TOG","RGB_MOD"],
+ ["KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_Q","KC_W","KC_F","KC_P","KC_G","KC_TRNS","KC_TRNS","KC_J","KC_L","KC_U","KC_Y","KC_SCLN","KC_TRNS","KC_TRNS","KC_A","KC_R","KC_S","KC_T","KC_D","KC_TRNS","KC_TRNS","KC_H","KC_N","KC_E","KC_I","KC_O","KC_TRNS","KC_TRNS","KC_Z","KC_X","KC_C","KC_V","KC_B","KC_TRNS","KC_TRNS","KC_K","KC_M","KC_COMM","KC_DOT","KC_SLSH","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS"],
+ ["KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_F1","KC_F5","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_Q","KC_W","KC_E","KC_R","KC_T","KC_F2","KC_F6","KC_Y","KC_U","KC_I","KC_O","KC_P","KC_TRNS","KC_TRNS","KC_A","KC_S","KC_D","KC_F","KC_G","KC_F3","KC_F7","KC_H","KC_J","KC_K","KC_L","KC_SCLN","KC_TRNS","KC_TRNS","KC_Z","KC_X","KC_C","KC_V","KC_B","KC_F4","KC_F8","KC_N","KC_M","KC_COMM","KC_DOT","KC_SLSH","KC_TRNS","KC_TRNS","KC_NO","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS"],
+ ["KC_TRNS","KC_F1","KC_F2","KC_F3","KC_F4","KC_F5","KC_F11","KC_F12","KC_F6","KC_F7","KC_F8","KC_F9","KC_F10","KC_TRNS","KC_TRNS","KC_HOME","KC_UP","KC_END","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_HOME","KC_UP","KC_END","KC_PSCR","KC_PGUP","KC_TRNS","KC_LEFT","KC_DOWN","KC_RGHT","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_LEFT","KC_DOWN","KC_RGHT","KC_INS","KC_PGDN","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","ANY(TCH_TOG)","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_MPLY","KC_MNXT","KC_MUTE","KC_VOLD","KC_VOLU","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS"],
+ ["KC_TRNS","KC_F1","KC_F2","KC_F3","KC_F4","KC_F5","KC_F11","KC_F12","KC_F6","KC_F7","KC_F8","KC_F9","KC_F10","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_P7","KC_P8","KC_P9","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_P4","KC_P5","KC_P6","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_P1","KC_P2","KC_P3","KC_TRNS","DF(2)","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_P0","KC_PDOT","KC_NLCK","DF(0)","DF(1)","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS"]
+ ]
+} \ No newline at end of file
diff --git a/keyboards/rgbkb/mun/rev1/rules.mk b/keyboards/rgbkb/mun/rev1/rules.mk
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/keyboards/rgbkb/mun/rev1/rules.mk
diff --git a/keyboards/rgbkb/mun/rules.mk b/keyboards/rgbkb/mun/rules.mk
new file mode 100644
index 0000000000..f016c6c710
--- /dev/null
+++ b/keyboards/rgbkb/mun/rules.mk
@@ -0,0 +1,46 @@
+# MCU name
+MCU = STM32F303
+
+# Touch encoder needs
+SRC += ../common/touch_encoder.c
+SRC += ../common/common_oled.c
+QUANTUM_LIB_SRC += i2c_master.c
+
+# Build Options
+# change to "no" to disable the options, or define them in the Makefile in
+# the appropriate keymap folder that will get included automatically
+#
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
+## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.)
+MOUSEKEY_ENABLE = no # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = yes # Console for debug
+COMMAND_ENABLE = no # Commands for debug and configuration
+NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+MIDI_ENABLE = no # MIDI controls
+AUDIO_ENABLE = no # Audio output
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+
+WS2812_DRIVER = pwm
+RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
+RGB_MATRIX_ENABLE = yes
+RGB_MATRIX_DRIVER = WS2812
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+
+OLED_DRIVER_ENABLE = yes # Enable the OLED Driver
+
+ENCODER_ENABLE = yes
+
+SPLIT_KEYBOARD = yes
+SERIAL_DRIVER = usart
+LTO_ENABLE = yes
+OPT = 3
+
+OPT_DEFS += -DOLED_FONT_H=\"../common/glcdfont.c\"
+OPT_DEFS += -Ikeyboards/rgbkb/common
+
+CUSTOM_MATRIX = yes
+SRC += matrix.c matrix_common.c
+
+DEFAULT_FOLDER = rgbkb/mun/rev1 \ No newline at end of file
diff --git a/keyboards/rgbkb/sol/rev2/config.h b/keyboards/rgbkb/sol/rev2/config.h
index 6613b447b2..4ffcecc6bb 100644
--- a/keyboards/rgbkb/sol/rev2/config.h
+++ b/keyboards/rgbkb/sol/rev2/config.h
@@ -28,23 +28,33 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* ws2812 RGB LED */
#define RGB_DI_PIN B7
-#define BACKLIGHT_LEDS 124
-
-#ifdef FULLHAND_ENABLE
- #define FULLHAND_LEDS 24
-#elif SF_ENABLE
- #define FULLHAND_LEDS 38
-#else
- #define FULLHAND_LEDS 0
-#endif
-
// Underglow / DIY Tent Glow are parallel to the top row leds, no separate define
-
+// Full Hand case adds 24 LEDs, Star Fighter case adds 38 LEDs
+// For mirrored LED control (each MCU controls half the LEDs), total LED counts are divided in half
#ifdef LED_MIRRORED
- #define RGBLED_NUM ((BACKLIGHT_LEDS + FULLHAND_LEDS) / 2)
+ #ifdef FULLHAND_ENABLE
+ #define FULLHAND_LEDS 24
+ #define RGBLED_NUM 74
+ #elif SF_ENABLE
+ #define FULLHAND_LEDS 38
+ #define RGBLED_NUM 81
+ #else
+ #define FULLHAND_LEDS 0
+ #define RGBLED_NUM 62
+ #endif
#else
- #define RGBLED_NUM (BACKLIGHT_LEDS + FULLHAND_LEDS)
+ #ifdef FULLHAND_ENABLE
+ #define FULLHAND_LEDS 24
+ #define RGBLED_NUM 148
+ #elif SF_ENABLE
+ #define FULLHAND_LEDS 38
+ #define RGBLED_NUM 162
+ #else
+ #define FULLHAND_LEDS 0
+ #define RGBLED_NUM 124
+ #endif
#endif
+
#define DRIVER_LED_TOTAL RGBLED_NUM
#define RGB_MATRIX_CENTER { 112, 37 }
diff --git a/keyboards/runner3680/5x8/keymaps/JIS/keymap.c b/keyboards/runner3680/5x8/keymaps/JIS/keymap.c
index 1b39cf08ef..75ff755651 100644
--- a/keyboards/runner3680/5x8/keymaps/JIS/keymap.c
+++ b/keyboards/runner3680/5x8/keymaps/JIS/keymap.c
@@ -39,7 +39,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-------------------------------------------------------' `-------------------------------------------------------'
*/
[_QWERTY] = LAYOUT(
- RGBRST , RGB_TOG, JP_ZHTG, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, JP_CIRC, JP_YEN,
+ RGBRST , RGB_TOG, JP_ZKHK, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, JP_CIRC, JP_YEN,
RGB_MOD, RGB_SAI, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JP_AT, JP_LBRC, KC_BSPC,
RGB_SAI, RGB_SAD, KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, JP_COLN, JP_RBRC, KC_ENT,
RGB_VAI, RGB_VAD, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, JP_BSLS, KC_UP, KC_RSFT,
diff --git a/keyboards/satt/vision/keymaps/satt/keymap.c b/keyboards/satt/vision/keymaps/satt/keymap.c
index 5735d34159..9529653408 100644
--- a/keyboards/satt/vision/keymaps/satt/keymap.c
+++ b/keyboards/satt/vision/keymaps/satt/keymap.c
@@ -81,7 +81,7 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_PSEUDO_US] = LAYOUT(
_______, _______, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, _______, _______,
_______, _______, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, JIS2US, _______,
- _______, KC_Z, KC_X, KC_C, KC_V, KC_B, JP_ZHTG, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, JIS2US,
+ _______, KC_Z, KC_X, KC_C, KC_V, KC_B, JP_ZKHK, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, JIS2US,
_______, _______, P_LOWER, _______, P_RAISE, _______, _______, _______
),
diff --git a/keyboards/satt/vision/keymaps/satt/keymap_jis2us.h b/keyboards/satt/vision/keymaps/satt/keymap_jis2us.h
index 916a403eb6..0b811fd03a 100644
--- a/keyboards/satt/vision/keymaps/satt/keymap_jis2us.h
+++ b/keyboards/satt/vision/keymaps/satt/keymap_jis2us.h
@@ -40,10 +40,10 @@ const uint16_t PROGMEM keymap_jis2us[][2] = {
[KC_BSLS] = { JP_YEN, JP_PIPE }, /* ] and } -> \ and | */
[KC_NUHS] = { JP_YEN, JP_PIPE }, /* ] and } -> \ and | */
[KC_SCLN] = { JP_SCLN, JP_COLN }, /* ; and + -> ; and : */
- [KC_QUOT] = { JP_QUOT, JP_DQT }, /* : and * -> ' and " */
+ [KC_QUOT] = { JP_QUOT, JP_DQUO }, /* : and * -> ' and " */
[KC_GRV] = { JP_GRV, JP_TILD }, /* Han/Zen -> ` and ~ */
- [KC_COMM] = { JP_COMM, JP_LT }, /* , and < -> , and < */
- [KC_DOT] = { JP_DOT, JP_GT }, /* . and > -> . and > */
+ [KC_COMM] = { JP_COMM, JP_LABK }, /* , and < -> , and < */
+ [KC_DOT] = { JP_DOT, JP_RABK }, /* . and > -> . and > */
[KC_SLSH] = { JP_SLSH, JP_QUES }, /* / and ? -> / and ? */
};
// clang-format on
diff --git a/keyboards/sendyyeah/75pixels/info.json b/keyboards/sendyyeah/75pixels/info.json
index 20d158cf74..d952cac134 100644
--- a/keyboards/sendyyeah/75pixels/info.json
+++ b/keyboards/sendyyeah/75pixels/info.json
@@ -7,7 +7,7 @@
"layouts": {
"LAYOUT_ortho_5x15": {
"layout": [
- {"label": "Esc", "X": 0, "y": 0},
+ {"label": "Esc", "x": 0, "y": 0},
{"label": "1", "x": 1, "y": 0},
{"label": "2", "x": 2, "y": 0},
{"label": "3", "x": 3, "y": 0},
@@ -22,21 +22,21 @@
{"label": "NumLock", "x": 12, "y": 0},
{"label": "/", "x": 13, "y": 0},
{"label": "*", "x": 14, "y": 0},
- {"label": "Tab", "X": 0, "y": 1},
- {"label": "Q", "X": 1, "y": 1},
- {"label": "W", "X": 2, "y": 1},
- {"label": "E", "X": 3, "y": 1},
- {"label": "R", "X": 4, "y": 1},
- {"label": "T", "X": 5, "y": 1},
- {"label": "Y", "X": 6, "y": 1},
- {"label": "U", "X": 7, "y": 1},
- {"label": "I", "X": 8, "y": 1},
- {"label": "O", "X": 9, "y": 1},
- {"label": "P", "X": 10, "y": 1},
- {"label": "|\n\\", "X": 11, "y": 1},
- {"label": "7\nHome", "X": 12, "y": 1},
- {"label": "8\nUp", "X": 13, "y": 1},
- {"label": "9\nPgUp", "X": 14, "y": 1},
+ {"label": "Tab", "x": 0, "y": 1},
+ {"label": "Q", "x": 1, "y": 1},
+ {"label": "W", "x": 2, "y": 1},
+ {"label": "E", "x": 3, "y": 1},
+ {"label": "R", "x": 4, "y": 1},
+ {"label": "T", "x": 5, "y": 1},
+ {"label": "Y", "x": 6, "y": 1},
+ {"label": "U", "x": 7, "y": 1},
+ {"label": "I", "x": 8, "y": 1},
+ {"label": "O", "x": 9, "y": 1},
+ {"label": "P", "x": 10, "y": 1},
+ {"label": "|\n\\", "x": 11, "y": 1},
+ {"label": "7\nHome", "x": 12, "y": 1},
+ {"label": "8\nUp", "x": 13, "y": 1},
+ {"label": "9\nPgUp", "x": 14, "y": 1},
{"label": "Caps", "x": 0, "y": 2},
{"label": "A", "x": 1, "y": 2},
{"label": "S", "x": 2, "y": 2},
@@ -67,21 +67,21 @@
{"label": "1\nEnd", "x": 12, "y": 3},
{"label": "2\nDown", "x": 13, "y": 3},
{"label": "3\nPgDn", "x": 14, "y": 3},
- {"label": "Ctrl", "X": 0, "y": 4},
- {"label": "Win", "X": 1, "y": 4},
- {"label": "Alt", "X": 2, "y": 4},
- {"label": "Fn", "X": 3, "y": 4},
- {"label": "Lower", "X": 4, "y": 4},
- {"label": "Space", "X": 5, "y": 4},
- {"label": "Space", "X": 6, "y": 4},
- {"label": "Raise", "X": 7, "y": 4},
- {"label": "Alt", "X": 8, "y": 4},
- {"label": "Win", "X": 9, "y": 4},
- {"label": "Menu", "X": 10, "y": 4},
- {"label": "Ctrl", "X": 11, "y": 4},
- {"label": "0\nIns", "X": 12, "y": 4},
- {"label": ".\nDel", "X": 13, "y": 4},
- {"label": "Enter", "X": 14, "y": 4}
+ {"label": "Ctrl", "x": 0, "y": 4},
+ {"label": "Win", "x": 1, "y": 4},
+ {"label": "Alt", "x": 2, "y": 4},
+ {"label": "Fn", "x": 3, "y": 4},
+ {"label": "Lower", "x": 4, "y": 4},
+ {"label": "Space", "x": 5, "y": 4},
+ {"label": "Space", "x": 6, "y": 4},
+ {"label": "Raise", "x": 7, "y": 4},
+ {"label": "Alt", "x": 8, "y": 4},
+ {"label": "Win", "x": 9, "y": 4},
+ {"label": "Menu", "x": 10, "y": 4},
+ {"label": "Ctrl", "x": 11, "y": 4},
+ {"label": "0\nIns", "x": 12, "y": 4},
+ {"label": ".\nDel", "x": 13, "y": 4},
+ {"label": "Enter", "x": 14, "y": 4}
]
}
}
diff --git a/keyboards/sentraq/s60_x/keymaps/dbroqua/keymap.c b/keyboards/sentraq/s60_x/keymaps/dbroqua/keymap.c
index 944ba7555f..3d4969aa1e 100644
--- a/keyboards/sentraq/s60_x/keymaps/dbroqua/keymap.c
+++ b/keyboards/sentraq/s60_x/keymaps/dbroqua/keymap.c
@@ -67,135 +67,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_SFX] = LAYOUT(
______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \
______, BL_TOGG,BL_STEP,BL_DEC, BL_INC, ______, ______, ______, ______, ______, ______, ______, ______, ______, \
- ______, F(0), F(1), ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \
- ______, ______, F(2), F(3), F(4), F(5), F(6), F(7), ______, ______, ______, ______, ______, ______, \
+ ______, RGB_TOG,RGB_MOD,______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \
+ ______, ______, RGB_HUI,RGB_HUD,RGB_SAI,RGB_SAD,RGB_VAI,RGB_VAD,______, ______, ______, ______, ______, ______, \
______, ______, ______, ______, ______, ______, ______, ______ \
)
};
-
-enum function_id {
- RGBLED_TOGGLE,
- RGBLED_STEP_MODE,
- RGBLED_INCREASE_HUE,
- RGBLED_DECREASE_HUE,
- RGBLED_INCREASE_SAT,
- RGBLED_DECREASE_SAT,
- RGBLED_INCREASE_VAL,
- RGBLED_DECREASE_VAL
-};
-
-const uint16_t PROGMEM fn_actions[] = {
- [0] = ACTION_FUNCTION(RGBLED_TOGGLE),
- [1] = ACTION_FUNCTION(RGBLED_STEP_MODE),
- [2] = ACTION_FUNCTION(RGBLED_INCREASE_HUE),
- [3] = ACTION_FUNCTION(RGBLED_DECREASE_HUE),
- [4] = ACTION_FUNCTION(RGBLED_INCREASE_SAT),
- [5] = ACTION_FUNCTION(RGBLED_DECREASE_SAT),
- [6] = ACTION_FUNCTION(RGBLED_INCREASE_VAL),
- [7] = ACTION_FUNCTION(RGBLED_DECREASE_VAL)
-};
-
-void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
- switch (id) {
- case RGBLED_TOGGLE:
- if (record->event.pressed) {
- #ifdef RGB_ENABLE
- rgblight_toggle();
- #endif
- }
- break;
- case RGBLED_INCREASE_HUE:
- if (record->event.pressed) {
- #ifdef RGB_ENABLE
- rgblight_increase_hue();
- #endif
- }
- break;
- case RGBLED_DECREASE_HUE:
- if (record->event.pressed) {
- #ifdef RGB_ENABLE
- rgblight_decrease_hue();
- #endif
- }
- break;
- case RGBLED_INCREASE_SAT:
- if (record->event.pressed) {
- #ifdef RGB_ENABLE
- rgblight_increase_sat();
- #endif
- }
- break;
- case RGBLED_DECREASE_SAT:
- if (record->event.pressed) {
- #ifdef RGB_ENABLE
- rgblight_decrease_sat();
- #endif
- }
- break;
- case RGBLED_INCREASE_VAL:
- if (record->event.pressed) {
- #ifdef RGB_ENABLE
- rgblight_increase_val();
- #endif
- }
- break;
- case RGBLED_DECREASE_VAL:
- if (record->event.pressed) {
- #ifdef RGB_ENABLE
- rgblight_decrease_val();
- #endif
- }
- break;
- case RGBLED_STEP_MODE:
- if (record->event.pressed) {
- #ifdef RGB_ENABLE
- rgblight_step();
- #endif
- }
- break;
- }
-}
-
-void matrix_init_user(void) {
-}
-
-void matrix_scan_user(void) {
-}
-
-bool process_record_user(uint16_t keycode, keyrecord_t *record) {
- return true;
-}
-
-void led_set_user(uint8_t usb_led) {
-
- if (usb_led & (1 << USB_LED_NUM_LOCK)) {
-
- } else {
-
- }
-
- if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
-
- } else {
-
- }
-
- if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
-
- } else {
-
- }
-
- if (usb_led & (1 << USB_LED_COMPOSE)) {
-
- } else {
-
- }
-
- if (usb_led & (1 << USB_LED_KANA)) {
-
- } else {
-
- }
-
-}
diff --git a/keyboards/sergiopoverony/creator_pro/config.h b/keyboards/sergiopoverony/creator_pro/config.h
new file mode 100644
index 0000000000..3bf7efc77d
--- /dev/null
+++ b/keyboards/sergiopoverony/creator_pro/config.h
@@ -0,0 +1,49 @@
+/* Copyright 2020-2021 SergioPoverony
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+#include "config_common.h"
+
+/* vid pid */
+#define VENDOR_ID 0x8B1E
+#define PRODUCT_ID 0x0C00
+#define DEVICE_VER 0x0001
+#define MANUFACTURER SergioPoverony
+#define PRODUCT Creator Pro
+
+
+/* key matrix size pins */
+#define MATRIX_ROWS 1
+#define MATRIX_COLS 9
+#define DIRECT_PINS { \
+ { D1, D4, C6, D7, \
+ E6, \
+ B2, B3, B1, F7 } \
+}
+
+
+/*led layout indication pins*/
+#define RED_LED D0
+#define BLUE_LED B5
+#define GREEN_LED B6
+
+/* encoder pins*/
+#define ENCODERS_PAD_A { D2 }
+#define ENCODERS_PAD_B { D3 }
+#define ENCODER_RESOLUTION 1
+
+#define UNUSED_PINS
+
diff --git a/keyboards/sergiopoverony/creator_pro/creator_pro.c b/keyboards/sergiopoverony/creator_pro/creator_pro.c
new file mode 100644
index 0000000000..55c0497df2
--- /dev/null
+++ b/keyboards/sergiopoverony/creator_pro/creator_pro.c
@@ -0,0 +1,33 @@
+/* Copyright 2020-2021 SergioPoverony
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
+#include "creator_pro.h"
+
+void matrix_init_kb(void) {
+ matrix_init_user();
+/* led pins */
+ setPinOutput(RED_LED);
+ setPinOutput(BLUE_LED);
+ setPinOutput(GREEN_LED);
+}
+void turn_off_leds(void) {
+ writePinLow(RED_LED);
+ writePinLow(BLUE_LED);
+ writePinLow(GREEN_LED);
+}
+void turn_on_led(pin_t pin) {
+ writePinHigh(pin);
+}
diff --git a/keyboards/sergiopoverony/creator_pro/creator_pro.h b/keyboards/sergiopoverony/creator_pro/creator_pro.h
new file mode 100644
index 0000000000..566e94a77a
--- /dev/null
+++ b/keyboards/sergiopoverony/creator_pro/creator_pro.h
@@ -0,0 +1,33 @@
+/* Copyright 2020-2021 SergioPoverony
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+#include "quantum.h"
+
+#define LAYOUT( \
+K01, K02, K03, K04, \
+ K05, \
+K06, K07, K08, K09 \
+) { { \
+K01, K02, K03, K04, \
+ K05, \
+K06, K07, K08, K09 \
+} }
+
+/*led work*/
+void turn_off_leds(void);
+void turn_on_led(pin_t pin);
+
diff --git a/keyboards/sergiopoverony/creator_pro/info.json b/keyboards/sergiopoverony/creator_pro/info.json
new file mode 100644
index 0000000000..1e6bceec5b
--- /dev/null
+++ b/keyboards/sergiopoverony/creator_pro/info.json
@@ -0,0 +1,22 @@
+{
+ "keyboard_name": "Creator Pro",
+ "url": "https://github.com/sergiopoverony",
+ "maintainer": "SergioPoverony",
+ "width": 3,
+ "height": 3,
+ "layouts": {
+ "LAYOUT": {
+ "layout": [
+ {"x":0, "y":0},
+ {"x":1, "y":0},
+ {"x":2, "y":0},
+ {"x":3, "y":0},
+ {"x":4.5, "y":0.5},
+ {"x":0, "y":1},
+ {"x":1, "y":1},
+ {"x":2, "y":1},
+ {"x":3, "y":1}
+ ]
+ }
+ }
+}
diff --git a/keyboards/sergiopoverony/creator_pro/keymaps/default/keymap.c b/keyboards/sergiopoverony/creator_pro/keymaps/default/keymap.c
new file mode 100644
index 0000000000..d29621929b
--- /dev/null
+++ b/keyboards/sergiopoverony/creator_pro/keymaps/default/keymap.c
@@ -0,0 +1,123 @@
+/* Copyright 2020-2021 SergioPoverony
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
+ #include QMK_KEYBOARD_H
+
+/* enum layers num */
+enum layer_number {
+ _HOME = 0,
+ _RED,
+ _BLUE,
+ _GREEN
+};
+
+/* Encoder function with layers function */
+bool encoder_update_user(uint8_t index, bool clockwise) {
+ if (index == 0) {
+ switch (get_highest_layer(layer_state)) {
+
+ case _HOME:
+ if (clockwise) {
+ tap_code(KC_VOLU);
+ } else {
+ tap_code(KC_VOLD);
+ }
+ break;
+
+ case _RED:
+ if (clockwise) {
+ tap_code(KC_MS_WH_UP);
+ } else {
+ tap_code(KC_MS_WH_DOWN);
+ }
+ break;
+
+ case _BLUE:
+ if (clockwise) {
+ tap_code(KC_PGUP);
+ } else {
+ tap_code(KC_PGDN);
+ }
+ break;
+
+ case _GREEN:
+ default:
+ if (clockwise) {
+ tap_code16(KC_LEFT);
+ } else {
+ tap_code16(KC_RIGHT);
+ }
+ break;
+ }
+ }
+ return true;
+}
+
+
+/* Layout */
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [_HOME] = LAYOUT(
+ KC_1, KC_2, KC_3, KC_4,
+ TO(_RED),
+ KC_5, KC_6, KC_7, KC_8
+ ),
+
+ [_RED] = LAYOUT(
+ KC_Q, KC_W, KC_E, KC_R,
+ TO(_BLUE),
+ KC_A, KC_S, KC_D, KC_F
+ ),
+
+ [_BLUE] = LAYOUT(
+ KC_1, KC_2, KC_3, KC_4,
+ TO(_GREEN),
+ KC_5, KC_6, KC_7, KC_8
+ ),
+
+ [_GREEN] = LAYOUT(
+ KC_1, KC_2, KC_3, KC_4,
+ TO(_HOME),
+ KC_5, KC_6, KC_7, KC_8
+ ),
+};
+
+
+/* Select led layout */
+layer_state_t layer_state_set_user(layer_state_t state)
+{
+ turn_off_leds();
+
+ switch (get_highest_layer(state))
+ {
+ case _HOME:
+ turn_on_led(RED_LED);
+ turn_on_led(BLUE_LED);
+ break;
+
+ case _RED:
+ turn_on_led(RED_LED);
+ break;
+
+ case _BLUE:
+ turn_on_led(BLUE_LED);
+ break;
+
+ case _GREEN:
+ turn_on_led(GREEN_LED);
+ break;
+ }
+ return state;
+};
diff --git a/keyboards/sergiopoverony/creator_pro/keymaps/default/readme.md b/keyboards/sergiopoverony/creator_pro/keymaps/default/readme.md
new file mode 100644
index 0000000000..f899eb3c13
--- /dev/null
+++ b/keyboards/sergiopoverony/creator_pro/keymaps/default/readme.md
@@ -0,0 +1,5 @@
+![Creator Pro Layout](https://i.imgur.com/0PmpLcM.png)
+
+# Default Creator Pro Layout
+
+This is the default layout that comes flashed on every Creator Pro. The right most key (Encoder) is the rotary and the key is binded to layer switching. \ No newline at end of file
diff --git a/keyboards/sergiopoverony/creator_pro/keymaps/via/keymap.c b/keyboards/sergiopoverony/creator_pro/keymaps/via/keymap.c
new file mode 100644
index 0000000000..7566772461
--- /dev/null
+++ b/keyboards/sergiopoverony/creator_pro/keymaps/via/keymap.c
@@ -0,0 +1,123 @@
+/* Copyright 2020-2021 SergioPoverony
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
+ #include QMK_KEYBOARD_H
+
+/* enum layers num */
+enum layer_number {
+ _HOME = 0,
+ _RED,
+ _BLUE,
+ _GREEN
+};
+
+/* Encoder function with layers function */
+bool encoder_update_user(uint8_t index, bool clockwise) {
+ if (index == 0) {
+ switch (get_highest_layer(layer_state)) {
+
+ case _HOME:
+ if (clockwise) {
+ tap_code(KC_VOLU);
+ } else {
+ tap_code(KC_VOLD);
+ }
+ break;
+
+ case _RED:
+ if (clockwise) {
+ tap_code(KC_MS_WH_UP);
+ } else {
+ tap_code(KC_MS_WH_DOWN);
+ }
+ break;
+
+ case _BLUE:
+ if (clockwise) {
+ tap_code(KC_PGUP);
+ } else {
+ tap_code(KC_PGDN);
+ }
+ break;
+
+ case _GREEN:
+ default:
+ if (clockwise) {
+ tap_code16(KC_LEFT);
+ } else {
+ tap_code16(KC_RIGHT);
+ }
+ break;
+ }
+ }
+ return true;
+}
+
+
+/* Layout */
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [_HOME] = LAYOUT(
+ KC_1, KC_2, KC_3, KC_4,
+ TO(_RED),
+ KC_5, KC_6, KC_7, KC_8
+ ),
+
+ [_RED] = LAYOUT(
+ KC_Q, KC_W, KC_E, KC_R,
+ TO(_BLUE),
+ KC_A, KC_S, KC_D, KC_F
+ ),
+
+ [_BLUE] = LAYOUT(
+ KC_1, KC_2, KC_3, KC_4,
+ TO(_GREEN),
+ KC_5, KC_6, KC_7, KC_8
+ ),
+
+ [_GREEN] = LAYOUT(
+ KC_1, KC_2, KC_3, KC_4,
+ TO(_HOME),
+ KC_5, KC_6, KC_7, KC_8
+ ),
+};
+
+
+/* Select led layout */
+layer_state_t layer_state_set_user(layer_state_t state)
+{
+ turn_off_leds();
+
+ switch (get_highest_layer(state))
+ {
+ case _HOME:
+ turn_on_led(RED_LED);
+ turn_on_led(BLUE_LED);
+ break;
+
+ case _RED:
+ turn_on_led(RED_LED);
+ break;
+
+ case _BLUE:
+ turn_on_led(BLUE_LED);
+ break;
+
+ case _GREEN:
+ turn_on_led(GREEN_LED);
+ break;
+ }
+ return state;
+};
diff --git a/keyboards/sergiopoverony/creator_pro/keymaps/via/rules.mk b/keyboards/sergiopoverony/creator_pro/keymaps/via/rules.mk
new file mode 100644
index 0000000000..1e5b99807c
--- /dev/null
+++ b/keyboards/sergiopoverony/creator_pro/keymaps/via/rules.mk
@@ -0,0 +1 @@
+VIA_ENABLE = yes
diff --git a/keyboards/sergiopoverony/creator_pro/readme.md b/keyboards/sergiopoverony/creator_pro/readme.md
new file mode 100644
index 0000000000..601c069d91
--- /dev/null
+++ b/keyboards/sergiopoverony/creator_pro/readme.md
@@ -0,0 +1,27 @@
+# Creator Pro
+
+![Creator Pro Layout](https://i.imgur.com/G3Yf20D.jpg)
+
+This Keypad has 1 rows x 9 columns of keys. It has the top/default layer that
+has a few 1-8 keys as well as one dedicated encoder key for change layer. The
+ second layer has QWERASDF keys. Encoder have 4 function on any layer is
+ Volume Control, Mouse Wheel, PageUp/PageDn, Left/Righ buttons.
+The keypad also includes three RGB LEDs that show active layer.
+For enter the bootloader to flash new firmware need press hw reset button hole on the bottom
+
+Keyboard Maintainer: [SergioPoverony](https://github.com/sergiopoverony)
+
+Hardware:
+ * For enter the bootloader to flash new firmware need press hw reset button hole on the bottom
+ * Key switch holes cut fabrication in blank PCB
+ * Uses Gateron Brown switches with gray keycaps XDA profile
+ * Chassis is PCB with supports
+ * PCB fabrication
+ * Uses a Pro Micro wint MicroUSB connector
+ * Includes a reset switch accessible by a hole on the bottom
+
+Make example for this keyboard (after setting up your build environment):
+
+ make sergiopoverony/creator_pro:default
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/sergiopoverony/creator_pro/rules.mk b/keyboards/sergiopoverony/creator_pro/rules.mk
new file mode 100644
index 0000000000..aee3a1398e
--- /dev/null
+++ b/keyboards/sergiopoverony/creator_pro/rules.mk
@@ -0,0 +1,23 @@
+# MCU name
+MCU = atmega32u4
+
+# Bootloader selection
+BOOTLOADER = caterina
+
+# Build Options
+# change yes to no to disable
+#
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
+MOUSEKEY_ENABLE = yes # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = yes # Console for debug
+COMMAND_ENABLE = yes # Commands for debug and configuration
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+NKRO_ENABLE = no # USB Nkey Rollover
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
+RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
+BLUETOOTH_ENABLE = no # Enable Bluetooth
+AUDIO_ENABLE = no # Audio output
+ENCODER_ENABLE = yes
diff --git a/keyboards/setta21/keymaps/salicylic/config.h b/keyboards/setta21/keymaps/salicylic/config.h
index 44b34aa2fd..06e23ba7a3 100644
--- a/keyboards/setta21/keymaps/salicylic/config.h
+++ b/keyboards/setta21/keymaps/salicylic/config.h
@@ -27,7 +27,7 @@
# define RGB_MATRIX_KEYPRESSES // reacts to keypresses
// # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
// # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
// # define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness)
// # 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 200 out of 255. If not defined maximum brightness is set to 255
@@ -37,4 +37,3 @@
# define RGB_MATRIX_VAL_STEP 5
# define RGB_MATRIX_SPD_STEP 10
#endif
-
diff --git a/keyboards/shk9/rules.mk b/keyboards/shk9/rules.mk
index 8d356cbd1a..5f1b6954ee 100644
--- a/keyboards/shk9/rules.mk
+++ b/keyboards/shk9/rules.mk
@@ -20,5 +20,3 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
BLUETOOTH_ENABLE = no # Enable Bluetooth
AUDIO_ENABLE = no # Audio output
-
-LAYOUTS = ortho_3x3 \ No newline at end of file
diff --git a/keyboards/sofle/keymaps/devdev/config.h b/keyboards/sofle/keymaps/devdev/config.h
index 7d597d991a..32d0717352 100644
--- a/keyboards/sofle/keymaps/devdev/config.h
+++ b/keyboards/sofle/keymaps/devdev/config.h
@@ -1,18 +1,18 @@
/* Copyright 2021 Dane Evans
- *
- * 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 <http://www.gnu.org/licenses/>.
-*/
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+*/
#pragma once
@@ -29,7 +29,7 @@
#define CUSTOM_FONT
-#define CUSTOM_LAYER_READ //if you remove this it causes issues - needs better guarding
+#define CUSTOM_LAYER_READ //if you remove this it causes issues - needs better guarding
#define TAPPING_FORCE_HOLD
@@ -56,7 +56,7 @@
#ifdef RGBLIGHT_ENABLE
#undef RGBLED_NUM
-
+
//#define RGBLIGHT_ANIMATIONS
//#define RGBLIGHT_EFFECT_BREATHING
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
@@ -68,11 +68,11 @@
//#define RGBLIGHT_EFFECT_RGB_TEST
//#define RGBLIGHT_EFFECT_ALTERNATING
//#define RGBLIGHT_EFFECT_TWINKLE
-
+
#define RGBLED_NUM 70
//#define RGBLED_SPLIT
- #define RGBLED_SPLIT { 35, 35 } // haven't figured out how to use this yet
-
+ #define RGBLED_SPLIT { 35, 35 } // haven't figured out how to use this yet
+
//#define RGBLED_NUM 30
#define RGBLIGHT_LIMIT_VAL 120
#define RGBLIGHT_HUE_STEP 10
@@ -84,11 +84,11 @@
# define RGB_MATRIX_KEYPRESSES // reacts to keypresses
// # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
// # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
# define RGB_MATRIX_FRAMEBUFFER_EFFECTS
// # define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness)
// # 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_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash.
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_GRADIENT_LEFT_RIGHT
@@ -127,4 +127,4 @@
// # define DISABLE_RGB_MATRIX_MULTISPLASH
// # define DISABLE_RGB_MATRIX_SOLID_SPLASH
// # define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
-#endif \ No newline at end of file
+#endif
diff --git a/keyboards/sofle/keymaps/killmaster/config.h b/keyboards/sofle/keymaps/killmaster/config.h
new file mode 100644
index 0000000000..2e6abe84e3
--- /dev/null
+++ b/keyboards/sofle/keymaps/killmaster/config.h
@@ -0,0 +1,64 @@
+/* Copyright 2021 Carlos Martins
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+#pragma once
+
+/* The way how "handedness" is decided (which half is which),
+see https://docs.qmk.fm/#/feature_split_keyboard?id=setting-handedness
+for more options.
+*/
+
+#define RGB_DI_PIN D3
+
+#ifdef RGB_MATRIX_ENABLE
+
+#define RGBLED_NUM 72
+#define DRIVER_LED_TOTAL RGBLED_NUM
+#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 120 // 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_KEYPRESSES
+#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
+#define RGB_MATRIX_SPLIT {36,36}
+#define SPLIT_TRANSPORT_MIRROR
+
+#endif
+
+#ifdef RGBLIGHT_ENABLE
+#define RGBLIGHT_SPLIT
+#define RGBLED_NUM 70
+#define RGB_SPLIT {36,36}
+#define RGBLIGHT_LIMIT_VAL 120
+// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
+// /*== all animations enable ==*/
+// #define RGBLIGHT_ANIMATIONS
+// /*== or choose animations ==*/
+// #define RGBLIGHT_EFFECT_BREATHING
+ //#define RGBLIGHT_EFFECT_RAINBOW_MOOD
+ //#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
+// #define RGBLIGHT_EFFECT_SNAKE
+// #define RGBLIGHT_EFFECT_KNIGHT
+// #define RGBLIGHT_EFFECT_CHRISTMAS
+ #define RGBLIGHT_EFFECT_STATIC_GRADIENT
+ #define RGBLIGHT_EFFECT_RGB_TEST
+// #define RGBLIGHT_EFFECT_ALTERNATING
+#endif
+
+#define MEDIA_KEY_DELAY 2
+
+#define USB_POLLING_INTERVAL_MS 1
+#define QMK_KEYS_PER_SCAN 12
diff --git a/keyboards/sofle/keymaps/killmaster/keymap.c b/keyboards/sofle/keymaps/killmaster/keymap.c
new file mode 100644
index 0000000000..950dee36b1
--- /dev/null
+++ b/keyboards/sofle/keymaps/killmaster/keymap.c
@@ -0,0 +1,403 @@
+/* Copyright 2021 Carlos Martins
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
+#include QMK_KEYBOARD_H
+#include <stdio.h>
+
+enum sofle_layers {
+ /* _M_XYZ = Mac Os, _W_XYZ = Win/Linux */
+ _QWERTY,
+ _LOWER,
+ _RAISE,
+ _ADJUST,
+};
+
+enum custom_keycodes {
+ KC_QWERTY = SAFE_RANGE,
+ KC_LOWER,
+ KC_RAISE,
+ KC_ADJUST,
+ KC_PRVWD,
+ KC_NXTWD,
+ KC_LSTRT,
+ KC_LEND,
+ KC_DLINE
+};
+
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+/*
+ * QWERTY
+ * ,-----------------------------------------. ,-----------------------------------------.
+ * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | ` |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | ESC | Q | W | E | R | T | | Y | U | I | O | P | Bspc |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | Tab | A | S | D | F | G |-------. ,-------| H | J | K | L | ; | ' |
+ * |------+------+------+------+------+------| | | |------+------+------+------+------+------|
+ * |LShift| Z | X | C | V | B |-------| |-------| N | M | , | . | / |RShift|
+ * `-----------------------------------------/ / \ \-----------------------------------------'
+ * | LGUI | LAlt | LCTR |LOWER | /Space / \Enter \ |RAISE | RCTR | RAlt | RGUI |
+ * | | | | |/ / \ \ | | | | |
+ * `----------------------------------' '------''---------------------------'
+ */
+
+[_QWERTY] = LAYOUT(
+ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
+ 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_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
+ KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_MUTE, KC_MPLY,KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC,
+ KC_LGUI,KC_LALT,KC_LCTRL, KC_LOWER, KC_SPC, KC_ENT, KC_RAISE, KC_RCTRL, KC_RALT, KC_RGUI
+),
+/* LOWER
+ * ,-----------------------------------------. ,-----------------------------------------.
+ * | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | F12 |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | Tab | ! | @ | # | $ | % |-------. ,-------| ^ | & | * | ( | ) | | |
+ * |------+------+------+------+------+------| MUTE | | |------+------+------+------+------+------|
+ * | Shift| = | - | + | { | } |-------| |-------| [ | ] | ; | : | \ | Shift|
+ * `-----------------------------------------/ / \ \-----------------------------------------'
+ * | LGUI | LAlt | LCTR |LOWER | /Enter / \Space \ |RAISE | RCTR | RAlt | RGUI |
+ * | | | | |/ / \ \ | | | | |
+ * `----------------------------------' '------''---------------------------'
+ */
+[_LOWER] = LAYOUT(
+ _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
+ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_F12,
+ _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PIPE,
+ _______, KC_EQL, KC_MINS, KC_PLUS, KC_LCBR, KC_RCBR, _______, _______, KC_LBRC, KC_RBRC, KC_SCLN, KC_COLN, KC_BSLS, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+),
+/* RAISE
+ * ,----------------------------------------. ,-----------------------------------------.
+ * | | | | | | | | | | | | | |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | Esc | Ins | Pscr | Menu | |RGBTog| | | PWrd | Up | NWrd | DLine| Bspc |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | Tab | LAt | LCtl |LShift| | Caps |-------. ,-------| | Left | Down | Rigth| Del | Bspc |
+ * |------+------+------+------+------+------| MUTE | | |------+------+------+------+------+------|
+ * |Shift | Undo | Cut | Copy | Paste| |-------| |-------| | LStr | | LEnd | | Shift|
+ * `-----------------------------------------/ / \ \-----------------------------------------'
+ * | LGUI | LAlt | LCTR |LOWER | /Enter / \Space \ |RAISE | RCTR | RAlt | RGUI |
+ * | | | | |/ / \ \ | | | | |
+ * `----------------------------------' '------''---------------------------'
+ */
+[_RAISE] = LAYOUT(
+ _______, _______ , _______ , _______ , RGB_RMOD , RGB_MOD, _______, _______ , _______, _______ , _______ ,_______,
+ _______, KC_INS, KC_PSCR, KC_APP, XXXXXXX, RGB_TOG, KC_PGUP, KC_PRVWD, KC_UP, KC_NXTWD,KC_DLINE, KC_BSPC,
+ _______, KC_LALT, KC_LCTL, KC_LSFT, XXXXXXX, KC_CAPS, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_DEL, KC_BSPC,
+ _______,XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, KC_LSTRT, XXXXXXX, KC_LEND, XXXXXXX, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+),
+/* ADJUST
+ * ,-----------------------------------------. ,-----------------------------------------.
+ * | | | | | | | | | | | | | |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | RESET| |QWERTY|COLEMAK| | | | | | | | | |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | | |MACWIN| | | |-------. ,-------| | VOLDO| MUTE | VOLUP| | |
+ * |------+------+------+------+------+------| MUTE | | |------+------+------+------+------+------|
+ * | | | | | | |-------| |-------| | PREV | PLAY | NEXT | | |
+ * `-----------------------------------------/ / \ \-----------------------------------------'
+ * | LGUI | LAlt | LCTR |LOWER | /Enter / \Space \ |RAISE | RCTR | RAlt | RGUI |
+ * | | | | |/ / \ \ | | | | |
+ * `----------------------------------' '------''---------------------------'
+ */
+ [_ADJUST] = LAYOUT(
+ XXXXXXX , XXXXXXX, XXXXXXX , XXXXXXX , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+ RESET , XXXXXXX, KC_QWERTY, XXXXXXX , CG_TOGG,XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+ XXXXXXX , XXXXXXX,CG_TOGG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_VOLD, KC_MUTE, KC_VOLU, XXXXXXX, XXXXXXX,
+ XXXXXXX , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ )
+};
+
+#ifdef OLED_DRIVER_ENABLE
+
+static void render_logo(void) {
+ static const char PROGMEM bananas_logo[] = {
+ // 'killmaster_bananas', 128x32px
+ 0x00, 0x00, 0x80, 0x80, 0xc0, 0xc0, 0xc0, 0xe0, 0x02, 0x0e, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8,
+ 0x00, 0x00, 0x80, 0xc0, 0x40, 0x00, 0x00, 0x00, 0x40, 0x40, 0xd8, 0xc8, 0x00, 0x00, 0x00, 0x00,
+ 0x08, 0x08, 0xf8, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0xf8, 0xf8, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0xc0, 0x40, 0x40, 0xc0, 0x80, 0x40, 0xc0, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0x40,
+ 0x80, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x40, 0x40, 0xc0, 0x40, 0x00, 0x00, 0x40, 0x40, 0xf0,
+ 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x40, 0x40, 0xc0, 0x80, 0x00, 0x00, 0x00,
+ 0x40, 0xc0, 0x80, 0x40, 0x40, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x01, 0x0f, 0x3f, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xfc, 0xf8, 0xf0, 0xf0,
+ 0xe0, 0xc0, 0xc0, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f,
+ 0x02, 0x07, 0x0d, 0x10, 0x20, 0x20, 0x00, 0x00, 0x20, 0x20, 0x3f, 0x3f, 0x20, 0x20, 0x00, 0x00,
+ 0x00, 0x00, 0x1f, 0x3f, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x3f, 0x20, 0x20, 0x20,
+ 0x00, 0x00, 0x3f, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x1c, 0x36, 0x22, 0x22, 0x22,
+ 0x1f, 0x20, 0x00, 0x00, 0x10, 0x23, 0x22, 0x22, 0x26, 0x3c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x1f,
+ 0x30, 0x20, 0x20, 0x20, 0x00, 0x00, 0x0f, 0x1f, 0x32, 0x22, 0x22, 0x32, 0x23, 0x00, 0x00, 0x00,
+ 0x20, 0x3f, 0x21, 0x20, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x03, 0x07, 0x07, 0x0f, 0x0f, 0x0f, 0x1f, 0x1f,
+ 0x1f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3e, 0x3e, 0x1c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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(bananas_logo, sizeof(bananas_logo));
+}
+
+static void print_status_narrow(void) {
+ // Print current mode
+ oled_write_P(PSTR("Sofle"), false);
+ oled_write_P(PSTR("\n\n\n"), false);
+ switch (get_highest_layer(default_layer_state)) {
+ case _QWERTY:
+ oled_write_ln_P(PSTR("QWERT"), false);
+ break;
+ default:
+ oled_write_P(PSTR("Undef"), false);
+ }
+ oled_write_P(PSTR("\n\n"), false);
+ // Print current layer
+ oled_write_ln_P(PSTR("Layer"), false);
+ switch (get_highest_layer(layer_state)) {
+ case _QWERTY:
+ oled_write_P(PSTR("Base\n"), false);
+ break;
+ case _RAISE:
+ oled_write_P(PSTR("Raise"), false);
+ break;
+ case _LOWER:
+ oled_write_P(PSTR("Lower"), false);
+ break;
+ case _ADJUST:
+ oled_write_P(PSTR("Adj\n"), false);
+ break;
+ default:
+ oled_write_ln_P(PSTR("Undef"), false);
+ }
+ oled_write_P(PSTR("\n\n"), false);
+}
+
+oled_rotation_t oled_init_user(oled_rotation_t rotation) {
+ if (is_keyboard_master()) {
+ return OLED_ROTATION_270;
+ }
+ else {
+ return OLED_ROTATION_180;
+ }
+ return rotation;
+}
+
+void oled_task_user(void) {
+ if (is_keyboard_master()) {
+ print_status_narrow();
+ } else {
+ render_logo();
+ }
+}
+
+
+
+#endif // OLED_DRIVER_ENABLE
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case KC_QWERTY:
+ if (record->event.pressed) {
+ set_single_persistent_default_layer(_QWERTY);
+ }
+ return false;
+ case KC_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;
+ case KC_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;
+ case KC_ADJUST:
+ if (record->event.pressed) {
+ layer_on(_ADJUST);
+ } else {
+ layer_off(_ADJUST);
+ }
+ return false;
+ case KC_PRVWD:
+ if (record->event.pressed) {
+ if (keymap_config.swap_lctl_lgui) {
+ register_mods(mod_config(MOD_LALT));
+ register_code(KC_LEFT);
+ } else {
+ register_mods(mod_config(MOD_LCTL));
+ register_code(KC_LEFT);
+ }
+ } else {
+ if (keymap_config.swap_lctl_lgui) {
+ unregister_mods(mod_config(MOD_LALT));
+ unregister_code(KC_LEFT);
+ } else {
+ unregister_mods(mod_config(MOD_LCTL));
+ unregister_code(KC_LEFT);
+ }
+ }
+ break;
+ case KC_NXTWD:
+ if (record->event.pressed) {
+ if (keymap_config.swap_lctl_lgui) {
+ register_mods(mod_config(MOD_LALT));
+ register_code(KC_RIGHT);
+ } else {
+ register_mods(mod_config(MOD_LCTL));
+ register_code(KC_RIGHT);
+ }
+ } else {
+ if (keymap_config.swap_lctl_lgui) {
+ unregister_mods(mod_config(MOD_LALT));
+ unregister_code(KC_RIGHT);
+ } else {
+ unregister_mods(mod_config(MOD_LCTL));
+ unregister_code(KC_RIGHT);
+ }
+ }
+ break;
+ case KC_LSTRT:
+ if (record->event.pressed) {
+ if (keymap_config.swap_lctl_lgui) {
+ //CMD-arrow on Mac, but we have CTL and GUI swapped
+ register_mods(mod_config(MOD_LCTL));
+ register_code(KC_LEFT);
+ } else {
+ register_code(KC_HOME);
+ }
+ } else {
+ if (keymap_config.swap_lctl_lgui) {
+ unregister_mods(mod_config(MOD_LCTL));
+ unregister_code(KC_LEFT);
+ } else {
+ unregister_code(KC_HOME);
+ }
+ }
+ break;
+ case KC_LEND:
+ if (record->event.pressed) {
+ if (keymap_config.swap_lctl_lgui) {
+ //CMD-arrow on Mac, but we have CTL and GUI swapped
+ register_mods(mod_config(MOD_LCTL));
+ register_code(KC_RIGHT);
+ } else {
+ register_code(KC_END);
+ }
+ } else {
+ if (keymap_config.swap_lctl_lgui) {
+ unregister_mods(mod_config(MOD_LCTL));
+ unregister_code(KC_RIGHT);
+ } else {
+ unregister_code(KC_END);
+ }
+ }
+ break;
+ case KC_DLINE:
+ if (record->event.pressed) {
+ register_mods(mod_config(MOD_LCTL));
+ register_code(KC_BSPC);
+ } else {
+ unregister_mods(mod_config(MOD_LCTL));
+ unregister_code(KC_BSPC);
+ }
+ break;
+ }
+ return true;
+}
+
+#ifdef ENCODER_ENABLE
+
+bool encoder_update_user(uint8_t index, bool clockwise) {
+ uint8_t temp_mod = get_mods();
+ uint8_t temp_osm = get_oneshot_mods();
+ bool is_ctrl = (temp_mod | temp_osm) & MOD_MASK_CTRL;
+ bool is_shift = (temp_mod | temp_osm) & MOD_MASK_SHIFT;
+
+ if (is_shift) {
+ if (index == 0) { /* First encoder */
+ if (clockwise) {
+ rgb_matrix_increase_hue();
+ } else {
+ rgb_matrix_decrease_hue();
+ }
+ } else if (index == 1) { /* Second encoder */
+ if (clockwise) {
+ rgb_matrix_decrease_sat();
+ } else {
+ rgb_matrix_increase_sat();
+ }
+ }
+ } else if (is_ctrl) {
+ if (index == 0) { /* First encoder */
+ if (clockwise) {
+ rgb_matrix_increase_val();
+ } else {
+ rgb_matrix_decrease_val();
+ }
+ } else if (index == 1) { /* Second encoder */
+ if (clockwise) {
+ rgb_matrix_increase_speed();
+ } else {
+ rgb_matrix_decrease_speed();
+ }
+ }
+ } else {
+ if (index == 1) { /* First encoder */
+ if (clockwise) {
+ tap_code(KC_PGUP);
+ // tap_code(KC_MS_WH_UP);
+ } else {
+ tap_code(KC_PGDOWN);
+ // tap_code(KC_MS_WH_DOWN);
+ }
+ } else if (index == 0) { /* Second encoder */
+ uint16_t mapped_code = 0;
+ if (clockwise) {
+ mapped_code = KC_VOLD;
+ } else {
+ mapped_code = KC_VOLU;
+ }
+ tap_code_delay(mapped_code, MEDIA_KEY_DELAY);
+ }
+ }
+ return true;
+}
+
+#endif
diff --git a/keyboards/sofle/keymaps/killmaster/readme.md b/keyboards/sofle/keymaps/killmaster/readme.md
new file mode 100644
index 0000000000..6d6dea228c
--- /dev/null
+++ b/keyboards/sofle/keymaps/killmaster/readme.md
@@ -0,0 +1,19 @@
+![SofleKeyboard default keymap](https://github.com/josefadamcik/SofleKeyboard/raw/master/Images/soflekeyboard.png)
+![SofleKeyboard adjust layer](https://github.com/josefadamcik/SofleKeyboard/raw/master/Images/soflekeyboard_layout_adjust.png)
+
+
+# Default keymap for Sofle Keyboard
+
+Layout in [Keyboard Layout Editor](http://www.keyboard-layout-editor.com/#/gists/76efb423a46cbbea75465cb468eef7ff) and [adjust layer](http://www.keyboard-layout-editor.com/#/gists/4bcf66f922cfd54da20ba04905d56bd4)
+
+
+Features:
+
+- Symmetric modifiers (CMD/Super, Alt/Opt, Ctrl, Shift)
+- Various modes, can be switched (using Adjust layer and the selected one is stored in EEPROM.
+- Modes for Qwerty and Colemak support
+- Modes for Mac vs Linux/Win support -> different order of modifiers and different action shortcuts on the "UPPER" layer (the red one in the image). Designed to simplify transtions when switching between operating systems often.
+- The OLED on master half shows selected mode and caps lock state and is rotated.
+- Left encoder controls volume up/down/mute. Right encoder PGUP/PGDOWN.
+
+
diff --git a/keyboards/sofle/keymaps/killmaster/rules.mk b/keyboards/sofle/keymaps/killmaster/rules.mk
new file mode 100644
index 0000000000..38d6114506
--- /dev/null
+++ b/keyboards/sofle/keymaps/killmaster/rules.mk
@@ -0,0 +1,4 @@
+EXTRAKEY_ENABLE = yes
+LTO_ENABLE = yes
+RGB_MATRIX_ENABLE = yes
+RGB_MATRIX_DRIVER = WS2812
diff --git a/keyboards/sofle/keymaps/rgb_default/config.h b/keyboards/sofle/keymaps/rgb_default/config.h
index 7d597d991a..32d0717352 100644
--- a/keyboards/sofle/keymaps/rgb_default/config.h
+++ b/keyboards/sofle/keymaps/rgb_default/config.h
@@ -1,18 +1,18 @@
/* Copyright 2021 Dane Evans
- *
- * 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 <http://www.gnu.org/licenses/>.
-*/
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+*/
#pragma once
@@ -29,7 +29,7 @@
#define CUSTOM_FONT
-#define CUSTOM_LAYER_READ //if you remove this it causes issues - needs better guarding
+#define CUSTOM_LAYER_READ //if you remove this it causes issues - needs better guarding
#define TAPPING_FORCE_HOLD
@@ -56,7 +56,7 @@
#ifdef RGBLIGHT_ENABLE
#undef RGBLED_NUM
-
+
//#define RGBLIGHT_ANIMATIONS
//#define RGBLIGHT_EFFECT_BREATHING
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
@@ -68,11 +68,11 @@
//#define RGBLIGHT_EFFECT_RGB_TEST
//#define RGBLIGHT_EFFECT_ALTERNATING
//#define RGBLIGHT_EFFECT_TWINKLE
-
+
#define RGBLED_NUM 70
//#define RGBLED_SPLIT
- #define RGBLED_SPLIT { 35, 35 } // haven't figured out how to use this yet
-
+ #define RGBLED_SPLIT { 35, 35 } // haven't figured out how to use this yet
+
//#define RGBLED_NUM 30
#define RGBLIGHT_LIMIT_VAL 120
#define RGBLIGHT_HUE_STEP 10
@@ -84,11 +84,11 @@
# define RGB_MATRIX_KEYPRESSES // reacts to keypresses
// # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
// # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
# define RGB_MATRIX_FRAMEBUFFER_EFFECTS
// # define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness)
// # 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_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash.
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_GRADIENT_LEFT_RIGHT
@@ -127,4 +127,4 @@
// # define DISABLE_RGB_MATRIX_MULTISPLASH
// # define DISABLE_RGB_MATRIX_SOLID_SPLASH
// # define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
-#endif \ No newline at end of file
+#endif
diff --git a/keyboards/sofle/rev1/readme.md b/keyboards/sofle/rev1/readme.md
new file mode 100644
index 0000000000..629d568e60
--- /dev/null
+++ b/keyboards/sofle/rev1/readme.md
@@ -0,0 +1,27 @@
+# Sofle Keyboard
+
+![SofleKeyboard version 1](https://raw.githubusercontent.com/josefadamcik/SofleKeyboard/master/Images/IMG_20200126_114622.jpg)
+
+Sofle is 6×4+5 keys column-staggered split keyboard. Based on Lily58, Corne and Helix keyboards.
+
+More details about the keyboard on my blog: [Let me introduce you SofleKeyboard - a split keyboard based on Lily58 and Crkbd](https://josef-adamcik.cz/electronics/let-me-introduce-you-sofle-keyboard-split-keyboard-based-on-lily58.html)
+
+The current (temporary) build guide and a build log is available here: [SofleKeyboard build log/guide](https://josef-adamcik.cz/electronics/soflekeyboard-build-log-and-build-guide.html)
+
+* Keyboard Maintainer: [Josef Adamcik](https://josef-adamcik.cz) [Twitter:@josefadamcik](https://twitter.com/josefadamcik)
+* Hardware Supported: SofleKeyboard PCB, ProMicro
+* Hardware Availability: [PCB & Case Data](https://github.com/josefadamcik/SofleKeyboard)
+
+Make example for this keyboard (after setting up your build environment):
+
+ make sofle:default
+
+Flashing example for this keyboard:
+
+ make sofle:default:flash
+
+Press reset button on he keyboard when asked.
+
+Disconnect the first half, connect the second one and repeat the process.
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/sofle/rev1/rev1.c b/keyboards/sofle/rev1/rev1.c
index bbb014c4df..88a28e6a40 100644
--- a/keyboards/sofle/rev1/rev1.c
+++ b/keyboards/sofle/rev1/rev1.c
@@ -1 +1,87 @@
+/* Copyright 2021 Carlos Martins
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
#include "sofle.h"
+
+#ifdef RGB_MATRIX_ENABLE
+ // Physical Layout
+ // Columns
+ // 0 1 2 3 4 5 6 7 8 9 10 11 12 13
+ // ROWS
+ // 12 13 22 23 32 33 33 32 23 22 13 12 0
+ // 02 03 04 04 03 02
+ // 11 14 21 24 31 34 34 31 24 21 14 11 1
+ // 01 01
+ // 10 15 20 25 30 35 35 30 25 20 15 10 2
+ //
+ // 09 16 19 26 29 36 36 29 26 19 16 09 3
+ //
+ // 08 17 18 27 28 28 27 18 17 08 4
+ // 07 06 05 05 06 07
+
+led_config_t g_led_config = {
+ {
+ { 11, 12, 21, 22, 31, 32 },
+ { 10, 13, 20, 23, 30, 33 },
+ { 9, 14, 19, 24, 29, 34},
+ { 8, 15, 18, 25, 28, 35},
+ { 7, 16, 17, 26, 27, NO_LED },
+ { 47, 48, 57, 58, 67, 68},
+ { 46, 49, 56, 59, 66, 69},
+ { 45, 50, 55, 60, 65, 70},
+ { 44, 51, 54, 61, 64, 71},
+ { 43, 52, 53, 62, 63, NO_LED }
+ },
+ {
+ // Left side underglow
+ {96, 40}, {16, 20}, {48, 10}, {80, 18}, {88, 60}, {56, 57}, {24,60},
+ // Left side Matrix
+ {32, 57}, { 0, 48}, { 0, 36}, { 0, 24}, { 0, 12},
+ {16, 12}, {16, 24}, {16, 36}, {16, 48}, {48, 55},
+ {64, 57}, {32, 45}, {32, 33}, {32, 21}, {32, 9},
+ {48, 7}, {48, 19}, {48, 31}, {48, 43}, {80, 59},
+ {96, 64}, {64, 45}, {64, 33}, {64, 21}, {64, 9},
+ {80, 10}, {80, 22}, {80, 34}, {80, 47},
+
+
+ // Right side underglow
+ {128, 40}, {208, 20}, {176, 10}, {144, 18}, {136, 60}, {168, 57}, {200,60},
+ // Right side Matrix
+ {192, 57}, {224, 48}, {224, 36}, {224, 24}, {224, 12},
+ {208, 12}, {208, 24}, {208, 36}, {208, 48}, {176, 55},
+ {160, 57}, {192, 45}, {192, 33}, {192, 21}, {192, 9},
+ {176, 7}, {176, 19}, {176, 31}, {176, 43}, {144, 59},
+ {128, 64}, {160, 45}, {160, 33}, {160, 21}, {160, 9},
+ {144, 10}, {144, 22}, {144, 34}, {144, 47},
+ },
+ {
+ LED_FLAG_NONE, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW,
+ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT,
+ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT,
+ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT,
+ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT,
+ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT,
+ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT,
+ LED_FLAG_NONE, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW,
+ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT,
+ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT,
+ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT,
+ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT,
+ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT,
+ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT
+ }
+};
+#endif
diff --git a/keyboards/sowbug/68keys/config.h b/keyboards/sowbug/68keys/config.h
index 92d8397288..21e3043354 100644
--- a/keyboards/sowbug/68keys/config.h
+++ b/keyboards/sowbug/68keys/config.h
@@ -48,7 +48,7 @@
//
// #define BACKLIGHT_PIN rgb_matrix
#define RGB_MATRIX_KEYPRESSES
-#define DRIVER_LED_TOTAL 68
-#define RGBLED_NUM DRIVER_LED_TOTAL
+#define RGBLED_NUM 68
+#define DRIVER_LED_TOTAL RGBLED_NUM
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 128
diff --git a/keyboards/sowbug/ansi_tkl/config.h b/keyboards/sowbug/ansi_tkl/config.h
index e2ed0edd87..8e77245400 100644
--- a/keyboards/sowbug/ansi_tkl/config.h
+++ b/keyboards/sowbug/ansi_tkl/config.h
@@ -44,8 +44,8 @@
#define RGB_DI_PIN B9
#define RGB_MATRIX_KEYPRESSES
-#define DRIVER_LED_TOTAL (87)
-#define RGBLED_NUM (DRIVER_LED_TOTAL)
+#define RGBLED_NUM 87
+#define DRIVER_LED_TOTAL RGBLED_NUM
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 128
diff --git a/keyboards/subatomic/rules.mk b/keyboards/subatomic/rules.mk
index 0d77351f32..19c2ed15a1 100644
--- a/keyboards/subatomic/rules.mk
+++ b/keyboards/subatomic/rules.mk
@@ -27,7 +27,6 @@ AUDIO_ENABLE = no # Audio output
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
-API_SYSEX_ENABLE = no
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
diff --git a/keyboards/handwired/p1800fl/config.h b/keyboards/team0110/p1800fl/config.h
index 793d8f19c3..75e63c75ce 100644
--- a/keyboards/handwired/p1800fl/config.h
+++ b/keyboards/team0110/p1800fl/config.h
@@ -23,7 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x3EAE
#define DEVICE_VER 0x0001
-#define MANUFACTURER marhalloweenvt
+#define MANUFACTURER team0110
#define PRODUCT p1800fl
/* key matrix size */
@@ -51,6 +51,18 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define BACKLIGHT_BREATHING
#define BACKLIGHT_LEVELS 5
+/* RGB Lighting */
+#define RGB_DI_PIN C6
+#ifdef RGB_DI_PIN
+# define RGBLIGHT_ANIMATIONS
+# define RGBLED_NUM 8
+# define RGBLIGHT_HUE_STEP 8
+# define RGBLIGHT_SAT_STEP 8
+# define RGBLIGHT_VAL_STEP 8
+# define RGBLIGHT_LIMIT_VAL 255
+# define RGBLIGHT_SLEEP
+#endif
+
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCE 5
@@ -66,6 +78,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define NO_ACTION_MACRO
#define NO_ACTION_FUNCTION
-/* QMK DFU key configuration */
-#define QMK_ESC_OUTPUT C7 // usually COL
-#define QMK_ESC_INPUT B6 // usually ROW \ No newline at end of file
+/* Bootmagic Lite key configuration */
+#define BOOTMAGIC_LITE_ROW 0
+#define BOOTMAGIC_LITE_COLUMN 0 \ No newline at end of file
diff --git a/keyboards/handwired/p1800fl/info.json b/keyboards/team0110/p1800fl/info.json
index 93f4e8aaeb..164f921dea 100644
--- a/keyboards/handwired/p1800fl/info.json
+++ b/keyboards/team0110/p1800fl/info.json
@@ -1,7 +1,7 @@
{
"keyboard_name": "p1800fl",
- "url": "",
- "maintainer": "marhalloweenvt",
+ "url": "http://team0110.store/",
+ "maintainer": "team0110",
"width": 19.5,
"height": 5.25,
"layouts": {
diff --git a/keyboards/handwired/p1800fl/keymaps/default/keymap.c b/keyboards/team0110/p1800fl/keymaps/default/keymap.c
index 03b6a1efd0..e0a3ad35c1 100644
--- a/keyboards/handwired/p1800fl/keymaps/default/keymap.c
+++ b/keyboards/team0110/p1800fl/keymaps/default/keymap.c
@@ -15,27 +15,20 @@
*/
#include QMK_KEYBOARD_H
-// Defines names for use in layer keycodes and the keymap
-enum layer_names {
- _BASE,
- _FN
-};
-
-
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Base */
- [_BASE] = LAYOUT(
+ [0] = LAYOUT(
KC_GESC, 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_BSPC, KC_BSPC, KC_NLCK, KC_PSLS, KC_PAST, KC_PEQL,
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_BSLS, KC_P7, KC_P8, KC_P9, KC_PMNS,
KC_CAPS, 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_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS,
KC_LSFT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT
),
- [_FN] = LAYOUT(
- 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, KC_DEL, KC_DEL, BL_TOGG, BL_INC, KC_PAST, RESET,
- _______, KC_HOME, KC_UP, KC_END, KC_PGUP, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, BL_BRTG, BL_DEC, _______, EEP_RST,
- _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, EEP_RST,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLU, _______, _______, _______, _______,
+ [1] = LAYOUT(
+ 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, KC_DEL, KC_DEL, KC_PSCR, KC_SLCK, KC_PAUS, _______,
+ _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, KC_INS, KC_HOME, KC_PGUP, _______,
+ _______, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, KC_END, KC_PGDOWN, _______,
+ _______, _______, BL_TOGG, BL_BRTG, BL_INC, BL_DEC, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLU, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, _______, _______, _______, _______
- )
+ ),
};
diff --git a/keyboards/handwired/p1800fl/keymaps/default/readme.md b/keyboards/team0110/p1800fl/keymaps/default/readme.md
index 268d399224..268d399224 100644
--- a/keyboards/handwired/p1800fl/keymaps/default/readme.md
+++ b/keyboards/team0110/p1800fl/keymaps/default/readme.md
diff --git a/keyboards/team0110/p1800fl/keymaps/via/keymap.c b/keyboards/team0110/p1800fl/keymaps/via/keymap.c
new file mode 100644
index 0000000000..9cd55ff54c
--- /dev/null
+++ b/keyboards/team0110/p1800fl/keymaps/via/keymap.c
@@ -0,0 +1,48 @@
+/* Copyright 2020 marhalloweenvt
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+#include QMK_KEYBOARD_H
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ /* Base */
+ [0] = LAYOUT(
+ KC_GESC, 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_BSPC, KC_BSPC, KC_NLCK, KC_PSLS, KC_PAST, KC_PEQL,
+ 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_BSLS, KC_P7, KC_P8, KC_P9, KC_PMNS,
+ KC_CAPS, 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_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS,
+ KC_LSFT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT
+ ),
+ [1] = LAYOUT(
+ 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, KC_DEL, KC_DEL, KC_PSCR, KC_SLCK, KC_PAUS, _______,
+ _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, KC_INS, KC_HOME, KC_PGUP, _______,
+ _______, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, KC_END, KC_PGDOWN, _______,
+ _______, _______, BL_TOGG, BL_BRTG, BL_INC, BL_DEC, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLU, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, _______, _______, _______, _______
+ ),
+ [2] = LAYOUT(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ ),
+ [3] = LAYOUT(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ )
+};
diff --git a/keyboards/team0110/p1800fl/keymaps/via/readme.md b/keyboards/team0110/p1800fl/keymaps/via/readme.md
new file mode 100644
index 0000000000..fabc3229f3
--- /dev/null
+++ b/keyboards/team0110/p1800fl/keymaps/via/readme.md
@@ -0,0 +1 @@
+# The default VIA keymap for p1800fl
diff --git a/keyboards/team0110/p1800fl/keymaps/via/rules.mk b/keyboards/team0110/p1800fl/keymaps/via/rules.mk
new file mode 100644
index 0000000000..036bd6d1c3
--- /dev/null
+++ b/keyboards/team0110/p1800fl/keymaps/via/rules.mk
@@ -0,0 +1 @@
+VIA_ENABLE = yes \ No newline at end of file
diff --git a/keyboards/handwired/p1800fl/p1800fl.c b/keyboards/team0110/p1800fl/p1800fl.c
index e0fc16a5e7..e0fc16a5e7 100644
--- a/keyboards/handwired/p1800fl/p1800fl.c
+++ b/keyboards/team0110/p1800fl/p1800fl.c
diff --git a/keyboards/handwired/p1800fl/p1800fl.h b/keyboards/team0110/p1800fl/p1800fl.h
index 7b8f3dcffd..7b8f3dcffd 100644
--- a/keyboards/handwired/p1800fl/p1800fl.h
+++ b/keyboards/team0110/p1800fl/p1800fl.h
diff --git a/keyboards/handwired/p1800fl/readme.md b/keyboards/team0110/p1800fl/readme.md
index 545bd691a4..a9f50ddb76 100644
--- a/keyboards/handwired/p1800fl/readme.md
+++ b/keyboards/team0110/p1800fl/readme.md
@@ -1,15 +1,15 @@
# p1800fl
-![p1800fl](https://i.imgur.com/GQd28rN.jpg)
+![p1800fl](https://i.imgur.com/GQd28rNh.jpg)
-A 1800 Frow-less keyboard project from our local makers.
+A 1800 Frow-less keyboard project from our team.
-* Keyboard Maintainer: [marhalloweenvt](https://github.com/marhalloweenvt)
-* Hardware Supported: p1800fl
-* Hardware Availability: p1800fl
+* Keyboard Maintainer: [team0110](https://github.com/team0110)
+* Hardware Supported: p1800fl PCB
+* Hardware Availability: http://team0110.store/
Make example for this keyboard (after setting up your build environment):
- make handwired/p1800fl:default
+ make team0110/p1800fl:default
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/team0110/p1800fl/rules.mk b/keyboards/team0110/p1800fl/rules.mk
new file mode 100644
index 0000000000..e2f9c83102
--- /dev/null
+++ b/keyboards/team0110/p1800fl/rules.mk
@@ -0,0 +1,22 @@
+# MCU name
+MCU = atmega32u4
+
+# Bootloader selection
+BOOTLOADER = atmel-dfu
+
+# Build Options
+# change yes to no to disable
+#
+BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
+MOUSEKEY_ENABLE = yes # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = no # Console for debug
+COMMAND_ENABLE = no # Commands for debug and configuration
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+NKRO_ENABLE = yes # USB Nkey Rollover
+BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
+RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
+BLUETOOTH_ENABLE = no # Enable Bluetooth
+AUDIO_ENABLE = no # Audio output
diff --git a/keyboards/terrazzo/config.h b/keyboards/terrazzo/config.h
index 985110d16b..907c94ff52 100644
--- a/keyboards/terrazzo/config.h
+++ b/keyboards/terrazzo/config.h
@@ -83,13 +83,13 @@ so there is only one configuration. */
#ifdef LED_MATRIX_ENABLE
-#define LED_DRIVER_ADDR_1 0x74
+#define LED_DRIVER_ADDR_1 0x74
#define LED_DRIVER_COUNT 1
#define DRIVER_LED_TOTAL 105
#define LED_MATRIX_ROWS 15
#define LED_MATRIX_COLS 7
#define LED_MATRIX_MAXIMUM_BRIGHTNESS 20
-#define LED_DISABLE_WHEN_USB_SUSPENDED true
+#define LED_DISABLE_WHEN_USB_SUSPENDED
#define DISABLE_LED_MATRIX_ALPHAS_MODS
#define DISABLE_LED_MATRIX_BREATHING
diff --git a/keyboards/themadnoodle/ncc1701kb/v2/rules.mk b/keyboards/themadnoodle/ncc1701kb/v2/rules.mk
index 960f1d7a64..a56d969aea 100644
--- a/keyboards/themadnoodle/ncc1701kb/v2/rules.mk
+++ b/keyboards/themadnoodle/ncc1701kb/v2/rules.mk
@@ -29,6 +29,5 @@ MIDI_ENABLE = no # MIDI controls
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
AUDIO_ENABLE = no # Audio output on port C6
UNICODE_ENABLE = yes # Unicode
-API_SYSEX_ENABLE = yes
TAP_DANCE_ENABLE = no
ENCODER_ENABLE = yes
diff --git a/keyboards/themadnoodle/noodlepad/rules.mk b/keyboards/themadnoodle/noodlepad/rules.mk
index 960f1d7a64..a56d969aea 100644
--- a/keyboards/themadnoodle/noodlepad/rules.mk
+++ b/keyboards/themadnoodle/noodlepad/rules.mk
@@ -29,6 +29,5 @@ MIDI_ENABLE = no # MIDI controls
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
AUDIO_ENABLE = no # Audio output on port C6
UNICODE_ENABLE = yes # Unicode
-API_SYSEX_ENABLE = yes
TAP_DANCE_ENABLE = no
ENCODER_ENABLE = yes
diff --git a/keyboards/tkc/portico/config.h b/keyboards/tkc/portico/config.h
index 4a7da833f7..ef6e46658a 100644
--- a/keyboards/tkc/portico/config.h
+++ b/keyboards/tkc/portico/config.h
@@ -45,7 +45,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
# define RGB_MATRIX_LED_FLUSH_LIMIT 26
# define DEBOUNCE 3
# define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
# define RGB_MATRIX_KEYPRESSES
# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
# define DISABLE_RGB_MATRIX_BAND_SAT
diff --git a/keyboards/tokyo60/config.h b/keyboards/tokyokeyboard/tokyo60/config.h
index 03dee74e9b..03dee74e9b 100644
--- a/keyboards/tokyo60/config.h
+++ b/keyboards/tokyokeyboard/tokyo60/config.h
diff --git a/keyboards/tokyo60/info.json b/keyboards/tokyokeyboard/tokyo60/info.json
index 10d1bf093f..10d1bf093f 100644
--- a/keyboards/tokyo60/info.json
+++ b/keyboards/tokyokeyboard/tokyo60/info.json
diff --git a/keyboards/tokyo60/keymaps/default/config.h b/keyboards/tokyokeyboard/tokyo60/keymaps/default/config.h
index 271f48d001..271f48d001 100644
--- a/keyboards/tokyo60/keymaps/default/config.h
+++ b/keyboards/tokyokeyboard/tokyo60/keymaps/default/config.h
diff --git a/keyboards/tokyo60/keymaps/default/keymap.c b/keyboards/tokyokeyboard/tokyo60/keymaps/default/keymap.c
index 9139d15bc4..9139d15bc4 100644
--- a/keyboards/tokyo60/keymaps/default/keymap.c
+++ b/keyboards/tokyokeyboard/tokyo60/keymaps/default/keymap.c
diff --git a/keyboards/tokyo60/keymaps/swappedBottomRow/config.h b/keyboards/tokyokeyboard/tokyo60/keymaps/swappedBottomRow/config.h
index 271f48d001..271f48d001 100644
--- a/keyboards/tokyo60/keymaps/swappedBottomRow/config.h
+++ b/keyboards/tokyokeyboard/tokyo60/keymaps/swappedBottomRow/config.h
diff --git a/keyboards/tokyo60/keymaps/swappedBottomRow/keymap.c b/keyboards/tokyokeyboard/tokyo60/keymaps/swappedBottomRow/keymap.c
index 54b68f5825..54b68f5825 100644
--- a/keyboards/tokyo60/keymaps/swappedBottomRow/keymap.c
+++ b/keyboards/tokyokeyboard/tokyo60/keymaps/swappedBottomRow/keymap.c
diff --git a/keyboards/tokyo60/keymaps/via/keymap.c b/keyboards/tokyokeyboard/tokyo60/keymaps/via/keymap.c
index ffef9af795..ffef9af795 100644
--- a/keyboards/tokyo60/keymaps/via/keymap.c
+++ b/keyboards/tokyokeyboard/tokyo60/keymaps/via/keymap.c
diff --git a/keyboards/tokyokeyboard/tokyo60/keymaps/via/rules.mk b/keyboards/tokyokeyboard/tokyo60/keymaps/via/rules.mk
new file mode 100644
index 0000000000..1e5b99807c
--- /dev/null
+++ b/keyboards/tokyokeyboard/tokyo60/keymaps/via/rules.mk
@@ -0,0 +1 @@
+VIA_ENABLE = yes
diff --git a/keyboards/tokyo60/readme.md b/keyboards/tokyokeyboard/tokyo60/readme.md
index 11d4d353c3..4d4f53ef04 100644
--- a/keyboards/tokyo60/readme.md
+++ b/keyboards/tokyokeyboard/tokyo60/readme.md
@@ -1,15 +1,15 @@
# Tokyo60
-![Tokyo60](http://tokyokeyboard.com/wp-content/uploads/2018/02/AI7B4543_copy_page_20180215141449-1200x800.jpg)
+![Tokyo60](https://i2.wp.com/tokyokeyboard.com/wp-content/uploads/2018/02/AI7B4543_copy_page_20180215141449-1200x800.jpg)
Minimal hacker style mechanical keyboard designed in Tokyo. Full aluminum hi-pro construction with integrated top-plate. Cherry MX compatible. More Info at [Tokyo Keyboard](http://tokyokeyboard.com).
-* Keyboard Maintainer: [Tokyo Keyboard](http://tokyokeyboard.com)
-* Hardware Supported: Tokyo60 Rev.1
+* Keyboard Maintainer: [Tokyo Keyboard](https://tokyokeyboard.com)
+* Hardware Supported: Tokyo60 Rev.1 - 4
* Hardware Availability: [Drop](https://drop.com/buy/massdrop-x-tokyo-keyboard-tokyo60-keyboard-kit?mode=guest_open)
Make example for this keyboard (after setting up your build environment):
- make tokyo60:default
+ make tokyokeyboard/tokyo60:default
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/tokyo60/rules.mk b/keyboards/tokyokeyboard/tokyo60/rules.mk
index fa639b1cab..fa639b1cab 100644
--- a/keyboards/tokyo60/rules.mk
+++ b/keyboards/tokyokeyboard/tokyo60/rules.mk
diff --git a/keyboards/tokyo60/tokyo60.c b/keyboards/tokyokeyboard/tokyo60/tokyo60.c
index 2126bb612d..2126bb612d 100644
--- a/keyboards/tokyo60/tokyo60.c
+++ b/keyboards/tokyokeyboard/tokyo60/tokyo60.c
diff --git a/keyboards/tokyo60/tokyo60.h b/keyboards/tokyokeyboard/tokyo60/tokyo60.h
index 9eb5f3e624..9eb5f3e624 100644
--- a/keyboards/tokyo60/tokyo60.h
+++ b/keyboards/tokyokeyboard/tokyo60/tokyo60.h
diff --git a/keyboards/torn/rules.mk b/keyboards/torn/rules.mk
index 62f9d83932..0e0914d6a4 100644
--- a/keyboards/torn/rules.mk
+++ b/keyboards/torn/rules.mk
@@ -21,8 +21,6 @@ OLED_DRIVER_ENABLE = yes
WPM_ENABLE = yes
CUSTOM_MATRIX = lite
-LAYOUTS = split_3x6_4
-
SRC += matrix.c \
bongocat.c \
mcp23018.c \
diff --git a/keyboards/touchpad/rules.mk b/keyboards/touchpad/rules.mk
index 14aac23d49..ce30311796 100644
--- a/keyboards/touchpad/rules.mk
+++ b/keyboards/touchpad/rules.mk
@@ -27,7 +27,6 @@ AUDIO_ENABLE = no # Audio output on port C6
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
-API_SYSEX_ENABLE = no
CUSTOM_MATRIX = yes
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
diff --git a/keyboards/waldo/rules.mk b/keyboards/waldo/rules.mk
index db9db239d3..eae81d9bbc 100644
--- a/keyboards/waldo/rules.mk
+++ b/keyboards/waldo/rules.mk
@@ -27,7 +27,6 @@ AUDIO_ENABLE = no # Audio output on port C6
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
-API_SYSEX_ENABLE = no
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
diff --git a/keyboards/westfoxtrot/cypher/rev1/keymaps/kwer/keymap.c b/keyboards/westfoxtrot/cypher/rev1/keymaps/kwer/keymap.c
index 2d7bf2a5e2..c0df375a77 100644
--- a/keyboards/westfoxtrot/cypher/rev1/keymaps/kwer/keymap.c
+++ b/keyboards/westfoxtrot/cypher/rev1/keymaps/kwer/keymap.c
@@ -28,14 +28,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_DL] = LAYOUT_iso (
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, DE_SS, DE_ACUT, KC_BSPC, _______, KC_NLCK, KC_PSCR,KC_PSLS,KC_PAST,
- KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, DE_Z, KC_U, KC_I, KC_O, KC_P, DE_UE, DE_PLUS, KC_P7, KC_P8, KC_P9, KC_PMNS,
- SPECIAL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, DE_OE, DE_AE, DE_HASH, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS,
- KC_LSFT, DE_LESS, DE_Y, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, DE_MINS, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT,
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, DE_Z, KC_U, KC_I, KC_O, KC_P, DE_UDIA, DE_PLUS, KC_P7, KC_P8, KC_P9, KC_PMNS,
+ SPECIAL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, DE_ODIA,DE_ADIA, DE_HASH, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS,
+ KC_LSFT, DE_LABK, DE_Y, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, DE_MINS, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT,
KC_LCTL, _______, KC_LALT, KC_SPC, _______, KC_RALT, TG(_LE), KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_NO
),
[_FN] = LAYOUT_iso (
- DE_RING, 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_DEL, _______, _______, _______, _______, _______,
+ DE_DEG, 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_DEL, _______, _______, _______, _______, _______,
_______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
diff --git a/keyboards/whitefox/config.h b/keyboards/whitefox/config.h
index 4d7a460d26..1cdac01d07 100644
--- a/keyboards/whitefox/config.h
+++ b/keyboards/whitefox/config.h
@@ -62,6 +62,20 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define LED_BRIGHTNESS_LO 100
#define LED_BRIGHTNESS_HI 255
+/* LED matrix driver */
+#define LED_DRIVER_ADDR_1 0x74
+#define LED_DRIVER_COUNT 1
+#define DRIVER_LED_TOTAL 71
+#define LED_DISABLE_WHEN_USB_SUSPENDED
+
+/* i2c (for LED matrix) */
+#define I2C1_CLOCK_SPEED 400000
+#define I2C1_SCL_PAL_MODE PAL_MODE_ALTERNATIVE_2
+#define I2C1_SDA_PAL_MODE PAL_MODE_ALTERNATIVE_2
+#define I2C1_BANK GPIOB
+#define I2C1_SCL 0
+#define I2C1_SDA 1
+
/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
* This is useful for the Windows task manager shortcut (ctrl+shift+esc).
*/
diff --git a/keyboards/whitefox/keymaps/kim-kim/keymap.c b/keyboards/whitefox/keymaps/kim-kim/keymap.c
index a254067582..baaa136873 100644
--- a/keyboards/whitefox/keymaps/kim-kim/keymap.c
+++ b/keyboards/whitefox/keymaps/kim-kim/keymap.c
@@ -51,18 +51,3 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______,_______,_______, _______, _______,_______,_______, KC_HOME,_______,KC_END \
),
};
-
-/* Give numbers some descriptive names */
-#define ACTION_LEDS_ALL 1
-#define ACTION_LEDS_GAME 2
-
-const uint16_t fn_actions[] = {
- [2] = ACTION_FUNCTION(ACTION_LEDS_ALL),
- [3] = ACTION_FUNCTION(ACTION_LEDS_GAME),
-
- [4] = ACTION_USAGE_CONSUMER(0x1B4),
- [5] = ACTION_USAGE_CONSUMER(0x196),
- [6] = ACTION_USAGE_CONSUMER(0x1A6),
- [7] = ACTION_USAGE_CONSUMER(0x1A0),
-
-};
diff --git a/keyboards/whitefox/keymaps/matt3o/keymap.c b/keyboards/whitefox/keymaps/matt3o/keymap.c
index f6987fe1aa..bb84196684 100644
--- a/keyboards/whitefox/keymaps/matt3o/keymap.c
+++ b/keyboards/whitefox/keymaps/matt3o/keymap.c
@@ -16,6 +16,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H
+enum custom_keycodes {
+ AL_FILE = SAFE_RANGE,
+ AL_WWW,
+ AL_HELP,
+ AL_CMD
+};
+
const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Layer 0: Default Layer
* ,---------------------------------------------------------------.
@@ -45,25 +52,44 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS, KC_HOME,KC_PGDN,KC_END \
),
[2] = LAYOUT( \
- KC_SLEP,KC_P1, KC_P2, KC_P3, KC_P4, KC_P5, KC_P6, KC_P7, KC_P8, KC_P9, KC_P0, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_FN2, \
- KC_TRNS,KC_TRNS,KC_FN5 ,KC_FN6 ,KC_TRNS,KC_FN7 ,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_PSCR,KC_TRNS,KC_TRNS,KC_TRNS, KC_FN3, \
- KC_CAPS,KC_TRNS,KC_TRNS,KC_TRNS,KC_FN4 ,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,\
+ KC_SLEP,KC_P1, KC_P2, KC_P3, KC_P4, KC_P5, KC_P6, KC_P7, KC_P8, KC_P9, KC_P0, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_NO, \
+ KC_TRNS,KC_TRNS,AL_WWW ,AL_HELP ,KC_TRNS,AL_CMD ,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_PSCR,KC_TRNS,KC_TRNS,KC_TRNS, KC_NO, \
+ KC_CAPS,KC_TRNS,KC_TRNS,KC_TRNS,AL_FILE ,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,\
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_CALC,KC_TRNS,KC_TRNS,KC_TRNS,KC_MAIL,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,\
KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS \
),
};
-/* Give numbers some descriptive names */
-#define ACTION_LEDS_ALL 1
-#define ACTION_LEDS_GAME 2
-
-const uint16_t fn_actions[] = {
- [2] = ACTION_FUNCTION(ACTION_LEDS_ALL),
- [3] = ACTION_FUNCTION(ACTION_LEDS_GAME),
-
- [4] = ACTION_USAGE_CONSUMER(0x1B4),
- [5] = ACTION_USAGE_CONSUMER(0x196),
- [6] = ACTION_USAGE_CONSUMER(0x1A6),
- [7] = ACTION_USAGE_CONSUMER(0x1A0),
-
-};
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case AL_FILE:
+ if (record->event.pressed) {
+ host_consumer_send(0x1B4); // AL File Browser
+ } else {
+ host_consumer_send(0);
+ }
+ return false;
+ case AL_WWW:
+ if (record->event.pressed) {
+ host_consumer_send(0x196); // AL Internet Browser
+ } else {
+ host_consumer_send(0);
+ }
+ return false;
+ case AL_HELP:
+ if (record->event.pressed) {
+ host_consumer_send(0x1A6); // AL Integrated Help Center
+ } else {
+ host_consumer_send(0);
+ }
+ return false;
+ case AL_CMD:
+ if (record->event.pressed) {
+ host_consumer_send(0x1A0); // AL Command Line Processor/Run
+ } else {
+ host_consumer_send(0);
+ }
+ return false;
+ }
+ return true;
+}
diff --git a/keyboards/whitefox/rules.mk b/keyboards/whitefox/rules.mk
index 771804369c..7c1d0c3def 100644
--- a/keyboards/whitefox/rules.mk
+++ b/keyboards/whitefox/rules.mk
@@ -25,16 +25,12 @@ COMMAND_ENABLE = yes # Commands for debug and configuration
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
NKRO_ENABLE = yes # USB Nkey Rollover
-BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
BLUETOOTH_ENABLE = no # Enable Bluetooth
AUDIO_ENABLE = no # Audio output
-BACKLIGHT_DRIVER = custom
-VISUALIZER_ENABLE = yes
-LED_DRIVER = is31fl3731c
-LED_WIDTH = 16
-LED_HEIGHT = 5
+LED_MATRIX_ENABLE = yes
+LED_MATRIX_DRIVER = IS31FL3731
LAYOUTS = 65_ansi 65_ansi_blocker 65_ansi_blocker_split_bs 65_iso 65_iso_blocker 65_iso_blocker_split_bs
diff --git a/keyboards/whitefox/whitefox.c b/keyboards/whitefox/whitefox.c
index ea083c6e09..f10f0fd5c4 100644
--- a/keyboards/whitefox/whitefox.c
+++ b/keyboards/whitefox/whitefox.c
@@ -16,3 +16,79 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "whitefox.h"
+
+#ifdef LED_MATRIX_ENABLE
+const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
+// The numbers in the comments are the led numbers DXX on the PCB
+/* Refer to IS31 manual for these locations
+ * driver
+ * | LED address
+ * | | */
+// 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
+ { 0, C1_1 }, { 0, C1_2 }, { 0, C1_3 }, { 0, C1_4 }, { 0, C1_5 }, { 0, C1_6 }, { 0, C1_7 }, { 0, C1_8 }, { 0, C2_1 }, { 0, C2_2 }, { 0, C2_3 }, { 0, C2_4 }, { 0, C2_5 }, { 0, C2_6 }, { 0, C2_7 }, { 0, C2_8 },
+// 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
+ { 0, C3_1 }, { 0, C3_2 }, { 0, C3_3 }, { 0, C3_4 }, { 0, C3_5 }, { 0, C3_6 }, { 0, C3_7 }, { 0, C3_8 }, { 0, C4_1 }, { 0, C4_2 }, { 0, C4_3 }, { 0, C4_4 }, { 0, C4_5 }, { 0, C4_6 }, { 0, C4_7 },
+// 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
+ { 0, C4_8 }, { 0, C5_1 }, { 0, C5_2 }, { 0, C5_3 }, { 0, C5_4 }, { 0, C5_5 }, { 0, C5_6 }, { 0, C5_7 }, { 0, C5_8 }, { 0, C6_1 }, { 0, C6_2 }, { 0, C6_3 }, { 0, C6_4 }, { 0, C6_5 }, { 0, C6_6 },
+// 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
+ { 0, C6_7 }, { 0, C6_8 }, { 0, C7_1 }, { 0, C7_2 }, { 0, C7_3 }, { 0, C7_4 }, { 0, C7_5 }, { 0, C7_6 }, { 0, C7_7 }, { 0, C7_8 }, { 0, C8_1 }, { 0, C8_2 }, { 0, C8_3 }, { 0, C8_4 }, { 0, C8_5 },
+// 62 63 64 65 66 67 68 69 70 71
+ { 0, C8_6 }, { 0, C8_7 }, { 0, C8_8 }, { 0, C9_1 }, { 0, C9_2 }, { 0, C9_3 }, { 0, C9_4 }, { 0, C9_5 }, { 0, C9_6 }, { 0, C9_7 },
+};
+
+led_config_t g_led_config = {
+ {
+ // Key Matrix to LED Index
+ { 0, 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, 64, 65, 66, 67, 68, 69, 70, NO_LED },
+ }, {
+ // LED Index to Physical Position
+ { 0, 0 }, { 15, 0 }, { 30, 0 }, { 45, 0 }, { 60, 0 }, { 75, 0 }, { 90, 0 }, { 105, 0 }, { 119, 0 }, { 134, 0 }, { 149, 0 }, { 164, 0 }, { 179, 0 }, { 194, 0 }, { 209, 0 }, { 224, 0 },
+ { 4, 16 }, { 22, 16 }, { 37, 16 }, { 52, 16 }, { 67, 16 }, { 82, 16 }, { 97, 16 }, { 112, 16 }, { 127, 16 }, { 142, 16 }, { 157, 16 }, { 172, 16 }, { 187, 16 }, { 205, 16 }, { 224, 16 },
+ { 6, 32 }, { 26, 32 }, { 41, 32 }, { 56, 32 }, { 71, 32 }, { 86, 32 }, { 101, 32 }, { 116, 32 }, { 131, 32 }, { 146, 32 }, { 161, 32 }, { 175, 32 }, { 190, 32 }, { 207, 32 }, { 224, 32 },
+ { 2, 48 }, { 19, 48 }, { 34, 48 }, { 49, 48 }, { 63, 48 }, { 78, 48 }, { 93, 48 }, { 108, 48 }, { 123, 48 }, { 138, 48 }, { 153, 48 }, { 168, 48 }, { 189, 48 }, { 209, 48 }, { 224, 48 },
+ { 2, 64 }, { 21, 64 }, { 39, 64 }, { 95, 64 }, { 149, 64 }, { 164, 64 }, { 179, 64 }, { 194, 64 }, { 209, 64 }, { 224, 64 }
+ }, {
+ // LED Index to Flag
+ 1, 4, 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, 4, 1, 1,
+ 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1,
+ 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ }
+};
+#endif
+
+void keyboard_pre_init_kb(void) {
+#ifdef LED_MATRIX_ENABLE
+ // Turn on LED controller
+ setPinOutput(B16);
+ writePinHigh(B16);
+#endif
+ keyboard_pre_init_user();
+}
+
+void matrix_init_kb(void) {
+ // put your keyboard start-up code here
+ // runs once when the firmware starts up
+
+#ifdef LED_MATRIX_ENABLE
+ /*
+ * Since K20x is stuck with a 32 byte EEPROM (see tmk_core/common/chibios/eeprom_teensy.c),
+ * and neither led_matrix_eeconfig.speed or .flags fit in this boundary, just force their values to default on boot.
+ */
+# if !defined(LED_MATRIX_STARTUP_SPD)
+# define LED_MATRIX_STARTUP_SPD UINT8_MAX / 2
+# endif
+ led_matrix_set_speed(LED_MATRIX_STARTUP_SPD),
+ led_matrix_set_flags(LED_FLAG_ALL);
+#endif
+
+ matrix_init_user();
+}
diff --git a/keyboards/xbows/nature/config.h b/keyboards/xbows/nature/config.h
index c1ff793352..e321f7ee1e 100644
--- a/keyboards/xbows/nature/config.h
+++ b/keyboards/xbows/nature/config.h
@@ -35,7 +35,7 @@
# define RGB_MATRIX_LED_PROCESS_LIMIT 18
# define RGB_MATRIX_LED_FLUSH_LIMIT 16
# define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
# define RGB_MATRIX_KEYPRESSES
# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200
# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
diff --git a/keyboards/xbows/woody/config.h b/keyboards/xbows/woody/config.h
index 7f396d0008..ea27508da8 100644
--- a/keyboards/xbows/woody/config.h
+++ b/keyboards/xbows/woody/config.h
@@ -16,10 +16,10 @@
#define RGB_MATRIX_LED_FLUSH_LIMIT 26
#define DEBOUNCE 3
#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
#define RGB_MATRIX_KEYPRESSES
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200
-#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
+#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
#define DISABLE_RGB_MATRIX_BAND_SAT
#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT
@@ -40,4 +40,4 @@
#define DRIVER_1_LED_TOTAL 35
#define DRIVER_2_LED_TOTAL 32
#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
-#endif \ No newline at end of file
+#endif
diff --git a/keyboards/xd75/keymaps/c4software_bepo/keymap.c b/keyboards/xd75/keymaps/c4software_bepo/keymap.c
index 4571033c0b..fdfe3be16d 100644
--- a/keyboards/xd75/keymaps/c4software_bepo/keymap.c
+++ b/keyboards/xd75/keymaps/c4software_bepo/keymap.c
@@ -37,10 +37,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/
[_BP] = LAYOUT_ortho_5x15( /* BepoDev */
- KC_ESC, BP_DQOT, BP_LGIL, BP_RGIL, BP_LPRN, BP_RPRN, BP_PERCENT, KC_VOLD, KC_VOLU, BP_AT, BP_PLUS, BP_MINUS, BP_SLASH, BP_ASTR, BP_EQUAL,
- KC_TAB, BP_B, BP_E_ACUTE, BP_P, BP_O, BP_DOLLAR, BP_E_GRAVE, KC_DEL, BP_DCRC, BP_V, BP_D, BP_L, BP_J, BP_Z, BP_CCED,
- KC_RALT, BP_A, BP_U, BP_I, BP_E, BP_COMMA, KC_BSPC, KC_ENT, BP_C, BP_T, BP_S, BP_R, BP_N, BP_M, BP_W,
- KC_LSFT, BP_A_GRAVE, BP_Y, BP_X, BP_DOT, BP_K, KC_BSPC, KC_ENT, BP_APOS, BP_Q, BP_G, BP_H, BP_F, KC_UP, KC_RSFT,
+ KC_ESC, BP_DQUO, BP_LDAQ, BP_RDAQ, BP_LPRN, BP_RPRN, BP_PERC, KC_VOLD, KC_VOLU, BP_AT, BP_PLUS, BP_MINS, BP_SLSH, BP_ASTR, BP_EQL,
+ KC_TAB, BP_B, BP_EACU, BP_P, BP_O, BP_DLR, BP_EGRV, KC_DEL, BP_DCIR, BP_V, BP_D, BP_L, BP_J, BP_Z, BP_CCED,
+ KC_RALT, BP_A, BP_U, BP_I, BP_E, BP_COMM, KC_BSPC, KC_ENT, BP_C, BP_T, BP_S, BP_R, BP_N, BP_M, BP_W,
+ KC_LSFT, BP_AGRV, BP_Y, BP_X, BP_DOT, BP_K, KC_BSPC, KC_ENT, BP_QUOT, BP_Q, BP_G, BP_H, BP_F, KC_UP, KC_RSFT,
KC_LALT, KC_LCTL, MO(_FN), KC_LGUI, KC_SPC, KC_SPC, KC_RALT, KC_RALT, KC_SPC, KC_SPC, KC_RGUI, MO(_FN), KC_LEFT, KC_DOWN, KC_RGHT
),
diff --git a/keyboards/xd75/keymaps/cbbrowne/rules.mk b/keyboards/xd75/keymaps/cbbrowne/rules.mk
index eb2f870634..ca52524894 100644
--- a/keyboards/xd75/keymaps/cbbrowne/rules.mk
+++ b/keyboards/xd75/keymaps/cbbrowne/rules.mk
@@ -14,7 +14,6 @@ AUDIO_ENABLE = no # Audio output on port C6
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
-API_SYSEX_ENABLE = no # Enable SYSEX API (+5390)
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
diff --git a/keyboards/xd75/keymaps/developper_bepo/keymap.c b/keyboards/xd75/keymaps/developper_bepo/keymap.c
index 7fedb7fb63..121b18438e 100644
--- a/keyboards/xd75/keymaps/developper_bepo/keymap.c
+++ b/keyboards/xd75/keymaps/developper_bepo/keymap.c
@@ -38,10 +38,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/
[_BP] = LAYOUT_ortho_5x15( /* BepoDev */
- BP_DOLLAR, BP_DQOT, BP_LCBR, BP_RCBR, BP_LPRN, BP_RPRN, KC_VOLD, KC_MUTE, KC_VOLU, BP_PLUS, BP_MINUS,BP_SLASH,BP_ASTR, BP_EQL, BP_PERC,
- KC_TAB, BP_B, BP_E_ACUTE, BP_P, BP_O, BP_E_GRAVE, KC_KP_7, KC_KP_8, KC_KP_9, BP_DCRC, BP_V, BP_D, BP_L, BP_J, BP_Z,
- KC_ESC, BP_A, BP_U, BP_I, BP_E, BP_COMMA, KC_HOME, KC_KP_5, KC_END, BP_C, BP_T, BP_S, BP_R, BP_N, BP_M,
- KC_LSFT, BP_W, BP_Y, BP_X, BP_DOT, BP_K, KC_PGUP, KC_END, KC_PGDOWN, BP_APOS, BP_Q, BP_G, BP_H, BP_F, KC_RSFT,
+ BP_DLR, BP_DQUO, BP_LCBR, BP_RCBR, BP_LPRN, BP_RPRN, KC_VOLD, KC_MUTE, KC_VOLU, BP_PLUS, BP_MINS, BP_SLSH, BP_ASTR, BP_EQL, BP_PERC,
+ KC_TAB, BP_B, BP_EACU, BP_P, BP_O, BP_EGRV, KC_KP_7, KC_KP_8, KC_KP_9, BP_DCIR, BP_V, BP_D, BP_L, BP_J, BP_Z,
+ KC_ESC, BP_A, BP_U, BP_I, BP_E, BP_COMM, KC_HOME, KC_KP_5, KC_END, BP_C, BP_T, BP_S, BP_R, BP_N, BP_M,
+ KC_LSFT, BP_W, BP_Y, BP_X, BP_DOT, BP_K, KC_PGUP, KC_END, KC_PGDOWN, BP_QUOT, BP_Q, BP_G, BP_H, BP_F, KC_RSFT,
KC_LCTL, KC_LGUI, KC_RALT, KC_LGUI, BP_UNDS, LT(_FN,KC_ENT), KC_DEL, KC_KP_0, KC_BSPC, LT(_FN,KC_SPC), BP_UNDS, KC_RALT, KC_RALT, KC_RGUI, KC_LCTL
),
@@ -63,9 +63,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_FN] = LAYOUT_ortho_5x15( /* FUNCTION */
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MPRV, KC_MPLY, KC_MNXT, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
- _______, S(BP_DQOT), S(BP_LGIL), S(BP_RGIL), S(BP_LPRN), S(BP_RPRN), _______, _______, _______, S(BP_AT), S(BP_PLUS), S(BP_MINUS), S(BP_SLASH), S(BP_ASTR), S(BP_EQL),
+ _______, S(BP_DQUO), S(BP_LDAQ), S(BP_RDAQ), S(BP_LPRN), S(BP_RPRN), _______, _______, _______, S(BP_AT), S(BP_PLUS), S(BP_MINS), S(BP_SLSH), S(BP_ASTR), S(BP_EQL),
_______, RALT(BP_B), BP_BSLS, BP_LBRC, BP_RBRC, RALT(BP_P), _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, _______,
- _______, BP_BSLS, _______, _______, _______, _______, _______, _______, _______, _______, BP_LESS, BP_GRTR, BP_AT , _______, _______,
+ _______, BP_BSLS, _______, _______, _______, _______, _______, _______, _______, _______, BP_LABK, BP_RABK, BP_AT , _______, _______,
_______, _______, _______, _______, _______, LT(_FN,KC_ENT), _______, _______, _______, LT(_FN,KC_SPC), _______, _______, _______, _______, RESET
)
diff --git a/keyboards/xd75/keymaps/french/keymap.c b/keyboards/xd75/keymaps/french/keymap.c
index f8de0763cc..8d5d2b634f 100644
--- a/keyboards/xd75/keymaps/french/keymap.c
+++ b/keyboards/xd75/keymaps/french/keymap.c
@@ -24,10 +24,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/
[_AZ] = LAYOUT_ortho_5x15( /* AZERTY */
- FR_ESC, FR_AMP, FR_EACU, FR_QUOT, FR_APOS, FR_LPAR, FR_MINS, FR_EGRV, FR_UNDS, FR_CCED, FR_AGRV, FR_RPAR, FR_EQUA, FR_INST, FR_BSPC,
+ FR_ESC, FR_AMPR, FR_EACU, FR_DQUO, FR_QUOT, FR_LPAR, FR_MINS, FR_EGRV, FR_UNDS, FR_CCED, FR_AGRV, FR_RPAR, FR_EQUA, FR_INST, FR_BSPC,
FR_TAB, FR_A, FR_Z, FR_E, FR_R, FR_T, FR_Y, FR_U, FR_I, FR_O, FR_P, FR_HAT, FR_DLR, FR_ENTR, FR_PGUP,
FR_CAPL, FR_Q, FR_S, FR_D, FR_F, FR_G, FR_H, FR_J, FR_K, FR_L, FR_M, FR_UGRV, FR_AST, FR_ENTR, FR_PGDN,
- FR_LSFT, FR_W, FR_X, FR_C, FR_V, FR_B, FR_N, FR_COMM, FR_SCLN, FR_COLN, FR_EXCL, FR_LESS, FR_RSFT, FR_UP, FR_DEL,
+ FR_LSFT, FR_W, FR_X, FR_C, FR_V, FR_B, FR_N, FR_COMM, FR_SCLN, FR_COLN, FR_EXCL, FR_LABK, FR_RSFT, FR_UP, FR_DEL,
FR_LCTR, FR_LCMD, FR_LALT, MO(_FN), FR_SPAC, FR_SPAC, FR_SPAC, FR_SPAC, FR_ALGR, FR_MENU, FR_HOME, FR_END, FR_LEFT, FR_DOWN, FR_RIGT
),
diff --git a/keyboards/xd75/keymaps/french/keymap_french.c b/keyboards/xd75/keymaps/french/keymap_french.c
index f7d068c33e..c346138381 100644
--- a/keyboards/xd75/keymaps/french/keymap_french.c
+++ b/keyboards/xd75/keymaps/french/keymap_french.c
@@ -28,10 +28,10 @@ enum french_key {
FR_X,
FR_Y,
FR_W,
- FR_AMP,
+ FR_AMPR,
FR_EACU,
- FR_QUOT, /* 0x20 */
- FR_APOS,
+ FR_DQUO, /* 0x20 */
+ FR_QUOT,
FR_LPAR,
FR_MINS,
FR_EGRV,
@@ -94,7 +94,7 @@ enum french_key {
FR_9,
FR_0,
FR_DOT,
- FR_LESS,
+ FR_LABK,
FR_EQ =0x67 /* END KEYPAD */,
FR_F13,
FR_F14,
diff --git a/keyboards/xd75/keymaps/germanized/config.h b/keyboards/xd75/keymaps/germanized/config.h
index 65ab6a0dcb..d8c8f2d502 100644
--- a/keyboards/xd75/keymaps/germanized/config.h
+++ b/keyboards/xd75/keymaps/germanized/config.h
@@ -68,22 +68,22 @@
#define DE_COMM KC_COMM
#define DE_SS KC_MINS
-#define DE_AE KC_QUOT
-#define DE_UE KC_LBRC
-#define DE_OE KC_SCLN
+#define DE_ADIA KC_QUOT
+#define DE_UDIA KC_LBRC
+#define DE_ODIA KC_SCLN
#define DE_CIRC KC_GRAVE // accent circumflex ^ and ring °
#define DE_ACUT KC_EQL // accent acute ´ and grave `
#define DE_PLUS KC_RBRC // + and * and ~
#define DE_HASH KC_BSLS // # and '
-#define DE_LESS KC_NUBS // < and > and |
+#define DE_LABK KC_NUBS // < and > and |
#define DE_MINS KC_SLSH // - and _
// shifted characters
-#define DE_RING LSFT(DE_CIRC) // °
+#define DE_DEG LSFT(DE_CIRC) // °
#define DE_EXLM LSFT(KC_1) // !
-#define DE_DQOT LSFT(KC_2) // "
-#define DE_PARA LSFT(KC_3) // §
+#define DE_DQUO LSFT(KC_2) // "
+#define DE_SECT LSFT(KC_3) // §
#define DE_DLR LSFT(KC_4) // $
#define DE_PERC LSFT(KC_5) // %
#define DE_AMPR LSFT(KC_6) // &
@@ -91,18 +91,18 @@
#define DE_LPRN LSFT(KC_8) // (
#define DE_RPRN LSFT(KC_9) // )
#define DE_EQL LSFT(KC_0) // =
-#define DE_QST LSFT(DE_SS) // ?
+#define DE_QUES LSFT(DE_SS) // ?
#define DE_GRV LSFT(DE_ACUT) // `
#define DE_ASTR LSFT(DE_PLUS) // *
#define DE_QUOT LSFT(DE_HASH) // '
-#define DE_MORE LSFT(DE_LESS) // >
+#define DE_RABK LSFT(DE_LABK) // >
#define DE_COLN LSFT(KC_DOT) // :
#define DE_SCLN LSFT(KC_COMM) // ;
#define DE_UNDS LSFT(DE_MINS) // _
// Alt Gr-ed characters
-#define DE_SQ2 ALGR(KC_2) // ²
-#define DE_SQ3 ALGR(KC_3) // ³
+#define DE_SUP2 ALGR(KC_2) // ²
+#define DE_SUP3 ALGR(KC_3) // ³
#define DE_LCBR ALGR(KC_7) // {
#define DE_LBRC ALGR(KC_8) // [
#define DE_RBRC ALGR(KC_9) // ]
@@ -111,7 +111,7 @@
#define DE_AT ALGR(KC_Q) // @
#define DE_EURO ALGR(KC_E) // €
#define DE_TILD ALGR(DE_PLUS) // ~
-#define DE_PIPE ALGR(DE_LESS) // |
+#define DE_PIPE ALGR(DE_LABK) // |
// Launchy
#define ALT_SPC LALT(KC_SPC)
diff --git a/keyboards/xd75/keymaps/germanized/keymap.c b/keyboards/xd75/keymaps/germanized/keymap.c
index 77346d1865..3b00a4b670 100644
--- a/keyboards/xd75/keymaps/germanized/keymap.c
+++ b/keyboards/xd75/keymaps/germanized/keymap.c
@@ -55,10 +55,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QWZ] = LAYOUT_ortho_5x15(
TD(TD_ESC_RUPT), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, DE_SS, DE_ACUT, KC_BSPC, KC_ESC,
- KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, DE_Z, KC_U, KC_I, KC_O, KC_P, DE_UE, DE_PLUS, KC_NO, KC_PGUP,
- TD(TD_TAB), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, DE_OE, DE_AE, DE_HASH, KC_ENT, KC_PGDN,
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, DE_Z, KC_U, KC_I, KC_O, KC_P, DE_UDIA, DE_PLUS, KC_NO, KC_PGUP,
+ TD(TD_TAB), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, DE_ODIA, DE_ADIA, DE_HASH, KC_ENT, KC_PGDN,
KC_LSFT, DE_Y, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, DE_MINS, DE_CIRC, MT(MOD_RSFT, KC_HOME), KC_UP, KC_END,
- KC_LCTL, KC_LALT, LT(1, KC_ENT), KC_SPC, KC_NO, KC_BSPC, KC_NO, TT(1), MT(MOD_RALT, KC_PAUS), KC_RGUI, DE_LESS, KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT
+ KC_LCTL, KC_LALT, LT(1, KC_ENT), KC_SPC, KC_NO, KC_BSPC, KC_NO, TT(1), MT(MOD_RALT, KC_PAUS), KC_RGUI, DE_LABK, KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT
),
/* FNC
diff --git a/keyboards/xd75/keymaps/markus/keymap.c b/keyboards/xd75/keymaps/markus/keymap.c
index ab818318e7..ddef0e59b8 100644
--- a/keyboards/xd75/keymaps/markus/keymap.c
+++ b/keyboards/xd75/keymaps/markus/keymap.c
@@ -60,9 +60,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* '--------------------------------------------------------------------------------------------------------------------------------------'
*/
[_QWZ] = LAYOUT_ortho_5x15(
-DE_1, DE_2, DE_3, DE_4, DE_5, DE_6, KC_MUTE, KC_VOLD, KC_VOLU, DE_7, DE_8, DE_9, DE_0, DE_SS, DE_UE,
-KC_ESC, DE_Q, DE_W, DE_E, DE_R, DE_T, KC_HOME, KC_MPLY, KC_END, DE_Z, DE_U, DE_I, DE_O, DE_P, DE_AE,
-KC_LSFT, DE_A, DE_S, DE_D, DE_F, DE_G, KC_PGUP, KC_UP, KC_PGDN, DE_H, DE_J, DE_K, DE_L, DE_OE, KC_RSFT,
+DE_1, DE_2, DE_3, DE_4, DE_5, DE_6, KC_MUTE, KC_VOLD, KC_VOLU, DE_7, DE_8, DE_9, DE_0, DE_SS, DE_UDIA,
+KC_ESC, DE_Q, DE_W, DE_E, DE_R, DE_T, KC_HOME, KC_MPLY, KC_END, DE_Z, DE_U, DE_I, DE_O, DE_P, DE_ADIA,
+KC_LSFT, DE_A, DE_S, DE_D, DE_F, DE_G, KC_PGUP, KC_UP, KC_PGDN, DE_H, DE_J, DE_K, DE_L, DE_ODIA, KC_RSFT,
KC_LCTL, DE_Y, DE_X, DE_C, DE_V, DE_B, KC_LEFT, KC_DOWN, KC_RIGHT, DE_N, DE_M, DE_COMM, DE_DOT, DE_MINS, KC_RCTL,
KC_CAPS, MO(_FN3), KC_LGUI, KC_LALT, MO(_FN2), MO(_FN1), KC_TAB, KC_DEL, KC_ENT, KC_SPC, KC_BSPC, KC_LALT, KC_LGUI, MO(_FN3), KC_INS
),
@@ -81,9 +81,9 @@ KC_CAPS, MO(_FN3), KC_LGUI, KC_LALT, MO(_FN2), MO(_FN1), KC_TAB, KC_DEL,
* '--------------------------------------------------------------------------------------------------------------------------------------'
*/
[_QWY] = LAYOUT_ortho_5x15(
-DE_1, DE_2, DE_3, DE_4, DE_5, DE_6, KC_MUTE, KC_VOLD, KC_VOLU, DE_7, DE_8, DE_9, DE_0, DE_SS, DE_UE,
-KC_ESC, DE_Q, DE_W, DE_E, DE_R, DE_T, KC_HOME, KC_MPLY, KC_END, DE_Y, DE_U, DE_I, DE_O, DE_P, DE_AE,
-KC_LSFT, DE_A, DE_S, DE_D, DE_F, DE_G, KC_PGUP, KC_UP, KC_PGDN, DE_H, DE_J, DE_K, DE_L, DE_OE, KC_RSFT,
+DE_1, DE_2, DE_3, DE_4, DE_5, DE_6, KC_MUTE, KC_VOLD, KC_VOLU, DE_7, DE_8, DE_9, DE_0, DE_SS, DE_UDIA,
+KC_ESC, DE_Q, DE_W, DE_E, DE_R, DE_T, KC_HOME, KC_MPLY, KC_END, DE_Y, DE_U, DE_I, DE_O, DE_P, DE_ADIA,
+KC_LSFT, DE_A, DE_S, DE_D, DE_F, DE_G, KC_PGUP, KC_UP, KC_PGDN, DE_H, DE_J, DE_K, DE_L, DE_ODIA, KC_RSFT,
KC_LCTL, DE_Z, DE_X, DE_C, DE_V, DE_B, KC_LEFT, KC_DOWN, KC_RIGHT, DE_N, DE_M, DE_COMM, DE_DOT, DE_MINS, KC_RCTL,
KC_CAPS, MO(_FN3), KC_LGUI, KC_LALT, MO(_FN2), MO(_FN1), KC_TAB, KC_DEL, KC_ENT, KC_SPC, KC_BSPC, KC_LALT, KC_LGUI, MO(_FN3), KC_INS
),
@@ -102,9 +102,9 @@ KC_CAPS, MO(_FN3), KC_LGUI, KC_LALT, MO(_FN2), MO(_FN1), KC_TAB, KC_DEL,
* '--------------------------------------------------------------------------------------------------------------------------------------'
*/
[_GAM] = LAYOUT_ortho_5x15(
-DE_1, DE_2, DE_3, DE_4, DE_5, DE_6, KC_MUTE, KC_VOLD, KC_VOLU, DE_7, DE_8, DE_9, DE_0, DE_SS, DE_UE,
-KC_ESC, DE_Q, DE_W, DE_E, DE_R, DE_T, KC_HOME, KC_MPLY, KC_END, DE_Y, DE_U, DE_I, DE_O, DE_P, DE_AE,
-KC_LSFT, DE_A, DE_S, DE_D, DE_F, DE_G, KC_PGUP, KC_UP, KC_PGDN, DE_H, DE_J, DE_K, DE_L, DE_OE, KC_RSFT,
+DE_1, DE_2, DE_3, DE_4, DE_5, DE_6, KC_MUTE, KC_VOLD, KC_VOLU, DE_7, DE_8, DE_9, DE_0, DE_SS, DE_UDIA,
+KC_ESC, DE_Q, DE_W, DE_E, DE_R, DE_T, KC_HOME, KC_MPLY, KC_END, DE_Y, DE_U, DE_I, DE_O, DE_P, DE_ADIA,
+KC_LSFT, DE_A, DE_S, DE_D, DE_F, DE_G, KC_PGUP, KC_UP, KC_PGDN, DE_H, DE_J, DE_K, DE_L, DE_ODIA, KC_RSFT,
KC_LCTL, DE_Z, DE_X, DE_C, DE_V, DE_B, KC_LEFT, KC_DOWN, KC_RIGHT, DE_N, DE_M, DE_COMM, DE_DOT, DE_MINS, KC_RCTL,
MO(_FN2), MO(_FN3), KC_LGUI, KC_LALT, KC_SPC, MO(_FN1), KC_TAB, KC_DEL, KC_ENT, KC_SPC, KC_BSPC, KC_LALT, KC_LGUI, MO(_FN3), KC_INS
),
@@ -125,8 +125,8 @@ MO(_FN2), MO(_FN3), KC_LGUI, KC_LALT, KC_SPC, MO(_FN1), KC_TAB, KC_DEL,
[_FN1] = LAYOUT_ortho_5x15(
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MPRV, KC_MPLY, KC_MNXT, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
________, DE_AT, DE_TILD, DE_EURO, DE_ACUT, DE_GRV, ________, ___xx___, ________, DE_BSLS, DE_LCBR, DE_RCBR, DE_PLUS, DE_ASTR, ___xx___,
-________, DE_DQOT, DE_QUOT, UC(L'‚'), UC(L'‘'), UC(L'’'), ________, ________, ________, DE_PIPE, DE_LBRC, DE_RBRC, DE_EXLM, DE_QST, ________,
-________, DE_RING, DE_CIRC, UC(L'„'), UC(L'“'), UC(L'â€'), ________, ________, ________, DE_HASH, DE_LESS, DE_MORE, UC(L'…'), UC(L'–'), ________,
+________, DE_DQUO, DE_QUOT, UC(L'‚'), UC(L'‘'), UC(L'’'), ________, ________, ________, DE_PIPE, DE_LBRC, DE_RBRC, DE_EXLM, DE_QUES, ________,
+________, DE_DEG, DE_CIRC, UC(L'„'), UC(L'“'), UC(L'â€'), ________, ________, ________, DE_HASH, DE_LABK, DE_RABK, UC(L'…'), UC(L'–'), ________,
___xx___, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________
),
diff --git a/keyboards/xd75/keymaps/pitty/keymap.c b/keyboards/xd75/keymaps/pitty/keymap.c
index 955ae59ed5..ff812d6791 100644
--- a/keyboards/xd75/keymaps/pitty/keymap.c
+++ b/keyboards/xd75/keymaps/pitty/keymap.c
@@ -49,9 +49,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `--------------------------------------------------------------------------------------------------------'
*/
[_QWERTY] = LAYOUT_ortho_5x15( \
- HU_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, HU_OE, HU_UE, HU_OO, KC_INS, KC_PGUP, \
- KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, HU_Z, KC_U, KC_I, KC_O, KC_P, HU_OEE, HU_UU, KC_DEL, KC_PGDN, \
- KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, HU_EE, HU_AA, HU_UEE, _______, KC_HOME, \
+ HU_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, HU_ODIA, HU_UDIA, HU_OACU, KC_INS, KC_PGUP, \
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, HU_Z, KC_U, KC_I, KC_O, KC_P, HU_ODAC, HU_UACU, KC_DEL, KC_PGDN, \
+ KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, HU_EACU, HU_AACU, HU_UDAC, _______, KC_HOME, \
MT(MOD_LSFT, KC_NUBS), HU_Y, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, HU_COMM, HU_DOT, HU_MINS, KC_RSFT, HU_EQL, KC_UP, KC_END, \
KC_LCTL, KC_LGUI, KC_LALT, TT(_LOWER), KC_SPC, _______, KC_ENT, KC_BSPC, KC_RALT, TT(_RAISE), _______, _______, KC_LEFT, KC_DOWN, KC_RIGHT \
),
@@ -71,9 +71,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `--------------------------------------------------------------------------------------------------------'
*/
[_GAME] = LAYOUT_ortho_5x15( \
- HU_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, HU_OE, HU_UE, HU_OO, KC_INS, KC_PGUP, \
- KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, HU_Z, KC_U, KC_I, KC_O, KC_P, HU_OEE, HU_UU, KC_DEL, KC_PGDN, \
- KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, HU_EE, HU_AA, HU_UEE, _______, KC_HOME, \
+ HU_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, HU_ODIA, HU_UDIA, HU_OACU, KC_INS, KC_PGUP, \
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, HU_Z, KC_U, KC_I, KC_O, KC_P, HU_ODAC, HU_UACU, KC_DEL, KC_PGDN, \
+ KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, HU_EACU, HU_AACU, HU_UDAC, _______, KC_HOME, \
KC_LSFT, HU_Y, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, HU_COMM, HU_DOT, HU_MINS, KC_RSFT, HU_EQL, KC_UP, KC_END, \
KC_LCTL, KC_LGUI, KC_LALT, TT(_RAISE), KC_SPC, _______, KC_ENT, KC_BSPC, KC_RALT, TT(_LOWER), _______, _______, KC_LEFT, KC_DOWN, KC_RIGHT \
),
diff --git a/keyboards/xd75/keymaps/skewwhiffy/keymap.c b/keyboards/xd75/keymaps/skewwhiffy/keymap.c
index ab0213862c..3db29a3636 100644
--- a/keyboards/xd75/keymaps/skewwhiffy/keymap.c
+++ b/keyboards/xd75/keymaps/skewwhiffy/keymap.c
@@ -56,11 +56,11 @@ enum Layers {
// Custom hotkeys
#define _TERM LCTL(UK_QUOT) // Hotkey for terminal
-#define _S_TAB S(UK_TAB)
-#define _C_LEFT LCTL(UK_LEFT)
-#define _C_RGHT LCTL(UK_RGHT)
-#define _A_LEFT LALT(UK_LEFT)
-#define _A_RGHT LALT(UK_RGHT)
+#define _S_TAB S(KC_TAB)
+#define _C_LEFT LCTL(KC_LEFT)
+#define _C_RGHT LCTL(KC_RGHT)
+#define _A_LEFT LALT(KC_LEFT)
+#define _A_RGHT LALT(KC_RGHT)
enum custom_keycodes {
IJ_OMN = SAFE_RANGE // IntelliJ Omnibox
@@ -86,8 +86,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
UK_Q, UK_W, UK_F, UK_P, UK_G, _______, _______, _______, _______, _______, UK_J, UK_L, UK_U, UK_Y, UK_SCLN, \
UK_A, UK_R, UK_S, UK_T, UK_D, _______, _______, _______, _______, _______, UK_H, UK_N, UK_E, UK_I, UK_O , \
- _Z_SFT, _X_NB, _C_SY, _V_NAL, UK_B, _______, _______, UK_UP, _______, _______, UK_K, _M_NAR, _COM_SY, _DOT_NB, _SLSH , \
- UK_LSFT, UK_LCTL, UK_LALT, UK_LGUI, UK_SPC, UK_ENT, UK_LEFT, UK_DOWN, UK_RGHT, UK_DEL, UK_BSPC, UK_RGUI, UK_RALT, UK_RCTL, UK_RSFT \
+ _Z_SFT, _X_NB, _C_SY, _V_NAL, UK_B, _______, _______, KC_UP, _______, _______, UK_K, _M_NAR, _COM_SY, _DOT_NB, _SLSH , \
+ KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_ENT, KC_LEFT, KC_DOWN, KC_RGHT, KC_DEL, KC_BSPC, KC_RGUI, KC_RALT, KC_RCTL, KC_RSFT \
),
/* Dvorak
@@ -151,16 +151,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/
[nbl] = LAYOUT_ortho_5x15( \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
- _______, UK_F7, UK_F8, UK_F9, UK_F10, _______, _______, _______, _______, _______, _______, UK_7, UK_8, UK_9, _______, \
- _______, UK_F4, UK_F5, UK_F6, UK_F11, _______, _______, _______, _______, _______, _______, UK_4, UK_5, UK_6, _______, \
- _______, __NBL, UK_F2, UK_F3, UK_F12, _______, _______, _______, _______, _______, UK_0, UK_1, UK_2, UK_3, UK_DOT, \
+ _______, KC_F7, KC_F8, KC_F9, KC_F10, _______, _______, _______, _______, _______, _______, UK_7, UK_8, UK_9, _______, \
+ _______, KC_F4, KC_F5, KC_F6, KC_F11, _______, _______, _______, _______, _______, _______, UK_4, UK_5, UK_6, _______, \
+ _______, __NBL, KC_F2, KC_F3, KC_F12, _______, _______, _______, _______, _______, UK_0, UK_1, UK_2, UK_3, UK_DOT, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
),
[nbr] = LAYOUT_ortho_5x15( \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
- _______, UK_F7, UK_F8, UK_F9, UK_F10, _______, _______, _______, _______, _______, _______, UK_7, UK_8, UK_9, _______, \
- _______, UK_F4, UK_F5, UK_F6, UK_F11, _______, _______, _______, _______, _______, _______, UK_4, UK_5, UK_6, _______, \
- _______, UK_F1, UK_F2, UK_F3, UK_F12, _______, _______, _______, _______, _______, UK_0, UK_1, UK_2, __NBR, UK_DOT , \
+ _______, KC_F7, KC_F8, KC_F9, KC_F10, _______, _______, _______, _______, _______, _______, UK_7, UK_8, UK_9, _______, \
+ _______, KC_F4, KC_F5, KC_F6, KC_F11, _______, _______, _______, _______, _______, _______, UK_4, UK_5, UK_6, _______, \
+ _______, KC_F1, KC_F2, KC_F3, KC_F12, _______, _______, _______, _______, _______, UK_0, UK_1, UK_2, __NBR, UK_DOT , \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
),
@@ -207,16 +207,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/
[nal] = LAYOUT_ortho_5x15( \
RESET, DF(cm), DF(dv), DF(qw), _______, RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
- UK_ESC, _C_LEFT, UK_UP , _C_RGHT, _______, RGB_HUD, RGB_HUI, _______, _______, _______, _______, UK_PSCR, UK_SLCK, UK_PAUS, _______, \
- UK_TAB, UK_LEFT, UK_DOWN, UK_RGHT, _______, RGB_SAD, RGB_SAI, _______, _______, _______, _______, UK_INS, UK_HOME, UK_PGUP, _TERM , \
- _S_TAB, _A_LEFT, IJ_OMN, __NAL, _______, RGB_VAD, RGB_VAI, _______, _______, _______, _______, UK_SLCK, UK_END, UK_PGDN, _______, \
+ KC_ESC, _C_LEFT, KC_UP , _C_RGHT, _______, RGB_HUD, RGB_HUI, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, \
+ KC_TAB, KC_LEFT, KC_DOWN, KC_RGHT, _______, RGB_SAD, RGB_SAI, _______, _______, _______, _______, KC_INS, KC_HOME, KC_PGUP, _TERM , \
+ _S_TAB, _A_LEFT, IJ_OMN, __NAL, _______, RGB_VAD, RGB_VAI, _______, _______, _______, _______, KC_SLCK, KC_END, KC_PGDN, _______, \
_______, _______, _______, _______, _______, RGB_RMOD,RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______ \
),
[nar] = LAYOUT_ortho_5x15( \
RESET, DF(cm), DF(dv), DF(qw), _______, RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
- UK_ESC, _C_LEFT, UK_UP , _C_RGHT, _______, RGB_HUD, RGB_HUI, _______, _______, _______, _______, UK_PSCR, UK_SLCK, UK_PAUS, _______, \
- UK_TAB, UK_LEFT, UK_DOWN, UK_RGHT, _______, RGB_SAD, RGB_SAI, _______, _______, _______, _______, UK_INS, UK_HOME, UK_PGUP, _TERM , \
- _S_TAB, _A_LEFT, IJ_OMN, _A_RGHT, _______, RGB_VAD, RGB_VAI, _______, _______, _______, _______, __NAR, UK_END, UK_PGDN, _______, \
+ KC_ESC, _C_LEFT, KC_UP , _C_RGHT, _______, RGB_HUD, RGB_HUI, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, \
+ KC_TAB, KC_LEFT, KC_DOWN, KC_RGHT, _______, RGB_SAD, RGB_SAI, _______, _______, _______, _______, KC_INS, KC_HOME, KC_PGUP, _TERM , \
+ _S_TAB, _A_LEFT, IJ_OMN, _A_RGHT, _______, RGB_VAD, RGB_VAI, _______, _______, _______, _______, __NAR, KC_END, KC_PGDN, _______, \
_______, _______, _______, _______, _______, RGB_RMOD,RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______ \
)
};
diff --git a/keyboards/xw60/rules.mk b/keyboards/xw60/rules.mk
index b8629daeb8..7486c74c36 100644
--- a/keyboards/xw60/rules.mk
+++ b/keyboards/xw60/rules.mk
@@ -27,7 +27,6 @@ AUDIO_ENABLE = no # Audio output on port C6
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
-API_SYSEX_ENABLE = no
HAPTIC_ENABLE += SOLENOID
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
diff --git a/keyboards/ymdk/np24/u4rgb6/rules.mk b/keyboards/ymdk/np24/u4rgb6/rules.mk
index 625a433f92..d05a2a589b 100644
--- a/keyboards/ymdk/np24/u4rgb6/rules.mk
+++ b/keyboards/ymdk/np24/u4rgb6/rules.mk
@@ -21,4 +21,4 @@ RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
BLUETOOTH_ENABLE = no # Enable Bluetooth
AUDIO_ENABLE = no # Audio output
-LAYOUTS = ortho_6x4 numpad_6x4 ortho_4x6
+LAYOUTS = ortho_6x4 numpad_6x4
diff --git a/keyboards/yncognito/batpad/config.h b/keyboards/yncognito/batpad/config.h
index 02c84a514a..7ca4072e07 100644
--- a/keyboards/yncognito/batpad/config.h
+++ b/keyboards/yncognito/batpad/config.h
@@ -47,13 +47,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGB_DI_PIN B5
#define DRIVER_LED_TOTAL 8
-#define RGB_MATRIX_KEYPRESSES
-#define RGB_MATRIX_KEYRELEASES
+#define RGB_MATRIX_KEYPRESSES
+#define RGB_MATRIX_KEYRELEASES
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
-#define RGB_DISABLE_AFTER_TIMEOUT 0
-#define RGB_DISABLE_WHEN_USB_SUSPENDED false
-#define RGB_MATRIX_LED_FLUSH_LIMIT 16
-#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255
+#define RGB_DISABLE_AFTER_TIMEOUT 0
+// #define RGB_DISABLE_WHEN_USB_SUSPENDED
+#define RGB_MATRIX_LED_FLUSH_LIMIT 16
+#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL
-
-
diff --git a/layouts/community/ergodox/adnw_k_o_y/keymap.c b/layouts/community/ergodox/adnw_k_o_y/keymap.c
index 6ade0001ce..589a9ea873 100644
--- a/layouts/community/ergodox/adnw_k_o_y/keymap.c
+++ b/layouts/community/ergodox/adnw_k_o_y/keymap.c
@@ -36,7 +36,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT,
KC_DEL, DE_K, DE_DOT, DE_O, DE_COMM,DE_Y, TG(SYMB),
KC_BSPC, DE_H, DE_A, DE_E, DE_I, DE_U,
- KC_LSFT, CTL_T(DE_X), DE_Q, DE_AE, DE_UE, DE_OE, ALL_T(KC_NO),
+ KC_LSFT, CTL_T(DE_X), DE_Q, DE_ADIA,DE_UDIA,DE_ODIA,ALL_T(KC_NO),
LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT,KC_RGHT,
ALT_T(KC_APP), KC_LGUI,
KC_HOME,
diff --git a/layouts/community/ergodox/adnw_p_u_q/keymap.c b/layouts/community/ergodox/adnw_p_u_q/keymap.c
index a90fcbc2c7..cf2ab93589 100644
--- a/layouts/community/ergodox/adnw_p_u_q/keymap.c
+++ b/layouts/community/ergodox/adnw_p_u_q/keymap.c
@@ -60,7 +60,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_H, KC_J, KC_K, KC_L, KC_RCTRL,
// right thumb-cluster
- DE_QST, DE_DLR,
+ DE_QUES, DE_DLR,
LCTL(DE_C),
KC_ESCAPE, KC_ENTER, KC_BSPACE
),
@@ -134,8 +134,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// Diakritika
[DIAK] = LAYOUT_ergodox(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, DE_UE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, DE_AE, DE_OE,
+ KC_TRNS, KC_TRNS, DE_UDIA, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, DE_ADIA, DE_ODIA,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS,
@@ -218,8 +218,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[SYMBOLS] = LAYOUT_ergodox(
// left hand
KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, //DE_LBRC,
- KC_TRNS,DE_SQ2, DE_RING, DE_TILD, DE_AT, DE_EXLM, DE_LPRN,
- KC_TRNS,DE_ACUT,DE_QUOT, DE_COLN, DE_CIRC, DE_LESS,
+ KC_TRNS,DE_SUP2,DE_DEG, DE_TILD, DE_AT, DE_EXLM, DE_LPRN,
+ KC_TRNS,DE_ACUT,DE_QUOT, DE_COLN, DE_CIRC, DE_LABK,
KC_TRNS,DE_EURO,DE_PLUS, DE_EQL, DE_ASTR, DE_SLSH, DE_LCBR,
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
@@ -230,8 +230,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// right hand
//DE_RBRC,
KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS,
- DE_RPRN, DE_QST, DE_AMPR, DE_PARA, DE_DQOT, DE_SQ3, KC_TRNS,
- DE_MORE, DE_DLR, DE_SCLN, DE_PIPE, DE_GRV, KC_TRNS,
+ DE_RPRN, DE_QUES, DE_AMPR, DE_SECT, DE_DQUO, DE_SUP3, KC_TRNS,
+ DE_RABK, DE_DLR, DE_SCLN, DE_PIPE, DE_GRV, KC_TRNS,
DE_RCBR, DE_BSLS, DE_PERC, DE_HASH, DE_MINS, DE_UNDS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
diff --git a/layouts/community/ergodox/algernon/keymap.c b/layouts/community/ergodox/algernon/keymap.c
index e6e9bdaf7f..0680870954 100644
--- a/layouts/community/ergodox/algernon/keymap.c
+++ b/layouts/community/ergodox/algernon/keymap.c
@@ -47,15 +47,15 @@ enum {
APP_SCL2, // Social #2
// Hungarian layer keys
- HU_AA, // Ã
- HU_OO, // Ó
- HU_EE, // É
- HU_UU, // Ú
- HU_II, // Ã
- HU_OE, // Ö
- HU_UE, // Ü
- HU_OEE, // Å
- HU_UEE, // Å°
+ HU_AACU, // Ã
+ HU_OACU, // Ó
+ HU_EACU, // É
+ HU_UACU, // Ú
+ HU_IACU, // Ã
+ HU_ODIA, // Ö
+ HU_UDIA, // Ü
+ HU_ODAC, // Å
+ HU_UDAC, // Å°
// number/symbol keys
A_1, // 1
@@ -322,9 +322,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[HUN] = LAYOUT_ergodox(
// left hand
KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
-,KC_NO ,KC_NO ,M(HU_OEE),KC_NO ,M(HU_UEE),KC_NO ,KC_NO
-,KC_NO ,M(HU_AA),M(HU_OO) ,M(HU_EE),M(HU_UU) ,M(HU_II)
-,KC_NO ,KC_NO ,M(HU_OE) ,KC_NO ,M(HU_UE) ,KC_NO ,KC_NO
+,KC_NO ,KC_NO ,M(HU_ODAC),KC_NO ,M(HU_UDAC),KC_NO ,KC_NO
+,KC_NO ,M(HU_AACU),M(HU_OACU) ,M(HU_EACU),M(HU_UACU) ,M(HU_IACU)
+,KC_NO ,KC_NO ,M(HU_ODIA) ,KC_NO ,M(HU_UDIA) ,KC_NO ,KC_NO
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
,KC_NO ,KC_NO
@@ -588,23 +588,23 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
break;
/* Hungarian layer */
- case HU_AA:
+ case HU_AACU:
return ang_do_hun (record, KC_QUOT, KC_A);
- case HU_OO:
+ case HU_OACU:
return ang_do_hun (record, KC_QUOT, KC_O);
- case HU_EE:
+ case HU_EACU:
return ang_do_hun (record, KC_QUOT, KC_E);
- case HU_UU:
+ case HU_UACU:
return ang_do_hun (record, KC_QUOT, KC_U);
- case HU_II:
+ case HU_IACU:
return ang_do_hun (record, KC_QUOT, KC_I);
- case HU_OE:
+ case HU_ODIA:
return ang_do_hun (record, KC_DQT, KC_O);
- case HU_UE:
+ case HU_UDIA:
return ang_do_hun (record, KC_DQT, KC_U);
- case HU_OEE:
+ case HU_ODAC:
return ang_do_hun (record, KC_EQL, KC_O);
- case HU_UEE:
+ case HU_UDAC:
return ang_do_hun (record, KC_EQL, KC_U);
/* Plover base */
diff --git a/layouts/community/ergodox/bepo/keymap.c b/layouts/community/ergodox/bepo/keymap.c
index 6ea8cba681..4090721d09 100644
--- a/layouts/community/ergodox/bepo/keymap.c
+++ b/layouts/community/ergodox/bepo/keymap.c
@@ -37,19 +37,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/
[BEPO] = LAYOUT_ergodox(
// Left hand
-BP_DOLLAR, BP_DQOT, BP_LGIL, BP_RGIL, BP_LPRN, BP_RPRN, KC_DEL,
-BP_PERCENT, BP_B, BP_E_ACUTE, BP_P, BP_O, BP_E_GRAVE, KC_BSPC,
-BP_W, BP_A, BP_U, BP_I, BP_E, BP_COMMA,
-BP_ECRC, BP_A_GRAVE, BP_Y, BP_X, BP_DOT, BP_K, KC_TAB,
+BP_DLR, BP_DQUO, BP_LDAQ, BP_RDAQ, BP_LPRN, BP_RPRN, KC_DEL,
+BP_PERC, BP_B, BP_EACU, BP_P, BP_O, BP_EGRV, KC_BSPC,
+BP_W, BP_A, BP_U, BP_I, BP_E, BP_COMM,
+BP_ECIR, BP_AGRV, BP_Y, BP_X, BP_DOT, BP_K, KC_TAB,
KC_ESC, KC_INS, KC_LGUI, KC_LCTL, KC_LALT,
DF(BEPO), DF(QW_B),
MO(NUMK),
KC_SPC, KC_LSHIFT, MO(FNAV),
// Right hand
- KC_SLCK, BP_AT, BP_PLUS, BP_MINUS, BP_SLASH, BP_ASTR, BP_EQUAL,
- KC_CAPSLOCK, BP_DCRC, BP_V, BP_D, BP_L, BP_J, BP_Z,
+ KC_SLCK, BP_AT, BP_PLUS, BP_MINS, BP_SLSH, BP_ASTR, BP_EQL,
+ KC_CAPSLOCK, BP_DCIR, BP_V, BP_D, BP_L, BP_J, BP_Z,
BP_C, BP_T, BP_S, BP_R, BP_N, BP_M,
- KC_NUMLOCK, BP_APOS, BP_Q, BP_G, BP_H, BP_F, BP_CCED,
+ KC_NUMLOCK, BP_QUOT, BP_Q, BP_G, BP_H, BP_F, BP_CCED,
KC_ALGR, KC_RCTL, KC_RGUI, KC_PSCREEN, KC_PAUSE,
DF(AZ_B), DF(BEPO),
MO(NUMK),
@@ -74,7 +74,7 @@ MO(FNAV), KC_RSHIFT, KC_ENTER),
*/
[QW_B] = LAYOUT_ergodox(
// Left hand
-KC_DOLLAR, S(KC_QUOT), S(KC_COMM), S(KC_DOT), KC_LPRN, KC_RPRN, KC_DEL,
+KC_DOLLAR, S(KC_DQUO), S(KC_COMM), S(KC_DOT), KC_LPRN, KC_RPRN, KC_DEL,
KC_PERCENT, KC_B, KC_E, KC_P, KC_O, KC_E, KC_BSPC,
KC_W, KC_A, KC_U, KC_I, KC_E, KC_COMMA,
KC_E, KC_A, KC_Y, KC_X, KC_DOT, KC_K, KC_TAB,
@@ -86,7 +86,7 @@ KC_ESC, KC_INS, KC_LGUI, KC_LCTL, KC_LALT,
KC_SLCK, KC_AT, KC_PLUS, KC_MINUS, KC_SLASH, KC_ASTR, KC_EQUAL,
KC_CAPSLOCK, KC_CIRC, KC_V, KC_D, KC_L, KC_J, KC_Z,
KC_C, KC_T, KC_S, KC_R, KC_N, KC_M,
- KC_NUMLOCK, KC_QUOT, KC_Q, KC_G, KC_H, KC_F, KC_C,
+ KC_NUMLOCK, KC_DQUO, KC_Q, KC_G, KC_H, KC_F, KC_C,
MO(QW_A), KC_RCTL, KC_RGUI, KC_PSCREEN, KC_PAUSE,
KC_TRNS, KC_TRNS,
KC_TRNS,
@@ -111,7 +111,7 @@ KC_TRNS, MO(QW_S), KC_ENTER),
*/
[QW_A] = LAYOUT_ergodox(
// Left hand
-KC_DOLLAR, S(KC_QUOT), S(KC_COMM), S(KC_DOT), KC_LBRC, KC_RBRC, KC_DEL,
+KC_DOLLAR, S(KC_DQUO), S(KC_COMM), S(KC_DOT), KC_LBRC, KC_RBRC, KC_DEL,
KC_PERCENT, KC_PIPE, KC_E, KC_AMPR, KC_O, KC_E, KC_BSPC,
KC_W, KC_A, KC_U, KC_I, RALT(KC_5), KC_COMMA,
KC_E, KC_BSLASH, KC_LCBR, KC_RCBR, KC_DOT, KC_TILDE, KC_TAB,
@@ -123,7 +123,7 @@ KC_ESC, KC_INS, KC_LGUI, KC_LCTL, KC_LALT,
KC_SLCK, KC_AT, KC_PLUS, KC_MINUS, KC_SLASH, KC_ASTR, KC_EQUAL,
KC_CAPSLOCK, KC_CIRC, KC_V, KC_D, KC_L, KC_J, KC_Z,
KC_C, KC_T, KC_S, KC_R, KC_N, KC_M,
- KC_NUMLOCK, KC_QUOT, KC_Q, KC_G, KC_H, KC_F, KC_C,
+ KC_NUMLOCK, KC_DQUO, KC_Q, KC_G, KC_H, KC_F, KC_C,
KC_TRNS, KC_RCTL, KC_RGUI, KC_PSCREEN, KC_PAUSE,
KC_TRNS, KC_TRNS,
KC_TRNS,
@@ -185,7 +185,7 @@ KC_TRNS, KC_TRNS, KC_TRNS),
*/
[AZ_B] = LAYOUT_ergodox(
// Left hand
-FR_DLR, FR_QUOT, FR_LESS, FR_GRTR, FR_LPRN, FR_RPRN, KC_DEL,
+FR_DLR, FR_DQUO, FR_LABK, FR_RABK, FR_LPRN, FR_RPRN, KC_DEL,
FR_PERC, KC_B, FR_EACU, KC_P, KC_O, FR_EGRV, KC_BSPC,
FR_W, FR_A, KC_U, KC_I, KC_E, FR_COMM,
KC_E, FR_AGRV, KC_Y, KC_X, FR_DOT, KC_K, KC_TAB,
@@ -197,7 +197,7 @@ KC_ESC, KC_INS, KC_LGUI, KC_LCTL, KC_LALT,
KC_SLCK, FR_AT, FR_PLUS, FR_MINS, FR_SLSH, FR_ASTR, FR_EQL,
KC_CAPSLOCK, KC_LBRC, KC_V, KC_D, KC_L, KC_J, FR_Z,
KC_C, KC_T, KC_S, KC_R, KC_N, FR_M,
- KC_NUMLOCK, FR_APOS, FR_Q, KC_G, KC_H, KC_F, FR_CCED,
+ KC_NUMLOCK, FR_QUOT, FR_Q, KC_G, KC_H, KC_F, FR_CCED,
MO(AZ_A), KC_RCTL, KC_RGUI, KC_PSCREEN, KC_PAUSE,
KC_TRNS, KC_TRNS,
KC_TRNS,
@@ -222,8 +222,8 @@ KC_TRNS, MO(AZ_S), KC_ENTER),
*/
[AZ_A] = LAYOUT_ergodox(
// Left hand
-FR_DLR, FR_QUOT, FR_LESS, FR_GRTR, FR_LBRC, FR_RBRC, KC_DEL,
-FR_PERC, FR_PIPE, FR_EACU, FR_AMP, KC_O, FR_EGRV, KC_BSPC,
+FR_DLR, FR_DQUO, FR_LABK, FR_RABK, FR_LBRC, FR_RBRC, KC_DEL,
+FR_PERC, FR_PIPE, FR_EACU, FR_AMPR, KC_O, FR_EGRV, KC_BSPC,
FR_W, FR_A, FR_UGRV, S(KC_LBRC), FR_EURO, FR_COMM,
FR_SLSH, FR_BSLS, FR_LCBR, FR_RCBR, FR_DOT, FR_TILD, KC_TAB,
KC_ESC, KC_INS, KC_LGUI, KC_LCTL, KC_LALT,
@@ -234,7 +234,7 @@ KC_ESC, KC_INS, KC_LGUI, KC_LCTL, KC_LALT,
KC_SLCK, FR_AT, FR_PLUS, FR_MINS, FR_SLSH, FR_ASTR, FR_EQL,
KC_CAPSLOCK, KC_LBRC, KC_V, KC_D, KC_L, KC_J, FR_Z,
KC_C, KC_T, KC_S, KC_R, KC_N, FR_M,
- KC_NUMLOCK, FR_APOS, FR_Q, KC_G, KC_H, KC_F, FR_CCED,
+ KC_NUMLOCK, FR_QUOT, FR_Q, KC_G, KC_H, KC_F, FR_CCED,
KC_TRNS, KC_RCTL, KC_RGUI, KC_PSCREEN, KC_PAUSE,
KC_TRNS, KC_TRNS,
KC_TRNS,
@@ -268,7 +268,7 @@ S(KC_ESC), S(KC_INS), S(KC_LGUI), S(KC_LCTL), S(KC_LALT),
KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS,
// Right hand
- KC_TRNS, FR_6, FR_7, FR_8, FR_9, FR_0, FR_OVRR,
+ KC_TRNS, FR_6, FR_7, FR_8, FR_9, FR_0, FR_DEG,
KC_TRNS, FR_EXLM, S(KC_V), S(KC_D), S(KC_L), S(KC_J), S(FR_Z),
S(KC_C), S(KC_T), S(KC_S), S(KC_R), S(KC_N), S(FR_M),
KC_TRNS, FR_QUES, S(FR_Q), S(KC_G), S(KC_H), S(KC_F), S(KC_C),
diff --git a/layouts/community/ergodox/bepo_alt/keymap.c b/layouts/community/ergodox/bepo_alt/keymap.c
index fc40afd871..a3bb955abf 100644
--- a/layouts/community/ergodox/bepo_alt/keymap.c
+++ b/layouts/community/ergodox/bepo_alt/keymap.c
@@ -30,20 +30,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[BEPO] = LAYOUT_ergodox(
/* Left hand */
-BP_DOLLAR, BP_DQOT, BP_LGIL, BP_RGIL, BP_LPRN, BP_RPRN, BP_AT,
-KC_TAB, BP_B, BP_E_ACUTE, BP_P, BP_O, BP_E_GRAVE, KC_BSPC,
-BP_W, BP_A, BP_U, BP_I, BP_E, BP_COMMA,
-KC_LSHIFT, BP_ECRC, BP_A_GRAVE, BP_Y, BP_X, BP_DOT, BP_K,
+BP_DLR, BP_DQUO, BP_LDAQ, BP_RDAQ, BP_LPRN, BP_RPRN, BP_AT,
+KC_TAB, BP_B, BP_EACU, BP_P, BP_O, BP_EGRV, KC_BSPC,
+BP_W, BP_A, BP_U, BP_I, BP_E, BP_COMM,
+KC_LSHIFT, BP_ECIR, BP_AGRV, BP_Y, BP_X, BP_DOT, BP_K,
KC_LCTL, KC_LGUI, KC_LGUI, KC_LGUI, KC_LALT,
KC_PGUP, KC_PGDOWN,
KC_INS,
KC_SPC, KC_LSHIFT, DF(FNAV),
/* Right hand */
- BP_PLUS, BP_MINUS, BP_MINUS, BP_SLASH, BP_ASTR, BP_EQUAL, BP_PERCENT,
- KC_CAPSLOCK, BP_DCRC, BP_V, BP_D, BP_L, BP_J, BP_Z,
+ BP_PLUS, BP_MINS, BP_MINS, BP_SLSH, BP_ASTR, BP_EQL, BP_PERC,
+ KC_CAPSLOCK, BP_DCIR, BP_V, BP_D, BP_L, BP_J, BP_Z,
BP_C, BP_T, BP_S, BP_R, BP_N, BP_M,
- KC_ESC, BP_APOS, BP_Q, BP_G, BP_H, BP_F, BP_CCED,
+ KC_ESC, BP_QUOT, BP_Q, BP_G, BP_H, BP_F, BP_CCED,
KC_ALGR, KC_RGUI, KC_RGUI, KC_RCTL, KC_ENTER,
DF(BEPO), KC_DEL,
DF(FNAV),
diff --git a/layouts/community/ergodox/bepo_csa/keymap.c b/layouts/community/ergodox/bepo_csa/keymap.c
index c6d4f628ff..d869c5bb9f 100644
--- a/layouts/community/ergodox/bepo_csa/keymap.c
+++ b/layouts/community/ergodox/bepo_csa/keymap.c
@@ -91,7 +91,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[LR_BASE] = LAYOUT_ergodox( // layer 0 : default
// left hand
BP_DLR, KC_1, KC_2, KC_3, KC_4, KC_5, KC_DEL,
- KC_TAB, BP_B, BP_ECUT, BP_P, BP_O, BP_EGRV, KC_BSPC,
+ KC_TAB, BP_B, BP_EACU, BP_P, BP_O, BP_EGRV, KC_BSPC,
BP_EQL, BP_A, BP_U, BP_I, BP_E, BP_COMM,
KC_LSFT, BP_AGRV, BP_Y, BP_X, BP_DOT, BP_K, KC_ENT,
KC_LCTL, M(M_FNLR), KC_LGUI, M(M_NMAL), KC_LALT,
@@ -102,9 +102,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// right hand
KC_DEL, KC_6, KC_7, KC_8, KC_9, KC_0, BP_W,
- KC_BSPC, BP_DCRC, BP_V, BP_D, BP_L, BP_J, BP_Z,
+ KC_BSPC, BP_DCIR, BP_V, BP_D, BP_L, BP_J, BP_Z,
BP_C, BP_T, BP_S, BP_R, BP_N, BP_M,
- KC_ENT, BP_APOS, BP_Q, BP_G, BP_H, BP_F, KC_RSFT,
+ KC_ENT, BP_QUOT, BP_Q, BP_G, BP_H, BP_F, KC_RSFT,
KC_ALGR, BP_PERC, KC_APP, BP_CCED, KC_RCTL,
KC_LEFT, KC_RGHT,
@@ -116,10 +116,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/
[LR_CSA] = LAYOUT_ergodox(
// left hand
- KC_DLR, CSA_DQOT, CSA_LGIL, CSA_RGIL, KC_LPRN, KC_RPRN, KC_TRNS,
- KC_TRNS, KC_B, CSA_ECUT, KC_P, KC_O, CSA_EGRV, KC_TRNS,
+ KC_DLR, CA_DQUO, CA_LDAQ, CA_RDAQ, KC_LPRN, KC_RPRN, KC_TRNS,
+ KC_TRNS, KC_B, CA_EACU, KC_P, KC_O, CA_EGRV, KC_TRNS,
KC_EQL, KC_A, KC_U, KC_I, KC_E, KC_COMM,
- CSA(SFT), CSA_AGRV, KC_Y, KC_X, KC_DOT, KC_K, KC_TRNS,
+ CSA(SFT), CA_AGRV, KC_Y, KC_X, KC_DOT, KC_K, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS,
@@ -127,11 +127,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS, KC_TRNS, KC_TRNS,
// right hand
- KC_TRNS, KC_AT, KC_PLUS, KC_MINS, CSA_SLSH, KC_ASTR, KC_W,
- KC_TRNS, CSA_DCRC, KC_V, KC_D, KC_L, KC_J, KC_Z,
+ KC_TRNS, KC_AT, KC_PLUS, KC_MINS, CA_SLSH, KC_ASTR, KC_W,
+ KC_TRNS, CA_CIRC, KC_V, KC_D, KC_L, KC_J, KC_Z,
KC_C, KC_T, KC_S, KC_R, KC_N, KC_M,
- KC_TRNS, CSA_APOS, KC_Q, KC_G, KC_H, KC_F, CSA(SFT),
- MO(LR_CSA_AGR), KC_PERC, KC_TRNS, CSA_CCED, KC_LCTL, // RCTL has a special behaviour in CSA so use LCTL
+ KC_TRNS, CA_QUOT, KC_Q, KC_G, KC_H, KC_F, CSA(SFT),
+ MO(LR_CSA_AGR), KC_PERC, KC_TRNS, CA_CCED, KC_LCTL, // RCTL has a special behaviour in CSA so use LCTL
KC_TRNS, KC_TRNS,
KC_TRNS,
@@ -174,7 +174,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS, M(M_6), M(M_7), M(M_8), M(M_9), M(M_0), KC_TRNS,
KC_TRNS, KC_EXLM, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, CSA_QEST, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, CA_QUES, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
CSA(SFT_AGR), M(M_GRV), KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS,
@@ -205,10 +205,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/
[LR_CSA_AGR] = LAYOUT_ergodox(
// left hand
- MUC(NDSH), MUC(MDSH), CSA_LESS, CSA_GRTR, CSA_LBRC, CSA_RBRC, KC_TRNS,
- KC_TRNS, CSA_PIPE, CSA_DACT, KC_AMPR, CSA_OE, CSA_DGRV, KC_TRNS,
- KC_NO, CSA_AE, CSA_UGRV, CSA_DTRM, CSA_EURO, CSA_RQOT,
- CSA(AGR_SFT), CSA_BSLS, CSA_LCBR, CSA_RCBR, MUC(ELPS), CSA_TILD, KC_TRNS,
+ MUC(NDSH), MUC(MDSH), CA_LABK, CA_RABK, CA_LBRC, CA_RBRC, KC_TRNS,
+ KC_TRNS, CA_PIPE, CA_ACUT, KC_AMPR, CA_OE, CA_GRV, KC_TRNS,
+ KC_NO, CA_AE, CA_UGRV, CA_DIAE, CA_EURO, CA_RQSU,
+ CSA(AGR_SFT), CA_BSLS, CA_LCBR, CA_RCBR, MUC(ELPS), CA_TILD, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS,
@@ -216,11 +216,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_UNDS, CSA(AGR_SFT), KC_TRNS,
// right hand
- KC_TRNS, M(M_CRC), CSA_PSMS, KC_NO, CSA_DVSN, CSA_TIMS, CSA_DBRV,
- KC_TRNS, CSA_IXLM, CSA_DCAR, CSA_ETH, KC_NO, CSA_IJ, KC_NO,
- CSA_CPRT, CSA_THRN, CSA_SRPS, CSA_RTM, CSA_DTLD, CSA_DMCR,
- KC_TRNS, CSA_IQST, CSA_DRNG, CSA_MU, KC_NO, CSA_DOGO, CSA(AGR_SFT),
- KC_TRNS, KC_NO, KC_TRNS, CSA_DCED, KC_TRNS,
+ KC_TRNS, M(M_CRC), CA_PLMN, KC_NO, CA_DIV, CA_MUL, CA_BREV,
+ KC_TRNS, CA_IEXL, CA_CARN, CA_ETH, KC_NO, CA_IJ, KC_NO,
+ CA_COPY, CA_THRN, CA_SS, CA_REGD, CA_DTIL, CA_MACR,
+ KC_TRNS, CA_IQUE, CA_RNGA, CA_MICR, KC_NO, CA_OGON, CSA(AGR_SFT),
+ KC_TRNS, KC_NO, KC_TRNS, CA_CEDL, KC_TRNS,
KC_TRNS, KC_TRNS,
KC_TRNS,
@@ -250,10 +250,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/
[LR_CSA_AGR_SFT] = LAYOUT_ergodox(
// left hand
- CSA_PARG, KC_NO, CSA_LDQT, CSA_RDQT, KC_NO, KC_NO, KC_TRNS,
- KC_TRNS, CSA_BPIP, CSA_DDCT, CSA_SECT, S(CSA_OE), M(M_GRV), KC_TRNS,
- KC_NO, S(CSA_AE), S(CSA_UGRV), CSA_DDTA, KC_NO, KC_NO,
- CSA(AGR_SFT), KC_NO, CSA_LQOT, CSA_RQOT, KC_NO, KC_NO, KC_TRNS,
+ CA_PARA, KC_NO, CA_LDQU, CA_RDQU, KC_NO, KC_NO, KC_TRNS,
+ KC_TRNS, CA_BRKP, CA_DACU, CA_SECT, S(CA_OE), M(M_GRV), KC_TRNS,
+ KC_NO, S(CA_AE), S(CA_UGRV), CA_DOTA, KC_NO, KC_NO,
+ CSA(AGR_SFT), KC_NO, CA_LSQU, CA_RSQU, KC_NO, KC_NO, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS,
@@ -261,10 +261,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS, CSA(AGR_SFT), KC_TRNS,
// right hand
- KC_TRNS, KC_NO, CSA_NEGT, CSA_1QRT, CSA_1HLF, CSA_3QRT, KC_NO,
- KC_TRNS, KC_NO, KC_NO, S(CSA_ETH), KC_NO, S(CSA_IJ), KC_NO,
- KC_NO, S(CSA_THRN), S(CSA_SRPS), CSA_TM, KC_NO, CSA_ORDO,
- KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, CSA_ORDA, CSA(AGR_SFT),
+ KC_TRNS, KC_NO, CA_NOT, CA_QRTR, CA_HALF, CA_TQTR, KC_NO,
+ KC_TRNS, KC_NO, KC_NO, S(CA_ETH), KC_NO, S(CA_IJ), KC_NO,
+ KC_NO, S(CA_THRN), S(CA_SS), CA_TM, KC_NO, CA_MORD,
+ KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, CA_FORD, CSA(AGR_SFT),
CSA(SFT_AGR), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS,
@@ -450,7 +450,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
case M_SCLN:
return MACRO(D(SCLN), END);
case M_GRV:
- return MACRO(I(75), DOWN(KC_ALGR), TYPE(CSA_DCRC), UP(KC_ALGR), T(SPACE), END);
+ return MACRO(I(75), DOWN(KC_ALGR), TYPE(CA_CIRC), UP(KC_ALGR), T(SPACE), END);
case M_NBSP:
// use weak mod such that pressing another key will not be affected
add_weak_mods(MOD_BIT(KC_ALGR));
@@ -474,7 +474,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
break;
case M_CRC:
if (record->event.pressed) {
- return MACRO(I(75), TYPE(CSA_DCRC), T(SPACE), END);
+ return MACRO(I(75), TYPE(CA_CIRC), T(SPACE), END);
}
break;
case M_DBL0:
diff --git a/layouts/community/ergodox/coderkun_neo2/keymap.c b/layouts/community/ergodox/coderkun_neo2/keymap.c
index 638442676a..b731ab4950 100644
--- a/layouts/community/ergodox/coderkun_neo2/keymap.c
+++ b/layouts/community/ergodox/coderkun_neo2/keymap.c
@@ -33,20 +33,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/
[BASE] = LAYOUT_ergodox(
// left hand
- KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, NEO_GRV,
- NEO_Y, NEO_X, NEO_V, NEO_L, NEO_C, NEO_W, KC_HOME,
- NEO_L1_L, NEO_U, NEO_I, NEO_A, NEO_E, NEO_O,
- KC_LSFT, NEO_UE, NEO_OE, NEO_AE, NEO_P, NEO_Z, TG(PMQ),
- KC_LCTL, KC_LALT,MO(FMU),KC_LGUI,NEO_L2_L,
+ KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, NE_GRV,
+ NE_Y, NE_X, NE_V, NE_L, NE_C, NE_W, KC_HOME,
+ NE_L3L, NE_U, NE_I, NE_A, NE_E, NE_O,
+ KC_LSFT, NE_UDIA, NE_ODIA, NE_ADIA, NE_P, NE_Z, TG(PMQ),
+ KC_LCTL, KC_LALT,MO(FMU),KC_LGUI,NE_L4L,
KC_LEFT, KC_UP,
KC_MINS,
KC_SPC, KC_ENT, ALL_T(KC_NO),
// right hand
- NEO_ACUT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
- KC_END, NEO_K, NEO_H, NEO_G, NEO_F, NEO_Q, NEO_SS,
- NEO_S, NEO_N, NEO_R, NEO_T, NEO_D, NEO_L1_R,
- TG(PMN), NEO_B, NEO_M, KC_COMM,KC_DOT, NEO_J, KC_RSFT,
- NEO_L2_R,KC_RGUI,MO(FMU),KC_LALT,KC_RCTL,
+ NE_ACUT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
+ KC_END, NE_K, NE_H, NE_G, NE_F, NE_Q, NE_SS,
+ NE_S, NE_N, NE_R, NE_T, NE_D, NE_L3R,
+ TG(PMN), NE_B, NE_M, KC_COMM,KC_DOT, NE_J, KC_RSFT,
+ NE_L4R,KC_RGUI,MO(FMU),KC_LALT,KC_RCTL,
KC_DOWN, KC_RGHT,
KC_MINS,
MEH_T(KC_NO),KC_ENT,KC_SPC
@@ -76,8 +76,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// left hand
KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_EQL,
DE_C, DE_P, DE_T, DE_F, DE_K, DE_L, KC_HOME,
- NEO_L1_L, DE_D, DE_H, DE_OE, DE_O, DE_I,
- KC_LSFT, DE_AE, DE_Q, DE_R, DE_W, DE_N, KC_TRNS,
+ NE_L3L, DE_D, DE_H, DE_ODIA,DE_O, DE_I,
+ KC_LSFT, DE_ADIA,DE_Q, DE_R, DE_W, DE_N, KC_TRNS,
KC_LCTL, KC_LALT,MO(FMU),KC_LGUI,MO(NHL),
KC_LEFT, KC_UP,
KC_MINS,
@@ -85,7 +85,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// right hand
DE_ACUT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
KC_END, DE_B, DE_A, DE_S, DE_G, DE_V, DE_Y,
- DE_U, DE_MINS,DE_Z, DE_E, DE_X, NEO_L1_R,
+ DE_U, DE_MINS,DE_Z, DE_E, DE_X, NE_L3R,
KC_TRNS, DE_J, DE_M, DE_COMM,DE_DOT, DE_SS, KC_RSFT,
MO(NHL),KC_RGUI,MO(FMU),KC_LALT,KC_RCTL,
KC_DOWN, KC_RGHT,
@@ -117,7 +117,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_EQL,
DE_Y, DE_X, DE_V, DE_L, DE_C, DE_W, KC_HOME,
KC_NO, DE_U, DE_I, DE_A, DE_E, DE_O,
- KC_LSFT, DE_UE, DE_OE, DE_AE, DE_P, DE_Z, KC_TRNS,
+ KC_LSFT, DE_UDIA,DE_ODIA,DE_ADIA,DE_P, DE_Z, KC_TRNS,
KC_LCTL, KC_LALT,MO(FMU),KC_LGUI,MO(NHL),
KC_LEFT, KC_UP,
KC_MINS,
@@ -215,12 +215,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
};
-const uint16_t PROGMEM fn_actions[] = {
- [BASE] = ACTION_FUNCTION(BASE),
- [PMQ] = ACTION_FUNCTION(PMQ),
- [PMN] = ACTION_FUNCTION(PMN),
-};
-
// Runs just one time when the keyboard initializes.
void matrix_init_user(void) {
set_unicode_input_mode(UC_LNX);
@@ -260,12 +254,12 @@ void matrix_scan_user(void)
};
-// Override Unicode start method to use NEO_U instead of KC_U
+// Override Unicode start method to use NE_U instead of KC_U
void unicode_input_start (void) {
register_code(KC_LCTL);
register_code(KC_LSFT);
- register_code(NEO_U);
- unregister_code(NEO_U);
+ register_code(NE_U);
+ unregister_code(NE_U);
unregister_code(KC_LSFT);
unregister_code(KC_LCTL);
};
diff --git a/layouts/community/ergodox/colemak_osx_pc_no/keymap.c b/layouts/community/ergodox/colemak_osx_pc_no/keymap.c
index a4a4533494..b9986e0e9d 100644
--- a/layouts/community/ergodox/colemak_osx_pc_no/keymap.c
+++ b/layouts/community/ergodox/colemak_osx_pc_no/keymap.c
@@ -9,6 +9,18 @@
#define NUMB_SYMB_MAC 3 // numbers and symbols mac
#define FUNCTION 4 // function keys
+enum custom_keycodes {
+ TILDE_NO = SAFE_RANGE,
+ LESS_NO,
+ GRTR_NO,
+ CIRC_NO,
+ ACUT_NO,
+ GRV_NO,
+ LESS_NO_MAC,
+ GRTR_NO_MAC,
+ ACUT_NO_MAC
+};
+
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap 0: Basic layer PC
@@ -35,7 +47,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[BASE] = LAYOUT_ergodox(
// left hand
NO_BSLS, NO_LBRC, NO_RBRC, NO_LCBR, NO_RCBR, NO_ASTR, TG(1),
- NO_QUES, KC_Q, KC_W, KC_F, KC_P, KC_G, NO_QUO2,
+ NO_QUES, KC_Q, KC_W, KC_F, KC_P, KC_G, NO_DQUO,
NO_COLN, KC_A, KC_R, KC_S, KC_T, KC_D,
KC_EXLM, KC_Z, KC_X, KC_C, KC_V, KC_B, NO_SCLN,
MO(4), KC_BTN1, KC_BTN2, KC_TAB,GUI_T(KC_COMMA),
@@ -43,11 +55,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
NO_PLUS,
OSM(MOD_LSFT),CTL_T(KC_DOT),ALT_T(NO_MINS),
// right hand
- KC_FN5, NO_DLR, NO_LPRN, NO_RPRN ,KC_FN3, KC_FN4,NO_AT,
- NO_APOS, KC_J, KC_L, KC_U, KC_Y, NO_AA, NO_AE ,
- KC_H, KC_N, KC_E, KC_I, KC_O, NO_OSLH,
+ CIRC_NO, NO_DLR, NO_LPRN, NO_RPRN ,LESS_NO, GRTR_NO,NO_AT,
+ NO_QUOT, KC_J, KC_L, KC_U, KC_Y, NO_ARNG, NO_AE ,
+ KC_H, KC_N, KC_E, KC_I, KC_O, NO_OSTR,
NO_EQL, KC_K, KC_M, KC_RIGHT, KC_DOWN, KC_UP, NO_UNDS,
- KC_LEFT, KC_ESC, KC_FN7, KC_HASH, MO(2),
+ KC_LEFT, KC_ESC, GRV_NO, KC_HASH, MO(2),
KC_INSERT, NO_SLSH,
KC_DEL,
KC_BSPC,KC_ENT,KC_SPC
@@ -74,20 +86,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `--------------------' `--------------------'
*/
[BASE_MAC] = LAYOUT_ergodox(
- NO_BSLS_MAC, KC_TRNS,KC_TRNS, NO_LCBR_MAC,NO_RCBR_MAC, KC_TRNS, KC_TRNS,
+ S(ALGR(NO_7)), KC_TRNS,KC_TRNS, S(ALGR(NO_8)),S(ALGR(NO_9)), KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS , KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, CTL_T(KC_COMMA),
- KC_TRNS, NO_PIPE_MAC,
+ KC_TRNS, ALGR(NO_7),
KC_TRNS,
KC_TRNS,GUI_T(KC_DOT) , KC_TRNS,
// right hand
- KC_TRNS, NO_DLR_MAC, KC_TRNS,KC_TRNS,KC_FN8, KC_FN9,NO_AT_MAC,
- NO_APOS_MAC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, S(NO_4), KC_TRNS,KC_TRNS,LESS_NO_MAC, GRTR_NO_MAC,NO_QUOT,
+ NO_LABK, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, NO_GRV_MAC, KC_TRNS, MO(3),
+ KC_TRNS, KC_TRNS, ALGR(NO_BSLS), KC_TRNS, MO(3),
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS
@@ -125,7 +137,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS, KC_TRNS, KC_TRNS,
// right hand
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_FN2, KC_FN6 , KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, TILDE_NO, ACUT_NO , KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_5, KC_6, KC_7, KC_8, KC_TRNS,
KC_TRNS, KC_HOME, KC_9, KC_END, KC_PGDN, KC_PGUP, KC_TRNS,
KC_HOME, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
@@ -166,7 +178,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS, KC_TRNS, KC_TRNS,
// right hand
KC_TRNS, KC_TRNS, KC_TRNS , KC_TRNS, KC_TRNS , KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_FN2, KC_FN10, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, TILDE_NO, ACUT_NO_MAC, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_5, KC_6, KC_7, KC_8, KC_TRNS,
KC_TRNS, KC_HOME, KC_9, KC_END, KC_PGDN, KC_PGUP, KC_TRNS,
KC_HOME, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
@@ -217,47 +229,57 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
-enum macro_id {
- TILDE_NO, LESS_NO, GRTR_NO, CIRC_NO, ACUT_NO, GRV_NO, LESS_NO_MAC, GRTR_NO_MAC, ACUT_NO_MAC
-};
-
-const uint16_t PROGMEM fn_actions[] = {
- [2] = ACTION_MACRO(TILDE_NO), // Completed ~ character(pc and mac), no space needed.
- [3] = ACTION_MACRO(LESS_NO), // < completed on keypress down, to avoid shifting the next character if it is not released first.
- [4] = ACTION_MACRO(GRTR_NO), // > completed on keypress down, to avoid shifting the next character if it is not released first.
- [5] = ACTION_MACRO(CIRC_NO), // Completed ^ character, no space needed.
- [6] = ACTION_MACRO(ACUT_NO), // Completed ´ character, no space needed.
- [7] = ACTION_MACRO(GRV_NO), // Completed ` character, no space needed.
- [8] = ACTION_MACRO(LESS_NO_MAC), // < completed on keypress down, to avoid same button problem when typing <> quickly
- [9] = ACTION_MACRO(GRTR_NO_MAC), // > completed on keypress down, to avoid same button problem when typing <> quickly
- [10] = ACTION_MACRO(ACUT_NO_MAC), // Completed ´ character, no space needed
-};
-
-
-
-const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
-{
- keyevent_t event = record->event;
-
- switch (id) {
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
case TILDE_NO:
- return (event.pressed ? MACRO( D(RALT), T(RBRC), U(RALT), T(SPC), END ) : MACRO_NONE);
+ if (record->event.pressed) {
+ tap_code16(ALGR(KC_RBRC));
+ tap_code(KC_SPC);
+ }
+ return false;
case LESS_NO:
- return (event.pressed ? MACRO( T(NUBS), END ) : MACRO_NONE);
+ if (record->event.pressed) {
+ tap_code(KC_NUBS);
+ }
+ return false;
case GRTR_NO:
- return (event.pressed ? MACRO( D(LSFT), T(NUBS), U(LSFT), END ) : MACRO_NONE);
+ if (record->event.pressed) {
+ tap_code16(S(KC_NUBS));
+ }
+ return false;
case CIRC_NO:
- return (event.pressed ? MACRO( D(LSFT), T(RBRC), U(LSFT), T(SPC), END ) : MACRO_NONE);
+ if (record->event.pressed) {
+ tap_code16(S(KC_RBRC));
+ tap_code(KC_SPC);
+ }
+ return false;
case ACUT_NO:
- return (event.pressed ? MACRO( D(RALT), T(EQL), U(RALT), T(SPC), END ) : MACRO_NONE);
+ if (record->event.pressed) {
+ tap_code16(ALGR(KC_EQL));
+ tap_code(KC_SPC);
+ }
+ return false;
case GRV_NO:
- return (event.pressed ? MACRO( D(LSFT), T(EQL), T(SPC), U(LSFT), END ) : MACRO_NONE);
+ if (record->event.pressed) {
+ SEND_STRING(SS_LSFT("= "));
+ }
+ return false;
case LESS_NO_MAC:
- return (event.pressed ? MACRO( T(GRV), END ) : MACRO_NONE);
+ if (record->event.pressed) {
+ tap_code(KC_GRV);
+ }
+ return false;
case GRTR_NO_MAC:
- return (event.pressed ? MACRO( D(LSFT), T(GRV), U(LSFT), END ) : MACRO_NONE);
+ if (record->event.pressed) {
+ tap_code16(S(KC_GRV));
+ }
+ return false;
case ACUT_NO_MAC:
- return (event.pressed ? MACRO( T(EQL), T(SPC), END ) : MACRO_NONE);
+ if (record->event.pressed) {
+ tap_code(KC_EQL);
+ tap_code(KC_SPC);
+ }
+ return false;
}
- return MACRO_NONE;
-};
+ return true;
+}
diff --git a/layouts/community/ergodox/deadcyclo/keymap.c b/layouts/community/ergodox/deadcyclo/keymap.c
index 0ae1ef7fb2..345e25e03e 100644
--- a/layouts/community/ergodox/deadcyclo/keymap.c
+++ b/layouts/community/ergodox/deadcyclo/keymap.c
@@ -1,6 +1,4 @@
#include QMK_KEYBOARD_H
-#include "debug.h"
-#include "action_layer.h"
#include "version.h"
#define BASE 0 // default layer
@@ -9,45 +7,19 @@
#define UNI 3 // unicode 1
#define UNI2 4 // unicode 2
-enum macros {
- RUN
-};
-
-enum function_ids {
- EMOJI,
- EMOJI2,
- EPRM,
+enum custom_keycodes {
+ I3_RUN = SAFE_RANGE,
VRSN,
- RGB_SLD,
- GO_GROUP
-};
-
-/* opt can only be 0-15 */
-enum emojis {
- SHRUG,
- YAY,
- HUG,
- SMILE,
- SMILE2,
- HMM1,
- HMM2,
- BEAR1,
- BEAR2,
- FUU,
- EGGY1,
- EGGY2,
- FACE1,
- FACE2,
- UHU,
- SMRK1
-};
-
-enum emojis2 {
- SMRK2,
- LOVE
-};
-
-enum progmem_ids {
+ I3_GO_GROUP_1,
+ I3_GO_GROUP_2,
+ I3_GO_GROUP_3,
+ I3_GO_GROUP_4,
+ I3_GO_GROUP_5,
+ I3_GO_GROUP_6,
+ I3_GO_GROUP_7,
+ I3_GO_GROUP_8,
+ I3_GO_GROUP_9,
+ I3_GO_GROUP_10,
EMOJI_SHRUG,
EMOJI_YAY,
EMOJI_HUG,
@@ -65,20 +37,7 @@ enum progmem_ids {
EMOJI_UHU,
EMOJI_SMRK1,
EMOJI_SMRK2,
- EMOJI_LOVE,
- F_EPRM,
- F_VRSN,
- F_RGB_SLD,
- I3_GO_GROUP_10,
- I3_GO_GROUP_1,
- I3_GO_GROUP_2,
- I3_GO_GROUP_3,
- I3_GO_GROUP_4,
- I3_GO_GROUP_5,
- I3_GO_GROUP_6,
- I3_GO_GROUP_7,
- I3_GO_GROUP_8,
- I3_GO_GROUP_9,
+ EMOJI_LOVE
};
// TODO: Finish the macros for i3 (Macros should potentially be own function instead to make things easier? some of them at least, f. ex. the ones that use 1-0 keys so we can have a single switch)
@@ -163,7 +122,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS,
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
RGB_TOG,RGB_MOD,
- F(F_RGB_SLD),
+ RGB_M_P,
RGB_VAD,RGB_VAI,KC_TRNS,
// right hand
KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
@@ -173,7 +132,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS,KC_DOT, KC_0, KC_EQL, KC_TRNS,
RGB_HUD, RGB_HUI,
KC_TRNS,
- F(F_EPRM), KC_DEL, KC_TRNS
+ EEP_RST, KC_DEL, KC_TRNS
),
/* Keymap 2: Media, mouse and navigation
*
@@ -198,8 +157,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/
// MEDIA , MOUSE and NAVIGATION
[MDIA] = LAYOUT_ergodox(
- KC_TRNS, F(I3_GO_GROUP_1), F(I3_GO_GROUP_2), F(I3_GO_GROUP_3), F(I3_GO_GROUP_4), F(I3_GO_GROUP_5), F(I3_GO_GROUP_6),
-KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, M(RUN), KC_TRNS, KC_TRNS,
+ KC_TRNS, I3_GO_GROUP_1, I3_GO_GROUP_2, I3_GO_GROUP_3, I3_GO_GROUP_4, I3_GO_GROUP_5, I3_GO_GROUP_6,
+KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, I3_RUN, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2,
@@ -207,7 +166,7 @@ KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, M(RUN), KC_TRNS, KC_TRNS,
KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS,
// right hand
- F(I3_GO_GROUP_6), F(I3_GO_GROUP_7), F(I3_GO_GROUP_8), F(I3_GO_GROUP_9), F(I3_GO_GROUP_10), KC_TRNS, KC_TRNS,
+ I3_GO_GROUP_6, I3_GO_GROUP_7, I3_GO_GROUP_8, I3_GO_GROUP_9, I3_GO_GROUP_10, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_MPLY,
KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, KC_TRNS,
@@ -241,10 +200,10 @@ KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, M(RUN), KC_TRNS, KC_TRNS,
// Unicode
[UNI] = LAYOUT_ergodox(
KC_TRNS, UC(0x250c), UC(0x2510), UC(0x2514), UC(0x2518), UC(0x2502), UC(0x2500),
- KC_TRNS, F(EMOJI_SHRUG), F(EMOJI_YAY), F(EMOJI_HUG), F(EMOJI_SMILE), F(EMOJI_SMILE2), KC_TRNS,
- KC_TRNS, F(EMOJI_HMM1), F(EMOJI_HMM2), F(EMOJI_BEAR1), F(EMOJI_BEAR2), F(EMOJI_FUU),
- KC_TRNS, F(EMOJI_EGGY1), F(EMOJI_EGGY2), F(EMOJI_FACE1), F(EMOJI_FACE2), F(EMOJI_UHU), KC_TRNS,
- KC_TRNS, F(EMOJI_SMRK1), F(EMOJI_SMRK2), F(EMOJI_LOVE), F(F_VRSN),
+ KC_TRNS, EMOJI_SHRUG, EMOJI_YAY, EMOJI_HUG, EMOJI_SMILE, EMOJI_SMILE2, KC_TRNS,
+ KC_TRNS, EMOJI_HMM1, EMOJI_HMM2, EMOJI_BEAR1, EMOJI_BEAR2, EMOJI_FUU,
+ KC_TRNS, EMOJI_EGGY1, EMOJI_EGGY2, EMOJI_FACE1, EMOJI_FACE2, EMOJI_UHU, KC_TRNS,
+ KC_TRNS, EMOJI_SMRK1, EMOJI_SMRK2, EMOJI_LOVE, VRSN,
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS,
@@ -302,220 +261,84 @@ KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, M(RUN), KC_TRNS, KC_TRNS,
),
};
-const uint16_t PROGMEM fn_actions[] = {
- [EMOJI_SHRUG] = ACTION_FUNCTION_OPT(EMOJI, SHRUG),
- [EMOJI_YAY] = ACTION_FUNCTION_OPT(EMOJI, YAY),
- [EMOJI_HUG] = ACTION_FUNCTION_OPT(EMOJI,HUG),
- [EMOJI_SMILE] = ACTION_FUNCTION_OPT(EMOJI,SMILE),
- [EMOJI_SMILE2] = ACTION_FUNCTION_OPT(EMOJI,SMILE2),
- [EMOJI_HMM1] = ACTION_FUNCTION_OPT(EMOJI,HMM1),
- [EMOJI_HMM2] = ACTION_FUNCTION_OPT(EMOJI,HMM2),
- [EMOJI_BEAR1] = ACTION_FUNCTION_OPT(EMOJI,BEAR1),
- [EMOJI_BEAR2] = ACTION_FUNCTION_OPT(EMOJI,BEAR2),
- [EMOJI_FUU] = ACTION_FUNCTION_OPT(EMOJI,FUU),
- [EMOJI_EGGY1] = ACTION_FUNCTION_OPT(EMOJI,EGGY1),
- [EMOJI_EGGY2] = ACTION_FUNCTION_OPT(EMOJI,EGGY2),
- [EMOJI_FACE1] = ACTION_FUNCTION_OPT(EMOJI,FACE1),
- [EMOJI_FACE2] = ACTION_FUNCTION_OPT(EMOJI,FACE2),
- [EMOJI_UHU] = ACTION_FUNCTION_OPT(EMOJI,UHU),
- [EMOJI_SMRK1] = ACTION_FUNCTION_OPT(EMOJI,SMRK1),
- [EMOJI_SMRK2] = ACTION_FUNCTION_OPT(EMOJI2,SMRK2),
- [EMOJI_LOVE] = ACTION_FUNCTION_OPT(EMOJI2,LOVE),
- [F_EPRM] = ACTION_FUNCTION(EPRM),
- [F_VRSN] = ACTION_FUNCTION(VRSN),
- [F_RGB_SLD] = ACTION_FUNCTION(RGB_SLD),
- [I3_GO_GROUP_10]= ACTION_FUNCTION_OPT(GO_GROUP,0),
- [I3_GO_GROUP_1] = ACTION_FUNCTION_OPT(GO_GROUP,1),
- [I3_GO_GROUP_2] = ACTION_FUNCTION_OPT(GO_GROUP,2),
- [I3_GO_GROUP_3] = ACTION_FUNCTION_OPT(GO_GROUP,3),
- [I3_GO_GROUP_4] = ACTION_FUNCTION_OPT(GO_GROUP,4),
- [I3_GO_GROUP_5] = ACTION_FUNCTION_OPT(GO_GROUP,5),
- [I3_GO_GROUP_6] = ACTION_FUNCTION_OPT(GO_GROUP,6),
- [I3_GO_GROUP_7] = ACTION_FUNCTION_OPT(GO_GROUP,7),
- [I3_GO_GROUP_8] = ACTION_FUNCTION_OPT(GO_GROUP,8),
- [I3_GO_GROUP_9] = ACTION_FUNCTION_OPT(GO_GROUP,9),
-};
-
-#define TAP_ONCE(code) \
- register_code (code); \
- unregister_code (code)
-
-void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
- if (record->event.pressed) {
- switch(id) {
- case EPRM:
- eeconfig_init();
- break;
- case VRSN:
- SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
- break;
- case RGB_SLD:
-#ifdef RGBLIGHT_ENABLE
- rgblight_mode(1);
-#endif
- break;
- case GO_GROUP:
- register_code(KC_LCTL); TAP_ONCE(KC_I); unregister_code(KC_LCTL);
- TAP_ONCE(KC_G);
- if (opt == 0) {
- TAP_ONCE(39);
- } else {
- TAP_ONCE(29+opt);
- }
- break;
- case EMOJI:
- switch(opt) {
- case SHRUG:
- unicode_input_start(); register_hex(0xaf); unicode_input_finish();
- TAP_ONCE (KC_BSLS);
- register_code (KC_RSFT); TAP_ONCE (KC_MINS); TAP_ONCE (KC_9); unregister_code (KC_RSFT);
- unicode_input_start (); register_hex(0x30c4); unicode_input_finish();
- register_code (KC_RSFT); TAP_ONCE (KC_0); TAP_ONCE (KC_MINS); unregister_code (KC_RSFT);
- TAP_ONCE (KC_SLSH);
- unicode_input_start (); register_hex(0xaf); unicode_input_finish();
- break;
- case YAY:
- SEND_STRING ("\\o/");
- break;
- case HUG:
- unicode_input_start(); register_hex(0x0f3c); unicode_input_finish();
- TAP_ONCE (KC_SPC);
- unicode_input_start(); register_hex(0x3064); unicode_input_finish();
- TAP_ONCE (KC_SPC);
- unicode_input_start(); register_hex(0x25d5); unicode_input_finish();
- unicode_input_start(); register_hex(0x005f); unicode_input_finish();
- unicode_input_start(); register_hex(0x25d5); unicode_input_finish();
- TAP_ONCE (KC_SPC);
- unicode_input_start(); register_hex(0x0f3d); unicode_input_finish();
- unicode_input_start(); register_hex(0x3064); unicode_input_finish();
- break;
- case SMILE:
- unicode_input_start(); register_hex(0x0298); unicode_input_finish();
- unicode_input_start(); register_hex(0x203f); unicode_input_finish();
- unicode_input_start(); register_hex(0x0298); unicode_input_finish();
- break;
- case SMILE2:
- unicode_input_start(); register_hex(0x0028); unicode_input_finish();
- unicode_input_start(); register_hex(0x0298); unicode_input_finish();
- unicode_input_start(); register_hex(0x203f); unicode_input_finish();
- unicode_input_start(); register_hex(0x0298); unicode_input_finish();
- unicode_input_start(); register_hex(0x0029); unicode_input_finish();
- break;
- case HMM1:
- unicode_input_start(); register_hex(0x0ca0); unicode_input_finish();
- unicode_input_start(); register_hex(0x005f); unicode_input_finish();
- unicode_input_start(); register_hex(0x0ca0); unicode_input_finish();
- break;
- case HMM2:
- unicode_input_start(); register_hex(0x0028); unicode_input_finish();
- unicode_input_start(); register_hex(0x0ca0); unicode_input_finish();
- unicode_input_start(); register_hex(0x005f); unicode_input_finish();
- unicode_input_start(); register_hex(0x0ca0); unicode_input_finish();
- unicode_input_start(); register_hex(0x0029); unicode_input_finish();
- break;
- case BEAR1:
- unicode_input_start(); register_hex(0x0295); unicode_input_finish();
- unicode_input_start(); register_hex(0x2022); unicode_input_finish();
- unicode_input_start(); register_hex(0x1d25); unicode_input_finish();
- unicode_input_start(); register_hex(0x2022); unicode_input_finish();
- unicode_input_start(); register_hex(0x0294); unicode_input_finish();
- break;
- case BEAR2:
- unicode_input_start(); register_hex(0x0028); unicode_input_finish();
- unicode_input_start(); register_hex(0x1d54); unicode_input_finish();
- unicode_input_start(); register_hex(0x1d25); unicode_input_finish();
- unicode_input_start(); register_hex(0x1d54); unicode_input_finish();
- unicode_input_start(); register_hex(0x0029); unicode_input_finish();
- break;
- case FUU:
- unicode_input_start(); register_hex(0x256d); unicode_input_finish();
- unicode_input_start(); register_hex(0x2229); unicode_input_finish();
- unicode_input_start(); register_hex(0x256e); unicode_input_finish();
- unicode_input_start(); register_hex(0x0028); unicode_input_finish();
- unicode_input_start(); register_hex(0x002d); unicode_input_finish();
- unicode_input_start(); register_hex(0x005f); unicode_input_finish();
- unicode_input_start(); register_hex(0x002d); unicode_input_finish();
- unicode_input_start(); register_hex(0x0029); unicode_input_finish();
- unicode_input_start(); register_hex(0x256d); unicode_input_finish();
- unicode_input_start(); register_hex(0x2229); unicode_input_finish();
- unicode_input_start(); register_hex(0x256e); unicode_input_finish();
- break;
- case EGGY1:
- unicode_input_start(); register_hex(0x0028); unicode_input_finish();
- unicode_input_start(); register_hex(0x256f); unicode_input_finish();
- unicode_input_start(); register_hex(0x00b0); unicode_input_finish();
- unicode_input_start(); register_hex(0x25a1); unicode_input_finish();
- unicode_input_start(); register_hex(0x00b0); unicode_input_finish();
- unicode_input_start(); register_hex(0xff09); unicode_input_finish();
- unicode_input_start(); register_hex(0x256f); unicode_input_finish();
- break;
- case EGGY2:
- unicode_input_start(); register_hex(0x30ce); unicode_input_finish();
- unicode_input_start(); register_hex(0x0028); unicode_input_finish();
- unicode_input_start(); register_hex(0x0020); unicode_input_finish();
- unicode_input_start(); register_hex(0x309c); unicode_input_finish();
- unicode_input_start(); register_hex(0x002d); unicode_input_finish();
- unicode_input_start(); register_hex(0x309c); unicode_input_finish();
- unicode_input_start(); register_hex(0x30ce); unicode_input_finish();
- unicode_input_start(); register_hex(0x0029); unicode_input_finish();
- break;
- case FACE1:
- unicode_input_start(); register_hex(0x0028); unicode_input_finish();
- unicode_input_start(); register_hex(0x002d); unicode_input_finish();
- unicode_input_start(); register_hex(0x005f); unicode_input_finish();
- unicode_input_start(); register_hex(0x002d); unicode_input_finish();
- unicode_input_start(); register_hex(0x0029); unicode_input_finish();
- break;
- case FACE2:
- unicode_input_start(); register_hex(0x0028); unicode_input_finish();
- unicode_input_start(); register_hex(0x2022); unicode_input_finish();
- unicode_input_start(); register_hex(0x005f); unicode_input_finish();
- unicode_input_start(); register_hex(0x2022); unicode_input_finish();
- unicode_input_start(); register_hex(0x0029); unicode_input_finish();
- break;
- case UHU:
- unicode_input_start(); register_hex(0x2299); unicode_input_finish();
- unicode_input_start(); register_hex(0xfe4f); unicode_input_finish();
- unicode_input_start(); register_hex(0x2299); unicode_input_finish();
- break;
- case SMRK1:
- unicode_input_start(); register_hex(0x005e); unicode_input_finish();
- unicode_input_start(); register_hex(0x032e); unicode_input_finish();
- unicode_input_start(); register_hex(0x005e); unicode_input_finish();
- break;
- }
- break;
- case EMOJI2:
- switch(opt) {
- case SMRK2:
- unicode_input_start(); register_hex(0x0028); unicode_input_finish();
- unicode_input_start(); register_hex(0x005e); unicode_input_finish();
- unicode_input_start(); register_hex(0x032e); unicode_input_finish();
- unicode_input_start(); register_hex(0x005e); unicode_input_finish();
- unicode_input_start(); register_hex(0x0029); unicode_input_finish();
- break;
- case LOVE:
- unicode_input_start(); register_hex(0x2665); unicode_input_finish();
- unicode_input_start(); register_hex(0x203f); unicode_input_finish();
- unicode_input_start(); register_hex(0x2665); unicode_input_finish();
- break;
- }
- break;
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ if (record->event.pressed) {
+ switch (keycode) {
+ case I3_RUN:
+ tap_code16(C(KC_I));
+ tap_code(KC_R);
+ return false;
+ case VRSN:
+ SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
+ return false;
+ case I3_GO_GROUP_1 ... I3_GO_GROUP_10:
+ tap_code16(C(KC_I));
+ tap_code(KC_G);
+ if (keycode == I3_GO_GROUP_10) {
+ tap_code(KC_0);
+ } else {
+ tap_code(KC_1 + (keycode - I3_GO_GROUP_1));
+ }
+ return false;
+ case EMOJI_SHRUG:
+ send_unicode_string("¯\\_(ツ)_/¯");
+ return false;
+ case EMOJI_YAY:
+ SEND_STRING("\\o/");
+ return false;
+ case EMOJI_HUG:
+ send_unicode_string("༼ 㤠◕_â—• ༽ã¤");
+ return false;
+ case EMOJI_SMILE:
+ send_unicode_string("ʘ‿ʘ");
+ return false;
+ case EMOJI_SMILE2:
+ send_unicode_string("(ʘ‿ʘ)");
+ return false;
+ case EMOJI_HMM1:
+ send_unicode_string("ಠ_ಠ");
+ return false;
+ case EMOJI_HMM2:
+ send_unicode_string("(ಠ_ಠ)");
+ return false;
+ case EMOJI_BEAR1:
+ send_unicode_string("ʕ•ᴥ•ʔ");
+ return false;
+ case EMOJI_BEAR2:
+ send_unicode_string("(ᵔᴥᵔ)");
+ return false;
+ case EMOJI_FUU:
+ send_unicode_string("╭∩╮(-_-)╭∩╮");
+ return false;
+ case EMOJI_EGGY1:
+ send_unicode_string("(╯°□°)╯");
+ return false;
+ case EMOJI_EGGY2:
+ send_unicode_string("ノ( ゜-゜ノ)");
+ return false;
+ case EMOJI_FACE1:
+ SEND_STRING("(-_-)");
+ return false;
+ case EMOJI_FACE2:
+ send_unicode_string("(•_•)");
+ return false;
+ case EMOJI_UHU:
+ send_unicode_string("⊙ï¹âŠ™");
+ return false;
+ case EMOJI_SMRK1:
+ send_unicode_string("^Ì®^");
+ return false;
+ case EMOJI_SMRK2:
+ send_unicode_string("(^Ì®^)");
+ return false;
+ case EMOJI_LOVE:
+ send_unicode_string("♥‿♥");
+ return false;
+ }
}
- }
+ return true;
}
-const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
- if (record->event.pressed) {
- switch(id) {
- case RUN:
- return MACRO( D(LCTL), T(I), U(LCTL), T(R), END );
- break;
- }
- }
- return MACRO_NONE;
-};
-
// Runs just one time when the keyboard initializes.
void matrix_init_user(void) {
set_unicode_input_mode(UC_LNX);
diff --git a/layouts/community/ergodox/drashna/config.h b/layouts/community/ergodox/drashna/config.h
index 4ccba8f04b..f9daf277fb 100644
--- a/layouts/community/ergodox/drashna/config.h
+++ b/layouts/community/ergodox/drashna/config.h
@@ -47,3 +47,4 @@
#define PIMORONI_TRACKBALL_INVERT_X
#define PIMORONI_TRACKBALL_INVERT_Y
+#define PIMORONI_TRACKBALL_CLICK
diff --git a/layouts/community/ergodox/drashna/keymap.c b/layouts/community/ergodox/drashna/keymap.c
index 3e14606060..600e29020d 100644
--- a/layouts/community/ergodox/drashna/keymap.c
+++ b/layouts/community/ergodox/drashna/keymap.c
@@ -19,7 +19,7 @@
#ifdef UNICODEMAP_ENABLE
# include "drashna_unicode.h"
#endif // UNICODEMAP_ENABLE
-
+#include "drivers/sensors/pimoroni_trackball.h"
enum more_custom_keycodes {
KC_SWAP_NUM = NEW_SAFE_RANGE,
PM_SCROLL,
@@ -317,13 +317,14 @@ void shutdown_keymap(void) {
static bool mouse_button_one, trackball_button_one;
-void trackball_check_click(bool pressed, report_mouse_t* mouse) {
- if (mouse_button_one | pressed) {
- mouse->buttons |= MOUSE_BTN1;
+void trackball_register_button(bool pressed, enum mouse_buttons button) {
+ report_mouse_t currentReport = pointing_device_get_report();
+ if (pressed) {
+ currentReport.buttons |= button;
} else {
- mouse->buttons &= ~MOUSE_BTN1;
+ currentReport.buttons &= ~button;
}
- trackball_button_one = pressed;
+ pointing_device_set_report(currentReport);
}
#endif
diff --git a/layouts/community/ergodox/drashna/visualizer.c b/layouts/community/ergodox/drashna/visualizer.c_old
index 6b1c3ff498..6b1c3ff498 100644
--- a/layouts/community/ergodox/drashna/visualizer.c
+++ b/layouts/community/ergodox/drashna/visualizer.c_old
diff --git a/layouts/community/ergodox/dvorak_programmer_swe/keymap.c b/layouts/community/ergodox/dvorak_programmer_swe/keymap.c
index bb27f18e80..a8a428a04b 100644
--- a/layouts/community/ergodox/dvorak_programmer_swe/keymap.c
+++ b/layouts/community/ergodox/dvorak_programmer_swe/keymap.c
@@ -69,8 +69,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_SPC,KC_BSPC,KC_END,
// right hand
KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLASH,
- TG(1), KC_F, KC_G, KC_C, KC_R, KC_L, SE_AM,
- KC_D, KC_H, KC_T, KC_N, KC_S, SE_AE,
+ TG(1), KC_F, KC_G, KC_C, KC_R, KC_L, SE_ARNG,
+ KC_D, KC_H, KC_T, KC_N, KC_S, SE_ADIA,
TG(MDIA),KC_B, KC_M, KC_W, KC_V, CTL_T(KC_Z), KC_RSFT,
KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, TT(SYMB),
LALT(KC_LSFT), CTL_T(KC_ESC),
@@ -111,8 +111,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS,KC_TRNS,KC_TRNS,
// right hand
KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
- KC_TRNS, SE_LESS, KC_7, KC_8, KC_9, KC_KP_ASTERISK, KC_F12,
- LSFT(SE_LESS), KC_4, KC_5, KC_6, KC_KP_PLUS, KC_TRNS,
+ KC_TRNS, SE_LABK, KC_7, KC_8, KC_9, KC_KP_ASTERISK, KC_F12,
+ SE_RABK, KC_4, KC_5, KC_6, KC_KP_PLUS, KC_TRNS,
KC_TRNS, SE_QUES, KC_1, KC_2, KC_3, LSFT(KC_5), KC_TRNS,
KC_DOT,KC_0, LSFT(KC_0), KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS,
@@ -186,7 +186,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[DEVL] = LAYOUT_ergodox(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, M(MACRO_SAVE), M(MACRO_BUILD), M(MACRO_DEBUG), KC_PSCR, ALGR(KC_4), KC_TRNS,
- KC_TRNS, SE_ACUT, SE_APOS, SE_PIPE, KC_TRNS, ALGR(KC_3),
+ KC_TRNS, SE_ACUT, SE_QUOT, SE_PIPE, KC_TRNS, ALGR(KC_3),
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, ALGR(KC_5), KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS,
diff --git a/layouts/community/ergodox/dvorak_programmer_swe/readme.md b/layouts/community/ergodox/dvorak_programmer_swe/readme.md
index 3bedf50d74..78d872ab5b 100644
--- a/layouts/community/ergodox/dvorak_programmer_swe/readme.md
+++ b/layouts/community/ergodox/dvorak_programmer_swe/readme.md
@@ -25,7 +25,7 @@ Known issues:
* Switched position on Alt and Alt-shift
* Added tilde character to symbol layer
* Added Print Screen to keymap 3
- * Added ' (NO_APOS) to keymap 3
+ * Added ' (NO_QUOT) to keymap 3
* Added how to install help in this readme
* 2017-05-16
diff --git a/layouts/community/ergodox/dvorak_svorak_a5/keymap.c b/layouts/community/ergodox/dvorak_svorak_a5/keymap.c
index 4ca20bd48c..3ecef9d9b6 100644
--- a/layouts/community/ergodox/dvorak_svorak_a5/keymap.c
+++ b/layouts/community/ergodox/dvorak_svorak_a5/keymap.c
@@ -33,7 +33,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[BASE] = LAYOUT_ergodox( // layer 0 : default
// left hand
KC_NO, KC_1, KC_2, KC_3, KC_4, KC_5, MO(MOUS),
- KC_TAB, SE_AA, SE_AE, SE_OSLH, KC_P, KC_Y, KC_NO,
+ KC_TAB, SE_ARNG,SE_ADIA, SE_ODIA, KC_P, KC_Y, KC_NO,
KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I,
KC_LSFT, KC_DOT, KC_Q, KC_J, KC_K, KC_X, KC_NO,
KC_LCTRL, KC_NO, KC_NO, KC_LALT, KC_LCMD,
@@ -84,9 +84,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS, KC_NO, KC_NO,
// right hand
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
- KC_NO, LSFT(KC_2), SE_QUES, LSFT(KC_6), SE_LESS, SE_GRTR, KC_NO,
+ KC_NO, LSFT(KC_2), SE_QUES, LSFT(KC_6), SE_LABK, SE_RABK, KC_NO,
KC_HASH, SE_CIRC, KC_HASH, LSFT(KC_2), SE_TILD, KC_NO,
- KC_NO, KC_PERC, SE_ACUT, SE_APOS, SE_ASTR, SE_GRV, KC_NO,
+ KC_NO, KC_PERC, SE_ACUT, SE_QUOT, SE_ASTR, SE_GRV, KC_NO,
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_NO, KC_NO,
KC_NO,
@@ -162,14 +162,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_TRNS,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, SE_ACUT,
- CTL_T(SE_APOS), SE_CIRC, SE_ASTR, KC_LALT, KC_LGUI,
+ CTL_T(SE_QUOT), SE_CIRC, SE_ASTR, KC_LALT, KC_LGUI,
KC_LCTRL, KC_LALT,
SE_TILD,
KC_BSPC, KC_TAB, KC_ESC,
// right hand
KC_TRNS, KC_6, KC_7, KC_8, KC_9, KC_0, SE_PLUS,
- KC_TRNS, KC_Y, KC_U, KC_I, KC_O, KC_P, SE_AA,
- KC_H, KC_J, KC_K, KC_L, SE_OSLH, SE_AE,
+ KC_TRNS, KC_Y, KC_U, KC_I, KC_O, KC_P, SE_ARNG,
+ KC_H, KC_J, KC_K, KC_L, SE_ODIA, SE_ADIA,
KC_DEL, KC_N, KC_M, KC_COMM, KC_DOT, SE_MINS, KC_RSFT,
KC_ALGR, KC_DOWN, KC_UP, KC_LEFT, KC_RGHT,
KC_HOME, KC_END,
diff --git a/layouts/community/ergodox/french_hacker/keymap.c b/layouts/community/ergodox/french_hacker/keymap.c
index 731d917fd9..b4c8e37bd9 100644
--- a/layouts/community/ergodox/french_hacker/keymap.c
+++ b/layouts/community/ergodox/french_hacker/keymap.c
@@ -96,8 +96,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[SYMB] = LAYOUT_ergodox(
// left hand
M(0), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS,
- KC_TRNS,FR_SECT,FR_LESS, FR_LCBR,FR_BSLS,FR_TILD,KC_TRNS,
- KC_TRNS,FR_APOS,FR_EQL, FR_MINS,FR_LPRN,FR_PLUS,
+ KC_TRNS,FR_SECT,FR_LABK, FR_LCBR,FR_BSLS,FR_TILD,KC_TRNS,
+ KC_TRNS,FR_QUOT,FR_EQL, FR_MINS,FR_LPRN,FR_PLUS,
KC_TRNS,FR_GRV,FR_QUES,FR_HASH,FR_LBRC,FR_PIPE,KC_TRNS,
FR_EURO,FR_PND,FR_DLR,KC_TRNS,KC_TRNS,
KC_TRNS,KC_TRNS,
@@ -105,9 +105,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS,KC_TRNS,KC_TRNS,
// right hand
KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
- KC_TRNS, FR_PERC, FR_AT, FR_RCBR, FR_GRTR, FR_MU, KC_F12,
- FR_ASTR, FR_RPRN, FR_UNDS, FR_SLSH, FR_QUOT, KC_TRNS,
- KC_TRNS, FR_AMP, FR_RBRC, FR_DLR, FR_EXLM, FR_CIRC, KC_TRNS,
+ KC_TRNS, FR_PERC, FR_AT, FR_RCBR, FR_RABK, FR_MICR, KC_F12,
+ FR_ASTR, FR_RPRN, FR_UNDS, FR_SLSH, FR_DQUO, KC_TRNS,
+ KC_TRNS, FR_AMPR, FR_RBRC, FR_DLR, FR_EXLM, FR_CIRC, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, ALGR(KC_S), KC_TRNS,
KC_TRNS, KC_TRNS,
KC_TRNS,
diff --git a/layouts/community/ergodox/german-kinergo/keymap.c b/layouts/community/ergodox/german-kinergo/keymap.c
index d9c2978140..9f8b72596e 100644
--- a/layouts/community/ergodox/german-kinergo/keymap.c
+++ b/layouts/community/ergodox/german-kinergo/keymap.c
@@ -43,14 +43,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, MO(1),
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G,
KC_LSFT, DE_Y, KC_X, KC_C, KC_V, KC_B, MO(2),
- KC_LGUI, DE_CIRC, DE_LESS, KC_LEFT, KC_RIGHT,
+ KC_LGUI, DE_CIRC, DE_LABK, KC_LEFT, KC_RIGHT,
KC_LCTRL, KC_LALT,
KC_HOME,
KC_BSPC,KC_DEL,KC_END,
// right hand
KC_PSCREEN, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
- MO(1), DE_Z, KC_U, KC_I, KC_O, KC_P, DE_UE,
- KC_H, KC_J, KC_K, KC_L, DE_OE, LT(MDIA,DE_AE),
+ MO(1), DE_Z, KC_U, KC_I, KC_O, KC_P, DE_UDIA,
+ KC_H, KC_J, KC_K, KC_L, DE_ODIA, LT(MDIA,DE_ADIA),
MO(2), KC_N, KC_M, KC_COMM, KC_DOT, DE_MINS, KC_RSFT,
KC_DOWN, KC_UP, DE_HASH, DE_PLUS, KC_RGUI,
KC_RALT, KC_RCTRL,
@@ -63,14 +63,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// KC_DEL, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(1),
// KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G,
// KC_LSFT, DE_Y, KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO),
-// LT(SYMB,DE_LESS),CTL_T(DE_HASH), DE_ACUT, DE_MINS, DE_PLUS,
+// LT(SYMB,DE_LABK),CTL_T(DE_HASH), DE_ACUT, DE_MINS, DE_PLUS,
// ALT_T(KC_APP), KC_LGUI,
// KC_HOME,
// KC_SPC,KC_BSPC,KC_END,
// // right hand
// KC_MNXT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
-// TG(2), DE_Z, KC_U, KC_I, KC_O, KC_P, DE_UE,
-// KC_H, KC_J, KC_K, KC_L, DE_OE, LT(MDIA,DE_AE),
+// TG(2), DE_Z, KC_U, KC_I, KC_O, KC_P, DE_UDIA,
+// KC_H, KC_J, KC_K, KC_L, DE_ODIA, LT(MDIA,DE_ADIA),
// MEH_T(KC_NO),KC_N, KC_M, KC_COMM, KC_DOT, CTL_T(DE_MINS), KC_RSFT,
// KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, TT(SYMB),
// KC_LALT,CTL_T(KC_ESC),
diff --git a/layouts/community/ergodox/german-lukas/keymap.c b/layouts/community/ergodox/german-lukas/keymap.c
index cbc51c6959..76a77acdb2 100644
--- a/layouts/community/ergodox/german-lukas/keymap.c
+++ b/layouts/community/ergodox/german-lukas/keymap.c
@@ -40,14 +40,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB),
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G,
KC_LSFT, DE_Y, KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO),
- KC_LGUI, DE_CIRC, DE_LESS, KC_LEFT, KC_RIGHT,
+ KC_LGUI, DE_CIRC, DE_LABK, KC_LEFT, KC_RIGHT,
KC_LCTRL, KC_LALT,
KC_HOME,
KC_SPC ,KC_DEL,KC_END,
// right hand
KC_PSCREEN, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
- TG(MDIA), DE_Z, KC_U, KC_I, KC_O, KC_P, LT(SHRT,DE_UE),
- KC_H, KC_J, KC_K, KC_L, DE_OE, LT(MDIA,DE_AE),
+ TG(MDIA), DE_Z, KC_U, KC_I, KC_O, KC_P, LT(SHRT,DE_UDIA),
+ KC_H, KC_J, KC_K, KC_L, DE_ODIA, LT(MDIA,DE_ADIA),
MEH_T(KC_NO), KC_N, KC_M, KC_COMM, KC_DOT, DE_MINS, KC_RSFT,
KC_UP, KC_DOWN, DE_HASH, DE_PLUS, LCA_T(KC_NO),
KC_RALT, KC_RCTRL,
diff --git a/layouts/community/ergodox/german-manuneo/keymap.c b/layouts/community/ergodox/german-manuneo/keymap.c
index d1e48e1102..9b24df83db 100644
--- a/layouts/community/ergodox/german-manuneo/keymap.c
+++ b/layouts/community/ergodox/german-manuneo/keymap.c
@@ -132,7 +132,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
MO(5), DE_1, DE_2, DE_3, DE_4, DE_5, DE_ACUT,
MO(4), DE_X, DE_P, DE_F, DE_W, DE_G, KC_HOME,
MO(1), DE_U, DE_I, DE_A, DE_E, DE_O,
- MO(3), DE_UE, DE_OE, DE_AE, DE_C, DE_V, KC_END,
+ MO(3), DE_UDIA, DE_ODIA, DE_ADIA, DE_C, DE_V, KC_END,
KC_TRNS, KC_TRNS, KC_LGUI, KC_LALT, KC_LCTL,
/*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_INS, TG(2),
/*-*/ /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_APP,
@@ -167,7 +167,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* '-----------------' '-----------------'
*/
[L1] = LAYOUT_ergodox(
- KC_TRNS, DE_EXLM, DE_DQOT, DE_PARA, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, DE_EXLM, DE_DQUO, DE_SECT, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, DE_ASTR, DE_PIPE, DE_SLSH, DE_LCBR, DE_RCBR, KC_TRNS,
KC_TRNS, DE_UNDS, DE_MINS, DE_AMPR, DE_LBRC, DE_RBRC,
KC_TRNS, KC_TRNS, DE_PLUS, DE_EQL, KC_TRNS, KC_TRNS, KC_TRNS,
@@ -175,9 +175,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_TRNS, KC_TRNS,
/*-*/ /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_TRNS,
/*-*/ /*-*/ /*-*/ /*-*/ KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, DE_RING, KC_TRNS,
- KC_TRNS, DE_HASH, DE_LESS, DE_MORE, KC_TRNS, DE_DQOT, KC_TRNS,
- /*-*/ DE_DLR, DE_LPRN, DE_RPRN, DE_TILD, DE_QUOT, DE_QST,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, DE_DEG, KC_TRNS,
+ KC_TRNS, DE_HASH, DE_LABK, DE_RABK, KC_TRNS, DE_DQUO, KC_TRNS,
+ /*-*/ DE_DLR, DE_LPRN, DE_RPRN, DE_TILD, DE_QUOT, DE_QUES,
KC_TRNS, DE_BSLS, DE_PERC, DE_SCLN, DE_COLN, M(UC_UPWARDS_ARROW), KC_TRNS,
/*-*/ /*-*/ KC_TRNS, KC_TRNS, M(UC_LEFTWARDS_ARROW), M(UC_DOWNWARDS_ARROW), M(UC_RIGHTWARDS_ARROW),
KC_TRNS, KC_TRNS,
diff --git a/layouts/community/ergodox/german/keymap.c b/layouts/community/ergodox/german/keymap.c
index c64057dc4c..99dda5185c 100644
--- a/layouts/community/ergodox/german/keymap.c
+++ b/layouts/community/ergodox/german/keymap.c
@@ -38,14 +38,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_DEL, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(1),
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G,
KC_LSFT, DE_Y, KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO),
- LT(SYMB,DE_LESS),CTL_T(DE_HASH), DE_ACUT, DE_MINS, DE_PLUS,
+ LT(SYMB,DE_LABK),CTL_T(DE_HASH), DE_ACUT, DE_MINS, DE_PLUS,
ALT_T(KC_APP), KC_LGUI,
KC_HOME,
KC_SPC,KC_BSPC,KC_END,
// right hand
KC_MNXT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
- TG(2), DE_Z, KC_U, KC_I, KC_O, KC_P, DE_UE,
- KC_H, KC_J, KC_K, KC_L, DE_OE, LT(MDIA,DE_AE),
+ TG(2), DE_Z, KC_U, KC_I, KC_O, KC_P, DE_UDIA,
+ KC_H, KC_J, KC_K, KC_L, DE_ODIA, LT(MDIA,DE_ADIA),
MEH_T(KC_NO),KC_N, KC_M, KC_COMM, KC_DOT, CTL_T(DE_MINS), KC_RSFT,
KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, TT(SYMB),
KC_LALT,CTL_T(KC_ESC),
diff --git a/layouts/community/ergodox/guni/keymap.c b/layouts/community/ergodox/guni/keymap.c
index 0707bcf774..cc67fbdeaa 100644
--- a/layouts/community/ergodox/guni/keymap.c
+++ b/layouts/community/ergodox/guni/keymap.c
@@ -1,7 +1,4 @@
#include QMK_KEYBOARD_H
-#include "debug.h"
-#include "action_layer.h"
-#include "bootloader.h"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
LAYOUT_ergodox( // layer 0 : default
@@ -13,7 +10,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_LGUI , KC_GRV,KC_LEFT,KC_RGHT,KC_LALT,
KC_NO , KC_NO ,
KC_NO ,
- KC_BSPC,KC_DEL ,KC_FN23,
+ KC_BSPC,KC_DEL ,TO(3),
// right hand
KC_RBRC , KC_6, KC_7 , KC_8, KC_9, KC_0, KC_MINS,
KC_END , KC_Y, KC_U , KC_I, KC_O, KC_P, MT(MOD_RCTL, KC_BSLS),
@@ -34,7 +31,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
KC_TRNS,KC_TRNS,
KC_TRNS,
- KC_TRNS,KC_TRNS,KC_FN1,
+ KC_TRNS,KC_TRNS,TO(0),
// right hand
KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS,
KC_TRNS,KC_EXLM,LSFT(KC_COMM),LSFT(KC_DOT),KC_EQL,KC_AMPR, KC_TRNS,
@@ -55,7 +52,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
KC_TRNS,KC_TRNS,
KC_TRNS,
- KC_TRNS,KC_TRNS,KC_FN1 ,
+ KC_TRNS,KC_TRNS,TO(0) ,
// right hand
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
KC_TRNS ,KC_TRNS, KC_HOME, KC_TRNS, KC_TRNS, KC_END ,KC_TRNS,
@@ -68,14 +65,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
LAYOUT_ergodox( // layer 3 : teensy bootloader functions
// left hand
- KC_FN0, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
+ RESET, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
KC_TRNS,KC_TRNS,
KC_TRNS,
- KC_TRNS,KC_TRNS,KC_FN1 ,
+ KC_TRNS,KC_TRNS,TO(0) ,
// right hand
KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
@@ -110,31 +107,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
};
-
-/* id for user defined functions */
-enum function_id {
- TEENSY_KEY,
-};
-
-/*
- * Fn action definition
- */
-const uint16_t PROGMEM fn_actions[] = {
- [0] = ACTION_FUNCTION(TEENSY_KEY), // FN0 - Teensy key
- [1] = ACTION_LAYER_SET(0, ON_PRESS),
- [23] = ACTION_LAYER_SET(3, ON_PRESS),
- [24] = ACTION_LAYER_SET(2, ON_PRESS),
- [26] = ACTION_LAYER_SET(1, ON_PRESS),
-};
-
-void action_function(keyrecord_t *event, uint8_t id, uint8_t opt)
-{
-
- if (id == TEENSY_KEY) {
- clear_keyboard();
- print("\n\nJump to bootloader... ");
- wait_ms(250);
- bootloader_jump(); // should not return
- print("not supported.\n");
- }
-}
diff --git a/layouts/community/ergodox/ishigoya-jp/keymap.c b/layouts/community/ergodox/ishigoya-jp/keymap.c
index 59040cd50c..c70cbba819 100644
--- a/layouts/community/ergodox/ishigoya-jp/keymap.c
+++ b/layouts/community/ergodox/ishigoya-jp/keymap.c
@@ -396,7 +396,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[NUM] = LAYOUT_ergodox(
// left hand
KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_NO,
- KC_NO, KC_NO, KC_NO, JP_DQT, KC_RBRACKET, KC_BSPC, KC_SCLN,
+ KC_NO, KC_NO, KC_NO, JP_DQUO, KC_RBRACKET, KC_BSPC, KC_SCLN,
KC_NO, KC_NO, KC_SLSH, JP_PLUS, LSFT(KC_RBRACKET), JP_RCBR,
KC_NO, KC_NO, JP_ASTR, KC_MINS, LSFT(KC_8), LSFT(KC_9), JP_COLN,
KC_TRNS, KC_NO, KC_NO, KC_NO, KC_HASH,
diff --git a/layouts/community/ergodox/kristian/keymap.c b/layouts/community/ergodox/kristian/keymap.c
index b56e880c0e..c3bb9e047a 100644
--- a/layouts/community/ergodox/kristian/keymap.c
+++ b/layouts/community/ergodox/kristian/keymap.c
@@ -13,7 +13,7 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-[0] = LAYOUT_ergodox(NO_LESS,KC_1,KC_2,KC_3,KC_4,KC_5,KC_BSPACE,KC_TAB,KC_Q,KC_W,KC_E,KC_R,KC_T,TG(1),KC_BSPACE,KC_A,KC_S,KC_D,KC_F,KC_G,SFT_T(NO_APOS),CTL_T(KC_Z),KC_X,KC_C,KC_V,KC_B,SFT_T(KC_EQUAL),MO(1),CTL_T(KC_GRAVE),KC_LGUI,KC_LEFT,KC_RIGHT,KC_ESCAPE,KC_CAPSLOCK,KC_HOME,KC_SPACE,KC_LGUI,KC_LALT,KC_DELETE,KC_6,KC_7,KC_8,KC_9,KC_0,NO_PLUS,TG(1),KC_Y,KC_U,KC_I,KC_O,KC_P,NO_AM,KC_H,KC_J,KC_K,KC_L,LT(2,NO_OSLH),NO_AE,SFT_T(KC_RBRC),KC_N,KC_M,KC_COMMA,KC_DOT,CTL_T(KC_SLASH),SFT_T(NO_APOS),KC_DOWN,KC_UP,NO_LPRN,NO_RPRN,MO(1),NO_QUOT,CTL_T(KC_ESCAPE),NO_APOS,KC_LALT,KC_LGUI,KC_ENTER),
+[0] = LAYOUT_ergodox(NO_LABK,KC_1,KC_2,KC_3,KC_4,KC_5,KC_BSPACE,KC_TAB,KC_Q,KC_W,KC_E,KC_R,KC_T,TG(1),KC_BSPACE,KC_A,KC_S,KC_D,KC_F,KC_G,SFT_T(NO_QUOT),CTL_T(KC_Z),KC_X,KC_C,KC_V,KC_B,SFT_T(KC_EQUAL),MO(1),CTL_T(KC_GRAVE),KC_LGUI,KC_LEFT,KC_RIGHT,KC_ESCAPE,KC_CAPSLOCK,KC_HOME,KC_SPACE,KC_LGUI,KC_LALT,KC_DELETE,KC_6,KC_7,KC_8,KC_9,KC_0,NO_PLUS,TG(1),KC_Y,KC_U,KC_I,KC_O,KC_P,NO_ARNG,KC_H,KC_J,KC_K,KC_L,LT(2,NO_OSTR),NO_AE,SFT_T(KC_RBRC),KC_N,KC_M,KC_COMMA,KC_DOT,CTL_T(KC_SLASH),SFT_T(NO_QUOT),KC_DOWN,KC_UP,NO_LPRN,NO_RPRN,MO(1),NO_QUOT,CTL_T(KC_ESCAPE),NO_QUOT,KC_LALT,KC_LGUI,KC_ENTER),
[1] = LAYOUT_ergodox(M(0),KC_F1,KC_F2,KC_F3,KC_F4,KC_F5,KC_BSPACE,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_BSPACE,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_LSHIFT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_LCTL,KC_LGUI,KC_LEFT,KC_RIGHT,KC_ESCAPE,KC_TRANSPARENT,KC_HOME,KC_SPACE,KC_LGUI,KC_LALT,KC_DELETE,KC_F6,KC_F7,KC_F8,KC_F9,KC_F10,KC_F11,KC_TRANSPARENT,KC_7,KC_8,KC_9,KC_TRANSPARENT,KC_TRANSPARENT,KC_F12,KC_4,KC_5,KC_6,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_0,KC_1,KC_2,KC_3,NO_LBRC,NO_RBRC,KC_LSHIFT,KC_COMMA,KC_DOT,LSFT(NO_LBRC),LSFT(NO_RBRC),KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_LALT,KC_LGUI,KC_ENTER),
diff --git a/layouts/community/ergodox/neo2_on_qwertz_hardware/keymap.c b/layouts/community/ergodox/neo2_on_qwertz_hardware/keymap.c
index 85782dda74..7c91b3fbb0 100644
--- a/layouts/community/ergodox/neo2_on_qwertz_hardware/keymap.c
+++ b/layouts/community/ergodox/neo2_on_qwertz_hardware/keymap.c
@@ -38,7 +38,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_ESC, DE_1, DE_2, DE_3, DE_4, DE_5, DE_ACUT,
KC_TAB, DE_X, DE_V, DE_L, DE_C, DE_W, KC_PSCR,
MO(1), DE_U, DE_I, DE_A, DE_E, DE_O,
- KC_LSFT, DE_UE, DE_OE, DE_AE, DE_P, DE_Z, KC_SPACE,
+ KC_LSFT, DE_UDIA, DE_ODIA, DE_ADIA, DE_P, DE_Z, KC_SPACE,
KC_LCTL, KC_LGUI, KC_LALT, MO(3), MO(2),
/*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_VOLD, KC_VOLU,
/*-*/ /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_TRNS,
@@ -82,9 +82,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/*-*/ /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_TRNS,
/*-*/ /*-*/ /*-*/ /*-*/ KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, DE_EXLM, DE_LESS, DE_MORE, DE_EQL, DE_AMPR, KC_TRNS,
- /*-*/ DE_QST, DE_LPRN, DE_RPRN, DE_MINS, DE_COLN, DE_AT,
- KC_TRNS, DE_PLUS, DE_PERC, DE_DQOT, DE_QUOT, DE_SCLN, KC_TRNS,
+ KC_TRNS, DE_EXLM, DE_LABK, DE_RABK, DE_EQL, DE_AMPR, KC_TRNS,
+ /*-*/ DE_QUES, DE_LPRN, DE_RPRN, DE_MINS, DE_COLN, DE_AT,
+ KC_TRNS, DE_PLUS, DE_PERC, DE_DQUO, DE_QUOT, DE_SCLN, KC_TRNS,
/*-*/ /*-*/ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS,
KC_TRNS,
diff --git a/layouts/community/ergodox/norwegian_programmer_osx_pc/keymap.c b/layouts/community/ergodox/norwegian_programmer_osx_pc/keymap.c
index ee9a9d1802..2ddd7ab209 100644
--- a/layouts/community/ergodox/norwegian_programmer_osx_pc/keymap.c
+++ b/layouts/community/ergodox/norwegian_programmer_osx_pc/keymap.c
@@ -7,6 +7,18 @@
#define BASE_MAC 1 // default layer mac
#define NUMB_FUNC 2 // numbers and function keys
+enum custom_keycodes {
+ TILDE_NO = SAFE_RANGE,
+ LESS_NO,
+ GRTR_NO,
+ CIRC_NO,
+ ACUT_NO,
+ GRV_NO,
+ LESS_NO_MAC,
+ GRTR_NO_MAC,
+ ACUT_NO_MAC
+};
+
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap 0: Basic layer PC
@@ -32,18 +44,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/
[BASE] = LAYOUT_ergodox(
// left hand
- KC_PAST, NO_LBRC, NO_RBRC, NO_LCBR, NO_RCBR, KC_FN2, TG(1),
- KC_PPLS, KC_Q, KC_W, KC_E, KC_R, KC_T, NO_QUO2,
+ KC_PAST, NO_LBRC, NO_RBRC, NO_LCBR, NO_RCBR, TILDE_NO, TG(1),
+ KC_PPLS, KC_Q, KC_W, KC_E, KC_R, KC_T, NO_DQUO,
KC_PSLS, KC_A, KC_S, KC_D, KC_F, KC_G,
KC_PMNS, KC_Z, KC_X, KC_C, KC_V, KC_B, NO_SCLN,
ALT_T(KC_ESC), KC_EXLM , NO_QUES, NO_COLN, KC_TAB,
- KC_HASH, KC_FN7,
- KC_FN6,
+ KC_HASH, GRV_NO,
+ ACUT_NO,
OSM(MOD_LSFT),CTL_T(KC_DOT),GUI_T(KC_COMMA),
// right hand
- KC_FN5, NO_DLR, NO_LPRN, NO_RPRN ,KC_FN3, KC_FN4,NO_AT,
- NO_APOS, KC_Y, KC_U, KC_I, KC_O, KC_P, NO_AA ,
- KC_H, KC_J, KC_K, KC_L, NO_OSLH, NO_AE,
+ CIRC_NO, NO_DLR, NO_LPRN, NO_RPRN ,LESS_NO, GRTR_NO,NO_AT,
+ NO_QUOT, KC_Y, KC_U, KC_I, KC_O, KC_P, NO_ARNG,
+ KC_H, KC_J, KC_K, KC_L, NO_OSTR, NO_AE,
NO_EQL, KC_N, KC_M, KC_RIGHT, KC_DOWN, KC_UP, NO_BSLS,
KC_LEFT, NO_UNDS, NO_AMPR, NO_PIPE, OSL(2),
KC_INSERT, KC_PERC,
@@ -72,20 +84,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `--------------------' `--------------------'
*/
[BASE_MAC] = LAYOUT_ergodox(
- KC_TRNS, KC_TRNS,KC_TRNS, NO_LCBR_MAC,NO_RCBR_MAC, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS,KC_TRNS, S(ALGR(NO_8)),S(ALGR(NO_9)), KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS , KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, NO_GRV_MAC,
- KC_FN10,
+ KC_TRNS, ALGR(NO_BSLS),
+ ACUT_NO_MAC,
KC_TRNS,GUI_T(KC_DOT) , CTL_T(KC_COMMA),
// right hand
- KC_TRNS, NO_DLR_MAC, KC_TRNS,KC_TRNS,KC_FN8, KC_FN9,NO_AT_MAC,
- NO_APOS_MAC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, S(NO_4), KC_TRNS,KC_TRNS,LESS_NO_MAC, GRTR_NO_MAC,NO_QUOT,
+ NO_LABK, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, NO_BSLS_MAC,
- KC_TRNS, KC_TRNS, KC_TRNS, NO_PIPE_MAC, OSL(2),
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, S(ALGR(NO_7)),
+ KC_TRNS, KC_TRNS, KC_TRNS, ALGR(NO_7), OSL(2),
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS
@@ -133,47 +145,57 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
-enum macro_id {
- TILDE_NO, LESS_NO, GRTR_NO, CIRC_NO, ACUT_NO, GRV_NO, LESS_NO_MAC, GRTR_NO_MAC, ACUT_NO_MAC
-};
-
-const uint16_t PROGMEM fn_actions[] = {
- [2] = ACTION_MACRO(TILDE_NO), // Completed ~ character(pc and mac), no space needed.
- [3] = ACTION_MACRO(LESS_NO), // < completed on keypress down, to avoid shifting the next character if it is not released first.
- [4] = ACTION_MACRO(GRTR_NO), // > completed on keypress down, to avoid shifting the next character if it is not released first.
- [5] = ACTION_MACRO(CIRC_NO), // Completed ^ character, no space needed.
- [6] = ACTION_MACRO(ACUT_NO), // Completed ´ character, no space needed.
- [7] = ACTION_MACRO(GRV_NO), // Completed ` character, no space needed.
- [8] = ACTION_MACRO(LESS_NO_MAC), // < completed on keypress down, to avoid same button problem when typing <> quickly
- [9] = ACTION_MACRO(GRTR_NO_MAC), // > completed on keypress down, to avoid same button problem when typing <> quickly
- [10] = ACTION_MACRO(ACUT_NO_MAC), // Completed ´ character, no space needed
-};
-
-
-
-const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
-{
- keyevent_t event = record->event;
-
- switch (id) {
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
case TILDE_NO:
- return (event.pressed ? MACRO( D(RALT), T(RBRC), U(RALT), T(SPC), END ) : MACRO_NONE);
+ if (record->event.pressed) {
+ tap_code16(ALGR(KC_RBRC));
+ tap_code(KC_SPC);
+ }
+ return false;
case LESS_NO:
- return (event.pressed ? MACRO( T(NUBS), END ) : MACRO_NONE);
+ if (record->event.pressed) {
+ tap_code(KC_NUBS);
+ }
+ return false;
case GRTR_NO:
- return (event.pressed ? MACRO( D(LSFT), T(NUBS), U(LSFT), END ) : MACRO_NONE);
+ if (record->event.pressed) {
+ tap_code16(S(KC_NUBS));
+ }
+ return false;
case CIRC_NO:
- return (event.pressed ? MACRO( D(LSFT), T(RBRC), U(LSFT), T(SPC), END ) : MACRO_NONE);
+ if (record->event.pressed) {
+ tap_code16(S(KC_RBRC));
+ tap_code(KC_SPC);
+ }
+ return false;
case ACUT_NO:
- return (event.pressed ? MACRO( D(RALT), T(EQL), U(RALT), T(SPC), END ) : MACRO_NONE);
+ if (record->event.pressed) {
+ tap_code16(ALGR(KC_EQL));
+ tap_code(KC_SPC);
+ }
+ return false;
case GRV_NO:
- return (event.pressed ? MACRO( D(LSFT), T(EQL), T(SPC), U(LSFT), END ) : MACRO_NONE);
+ if (record->event.pressed) {
+ SEND_STRING(SS_LSFT("= "));
+ }
+ return false;
case LESS_NO_MAC:
- return (event.pressed ? MACRO( T(GRV), END ) : MACRO_NONE);
+ if (record->event.pressed) {
+ tap_code(KC_GRV);
+ }
+ return false;
case GRTR_NO_MAC:
- return (event.pressed ? MACRO( D(LSFT), T(GRV), U(LSFT), END ) : MACRO_NONE);
+ if (record->event.pressed) {
+ tap_code16(S(KC_GRV));
+ }
+ return false;
case ACUT_NO_MAC:
- return (event.pressed ? MACRO( T(EQL), T(SPC), END ) : MACRO_NONE);
+ if (record->event.pressed) {
+ tap_code(KC_EQL);
+ tap_code(KC_SPC);
+ }
+ return false;
}
- return MACRO_NONE;
-};
+ return true;
+}
diff --git a/layouts/community/ergodox/norwegian_programmer_osx_pc_colemak/keymap.c b/layouts/community/ergodox/norwegian_programmer_osx_pc_colemak/keymap.c
index af1d268bd9..5ca8d40db0 100644
--- a/layouts/community/ergodox/norwegian_programmer_osx_pc_colemak/keymap.c
+++ b/layouts/community/ergodox/norwegian_programmer_osx_pc_colemak/keymap.c
@@ -7,6 +7,18 @@
#define BASE_MAC 1 // default layer mac
#define NUMB_FUNC 2 // numbers and function keys
+enum custom_keycodes {
+ TILDE_NO = SAFE_RANGE,
+ LESS_NO,
+ GRTR_NO,
+ CIRC_NO,
+ ACUT_NO,
+ GRV_NO,
+ LESS_NO_MAC,
+ GRTR_NO_MAC,
+ ACUT_NO_MAC
+};
+
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap 0: Basic layer PC
@@ -32,18 +44,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/
[BASE] = LAYOUT_ergodox(
// left hand
- KC_PAST, NO_LBRC, NO_RBRC, NO_LCBR, NO_RCBR, KC_FN2, TG(1),
- KC_PPLS, KC_Q, KC_W, KC_F, KC_P, KC_G, NO_QUO2,
+ KC_PAST, NO_LBRC, NO_RBRC, NO_LCBR, NO_RCBR, TILDE_NO, TG(1),
+ KC_PPLS, KC_Q, KC_W, KC_F, KC_P, KC_G, NO_DQUO,
KC_PSLS, KC_A, KC_R, KC_S, KC_T, KC_D,
KC_PMNS, KC_Z, KC_X, KC_C, KC_V, KC_B, NO_SCLN,
ALT_T(KC_ESC), KC_EXLM , NO_QUES, NO_COLN, KC_TAB,
- KC_HASH, KC_FN7,
- KC_FN6,
+ KC_HASH, GRV_NO,
+ ACUT_NO,
OSM(MOD_LSFT),CTL_T(KC_DOT),GUI_T(KC_COMMA),
// right hand
- KC_FN5, NO_DLR, NO_LPRN, NO_RPRN ,KC_FN3, KC_FN4,NO_AT,
- NO_APOS, KC_J, KC_L, KC_U, KC_Y, NO_AA, NO_AE ,
- KC_H, KC_N, KC_E, KC_I, KC_O, NO_OSLH,
+ CIRC_NO, NO_DLR, NO_LPRN, NO_RPRN ,LESS_NO, GRTR_NO,NO_AT,
+ NO_QUOT, KC_J, KC_L, KC_U, KC_Y, NO_ARNG, NO_AE ,
+ KC_H, KC_N, KC_E, KC_I, KC_O, NO_OSTR,
NO_EQL, KC_K, KC_M, KC_RIGHT, KC_DOWN, KC_UP, NO_BSLS,
KC_LEFT, NO_UNDS, NO_AMPR, NO_PIPE, OSL(2),
KC_INSERT, KC_PERC,
@@ -72,20 +84,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `--------------------' `--------------------'
*/
[BASE_MAC] = LAYOUT_ergodox(
- KC_TRNS, KC_TRNS,KC_TRNS, NO_LCBR_MAC,NO_RCBR_MAC, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS,KC_TRNS, S(ALGR(NO_8)),S(ALGR(NO_9)), KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS , KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, NO_GRV_MAC,
- KC_FN10,
+ KC_TRNS, ALGR(NO_BSLS),
+ ACUT_NO_MAC,
KC_TRNS,GUI_T(KC_DOT) , CTL_T(KC_COMMA),
// right hand
- KC_TRNS, NO_DLR_MAC, KC_TRNS,KC_TRNS,KC_FN8, KC_FN9,NO_AT_MAC,
- NO_APOS_MAC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, S(NO_4), KC_TRNS,KC_TRNS,LESS_NO_MAC, GRTR_NO_MAC,NO_QUOT,
+ NO_LABK, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, NO_BSLS_MAC,
- KC_TRNS, KC_TRNS, KC_TRNS, NO_PIPE_MAC, OSL(2),
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, S(ALGR(NO_7)),
+ KC_TRNS, KC_TRNS, KC_TRNS, ALGR(NO_7), OSL(2),
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS
@@ -133,47 +145,57 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
-enum macro_id {
- TILDE_NO, LESS_NO, GRTR_NO, CIRC_NO, ACUT_NO, GRV_NO, LESS_NO_MAC, GRTR_NO_MAC, ACUT_NO_MAC
-};
-
-const uint16_t PROGMEM fn_actions[] = {
- [2] = ACTION_MACRO(TILDE_NO), // Completed ~ character(pc and mac), no space needed.
- [3] = ACTION_MACRO(LESS_NO), // < completed on keypress down, to avoid shifting the next character if it is not released first.
- [4] = ACTION_MACRO(GRTR_NO), // > completed on keypress down, to avoid shifting the next character if it is not released first.
- [5] = ACTION_MACRO(CIRC_NO), // Completed ^ character, no space needed.
- [6] = ACTION_MACRO(ACUT_NO), // Completed ´ character, no space needed.
- [7] = ACTION_MACRO(GRV_NO), // Completed ` character, no space needed.
- [8] = ACTION_MACRO(LESS_NO_MAC), // < completed on keypress down, to avoid same button problem when typing <> quickly
- [9] = ACTION_MACRO(GRTR_NO_MAC), // > completed on keypress down, to avoid same button problem when typing <> quickly
- [10] = ACTION_MACRO(ACUT_NO_MAC), // Completed ´ character, no space needed
-};
-
-
-
-const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
-{
- keyevent_t event = record->event;
-
- switch (id) {
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
case TILDE_NO:
- return (event.pressed ? MACRO( D(RALT), T(RBRC), U(RALT), T(SPC), END ) : MACRO_NONE);
+ if (record->event.pressed) {
+ tap_code16(ALGR(KC_RBRC));
+ tap_code(KC_SPC);
+ }
+ return false;
case LESS_NO:
- return (event.pressed ? MACRO( T(NUBS), END ) : MACRO_NONE);
+ if (record->event.pressed) {
+ tap_code(KC_NUBS);
+ }
+ return false;
case GRTR_NO:
- return (event.pressed ? MACRO( D(LSFT), T(NUBS), U(LSFT), END ) : MACRO_NONE);
+ if (record->event.pressed) {
+ tap_code16(S(KC_NUBS));
+ }
+ return false;
case CIRC_NO:
- return (event.pressed ? MACRO( D(LSFT), T(RBRC), U(LSFT), T(SPC), END ) : MACRO_NONE);
+ if (record->event.pressed) {
+ tap_code16(S(KC_RBRC));
+ tap_code(KC_SPC);
+ }
+ return false;
case ACUT_NO:
- return (event.pressed ? MACRO( D(RALT), T(EQL), U(RALT), T(SPC), END ) : MACRO_NONE);
+ if (record->event.pressed) {
+ tap_code16(ALGR(KC_EQL));
+ tap_code(KC_SPC);
+ }
+ return false;
case GRV_NO:
- return (event.pressed ? MACRO( D(LSFT), T(EQL), T(SPC), U(LSFT), END ) : MACRO_NONE);
+ if (record->event.pressed) {
+ SEND_STRING(SS_LSFT("= "));
+ }
+ return false;
case LESS_NO_MAC:
- return (event.pressed ? MACRO( T(GRV), END ) : MACRO_NONE);
+ if (record->event.pressed) {
+ tap_code(KC_GRV);
+ }
+ return false;
case GRTR_NO_MAC:
- return (event.pressed ? MACRO( D(LSFT), T(GRV), U(LSFT), END ) : MACRO_NONE);
+ if (record->event.pressed) {
+ tap_code16(S(KC_GRV));
+ }
+ return false;
case ACUT_NO_MAC:
- return (event.pressed ? MACRO( T(EQL), T(SPC), END ) : MACRO_NONE);
+ if (record->event.pressed) {
+ tap_code(KC_EQL);
+ tap_code(KC_SPC);
+ }
+ return false;
}
- return MACRO_NONE;
-};
+ return true;
+}
diff --git a/layouts/community/ergodox/osx_de/keymap.c b/layouts/community/ergodox/osx_de/keymap.c
index cd9a35e212..581aecf2d3 100644
--- a/layouts/community/ergodox/osx_de/keymap.c
+++ b/layouts/community/ergodox/osx_de/keymap.c
@@ -15,8 +15,8 @@
#define M_MEH_SH_ACUT 2
#define M_LGUI_SHFT 3
#define M_CTL_SFT_HASH 4
-#define M_DE_OSX_CIRC_CTRLCMD 5
-#define M_DE_OSX_PLUS_CTRLALT 6
+#define M_DE_CIRC_CTRLCMD 5
+#define M_DE_PLUS_CTRLALT 6
#define SM_SMILE 7
#define SM_SMIRK 8
#define SM_CRY 9
@@ -31,39 +31,39 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[BASE]=LAYOUT_ergodox(
//left half
- KC_ESC, DE_OSX_1, DE_OSX_2, DE_OSX_3, DE_OSX_4, DE_OSX_5, M(M_CTL_SFT_HASH),
- KC_TAB, DE_OSX_Q, DE_OSX_W, DE_OSX_E, DE_OSX_R, DE_OSX_T, KC_LGUI,
- KC_LALT, DE_OSX_A, DE_OSX_S, DE_OSX_D, DE_OSX_F, DE_OSX_G,
- KC_LSFT, CTL_T(DE_OSX_Y), DE_OSX_X, DE_OSX_C, DE_OSX_V, DE_OSX_B, KC_LALT,
- LT(SYMB,DE_OSX_LESS), M(M_DE_OSX_CIRC_CTRLCMD), M(M_DE_OSX_PLUS_CTRLALT), KC_UP, KC_DOWN,
+ KC_ESC, DE_1, DE_2, DE_3, DE_4, DE_5, M(M_CTL_SFT_HASH),
+ KC_TAB, DE_Q, DE_W, DE_E, DE_R, DE_T, KC_LGUI,
+ KC_LALT, DE_A, DE_S, DE_D, DE_F, DE_G,
+ KC_LSFT, CTL_T(DE_Y), DE_X, DE_C, DE_V, DE_B, KC_LALT,
+ LT(SYMB,DE_LABK), M(M_DE_CIRC_CTRLCMD), M(M_DE_PLUS_CTRLALT), KC_UP, KC_DOWN,
M(M_MEH_SH_ACUT), TG(MDIA),
KC_HOME,
KC_BSPC, KC_DEL, LT(SMLY,KC_END),
//right half
- M(M_CTL_SFT_HASH), DE_OSX_6, DE_OSX_7, DE_OSX_8, DE_OSX_9, DE_OSX_0, DE_OSX_SS,
- KC_RGUI, DE_OSX_Z, DE_OSX_U, DE_OSX_I, DE_OSX_O, DE_OSX_P, DE_OSX_UE,
- DE_OSX_H, DE_OSX_J, DE_OSX_K, DE_OSX_L, DE_OSX_OE, ALT_T(DE_OSX_AE),
- KC_RALT, DE_OSX_N, DE_OSX_M, DE_OSX_COMM, DE_OSX_DOT, CTL_T(DE_OSX_MINS), KC_RSFT,
- KC_LEFT, KC_RIGHT, LGUI(KC_LSFT), LALT(KC_LSFT), LT(SYMB,DE_OSX_PLUS),
- TG(NUMB), ALL_T(DE_OSX_ACUT),
+ M(M_CTL_SFT_HASH), DE_6, DE_7, DE_8, DE_9, DE_0, DE_SS,
+ KC_RGUI, DE_Z, DE_U, DE_I, DE_O, DE_P, DE_UDIA,
+ DE_H, DE_J, DE_K, DE_L, DE_ODIA, ALT_T(DE_ADIA),
+ KC_RALT, DE_N, DE_M, DE_COMM, DE_DOT, CTL_T(DE_MINS), KC_RSFT,
+ KC_LEFT, KC_RIGHT, LGUI(KC_LSFT), LALT(KC_LSFT), LT(SYMB,DE_PLUS),
+ TG(NUMB), ALL_T(DE_ACUT),
KC_PGUP,
KC_PGDN, KC_ENT, KC_SPC),
[SYMB]=LAYOUT_ergodox(
//left half
KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS,
- KC_TRNS, DE_OSX_LESS, DE_OSX_MORE, DE_OSX_EXLM, DE_OSX_QST, KC_TRNS, KC_TRNS,
- KC_TRNS, DE_OSX_HASH, DE_OSX_DLR, DE_OSX_BSLS, DE_OSX_SLSH, KC_DOT,
- KC_TRNS, KC_TRNS, DE_OSX_LESS, DE_OSX_PERC, DE_OSX_PIPE, DE_OSX_TILD, KC_TRNS,
+ KC_TRNS, DE_LABK, DE_RABK, DE_EXLM, DE_QUES, KC_TRNS, KC_TRNS,
+ KC_TRNS, DE_HASH, DE_DLR, DE_BSLS, DE_SLSH, KC_DOT,
+ KC_TRNS, KC_TRNS, DE_LABK, DE_PERC, DE_PIPE, DE_TILD, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_TRNS, KC_DEL, KC_TRNS,
//right half
M(M_TOGGLE_5), KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
- KC_TRNS, LALT(LSFT(KC_7)), LALT(KC_5), LALT(KC_6), DE_OSX_LESS, DE_OSX_MORE, DE_OSX_EXLM,
- DE_OSX_SLSH, DE_OSX_LPRN, DE_OSX_RPRN, LALT(KC_8), LALT(KC_9), DE_OSX_HASH,
- KC_TRNS, DE_OSX_PIPE, DE_OSX_TILD, DE_OSX_CIRC, KC_UP, DE_OSX_MINS, LSFT(KC_4),
- DE_OSX_QUOT, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS,
+ KC_TRNS, LALT(LSFT(KC_7)), LALT(KC_5), LALT(KC_6), DE_LABK, DE_RABK, DE_EXLM,
+ DE_SLSH, DE_LPRN, DE_RPRN, LALT(KC_8), LALT(KC_9), DE_HASH,
+ KC_TRNS, DE_PIPE, DE_TILD, DE_CIRC, KC_UP, DE_MINS, LSFT(KC_4),
+ DE_QUOT, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS,
KC_F13, KC_F12,
KC_F14,
KC_F15, KC_TRNS, KC_TRNS),
@@ -118,9 +118,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//right half
KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
KC_TRNS, KC_UP, KC_7, KC_8, KC_9, LSFT(KC_RBRC), KC_F12,
- KC_DOWN, KC_4, KC_5, KC_6, KC_RBRC, DE_OSX_MINS,
+ KC_DOWN, KC_4, KC_5, KC_6, KC_RBRC, DE_MINS,
KC_TRNS, LSFT(KC_6), KC_1, KC_2, KC_3, LSFT(KC_7), KC_TRNS,
- KC_0, KC_DOT, KC_COMM, DE_OSX_EQL, KC_TRNS,
+ KC_0, KC_DOT, KC_COMM, DE_EQL, KC_TRNS,
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS),
@@ -171,8 +171,8 @@ if (record->event.pressed) {
}
break;
-case M_DE_OSX_PLUS_CTRLALT:
-//Macro: M_DE_OSX_PLUS_CTRLALT//-----------------------
+case M_DE_PLUS_CTRLALT:
+//Macro: M_DE_PLUS_CTRLALT//-----------------------
if (record->event.pressed) {
start = timer_read();
return MACRO(D(LCTRL),D(LALT),END);
@@ -264,8 +264,8 @@ if (record->event.pressed) {
}
break;
-case M_DE_OSX_CIRC_CTRLCMD:
-//Macro: M_DE_OSX_CIRC_CTRLCMD//-----------------------
+case M_DE_CIRC_CTRLCMD:
+//Macro: M_DE_CIRC_CTRLCMD//-----------------------
if (record->event.pressed) {
start = timer_read();
return MACRO(D(LCTRL),D(LGUI),END);
diff --git a/layouts/community/ergodox/osx_de_adnw_koy/keymap.c b/layouts/community/ergodox/osx_de_adnw_koy/keymap.c
index 08b11cccdf..18335652ff 100644
--- a/layouts/community/ergodox/osx_de_adnw_koy/keymap.c
+++ b/layouts/community/ergodox/osx_de_adnw_koy/keymap.c
@@ -30,13 +30,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LCTL,
KC_TAB, KC_K, KC_DOT, KC_O, KC_COMM, KC_Z, KC_LGUI,
TG(QWERTZ), KC_H, KC_A, KC_E, KC_I, KC_U,
- KC_LSFT, CTL_T(KC_X), KC_Q, DE_AE, DE_UE, DE_OE, KC_LALT,
- LT(SYMB,KC_GRV), DE_LESS, LALT(KC_LSFT), KC_LEFT, KC_RGHT,
+ KC_LSFT, CTL_T(KC_X), KC_Q, DE_ADIA, DE_UDIA, DE_ODIA, KC_LALT,
+ LT(SYMB,KC_GRV), DE_LABK, LALT(KC_LSFT), KC_LEFT, KC_RGHT,
TG(MDIA), MEH_T(LSFT(DE_ACUT)),
KC_HOME,
KC_BSPC, KC_DEL, KC_END,
//right half
- KC_RCTL, KC_6, KC_7, KC_8, KC_9, KC_0, DE_OSX_MINS,
+ KC_RCTL, KC_6, KC_7, KC_8, KC_9, KC_0, DE_MINS,
KC_RGUI, KC_V, KC_G, KC_C, KC_L, KC_MINS, KC_Y,
KC_D, KC_T, KC_R, KC_N, KC_S, LT(MDIA,KC_F),
KC_RALT, KC_B, KC_P, KC_W, KC_M, CTL_T(KC_J), KC_RSFT,
@@ -47,9 +47,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[SYMB]=LAYOUT_ergodox(
//left half
KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS,
- KC_TRNS, KC_GRV, LSFT(KC_GRV), DE_EXLM, DE_QST, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_GRV, LSFT(KC_GRV), DE_EXLM, DE_QUES, KC_TRNS, KC_TRNS,
KC_TRNS, DE_HASH, DE_DLR, LALT(LSFT(KC_7)), DE_SLSH, KC_DOT,
- KC_TRNS, KC_TRNS, DE_LESS, DE_PERC, LALT(KC_7), LALT(KC_N), KC_TRNS,
+ KC_TRNS, KC_TRNS, DE_LABK, DE_PERC, LALT(KC_7), LALT(KC_N), KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS,
KC_TRNS,
@@ -58,7 +58,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
KC_TRNS, LALT(LSFT(KC_7)), LALT(KC_5), LALT(KC_6), LALT(KC_7), DE_HASH, KC_F12,
DE_SLSH, DE_LPRN, DE_RPRN, LALT(KC_8), LALT(KC_9), KC_TRNS,
- KC_TRNS, DE_AMPR, KC_GRV, LSFT(KC_GRV), DE_DQOT, DE_QUOT, DE_QST,
+ KC_TRNS, DE_AMPR, KC_GRV, LSFT(KC_GRV), DE_DQUO, DE_QUOT, DE_QUES,
KC_TRNS, KC_DOT, KC_EXLM, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS,
KC_TRNS,
@@ -88,14 +88,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LGUI,
KC_TRNS, KC_A, KC_S, KC_D, KC_F, KC_G,
KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_LALT,
- LT(SYMB,KC_GRV), DE_LESS, LALT(KC_LSFT), KC_LEFT, KC_RGHT,
+ LT(SYMB,KC_GRV), DE_LABK, LALT(KC_LSFT), KC_LEFT, KC_RGHT,
KC_TRNS, MEH_T(LSFT(DE_ACUT)),
KC_HOME,
KC_BSPC, KC_DEL, KC_END,
//right half
LGUI(KC_C), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
- KC_RGUI, KC_Y, KC_U, KC_I, KC_O, KC_P, DE_UE,
- KC_H, KC_J, KC_K, KC_L, KC_SCLN, LT(MDIA,DE_AE),
+ KC_RGUI, KC_Y, KC_U, KC_I, KC_O, KC_P, DE_UDIA,
+ KC_H, KC_J, KC_K, KC_L, KC_SCLN, LT(MDIA,DE_ADIA),
KC_RALT, KC_N, KC_M, KC_COMM, KC_DOT, CTL_T(KC_SLSH), KC_RSFT,
KC_UP, KC_DOWN, LGUI(KC_LSFT), KC_RBRC, LT(SYMB,KC_BSLS),
ALL_T(DE_ACUT), KC_TRNS,
diff --git a/layouts/community/ergodox/osx_de_experimental/keymap.c b/layouts/community/ergodox/osx_de_experimental/keymap.c
index cedecd45cb..17ca4362e6 100644
--- a/layouts/community/ergodox/osx_de_experimental/keymap.c
+++ b/layouts/community/ergodox/osx_de_experimental/keymap.c
@@ -35,7 +35,7 @@
#define TGH_NUM 2
-#define M_DE_OSX_PLUS_CTRLALT 3
+#define M_DE_PLUS_CTRLALT 3
#define SM_KISS 4
@@ -57,7 +57,7 @@
#define SM_SAD 13
-#define M_DE_OSX_CIRC_CTRLCMD 14
+#define M_DE_CIRC_CTRLCMD 14
#define M_MEH_SH_ACUT 15
@@ -83,7 +83,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*
* /-------------------//-------------------//-------------------//-------------------//-------------------/ /-------------------//-------------------//-------------------//-------------------//-------------------/
* | < | LongPress / Type | LongPress / Type | Shift+Ctrl | Type | | # | ACUT | CMD+Shift | ALT+Shift | + |
-* | SYMB | DE_OSX_CIRC_CTRLCMD| DE_OSX_PLUS_CTRAlt | | Toggle SMLY | | Meh | Hyper | | | SYMB |
+* | SYMB | DE_CIRC_CTRLCMD | DE_PLUS_CTRAlt | | Toggle SMLY | | Meh | Hyper | | | SYMB |
* \-------------------\\-------------------\\-------------------\\-------------------\/-------------------//-------------------/ /-------------------//-------------------/ \-------------------\\-------------------\\-------------------\\-------------------\\-------------------\
* | HOME | END | | LEFT | RIGHT |
* | | | | | |
@@ -99,20 +99,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
**/
[BASE]=LAYOUT_ergodox(
//left half
- KC_ESC, DE_OSX_1, DE_OSX_2, DE_OSX_3, DE_OSX_4, DE_OSX_5, M(TGH_NUM),
- KC_TAB, DE_OSX_Q, DE_OSX_W, DE_OSX_E, DE_OSX_R, DE_OSX_T, KC_LGUI,
- KC_LALT, DE_OSX_A, DE_OSX_S, DE_OSX_D, DE_OSX_F, DE_OSX_G,
- KC_LSFT, CTL_T(DE_OSX_Y), DE_OSX_X, DE_OSX_C, DE_OSX_V, DE_OSX_B, KC_LALT,
- LT(SYMB,DE_OSX_LESS), M(M_DE_OSX_CIRC_CTRLCMD), M(M_DE_OSX_PLUS_CTRLALT), LSFT(KC_LCTRL), M(SMLY_TOG_QUOT),
+ KC_ESC, DE_1, DE_2, DE_3, DE_4, DE_5, M(TGH_NUM),
+ KC_TAB, DE_Q, DE_W, DE_E, DE_R, DE_T, KC_LGUI,
+ KC_LALT, DE_A, DE_S, DE_D, DE_F, DE_G,
+ KC_LSFT, CTL_T(DE_Y), DE_X, DE_C, DE_V, DE_B, KC_LALT,
+ LT(SYMB,DE_LABK), M(M_DE_CIRC_CTRLCMD), M(M_DE_PLUS_CTRLALT), LSFT(KC_LCTRL), M(SMLY_TOG_QUOT),
KC_HOME, KC_END,
KC_PGUP,
KC_BSPC, KC_DEL, KC_PGDN,
//right half
- M(TOG_HLD_MDIA), DE_OSX_6, DE_OSX_7, DE_OSX_8, DE_OSX_9, DE_OSX_0, DE_OSX_SS,
- KC_RGUI, DE_OSX_Z, DE_OSX_U, DE_OSX_I, DE_OSX_O, DE_OSX_P, DE_OSX_UE,
- DE_OSX_H, DE_OSX_J, DE_OSX_K, DE_OSX_L, DE_OSX_OE, ALT_T(DE_OSX_AE),
- KC_RALT, DE_OSX_N, DE_OSX_M, DE_OSX_COMM, DE_OSX_DOT, CTL_T(DE_OSX_MINS), KC_RSFT,
- MEH_T(DE_OSX_HASH), ALL_T(DE_OSX_ACUT), LGUI(KC_LSFT), LALT(KC_LSFT), LT(SYMB,DE_OSX_PLUS),
+ M(TOG_HLD_MDIA), DE_6, DE_7, DE_8, DE_9, DE_0, DE_SS,
+ KC_RGUI, DE_Z, DE_U, DE_I, DE_O, DE_P, DE_UDIA,
+ DE_H, DE_J, DE_K, DE_L, DE_ODIA, ALT_T(DE_ADIA),
+ KC_RALT, DE_N, DE_M, DE_COMM, DE_DOT, CTL_T(DE_MINS), KC_RSFT,
+ MEH_T(DE_HASH), ALL_T(DE_ACUT), LGUI(KC_LSFT), LALT(KC_LSFT), LT(SYMB,DE_PLUS),
KC_LEFT, KC_RIGHT,
KC_UP,
KC_DOWN, KC_ENT, KC_SPC),
@@ -152,19 +152,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[SYMB]=LAYOUT_ergodox(
//left half
KC_APPLICATION, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F5,
- KC_TRNS, DE_OSX_LESS, DE_OSX_MORE, DE_OSX_EXLM, DE_OSX_QST, KC_TRNS, KC_TRNS,
- KC_TRNS, DE_OSX_HASH, DE_OSX_DLR, DE_OSX_BSLS, DE_OSX_SLSH, KC_DOT,
- KC_TRNS, KC_TRNS, DE_OSX_LESS, DE_OSX_PERC, DE_OSX_PIPE, DE_OSX_TILD, KC_TRNS,
+ KC_TRNS, DE_LABK, DE_RABK, DE_EXLM, DE_QST, KC_TRNS, KC_TRNS,
+ KC_TRNS, DE_HASH, DE_DLR, DE_BSLS, DE_SLSH, KC_DOT,
+ KC_TRNS, KC_TRNS, DE_LABK, DE_PERC, DE_PIPE, DE_TILD, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_TRNS, KC_DEL, KC_TRNS,
//right half
KC_F6, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
- KC_TRNS, DE_OSX_BSLS, DE_OSX_LBRC, DE_OSX_RBRC, DE_OSX_LESS, DE_OSX_MORE, DE_OSX_EXLM,
- DE_OSX_SLSH, DE_OSX_LPRN, DE_OSX_RPRN, DE_OSX_LCBR, DE_OSX_RCBR, DE_OSX_HASH,
- KC_TRNS, DE_OSX_PIPE, DE_OSX_TILD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- DE_OSX_QUOT, DE_OSX_DQOT, KC_TRNS, M(M_TOGGLE_5), KC_TRNS,
+ KC_TRNS, DE_BSLS, DE_LBRC, DE_RBRC, DE_LABK, DE_RABK, DE_EXLM,
+ DE_SLSH, DE_LPRN, DE_RPRN, DE_LCBR, DE_RCBR, DE_HASH,
+ KC_TRNS, DE_PIPE, DE_TILD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ DE_QUOT, DE_DQUO, KC_TRNS, M(M_TOGGLE_5), KC_TRNS,
KC_F13, KC_F12,
KC_F14,
KC_F15, KC_TRNS, KC_TRNS),
@@ -317,10 +317,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS, KC_TRNS, KC_TRNS,
//right half
KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
- KC_TRNS, DE_OSX_SLSH, KC_7, KC_8, KC_9, DE_OSX_ASTR, KC_F12,
- DE_OSX_SLSH, KC_4, KC_5, KC_6, DE_OSX_PLUS, DE_OSX_MINS,
- KC_TRNS, DE_OSX_PERC, KC_1, KC_2, KC_3, KC_TRNS, KC_TRNS,
- KC_0, KC_DOT, KC_COMM, DE_OSX_EQL, KC_TRNS,
+ KC_TRNS, DE_SLSH, KC_7, KC_8, KC_9, DE_ASTR, KC_F12,
+ DE_SLSH, KC_4, KC_5, KC_6, DE_PLUS, DE_MINS,
+ KC_TRNS, DE_PERC, KC_1, KC_2, KC_3, KC_TRNS, KC_TRNS,
+ KC_0, KC_DOT, KC_COMM, DE_EQL, KC_TRNS,
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS),
@@ -394,7 +394,7 @@ if (record->event.pressed) {
if (timer_elapsed(start) >150) {
return MACRO_NONE;
} else {
- return MACRO(DOWN(KC_LSFT),TYPE(DE_OSX_HASH),UP(KC_LSFT),END);
+ return MACRO(DOWN(KC_LSFT),TYPE(DE_HASH),UP(KC_LSFT),END);
}
}
@@ -422,8 +422,8 @@ if (record->event.pressed){
return MACRO_NONE;
break;
-case M_DE_OSX_PLUS_CTRLALT:
-//Macro: M_DE_OSX_PLUS_CTRLALT//-----------------------
+case M_DE_PLUS_CTRLALT:
+//Macro: M_DE_PLUS_CTRLALT//-----------------------
if (record->event.pressed) {
start = timer_read();
return MACRO(DOWN(KC_LCTRL),DOWN(KC_LALT),END);
@@ -516,8 +516,8 @@ if (record->event.pressed) {
}
break;
-case M_DE_OSX_CIRC_CTRLCMD:
-//Macro: M_DE_OSX_CIRC_CTRLCMD//-----------------------
+case M_DE_CIRC_CTRLCMD:
+//Macro: M_DE_CIRC_CTRLCMD//-----------------------
if (record->event.pressed) {
start = timer_read();
return MACRO(DOWN(KC_LCTRL),DOWN(KC_LGUI),END);
@@ -539,7 +539,7 @@ if (record->event.pressed) {
if (timer_elapsed(start) >150) {
return MACRO(U(LCTRL),U(LSFT),U(LALT),END);
} else {
- return MACRO(UP(KC_LCTRL),UP(KC_LALT),TYPE(DE_OSX_ACUT),UP(KC_LSFT),END);
+ return MACRO(UP(KC_LCTRL),UP(KC_LALT),TYPE(DE_ACUT),UP(KC_LSFT),END);
}
}
diff --git a/layouts/community/ergodox/osx_fr/keymap.c b/layouts/community/ergodox/osx_fr/keymap.c
index 09ef0edb69..924e9ee8ae 100644
--- a/layouts/community/ergodox/osx_fr/keymap.c
+++ b/layouts/community/ergodox/osx_fr/keymap.c
@@ -34,17 +34,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// Otherwise, it needs KC_*
[BASE] = LAYOUT_ergodox( // layer 0 : default
// left hand
- FR_MINS, FR_AMP, FR_EACU, FR_QUOT, FR_APOS, FR_LPRN, KC_LEFT,
+ FR_MINS, FR_AMPR, FR_LEAC, FR_DQUO, FR_QUOT, FR_LPRN, KC_LEFT,
KC_DEL, FR_A, FR_Z, KC_E, KC_R, KC_T, TG(1),
KC_BSPC, FR_Q, KC_S, KC_D, KC_F, KC_G,
KC_LSFT, CTL_T(FR_W), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO),
- LT(SYMB,FR_UGRV), FR_LESS, LALT(KC_LSFT), KC_LEFT, KC_RGHT,
+ LT(SYMB,FR_LUGR), FR_LABK, LALT(KC_LSFT), KC_LEFT, KC_RGHT,
ALT_T(KC_APP), KC_LGUI,
KC_HOME,
KC_SPC, KC_BSPC, KC_END,
// right hand
- KC_RGHT, FR_SECT, FR_EGRV, FR_EXLM, FR_CCED, FR_AGRV, FR_RPRN,
+ KC_RGHT, FR_SECT, FR_LEGR, FR_EXLM, FR_LCCE, FR_LAGR, FR_RPRN,
TG(1), KC_Y, KC_U, KC_I, KC_O, KC_P, FR_GRV,
KC_H, KC_J, KC_K, KC_L, FR_M, KC_LGUI,
MEH_T(KC_NO), KC_N, FR_COMM, LT(MDIA, FR_SCLN), FR_COLN, CTL_T(FR_EQL), KC_RSFT,
@@ -89,7 +89,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
KC_TRNS, KC_UP, FR_7, FR_8, FR_9, FR_ASTR, KC_F12,
KC_DOWN, FR_4, FR_5, FR_6, FR_PLUS, KC_TRNS,
- KC_TRNS, FR_AMP, FR_1, FR_2, FR_3, FR_BSLS, KC_TRNS,
+ KC_TRNS, FR_AMPR, FR_1, FR_2, FR_3, FR_BSLS, KC_TRNS,
KC_TRNS,FR_COMM, FR_0, FR_EQL, KC_TRNS,
KC_TRNS, KC_TRNS,
KC_TRNS,
diff --git a/layouts/community/ergodox/osx_whiskey_tango_foxtrot_capslock/keymap.c b/layouts/community/ergodox/osx_whiskey_tango_foxtrot_capslock/keymap.c
index 729810705b..6bf0285ab6 100644
--- a/layouts/community/ergodox/osx_whiskey_tango_foxtrot_capslock/keymap.c
+++ b/layouts/community/ergodox/osx_whiskey_tango_foxtrot_capslock/keymap.c
@@ -49,7 +49,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
M(KC_CAPS), M(KC_A), M(KC_S), M(KC_D), M(KC_F), M(KC_G),
KC_LSFT, M(KC_Z), M(KC_X), M(KC_C), M(KC_V), M(KC_B), MO(SYMB),
KC_LCTL, KC_LALT, KC_LGUI, KC_LEFT, KC_RGHT,
- KC_TRNS, KC_FN1,
+ KC_TRNS, F(1),
KC_HOME,
KC_BSPC, KC_DEL, KC_END,
// right hand
@@ -91,7 +91,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
- KC_FN3, KC_FN2,
+ F(3), F(2),
KC_TRNS,
KC_TRNS,KC_TRNS,KC_TRNS,
// right hand
@@ -132,7 +132,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO,
- KC_FN4, KC_NO,
+ F(4), KC_NO,
KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS,
// right hand
diff --git a/layouts/community/ergodox/software_neo2/keymap.c b/layouts/community/ergodox/software_neo2/keymap.c
index 8f73376010..5f600a5ab5 100644
--- a/layouts/community/ergodox/software_neo2/keymap.c
+++ b/layouts/community/ergodox/software_neo2/keymap.c
@@ -34,20 +34,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// Otherwise, it needs KC_*
[BASE] = LAYOUT_ergodox( // layer 0 : default
// left hand
- KC_DEL, NEO_1, NEO_2, NEO_3, NEO_4, NEO_5, KC_MPLY,
- KC_TAB, NEO_X, NEO_V, NEO_L, NEO_C, NEO_W, KC_ESC,
- NEO_L1_L, NEO_U, NEO_I, NEO_A, NEO_E, NEO_O,
- KC_LSFT, CTL_T(NEO_UE), GUI_T(NEO_OE), ALT_T(NEO_AE), NEO_P, NEO_Z, TG(1),
- NEO_L2_L, KC_HOME, KC_PGDN, KC_PGUP, KC_END,
+ KC_DEL, NE_1, NE_2, NE_3, NE_4, NE_5, KC_MPLY,
+ KC_TAB, NE_X, NE_V, NE_L, NE_C, NE_W, KC_ESC,
+ NE_L3L, NE_U, NE_I, NE_A, NE_E, NE_O,
+ KC_LSFT, CTL_T(NE_UDIA), GUI_T(NE_ODIA), ALT_T(NE_ADIA), NE_P, NE_Z, TG(1),
+ NE_L4L, KC_HOME, KC_PGDN, KC_PGUP, KC_END,
C_S_T(KC_ESC),KC_LGUI,
KC_ENT,
KC_SPC,KC_BSPC,KC_TAB,
// right hand
- KC_MNXT, NEO_6, NEO_7, NEO_8, NEO_9, NEO_0, NEO_SS,
- KC_ESC, NEO_K, NEO_H, NEO_G, NEO_F, NEO_Q, NEO_Y,
- NEO_S, NEO_N, NEO_R, NEO_T, NEO_D, NEO_L1_R,
- TG(1), NEO_B, NEO_M, NEO_COMM, NEO_DOT, NEO_J, KC_RSFT,
- KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, NEO_L2_R,
+ KC_MNXT, NE_6, NE_7, NE_8, NE_9, NE_0, NE_SS,
+ KC_ESC, NE_K, NE_H, NE_G, NE_F, NE_Q, NE_Y,
+ NE_S, NE_N, NE_R, NE_T, NE_D, NE_L3R,
+ TG(1), NE_B, NE_M, NE_COMM, NE_DOT, NE_J, KC_RSFT,
+ KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, NE_L4R,
KC_LALT,KC_RGUI,
KC_DEL,
KC_ESC,KC_ENT, KC_SPC
diff --git a/layouts/community/ergodox/swedish-lindhe/keymap.c b/layouts/community/ergodox/swedish-lindhe/keymap.c
index 1b16c31d4d..368e216cdc 100644
--- a/layouts/community/ergodox/swedish-lindhe/keymap.c
+++ b/layouts/community/ergodox/swedish-lindhe/keymap.c
@@ -54,14 +54,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, MO(SYMB),
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, SE_ACUT,
- CTL_T(SE_APOS), SE_CIRC, SE_ASTR, KC_LALT, KC_LGUI,
+ CTL_T(SE_QUOT), SE_CIRC, SE_ASTR, KC_LALT, KC_LGUI,
KC_LCTRL, KC_LALT,
SE_TILD,
KC_SPC, KC_BSPC, KC_ESC,
// right hand
KC_MS_BTN3, KC_6, KC_7, KC_8, KC_9, KC_0, SE_PLUS,
- TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, SE_AA,
- KC_H, KC_J, KC_K, KC_L, SE_OSLH, SE_AE,
+ TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, SE_ARNG,
+ KC_H, KC_J, KC_K, KC_L, SE_ODIA, SE_ADIA,
KC_DEL, KC_N, KC_M, KC_COMM, KC_DOT, SE_MINS, KC_RSFT,
KC_ALGR, KC_DOWN, KC_UP, KC_LEFT, KC_RGHT,
KC_HOME, KC_END,
diff --git a/layouts/community/ergodox/swedish/keymap.c b/layouts/community/ergodox/swedish/keymap.c
index 8ef15d097d..90218aa886 100644
--- a/layouts/community/ergodox/swedish/keymap.c
+++ b/layouts/community/ergodox/swedish/keymap.c
@@ -66,14 +66,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_DEL, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB),
KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G,
KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO),
- LT(SYMB,SE_APOS), SE_ACUT, LALT(KC_LSFT), KC_LEFT, KC_RGHT,
+ LT(SYMB,SE_QUOT), SE_ACUT, LALT(KC_LSFT), KC_LEFT, KC_RGHT,
ALT_T(KC_APP), KC_LGUI,
KC_HOME,
KC_SPC,KC_BSPC,KC_END,
// right hand
KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, SE_PLUS,
- TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, SE_AA,
- KC_H, KC_J, KC_K, KC_L, LT(MDIA, SE_OSLH), GUI_T(SE_AE),
+ TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, SE_ARNG,
+ KC_H, KC_J, KC_K, KC_L, LT(MDIA, SE_ODIA), GUI_T(SE_ADIA),
MEH_T(KC_NO), KC_N, KC_M, KC_COMM, KC_DOT, CTL_T(SE_MINS), KC_RSFT,
KC_UP, KC_DOWN, SE_CIRC, SE_ASTR, TT(SYMB),
KC_ALGR, CTL_T(KC_ESC),
diff --git a/layouts/community/ergodox/workman_osx_mdw/keymap.c b/layouts/community/ergodox/workman_osx_mdw/keymap.c
index 81fd3984b3..f14d9cf4cd 100644
--- a/layouts/community/ergodox/workman_osx_mdw/keymap.c
+++ b/layouts/community/ergodox/workman_osx_mdw/keymap.c
@@ -55,7 +55,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
TG(1), KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_BSLS,
KC_Y, KC_N, KC_E, KC_O, KC_I, KC_QUOT,
MEH_T(KC_NO),KC_K, KC_L, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT,
- KC_LEFT,KC_DOWN,KC_UP, KC_RGHT, KC_FN4,
+ KC_LEFT,KC_DOWN,KC_UP, KC_RGHT, F(4),
KC_NO, KC_NO,
KC_PGUP,
KC_PGDN,KC_SPC,KC_ENT
diff --git a/layouts/community/ortho_4x12/bocaj/config.h b/layouts/community/ortho_4x12/bocaj/config.h
index 9a65684f35..c9d297f927 100644
--- a/layouts/community/ortho_4x12/bocaj/config.h
+++ b/layouts/community/ortho_4x12/bocaj/config.h
@@ -24,7 +24,7 @@
# define RGB_MATRIX_FRAMEBUFFER_EFFECTS
// #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
// #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
-# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
# undef RGB_MATRIX_LED_PROCESS_LIMIT
# undef RGB_MATRIX_LED_FLUSH_LIMIT
#endif
diff --git a/layouts/community/ortho_4x12/brandonschlack/keymap.c b/layouts/community/ortho_4x12/brandonschlack/keymap.c
index ea9d295064..4877a0b446 100644
--- a/layouts/community/ortho_4x12/brandonschlack/keymap.c
+++ b/layouts/community/ortho_4x12/brandonschlack/keymap.c
@@ -154,7 +154,7 @@ bool encoder_update_keymap(uint8_t index, bool clockwise) {
return true;
}
-void dip_switch_update_user(uint8_t index, bool active) {
+bool dip_switch_update_user(uint8_t index, bool active) {
switch (index) {
case 0: {
#ifdef AUDIO_ENABLE
@@ -183,6 +183,7 @@ void dip_switch_update_user(uint8_t index, bool active) {
muse_mode = false;
}
}
+ return true;
}
void matrix_scan_keymap(void) {
diff --git a/layouts/community/ortho_4x12/drashna/config.h b/layouts/community/ortho_4x12/drashna/config.h
index f4abd64f57..43143c3a3a 100644
--- a/layouts/community/ortho_4x12/drashna/config.h
+++ b/layouts/community/ortho_4x12/drashna/config.h
@@ -37,7 +37,7 @@
# define RGB_MATRIX_FRAMEBUFFER_EFFECTS
// #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
// #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
-# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
# undef RGB_MATRIX_LED_PROCESS_LIMIT
# undef RGB_MATRIX_LED_FLUSH_LIMIT
# ifdef KEYBOARD_planck_rev6
diff --git a/layouts/community/ortho_4x12/mguterl/keymap.c b/layouts/community/ortho_4x12/mguterl/keymap.c
index 66039b61e6..f18ae14d4a 100644
--- a/layouts/community/ortho_4x12/mguterl/keymap.c
+++ b/layouts/community/ortho_4x12/mguterl/keymap.c
@@ -290,7 +290,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
return true;
}
-void dip_switch_update_user(uint8_t index, bool active) {
+bool dip_switch_update_user(uint8_t index, bool active) {
switch (index) {
case 0: {
#ifdef AUDIO_ENABLE
@@ -319,6 +319,7 @@ void dip_switch_update_user(uint8_t index, bool active) {
muse_mode = false;
}
}
+ return true;
}
void matrix_scan_user(void) {
diff --git a/layouts/community/ortho_5x12/brandonschlack/keymap.c b/layouts/community/ortho_5x12/brandonschlack/keymap.c
index c9c94fc967..1b423157bc 100644
--- a/layouts/community/ortho_5x12/brandonschlack/keymap.c
+++ b/layouts/community/ortho_5x12/brandonschlack/keymap.c
@@ -149,7 +149,7 @@ bool encoder_update_keymap(uint8_t index, bool clockwise) {
return true;
}
-void dip_switch_update_user(uint8_t index, bool active) {
+bool dip_switch_update_user(uint8_t index, bool active) {
switch (index) {
case 0: {
#ifdef AUDIO_ENABLE
@@ -178,6 +178,7 @@ void dip_switch_update_user(uint8_t index, bool active) {
muse_mode = false;
}
}
+ return true;
}
diff --git a/layouts/community/split_3x6_3/drashna/config.h b/layouts/community/split_3x6_3/drashna/config.h
index dd950ce7bc..4a094e1954 100644
--- a/layouts/community/split_3x6_3/drashna/config.h
+++ b/layouts/community/split_3x6_3/drashna/config.h
@@ -31,11 +31,11 @@
#ifdef RGBLIGHT_ENABLE
# undef RGBLED_NUM
-# define RGBLED_NUM 27
+# define RGBLED_NUM 27
-# define RGBLIGHT_HUE_STEP 8
-# define RGBLIGHT_SAT_STEP 8
-# define RGBLIGHT_VAL_STEP 5
+# define RGBLIGHT_HUE_STEP 8
+# define RGBLIGHT_SAT_STEP 8
+# define RGBLIGHT_VAL_STEP 5
# define RGBLIGHT_LIMIT_VAL 120
#endif
@@ -44,37 +44,36 @@
# undef RGB_DI_PIN
# define RGB_DI_PIN A3
# endif
-# define RGB_MATRIX_KEYPRESSES // reacts to keypresses
+# define RGB_MATRIX_KEYPRESSES // reacts to keypresses
// # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
// # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
// # define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness)
// # 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 120 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
-# define RGB_MATRIX_HUE_STEP 8
-# define RGB_MATRIX_SAT_STEP 8
-# define RGB_MATRIX_VAL_STEP 5
-# define RGB_MATRIX_SPD_STEP 10
+# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 120 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
+# define RGB_MATRIX_HUE_STEP 8
+# define RGB_MATRIX_SAT_STEP 8
+# define RGB_MATRIX_VAL_STEP 5
+# define RGB_MATRIX_SPD_STEP 10
#endif
#ifdef CONVERT_TO_PROTON_C
-# define WS2812_PWM_DRIVER PWMD2 // default: PWMD2
-# define WS2812_PWM_CHANNEL 4 // default: 2
-# define WS2812_PWM_PAL_MODE 1 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 2
-# define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA Stream for TIMx_UP, see the respective reference manual for the appropriate values for your MCU.
-# define WS2812_DMA_CHANNEL 2 // DMA Channel for TIMx_UP, see the respective reference manual for the appropriate values for your MCU.
-# define WS2812_DMAMUX_ID STM32_DMAMUX1_TIM2_UP // DMAMUX configuration for TIMx_UP -- only required if your MCU has a DMAMUX peripheral, see the respective reference manual for the appropriate values for your MCU.
+# define WS2812_PWM_DRIVER PWMD2 // default: PWMD2
+# define WS2812_PWM_CHANNEL 4 // default: 2
+# define WS2812_PWM_PAL_MODE 1 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 2
+# define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA Stream for TIMx_UP, see the respective reference manual for the appropriate values for your MCU.
+# define WS2812_DMA_CHANNEL 2 // DMA Channel for TIMx_UP, see the respective reference manual for the appropriate values for your MCU.
+# define WS2812_DMAMUX_ID STM32_DMAMUX1_TIM2_UP // DMAMUX configuration for TIMx_UP -- only required if your MCU has a DMAMUX peripheral, see the respective reference manual for the appropriate values for your MCU.
# undef SOFT_SERIAL_PIN
-# define SOFT_SERIAL_PIN D3
-# define SERIAL_USART_DRIVER SD1 // USART driver of TX pin. default: SD1
-# define SERIAL_USART_TX_PAL_MODE 7 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 7
+# define SOFT_SERIAL_PIN D3
+# define SERIAL_USART_DRIVER SD1 // USART driver of TX pin. default: SD1
+# define SERIAL_USART_TX_PAL_MODE 7 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 7
// #define INIT_EE_HANDS_LEFT
// #define INIT_EE_HANDS_RIGHT
#endif
-
#if defined(AUDIO_ENABLE) && !defined(CONVERT_TO_PROTON_C)
# define AUDIO_PIN B6
# define NO_MUSIC_MODE
diff --git a/layouts/community/split_3x6_3/drashna/keymap.c b/layouts/community/split_3x6_3/drashna/keymap.c
index 5a2d2f2e27..e46b626ef9 100644
--- a/layouts/community/split_3x6_3/drashna/keymap.c
+++ b/layouts/community/split_3x6_3/drashna/keymap.c
@@ -114,7 +114,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// clang-format on
#ifdef OLED_DRIVER_ENABLE
-oled_rotation_t oled_init_user(oled_rotation_t rotation) {
+oled_rotation_t oled_init_keymap(oled_rotation_t rotation) {
return OLED_ROTATION_270;
}
#endif
diff --git a/layouts/default/60_abnt2/default_60_abnt2/keymap.c b/layouts/default/60_abnt2/default_60_abnt2/keymap.c
index 919a972f6c..00b9a8de26 100644
--- a/layouts/default/60_abnt2/default_60_abnt2/keymap.c
+++ b/layouts/default/60_abnt2/default_60_abnt2/keymap.c
@@ -19,7 +19,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_60_abnt2(
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_BSPC,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, BR_ACUT, BR_LBRC,
- KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, BR_CCDL, BR_TILD, BR_RBRC, KC_ENT,
+ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, BR_CCED, BR_TILD, BR_RBRC, KC_ENT,
KC_LSFT, BR_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, BR_SCLN, BR_SLSH, KC_RSFT,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL
),
diff --git a/lib/chibios b/lib/chibios
-Subproject ffe54d63cb10a355add318f8e922e39f1c3d4bf
+Subproject 413e39c5681d181720440f2a8b7391f581788d7
diff --git a/lib/chibios-contrib b/lib/chibios-contrib
-Subproject 61baa6b036138c155f7cfc5646d833d9423f324
+Subproject 9c2bfa6aeba993345f5425d82807c101f8e25e6
diff --git a/lib/python/qmk/cli/__init__.py b/lib/python/qmk/cli/__init__.py
index 1e1c266710..91d42bb3a2 100644
--- a/lib/python/qmk/cli/__init__.py
+++ b/lib/python/qmk/cli/__init__.py
@@ -50,6 +50,7 @@ subcommands = [
'qmk.cli.generate.layouts',
'qmk.cli.generate.rgb_breathe_table',
'qmk.cli.generate.rules_mk',
+ 'qmk.cli.generate.version_h',
'qmk.cli.hello',
'qmk.cli.info',
'qmk.cli.json2c',
diff --git a/lib/python/qmk/cli/doctor/__init__.py b/lib/python/qmk/cli/doctor/__init__.py
new file mode 100755
index 0000000000..272e042023
--- /dev/null
+++ b/lib/python/qmk/cli/doctor/__init__.py
@@ -0,0 +1,5 @@
+"""QMK Doctor
+
+Check out the user's QMK environment and make sure it's ready to compile.
+"""
+from .main import doctor
diff --git a/lib/python/qmk/os_helpers/__init__.py b/lib/python/qmk/cli/doctor/check.py
index 3e98db3c32..a0bbb28168 100644
--- a/lib/python/qmk/os_helpers/__init__.py
+++ b/lib/python/qmk/cli/doctor/check.py
@@ -1,4 +1,4 @@
-"""OS-agnostic helper functions
+"""Check for specific programs.
"""
from enum import Enum
import re
@@ -30,7 +30,7 @@ ESSENTIAL_BINARIES = {
}
-def parse_gcc_version(version):
+def _parse_gcc_version(version):
m = re.match(r"(\d+)(?:\.(\d+))?(?:\.(\d+))?", version)
return {
@@ -40,7 +40,7 @@ def parse_gcc_version(version):
}
-def check_arm_gcc_version():
+def _check_arm_gcc_version():
"""Returns True if the arm-none-eabi-gcc version is not known to cause problems.
"""
if 'output' in ESSENTIAL_BINARIES['arm-none-eabi-gcc']:
@@ -50,7 +50,7 @@ def check_arm_gcc_version():
return CheckStatus.OK # Right now all known arm versions are ok
-def check_avr_gcc_version():
+def _check_avr_gcc_version():
"""Returns True if the avr-gcc version is not known to cause problems.
"""
rc = CheckStatus.ERROR
@@ -60,7 +60,7 @@ def check_avr_gcc_version():
cli.log.info('Found avr-gcc version %s', version_number)
rc = CheckStatus.OK
- parsed_version = parse_gcc_version(version_number)
+ parsed_version = _parse_gcc_version(version_number)
if parsed_version['major'] > 8:
cli.log.warning('{fg_yellow}We do not recommend avr-gcc newer than 8. Downgrading to 8.x is recommended.')
rc = CheckStatus.WARNING
@@ -68,7 +68,7 @@ def check_avr_gcc_version():
return rc
-def check_avrdude_version():
+def _check_avrdude_version():
if 'output' in ESSENTIAL_BINARIES['avrdude']:
last_line = ESSENTIAL_BINARIES['avrdude']['output'].split('\n')[-2]
version_number = last_line.split()[2][:-1]
@@ -77,7 +77,7 @@ def check_avrdude_version():
return CheckStatus.OK
-def check_dfu_util_version():
+def _check_dfu_util_version():
if 'output' in ESSENTIAL_BINARIES['dfu-util']:
first_line = ESSENTIAL_BINARIES['dfu-util']['output'].split('\n')[0]
version_number = first_line.split()[1]
@@ -86,7 +86,7 @@ def check_dfu_util_version():
return CheckStatus.OK
-def check_dfu_programmer_version():
+def _check_dfu_programmer_version():
if 'output' in ESSENTIAL_BINARIES['dfu-programmer']:
first_line = ESSENTIAL_BINARIES['dfu-programmer']['output'].split('\n')[0]
version_number = first_line.split()[1]
@@ -111,7 +111,7 @@ def check_binary_versions():
"""Check the versions of ESSENTIAL_BINARIES
"""
versions = []
- for check in (check_arm_gcc_version, check_avr_gcc_version, check_avrdude_version, check_dfu_util_version, check_dfu_programmer_version):
+ for check in (_check_arm_gcc_version, _check_avr_gcc_version, _check_avrdude_version, _check_dfu_util_version, _check_dfu_programmer_version):
versions.append(check())
return versions
diff --git a/lib/python/qmk/os_helpers/linux/__init__.py b/lib/python/qmk/cli/doctor/linux.py
index 008654ab0f..c0b77216a1 100644
--- a/lib/python/qmk/os_helpers/linux/__init__.py
+++ b/lib/python/qmk/cli/doctor/linux.py
@@ -1,11 +1,13 @@
"""OS-specific functions for: Linux
"""
-from pathlib import Path
+import platform
import shutil
+from pathlib import Path
from milc import cli
+
from qmk.constants import QMK_FIRMWARE
-from qmk.os_helpers import CheckStatus
+from .check import CheckStatus
def _udev_rule(vid, pid=None, *args):
@@ -138,3 +140,23 @@ def check_modem_manager():
"""(TODO): Add check for non-systemd systems
"""
return False
+
+
+def os_test_linux():
+ """Run the Linux specific tests.
+ """
+ # Don't bother with udev on WSL, for now
+ if 'microsoft' in platform.uname().release.lower():
+ cli.log.info("Detected {fg_cyan}Linux (WSL){fg_reset}.")
+
+ # https://github.com/microsoft/WSL/issues/4197
+ if QMK_FIRMWARE.as_posix().startswith("/mnt"):
+ cli.log.warning("I/O performance on /mnt may be extremely slow.")
+ return CheckStatus.WARNING
+
+ return CheckStatus.OK
+ else:
+ cli.log.info("Detected {fg_cyan}Linux{fg_reset}.")
+ from .linux import check_udev_rules
+
+ return check_udev_rules()
diff --git a/lib/python/qmk/cli/doctor/macos.py b/lib/python/qmk/cli/doctor/macos.py
new file mode 100644
index 0000000000..00fb272858
--- /dev/null
+++ b/lib/python/qmk/cli/doctor/macos.py
@@ -0,0 +1,13 @@
+import platform
+
+from milc import cli
+
+from .check import CheckStatus
+
+
+def os_test_macos():
+ """Run the Mac specific tests.
+ """
+ cli.log.info("Detected {fg_cyan}macOS %s{fg_reset}.", platform.mac_ver()[0])
+
+ return CheckStatus.OK
diff --git a/lib/python/qmk/cli/doctor.py b/lib/python/qmk/cli/doctor/main.py
index 327bc9cb30..6a31ccdfdd 100755
--- a/lib/python/qmk/cli/doctor.py
+++ b/lib/python/qmk/cli/doctor/main.py
@@ -7,9 +7,11 @@ from subprocess import DEVNULL
from milc import cli
from milc.questions import yesno
+
from qmk import submodules
-from qmk.constants import QMK_FIRMWARE
-from qmk.os_helpers import CheckStatus, check_binaries, check_binary_versions, check_submodules, check_git_repo
+from qmk.constants import QMK_FIRMWARE, QMK_FIRMWARE_UPSTREAM
+from .check import CheckStatus, check_binaries, check_binary_versions, check_submodules
+from qmk.commands import git_check_repo, git_get_branch, git_is_dirty, git_get_remotes, git_check_deviation, in_virtualenv
def os_tests():
@@ -18,51 +20,48 @@ def os_tests():
platform_id = platform.platform().lower()
if 'darwin' in platform_id or 'macos' in platform_id:
+ from .macos import os_test_macos
return os_test_macos()
elif 'linux' in platform_id:
+ from .linux import os_test_linux
return os_test_linux()
elif 'windows' in platform_id:
+ from .windows import os_test_windows
return os_test_windows()
else:
cli.log.warning('Unsupported OS detected: %s', platform_id)
return CheckStatus.WARNING
-def os_test_linux():
- """Run the Linux specific tests.
+def git_tests():
+ """Run Git-related checks
"""
- # Don't bother with udev on WSL, for now
- if 'microsoft' in platform.uname().release.lower():
- cli.log.info("Detected {fg_cyan}Linux (WSL){fg_reset}.")
-
- # https://github.com/microsoft/WSL/issues/4197
- if QMK_FIRMWARE.as_posix().startswith("/mnt"):
- cli.log.warning("I/O performance on /mnt may be extremely slow.")
- return CheckStatus.WARNING
+ status = CheckStatus.OK
- return CheckStatus.OK
+ # Make sure our QMK home is a Git repo
+ git_ok = git_check_repo()
+ if not git_ok:
+ cli.log.warning("{fg_yellow}QMK home does not appear to be a Git repository! (no .git folder)")
+ status = CheckStatus.WARNING
else:
- cli.log.info("Detected {fg_cyan}Linux{fg_reset}.")
- from qmk.os_helpers.linux import check_udev_rules
-
- return check_udev_rules()
-
-
-def os_test_macos():
- """Run the Mac specific tests.
- """
- cli.log.info("Detected {fg_cyan}macOS %s{fg_reset}.", platform.mac_ver()[0])
-
- return CheckStatus.OK
-
-
-def os_test_windows():
- """Run the Windows specific tests.
- """
- win32_ver = platform.win32_ver()
- cli.log.info("Detected {fg_cyan}Windows %s (%s){fg_reset}.", win32_ver[0], win32_ver[1])
-
- return CheckStatus.OK
+ git_branch = git_get_branch()
+ if git_branch:
+ cli.log.info('Git branch: %s', git_branch)
+ git_dirty = git_is_dirty()
+ if git_dirty:
+ cli.log.warning('{fg_yellow}Git has unstashed/uncommitted changes.')
+ status = CheckStatus.WARNING
+ git_remotes = git_get_remotes()
+ if 'upstream' not in git_remotes.keys() or QMK_FIRMWARE_UPSTREAM not in git_remotes['upstream'].get('url', ''):
+ cli.log.warning('{fg_yellow}The official repository does not seem to be configured as git remote "upstream".')
+ status = CheckStatus.WARNING
+ else:
+ git_deviation = git_check_deviation(git_branch)
+ if git_branch in ['master', 'develop'] and git_deviation:
+ cli.log.warning('{fg_yellow}The local "%s" branch contains commits not found in the upstream branch.', git_branch)
+ status = CheckStatus.WARNING
+
+ return status
@cli.argument('-y', '--yes', action='store_true', arg_only=True, help='Answer yes to all questions.')
@@ -82,12 +81,11 @@ def doctor(cli):
status = os_tests()
- # Make sure our QMK home is a Git repo
- git_ok = check_git_repo()
+ status = git_tests()
- if git_ok == CheckStatus.WARNING:
- cli.log.warning("QMK home does not appear to be a Git repository! (no .git folder)")
- status = CheckStatus.WARNING
+ venv = in_virtualenv()
+ if venv:
+ cli.log.info('CLI installed in virtualenv.')
# Make sure the basic CLI tools we need are available and can be executed.
bin_ok = check_binaries()
diff --git a/lib/python/qmk/cli/doctor/windows.py b/lib/python/qmk/cli/doctor/windows.py
new file mode 100644
index 0000000000..381ab36fde
--- /dev/null
+++ b/lib/python/qmk/cli/doctor/windows.py
@@ -0,0 +1,14 @@
+import platform
+
+from milc import cli
+
+from .check import CheckStatus
+
+
+def os_test_windows():
+ """Run the Windows specific tests.
+ """
+ win32_ver = platform.win32_ver()
+ cli.log.info("Detected {fg_cyan}Windows %s (%s){fg_reset}.", win32_ver[0], win32_ver[1])
+
+ return CheckStatus.OK
diff --git a/lib/python/qmk/cli/format/json.py b/lib/python/qmk/cli/format/json.py
index 1358c70e7a..19d504491f 100755
--- a/lib/python/qmk/cli/format/json.py
+++ b/lib/python/qmk/cli/format/json.py
@@ -8,7 +8,7 @@ from jsonschema import ValidationError
from milc import cli
from qmk.info import info_json
-from qmk.json_schema import json_load, keyboard_validate
+from qmk.json_schema import json_load, validate
from qmk.json_encoders import InfoJSONEncoder, KeymapJSONEncoder
from qmk.path import normpath
@@ -23,14 +23,13 @@ def format_json(cli):
if cli.args.format == 'auto':
try:
- keyboard_validate(json_file)
+ validate(json_file, 'qmk.keyboard.v1')
json_encoder = InfoJSONEncoder
except ValidationError as e:
cli.log.warning('File %s did not validate as a keyboard:\n\t%s', cli.args.json_file, e)
cli.log.info('Treating %s as a keymap file.', cli.args.json_file)
json_encoder = KeymapJSONEncoder
-
elif cli.args.format == 'keyboard':
json_encoder = InfoJSONEncoder
elif cli.args.format == 'keymap':
diff --git a/lib/python/qmk/cli/generate/version_h.py b/lib/python/qmk/cli/generate/version_h.py
new file mode 100644
index 0000000000..b8e52588c4
--- /dev/null
+++ b/lib/python/qmk/cli/generate/version_h.py
@@ -0,0 +1,28 @@
+"""Used by the make system to generate version.h for use in code.
+"""
+from milc import cli
+
+from qmk.commands import create_version_h
+from qmk.path import normpath
+
+
+@cli.argument('-o', '--output', arg_only=True, type=normpath, help='File to write to')
+@cli.argument('-q', '--quiet', arg_only=True, action='store_true', help="Quiet mode, only output error messages")
+@cli.argument('--skip-git', arg_only=True, action='store_true', help='Skip Git operations')
+@cli.argument('--skip-all', arg_only=True, action='store_true', help='Use placeholder values for all defines (implies --skip-git)')
+@cli.subcommand('Used by the make system to generate version.h for use in code', hidden=True)
+def generate_version_h(cli):
+ """Generates the version.h file.
+ """
+ if cli.args.skip_all:
+ cli.args.skip_git = True
+
+ version_h = create_version_h(cli.args.skip_git, cli.args.skip_all)
+
+ if cli.args.output:
+ cli.args.output.write_text(version_h)
+
+ if not cli.args.quiet:
+ cli.log.info('Wrote version.h to %s.', cli.args.output)
+ else:
+ print(version_h)
diff --git a/lib/python/qmk/commands.py b/lib/python/qmk/commands.py
index 3a35c11031..8ff8501bf6 100644
--- a/lib/python/qmk/commands.py
+++ b/lib/python/qmk/commands.py
@@ -2,6 +2,7 @@
"""
import json
import os
+import sys
import shutil
from pathlib import Path
from subprocess import DEVNULL
@@ -10,7 +11,7 @@ from time import strftime
from milc import cli
import qmk.keymap
-from qmk.constants import KEYBOARD_OUTPUT_PREFIX
+from qmk.constants import QMK_FIRMWARE, KEYBOARD_OUTPUT_PREFIX
from qmk.json_schema import json_load
time_fmt = '%Y-%m-%d-%H:%M:%S'
@@ -86,11 +87,17 @@ def create_make_command(keyboard, keymap, target=None, parallel=1, **env_vars):
return create_make_target(':'.join(make_args), parallel, **env_vars)
-def get_git_version(repo_dir='.', check_dir='.'):
+def get_git_version(current_time, repo_dir='.', check_dir='.'):
"""Returns the current git version for a repo, or the current time.
"""
git_describe_cmd = ['git', 'describe', '--abbrev=6', '--dirty', '--always', '--tags']
+ if repo_dir != '.':
+ repo_dir = Path('lib') / repo_dir
+
+ if check_dir != '.':
+ check_dir = repo_dir / check_dir
+
if Path(check_dir).exists():
git_describe = cli.run(git_describe_cmd, stdin=DEVNULL, cwd=repo_dir)
@@ -100,23 +107,40 @@ def get_git_version(repo_dir='.', check_dir='.'):
else:
cli.log.warn(f'"{" ".join(git_describe_cmd)}" returned error code {git_describe.returncode}')
print(git_describe.stderr)
- return strftime(time_fmt)
+ return current_time
- return strftime(time_fmt)
+ return current_time
-def write_version_h(git_version, build_date, chibios_version, chibios_contrib_version):
- """Generate and write quantum/version.h
+def create_version_h(skip_git=False, skip_all=False):
+ """Generate version.h contents
"""
- version_h = [
- f'#define QMK_VERSION "{git_version}"',
- f'#define QMK_BUILDDATE "{build_date}"',
- f'#define CHIBIOS_VERSION "{chibios_version}"',
- f'#define CHIBIOS_CONTRIB_VERSION "{chibios_contrib_version}"',
- ]
+ if skip_all:
+ current_time = "1970-01-01-00:00:00"
+ else:
+ current_time = strftime(time_fmt)
+
+ if skip_git:
+ git_version = "NA"
+ chibios_version = "NA"
+ chibios_contrib_version = "NA"
+ else:
+ git_version = get_git_version(current_time)
+ chibios_version = get_git_version(current_time, "chibios", "os")
+ chibios_contrib_version = get_git_version(current_time, "chibios-contrib", "os")
+
+ version_h_lines = f"""/* This file was automatically generated. Do not edit or copy.
+ */
+
+#pragma once
+
+#define QMK_VERSION "{git_version}"
+#define QMK_BUILDDATE "{current_time}"
+#define CHIBIOS_VERSION "{chibios_version}"
+#define CHIBIOS_CONTRIB_VERSION "{chibios_contrib_version}"
+"""
- version_h_file = Path('quantum/version.h')
- version_h_file.write_text('\n'.join(version_h))
+ return version_h_lines
def compile_configurator_json(user_keymap, bootloader=None, parallel=1, **env_vars):
@@ -149,13 +173,8 @@ def compile_configurator_json(user_keymap, bootloader=None, parallel=1, **env_va
keymap_dir.mkdir(exist_ok=True, parents=True)
keymap_c.write_text(c_text)
- # Write the version.h file
- git_version = get_git_version()
- build_date = strftime('%Y-%m-%d-%H:%M:%S')
- chibios_version = get_git_version("lib/chibios", "lib/chibios/os")
- chibios_contrib_version = get_git_version("lib/chibios-contrib", "lib/chibios-contrib/os")
-
- write_version_h(git_version, build_date, chibios_version, chibios_contrib_version)
+ version_h = Path('quantum/version.h')
+ version_h.write_text(create_version_h())
# Return a command that can be run to make the keymap and flash if given
verbose = 'true' if cli.config.general.verbose else 'false'
@@ -181,10 +200,6 @@ def compile_configurator_json(user_keymap, bootloader=None, parallel=1, **env_va
make_command.append(f'{key}={value}')
make_command.extend([
- f'GIT_VERSION={git_version}',
- f'BUILD_DATE={build_date}',
- f'CHIBIOS_VERSION={chibios_version}',
- f'CHIBIOS_CONTRIB_VERSION={chibios_contrib_version}',
f'KEYBOARD={user_keymap["keyboard"]}',
f'KEYMAP={user_keymap["keymap"]}',
f'KEYBOARD_FILESAFE={keyboard_filesafe}',
@@ -223,3 +238,71 @@ def parse_configurator_json(configurator_file):
user_keymap['layout'] = aliases[orig_keyboard]['layouts'][user_keymap['layout']]
return user_keymap
+
+
+def git_check_repo():
+ """Checks that the .git directory exists inside QMK_HOME.
+
+ This is a decent enough indicator that the qmk_firmware directory is a
+ proper Git repository, rather than a .zip download from GitHub.
+ """
+ dot_git_dir = QMK_FIRMWARE / '.git'
+
+ return dot_git_dir.is_dir()
+
+
+def git_get_branch():
+ """Returns the current branch for a repo, or None.
+ """
+ git_branch = cli.run(['git', 'branch', '--show-current'])
+ if not git_branch.returncode != 0 or not git_branch.stdout:
+ # Workaround for Git pre-2.22
+ git_branch = cli.run(['git', 'rev-parse', '--abbrev-ref', 'HEAD'])
+
+ if git_branch.returncode == 0:
+ return git_branch.stdout.strip()
+
+
+def git_is_dirty():
+ """Returns 1 if repo is dirty, or 0 if clean
+ """
+ git_diff_staged_cmd = ['git', 'diff', '--quiet']
+ git_diff_unstaged_cmd = [*git_diff_staged_cmd, '--cached']
+
+ unstaged = cli.run(git_diff_staged_cmd)
+ staged = cli.run(git_diff_unstaged_cmd)
+
+ return unstaged.returncode != 0 or staged.returncode != 0
+
+
+def git_get_remotes():
+ """Returns the current remotes for a repo.
+ """
+ remotes = {}
+
+ git_remote_show_cmd = ['git', 'remote', 'show']
+ git_remote_get_cmd = ['git', 'remote', 'get-url']
+
+ git_remote_show = cli.run(git_remote_show_cmd)
+ if git_remote_show.returncode == 0:
+ for name in git_remote_show.stdout.splitlines():
+ git_remote_name = cli.run([*git_remote_get_cmd, name])
+ remotes[name.strip()] = {"url": git_remote_name.stdout.strip()}
+
+ return remotes
+
+
+def git_check_deviation(active_branch):
+ """Return True if branch has custom commits
+ """
+ cli.run(['git', 'fetch', 'upstream', active_branch])
+ deviations = cli.run(['git', '--no-pager', 'log', f'upstream/{active_branch}...{active_branch}'])
+ return bool(deviations.returncode)
+
+
+def in_virtualenv():
+ """Check if running inside a virtualenv.
+ Based on https://stackoverflow.com/a/1883251
+ """
+ active_prefix = getattr(sys, "base_prefix", None) or getattr(sys, "real_prefix", None) or sys.prefix
+ return active_prefix != sys.prefix
diff --git a/lib/python/qmk/constants.py b/lib/python/qmk/constants.py
index 49e5e0eb42..1078f4ad5e 100644
--- a/lib/python/qmk/constants.py
+++ b/lib/python/qmk/constants.py
@@ -6,11 +6,14 @@ from pathlib import Path
# The root of the qmk_firmware tree.
QMK_FIRMWARE = Path.cwd()
+# Upstream repo url
+QMK_FIRMWARE_UPSTREAM = 'qmk/qmk_firmware'
+
# This is the number of directories under `qmk_firmware/keyboards` that will be traversed. This is currently a limitation of our make system.
MAX_KEYBOARD_SUBFOLDERS = 5
# Supported processor types
-CHIBIOS_PROCESSORS = 'cortex-m0', 'cortex-m0plus', 'cortex-m3', 'cortex-m4', 'MKL26Z64', 'MK20DX128', 'MK20DX256', 'MK66F18', 'STM32F042', 'STM32F072', 'STM32F103', 'STM32F303', 'STM32F401', 'STM32F411', 'STM32F446', 'STM32G431', 'STM32G474', 'STM32L433', 'STM32L443'
+CHIBIOS_PROCESSORS = 'cortex-m0', 'cortex-m0plus', 'cortex-m3', 'cortex-m4', 'MKL26Z64', 'MK20DX128', 'MK20DX256', 'MK66F18', 'STM32F042', 'STM32F072', 'STM32F103', 'STM32F303', 'STM32F401', 'STM32F411', 'STM32F446', 'STM32G431', 'STM32G474', 'STM32L412', 'STM32L422', 'STM32L433', 'STM32L443'
LUFA_PROCESSORS = 'at90usb162', 'atmega16u2', 'atmega32u2', 'atmega16u4', 'atmega32u4', 'at90usb646', 'at90usb647', 'at90usb1286', 'at90usb1287', None
VUSB_PROCESSORS = 'atmega32a', 'atmega328p', 'atmega328', 'attiny85'
diff --git a/lib/python/qmk/info.py b/lib/python/qmk/info.py
index 47c8bff7a8..bcb4d81ef2 100644
--- a/lib/python/qmk/info.py
+++ b/lib/python/qmk/info.py
@@ -9,7 +9,7 @@ from milc import cli
from qmk.constants import CHIBIOS_PROCESSORS, LUFA_PROCESSORS, VUSB_PROCESSORS
from qmk.c_parse import find_layouts
-from qmk.json_schema import deep_update, json_load, keyboard_validate, keyboard_api_validate
+from qmk.json_schema import deep_update, json_load, validate
from qmk.keyboard import config_h, rules_mk
from qmk.keymap import list_keymaps
from qmk.makefile import parse_rules_mk_file
@@ -64,9 +64,12 @@ def info_json(keyboard):
info_data = _extract_config_h(info_data)
info_data = _extract_rules_mk(info_data)
+ # Ensure that we have matrix row and column counts
+ info_data = _matrix_size(info_data)
+
# Validate against the jsonschema
try:
- keyboard_api_validate(info_data)
+ validate(info_data, 'qmk.api.keyboard.v1')
except jsonschema.ValidationError as e:
json_path = '.'.join([str(p) for p in e.absolute_path])
@@ -90,6 +93,9 @@ def info_json(keyboard):
if layout_name not in info_data.get('layouts', {}) and layout_name not in info_data.get('layout_aliases', {}):
_log_error(info_data, 'Claims to support community layout %s but no %s() macro found' % (layout, layout_name))
+ # Check that the reported matrix size is consistent with the actual matrix size
+ _check_matrix(info_data)
+
return info_data
@@ -143,10 +149,7 @@ def _pin_name(pin):
elif pin == 'NO_PIN':
return None
- elif pin[0] in 'ABCDEFGHIJK' and pin[1].isdigit():
- return pin
-
- raise ValueError(f'Invalid pin: {pin}')
+ return pin
def _extract_pins(pins):
@@ -341,6 +344,46 @@ def _extract_rules_mk(info_data):
return info_data
+def _matrix_size(info_data):
+ """Add info_data['matrix_size'] if it doesn't exist.
+ """
+ if 'matrix_size' not in info_data and 'matrix_pins' in info_data:
+ info_data['matrix_size'] = {}
+
+ if 'direct' in info_data['matrix_pins']:
+ info_data['matrix_size']['cols'] = len(info_data['matrix_pins']['direct'][0])
+ info_data['matrix_size']['rows'] = len(info_data['matrix_pins']['direct'])
+ elif 'cols' in info_data['matrix_pins'] and 'rows' in info_data['matrix_pins']:
+ info_data['matrix_size']['cols'] = len(info_data['matrix_pins']['cols'])
+ info_data['matrix_size']['rows'] = len(info_data['matrix_pins']['rows'])
+
+ return info_data
+
+
+def _check_matrix(info_data):
+ """Check the matrix to ensure that row/column count is consistent.
+ """
+ if 'matrix_pins' in info_data and 'matrix_size' in info_data:
+ actual_col_count = info_data['matrix_size'].get('cols', 0)
+ actual_row_count = info_data['matrix_size'].get('rows', 0)
+ col_count = row_count = 0
+
+ if 'direct' in info_data['matrix_pins']:
+ col_count = len(info_data['matrix_pins']['direct'][0])
+ row_count = len(info_data['matrix_pins']['direct'])
+ elif 'cols' in info_data['matrix_pins'] and 'rows' in info_data['matrix_pins']:
+ col_count = len(info_data['matrix_pins']['cols'])
+ row_count = len(info_data['matrix_pins']['rows'])
+
+ if col_count != actual_col_count and col_count != (actual_col_count / 2):
+ # FIXME: once we can we should detect if split is enabled to do the actual_col_count/2 check.
+ _log_error(info_data, f'MATRIX_COLS is inconsistent with the size of MATRIX_COL_PINS: {col_count} != {actual_col_count}')
+
+ if row_count != actual_row_count and row_count != (actual_row_count / 2):
+ # FIXME: once we can we should detect if split is enabled to do the actual_row_count/2 check.
+ _log_error(info_data, f'MATRIX_ROWS is inconsistent with the size of MATRIX_ROW_PINS: {row_count} != {actual_row_count}')
+
+
def _merge_layouts(info_data, new_info_data):
"""Merge new_info_data into info_data in an intelligent way.
"""
@@ -493,7 +536,7 @@ def merge_info_jsons(keyboard, info_data):
continue
try:
- keyboard_validate(new_info_data)
+ validate(new_info_data, 'qmk.keyboard.v1')
except jsonschema.ValidationError as e:
json_path = '.'.join([str(p) for p in e.absolute_path])
cli.log.error('Not including data from file: %s', info_file)
diff --git a/lib/python/qmk/json_schema.py b/lib/python/qmk/json_schema.py
index 077dfcaa93..3e5663a291 100644
--- a/lib/python/qmk/json_schema.py
+++ b/lib/python/qmk/json_schema.py
@@ -24,9 +24,10 @@ def json_load(json_file):
def load_jsonschema(schema_name):
"""Read a jsonschema file from disk.
-
- FIXME(skullydazed/anyone): Refactor to make this a public function.
"""
+ if Path(schema_name).exists():
+ return json_load(schema_name)
+
schema_path = Path(f'data/schemas/{schema_name}.jsonschema')
if not schema_path.exists():
@@ -35,28 +36,33 @@ def load_jsonschema(schema_name):
return json_load(schema_path)
-def keyboard_validate(data):
- """Validates data against the keyboard jsonschema.
+def create_validator(schema):
+ """Creates a validator for the given schema id.
"""
- schema = load_jsonschema('keyboard')
- validator = jsonschema.Draft7Validator(schema).validate
+ schema_store = {}
- return validator(data)
+ for schema_file in Path('data/schemas').glob('*.jsonschema'):
+ schema_data = load_jsonschema(schema_file)
+ if not isinstance(schema_data, dict):
+ cli.log.debug('Skipping schema file %s', schema_file)
+ continue
+ schema_store[schema_data['$id']] = schema_data
+
+ resolver = jsonschema.RefResolver.from_schema(schema_store['qmk.keyboard.v1'], store=schema_store)
+
+ return jsonschema.Draft7Validator(schema_store[schema], resolver=resolver).validate
-def keyboard_api_validate(data):
- """Validates data against the api_keyboard jsonschema.
+def validate(data, schema):
+ """Validates data against a schema.
"""
- base = load_jsonschema('keyboard')
- relative = load_jsonschema('api_keyboard')
- resolver = jsonschema.RefResolver.from_schema(base)
- validator = jsonschema.Draft7Validator(relative, resolver=resolver).validate
+ validator = create_validator(schema)
return validator(data)
def deep_update(origdict, newdict):
- """Update a dictionary in place, recursing to do a deep copy.
+ """Update a dictionary in place, recursing to do a depth-first deep copy.
"""
for key, value in newdict.items():
if isinstance(value, Mapping):
diff --git a/lib/python/qmk/tests/test_cli_commands.py b/lib/python/qmk/tests/test_cli_commands.py
index afdbc81429..b341e1c912 100644
--- a/lib/python/qmk/tests/test_cli_commands.py
+++ b/lib/python/qmk/tests/test_cli_commands.py
@@ -258,6 +258,12 @@ def test_generate_rules_mk():
assert 'MCU ?= atmega32u4' in result.stdout
+def test_generate_version_h():
+ result = check_subcommand('generate-version-h')
+ check_returncode(result)
+ assert '#define QMK_VERSION' in result.stdout
+
+
def test_generate_layouts():
result = check_subcommand('generate-layouts', '-kb', 'handwired/pytest/basic')
check_returncode(result)
diff --git a/platforms/chibios/GENERIC_STM32_L412XB/board/board.mk b/platforms/chibios/GENERIC_STM32_L412XB/board/board.mk
new file mode 100644
index 0000000000..1250385eb8
--- /dev/null
+++ b/platforms/chibios/GENERIC_STM32_L412XB/board/board.mk
@@ -0,0 +1,9 @@
+# List of all the board related files.
+BOARDSRC = $(CHIBIOS)/os/hal/boards/ST_NUCLEO32_L432KC/board.c
+
+# Required include directories
+BOARDINC = $(CHIBIOS)/os/hal/boards/ST_NUCLEO32_L432KC
+
+# Shared variables
+ALLCSRC += $(BOARDSRC)
+ALLINC += $(BOARDINC)
diff --git a/platforms/chibios/GENERIC_STM32_L412XB/configs/board.h b/platforms/chibios/GENERIC_STM32_L412XB/configs/board.h
new file mode 100644
index 0000000000..2e37d95fe3
--- /dev/null
+++ b/platforms/chibios/GENERIC_STM32_L412XB/configs/board.h
@@ -0,0 +1,24 @@
+/* Copyright 2018-2021 Harrison Chan (@Xelus)
+ *
+ * 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 3 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 <https://www.gnu.org/licenses/>.
+ */
+#pragma once
+
+#include_next "board.h"
+
+#undef STM32L432xx
+
+// Pretend that we're an L443xx as the ChibiOS definitions for L4x2/L4x3 mistakenly don't enable GPIOH, I2C2, or SPI2.
+// Until ChibiOS upstream is fixed, this should be kept at L443, as nothing in QMK currently utilises the crypto peripheral on the L443.
+#define STM32L443xx
diff --git a/platforms/chibios/GENERIC_STM32_L412XB/configs/config.h b/platforms/chibios/GENERIC_STM32_L412XB/configs/config.h
new file mode 100644
index 0000000000..c27c61b19a
--- /dev/null
+++ b/platforms/chibios/GENERIC_STM32_L412XB/configs/config.h
@@ -0,0 +1,26 @@
+/* Copyright 2018-2021 Harrison Chan (@Xelus)
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
+/* Address for jumping to bootloader on STM32 chips. */
+/* It is chip dependent, the correct number can be looked up by checking against ST's application note AN2606.
+ */
+#define STM32_BOOTLOADER_ADDRESS 0x1FFF0000
+
+#define PAL_STM32_OSPEED_HIGHEST PAL_STM32_OSPEED_HIGH
+
+#ifndef EARLY_INIT_PERFORM_BOOTLOADER_JUMP
+# define EARLY_INIT_PERFORM_BOOTLOADER_JUMP TRUE
+#endif
diff --git a/platforms/chibios/GENERIC_STM32_L412XB/configs/mcuconf.h b/platforms/chibios/GENERIC_STM32_L412XB/configs/mcuconf.h
new file mode 100644
index 0000000000..8ad5a8da21
--- /dev/null
+++ b/platforms/chibios/GENERIC_STM32_L412XB/configs/mcuconf.h
@@ -0,0 +1,282 @@
+/*
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+/*
+ * STM32L4xx drivers configuration.
+ * The following settings override the default settings present in
+ * the various device driver implementation headers.
+ * Note that the settings for each driver only have effect if the whole
+ * driver is enabled in halconf.h.
+ *
+ * IRQ priorities:
+ * 15...0 Lowest...Highest.
+ *
+ * DMA priorities:
+ * 0...3 Lowest...Highest.
+ */
+
+#ifndef MCUCONF_H
+#define MCUCONF_H
+
+#define STM32L4xx_MCUCONF
+#define STM32L412_MCUCONF
+#define STM32L422_MCUCONF
+#define STM32L432_MCUCONF
+#define STM32L433_MCUCONF
+#define STM32L442_MCUCONF
+#define STM32L443_MCUCONF
+
+/*
+ * HAL driver system settings.
+ */
+#define STM32_NO_INIT FALSE
+#define STM32_VOS STM32_VOS_RANGE1
+#define STM32_PVD_ENABLE FALSE
+#define STM32_PLS STM32_PLS_LEV0
+#define STM32_HSI16_ENABLED TRUE
+#define STM32_HSI48_ENABLED TRUE
+#define STM32_LSI_ENABLED FALSE
+#define STM32_HSE_ENABLED FALSE
+#define STM32_LSE_ENABLED FALSE
+#define STM32_MSIPLL_ENABLED FALSE
+#define STM32_ADC_CLOCK_ENABLED TRUE
+#define STM32_USB_CLOCK_ENABLED TRUE
+#define STM32_SAI1_CLOCK_ENABLED TRUE
+#define STM32_SAI2_CLOCK_ENABLED TRUE
+#define STM32_MSIRANGE STM32_MSIRANGE_4M
+#define STM32_MSISRANGE STM32_MSISRANGE_4M
+#define STM32_SW STM32_SW_PLL
+#define STM32_PLLSRC STM32_PLLSRC_HSI16
+#define STM32_PLLM_VALUE 4
+#define STM32_PLLN_VALUE 80
+#define STM32_PLLP_VALUE 7
+#define STM32_PLLQ_VALUE 4
+#define STM32_PLLR_VALUE 4
+#define STM32_HPRE STM32_HPRE_DIV1
+#define STM32_PPRE1 STM32_PPRE1_DIV1
+#define STM32_PPRE2 STM32_PPRE2_DIV1
+#define STM32_STOPWUCK STM32_STOPWUCK_MSI
+#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK
+#define STM32_MCOPRE STM32_MCOPRE_DIV1
+#define STM32_LSCOSEL STM32_LSCOSEL_NOCLOCK
+#define STM32_PLLSAI1N_VALUE 72
+#define STM32_PLLSAI1P_VALUE 7
+#define STM32_PLLSAI1Q_VALUE 6
+#define STM32_PLLSAI1R_VALUE 6
+#define STM32_PLLSAI2N_VALUE 72
+#define STM32_PLLSAI2P_VALUE 7
+#define STM32_PLLSAI2R_VALUE 6
+
+/*
+ * Peripherals clock sources.
+ */
+#define STM32_USART1SEL STM32_USART1SEL_SYSCLK
+#define STM32_USART2SEL STM32_USART2SEL_SYSCLK
+#define STM32_USART3SEL STM32_USART3SEL_SYSCLK
+#define STM32_UART4SEL STM32_UART4SEL_SYSCLK
+#define STM32_UART5SEL STM32_UART5SEL_SYSCLK
+#define STM32_LPUART1SEL STM32_LPUART1SEL_SYSCLK
+#define STM32_I2C1SEL STM32_I2C1SEL_SYSCLK
+#define STM32_I2C2SEL STM32_I2C2SEL_SYSCLK
+#define STM32_I2C3SEL STM32_I2C3SEL_SYSCLK
+#define STM32_LPTIM1SEL STM32_LPTIM1SEL_PCLK1
+#define STM32_LPTIM2SEL STM32_LPTIM2SEL_PCLK1
+#define STM32_SAI1SEL STM32_SAI1SEL_OFF
+#define STM32_SAI2SEL STM32_SAI2SEL_OFF
+#define STM32_CLK48SEL STM32_CLK48SEL_HSI48
+#define STM32_ADCSEL STM32_ADCSEL_SYSCLK
+#define STM32_SWPMI1SEL STM32_SWPMI1SEL_PCLK1
+#define STM32_RTCSEL STM32_RTCSEL_LSI
+
+/*
+ * IRQ system settings.
+ */
+#define STM32_IRQ_EXTI0_PRIORITY 6
+#define STM32_IRQ_EXTI1_PRIORITY 6
+#define STM32_IRQ_EXTI2_PRIORITY 6
+#define STM32_IRQ_EXTI3_PRIORITY 6
+#define STM32_IRQ_EXTI4_PRIORITY 6
+#define STM32_IRQ_EXTI5_9_PRIORITY 6
+#define STM32_IRQ_EXTI10_15_PRIORITY 6
+#define STM32_IRQ_EXTI1635_38_PRIORITY 6
+#define STM32_IRQ_EXTI18_PRIORITY 6
+#define STM32_IRQ_EXTI19_PRIORITY 6
+#define STM32_IRQ_EXTI20_PRIORITY 6
+#define STM32_IRQ_EXTI21_22_PRIORITY 15
+
+#define STM32_IRQ_TIM1_BRK_TIM15_PRIORITY 7
+#define STM32_IRQ_TIM1_UP_TIM16_PRIORITY 7
+#define STM32_IRQ_TIM1_TRGCO_TIM17_PRIORITY 7
+#define STM32_IRQ_TIM1_CC_PRIORITY 7
+#define STM32_IRQ_TIM2_PRIORITY 7
+#define STM32_IRQ_TIM6_PRIORITY 7
+#define STM32_IRQ_TIM7_PRIORITY 7
+
+#define STM32_IRQ_USART1_PRIORITY 12
+#define STM32_IRQ_USART2_PRIORITY 12
+#define STM32_IRQ_USART3_PRIORITY 12
+#define STM32_IRQ_LPUART1_PRIORITY 12
+
+/*
+ * ADC driver system settings.
+ */
+#define STM32_ADC_COMPACT_SAMPLES FALSE
+#define STM32_ADC_USE_ADC1 FALSE
+#define STM32_ADC_ADC1_DMA_STREAM STM32_DMA_STREAM_ID(1, 1)
+#define STM32_ADC_ADC1_DMA_PRIORITY 2
+#define STM32_ADC_ADC12_IRQ_PRIORITY 5
+#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 5
+#define STM32_ADC_ADC123_CLOCK_MODE ADC_CCR_CKMODE_AHB_DIV1
+#define STM32_ADC_ADC123_PRESC ADC_CCR_PRESC_DIV2
+
+/*
+ * CAN driver system settings.
+ */
+#define STM32_CAN_USE_CAN1 FALSE
+#define STM32_CAN_CAN1_IRQ_PRIORITY 11
+
+/*
+ * DAC driver system settings.
+ */
+#define STM32_DAC_DUAL_MODE FALSE
+#define STM32_DAC_USE_DAC1_CH1 FALSE
+#define STM32_DAC_USE_DAC1_CH2 FALSE
+#define STM32_DAC_DAC1_CH1_IRQ_PRIORITY 10
+#define STM32_DAC_DAC1_CH2_IRQ_PRIORITY 10
+#define STM32_DAC_DAC1_CH1_DMA_PRIORITY 2
+#define STM32_DAC_DAC1_CH2_DMA_PRIORITY 2
+#define STM32_DAC_DAC1_CH1_DMA_STREAM STM32_DMA_STREAM_ID(2, 4)
+#define STM32_DAC_DAC1_CH2_DMA_STREAM STM32_DMA_STREAM_ID(1, 4)
+
+/*
+ * GPT driver system settings.
+ */
+#define STM32_GPT_USE_TIM1 FALSE
+#define STM32_GPT_USE_TIM2 FALSE
+#define STM32_GPT_USE_TIM6 FALSE
+#define STM32_GPT_USE_TIM7 FALSE
+#define STM32_GPT_USE_TIM15 FALSE
+#define STM32_GPT_USE_TIM16 FALSE
+
+/*
+ * I2C driver system settings.
+ */
+#define STM32_I2C_USE_I2C1 FALSE
+#define STM32_I2C_USE_I2C3 FALSE
+#define STM32_I2C_BUSY_TIMEOUT 50
+#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7)
+#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6)
+#define STM32_I2C_I2C3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3)
+#define STM32_I2C_I2C3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2)
+#define STM32_I2C_I2C1_IRQ_PRIORITY 5
+#define STM32_I2C_I2C3_IRQ_PRIORITY 5
+#define STM32_I2C_I2C1_DMA_PRIORITY 3
+#define STM32_I2C_I2C3_DMA_PRIORITY 3
+#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure")
+
+/*
+ * ICU driver system settings.
+ */
+#define STM32_ICU_USE_TIM1 FALSE
+#define STM32_ICU_USE_TIM2 FALSE
+#define STM32_ICU_USE_TIM15 FALSE
+#define STM32_ICU_USE_TIM16 FALSE
+
+/*
+ * PWM driver system settings.
+ */
+#define STM32_PWM_USE_ADVANCED FALSE
+#define STM32_PWM_USE_TIM1 FALSE
+#define STM32_PWM_USE_TIM2 FALSE
+#define STM32_PWM_USE_TIM15 FALSE
+#define STM32_PWM_USE_TIM16 FALSE
+
+/*
+ * RTC driver system settings.
+ */
+#define STM32_RTC_PRESA_VALUE 32
+#define STM32_RTC_PRESS_VALUE 1024
+#define STM32_RTC_CR_INIT 0
+#define STM32_RTC_TAMPCR_INIT 0
+
+/*
+ * SERIAL driver system settings.
+ */
+#define STM32_SERIAL_USE_USART1 FALSE
+#define STM32_SERIAL_USE_USART2 FALSE
+#define STM32_SERIAL_USE_LPUART1 FALSE
+#define STM32_SERIAL_USART1_PRIORITY 12
+#define STM32_SERIAL_USART2_PRIORITY 12
+#define STM32_SERIAL_LPUART1_PRIORITY 12
+
+/*
+ * SPI driver system settings.
+ */
+#define STM32_SPI_USE_SPI1 FALSE
+#define STM32_SPI_USE_SPI3 FALSE
+#define STM32_SPI_SPI1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 3)
+#define STM32_SPI_SPI1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 4)
+#define STM32_SPI_SPI3_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 1)
+#define STM32_SPI_SPI3_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 2)
+#define STM32_SPI_SPI1_DMA_PRIORITY 1
+#define STM32_SPI_SPI3_DMA_PRIORITY 1
+#define STM32_SPI_SPI1_IRQ_PRIORITY 10
+#define STM32_SPI_SPI3_IRQ_PRIORITY 10
+#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure")
+
+/*
+ * ST driver system settings.
+ */
+#define STM32_ST_IRQ_PRIORITY 8
+#define STM32_ST_USE_TIMER 2
+
+/*
+ * TRNG driver system settings.
+ */
+#define STM32_TRNG_USE_RNG1 FALSE
+
+/*
+ * UART driver system settings.
+ */
+#define STM32_UART_USE_USART1 FALSE
+#define STM32_UART_USE_USART2 FALSE
+#define STM32_UART_USART1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 7)
+#define STM32_UART_USART1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 6)
+#define STM32_UART_USART2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6)
+#define STM32_UART_USART2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7)
+#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure")
+
+/*
+ * USB driver system settings.
+ */
+#define STM32_USB_USE_USB1 TRUE
+#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE
+#define STM32_USB_USB1_HP_IRQ_PRIORITY 13
+#define STM32_USB_USB1_LP_IRQ_PRIORITY 14
+
+/*
+ * WDG driver system settings.
+ */
+#define STM32_WDG_USE_IWDG FALSE
+
+/*
+ * WSPI driver system settings.
+ */
+#define STM32_WSPI_USE_QUADSPI1 FALSE
+#define STM32_WSPI_QUADSPI1_DMA_STREAM STM32_DMA_STREAM_ID(2, 7)
+#define STM32_WSPI_QUADSPI1_PRESCALER_VALUE 1
+
+#endif /* MCUCONF_H */
diff --git a/platforms/chibios/GENERIC_STM32_L433XC/configs/board.h b/platforms/chibios/GENERIC_STM32_L433XC/configs/board.h
index 51f9724f94..2e37d95fe3 100644
--- a/platforms/chibios/GENERIC_STM32_L433XC/configs/board.h
+++ b/platforms/chibios/GENERIC_STM32_L433XC/configs/board.h
@@ -19,6 +19,6 @@
#undef STM32L432xx
-// Pretend that we're an L443xx as the ChibiOS definitions for L432/L433 mistakenly don't enable GPIOH, I2C2, or SPI2.
+// Pretend that we're an L443xx as the ChibiOS definitions for L4x2/L4x3 mistakenly don't enable GPIOH, I2C2, or SPI2.
// Until ChibiOS upstream is fixed, this should be kept at L443, as nothing in QMK currently utilises the crypto peripheral on the L443.
#define STM32L443xx
diff --git a/platforms/chibios/IC_TEENSY_4_1/board/board.mk b/platforms/chibios/IC_TEENSY_4_1/board/board.mk
new file mode 100644
index 0000000000..bc242ac3c5
--- /dev/null
+++ b/platforms/chibios/IC_TEENSY_4_1/board/board.mk
@@ -0,0 +1 @@
+include $(CHIBIOS_CONTRIB)/os/hal/boards/PJRC_TEENSY_4_1/board.mk
diff --git a/platforms/chibios/IC_TEENSY_4_1/rules.mk b/platforms/chibios/IC_TEENSY_4_1/rules.mk
new file mode 100644
index 0000000000..0c62d209c5
--- /dev/null
+++ b/platforms/chibios/IC_TEENSY_4_1/rules.mk
@@ -0,0 +1 @@
+TEENSY_LOADER_CLI_MCU = imxrt1062
diff --git a/platforms/chibios/QMK_PROTON_C/configs/halconf.h b/platforms/chibios/QMK_PROTON_C/configs/halconf.h
index 41fbac29e0..d7a639a6d0 100644
--- a/platforms/chibios/QMK_PROTON_C/configs/halconf.h
+++ b/platforms/chibios/QMK_PROTON_C/configs/halconf.h
@@ -412,7 +412,7 @@
* buffers.
*/
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_BUFFERS_SIZE 16
+#define SERIAL_BUFFERS_SIZE 128
#endif
/*===========================================================================*/
diff --git a/platforms/chibios/common/configs/halconf.h b/platforms/chibios/common/configs/halconf.h
index 264ae4e6c1..c80f67ee27 100644
--- a/platforms/chibios/common/configs/halconf.h
+++ b/platforms/chibios/common/configs/halconf.h
@@ -412,7 +412,7 @@
* buffers.
*/
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_BUFFERS_SIZE 16
+#define SERIAL_BUFFERS_SIZE 128
#endif
/*===========================================================================*/
diff --git a/platforms/chibios/common/ld/STM32L412xB.ld b/platforms/chibios/common/ld/STM32L412xB.ld
new file mode 100644
index 0000000000..5718d6bc71
--- /dev/null
+++ b/platforms/chibios/common/ld/STM32L412xB.ld
@@ -0,0 +1,85 @@
+/*
+ ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+/*
+ * STM32L412xB memory setup.
+ */
+MEMORY
+{
+ flash0 : org = 0x08000000, len = 128k
+ flash1 : org = 0x00000000, len = 0
+ flash2 : org = 0x00000000, len = 0
+ flash3 : org = 0x00000000, len = 0
+ flash4 : org = 0x00000000, len = 0
+ flash5 : org = 0x00000000, len = 0
+ flash6 : org = 0x00000000, len = 0
+ flash7 : org = 0x00000000, len = 0
+ ram0 : org = 0x20000000, len = 32k
+ ram1 : org = 0x00000000, len = 0
+ ram2 : org = 0x00000000, len = 0
+ ram3 : org = 0x00000000, len = 0
+ ram4 : org = 0x00000000, len = 0
+ ram5 : org = 0x00000000, len = 0
+ ram6 : org = 0x00000000, len = 0
+ ram7 : org = 0x00000000, len = 0
+}
+
+/* For each data/text section two region are defined, a virtual region
+ and a load region (_LMA suffix).*/
+
+/* Flash region to be used for exception vectors.*/
+REGION_ALIAS("VECTORS_FLASH", flash0);
+REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
+
+/* Flash region to be used for constructors and destructors.*/
+REGION_ALIAS("XTORS_FLASH", flash0);
+REGION_ALIAS("XTORS_FLASH_LMA", flash0);
+
+/* Flash region to be used for code text.*/
+REGION_ALIAS("TEXT_FLASH", flash0);
+REGION_ALIAS("TEXT_FLASH_LMA", flash0);
+
+/* Flash region to be used for read only data.*/
+REGION_ALIAS("RODATA_FLASH", flash0);
+REGION_ALIAS("RODATA_FLASH_LMA", flash0);
+
+/* Flash region to be used for various.*/
+REGION_ALIAS("VARIOUS_FLASH", flash0);
+REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
+
+/* Flash region to be used for RAM(n) initialization data.*/
+REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
+
+/* RAM region to be used for Main stack. This stack accommodates the processing
+ of all exceptions and interrupts.*/
+REGION_ALIAS("MAIN_STACK_RAM", ram0);
+
+/* RAM region to be used for the process stack. This is the stack used by
+ the main() function.*/
+REGION_ALIAS("PROCESS_STACK_RAM", ram0);
+
+/* RAM region to be used for data segment.*/
+REGION_ALIAS("DATA_RAM", ram0);
+REGION_ALIAS("DATA_RAM_LMA", flash0);
+
+/* RAM region to be used for BSS segment.*/
+REGION_ALIAS("BSS_RAM", ram0);
+
+/* RAM region to be used for the default heap.*/
+REGION_ALIAS("HEAP_RAM", ram0);
+
+/* Generic rules inclusion.*/
+INCLUDE rules.ld
diff --git a/quantum/color.h b/quantum/color.h
index 4783f6839c..e2cfc46927 100644
--- a/quantum/color.h
+++ b/quantum/color.h
@@ -19,6 +19,60 @@
#include <stdint.h>
#include <stdbool.h>
+// clang-format off
+
+/*
+ * RGB Colors
+ */
+#define RGB_AZURE 0x99, 0xF5, 0xFF
+#define RGB_BLACK 0x00, 0x00, 0x00
+#define RGB_BLUE 0x00, 0x00, 0xFF
+#define RGB_CHARTREUSE 0x80, 0xFF, 0x00
+#define RGB_CORAL 0xFF, 0x7C, 0x4D
+#define RGB_CYAN 0x00, 0xFF, 0xFF
+#define RGB_GOLD 0xFF, 0xD9, 0x00
+#define RGB_GOLDENROD 0xD9, 0xA5, 0x21
+#define RGB_GREEN 0x00, 0xFF, 0x00
+#define RGB_MAGENTA 0xFF, 0x00, 0xFF
+#define RGB_ORANGE 0xFF, 0x80, 0x00
+#define RGB_PINK 0xFF, 0x80, 0xBF
+#define RGB_PURPLE 0x7A, 0x00, 0xFF
+#define RGB_RED 0xFF, 0x00, 0x00
+#define RGB_SPRINGGREEN 0x00, 0xFF, 0x80
+#define RGB_TEAL 0x00, 0x80, 0x80
+#define RGB_TURQUOISE 0x47, 0x6E, 0x6A
+#define RGB_WHITE 0xFF, 0xFF, 0xFF
+#define RGB_YELLOW 0xFF, 0xFF, 0x00
+#define RGB_OFF RGB_BLACK
+
+/*
+ * HSV Colors
+ *
+ * All values (including hue) are scaled to 0-255
+ */
+#define HSV_AZURE 132, 102, 255
+#define HSV_BLACK 0, 0, 0
+#define HSV_BLUE 170, 255, 255
+#define HSV_CHARTREUSE 64, 255, 255
+#define HSV_CORAL 11, 176, 255
+#define HSV_CYAN 128, 255, 255
+#define HSV_GOLD 36, 255, 255
+#define HSV_GOLDENROD 30, 218, 218
+#define HSV_GREEN 85, 255, 255
+#define HSV_MAGENTA 213, 255, 255
+#define HSV_ORANGE 28, 255, 255
+#define HSV_PINK 234, 128, 255
+#define HSV_PURPLE 191, 255, 255
+#define HSV_RED 0, 255, 255
+#define HSV_SPRINGGREEN 106, 255, 255
+#define HSV_TEAL 128, 255, 128
+#define HSV_TURQUOISE 123, 90, 112
+#define HSV_WHITE 0, 0, 255
+#define HSV_YELLOW 43, 255, 255
+#define HSV_OFF HSV_BLACK
+
+// clang-format on
+
#if defined(__GNUC__)
# define PACKED __attribute__((__packed__))
#else
diff --git a/quantum/command.c b/quantum/command.c
index 34c4b36b1c..3a7dc0f8ca 100644
--- a/quantum/command.c
+++ b/quantum/command.c
@@ -781,6 +781,6 @@ uint8_t numkey2num(uint8_t code) {
static void switch_default_layer(uint8_t layer) {
xprintf("L%d\n", layer);
- default_layer_set(1UL << layer);
+ default_layer_set((layer_state_t)1 << layer);
clear_keyboard();
}
diff --git a/quantum/crc.c b/quantum/crc.c
new file mode 100644
index 0000000000..0d8b9d6017
--- /dev/null
+++ b/quantum/crc.c
@@ -0,0 +1,59 @@
+/* Copyright 2021 QMK
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
+#include "crc.h"
+
+__attribute__((weak)) void crc_init(void){
+ /* Software implementation nothing todo here. */
+};
+
+#if defined(CRC8_USE_TABLE)
+/**
+ * Static table used for the table_driven implementation.
+ */
+static const crc_t crc_table[256] = {0x00, 0x07, 0x0e, 0x09, 0x1c, 0x1b, 0x12, 0x15, 0x38, 0x3f, 0x36, 0x31, 0x24, 0x23, 0x2a, 0x2d, 0x70, 0x77, 0x7e, 0x79, 0x6c, 0x6b, 0x62, 0x65, 0x48, 0x4f, 0x46, 0x41, 0x54, 0x53, 0x5a, 0x5d, 0xe0, 0xe7, 0xee, 0xe9, 0xfc, 0xfb, 0xf2, 0xf5, 0xd8, 0xdf, 0xd6, 0xd1, 0xc4, 0xc3, 0xca, 0xcd, 0x90, 0x97, 0x9e, 0x99, 0x8c, 0x8b, 0x82, 0x85, 0xa8, 0xaf, 0xa6, 0xa1, 0xb4, 0xb3, 0xba, 0xbd, 0xc7, 0xc0, 0xc9, 0xce, 0xdb, 0xdc, 0xd5, 0xd2, 0xff, 0xf8, 0xf1, 0xf6, 0xe3, 0xe4, 0xed, 0xea, 0xb7, 0xb0, 0xb9, 0xbe, 0xab, 0xac, 0xa5, 0xa2, 0x8f, 0x88, 0x81, 0x86, 0x93, 0x94, 0x9d, 0x9a, 0x27, 0x20, 0x29, 0x2e, 0x3b, 0x3c, 0x35, 0x32, 0x1f, 0x18, 0x11, 0x16, 0x03, 0x04, 0x0d, 0x0a, 0x57, 0x50, 0x59, 0x5e, 0x4b, 0x4c, 0x45, 0x42, 0x6f, 0x68, 0x61, 0x66, 0x73, 0x74, 0x7d, 0x7a,
+ 0x89, 0x8e, 0x87, 0x80, 0x95, 0x92, 0x9b, 0x9c, 0xb1, 0xb6, 0xbf, 0xb8, 0xad, 0xaa, 0xa3, 0xa4, 0xf9, 0xfe, 0xf7, 0xf0, 0xe5, 0xe2, 0xeb, 0xec, 0xc1, 0xc6, 0xcf, 0xc8, 0xdd, 0xda, 0xd3, 0xd4, 0x69, 0x6e, 0x67, 0x60, 0x75, 0x72, 0x7b, 0x7c, 0x51, 0x56, 0x5f, 0x58, 0x4d, 0x4a, 0x43, 0x44, 0x19, 0x1e, 0x17, 0x10, 0x05, 0x02, 0x0b, 0x0c, 0x21, 0x26, 0x2f, 0x28, 0x3d, 0x3a, 0x33, 0x34, 0x4e, 0x49, 0x40, 0x47, 0x52, 0x55, 0x5c, 0x5b, 0x76, 0x71, 0x78, 0x7f, 0x6a, 0x6d, 0x64, 0x63, 0x3e, 0x39, 0x30, 0x37, 0x22, 0x25, 0x2c, 0x2b, 0x06, 0x01, 0x08, 0x0f, 0x1a, 0x1d, 0x14, 0x13, 0xae, 0xa9, 0xa0, 0xa7, 0xb2, 0xb5, 0xbc, 0xbb, 0x96, 0x91, 0x98, 0x9f, 0x8a, 0x8d, 0x84, 0x83, 0xde, 0xd9, 0xd0, 0xd7, 0xc2, 0xc5, 0xcc, 0xcb, 0xe6, 0xe1, 0xe8, 0xef, 0xfa, 0xfd, 0xf4, 0xf3};
+
+__attribute__((weak)) uint8_t crc8(const void *data, size_t data_len) {
+ const uint8_t *d = (const uint8_t *)data;
+ crc_t crc = 0xff;
+ size_t tbl_idx;
+
+ while (data_len--) {
+ tbl_idx = crc ^ *d;
+ crc = crc_table[tbl_idx] & 0xff;
+ d++;
+ }
+ return crc & 0xff;
+}
+#else
+__attribute__((weak)) uint8_t crc8(const void *data, size_t data_len) {
+ const uint8_t *d = (const uint8_t *)data;
+ crc_t crc = 0xff;
+ size_t i, j;
+
+ for (i = 0; i < data_len; i++) {
+ crc ^= d[i];
+ for (j = 0; j < 8; j++) {
+ if ((crc & 0x80) != 0)
+ crc = (crc_t)((crc << 1) ^ 0x31);
+ else
+ crc <<= 1;
+ }
+ }
+ return crc;
+}
+#endif \ No newline at end of file
diff --git a/quantum/crc.h b/quantum/crc.h
new file mode 100644
index 0000000000..c17f5888e2
--- /dev/null
+++ b/quantum/crc.h
@@ -0,0 +1,44 @@
+/* Copyright 2021 QMK
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+
+#include "quantum.h"
+
+/**
+ * The type of the CRC values.
+ *
+ * This type must be big enough to contain at least 8 bits.
+ */
+#if defined(CRC8_OPTIMIZE_SPEED)
+typedef uint_fast8_t crc_t;
+#else
+typedef uint_least8_t crc_t;
+#endif
+
+/**
+ * Initialize crc subsystem.
+ */
+__attribute__((weak)) void crc_init(void);
+
+/**
+ * Generate CRC8 value from given data.
+ *
+ * \param[in] data Pointer to a buffer of \a data_len bytes.
+ * \param[in] data_len Number of bytes in the \a data buffer.
+ * \return The calculated crc value.
+ */
+__attribute__((weak)) uint8_t crc8(const void *data, size_t data_len); \ No newline at end of file
diff --git a/quantum/debounce.h b/quantum/debounce.h
index 9ca05c6824..5043868289 100644
--- a/quantum/debounce.h
+++ b/quantum/debounce.h
@@ -9,3 +9,5 @@ void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool
bool debounce_active(void);
void debounce_init(uint8_t num_rows);
+
+void debounce_free(void);
diff --git a/quantum/debounce/asym_eager_defer_pk.c b/quantum/debounce/asym_eager_defer_pk.c
new file mode 100644
index 0000000000..24380dc5e5
--- /dev/null
+++ b/quantum/debounce/asym_eager_defer_pk.c
@@ -0,0 +1,171 @@
+/*
+ * Copyright 2017 Alex Ong <the.onga@gmail.com>
+ * Copyright 2020 Andrei Purdea <andrei@purdea.ro>
+ * Copyright 2021 Simon Arlott
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
+/*
+Basic symmetric per-key algorithm. Uses an 8-bit counter per key.
+When no state changes have occured for DEBOUNCE milliseconds, we push the state.
+*/
+
+#include "matrix.h"
+#include "timer.h"
+#include "quantum.h"
+#include <stdlib.h>
+
+#ifdef PROTOCOL_CHIBIOS
+# if CH_CFG_USE_MEMCORE == FALSE
+# error ChibiOS is configured without a memory allocator. Your keyboard may have set `#define CH_CFG_USE_MEMCORE FALSE`, which is incompatible with this debounce algorithm.
+# endif
+#endif
+
+#ifndef DEBOUNCE
+# define DEBOUNCE 5
+#endif
+
+// Maximum debounce: 127ms
+#if DEBOUNCE > 127
+# undef DEBOUNCE
+# define DEBOUNCE 127
+#endif
+
+#define ROW_SHIFTER ((matrix_row_t)1)
+
+typedef struct {
+ bool pressed : 1;
+ uint8_t time : 7;
+} debounce_counter_t;
+
+#if DEBOUNCE > 0
+static debounce_counter_t *debounce_counters;
+static fast_timer_t last_time;
+static bool counters_need_update;
+static bool matrix_need_update;
+
+#define DEBOUNCE_ELAPSED 0
+
+static void update_debounce_counters_and_transfer_if_expired(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, uint8_t elapsed_time);
+static void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows);
+
+// we use num_rows rather than MATRIX_ROWS to support split keyboards
+void debounce_init(uint8_t num_rows) {
+ debounce_counters = malloc(num_rows * MATRIX_COLS * sizeof(debounce_counter_t));
+ int i = 0;
+ for (uint8_t r = 0; r < num_rows; r++) {
+ for (uint8_t c = 0; c < MATRIX_COLS; c++) {
+ debounce_counters[i++].time = DEBOUNCE_ELAPSED;
+ }
+ }
+}
+
+void debounce_free(void) {
+ free(debounce_counters);
+ debounce_counters = NULL;
+}
+
+void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed) {
+ bool updated_last = false;
+
+ if (counters_need_update) {
+ fast_timer_t now = timer_read_fast();
+ fast_timer_t elapsed_time = TIMER_DIFF_FAST(now, last_time);
+
+ last_time = now;
+ updated_last = true;
+ if (elapsed_time > UINT8_MAX) {
+ elapsed_time = UINT8_MAX;
+ }
+
+ if (elapsed_time > 0) {
+ update_debounce_counters_and_transfer_if_expired(raw, cooked, num_rows, elapsed_time);
+ }
+ }
+
+ if (changed || matrix_need_update) {
+ if (!updated_last) {
+ last_time = timer_read_fast();
+ }
+
+ transfer_matrix_values(raw, cooked, num_rows);
+ }
+}
+
+static void update_debounce_counters_and_transfer_if_expired(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, uint8_t elapsed_time) {
+ debounce_counter_t *debounce_pointer = debounce_counters;
+
+ counters_need_update = false;
+ matrix_need_update = false;
+
+ for (uint8_t row = 0; row < num_rows; row++) {
+ for (uint8_t col = 0; col < MATRIX_COLS; col++) {
+ matrix_row_t col_mask = (ROW_SHIFTER << col);
+
+ if (debounce_pointer->time != DEBOUNCE_ELAPSED) {
+ if (debounce_pointer->time <= elapsed_time) {
+ debounce_pointer->time = DEBOUNCE_ELAPSED;
+
+ if (debounce_pointer->pressed) {
+ // key-down: eager
+ matrix_need_update = true;
+ } else {
+ // key-up: defer
+ cooked[row] = (cooked[row] & ~col_mask) | (raw[row] & col_mask);
+ }
+ } else {
+ debounce_pointer->time -= elapsed_time;
+ counters_need_update = true;
+ }
+ }
+ debounce_pointer++;
+ }
+ }
+}
+
+static void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows) {
+ debounce_counter_t *debounce_pointer = debounce_counters;
+
+ for (uint8_t row = 0; row < num_rows; row++) {
+ matrix_row_t delta = raw[row] ^ cooked[row];
+ for (uint8_t col = 0; col < MATRIX_COLS; col++) {
+ matrix_row_t col_mask = (ROW_SHIFTER << col);
+
+ if (delta & col_mask) {
+ if (debounce_pointer->time == DEBOUNCE_ELAPSED) {
+ debounce_pointer->pressed = (raw[row] & col_mask);
+ debounce_pointer->time = DEBOUNCE;
+ counters_need_update = true;
+
+ if (debounce_pointer->pressed) {
+ // key-down: eager
+ cooked[row] ^= col_mask;
+ }
+ }
+ } else if (debounce_pointer->time != DEBOUNCE_ELAPSED) {
+ if (!debounce_pointer->pressed) {
+ // key-up: defer
+ debounce_pointer->time = DEBOUNCE_ELAPSED;
+ }
+ }
+ debounce_pointer++;
+ }
+ }
+}
+
+bool debounce_active(void) { return true; }
+#else
+# include "none.c"
+#endif
diff --git a/quantum/debounce/none.c b/quantum/debounce/none.c
new file mode 100644
index 0000000000..b03892bc5b
--- /dev/null
+++ b/quantum/debounce/none.c
@@ -0,0 +1,31 @@
+/* Copyright 2021 Simon Arlott
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
+#include "matrix.h"
+#include "quantum.h"
+#include <stdlib.h>
+
+void debounce_init(uint8_t num_rows) {}
+
+void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed) {
+ for (int i = 0; i < num_rows; i++) {
+ cooked[i] = raw[i];
+ }
+}
+
+bool debounce_active(void) { return false; }
+
+void debounce_free(void) {}
diff --git a/quantum/debounce/sym_defer_g.c b/quantum/debounce/sym_defer_g.c
index 3ed9055d2a..fbefd55ede 100644
--- a/quantum/debounce/sym_defer_g.c
+++ b/quantum/debounce/sym_defer_g.c
@@ -1,5 +1,6 @@
/*
Copyright 2017 Alex Ong<the.onga@gmail.com>
+Copyright 2021 Simon Arlott
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
@@ -23,30 +24,29 @@ When no state changes have occured for DEBOUNCE milliseconds, we push the state.
# define DEBOUNCE 5
#endif
-void debounce_init(uint8_t num_rows) {}
+#if DEBOUNCE > 0
static bool debouncing = false;
+static fast_timer_t debouncing_time;
-#if DEBOUNCE > 0
-static uint16_t debouncing_time;
-void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed) {
+void debounce_init(uint8_t num_rows) {}
+
+void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed) {
if (changed) {
debouncing = true;
- debouncing_time = timer_read();
+ debouncing_time = timer_read_fast();
}
- if (debouncing && timer_elapsed(debouncing_time) > DEBOUNCE) {
+ if (debouncing && timer_elapsed_fast(debouncing_time) >= DEBOUNCE) {
for (int i = 0; i < num_rows; i++) {
cooked[i] = raw[i];
}
debouncing = false;
}
}
-#else // no debouncing.
-void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed) {
- for (int i = 0; i < num_rows; i++) {
- cooked[i] = raw[i];
- }
-}
-#endif
bool debounce_active(void) { return debouncing; }
+
+void debounce_free(void) {}
+#else // no debouncing.
+# include "none.c"
+#endif
diff --git a/quantum/debounce/sym_defer_pk.c b/quantum/debounce/sym_defer_pk.c
index 60513f98e1..626a9be841 100644
--- a/quantum/debounce/sym_defer_pk.c
+++ b/quantum/debounce/sym_defer_pk.c
@@ -1,6 +1,7 @@
/*
Copyright 2017 Alex Ong<the.onga@gmail.com>
Copyright 2020 Andrei Purdea<andrei@purdea.ro>
+Copyright 2021 Simon Arlott
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
@@ -33,28 +34,25 @@ When no state changes have occured for DEBOUNCE milliseconds, we push the state.
# define DEBOUNCE 5
#endif
+// Maximum debounce: 255ms
+#if DEBOUNCE > UINT8_MAX
+# undef DEBOUNCE
+# define DEBOUNCE UINT8_MAX
+#endif
+
#define ROW_SHIFTER ((matrix_row_t)1)
-#define debounce_counter_t uint8_t
+typedef uint8_t debounce_counter_t;
+#if DEBOUNCE > 0
static debounce_counter_t *debounce_counters;
+static fast_timer_t last_time;
static bool counters_need_update;
-#define DEBOUNCE_ELAPSED 251
-#define MAX_DEBOUNCE (DEBOUNCE_ELAPSED - 1)
-
-static uint8_t wrapping_timer_read(void) {
- static uint16_t time = 0;
- static uint8_t last_result = 0;
- uint16_t new_time = timer_read();
- uint16_t diff = new_time - time;
- time = new_time;
- last_result = (last_result + diff) % (MAX_DEBOUNCE + 1);
- return last_result;
-}
+#define DEBOUNCE_ELAPSED 0
-void update_debounce_counters_and_transfer_if_expired(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, uint8_t current_time);
-void start_debounce_counters(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, uint8_t current_time);
+static void update_debounce_counters_and_transfer_if_expired(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, uint8_t elapsed_time);
+static void start_debounce_counters(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows);
// we use num_rows rather than MATRIX_ROWS to support split keyboards
void debounce_init(uint8_t num_rows) {
@@ -67,27 +65,49 @@ void debounce_init(uint8_t num_rows) {
}
}
+void debounce_free(void) {
+ free(debounce_counters);
+ debounce_counters = NULL;
+}
+
void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed) {
- uint8_t current_time = wrapping_timer_read();
+ bool updated_last = false;
+
if (counters_need_update) {
- update_debounce_counters_and_transfer_if_expired(raw, cooked, num_rows, current_time);
+ fast_timer_t now = timer_read_fast();
+ fast_timer_t elapsed_time = TIMER_DIFF_FAST(now, last_time);
+
+ last_time = now;
+ updated_last = true;
+ if (elapsed_time > UINT8_MAX) {
+ elapsed_time = UINT8_MAX;
+ }
+
+ if (elapsed_time > 0) {
+ update_debounce_counters_and_transfer_if_expired(raw, cooked, num_rows, elapsed_time);
+ }
}
if (changed) {
- start_debounce_counters(raw, cooked, num_rows, current_time);
+ if (!updated_last) {
+ last_time = timer_read_fast();
+ }
+
+ start_debounce_counters(raw, cooked, num_rows);
}
}
-void update_debounce_counters_and_transfer_if_expired(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, uint8_t current_time) {
+static void update_debounce_counters_and_transfer_if_expired(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, uint8_t elapsed_time) {
counters_need_update = false;
debounce_counter_t *debounce_pointer = debounce_counters;
for (uint8_t row = 0; row < num_rows; row++) {
for (uint8_t col = 0; col < MATRIX_COLS; col++) {
if (*debounce_pointer != DEBOUNCE_ELAPSED) {
- if (TIMER_DIFF(current_time, *debounce_pointer, MAX_DEBOUNCE) >= DEBOUNCE) {
+ if (*debounce_pointer <= elapsed_time) {
*debounce_pointer = DEBOUNCE_ELAPSED;
cooked[row] = (cooked[row] & ~(ROW_SHIFTER << col)) | (raw[row] & (ROW_SHIFTER << col));
} else {
+ *debounce_pointer -= elapsed_time;
counters_need_update = true;
}
}
@@ -96,14 +116,14 @@ void update_debounce_counters_and_transfer_if_expired(matrix_row_t raw[], matrix
}
}
-void start_debounce_counters(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, uint8_t current_time) {
+static void start_debounce_counters(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows) {
debounce_counter_t *debounce_pointer = debounce_counters;
for (uint8_t row = 0; row < num_rows; row++) {
matrix_row_t delta = raw[row] ^ cooked[row];
for (uint8_t col = 0; col < MATRIX_COLS; col++) {
if (delta & (ROW_SHIFTER << col)) {
if (*debounce_pointer == DEBOUNCE_ELAPSED) {
- *debounce_pointer = current_time;
+ *debounce_pointer = DEBOUNCE;
counters_need_update = true;
}
} else {
@@ -115,3 +135,6 @@ void start_debounce_counters(matrix_row_t raw[], matrix_row_t cooked[], uint8_t
}
bool debounce_active(void) { return true; }
+#else
+# include "none.c"
+#endif
diff --git a/quantum/debounce/sym_eager_pk.c b/quantum/debounce/sym_eager_pk.c
index e66cf92d79..15a3242e68 100644
--- a/quantum/debounce/sym_eager_pk.c
+++ b/quantum/debounce/sym_eager_pk.c
@@ -1,5 +1,6 @@
/*
Copyright 2017 Alex Ong<the.onga@gmail.com>
+Copyright 2021 Simon Arlott
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
@@ -33,29 +34,26 @@ No further inputs are accepted until DEBOUNCE milliseconds have occurred.
# define DEBOUNCE 5
#endif
+// Maximum debounce: 255ms
+#if DEBOUNCE > UINT8_MAX
+# undef DEBOUNCE
+# define DEBOUNCE UINT8_MAX
+#endif
+
#define ROW_SHIFTER ((matrix_row_t)1)
-#define debounce_counter_t uint8_t
+typedef uint8_t debounce_counter_t;
+#if DEBOUNCE > 0
static debounce_counter_t *debounce_counters;
+static fast_timer_t last_time;
static bool counters_need_update;
static bool matrix_need_update;
-#define DEBOUNCE_ELAPSED 251
-#define MAX_DEBOUNCE (DEBOUNCE_ELAPSED - 1)
-
-static uint8_t wrapping_timer_read(void) {
- static uint16_t time = 0;
- static uint8_t last_result = 0;
- uint16_t new_time = timer_read();
- uint16_t diff = new_time - time;
- time = new_time;
- last_result = (last_result + diff) % (MAX_DEBOUNCE + 1);
- return last_result;
-}
+#define DEBOUNCE_ELAPSED 0
-void update_debounce_counters(uint8_t num_rows, uint8_t current_time);
-void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, uint8_t current_time);
+static void update_debounce_counters(uint8_t num_rows, uint8_t elapsed_time);
+static void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows);
// we use num_rows rather than MATRIX_ROWS to support split keyboards
void debounce_init(uint8_t num_rows) {
@@ -68,27 +66,51 @@ void debounce_init(uint8_t num_rows) {
}
}
+void debounce_free(void) {
+ free(debounce_counters);
+ debounce_counters = NULL;
+}
+
void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed) {
- uint8_t current_time = wrapping_timer_read();
+ bool updated_last = false;
+
if (counters_need_update) {
- update_debounce_counters(num_rows, current_time);
+ fast_timer_t now = timer_read_fast();
+ fast_timer_t elapsed_time = TIMER_DIFF_FAST(now, last_time);
+
+ last_time = now;
+ updated_last = true;
+ if (elapsed_time > UINT8_MAX) {
+ elapsed_time = UINT8_MAX;
+ }
+
+ if (elapsed_time > 0) {
+ update_debounce_counters(num_rows, elapsed_time);
+ }
}
if (changed || matrix_need_update) {
- transfer_matrix_values(raw, cooked, num_rows, current_time);
+ if (!updated_last) {
+ last_time = timer_read_fast();
+ }
+
+ transfer_matrix_values(raw, cooked, num_rows);
}
}
// If the current time is > debounce counter, set the counter to enable input.
-void update_debounce_counters(uint8_t num_rows, uint8_t current_time) {
+static void update_debounce_counters(uint8_t num_rows, uint8_t elapsed_time) {
counters_need_update = false;
+ matrix_need_update = false;
debounce_counter_t *debounce_pointer = debounce_counters;
for (uint8_t row = 0; row < num_rows; row++) {
for (uint8_t col = 0; col < MATRIX_COLS; col++) {
if (*debounce_pointer != DEBOUNCE_ELAPSED) {
- if (TIMER_DIFF(current_time, *debounce_pointer, MAX_DEBOUNCE) >= DEBOUNCE) {
+ if (*debounce_pointer <= elapsed_time) {
*debounce_pointer = DEBOUNCE_ELAPSED;
+ matrix_need_update = true;
} else {
+ *debounce_pointer -= elapsed_time;
counters_need_update = true;
}
}
@@ -98,8 +120,7 @@ void update_debounce_counters(uint8_t num_rows, uint8_t current_time) {
}
// upload from raw_matrix to final matrix;
-void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, uint8_t current_time) {
- matrix_need_update = false;
+static void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows) {
debounce_counter_t *debounce_pointer = debounce_counters;
for (uint8_t row = 0; row < num_rows; row++) {
matrix_row_t delta = raw[row] ^ cooked[row];
@@ -108,11 +129,9 @@ void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], uint8_t n
matrix_row_t col_mask = (ROW_SHIFTER << col);
if (delta & col_mask) {
if (*debounce_pointer == DEBOUNCE_ELAPSED) {
- *debounce_pointer = current_time;
+ *debounce_pointer = DEBOUNCE;
counters_need_update = true;
existing_row ^= col_mask; // flip the bit.
- } else {
- matrix_need_update = true;
}
}
debounce_pointer++;
@@ -122,3 +141,6 @@ void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], uint8_t n
}
bool debounce_active(void) { return true; }
+#else
+# include "none.c"
+#endif
diff --git a/quantum/debounce/sym_eager_pr.c b/quantum/debounce/sym_eager_pr.c
index 20ccb46f1d..2ad592c5a6 100644
--- a/quantum/debounce/sym_eager_pr.c
+++ b/quantum/debounce/sym_eager_pr.c
@@ -1,5 +1,6 @@
/*
Copyright 2019 Alex Ong<the.onga@gmail.com>
+Copyright 2021 Simon Arlott
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
@@ -33,27 +34,25 @@ No further inputs are accepted until DEBOUNCE milliseconds have occurred.
# define DEBOUNCE 5
#endif
-#define debounce_counter_t uint8_t
+// Maximum debounce: 255ms
+#if DEBOUNCE > UINT8_MAX
+# undef DEBOUNCE
+# define DEBOUNCE UINT8_MAX
+#endif
+
+typedef uint8_t debounce_counter_t;
+
+#if DEBOUNCE > 0
static bool matrix_need_update;
static debounce_counter_t *debounce_counters;
+static fast_timer_t last_time;
static bool counters_need_update;
-#define DEBOUNCE_ELAPSED 251
-#define MAX_DEBOUNCE (DEBOUNCE_ELAPSED - 1)
-
-static uint8_t wrapping_timer_read(void) {
- static uint16_t time = 0;
- static uint8_t last_result = 0;
- uint16_t new_time = timer_read();
- uint16_t diff = new_time - time;
- time = new_time;
- last_result = (last_result + diff) % (MAX_DEBOUNCE + 1);
- return last_result;
-}
+#define DEBOUNCE_ELAPSED 0
-void update_debounce_counters(uint8_t num_rows, uint8_t current_time);
-void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, uint8_t current_time);
+static void update_debounce_counters(uint8_t num_rows, uint8_t elapsed_time);
+static void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows);
// we use num_rows rather than MATRIX_ROWS to support split keyboards
void debounce_init(uint8_t num_rows) {
@@ -63,27 +62,50 @@ void debounce_init(uint8_t num_rows) {
}
}
+void debounce_free(void) {
+ free(debounce_counters);
+ debounce_counters = NULL;
+}
+
void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed) {
- uint8_t current_time = wrapping_timer_read();
- bool needed_update = counters_need_update;
+ bool updated_last = false;
+
if (counters_need_update) {
- update_debounce_counters(num_rows, current_time);
+ fast_timer_t now = timer_read_fast();
+ fast_timer_t elapsed_time = TIMER_DIFF_FAST(now, last_time);
+
+ last_time = now;
+ updated_last = true;
+ if (elapsed_time > UINT8_MAX) {
+ elapsed_time = UINT8_MAX;
+ }
+
+ if (elapsed_time > 0) {
+ update_debounce_counters(num_rows, elapsed_time);
+ }
}
- if (changed || (needed_update && !counters_need_update) || matrix_need_update) {
- transfer_matrix_values(raw, cooked, num_rows, current_time);
+ if (changed || matrix_need_update) {
+ if (!updated_last) {
+ last_time = timer_read_fast();
+ }
+
+ transfer_matrix_values(raw, cooked, num_rows);
}
}
// If the current time is > debounce counter, set the counter to enable input.
-void update_debounce_counters(uint8_t num_rows, uint8_t current_time) {
+static void update_debounce_counters(uint8_t num_rows, uint8_t elapsed_time) {
counters_need_update = false;
+ matrix_need_update = false;
debounce_counter_t *debounce_pointer = debounce_counters;
for (uint8_t row = 0; row < num_rows; row++) {
if (*debounce_pointer != DEBOUNCE_ELAPSED) {
- if (TIMER_DIFF(current_time, *debounce_pointer, MAX_DEBOUNCE) >= DEBOUNCE) {
+ if (*debounce_pointer <= elapsed_time) {
*debounce_pointer = DEBOUNCE_ELAPSED;
+ matrix_need_update = true;
} else {
+ *debounce_pointer -= elapsed_time;
counters_need_update = true;
}
}
@@ -92,8 +114,7 @@ void update_debounce_counters(uint8_t num_rows, uint8_t current_time) {
}
// upload from raw_matrix to final matrix;
-void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, uint8_t current_time) {
- matrix_need_update = false;
+static void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows) {
debounce_counter_t *debounce_pointer = debounce_counters;
for (uint8_t row = 0; row < num_rows; row++) {
matrix_row_t existing_row = cooked[row];
@@ -102,11 +123,9 @@ void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], uint8_t n
// determine new value basd on debounce pointer + raw value
if (existing_row != raw_row) {
if (*debounce_pointer == DEBOUNCE_ELAPSED) {
- *debounce_pointer = current_time;
+ *debounce_pointer = DEBOUNCE;
cooked[row] = raw_row;
counters_need_update = true;
- } else {
- matrix_need_update = true;
}
}
debounce_pointer++;
@@ -114,3 +133,6 @@ void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], uint8_t n
}
bool debounce_active(void) { return true; }
+#else
+# include "none.c"
+#endif
diff --git a/quantum/debounce/tests/asym_eager_defer_pk_tests.cpp b/quantum/debounce/tests/asym_eager_defer_pk_tests.cpp
new file mode 100644
index 0000000000..fe374c3dfa
--- /dev/null
+++ b/quantum/debounce/tests/asym_eager_defer_pk_tests.cpp
@@ -0,0 +1,374 @@
+/* Copyright 2021 Simon Arlott
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
+#include "gtest/gtest.h"
+
+#include "debounce_test_common.h"
+
+TEST_F(DebounceTest, OneKeyShort1) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ /* Release key after 1ms delay */
+ {1, {{0, 1, UP}}, {}},
+
+ /*
+ * Until the eager timer on DOWN is observed to finish, the defer timer
+ * on UP can't start. There's no workaround for this because it's not
+ * possible to debounce an event that isn't being tracked.
+ *
+ * sym_defer_pk has the same problem but the test has to track that the
+ * key changed state so the DOWN timer is always allowed to finish
+ * before starting the UP timer.
+ */
+ {5, {}, {}},
+
+ {10, {}, {{0, 1, UP}}}, /* 5ms+5ms after DOWN at time 0 */
+ /* Press key again after 1ms delay */
+ {11, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyShort2) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ /* Release key after 2ms delay */
+ {2, {{0, 1, UP}}, {}},
+
+ {5, {}, {}}, /* See OneKeyShort1 */
+
+ {10, {}, {{0, 1, UP}}}, /* 5ms+5ms after DOWN at time 0 */
+ /* Press key again after 1ms delay */
+ {11, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyShort3) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ /* Release key after 3ms delay */
+ {3, {{0, 1, UP}}, {}},
+
+ {5, {}, {}}, /* See OneKeyShort1 */
+
+ {10, {}, {{0, 1, UP}}}, /* 5ms+5ms after DOWN at time 0 */
+ /* Press key again after 1ms delay */
+ {11, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyShort4) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ /* Release key after 4ms delay */
+ {4, {{0, 1, UP}}, {}},
+
+ {5, {}, {}}, /* See OneKeyShort1 */
+
+ {10, {}, {{0, 1, UP}}}, /* 5ms+5ms after DOWN at time 0 */
+ /* Press key again after 1ms delay */
+ {11, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyShort5) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+
+ /* Release key after 5ms delay */
+ {5, {{0, 1, UP}}, {}},
+
+ {10, {}, {{0, 1, UP}}}, /* 5ms+5ms after DOWN at time 0 */
+ /* Press key again after 1ms delay */
+ {11, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyShort6) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+
+ /* Release key after 6ms delay */
+ {6, {{0, 1, UP}}, {}},
+
+ {11, {}, {{0, 1, UP}}}, /* 5ms after UP at time 6 */
+ /* Press key again after 1ms delay */
+ {12, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyShort7) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+
+ /* Release key after 7ms delay */
+ {7, {{0, 1, UP}}, {}},
+
+ {12, {}, {{0, 1, UP}}}, /* 5ms after UP at time 7 */
+ /* Press key again after 1ms delay */
+ {13, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyShort8) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ /* Release key after 1ms delay */
+ {1, {{0, 1, UP}}, {}},
+
+ {5, {}, {}}, /* See OneKeyShort1 */
+
+ {10, {}, {{0, 1, UP}}}, /* 5ms after UP at time 7 */
+ /* Press key again after 0ms delay (scan 2) */
+ {10, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyShort9) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ /* Release key after 1ms delay */
+ {1, {{0, 1, UP}}, {}},
+
+ {5, {}, {}}, /* See OneKeyShort1 */
+
+ /* Press key again after 0ms delay (same scan) before debounce finishes */
+ {10, {{0, 1, DOWN}}, {}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyBouncing1) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ {1, {{0, 1, UP}}, {}},
+ {2, {{0, 1, DOWN}}, {}},
+ {3, {{0, 1, UP}}, {}},
+ {4, {{0, 1, DOWN}}, {}},
+ {5, {{0, 1, UP}}, {}},
+ {6, {{0, 1, DOWN}}, {}},
+ {7, {{0, 1, UP}}, {}},
+ {8, {{0, 1, DOWN}}, {}},
+ {9, {{0, 1, UP}}, {}},
+ {10, {{0, 1, DOWN}}, {}},
+ {11, {{0, 1, UP}}, {}},
+ {12, {{0, 1, DOWN}}, {}},
+ {13, {{0, 1, UP}}, {}},
+ {14, {{0, 1, DOWN}}, {}},
+ {15, {{0, 1, UP}}, {}},
+
+ {20, {}, {{0, 1, UP}}},
+ /* Press key again after 1ms delay */
+ {21, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyBouncing2) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ /* Change twice in the same time period */
+ {1, {{0, 1, UP}}, {}},
+ {1, {{0, 1, DOWN}}, {}},
+ /* Change three times in the same time period */
+ {2, {{0, 1, UP}}, {}},
+ {2, {{0, 1, DOWN}}, {}},
+ {2, {{0, 1, UP}}, {}},
+ /* Change twice in the same time period */
+ {6, {{0, 1, DOWN}}, {}},
+ {6, {{0, 1, UP}}, {}},
+ /* Change three times in the same time period */
+ {7, {{0, 1, DOWN}}, {}},
+ {7, {{0, 1, UP}}, {}},
+ {7, {{0, 1, DOWN}}, {}},
+ /* Change twice in the same time period */
+ {8, {{0, 1, UP}}, {}},
+ {8, {{0, 1, DOWN}}, {}},
+ /* Change three times in the same time period */
+ {9, {{0, 1, UP}}, {}},
+ {9, {{0, 1, DOWN}}, {}},
+ {9, {{0, 1, UP}}, {}},
+
+ {14, {}, {{0, 1, UP}}},
+ /* Press key again after 1ms delay */
+ {15, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyLong) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+
+ {25, {{0, 1, UP}}, {}},
+
+ {30, {}, {{0, 1, UP}}},
+
+ {50, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+
+ {75, {{0, 1, UP}}, {}},
+
+ {80, {}, {{0, 1, UP}}},
+
+ {100, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, TwoKeysShort) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ {1, {{0, 2, DOWN}}, {{0, 2, DOWN}}},
+ /* Release key after 2ms delay */
+ {2, {{0, 1, UP}}, {}},
+ {3, {{0, 2, UP}}, {}},
+
+ {5, {}, {}}, /* See OneKeyShort1 */
+ {6, {}, {}}, /* See OneKeyShort1 */
+
+ {10, {}, {{0, 1, UP}}}, /* 5ms+5ms after DOWN at time 0 */
+ /* Press key again after 1ms delay */
+ {11, {{0, 1, DOWN}}, {{0, 1, DOWN}, {0, 2, UP}}}, /* 5ms+5ms after DOWN at time 0 */
+ {12, {{0, 2, DOWN}}, {{0, 2, DOWN}}}, /* 5ms+5ms after DOWN at time 0 */
+ });
+ runEvents();
+}
+
+
+TEST_F(DebounceTest, OneKeyDelayedScan1) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+
+ /* Processing is very late, immediately release key */
+ {300, {{0, 1, UP}}, {}},
+
+ {305, {}, {{0, 1, UP}}},
+ });
+ time_jumps_ = true;
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyDelayedScan2) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+
+ /* Processing is very late, immediately release key */
+ {300, {{0, 1, UP}}, {}},
+
+ /* Processing is very late again */
+ {600, {}, {{0, 1, UP}}},
+ });
+ time_jumps_ = true;
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyDelayedScan3) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+
+ /* Processing is very late */
+ {300, {}, {}},
+ /* Release key after 1ms */
+ {301, {{0, 1, UP}}, {}},
+
+ {306, {}, {{0, 1, UP}}},
+ });
+ time_jumps_ = true;
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyDelayedScan4) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+
+ /* Processing is very late */
+ {300, {}, {}},
+ /* Release key after 1ms */
+ {301, {{0, 1, UP}}, {}},
+
+ /* Processing is very late again */
+ {600, {}, {{0, 1, UP}}},
+ });
+ time_jumps_ = true;
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyDelayedScan5) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+
+ {5, {{0, 1, UP}}, {}},
+
+ /* Processing is very late */
+ {300, {}, {{0, 1, UP}}},
+ /* Immediately press key again */
+ {300, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ });
+ time_jumps_ = true;
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyDelayedScan6) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+
+ {5, {{0, 1, UP}}, {}},
+
+ /* Processing is very late */
+ {300, {}, {{0, 1, UP}}},
+
+ /* Press key again after 1ms */
+ {301, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ });
+ time_jumps_ = true;
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyDelayedScan7) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+
+ {5, {{0, 1, UP}}, {}},
+
+ /* Press key again before debounce expires */
+ {300, {{0, 1, DOWN}}, {}},
+ });
+ time_jumps_ = true;
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyDelayedScan8) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+
+ /* Processing is a bit late */
+ {50, {}, {}},
+ /* Release key after 1ms */
+ {51, {{0, 1, UP}}, {}},
+
+ /* Processing is a bit late again */
+ {100, {}, {{0, 1, UP}}},
+ });
+ time_jumps_ = true;
+ runEvents();
+}
diff --git a/quantum/debounce/tests/debounce_test_common.cpp b/quantum/debounce/tests/debounce_test_common.cpp
new file mode 100644
index 0000000000..1c5e7c9f4e
--- /dev/null
+++ b/quantum/debounce/tests/debounce_test_common.cpp
@@ -0,0 +1,229 @@
+/* Copyright 2021 Simon Arlott
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
+#include "gtest/gtest.h"
+
+#include "debounce_test_common.h"
+
+#include <algorithm>
+#include <iomanip>
+#include <sstream>
+
+extern "C" {
+#include "quantum.h"
+#include "timer.h"
+#include "debounce.h"
+
+void set_time(uint32_t t);
+void advance_time(uint32_t ms);
+}
+
+void DebounceTest::addEvents(std::initializer_list<DebounceTestEvent> events) {
+ events_.insert(events_.end(), events.begin(), events.end());
+}
+
+void DebounceTest::runEvents() {
+ /* Run the test multiple times, from 1kHz to 10kHz scan rate */
+ for (extra_iterations_ = 0; extra_iterations_ < 10; extra_iterations_++) {
+ if (time_jumps_) {
+ /* Don't advance time smoothly, jump to the next event (some tests require this) */
+ auto_advance_time_ = false;
+ runEventsInternal();
+ } else {
+ /* Run the test with both smooth and irregular time; it must produce the same result */
+ auto_advance_time_ = true;
+ runEventsInternal();
+ auto_advance_time_ = false;
+ runEventsInternal();
+ }
+ }
+}
+
+void DebounceTest::runEventsInternal() {
+ fast_timer_t previous = 0;
+ bool first = true;
+
+ /* Initialise keyboard with start time (offset to avoid testing at 0) and all keys UP */
+ debounce_init(MATRIX_ROWS);
+ set_time(time_offset_);
+ std::fill(std::begin(input_matrix_), std::end(input_matrix_), 0);
+ std::fill(std::begin(output_matrix_), std::end(output_matrix_), 0);
+
+ for (auto &event : events_) {
+ if (!auto_advance_time_) {
+ /* Jump to the next event */
+ set_time(time_offset_ + event.time_);
+ } else if (!first && event.time_ == previous + 1) {
+ /* This event immediately follows the previous one, don't make extra debounce() calls */
+ advance_time(1);
+ } else {
+ /* Fast forward to the time for this event, calling debounce() with no changes */
+ ASSERT_LT((time_offset_ + event.time_) - timer_read_fast(), 60000) << "Test tries to advance more than 1 minute of time";
+
+ while (timer_read_fast() != time_offset_ + event.time_) {
+ runDebounce(false);
+ checkCookedMatrix(false, "debounce() modified cooked matrix");
+ advance_time(1);
+ }
+ }
+
+ first = false;
+ previous = event.time_;
+
+ /* Prepare input matrix */
+ for (auto &input : event.inputs_) {
+ matrixUpdate(input_matrix_, "input", input);
+ }
+
+ /* Call debounce */
+ runDebounce(!event.inputs_.empty());
+
+ /* Prepare output matrix */
+ for (auto &output : event.outputs_) {
+ matrixUpdate(output_matrix_, "output", output);
+ }
+
+ /* Check output matrix has expected change events */
+ for (auto &output : event.outputs_) {
+ EXPECT_EQ(!!(cooked_matrix_[output.row_] & (1U << output.col_)), directionValue(output.direction_))
+ << "Missing event at " << strTime()
+ << " expected key " << output.row_ << "," << output.col_ << " " << directionLabel(output.direction_)
+ << "\ninput_matrix: changed=" << !event.inputs_.empty() << "\n" << strMatrix(input_matrix_)
+ << "\nexpected_matrix:\n" << strMatrix(output_matrix_)
+ << "\nactual_matrix:\n" << strMatrix(cooked_matrix_);
+ }
+
+ /* Check output matrix has no other changes */
+ checkCookedMatrix(!event.inputs_.empty(), "debounce() cooked matrix does not match expected output matrix");
+
+ /* Perform some extra iterations of the matrix scan with no changes */
+ for (int i = 0; i < extra_iterations_; i++) {
+ runDebounce(false);
+ checkCookedMatrix(false, "debounce() modified cooked matrix");
+ }
+ }
+
+ /* Check that no further changes happen for 1 minute */
+ for (int i = 0; i < 60000; i++) {
+ runDebounce(false);
+ checkCookedMatrix(false, "debounce() modified cooked matrix");
+ advance_time(1);
+ }
+
+ debounce_free();
+}
+
+void DebounceTest::runDebounce(bool changed) {
+ std::copy(std::begin(input_matrix_), std::end(input_matrix_), std::begin(raw_matrix_));
+ std::copy(std::begin(output_matrix_), std::end(output_matrix_), std::begin(cooked_matrix_));
+
+ debounce(raw_matrix_, cooked_matrix_, MATRIX_ROWS, changed);
+
+ if (!std::equal(std::begin(input_matrix_), std::end(input_matrix_), std::begin(raw_matrix_))) {
+ FAIL() << "Fatal error: debounce() modified raw matrix at " << strTime()
+ << "\ninput_matrix: changed=" << changed << "\n" << strMatrix(input_matrix_)
+ << "\nraw_matrix:\n" << strMatrix(raw_matrix_);
+ }
+}
+
+void DebounceTest::checkCookedMatrix(bool changed, const std::string &error_message) {
+ if (!std::equal(std::begin(output_matrix_), std::end(output_matrix_), std::begin(cooked_matrix_))) {
+ FAIL() << "Unexpected event: " << error_message << " at " << strTime()
+ << "\ninput_matrix: changed=" << changed << "\n" << strMatrix(input_matrix_)
+ << "\nexpected_matrix:\n" << strMatrix(output_matrix_)
+ << "\nactual_matrix:\n" << strMatrix(cooked_matrix_);
+ }
+}
+
+std::string DebounceTest::strTime() {
+ std::stringstream text;
+
+ text << "time " << (timer_read_fast() - time_offset_)
+ << " (extra_iterations=" << extra_iterations_
+ << ", auto_advance_time=" << auto_advance_time_ << ")";
+
+ return text.str();
+}
+
+std::string DebounceTest::strMatrix(matrix_row_t matrix[]) {
+ std::stringstream text;
+
+ text << "\t" << std::setw(3) << "";
+ for (int col = 0; col < MATRIX_COLS; col++) {
+ text << " " << std::setw(2) << col;
+ }
+ text << "\n";
+
+ for (int row = 0; row < MATRIX_ROWS; row++) {
+ text << "\t" << std::setw(2) << row << ":";
+ for (int col = 0; col < MATRIX_COLS; col++) {
+ text << ((matrix[row] & (1U << col)) ? " XX" : " __");
+ }
+
+ text << "\n";
+ }
+
+ return text.str();
+}
+
+bool DebounceTest::directionValue(Direction direction) {
+ switch (direction) {
+ case DOWN:
+ return true;
+
+ case UP:
+ return false;
+ }
+}
+
+std::string DebounceTest::directionLabel(Direction direction) {
+ switch (direction) {
+ case DOWN:
+ return "DOWN";
+
+ case UP:
+ return "UP";
+ }
+}
+
+/* Modify a matrix and verify that events always specify a change */
+void DebounceTest::matrixUpdate(matrix_row_t matrix[], const std::string &name, const MatrixTestEvent &event) {
+ ASSERT_NE(!!(matrix[event.row_] & (1U << event.col_)), directionValue(event.direction_))
+ << "Test " << name << " at " << strTime()
+ << " sets key " << event.row_ << "," << event.col_ << " " << directionLabel(event.direction_)
+ << " but it is already " << directionLabel(event.direction_)
+ << "\n" << name << "_matrix:\n" << strMatrix(matrix);
+
+ switch (event.direction_) {
+ case DOWN:
+ matrix[event.row_] |= (1U << event.col_);
+ break;
+
+ case UP:
+ matrix[event.row_] &= ~(1U << event.col_);
+ break;
+ }
+}
+
+DebounceTestEvent::DebounceTestEvent(fast_timer_t time,
+ std::initializer_list<MatrixTestEvent> inputs,
+ std::initializer_list<MatrixTestEvent> outputs)
+ : time_(time), inputs_(inputs), outputs_(outputs) {
+}
+
+MatrixTestEvent::MatrixTestEvent(int row, int col, Direction direction)
+ : row_(row), col_(col), direction_(direction) {
+}
diff --git a/quantum/debounce/tests/debounce_test_common.h b/quantum/debounce/tests/debounce_test_common.h
new file mode 100644
index 0000000000..d87e310594
--- /dev/null
+++ b/quantum/debounce/tests/debounce_test_common.h
@@ -0,0 +1,83 @@
+/* Copyright 2021 Simon Arlott
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
+#include "gtest/gtest.h"
+
+#include <initializer_list>
+#include <list>
+#include <string>
+
+extern "C" {
+#include "quantum.h"
+#include "timer.h"
+}
+
+enum Direction {
+ DOWN,
+ UP,
+};
+
+class MatrixTestEvent {
+public:
+ MatrixTestEvent(int row, int col, Direction direction);
+
+ const int row_;
+ const int col_;
+ const Direction direction_;
+};
+
+class DebounceTestEvent {
+public:
+ // 0, {{0, 1, DOWN}}, {{0, 1, DOWN}})
+ DebounceTestEvent(fast_timer_t time,
+ std::initializer_list<MatrixTestEvent> inputs,
+ std::initializer_list<MatrixTestEvent> outputs);
+
+ const fast_timer_t time_;
+ const std::list<MatrixTestEvent> inputs_;
+ const std::list<MatrixTestEvent> outputs_;
+};
+
+class DebounceTest : public ::testing::Test {
+protected:
+ void addEvents(std::initializer_list<DebounceTestEvent> events);
+ void runEvents();
+
+ fast_timer_t time_offset_ = 7777;
+ bool time_jumps_ = false;
+
+private:
+ static bool directionValue(Direction direction);
+ static std::string directionLabel(Direction direction);
+
+ void runEventsInternal();
+ void runDebounce(bool changed);
+ void checkCookedMatrix(bool changed, const std::string &error_message);
+ void matrixUpdate(matrix_row_t matrix[], const std::string &name, const MatrixTestEvent &event);
+
+ std::string strTime();
+ std::string strMatrix(matrix_row_t matrix[]);
+
+ std::list<DebounceTestEvent> events_;
+
+ matrix_row_t input_matrix_[MATRIX_ROWS];
+ matrix_row_t raw_matrix_[MATRIX_ROWS];
+ matrix_row_t cooked_matrix_[MATRIX_ROWS];
+ matrix_row_t output_matrix_[MATRIX_ROWS];
+
+ int extra_iterations_;
+ bool auto_advance_time_;
+};
diff --git a/quantum/debounce/tests/rules.mk b/quantum/debounce/tests/rules.mk
new file mode 100644
index 0000000000..66928d7eb6
--- /dev/null
+++ b/quantum/debounce/tests/rules.mk
@@ -0,0 +1,44 @@
+# Copyright 2021 Simon Arlott
+#
+# 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 <http://www.gnu.org/licenses/>.
+
+DEBOUNCE_COMMON_DEFS := -DMATRIX_ROWS=4 -DMATRIX_COLS=10 -DDEBOUNCE=5
+
+DEBOUNCE_COMMON_SRC := $(QUANTUM_PATH)/debounce/tests/debounce_test_common.cpp \
+ $(TMK_PATH)/common/test/timer.c
+
+debounce_sym_defer_g_DEFS := $(DEBOUNCE_COMMON_DEFS)
+debounce_sym_defer_g_SRC := $(DEBOUNCE_COMMON_SRC) \
+ $(QUANTUM_PATH)/debounce/sym_defer_g.c \
+ $(QUANTUM_PATH)/debounce/tests/sym_defer_g_tests.cpp
+
+debounce_sym_defer_pk_DEFS := $(DEBOUNCE_COMMON_DEFS)
+debounce_sym_defer_pk_SRC := $(DEBOUNCE_COMMON_SRC) \
+ $(QUANTUM_PATH)/debounce/sym_defer_pk.c \
+ $(QUANTUM_PATH)/debounce/tests/sym_defer_pk_tests.cpp
+
+debounce_sym_eager_pk_DEFS := $(DEBOUNCE_COMMON_DEFS)
+debounce_sym_eager_pk_SRC := $(DEBOUNCE_COMMON_SRC) \
+ $(QUANTUM_PATH)/debounce/sym_eager_pk.c \
+ $(QUANTUM_PATH)/debounce/tests/sym_eager_pk_tests.cpp
+
+debounce_sym_eager_pr_DEFS := $(DEBOUNCE_COMMON_DEFS)
+debounce_sym_eager_pr_SRC := $(DEBOUNCE_COMMON_SRC) \
+ $(QUANTUM_PATH)/debounce/sym_eager_pr.c \
+ $(QUANTUM_PATH)/debounce/tests/sym_eager_pr_tests.cpp
+
+debounce_asym_eager_defer_pk_DEFS := $(DEBOUNCE_COMMON_DEFS)
+debounce_asym_eager_defer_pk_SRC := $(DEBOUNCE_COMMON_SRC) \
+ $(QUANTUM_PATH)/debounce/asym_eager_defer_pk.c \
+ $(QUANTUM_PATH)/debounce/tests/asym_eager_defer_pk_tests.cpp
diff --git a/quantum/debounce/tests/sym_defer_g_tests.cpp b/quantum/debounce/tests/sym_defer_g_tests.cpp
new file mode 100644
index 0000000000..a56aecd8f3
--- /dev/null
+++ b/quantum/debounce/tests/sym_defer_g_tests.cpp
@@ -0,0 +1,223 @@
+/* Copyright 2021 Simon Arlott
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
+#include "gtest/gtest.h"
+
+#include "debounce_test_common.h"
+
+TEST_F(DebounceTest, OneKeyShort1) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {}},
+
+ {5, {}, {{0, 1, DOWN}}},
+ /* 0ms delay (fast scan rate) */
+ {5, {{0, 1, UP}}, {}},
+
+ {10, {}, {{0, 1, UP}}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyShort2) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {}},
+
+ {5, {}, {{0, 1, DOWN}}},
+ /* 1ms delay */
+ {6, {{0, 1, UP}}, {}},
+
+ {11, {}, {{0, 1, UP}}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyShort3) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {}},
+
+ {5, {}, {{0, 1, DOWN}}},
+ /* 2ms delay */
+ {7, {{0, 1, UP}}, {}},
+
+ {12, {}, {{0, 1, UP}}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyTooQuick1) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {}},
+ /* Release key exactly on the debounce time */
+ {5, {{0, 1, UP}}, {}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyTooQuick2) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {}},
+
+ {5, {}, {{0, 1, DOWN}}},
+ {6, {{0, 1, UP}}, {}},
+
+ /* Press key exactly on the debounce time */
+ {11, {{0, 1, DOWN}}, {}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyBouncing1) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {}},
+ {1, {{0, 1, UP}}, {}},
+ {2, {{0, 1, DOWN}}, {}},
+ {3, {{0, 1, UP}}, {}},
+ {4, {{0, 1, DOWN}}, {}},
+ {5, {{0, 1, UP}}, {}},
+ {6, {{0, 1, DOWN}}, {}},
+ {11, {}, {{0, 1, DOWN}}}, /* 5ms after DOWN at time 7 */
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyBouncing2) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {}},
+ {5, {}, {{0, 1, DOWN}}},
+ {6, {{0, 1, UP}}, {}},
+ {7, {{0, 1, DOWN}}, {}},
+ {8, {{0, 1, UP}}, {}},
+ {9, {{0, 1, DOWN}}, {}},
+ {10, {{0, 1, UP}}, {}},
+ {15, {}, {{0, 1, UP}}}, /* 5ms after UP at time 10 */
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyLong) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {}},
+
+ {5, {}, {{0, 1, DOWN}}},
+
+ {25, {{0, 1, UP}}, {}},
+
+ {30, {}, {{0, 1, UP}}},
+
+ {50, {{0, 1, DOWN}}, {}},
+
+ {55, {}, {{0, 1, DOWN}}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, TwoKeysShort) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {}},
+ {1, {{0, 2, DOWN}}, {}},
+
+ {6, {}, {{0, 1, DOWN}, {0, 2, DOWN}}},
+
+ {7, {{0, 1, UP}}, {}},
+ {8, {{0, 2, UP}}, {}},
+
+ {13, {}, {{0, 1, UP}, {0, 2, UP}}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, TwoKeysSimultaneous1) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}, {0, 2, DOWN}}, {}},
+
+ {5, {}, {{0, 1, DOWN}, {0, 2, DOWN}}},
+ {6, {{0, 1, UP}, {0, 2, UP}}, {}},
+
+ {11, {}, {{0, 1, UP}, {0, 2, UP}}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, TwoKeysSimultaneous2) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {}},
+ {1, {{0, 2, DOWN}}, {}},
+
+ {5, {}, {}},
+ {6, {}, {{0, 1, DOWN}, {0, 2, DOWN}}},
+ {7, {{0, 1, UP}}, {}},
+ {8, {{0, 2, UP}}, {}},
+
+ {13, {}, {{0, 1, UP}, {0, 2, UP}}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyDelayedScan1) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {}},
+
+ /* Processing is very late */
+ {300, {}, {{0, 1, DOWN}}},
+ /* Immediately release key */
+ {300, {{0, 1, UP}}, {}},
+
+ {305, {}, {{0, 1, UP}}},
+ });
+ time_jumps_ = true;
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyDelayedScan2) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {}},
+
+ /* Processing is very late */
+ {300, {}, {{0, 1, DOWN}}},
+ /* Release key after 1ms */
+ {301, {{0, 1, UP}}, {}},
+
+ {306, {}, {{0, 1, UP}}},
+ });
+ time_jumps_ = true;
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyDelayedScan3) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {}},
+
+ /* Release key before debounce expires */
+ {300, {{0, 1, UP}}, {}},
+ });
+ time_jumps_ = true;
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyDelayedScan4) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {}},
+
+ /* Processing is a bit late */
+ {50, {}, {{0, 1, DOWN}}},
+ /* Release key after 1ms */
+ {51, {{0, 1, UP}}, {}},
+
+ {56, {}, {{0, 1, UP}}},
+ });
+ time_jumps_ = true;
+ runEvents();
+}
diff --git a/quantum/debounce/tests/sym_defer_pk_tests.cpp b/quantum/debounce/tests/sym_defer_pk_tests.cpp
new file mode 100644
index 0000000000..1f3061e59c
--- /dev/null
+++ b/quantum/debounce/tests/sym_defer_pk_tests.cpp
@@ -0,0 +1,225 @@
+/* Copyright 2021 Simon Arlott
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
+#include "gtest/gtest.h"
+
+#include "debounce_test_common.h"
+
+TEST_F(DebounceTest, OneKeyShort1) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {}},
+
+ {5, {}, {{0, 1, DOWN}}},
+ /* 0ms delay (fast scan rate) */
+ {5, {{0, 1, UP}}, {}},
+
+ {10, {}, {{0, 1, UP}}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyShort2) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {}},
+
+ {5, {}, {{0, 1, DOWN}}},
+ /* 1ms delay */
+ {6, {{0, 1, UP}}, {}},
+
+ {11, {}, {{0, 1, UP}}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyShort3) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {}},
+
+ {5, {}, {{0, 1, DOWN}}},
+ /* 2ms delay */
+ {7, {{0, 1, UP}}, {}},
+
+ {12, {}, {{0, 1, UP}}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyTooQuick1) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {}},
+ /* Release key exactly on the debounce time */
+ {5, {{0, 1, UP}}, {}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyTooQuick2) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {}},
+
+ {5, {}, {{0, 1, DOWN}}},
+ {6, {{0, 1, UP}}, {}},
+
+ /* Press key exactly on the debounce time */
+ {11, {{0, 1, DOWN}}, {}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyBouncing1) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {}},
+ {1, {{0, 1, UP}}, {}},
+ {2, {{0, 1, DOWN}}, {}},
+ {3, {{0, 1, UP}}, {}},
+ {4, {{0, 1, DOWN}}, {}},
+ {5, {{0, 1, UP}}, {}},
+ {6, {{0, 1, DOWN}}, {}},
+ {11, {}, {{0, 1, DOWN}}}, /* 5ms after DOWN at time 7 */
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyBouncing2) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {}},
+ {5, {}, {{0, 1, DOWN}}},
+ {6, {{0, 1, UP}}, {}},
+ {7, {{0, 1, DOWN}}, {}},
+ {8, {{0, 1, UP}}, {}},
+ {9, {{0, 1, DOWN}}, {}},
+ {10, {{0, 1, UP}}, {}},
+ {15, {}, {{0, 1, UP}}}, /* 5ms after UP at time 10 */
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyLong) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {}},
+
+ {5, {}, {{0, 1, DOWN}}},
+
+ {25, {{0, 1, UP}}, {}},
+
+ {30, {}, {{0, 1, UP}}},
+
+ {50, {{0, 1, DOWN}}, {}},
+
+ {55, {}, {{0, 1, DOWN}}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, TwoKeysShort) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {}},
+ {1, {{0, 2, DOWN}}, {}},
+
+ {5, {}, {{0, 1, DOWN}}},
+ {6, {}, {{0, 2, DOWN}}},
+
+ {7, {{0, 1, UP}}, {}},
+ {8, {{0, 2, UP}}, {}},
+
+ {12, {}, {{0, 1, UP}}},
+ {13, {}, {{0, 2, UP}}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, TwoKeysSimultaneous1) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}, {0, 2, DOWN}}, {}},
+
+ {5, {}, {{0, 1, DOWN}, {0, 2, DOWN}}},
+ {6, {{0, 1, UP}, {0, 2, UP}}, {}},
+
+ {11, {}, {{0, 1, UP}, {0, 2, UP}}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, TwoKeysSimultaneous2) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {}},
+ {1, {{0, 2, DOWN}}, {}},
+
+ {5, {}, {{0, 1, DOWN}}},
+ {6, {{0, 1, UP}}, {{0, 2, DOWN}}},
+ {7, {{0, 2, UP}}, {}},
+
+ {11, {}, {{0, 1, UP}}},
+ {12, {}, {{0, 2, UP}}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyDelayedScan1) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {}},
+
+ /* Processing is very late */
+ {300, {}, {{0, 1, DOWN}}},
+ /* Immediately release key */
+ {300, {{0, 1, UP}}, {}},
+
+ {305, {}, {{0, 1, UP}}},
+ });
+ time_jumps_ = true;
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyDelayedScan2) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {}},
+
+ /* Processing is very late */
+ {300, {}, {{0, 1, DOWN}}},
+ /* Release key after 1ms */
+ {301, {{0, 1, UP}}, {}},
+
+ {306, {}, {{0, 1, UP}}},
+ });
+ time_jumps_ = true;
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyDelayedScan3) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {}},
+
+ /* Release key before debounce expires */
+ {300, {{0, 1, UP}}, {}},
+ });
+ time_jumps_ = true;
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyDelayedScan4) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {}},
+
+ /* Processing is a bit late */
+ {50, {}, {{0, 1, DOWN}}},
+ /* Release key after 1ms */
+ {51, {{0, 1, UP}}, {}},
+
+ {56, {}, {{0, 1, UP}}},
+ });
+ time_jumps_ = true;
+ runEvents();
+}
diff --git a/quantum/debounce/tests/sym_eager_pk_tests.cpp b/quantum/debounce/tests/sym_eager_pk_tests.cpp
new file mode 100644
index 0000000000..e0fc205e33
--- /dev/null
+++ b/quantum/debounce/tests/sym_eager_pk_tests.cpp
@@ -0,0 +1,237 @@
+/* Copyright 2021 Simon Arlott
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
+#include "gtest/gtest.h"
+
+#include "debounce_test_common.h"
+
+TEST_F(DebounceTest, OneKeyShort1) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ {1, {{0, 1, UP}}, {}},
+
+ {5, {}, {{0, 1, UP}}},
+ /* Press key again after 1ms delay (debounce has not yet finished) */
+ {6, {{0, 1, DOWN}}, {}},
+ {10, {}, {{0, 1, DOWN}}}, /* 5ms after UP at time 5 */
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyShort2) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ {1, {{0, 1, UP}}, {}},
+
+ {5, {}, {{0, 1, UP}}},
+ /* Press key again after 2ms delay (debounce has not yet finished) */
+ {7, {{0, 1, DOWN}}, {}},
+ {10, {}, {{0, 1, DOWN}}}, /* 5ms after UP at time 5 */
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyShort3) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ {1, {{0, 1, UP}}, {}},
+
+ {5, {}, {{0, 1, UP}}},
+ /* Press key again after 3ms delay (debounce has not yet finished) */
+ {8, {{0, 1, DOWN}}, {}},
+ {10, {}, {{0, 1, DOWN}}}, /* 5ms after UP at time 5 */
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyShort4) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ {1, {{0, 1, UP}}, {}},
+
+ {5, {}, {{0, 1, UP}}},
+ /* Press key again after 4ms delay (debounce has not yet finished) */
+ {9, {{0, 1, DOWN}}, {}},
+ {10, {}, {{0, 1, DOWN}}}, /* 5ms after UP at time 5 */
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyShort5) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ {1, {{0, 1, UP}}, {}},
+
+ {5, {}, {{0, 1, UP}}},
+ /* Press key again after 5ms delay (debounce has finished) */
+ {10, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyShort6) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ {1, {{0, 1, UP}}, {}},
+
+ {5, {}, {{0, 1, UP}}},
+ /* Press key after after 6ms delay (debounce has finished) */
+ {11, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyBouncing1) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ {1, {{0, 1, UP}}, {}},
+ {2, {{0, 1, DOWN}}, {}},
+ {3, {{0, 1, UP}}, {}},
+ {4, {{0, 1, DOWN}}, {}},
+ {5, {{0, 1, UP}}, {{0, 1, UP}}},
+ /* Press key again after 1ms delay (debounce has not yet finished) */
+ {6, {{0, 1, DOWN}}, {}},
+ {10, {}, {{0, 1, DOWN}}}, /* 5ms after UP at time 5 */
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyBouncing2) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ /* Change twice in the same time period */
+ {1, {{0, 1, UP}}, {}},
+ {1, {{0, 1, DOWN}}, {}},
+ /* Change three times in the same time period */
+ {2, {{0, 1, UP}}, {}},
+ {2, {{0, 1, DOWN}}, {}},
+ {2, {{0, 1, UP}}, {}},
+ /* Change three times in the same time period */
+ {3, {{0, 1, DOWN}}, {}},
+ {3, {{0, 1, UP}}, {}},
+ {3, {{0, 1, DOWN}}, {}},
+ /* Change twice in the same time period */
+ {4, {{0, 1, UP}}, {}},
+ {4, {{0, 1, DOWN}}, {}},
+ {5, {{0, 1, UP}}, {{0, 1, UP}}},
+ /* Press key again after 1ms delay (debounce has not yet finished) */
+ {6, {{0, 1, DOWN}}, {}},
+ {10, {}, {{0, 1, DOWN}}}, /* 5ms after UP at time 5 */
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyLong) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+
+ {25, {{0, 1, UP}}, {{0, 1, UP}}},
+
+ {50, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, TwoKeysShort) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ {1, {{0, 1, UP}}, {}},
+ {2, {{0, 2, DOWN}}, {{0, 2, DOWN}}},
+ {3, {{0, 2, UP}}, {}},
+
+ {5, {}, {{0, 1, UP}}},
+ /* Press key again after 1ms delay (debounce has not yet finished) */
+ {6, {{0, 1, DOWN}}, {}},
+ {7, {}, {{0, 2, UP}}},
+
+ /* Press key again after 1ms delay (debounce has not yet finished) */
+ {9, {{0, 2, DOWN}}, {}},
+ {10, {}, {{0, 1, DOWN}}}, /* 5ms after UP at time 5 */
+
+ {12, {}, {{0, 2, DOWN}}}, /* 5ms after UP at time 7 */
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyDelayedScan1) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+
+ /* Processing is very late but the change will now be accepted */
+ {300, {{0, 1, UP}}, {{0, 1, UP}}},
+ });
+ time_jumps_ = true;
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyDelayedScan2) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+
+ /* Processing is very late but the change will now be accepted even with a 1 scan delay */
+ {300, {}, {}},
+ {300, {{0, 1, UP}}, {{0, 1, UP}}},
+ });
+ time_jumps_ = true;
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyDelayedScan3) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+
+ /* Processing is very late but the change will now be accepted even with a 1ms delay */
+ {300, {}, {}},
+ {301, {{0, 1, UP}}, {{0, 1, UP}}},
+ });
+ time_jumps_ = true;
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyDelayedScan4) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+
+ /* Processing is a bit late but the change will now be accepted */
+ {50, {{0, 1, UP}}, {{0, 1, UP}}},
+ });
+ time_jumps_ = true;
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyDelayedScan5) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+
+ /* Processing is very late but the change will now be accepted even with a 1 scan delay */
+ {50, {}, {}},
+ {50, {{0, 1, UP}}, {{0, 1, UP}}},
+ });
+ time_jumps_ = true;
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyDelayedScan6) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+
+ /* Processing is very late but the change will now be accepted even with a 1ms delay */
+ {50, {}, {}},
+ {51, {{0, 1, UP}}, {{0, 1, UP}}},
+ });
+ time_jumps_ = true;
+ runEvents();
+}
diff --git a/quantum/debounce/tests/sym_eager_pr_tests.cpp b/quantum/debounce/tests/sym_eager_pr_tests.cpp
new file mode 100644
index 0000000000..2c4bca127e
--- /dev/null
+++ b/quantum/debounce/tests/sym_eager_pr_tests.cpp
@@ -0,0 +1,280 @@
+/* Copyright 2021 Simon Arlott
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
+#include "gtest/gtest.h"
+
+#include "debounce_test_common.h"
+
+TEST_F(DebounceTest, OneKeyShort1) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ {1, {{0, 1, UP}}, {}},
+
+ {5, {}, {{0, 1, UP}}},
+ /* Press key again after 1ms delay (debounce has not yet finished) */
+ {6, {{0, 1, DOWN}}, {}},
+ {10, {}, {{0, 1, DOWN}}}, /* 5ms after UP at time 5 */
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyShort2) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ {1, {{0, 1, UP}}, {}},
+
+ {5, {}, {{0, 1, UP}}},
+ /* Press key again after 2ms delay (debounce has not yet finished) */
+ {7, {{0, 1, DOWN}}, {}},
+ {10, {}, {{0, 1, DOWN}}}, /* 5ms after UP at time 5 */
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyShort3) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ {1, {{0, 1, UP}}, {}},
+
+ {5, {}, {{0, 1, UP}}},
+ /* Press key again after 3ms delay (debounce has not yet finished) */
+ {8, {{0, 1, DOWN}}, {}},
+ {10, {}, {{0, 1, DOWN}}}, /* 5ms after UP at time 5 */
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyShort4) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ {1, {{0, 1, UP}}, {}},
+
+ {5, {}, {{0, 1, UP}}},
+ /* Press key again after 4ms delay (debounce has not yet finished) */
+ {9, {{0, 1, DOWN}}, {}},
+ {10, {}, {{0, 1, DOWN}}}, /* 5ms after UP at time 5 */
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyShort5) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ {1, {{0, 1, UP}}, {}},
+
+ {5, {}, {{0, 1, UP}}},
+ /* Press key again after 5ms delay (debounce has finished) */
+ {10, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyShort6) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ {1, {{0, 1, UP}}, {}},
+
+ {5, {}, {{0, 1, UP}}},
+ /* Press key after after 6ms delay (debounce has finished) */
+ {11, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyBouncing1) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ {1, {{0, 1, UP}}, {}},
+ {2, {{0, 1, DOWN}}, {}},
+ {3, {{0, 1, UP}}, {}},
+ {4, {{0, 1, DOWN}}, {}},
+ {5, {{0, 1, UP}}, {{0, 1, UP}}},
+ /* Press key again after 1ms delay (debounce has not yet finished) */
+ {6, {{0, 1, DOWN}}, {}},
+ {10, {}, {{0, 1, DOWN}}}, /* 5ms after UP at time 5 */
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyBouncing2) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ /* Change twice in the same time period */
+ {1, {{0, 1, UP}}, {}},
+ {1, {{0, 1, DOWN}}, {}},
+ /* Change three times in the same time period */
+ {2, {{0, 1, UP}}, {}},
+ {2, {{0, 1, DOWN}}, {}},
+ {2, {{0, 1, UP}}, {}},
+ /* Change three times in the same time period */
+ {3, {{0, 1, DOWN}}, {}},
+ {3, {{0, 1, UP}}, {}},
+ {3, {{0, 1, DOWN}}, {}},
+ /* Change twice in the same time period */
+ {4, {{0, 1, UP}}, {}},
+ {4, {{0, 1, DOWN}}, {}},
+ {5, {{0, 1, UP}}, {{0, 1, UP}}},
+ /* Press key again after 1ms delay (debounce has not yet finished) */
+ {6, {{0, 1, DOWN}}, {}},
+ {10, {}, {{0, 1, DOWN}}}, /* 5ms after UP at time 5 */
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyLong) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+
+ {25, {{0, 1, UP}}, {{0, 1, UP}}},
+
+ {50, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, TwoRowsShort) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ {1, {{0, 1, UP}}, {}},
+ {2, {{2, 0, DOWN}}, {{2, 0, DOWN}}},
+ {3, {{2, 0, UP}}, {}},
+
+ {5, {}, {{0, 1, UP}}},
+ /* Press key again after 1ms delay (debounce has not yet finished) */
+ {6, {{0, 1, DOWN}}, {}},
+ {7, {}, {{2, 0, UP}}},
+
+ /* Press key again after 1ms delay (debounce has not yet finished) */
+ {9, {{2, 0, DOWN}}, {}},
+ {10, {}, {{0, 1, DOWN}}}, /* 5ms after UP at time 5 */
+
+ {12, {}, {{2, 0, DOWN}}}, /* 5ms after UP at time 7 */
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, TwoKeysOverlap) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ {1, {{0, 1, UP}}, {}},
+ /* Press a second key during the first debounce */
+ {2, {{0, 2, DOWN}}, {}},
+
+ /* Key registers as soon as debounce finishes, 5ms after time 0 */
+ {5, {}, {{0, 1, UP}, {0, 2, DOWN}}},
+ {6, {{0, 1, DOWN}}, {}},
+
+ /* Key registers as soon as debounce finishes, 5ms after time 5 */
+ {10, {}, {{0, 1, DOWN}}},
+ /* Release both keys */
+ {11, {{0, 1, UP}}, {}},
+ {12, {{0, 2, UP}}, {}},
+
+ /* Keys register as soon as debounce finishes, 5ms after time 10 */
+ {15, {}, {{0, 1, UP}, {0, 2, UP}}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, TwoKeysSimultaneous1) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}, {0, 2, DOWN}}, {{0, 1, DOWN}, {0, 2, DOWN}}},
+ {20, {{0, 1, UP}}, {{0, 1, UP}}},
+ {21, {{0, 2, UP}}, {}},
+
+ /* Key registers as soon as debounce finishes, 5ms after time 20 */
+ {25, {}, {{0, 2, UP}}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, TwoKeysSimultaneous2) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}, {0, 2, DOWN}}, {{0, 1, DOWN}, {0, 2, DOWN}}},
+ {20, {{0, 1, UP}, {0, 2, UP}}, {{0, 1, UP}, {0, 2, UP}}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyDelayedScan1) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+
+ /* Processing is very late but the change will now be accepted */
+ {300, {{0, 1, UP}}, {{0, 1, UP}}},
+ });
+ time_jumps_ = true;
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyDelayedScan2) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+
+ /* Processing is very late but the change will now be accepted even with a 1 scan delay */
+ {300, {}, {}},
+ {300, {{0, 1, UP}}, {{0, 1, UP}}},
+ });
+ time_jumps_ = true;
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyDelayedScan3) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+
+ /* Processing is very late but the change will now be accepted even with a 1ms delay */
+ {300, {}, {}},
+ {301, {{0, 1, UP}}, {{0, 1, UP}}},
+ });
+ time_jumps_ = true;
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyDelayedScan4) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+
+ /* Processing is a bit late but the change will now be accepted */
+ {50, {{0, 1, UP}}, {{0, 1, UP}}},
+ });
+ time_jumps_ = true;
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyDelayedScan5) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+
+ /* Processing is very late but the change will now be accepted even with a 1 scan delay */
+ {50, {}, {}},
+ {50, {{0, 1, UP}}, {{0, 1, UP}}},
+ });
+ time_jumps_ = true;
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyDelayedScan6) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+
+ /* Processing is very late but the change will now be accepted even with a 1ms delay */
+ {50, {}, {}},
+ {51, {{0, 1, UP}}, {{0, 1, UP}}},
+ });
+ time_jumps_ = true;
+ runEvents();
+}
diff --git a/quantum/debounce/tests/testlist.mk b/quantum/debounce/tests/testlist.mk
new file mode 100644
index 0000000000..c54c45aa63
--- /dev/null
+++ b/quantum/debounce/tests/testlist.mk
@@ -0,0 +1,6 @@
+TEST_LIST += \
+ debounce_sym_defer_g \
+ debounce_sym_defer_pk \
+ debounce_sym_eager_pk \
+ debounce_sym_eager_pr \
+ debounce_asym_eager_defer_pk
diff --git a/quantum/dip_switch.c b/quantum/dip_switch.c
index cda69bd0ef..72789ca8e8 100644
--- a/quantum/dip_switch.c
+++ b/quantum/dip_switch.c
@@ -49,13 +49,13 @@ static uint16_t scan_count;
static bool dip_switch_state[NUMBER_OF_DIP_SWITCHES] = {0};
static bool last_dip_switch_state[NUMBER_OF_DIP_SWITCHES] = {0};
-__attribute__((weak)) void dip_switch_update_user(uint8_t index, bool active) {}
+__attribute__((weak)) bool dip_switch_update_user(uint8_t index, bool active) { return true; }
-__attribute__((weak)) void dip_switch_update_kb(uint8_t index, bool active) { dip_switch_update_user(index, active); }
+__attribute__((weak)) bool dip_switch_update_kb(uint8_t index, bool active) { return dip_switch_update_user(index, active); }
-__attribute__((weak)) void dip_switch_update_mask_user(uint32_t state) {}
+__attribute__((weak)) bool dip_switch_update_mask_user(uint32_t state) { return true; }
-__attribute__((weak)) void dip_switch_update_mask_kb(uint32_t state) { dip_switch_update_mask_user(state); }
+__attribute__((weak)) bool dip_switch_update_mask_kb(uint32_t state) { return dip_switch_update_mask_user(state); }
void dip_switch_init(void) {
#ifdef DIP_SWITCH_PINS
diff --git a/quantum/dip_switch.h b/quantum/dip_switch.h
index 61ef1cc19d..058a10f41f 100644
--- a/quantum/dip_switch.h
+++ b/quantum/dip_switch.h
@@ -20,10 +20,10 @@
#include "quantum.h"
-void dip_switch_update_kb(uint8_t index, bool active);
-void dip_switch_update_user(uint8_t index, bool active);
-void dip_switch_update_mask_user(uint32_t state);
-void dip_switch_update_mask_kb(uint32_t state);
+bool dip_switch_update_kb(uint8_t index, bool active);
+bool dip_switch_update_user(uint8_t index, bool active);
+bool dip_switch_update_mask_user(uint32_t state);
+bool dip_switch_update_mask_kb(uint32_t state);
void dip_switch_init(void);
void dip_switch_read(bool forced);
diff --git a/quantum/keymap_extras/keymap_belgian.h b/quantum/keymap_extras/keymap_belgian.h
index 6aaadf9787..207905b291 100644
--- a/quantum/keymap_extras/keymap_belgian.h
+++ b/quantum/keymap_extras/keymap_belgian.h
@@ -156,16 +156,3 @@
// Row 4
#define BE_BSLS ALGR(BE_LABK) // (backslash)
#define BE_TILD ALGR(BE_EQL) // ~
-
-// DEPRECATED
-#define BE_AMP BE_AMPR
-#define BE_APOS BE_QUOT
-#define BE_PARA BE_SECT
-#define BE_MU BE_MICR
-#define BE_LESS BE_LABK
-#define BE_OVRR BE_DEG
-#define BE_UMLT BE_DIAE
-#define BE_GRTR BE_RABK
-#define BE_LSBR BE_LBRC
-#define BE_RSBR BE_RBRC
-#define BE_TILT BE_TILD
diff --git a/quantum/keymap_extras/keymap_bepo.h b/quantum/keymap_extras/keymap_bepo.h
index b6244898aa..72d5b81f32 100644
--- a/quantum/keymap_extras/keymap_bepo.h
+++ b/quantum/keymap_extras/keymap_bepo.h
@@ -181,7 +181,7 @@
#define BP_RCBR ALGR(BP_X) // }
#define BP_ELLP ALGR(BP_DOT) // …
#define BP_TILD ALGR(BP_K) // ~
-#define BP_IQUE ALGR(BP_QEST) // ¿
+#define BP_IQUE ALGR(BP_QUES) // ¿
#define BP_RNGA ALGR(BP_Q) // ° (dead)
#define BP_DGRK ALGR(BP_G) // µ (dead Greek key)
#define BP_DAGG ALGR(BP_H) // †
@@ -238,168 +238,3 @@
#define BP_FORD S(ALGR(BP_F)) // ª
// Row 5
#define BP_NNBS S(ALGR(BP_)) //   (narrow non-breaking space)
-
-// DEPRECATED
-#define BP_DOLLAR BP_DLR
-#define BP_DOUBLE_QUOTE BP_DQUO
-#define BP_DQOT BP_DQUO
-#define BP_LEFT_GUILLEMET BP_LDAQ
-#define BP_LGIL BP_LDAQ
-#define BP_RIGHT_GUILLEMET BP_RDAQ
-#define BP_RGIL BP_RDAQ
-#define BP_LEFT_PAREN BP_LPRN
-#define BP_RIGHT_PAREN BP_RPRN
-#define BP_MINUS BP_MINS
-#define BP_SLASH BP_SLSH
-#define BP_ASTERISK BP_ASTR
-#define BP_EQUAL BP_EQL
-#define BP_PERCENT BP_PERC
-#define BP_E_ACUTE BP_EACU
-#define BP_ECUT BP_EACU
-#define BP_E_GRAVE BP_EGRV
-#define BP_DEAD_CIRCUMFLEX BP_DCIR
-#define BP_DCRC BP_DCIR
-#define BP_COMMA BP_COMM
-#define BP_C_CEDILLA BP_CCED
-#define BP_E_CIRCUMFLEX BP_ECIR
-#define BP_ECRC BP_ECIR
-#define BP_A_GRAVE BP_AGRV
-#define BP_APOSTROPHE BP_QUOT
-#define BP_APOS BP_QUOT
-#define BP_DEGREE BP_DEG
-#define BP_DEGR BP_DEG
-#define BP_GRAVE BP_GRV
-#define BP_EXCLAIM BP_EXLM
-#define BP_SCOLON BP_SCLN
-#define BP_COLON BP_COLN
-#define BP_QUESTION BP_QUES
-#define BP_QEST BP_QUES
-#define BP_NON_BREAKING_SPACE BP_NBSP
-#define BP_EN_DASH BP_NDSH
-#define BP_EM_DASH BP_MDSH
-#define BP_LESS BP_LABK
-#define BP_GREATER BP_RABK
-#define BP_GRTR BP_RABK
-#define BP_LBRACKET BP_LBRC
-#define BP_RBRACKET BP_RBRC
-#define BP_CIRCUMFLEX CIRC
-#define BP_PLUS_MINUS BP_PLMN
-#define BP_PSMS BP_PLMN
-#define BP_MATH_MINUS BP_MMNS
-#define BP_OBELUS BP_DIV
-#define BP_OBEL BP_DIV
-#define BP_DIVISION_SIGN BP_DIV
-#define BP_DVSN BP_DIV
-#define BP_TIMES BP_MUL
-#define BP_TIMS BP_MUL
-#define BP_DIFFERENT BP_NEQL
-#define BP_DIFF BP_NEQL
-#define BP_PERMILLE BP_PERM
-#define BP_PMIL BP_PERM
-#define BP_DEAD_ACUTE BP_ACUT
-#define BP_DACT BP_ACUT
-#define BP_AMPERSAND BP_AMPR
-#define BP_OE_LIGATURE BP_OE
-#define BP_DEAD_GRAVE BP_DGRV
-#define BP_INVERTED_EXCLAIM BP_IEXL
-#define BP_IXLM BP_IEXL
-#define BP_DEAD_CARON BP_CARN
-#define BP_DCAR BP_CARN
-#define BP_DEAD_SLASH BP_DSLS
-#define BP_DSLH BP_DSLS
-#define BP_IJ_LIGATURE BP_IJ
-#define BP_SCHWA BP_SCHW
-#define BP_SCWA BP_SCHW
-#define BP_DEAD_BREVE BP_BREV
-#define BP_DBRV BP_BREV
-#define BP_AE_LIGATURE BP_AE
-#define BP_U_GRAVE BP_UGRV
-#define BP_DEAD_TREMA BP_DIAE
-#define BP_DTRM BP_DIAE
-#define BP_TYPOGRAPHICAL_APOSTROPHE BP_COMM
-#define BP_TAPO BP_COMM
-#define BP_COPYRIGHT BP_COPY
-#define BP_CPRT BP_COPY
-#define BP_THORN BP_THRN
-#define BP_SHARP_S BP_SS
-#define BP_SRPS BP_SS
-#define BP_REGISTERED_TRADEMARK BP_REGD
-#define BP_RTM BP_REGD
-#define BP_DEAD_TILDE BP_DTIL
-#define BP_DTLD BP_DTIL
-#define BP_DEAD_MACRON BP_MACR
-#define BP_DMCR BP_MACR
-#define BP_DEAD_CEDILLA BP_CEDL
-#define BP_DCED BP_CEDL
-#define BP_NONUS_SLASH BP_SLSH
-#define BP_NUSL BP_SLSH
-#define BP_BACKSLASH BP_BSLS
-#define BP_LEFT_CURLY_BRACE BP_LCBR
-#define BP_RIGHT_CURLY_BRACE BP_RCBR
-#define BP_ELLIPSIS BP_ELLP
-#define BP_ELPS BP_ELLP
-#define BP_TILDE BP_TILD
-#define BP_INVERTED_QUESTION BP_IQUE
-#define BP_IQST BP_IQUE
-#define BP_DEAD_RING BP_RNGA
-#define BP_DRNG BP_RNGA
-#define BP_DEAD_GREEK BP_DGRK
-#define BP_DAGGER BP_DAGG
-#define BP_DAGR BP_DAGG
-#define BP_DEAD_OGONEK BP_OGON
-#define BP_DOGO BP_OGON
-#define BP_UNDERSCORE BP_UNDS
-#define BP_PARAGRAPH BP_PARA
-#define BP_PARG BP_PARA
-#define BP_LOW_DOUBLE_QUOTE BP_DLQU
-#define BP_LWQT BP_DLQU
-#define BP_LEFT_DOUBLE_QUOTE BP_RDQU
-#define BP_RIGHT_DOUBLE_QUOTE BP_RDQU
-#define BP_LESS_OR_EQUAL BP_LEQL
-#define BP_GREATER_OR_EQUAL BP_GEQL
-#define BP_NEGATION BP_NOT
-#define BP_NEGT BP_NOT
-#define BP_ONE_QUARTER BP_QRTR
-#define BP_1QRT BP_QRTR
-#define BP_ONE_HALF BP_HALF
-#define BP_1HLF BP_HALF
-#define BP_THREE_QUARTERS TQTR
-#define BP_3QRT BP_TQTR
-#define BP_MINUTES BP_PRIM
-#define BP_MNUT BP_PRIM
-#define BP_SECONDS BP_DPRM
-#define BP_SCND BP_DPRM
-#define BP_BROKEN_PIPE BP_BRKP
-#define BP_BPIP BP_BRKP
-#define BP_DEAD_DOUBLE_ACUTE BP_DACU
-#define BP_DDCT BP_DACU
-#define BP_SECTION BP_SECT
-#define BP_GRAVE_BIS BP_GRV
-#define BP_GRVB BP_GRV
-#define BP_DEAD_DOT_ABOVE BP_DOTA
-#define BP_DDTA BP_DOTA
-#define BP_DEAD_CURRENCY BP_CURR
-#define BP_DCUR BP_CURR
-#define BP_DEAD_HORN BP_HORN
-#define BP_DHRN BP_HORN
-#define BP_LONG_S BP_LNGS
-#define BP_TRADEMARK BP_TM
-#define BP_ORDINAL_INDICATOR_O MORD
-#define BP_ORDO BP_MORD
-#define BP_DEAD_COMMA BP_DCMM
-#define BP_DCOM BP_DCMM
-#define BP_LEFT_QUOTE BP_LSQU
-#define BP_LQOT BP_LSQU
-#define BP_RIGHT_QUOTE BP_RSQU
-#define BP_RQOT BP_RSQU
-#define BP_INTERPUNCT BP_MDDT
-#define BP_IPCT BP_MDDT
-#define BP_DEAD_HOOK_ABOVE BP_HOKA
-#define BP_DHKA BP_HOKA
-#define BP_DEAD_UNDERDOT BP_DOTB
-#define BP_DUDT BP_DOTB
-#define BP_DOUBLE_DAGGER BP_DDAG
-#define BP_DDGR BP_DDAG
-#define BP_ORDINAL_INDICATOR_A BP_FORD
-#define BP_ORDA BP_FORD
-#define BP_NARROW_NON_BREAKING_SPACE BP_NNBS
diff --git a/quantum/keymap_extras/keymap_br_abnt2.h b/quantum/keymap_extras/keymap_br_abnt2.h
index 310950d49d..e91718013a 100644
--- a/quantum/keymap_extras/keymap_br_abnt2.h
+++ b/quantum/keymap_extras/keymap_br_abnt2.h
@@ -158,23 +158,3 @@
#define BR_MORD ALGR(BR_RBRC) // º
// Row 4
#define BR_CRUZ ALGR(BR_C) // â‚¢
-
-// DEPRECATED
-#define BR_CCDL BR_CCED
-#define BR_DQT BR_DQUO
-#define BR_TRMA BR_DIAE
-#define BR_GRAV BR_GRV
-#define BR_KPDT BR_PDOT
-#define BR_KPCM BR_PCMM
-#define BR_1UP BR_SUP1
-#define BR_2UP BR_SUP2
-#define BR_3UP BR_SUP3
-#define BR_ASLS BR_SLSH
-#define BR_AQST BR_QUES
-
-// Not present on Windows 10?
-#define BR_NDTD ALGR(BR_TILD) // ~
-#define BR_NDAC ALGR(BR_ACUT) // ´
-#define BR_NDGV ALGR(BR_QUOT) // `
-#define BR_NDCR ALGR(BR_CIRC) // ^
-#define BR_NDTR ALGR(BR_DIAE) // ¨
diff --git a/quantum/keymap_extras/keymap_canadian_multilingual.h b/quantum/keymap_extras/keymap_canadian_multilingual.h
index d72ea3979f..e328cf65e6 100644
--- a/quantum/keymap_extras/keymap_canadian_multilingual.h
+++ b/quantum/keymap_extras/keymap_canadian_multilingual.h
@@ -252,182 +252,3 @@
#define CA_MORD RCTL(S(CA_M)) // º
#define CA_MUL RCTL(S(CA_COMM)) // ×
#define CA_DIV RCTL(S(CA_DOT)) // ÷
-
-// DEPRECATED
-#define GR2A(kc) RCTL(kc)
-#define CSA_SLASH CA_SLSH
-#define CSA_SLSH CA_SLSH
-#define CSA_DEAD_CIRCUMFLEX CA_CIRC
-#define CSA_DCRC CA_CIRC
-#define CSA_C_CEDILLA CA_CCED
-#define CSA_CCED CA_CCED
-#define CSA_E_GRAVE CA_EGRV
-#define CSA_EGRV CA_EGRV
-#define CSA_A_GRAVE CA_AGRV
-#define CSA_AGRV CA_AGRV
-#define CSA_U_GRAVE CA_UGRV
-#define CSA_UGRV CA_UGRV
-#define CSA_E_ACUTE CA_EACU
-#define CSA_ECUT CA_EACU
-#define CSA_BACKSLASH CA_BSLS
-#define CSA_BSLS CA_BSLS
-#define CSA_QUESTION CA_QUES
-#define CSA_QEST CA_QUES
-#define CSA_DEAD_TREMA CA_DIAE
-#define CSA_DTRM CA_DIAE
-#define CSA_APOSTROPHE CA_QUOT
-#define CSA_APOS CA_QUOT
-#define CSA_DOUBLE_QUOTE CA_DQUO
-#define CSA_DQOT CA_DQUO
-#define CSA_PIPE CA_PIPE
-#define CSA_CURRENCY CA_CURR
-#define CSA_CURR CA_CURR
-#define CSA_LEFT_CURLY_BRACE CA_LCBR
-#define CSA_LCBR CA_LCBR
-#define CSA_RIGHT_CURLY_BRACE CA_RCBR
-#define CSA_RCBR CA_RCBR
-#define CSA_LBRACKET CA_LBRC
-#define CSA_LBRC CA_LBRC
-#define CSA_RBRACKET CA_RBRC
-#define CSA_RBRC CA_RBRC
-#define CSA_NEGATION CA_NOT
-#define CSA_NEGT CA_NOT
-#define CSA_EURO CA_EURO
-#define CSA_DEAD_GRAVE CA_GRV
-#define CSA_DGRV CA_GRV
-#define CSA_DEAD_TILDE CA_DTIL
-#define CSA_DTLD CA_DTIL
-#define CSA_DEGREE CA_DEG
-#define CSA_DEGR CA_DEG
-#define CSA_LEFT_GUILLEMET CA_LDAQ
-#define CSA_LGIL CA_LDAQ
-#define CSA_RIGHT_GUILLEMET CA_RDAQ
-#define CSA_RGIL CA_RDAQ
-#define CSA_LESS CA_LABK
-#define CSA_GREATER CA_RABK
-#define CSA_GRTR CA_RABK
-#define CSA_NON_BREAKING_SPACE ALGR(KC_SPC)
-#define CSA_NBSP ALGR(KC_SPC)
-#define CSA_SUPERSCRIPT_ONE CA_SUP1
-#define CSA_SUP1 CA_SUP1
-#define CSA_SUPERSCRIPT_TWO CA_SUP2
-#define CSA_SUP2 CA_SUP2
-#define CSA_SUPERSCRIPT_THREE CA_SUP3
-#define CSA_SUP3 CA_SUP3
-#define CSA_ONE_QUARTER CA_QRTR
-#define CSA_1QRT CA_QRTR
-#define CSA_ONE_HALF CA_HALF
-#define CSA_1HLF CA_HALF
-#define CSA_THREE_QUARTERS CA_TQTR
-#define CSA_3QRT CA_TQTR
-#define CSA_DEAD_CEDILLA CA_CEDL
-#define CSA_DCED CA_CEDL
-#define CSA_OMEGA CA_OMEG
-#define CSA_OMEG CA_OMEG
-#define CSA_L_STROKE CA_LSTR
-#define CSA_LSTK CA_LSTR
-#define CSA_OE_LIGATURE CA_OE
-#define CSA_OE CA_OE
-#define CSA_PARAGRAPH CA_PARA
-#define CSA_PARG CA_PARA
-#define CSA_T_STROKE CA_TSTR
-#define CSA_LEFT_ARROW CA_LARR
-#define CSA_LARW CA_LARR
-#define CSA_DOWN_ARROW CA_DARR
-#define CSA_DARW CA_DARR
-#define CSA_RIGHT_ARROW CA_RARR
-#define CSA_RARW CA_RARR
-#define CSA_O_STROKE CA_OSTR
-#define CSA_OSTK CA_OSTR
-#define CSA_THORN CA_THRN
-#define CSA_THRN CA_THRN
-#define CSA_TILDE CA_TILD
-#define CSA_TILD CA_TILD
-#define CSA_AE_LIGATURE CA_AE
-#define CSA_AE CA_AE
-#define CSA_SHARP_S CA_SS
-#define CSA_SRPS CA_SS
-#define CSA_ETH CA_ETH
-#define CSA_ENG CA_ENG
-#define CSA_H_SRTOKE CA_HSTR
-#define CSA_HSTK CA_HSTR
-#define CSA_IJ_LIGATURE CA_IJ
-#define CSA_IJ CA_IJ
-#define CSA_KRA CA_KRA
-#define CSA_L_FLOWN_DOT CA_LMDT
-#define CSA_LFLD CA_LMDT
-#define CSA_DEAD_ACUTE CA_ACUT
-#define CSA_DACT CA_ACUT
-#define CSA_CENT CA_CENT
-#define CSA_LEFT_DOUBLE_QUOTE CA_LDQU
-#define CSA_LDQT CA_LDQU
-#define CSA_RIGHT_DOUBLE_QUOTE CA_RDQU
-#define CSA_RDQT CA_RDQU
-#define CSA_N_APOSTROPHE CA_APSN
-#define CSA_NAPO CA_APSN
-#define CSA_MU CA_MICR
-#define CSA_HORIZONTAL_BAR CA_HRZB
-#define CSA_HZBR CA_HRZB
-#define CSA_DEAD_DOT_ABOVE CA_DOTA
-#define CSA_DDTA CA_DOTA
-#define CSA_SOFT_HYPHEN CA_SHYP
-#define CSA_SHYP CA_SHYP
-#define CSA_INVERTED_EXCLAIM CA_IEXL
-#define CSA_IXLM CA_IEXL
-#define CSA_POUND CA_PND
-#define CSA_GBP CA_PND
-#define CSA_EURO_BIS CA_EURO
-#define CSA_EURB CA_EURO
-#define CSA_THREE_EIGHTHS CA_TEIG
-#define CSA_3ON8 CA_TEIG
-#define CSA_FIVE_EIGHTHS CA_FEIG
-#define CSA_5ON8 CA_FEIG
-#define CSA_SEVEN_EIGHTHS CA_SEIG
-#define CSA_7ON8 CA_SEIG
-#define CSA_TRADEMARK CA_TM
-#define CSA_TM CA_TM
-#define CSA_PLUS_MINUS CA_PLMN
-#define CSA_PSMS CA_PLMN
-#define CSA_INVERTED_QUESTION CA_IQUE
-#define CSA_IQST CA_IQUE
-#define CSA_DEAD_OGONEK CA_OGON
-#define CSA_DOGO CA_OGON
-#define CSA_REGISTERED_TRADEMARK CA_REGD
-#define CSA_RTM CA_REGD
-#define CSA_YEN CA_YEN
-#define CSA_YUAN CA_YEN
-#define CSA_UP_ARROW CA_UARR
-#define CSA_DOTLESS_I CA_DLSI
-#define CSA_DLSI CA_DLSI
-#define CSA_DEAD_RING CA_RNGA
-#define CSA_DRNG CA_RNGA
-#define CSA_DEAD_MACRON CA_MACR
-#define CSA_DMCR CA_MACR
-#define CSA_SECTION CA_SECT
-#define CSA_SECT CA_SECT
-#define CSA_ORDINAL_INDICATOR_A CA_FORD
-#define CSA_ORDA CA_FORD
-#define CSA_DEAD_DOUBLE_ACUTE CA_DACU
-#define CSA_DDCT CA_DACU
-#define CSA_DEAD_CARON CA_CARN
-#define CSA_DCAR CA_CARN
-#define CSA_DEAD_BREVE CA_BREV
-#define CSA_DBRV CA_BREV
-#define CSA_BROKEN_PIPE CA_BRKP
-#define CSA_BPIP CA_BRKP
-#define CSA_COPYRIGHT CA_COPY
-#define CSA_CPRT CA_COPY
-#define CSA_LEFT_QUOTE CA_LSQU
-#define CSA_LQOT CA_LSQU
-#define CSA_RIGHT_QUOTE CA_RSQU
-#define CSA_RQOT CA_RSQU
-#define CSA_EIGHTH_NOTE CA_ENOT
-#define CSA_8NOT CA_ENOT
-#define CSA_ORDINAL_INDICATOR_O CA_MORD
-#define CSA_ORDO CA_MORD
-#define CSA_TIMES CA_MUL
-#define CSA_TIMS CA_MUL
-#define CSA_OBELUS CA_DIV
-#define CSA_OBEL CA_DIV
-#define CSA_DIVISION_SIGN CA_DIV
-#define CSA_DVSN CA_DIV
diff --git a/quantum/keymap_extras/keymap_colemak.h b/quantum/keymap_extras/keymap_colemak.h
index a97be9ad5d..6658cc1301 100644
--- a/quantum/keymap_extras/keymap_colemak.h
+++ b/quantum/keymap_extras/keymap_colemak.h
@@ -123,35 +123,3 @@
#define CM_LABK S(CM_COMM) // <
#define CM_RABK S(CM_DOT) // >
#define CM_QUES S(CM_SLSH) // /
-
-// DEPRECATED
-#define KC_CM_Q CM_Q
-#define KC_CM_W CM_W
-#define KC_CM_F CM_F
-#define KC_CM_P CM_P
-#define KC_CM_G CM_G
-#define KC_CM_J CM_J
-#define KC_CM_L CM_L
-#define KC_CM_U CM_U
-#define KC_CM_Y CM_Y
-#define KC_CM_SCLN CM_SCLN
-#define KC_CM_A CM_A
-#define KC_CM_R CM_R
-#define KC_CM_S CM_S
-#define KC_CM_T CM_T
-#define KC_CM_D CM_D
-#define KC_CM_H CM_H
-#define KC_CM_N CM_N
-#define KC_CM_E CM_E
-#define KC_CM_I CM_I
-#define KC_CM_O CM_O
-#define KC_CM_Z CM_Z
-#define KC_CM_X CM_X
-#define KC_CM_C CM_C
-#define KC_CM_V CM_V
-#define KC_CM_B CM_B
-#define KC_CM_K CM_K
-#define KC_CM_M CM_M
-#define KC_CM_COMM CM_COMM
-#define KC_CM_DOT CM_DOT
-#define KC_CM_SLSH CM_SLSH
diff --git a/quantum/keymap_extras/keymap_fr_ch.h b/quantum/keymap_extras/keymap_fr_ch.h
index fea44324b1..b1f2455a68 100644
--- a/quantum/keymap_extras/keymap_fr_ch.h
+++ b/quantum/keymap_extras/keymap_fr_ch.h
@@ -162,82 +162,3 @@
#define CH_RCBR ALGR(CH_DLR) // }
// Row 4
#define CH_BSLS ALGR(CH_LABK) // (backslash)
-
-// DEPRECATED
-#define FR_CH_Z CH_Z
-#define FR_CH_Y CH_Y
-#define FR_CH_A CH_A
-#define FR_CH_B CH_B
-#define FR_CH_C CH_C
-#define FR_CH_D CH_D
-#define FR_CH_E CH_E
-#define FR_CH_F CH_F
-#define FR_CH_G CH_G
-#define FR_CH_H CH_H
-#define FR_CH_I CH_I
-#define FR_CH_J CH_J
-#define FR_CH_K CH_K
-#define FR_CH_L CH_L
-#define FR_CH_M CH_M
-#define FR_CH_N CH_N
-#define FR_CH_O CH_O
-#define FR_CH_P CH_P
-#define FR_CH_Q CH_Q
-#define FR_CH_R CH_R
-#define FR_CH_S CH_S
-#define FR_CH_T CH_T
-#define FR_CH_U CH_U
-#define FR_CH_V CH_V
-#define FR_CH_W CH_W
-#define FR_CH_X CH_X
-#define FR_CH_0 CH_0
-#define FR_CH_1 CH_1
-#define FR_CH_2 CH_2
-#define FR_CH_3 CH_3
-#define FR_CH_4 CH_4
-#define FR_CH_5 CH_5
-#define FR_CH_6 CH_6
-#define FR_CH_7 CH_7
-#define FR_CH_8 CH_8
-#define FR_CH_9 CH_9
-#define FR_CH_DOT CH_DOT
-#define FR_CH_COMM CH_COMM
-#define FR_CH_QUOT CH_QUOT
-#define FR_CH_AE CH_AGRV
-#define FR_CH_UE CH_EGRV
-#define FR_CH_OE CH_EACU
-#define FR_CH_CIRC CH_CIRC
-#define FR_CH_LESS CH_LABK
-#define FR_CH_MINS CH_MINS
-#define FR_CH_DLR CH_DLR
-#define FR_CH_PARA CH_SECT
-#define FR_CH_DIAE CH_DIAE
-#define FR_CH_RING CH_DEG
-#define FR_CH_EXLM CH_EXLM
-#define FR_CH_PLUS CH_PLUS
-#define FR_CH_DQOT CH_DQUO
-#define FR_CH_ASTR CH_ASTR
-#define FR_CH_PERC CH_PERC
-#define FR_CH_AMPR CH_AMPR
-#define FR_CH_SLSH CH_SLSH
-#define FR_CH_LPRN CH_LPRN
-#define FR_CH_RPRN CH_RPRN
-#define FR_CH_EQL CH_EQL
-#define FR_CH_QST CH_QUES
-#define FR_CH_MORE CH_RABK
-#define FR_CH_COLN CH_COLN
-#define FR_CH_SCLN CH_SCLN
-#define FR_CH_UNDS CH_UNDS
-#define FR_CH_CCED CH_CCED
-#define FR_CH_GRV CH_GRV
-#define FR_CH_LCBR CH_LCBR
-#define FR_CH_LBRC CH_LBRC
-#define FR_CH_RBRC CH_RBRC
-#define FR_CH_RCBR CH_RCBR
-#define FR_CH_BSLS CH_BSLS
-#define FR_CH_AT CH_AT
-#define FR_CH_EURO CH_EURO
-#define FR_CH_TILD CH_TILD
-#define FR_CH_PIPE CH_PIPE
-#define FR_CH_HASH CH_HASH
-#define FR_CH_ACUT CH_ACUT
diff --git a/quantum/keymap_extras/keymap_french.h b/quantum/keymap_extras/keymap_french.h
index c62f2c4036..0be53f0a9c 100644
--- a/quantum/keymap_extras/keymap_french.h
+++ b/quantum/keymap_extras/keymap_french.h
@@ -152,14 +152,3 @@
// Row 2
#define FR_EURO ALGR(KC_E) // €
#define FR_CURR ALGR(FR_DLR) // ¤
-
-// DEPRECATED
-#define FR_AMP FR_AMPR
-#define FR_APOS FR_QUOT
-#define FR_LESS FR_LABK
-#define FR_OVRR FR_DEG
-#define FR_UMLT FR_DIAE
-#define FR_MU FR_MICR
-#define FR_GRTR FR_RABK
-#define FR_CCIRC FR_CIRC
-#define FR_BULT FR_CURR
diff --git a/quantum/keymap_extras/keymap_french_osx.h b/quantum/keymap_extras/keymap_french_osx.h
index 76eb221918..590a57e55c 100644
--- a/quantum/keymap_extras/keymap_french_osx.h
+++ b/quantum/keymap_extras/keymap_french_osx.h
@@ -246,15 +246,3 @@
#define FR_IQUE S(A(FR_COMM)) // ¿
#define FR_BSLS S(A(FR_COLN)) // (backslash)
#define FR_PLMN S(A(FR_EQL)) // ±
-
-// DEPRECATED
-#define FR_AMP FR_AMPR
-#define FR_EACU FR_LEAC
-#define FR_APOS FR_QUOT
-#define FR_EGRV FR_LEGR
-#define FR_CCED FR_LCCE
-#define FR_AGRV FR_LAGR
-#define FR_UGRV FR_LUGR
-#define FR_LESS FR_LABK
-#define FR_UMLT FR_DIAE
-#define FR_GRTR FR_RABK
diff --git a/quantum/keymap_extras/keymap_german.h b/quantum/keymap_extras/keymap_german.h
index 924bde6d36..085995b0c6 100644
--- a/quantum/keymap_extras/keymap_german.h
+++ b/quantum/keymap_extras/keymap_german.h
@@ -151,16 +151,3 @@
// Row 4
#define DE_PIPE ALGR(DE_LABK) // |
#define DE_MICR ALGR(DE_M) // µ
-
-// DEPRECATED
-#define DE_UE DE_UDIA
-#define DE_OE DE_ODIA
-#define DE_AE DE_ADIA
-#define DE_LESS DE_LABK
-#define DE_RING DE_DEG
-#define DE_DQOT DE_DQUO
-#define DE_PARA DE_SECT
-#define DE_QST DE_QUES
-#define DE_MORE DE_RABK
-#define DE_SQ2 DE_SUP2
-#define DE_SQ3 DE_SUP3
diff --git a/quantum/keymap_extras/keymap_german_ch.h b/quantum/keymap_extras/keymap_german_ch.h
index fee37eabb8..6723836870 100644
--- a/quantum/keymap_extras/keymap_german_ch.h
+++ b/quantum/keymap_extras/keymap_german_ch.h
@@ -162,21 +162,3 @@
#define CH_RCBR ALGR(CH_DLR) // }
// Row 4
#define CH_BSLS ALGR(CH_LABK) // (backslash)
-
-// DEPRECATED
-#define CH_AE CH_ADIA
-#define CH_UE CH_UDIA
-#define CH_OE CH_ODIA
-#define CH_PARA CH_SECT
-#define CH_CARR CH_CIRC
-#define CH_DIER CH_DIAE
-#define CH_LESS CH_LABK
-#define CH_RING CH_DEG
-#define CH_DQOT CH_DQUO
-#define CH_PAST CH_ASTR
-#define CH_CELA CH_CCED
-#define CH_QST CH_QUES
-#define CH_POND CH_PND
-#define CH_MORE CH_RABK
-#define CH_BRBR CH_BRKP
-#define CH_NOTL CH_NOT
diff --git a/quantum/keymap_extras/keymap_german_osx.h b/quantum/keymap_extras/keymap_german_osx.h
index be109a721e..82404fa5fd 100644
--- a/quantum/keymap_extras/keymap_german_osx.h
+++ b/quantum/keymap_extras/keymap_german_osx.h
@@ -241,83 +241,3 @@
#define DE_OGON S(A(DE_COMM)) // Ë›
#define DE_DIV S(A(DE_DOT)) // ÷
#define DE_MDSH S(A(DE_MINS)) // —
-
-// DEPRECATED
-#define DE_OSX_CIRC DE_CIRC
-#define DE_OSX_1 DE_1
-#define DE_OSX_2 DE_2
-#define DE_OSX_3 DE_3
-#define DE_OSX_4 DE_4
-#define DE_OSX_5 DE_5
-#define DE_OSX_6 DE_6
-#define DE_OSX_7 DE_7
-#define DE_OSX_8 DE_8
-#define DE_OSX_9 DE_9
-#define DE_OSX_0 DE_0
-#define DE_OSX_SS DE_SS
-#define DE_OSX_ACUT DE_ACUT
-#define DE_OSX_Q DE_Q
-#define DE_OSX_W DE_W
-#define DE_OSX_E DE_E
-#define DE_OSX_R DE_R
-#define DE_OSX_T DE_T
-#define DE_OSX_Z DE_Z
-#define DE_OSX_U DE_U
-#define DE_OSX_I DE_I
-#define DE_OSX_O DE_O
-#define DE_OSX_P DE_P
-#define DE_OSX_UE DE_UDIA
-#define DE_OSX_PLUS DE_PLUS
-#define DE_OSX_A DE_A
-#define DE_OSX_S DE_S
-#define DE_OSX_D DE_D
-#define DE_OSX_F DE_F
-#define DE_OSX_G DE_G
-#define DE_OSX_H DE_H
-#define DE_OSX_J DE_J
-#define DE_OSX_K DE_K
-#define DE_OSX_L DE_L
-#define DE_OSX_OE DE_ODIA
-#define DE_OSX_AE DE_ADIA
-#define DE_OSX_HASH DE_HASH
-#define DE_OSX_LESS DE_LABK
-#define DE_OSX_Y DE_Y
-#define DE_OSX_X DE_X
-#define DE_OSX_C DE_C
-#define DE_OSX_V DE_V
-#define DE_OSX_B DE_B
-#define DE_OSX_N DE_N
-#define DE_OSX_M DE_M
-#define DE_OSX_COMM DE_COMM
-#define DE_OSX_DOT DE_DOT
-#define DE_OSX_MINS DE_MINS
-
-#define DE_OSX_RING DE_DEG
-#define DE_OSX_EXLM DE_EXLM
-#define DE_OSX_DQOT DE_DQUO
-#define DE_OSX_PARA DE_SECT
-#define DE_OSX_DLR DE_DLR
-#define DE_OSX_PERC DE_PERC
-#define DE_OSX_AMPR DE_AMPR
-#define DE_OSX_SLSH DE_SLSH
-#define DE_OSX_LPRN DE_LPRN
-#define DE_OSX_RPRN DE_RPRN
-#define DE_OSX_EQL DE_EQL
-#define DE_OSX_QST DE_QUES
-#define DE_OSX_GRV DE_GRV
-#define DE_OSX_ASTR DE_ASTR
-#define DE_OSX_QUOT DE_QUOT
-#define DE_OSX_MORE DE_RABK
-#define DE_OSX_COLN DE_COLN
-#define DE_OSX_SCLN DE_SCLN
-#define DE_OSX_UNDS DE_UNDS
-
-#define DE_OSX_LBRC DE_LBRC
-#define DE_OSX_RBRC DE_RBRC
-#define DE_OSX_PIPE DE_PIPE
-#define DE_OSX_LCBR DE_LCBR
-#define DE_OSX_RCBR DE_RCBR
-#define DE_OSX_AT DE_AT
-#define DE_OSX_EURO DE_EURO
-#define DE_OSX_TILD DE_TILD
-#define DE_OSX_BSLS DE_BSLS
diff --git a/quantum/keymap_extras/keymap_hungarian.h b/quantum/keymap_extras/keymap_hungarian.h
index 1b282a4615..a4e4b1a522 100644
--- a/quantum/keymap_extras/keymap_hungarian.h
+++ b/quantum/keymap_extras/keymap_hungarian.h
@@ -169,22 +169,3 @@
#define HU_RCBR ALGR(HU_N) // }
#define HU_SCLN ALGR(HU_COMM) // ;
#define HU_ASTR ALGR(HU_MINS) // *
-
-// DEPRECATED
-#define HU_OE HU_ODIA
-#define HU_UE HU_UDIA
-#define HU_OO HU_OACU
-#define HU_OEE HU_ODAC
-#define HU_UU HU_UACU
-#define HU_EE HU_EACU
-#define HU_AA HU_AACU
-#define HU_UEE HU_UDAC
-#define HU_II HU_IACU
-#define HU_PARA HU_SECT
-#define HU_DQOT HU_DQUO
-#define HU_QST HU_QUES
-#define HU_BRV HU_BREV
-#define HU_RING HU_RNGA
-#define HU_CRSS HU_MUL
-#define HU_LESS HU_LABK
-#define HU_MORE HU_RABK
diff --git a/quantum/keymap_extras/keymap_italian.h b/quantum/keymap_extras/keymap_italian.h
index 5d19e56d38..be495f85ba 100644
--- a/quantum/keymap_extras/keymap_italian.h
+++ b/quantum/keymap_extras/keymap_italian.h
@@ -163,22 +163,3 @@
// Row 2
#define IT_LCBR S(ALGR(IT_EGRV)) // {
#define IT_RCBR S(ALGR(IT_PLUS)) // }
-
-// DEPRECATED
-#define IT_BKSL IT_BSLS
-#define IT_APOS IT_QUOT
-#define IT_IACC IT_IGRV
-#define IT_EACC IT_EGRV
-#define IT_OACC IT_OGRV
-#define IT_AACC IT_AGRV
-#define IT_UACC IT_UGRV
-#define IT_LESS IT_LABK
-#define IT_DQOT IT_DQUO
-#define IT_STRL IT_PND
-#define IT_QST IT_QUES
-#define IT_CRC IT_CIRC
-#define IT_MORE IT_RABK
-#define IT_SHRP IT_HASH
-
-#define IT_X_PLUS X_RBRACKET
-#define IT_ACUT
diff --git a/quantum/keymap_extras/keymap_italian_osx_ansi.h b/quantum/keymap_extras/keymap_italian_osx_ansi.h
index 488a6561ee..c2b8e3cad6 100644
--- a/quantum/keymap_extras/keymap_italian_osx_ansi.h
+++ b/quantum/keymap_extras/keymap_italian_osx_ansi.h
@@ -248,21 +248,3 @@
#define IT_CUAC S(A(IT_M)) // Ú
#define IT_MDDT S(A(IT_DOT)) // ·
#define IT_MDSH S(A(IT_MINS)) // —
-
-// DEPRECATED
-#define IT_LESS IT_LABK
-#define IT_APOS IT_QUOT
-#define IT_IACC IT_IGRV
-#define IT_EACC IT_EGRV
-#define IT_UACC IT_UGRV
-#define IT_OACC IT_OGRV
-#define IT_AACC IT_AGRV
-#define IT_MORE IT_RABK
-#define IT_DQOT IT_DQUO
-#define IT_STRL IT_PND
-#define IT_QST IT_QUES
-#define IT_CRC IT_CIRC
-#define IT_DEGR IT_DEG
-#define IT_TILDE IT_TILD
-#define IT_GRAVE IT_GRV
-#define IT_SHRP IT_HASH
diff --git a/quantum/keymap_extras/keymap_italian_osx_iso.h b/quantum/keymap_extras/keymap_italian_osx_iso.h
index e4fb03acf7..61f76ddba7 100644
--- a/quantum/keymap_extras/keymap_italian_osx_iso.h
+++ b/quantum/keymap_extras/keymap_italian_osx_iso.h
@@ -249,21 +249,3 @@
#define IT_CUAC S(A(IT_M)) // Ú
#define IT_MDDT S(A(IT_DOT)) // ·
#define IT_MDSH S(A(IT_MINS)) // —
-
-// DEPRECATED
-#define IT_APOS IT_QUOT
-#define IT_IACC IT_IGRV
-#define IT_EACC IT_EGRV
-#define IT_OACC IT_OGRV
-#define IT_AACC IT_AGRV
-#define IT_UACC IT_UGRV
-#define IT_LESS IT_LABK
-#define IT_DQOT IT_DQUO
-#define IT_STRL IT_PND
-#define IT_QST IT_QUES
-#define IT_CRC IT_CIRC
-#define IT_DEGR IT_DEG
-#define IT_MORE IT_RABK
-#define IT_TILDE IT_TILD
-#define IT_GRAVE IT_GRV
-#define IT_SHRP IT_HASH
diff --git a/quantum/keymap_extras/keymap_jp.h b/quantum/keymap_extras/keymap_jp.h
index cd3c08f9f0..d10feb5856 100644
--- a/quantum/keymap_extras/keymap_jp.h
+++ b/quantum/keymap_extras/keymap_jp.h
@@ -137,12 +137,3 @@
#define JP_RABK S(JP_DOT) // >
#define JP_QUES S(JP_SLSH) // ?
#define JP_UNDS S(JP_BSLS) // _
-
-// DEPRECATED
-#define JP_ZHTG JP_ZKHK
-#define JP_DQT JP_DQUO
-#define JP_LT JP_LABK
-#define JP_GT JP_RABK
-
-#define JP_MEISU KC_LANG2 // Eisū (英数) on macOS
-#define JP_MKANA KC_LANG1 // Kana (ã‹ãª) on macOS
diff --git a/quantum/keymap_extras/keymap_neo2.h b/quantum/keymap_extras/keymap_neo2.h
index 8d5323c6a8..f9fc00d794 100644
--- a/quantum/keymap_extras/keymap_neo2.h
+++ b/quantum/keymap_extras/keymap_neo2.h
@@ -88,55 +88,3 @@
#define NE_J KC_SLSH // J
// Row 5
#define NE_L4R KC_ALGR // (layer 4)
-
-// DEPRECATED
-#define NEO_A NE_A
-#define NEO_B NE_B
-#define NEO_C NE_C
-#define NEO_D NE_D
-#define NEO_E NE_E
-#define NEO_F NE_F
-#define NEO_G NE_G
-#define NEO_H NE_H
-#define NEO_I NE_I
-#define NEO_J NE_J
-#define NEO_K NE_K
-#define NEO_L NE_L
-#define NEO_M NE_M
-#define NEO_N NE_N
-#define NEO_O NE_O
-#define NEO_P NE_P
-#define NEO_Q NE_Q
-#define NEO_R NE_R
-#define NEO_S NE_S
-#define NEO_T NE_T
-#define NEO_U NE_U
-#define NEO_V NE_V
-#define NEO_W NE_W
-#define NEO_X NE_X
-#define NEO_Y NE_Y
-#define NEO_Z NE_Z
-#define NEO_AE NE_ADIA
-#define NEO_OE NE_ODIA
-#define NEO_UE NE_UDIA
-#define NEO_SS NE_SS
-#define NEO_DOT NE_DOT
-#define NEO_COMM NE_COMM
-#define NEO_1 NE_1
-#define NEO_2 NE_2
-#define NEO_3 NE_3
-#define NEO_4 NE_4
-#define NEO_5 NE_5
-#define NEO_6 NE_6
-#define NEO_7 NE_7
-#define NEO_8 NE_8
-#define NEO_9 NE_9
-#define NEO_0 NE_0
-#define NEO_MINS NE_MINS
-#define NEO_ACUT NE_ACUT
-#define NEO_GRV NE_GRV
-#define NEO_CIRC NE_CIRC
-#define NEO_L1_L NE_L3L
-#define NEO_L1_R NE_L3R
-#define NEO_L2_L NE_L4L
-#define NEO_L2_R NE_L4R
diff --git a/quantum/keymap_extras/keymap_norwegian.h b/quantum/keymap_extras/keymap_norwegian.h
index 74c0c1ae27..b2499f4fda 100644
--- a/quantum/keymap_extras/keymap_norwegian.h
+++ b/quantum/keymap_extras/keymap_norwegian.h
@@ -150,26 +150,3 @@
#define NO_TILD ALGR(NO_DIAE) // ~ (dead)
// Row 4
#define NO_MICR ALGR(NO_M) // µ
-
-// DEPRECATED
-#define NO_AM NO_ARNG
-#define NO_AA NO_ARNG
-#define NO_OSLH NO_OSTR
-#define NO_APOS NO_QUOT
-#define NO_LESS NO_LABK
-#define NO_QUO2 NO_DQUO
-#define NO_BULT NO_CURR
-#define NO_GRTR NO_RABK
-#define NO_MU NO_MICR
-// Norwegian macOS symbols
-#define NO_ACUT_MAC NO_BSLS // ´
-#define NO_APOS_MAC NO_LABK // '
-#define NO_AT_MAC NO_QUOT // @
-#define NO_BSLS_MAC S(ALGR(NO_7)) // (backslash)
-#define NO_DLR_MAC S(NO_4) // $
-#define NO_GRV_MAC ALGR(NO_BSLS) // `
-#define NO_GRTR_MAC S(NO_PIPE) // >
-#define NO_LCBR_MAC S(ALGR(NO_8)) // {
-#define NO_LESS_MAC NO_PIPE // <
-#define NO_PIPE_MAC ALGR(NO_7) // |
-#define NO_RCBR_MAC S(ALGR(NO_9)) // }
diff --git a/quantum/keymap_extras/keymap_slovenian.h b/quantum/keymap_extras/keymap_slovenian.h
index 06be62cf33..827fa06c25 100644
--- a/quantum/keymap_extras/keymap_slovenian.h
+++ b/quantum/keymap_extras/keymap_slovenian.h
@@ -161,11 +161,3 @@
#define SI_LCBR ALGR(SI_B) // {
#define SI_RCBR ALGR(SI_N) // }
#define SI_SECT ALGR(SI_M) // §
-
-// DEPRECATED
-#define SI_QOT SI_QUOT
-#define SI_SV SI_SCAR
-#define SI_CV SI_CCAR
-#define SI_ZV SI_ZCAR
-#define SI_DQOT SI_DQUO
-#define SI_QST SI_QUES
diff --git a/quantum/keymap_extras/keymap_spanish.h b/quantum/keymap_extras/keymap_spanish.h
index 4e888c5133..8432c56e99 100644
--- a/quantum/keymap_extras/keymap_spanish.h
+++ b/quantum/keymap_extras/keymap_spanish.h
@@ -151,12 +151,3 @@
// Row 3
#define ES_LCBR ALGR(ES_ACUT) // {
#define ES_RCBR ALGR(ES_CCED) // }
-
-// DEPRECATED
-#define ES_OVRR ES_MORD
-#define ES_APOS ES_QUOT
-#define ES_LESS ES_LABK
-#define ES_ASML ES_FORD
-#define ES_OVDT ES_BULT
-#define ES_UMLT ES_DIAE
-#define ES_GRTR ES_RABK
diff --git a/quantum/keymap_extras/keymap_swedish.h b/quantum/keymap_extras/keymap_swedish.h
index aef8d003d6..cadb66d3bd 100644
--- a/quantum/keymap_extras/keymap_swedish.h
+++ b/quantum/keymap_extras/keymap_swedish.h
@@ -154,26 +154,3 @@
// DEPRECATED
#include "keymap_nordic.h"
-
-#define SE_OSLH SE_ODIA
-#define SE_APOS SE_QUOT
-#define SE_LESS SE_LABK
-#define SE_QUO2 SE_DQUO
-#define SE_BULT SE_CURR
-#define SE_GRTR SE_RABK
-#define SE_AA SE_ARNG
-#define SE_AE SE_ADIA
-#define SE_AM SE_ARNG
-#define SE_MU SE_MICR
-// Swedish macOS symbols (not vetted)
-#define SE_ACUT_MAC SE_ACUT
-#define SE_APOS_MAC SE_LABK
-#define SE_AT_MAC SE_ADIA
-#define SE_BSLS_MAC S(SE_LCBR)
-#define SE_DLR_MAC SE_CURR
-#define SE_GRV_MAC SE_BSLS
-#define SE_GRTR_MAC SE_HALF
-#define SE_LCBR_MAC S(SE_LBRC)
-#define SE_LESS_MAC SE_SECT
-#define SE_PIPE_MAC SE_LCBR
-#define SE_RCBR_MAC S(SE_RBRC)
diff --git a/quantum/keymap_extras/keymap_uk.h b/quantum/keymap_extras/keymap_uk.h
index 1eba0ed2f4..03fe8149f0 100644
--- a/quantum/keymap_extras/keymap_uk.h
+++ b/quantum/keymap_extras/keymap_uk.h
@@ -149,78 +149,3 @@
#define UK_OACU ALGR(KC_O) // Ó
// Row 3
#define UK_AACU ALGR(KC_A) // Ã
-
-// DEPRECATED
-#define UK_ESC KC_ESC
-#define UK_F1 KC_F1
-#define UK_F2 KC_F2
-#define UK_F3 KC_F3
-#define UK_F4 KC_F4
-#define UK_F5 KC_F5
-#define UK_F6 KC_F6
-#define UK_F7 KC_F7
-#define UK_F8 KC_F8
-#define UK_F9 KC_F9
-#define UK_F10 KC_F10
-#define UK_F11 KC_F11
-#define UK_F12 KC_F12
-#define UK_PSCR KC_PSCR
-#define UK_SLCK KC_SLCK
-#define UK_PAUS KC_PAUS
-#define UK_BSPC KC_BSPC
-#define UK_TAB KC_TAB
-#define UK_ENT KC_ENT
-#define UK_LSFT KC_LSFT
-#define UK_RSFT KC_RSFT
-#define UK_LCTL KC_LCTL
-#define UK_LGUI KC_LGUI
-#define UK_LALT KC_LALT
-#define UK_SPC KC_SPC
-#define UK_RALT KC_RALT
-#define UK_RGUI KC_RGUI
-#define UK_RCTL KC_RCTL
-#define UK_INS KC_INS
-#define UK_DEL KC_DEL
-#define UK_HOME KC_HOME
-#define UK_END KC_END
-#define UK_PGUP KC_PGUP
-#define UK_PGDN KC_PGDN
-#define UK_UP KC_UP
-#define UK_LEFT KC_LEFT
-#define UK_DOWN KC_DOWN
-#define UK_RGHT KC_RGHT
-#define UK_PSLS KC_PSLS
-#define UK_PAST KC_PAST
-#define UK_PMNS KC_PMNS
-#define UK_PPLS KC_PPLS
-#define UK_PENT KC_PENT
-#define UK_P1 KC_P1
-#define UK_P2 KC_P2
-#define UK_P3 KC_P3
-#define UK_P4 KC_P4
-#define UK_P5 KC_P5
-#define UK_P6 KC_P6
-#define UK_P7 KC_P7
-#define UK_P8 KC_P8
-#define UK_P9 KC_P9
-#define UK_P0 KC_P0
-#define UK_PDOT KC_PDOT
-#define UK_PEQL KC_PEQL
-#define UK_PCMM KC_PCMM
-#define UK_F13 KC_F13
-#define UK_F14 KC_F14
-#define UK_F15 KC_F15
-#define UK_F16 KC_F16
-#define UK_F17 KC_F17
-#define UK_F18 KC_F18
-#define UK_F19 KC_F19
-#define UK_F20 KC_F20
-#define UK_F21 KC_F21
-#define UK_F22 KC_F22
-#define UK_F23 KC_F23
-#define UK_F24 KC_F24
-#define UK_EACT UK_EACU
-#define UK_UACT UK_UACU
-#define UK_IACT UK_IACU
-#define UK_OACT UK_OACU
-#define UK_AACT UK_OACU
diff --git a/quantum/keymap_extras/keymap_workman.h b/quantum/keymap_extras/keymap_workman.h
index 4c7530aa07..6367d68351 100644
--- a/quantum/keymap_extras/keymap_workman.h
+++ b/quantum/keymap_extras/keymap_workman.h
@@ -123,32 +123,3 @@
#define WK_LABK S(WK_COMM) // <
#define WK_RABK S(WK_DOT) // >
#define WK_QUES S(WK_SLSH) // ?
-
-// DEPRECATED
-#define KC_WK_Q WK_Q
-#define KC_WK_D WK_D
-#define KC_WK_R WK_R
-#define KC_WK_W WK_W
-#define KC_WK_B WK_B
-#define KC_WK_J WK_J
-#define KC_WK_F WK_F
-#define KC_WK_U WK_U
-#define KC_WK_P WK_P
-#define KC_WK_SCLN WK_SCLN
-#define KC_WK_A WK_A
-#define KC_WK_S WK_S
-#define KC_WK_H WK_H
-#define KC_WK_T WK_T
-#define KC_WK_G WK_G
-#define KC_WK_Y WK_Y
-#define KC_WK_N WK_N
-#define KC_WK_E WK_E
-#define KC_WK_O WK_O
-#define KC_WK_I WK_I
-#define KC_WK_Z WK_Z
-#define KC_WK_X WK_X
-#define KC_WK_M WK_M
-#define KC_WK_C WK_C
-#define KC_WK_V WK_V
-#define KC_WK_K WK_K
-#define KC_WK_L WK_L
diff --git a/quantum/led_matrix_animations/alpha_mods_anim.h b/quantum/led_matrix/animations/alpha_mods_anim.h
index 6f69f6892b..a4638fde69 100644
--- a/quantum/led_matrix_animations/alpha_mods_anim.h
+++ b/quantum/led_matrix/animations/alpha_mods_anim.h
@@ -21,4 +21,4 @@ bool ALPHAS_MODS(effect_params_t* params) {
}
# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
-#endif // DISABLE_LED_MATRIX_ALPHAS_MODS
+#endif // DISABLE_LED_MATRIX_ALPHAS_MODS
diff --git a/quantum/led_matrix_animations/band_anim.h b/quantum/led_matrix/animations/band_anim.h
index 523dba1b78..f9cb85dc4f 100644
--- a/quantum/led_matrix_animations/band_anim.h
+++ b/quantum/led_matrix/animations/band_anim.h
@@ -10,4 +10,4 @@ static uint8_t BAND_math(uint8_t val, uint8_t i, uint8_t time) {
bool BAND(effect_params_t* params) { return effect_runner_i(params, &BAND_math); }
# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
-#endif // DISABLE_LED_MATRIX_BAND
+#endif // DISABLE_LED_MATRIX_BAND
diff --git a/quantum/led_matrix_animations/band_pinwheel_anim.h b/quantum/led_matrix/animations/band_pinwheel_anim.h
index fb3b835cad..d3144bffbf 100644
--- a/quantum/led_matrix_animations/band_pinwheel_anim.h
+++ b/quantum/led_matrix/animations/band_pinwheel_anim.h
@@ -7,4 +7,4 @@ static uint8_t BAND_PINWHEEL_math(uint8_t val, int16_t dx, int16_t dy, uint8_t t
bool BAND_PINWHEEL(effect_params_t* params) { return effect_runner_dx_dy(params, &BAND_PINWHEEL_math); }
# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
-#endif // DISABLE_LED_MATRIX_BAND_PINWHEEL
+#endif // DISABLE_LED_MATRIX_BAND_PINWHEEL
diff --git a/quantum/led_matrix_animations/band_spiral_anim.h b/quantum/led_matrix/animations/band_spiral_anim.h
index fca22aad9c..defbe69676 100644
--- a/quantum/led_matrix_animations/band_spiral_anim.h
+++ b/quantum/led_matrix/animations/band_spiral_anim.h
@@ -7,4 +7,4 @@ static uint8_t BAND_SPIRAL_math(uint8_t val, int16_t dx, int16_t dy, uint8_t dis
bool BAND_SPIRAL(effect_params_t* params) { return effect_runner_dx_dy_dist(params, &BAND_SPIRAL_math); }
# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
-#endif // DISABLE_LED_MATRIX_BAND_SPIRAL
+#endif // DISABLE_LED_MATRIX_BAND_SPIRAL
diff --git a/quantum/led_matrix_animations/breathing_anim.h b/quantum/led_matrix/animations/breathing_anim.h
index 00310e3f65..4f49f50690 100644
--- a/quantum/led_matrix_animations/breathing_anim.h
+++ b/quantum/led_matrix/animations/breathing_anim.h
@@ -16,4 +16,4 @@ bool BREATHING(effect_params_t* params) {
}
# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
-#endif // DISABLE_LED_MATRIX_BREATHING
+#endif // DISABLE_LED_MATRIX_BREATHING
diff --git a/quantum/led_matrix_animations/cycle_left_right_anim.h b/quantum/led_matrix/animations/cycle_left_right_anim.h
index 51e81d57ca..c426d02fd5 100644
--- a/quantum/led_matrix_animations/cycle_left_right_anim.h
+++ b/quantum/led_matrix/animations/cycle_left_right_anim.h
@@ -7,4 +7,4 @@ static uint8_t CYCLE_LEFT_RIGHT_math(uint8_t val, uint8_t i, uint8_t time) { ret
bool CYCLE_LEFT_RIGHT(effect_params_t* params) { return effect_runner_i(params, &CYCLE_LEFT_RIGHT_math); }
# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
-#endif // DISABLE_LED_MATRIX_CYCLE_LEFT_RIGHT
+#endif // DISABLE_LED_MATRIX_CYCLE_LEFT_RIGHT
diff --git a/quantum/led_matrix_animations/cycle_out_in_anim.h b/quantum/led_matrix/animations/cycle_out_in_anim.h
index f62061552c..55527556fd 100644
--- a/quantum/led_matrix_animations/cycle_out_in_anim.h
+++ b/quantum/led_matrix/animations/cycle_out_in_anim.h
@@ -7,4 +7,4 @@ static uint8_t CYCLE_OUT_IN_math(uint8_t val, int16_t dx, int16_t dy, uint8_t di
bool CYCLE_OUT_IN(effect_params_t* params) { return effect_runner_dx_dy_dist(params, &CYCLE_OUT_IN_math); }
# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
-#endif // DISABLE_LED_MATRIX_CYCLE_OUT_IN
+#endif // DISABLE_LED_MATRIX_CYCLE_OUT_IN
diff --git a/quantum/led_matrix_animations/cycle_up_down_anim.h b/quantum/led_matrix/animations/cycle_up_down_anim.h
index bd1d125672..d97de0d1ec 100644
--- a/quantum/led_matrix_animations/cycle_up_down_anim.h
+++ b/quantum/led_matrix/animations/cycle_up_down_anim.h
@@ -7,4 +7,4 @@ static uint8_t CYCLE_UP_DOWN_math(uint8_t val, uint8_t i, uint8_t time) { return
bool CYCLE_UP_DOWN(effect_params_t* params) { return effect_runner_i(params, &CYCLE_UP_DOWN_math); }
# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
-#endif // DISABLE_LED_MATRIX_CYCLE_UP_DOWN
+#endif // DISABLE_LED_MATRIX_CYCLE_UP_DOWN
diff --git a/quantum/led_matrix_animations/dual_beacon_anim.h b/quantum/led_matrix/animations/dual_beacon_anim.h
index 9b8a7877c9..e1bc5ae464 100644
--- a/quantum/led_matrix_animations/dual_beacon_anim.h
+++ b/quantum/led_matrix/animations/dual_beacon_anim.h
@@ -7,4 +7,4 @@ static uint8_t DUAL_BEACON_math(uint8_t val, int8_t sin, int8_t cos, uint8_t i,
bool DUAL_BEACON(effect_params_t* params) { return effect_runner_sin_cos_i(params, &DUAL_BEACON_math); }
# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
-#endif // DISABLE_LED_MATRIX_DUAL_BEACON
+#endif // DISABLE_LED_MATRIX_DUAL_BEACON
diff --git a/quantum/led_matrix/animations/led_matrix_effects.inc b/quantum/led_matrix/animations/led_matrix_effects.inc
new file mode 100644
index 0000000000..ad1f46b242
--- /dev/null
+++ b/quantum/led_matrix/animations/led_matrix_effects.inc
@@ -0,0 +1,18 @@
+// Add your new core led matrix effect here, order determines enum order
+#include "solid_anim.h"
+#include "alpha_mods_anim.h"
+#include "breathing_anim.h"
+#include "band_anim.h"
+#include "band_pinwheel_anim.h"
+#include "band_spiral_anim.h"
+#include "cycle_left_right_anim.h"
+#include "cycle_up_down_anim.h"
+#include "cycle_out_in_anim.h"
+#include "dual_beacon_anim.h"
+#include "solid_reactive_simple_anim.h"
+#include "solid_reactive_wide.h"
+#include "solid_reactive_cross.h"
+#include "solid_reactive_nexus.h"
+#include "solid_splash_anim.h"
+#include "wave_left_right_anim.h"
+#include "wave_up_down_anim.h"
diff --git a/quantum/led_matrix_runners/effect_runner_dx_dy.h b/quantum/led_matrix/animations/runners/effect_runner_dx_dy.h
index ef97631b90..ef97631b90 100644
--- a/quantum/led_matrix_runners/effect_runner_dx_dy.h
+++ b/quantum/led_matrix/animations/runners/effect_runner_dx_dy.h
diff --git a/quantum/led_matrix_runners/effect_runner_dx_dy_dist.h b/quantum/led_matrix/animations/runners/effect_runner_dx_dy_dist.h
index 5ef5938be0..5ef5938be0 100644
--- a/quantum/led_matrix_runners/effect_runner_dx_dy_dist.h
+++ b/quantum/led_matrix/animations/runners/effect_runner_dx_dy_dist.h
diff --git a/quantum/led_matrix_runners/effect_runner_i.h b/quantum/led_matrix/animations/runners/effect_runner_i.h
index b3015759be..b3015759be 100644
--- a/quantum/led_matrix_runners/effect_runner_i.h
+++ b/quantum/led_matrix/animations/runners/effect_runner_i.h
diff --git a/quantum/led_matrix_runners/effect_runner_reactive.h b/quantum/led_matrix/animations/runners/effect_runner_reactive.h
index 4369ea8c49..4369ea8c49 100644
--- a/quantum/led_matrix_runners/effect_runner_reactive.h
+++ b/quantum/led_matrix/animations/runners/effect_runner_reactive.h
diff --git a/quantum/led_matrix_runners/effect_runner_reactive_splash.h b/quantum/led_matrix/animations/runners/effect_runner_reactive_splash.h
index d6eb9731ee..d6eb9731ee 100644
--- a/quantum/led_matrix_runners/effect_runner_reactive_splash.h
+++ b/quantum/led_matrix/animations/runners/effect_runner_reactive_splash.h
diff --git a/quantum/led_matrix_runners/effect_runner_sin_cos_i.h b/quantum/led_matrix/animations/runners/effect_runner_sin_cos_i.h
index 4a5219abd1..4a5219abd1 100644
--- a/quantum/led_matrix_runners/effect_runner_sin_cos_i.h
+++ b/quantum/led_matrix/animations/runners/effect_runner_sin_cos_i.h
diff --git a/quantum/led_matrix/animations/runners/led_matrix_runners.inc b/quantum/led_matrix/animations/runners/led_matrix_runners.inc
new file mode 100644
index 0000000000..c09022bb0f
--- /dev/null
+++ b/quantum/led_matrix/animations/runners/led_matrix_runners.inc
@@ -0,0 +1,6 @@
+#include "effect_runner_dx_dy_dist.h"
+#include "effect_runner_dx_dy.h"
+#include "effect_runner_i.h"
+#include "effect_runner_sin_cos_i.h"
+#include "effect_runner_reactive.h"
+#include "effect_runner_reactive_splash.h"
diff --git a/quantum/led_matrix_animations/solid_anim.h b/quantum/led_matrix/animations/solid_anim.h
index 4c9e43c581..4c9e43c581 100644
--- a/quantum/led_matrix_animations/solid_anim.h
+++ b/quantum/led_matrix/animations/solid_anim.h
diff --git a/quantum/led_matrix_animations/solid_reactive_cross.h b/quantum/led_matrix/animations/solid_reactive_cross.h
index f402d99b37..94425c959f 100644
--- a/quantum/led_matrix_animations/solid_reactive_cross.h
+++ b/quantum/led_matrix/animations/solid_reactive_cross.h
@@ -31,5 +31,5 @@ bool SOLID_REACTIVE_MULTICROSS(effect_params_t* params) { return effect_runner_r
# endif
# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
-# endif // !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_CROSS) || !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTICROSS)
-#endif // LED_MATRIX_KEYREACTIVE_ENABLED
+# endif // !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_CROSS) || !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTICROSS)
+#endif // LED_MATRIX_KEYREACTIVE_ENABLED
diff --git a/quantum/led_matrix_animations/solid_reactive_nexus.h b/quantum/led_matrix/animations/solid_reactive_nexus.h
index 4d0d252263..504b1104f1 100644
--- a/quantum/led_matrix_animations/solid_reactive_nexus.h
+++ b/quantum/led_matrix/animations/solid_reactive_nexus.h
@@ -28,5 +28,5 @@ bool SOLID_REACTIVE_MULTINEXUS(effect_params_t* params) { return effect_runner_r
# endif
# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
-# endif // !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_NEXUS) || !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTINEXUS)
-#endif // LED_MATRIX_KEYREACTIVE_ENABLED
+# endif // !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_NEXUS) || !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTINEXUS)
+#endif // LED_MATRIX_KEYREACTIVE_ENABLED
diff --git a/quantum/led_matrix_animations/solid_reactive_simple_anim.h b/quantum/led_matrix/animations/solid_reactive_simple_anim.h
index 30e2527f60..4752a84162 100644
--- a/quantum/led_matrix_animations/solid_reactive_simple_anim.h
+++ b/quantum/led_matrix/animations/solid_reactive_simple_anim.h
@@ -8,5 +8,5 @@ static uint8_t SOLID_REACTIVE_SIMPLE_math(uint8_t val, uint16_t offset) { return
bool SOLID_REACTIVE_SIMPLE(effect_params_t* params) { return effect_runner_reactive(params, &SOLID_REACTIVE_SIMPLE_math); }
# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
-# endif // DISABLE_LED_MATRIX_SOLID_REACTIVE_SIMPLE
-#endif // LED_MATRIX_KEYREACTIVE_ENABLED
+# endif // DISABLE_LED_MATRIX_SOLID_REACTIVE_SIMPLE
+#endif // LED_MATRIX_KEYREACTIVE_ENABLED
diff --git a/quantum/led_matrix_animations/solid_reactive_wide.h b/quantum/led_matrix/animations/solid_reactive_wide.h
index 34a230c259..922e32fe5f 100644
--- a/quantum/led_matrix_animations/solid_reactive_wide.h
+++ b/quantum/led_matrix/animations/solid_reactive_wide.h
@@ -26,5 +26,5 @@ bool SOLID_REACTIVE_MULTIWIDE(effect_params_t* params) { return effect_runner_re
# endif
# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
-# endif // !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_WIDE) || !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTIWIDE)
-#endif // LED_MATRIX_KEYREACTIVE_ENABLED
+# endif // !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_WIDE) || !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTIWIDE)
+#endif // LED_MATRIX_KEYREACTIVE_ENABLED
diff --git a/quantum/led_matrix_animations/solid_splash_anim.h b/quantum/led_matrix/animations/solid_splash_anim.h
index 4f6ba3d343..d95889b813 100644
--- a/quantum/led_matrix_animations/solid_splash_anim.h
+++ b/quantum/led_matrix/animations/solid_splash_anim.h
@@ -26,5 +26,5 @@ bool SOLID_MULTISPLASH(effect_params_t* params) { return effect_runner_reactive_
# endif
# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
-# endif // !defined(DISABLE_LED_MATRIX_SPLASH) && !defined(DISABLE_LED_MATRIX_MULTISPLASH)
-#endif // LED_MATRIX_KEYREACTIVE_ENABLED
+# endif // !defined(DISABLE_LED_MATRIX_SPLASH) && !defined(DISABLE_LED_MATRIX_MULTISPLASH)
+#endif // LED_MATRIX_KEYREACTIVE_ENABLED
diff --git a/quantum/led_matrix_animations/wave_left_right_anim.h b/quantum/led_matrix/animations/wave_left_right_anim.h
index 736f22ddc5..8579f1b45f 100644
--- a/quantum/led_matrix_animations/wave_left_right_anim.h
+++ b/quantum/led_matrix/animations/wave_left_right_anim.h
@@ -7,4 +7,4 @@ static uint8_t WAVE_LEFT_RIGHT_math(uint8_t val, uint8_t i, uint8_t time) { retu
bool WAVE_LEFT_RIGHT(effect_params_t* params) { return effect_runner_i(params, &WAVE_LEFT_RIGHT_math); }
# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
-#endif // DISABLE_LED_MATRIX_WAVE_LEFT_RIGHT
+#endif // DISABLE_LED_MATRIX_WAVE_LEFT_RIGHT
diff --git a/quantum/led_matrix_animations/wave_up_down_anim.h b/quantum/led_matrix/animations/wave_up_down_anim.h
index 3cab0597d4..635c608414 100644
--- a/quantum/led_matrix_animations/wave_up_down_anim.h
+++ b/quantum/led_matrix/animations/wave_up_down_anim.h
@@ -7,4 +7,4 @@ static uint8_t WAVE_UP_DOWN_math(uint8_t val, uint8_t i, uint8_t time) { return
bool WAVE_UP_DOWN(effect_params_t* params) { return effect_runner_i(params, &WAVE_UP_DOWN_math); }
# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
-#endif // DISABLE_LED_MATRIX_WAVE_UP_DOWN
+#endif // DISABLE_LED_MATRIX_WAVE_UP_DOWN
diff --git a/quantum/led_matrix.c b/quantum/led_matrix/led_matrix.c
index 7e0fdf896a..fe7f1f0394 100644
--- a/quantum/led_matrix.c
+++ b/quantum/led_matrix/led_matrix.c
@@ -33,20 +33,23 @@ const led_point_t k_led_matrix_center = {112, 32};
const led_point_t k_led_matrix_center = LED_MATRIX_CENTER;
#endif
+// clang-format off
+#ifndef LED_MATRIX_IMMEDIATE_EEPROM
+# define led_eeconfig_update(v) led_update_eeprom |= v
+#else
+# define led_eeconfig_update(v) if (v) eeconfig_update_led_matrix()
+#endif
+// clang-format on
+
// Generic effect runners
-#include "led_matrix_runners/effect_runner_dx_dy_dist.h"
-#include "led_matrix_runners/effect_runner_dx_dy.h"
-#include "led_matrix_runners/effect_runner_i.h"
-#include "led_matrix_runners/effect_runner_sin_cos_i.h"
-#include "led_matrix_runners/effect_runner_reactive.h"
-#include "led_matrix_runners/effect_runner_reactive_splash.h"
+#include "led_matrix_runners.inc"
// ------------------------------------------
// -----Begin led effect includes macros-----
#define LED_MATRIX_EFFECT(name)
#define LED_MATRIX_CUSTOM_EFFECT_IMPLS
-#include "led_matrix_animations/led_matrix_effects.inc"
+#include "led_matrix_effects.inc"
#ifdef LED_MATRIX_CUSTOM_KB
# include "led_matrix_kb.inc"
#endif
@@ -67,10 +70,6 @@ const led_point_t k_led_matrix_center = LED_MATRIX_CENTER;
# define LED_DISABLE_TIMEOUT 0
#endif
-#if LED_DISABLE_WHEN_USB_SUSPENDED != 1
-# undef LED_DISABLE_WHEN_USB_SUSPENDED
-#endif
-
#if !defined(LED_MATRIX_MAXIMUM_BRIGHTNESS) || LED_MATRIX_MAXIMUM_BRIGHTNESS > UINT8_MAX
# undef LED_MATRIX_MAXIMUM_BRIGHTNESS
# define LED_MATRIX_MAXIMUM_BRIGHTNESS UINT8_MAX
@@ -108,6 +107,7 @@ last_hit_t g_last_hit_tracker;
// internals
static bool suspend_state = false;
+static bool led_update_eeprom = false;
static uint8_t led_last_enable = UINT8_MAX;
static uint8_t led_last_effect = UINT8_MAX;
static effect_params_t led_effect_params = {0, LED_FLAG_ALL, false};
@@ -219,7 +219,7 @@ void process_led_matrix(uint8_t row, uint8_t col, bool pressed) {
memcpy(&last_hit_buffer.y[0], &last_hit_buffer.y[led_count], LED_HITS_TO_REMEMBER - led_count);
memcpy(&last_hit_buffer.tick[0], &last_hit_buffer.tick[led_count], (LED_HITS_TO_REMEMBER - led_count) * 2); // 16 bit
memcpy(&last_hit_buffer.index[0], &last_hit_buffer.index[led_count], LED_HITS_TO_REMEMBER - led_count);
- last_hit_buffer.count--;
+ last_hit_buffer.count = LED_HITS_TO_REMEMBER - led_count;
}
for (uint8_t i = 0; i < led_count; i++) {
@@ -280,6 +280,8 @@ static void led_task_timers(void) {
static void led_task_sync(void) {
// next task
+ if (led_update_eeprom) eeconfig_update_led_matrix();
+ led_update_eeprom = false;
if (sync_timer_elapsed32(g_led_timer) >= LED_MATRIX_LED_FLUSH_LIMIT) led_task_state = STARTING;
}
@@ -318,7 +320,7 @@ static void led_task_render(uint8_t effect) {
case LED_MATRIX_##name: \
rendering = name(&led_effect_params); \
break;
-#include "led_matrix_animations/led_matrix_effects.inc"
+#include "led_matrix_effects.inc"
#undef LED_MATRIX_EFFECT
#if defined(LED_MATRIX_CUSTOM_KB) || defined(LED_MATRIX_CUSTOM_USER)
@@ -469,9 +471,7 @@ bool led_matrix_get_suspend_state(void) { return suspend_state; }
void led_matrix_toggle_eeprom_helper(bool write_to_eeprom) {
led_matrix_eeconfig.enable ^= 1;
led_task_state = STARTING;
- if (write_to_eeprom) {
- eeconfig_update_led_matrix();
- }
+ led_eeconfig_update(write_to_eeprom);
dprintf("led matrix toggle [%s]: led_matrix_eeconfig.enable = %u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", led_matrix_eeconfig.enable);
}
void led_matrix_toggle_noeeprom(void) { led_matrix_toggle_eeprom_helper(false); }
@@ -479,7 +479,7 @@ void led_matrix_toggle(void) { led_matrix_toggle_eeprom_helper(true); }
void led_matrix_enable(void) {
led_matrix_enable_noeeprom();
- eeconfig_update_led_matrix();
+ led_eeconfig_update(true);
}
void led_matrix_enable_noeeprom(void) {
@@ -489,7 +489,7 @@ void led_matrix_enable_noeeprom(void) {
void led_matrix_disable(void) {
led_matrix_disable_noeeprom();
- eeconfig_update_led_matrix();
+ led_eeconfig_update(true);
}
void led_matrix_disable_noeeprom(void) {
@@ -511,9 +511,7 @@ void led_matrix_mode_eeprom_helper(uint8_t mode, bool write_to_eeprom) {
led_matrix_eeconfig.mode = mode;
}
led_task_state = STARTING;
- if (write_to_eeprom) {
- eeconfig_update_led_matrix();
- }
+ led_eeconfig_update(write_to_eeprom);
dprintf("led matrix mode [%s]: %u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", led_matrix_eeconfig.mode);
}
void led_matrix_mode_noeeprom(uint8_t mode) { led_matrix_mode_eeprom_helper(mode, false); }
@@ -540,9 +538,7 @@ void led_matrix_set_val_eeprom_helper(uint8_t val, bool write_to_eeprom) {
return;
}
led_matrix_eeconfig.val = (val > LED_MATRIX_MAXIMUM_BRIGHTNESS) ? LED_MATRIX_MAXIMUM_BRIGHTNESS : val;
- if (write_to_eeprom) {
- eeconfig_update_led_matrix();
- }
+ led_eeconfig_update(write_to_eeprom);
dprintf("led matrix set val [%s]: %u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", led_matrix_eeconfig.val);
}
void led_matrix_set_val_noeeprom(uint8_t val) { led_matrix_set_val_eeprom_helper(val, false); }
@@ -560,9 +556,7 @@ void led_matrix_decrease_val(void) { led_matrix_decrease_val_helper(true); }
void led_matrix_set_speed_eeprom_helper(uint8_t speed, bool write_to_eeprom) {
led_matrix_eeconfig.speed = speed;
- if (write_to_eeprom) {
- eeconfig_update_led_matrix();
- }
+ led_eeconfig_update(write_to_eeprom);
dprintf("led matrix set speed [%s]: %u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", led_matrix_eeconfig.speed);
}
void led_matrix_set_speed_noeeprom(uint8_t speed) { led_matrix_set_speed_eeprom_helper(speed, false); }
diff --git a/quantum/led_matrix.h b/quantum/led_matrix/led_matrix.h
index 0984de73b3..6f85854fbe 100644
--- a/quantum/led_matrix.h
+++ b/quantum/led_matrix/led_matrix.h
@@ -56,7 +56,7 @@ enum led_matrix_effects {
// --------------------------------------
// -----Begin led effect enum macros-----
#define LED_MATRIX_EFFECT(name, ...) LED_MATRIX_##name,
-#include "led_matrix_animations/led_matrix_effects.inc"
+#include "led_matrix_effects.inc"
#undef LED_MATRIX_EFFECT
#if defined(LED_MATRIX_CUSTOM_KB) || defined(LED_MATRIX_CUSTOM_USER)
diff --git a/quantum/led_matrix_drivers.c b/quantum/led_matrix/led_matrix_drivers.c
index 1d46b2c506..1d46b2c506 100644
--- a/quantum/led_matrix_drivers.c
+++ b/quantum/led_matrix/led_matrix_drivers.c
diff --git a/quantum/led_matrix_types.h b/quantum/led_matrix/led_matrix_types.h
index 61cdbd9b8e..61cdbd9b8e 100644
--- a/quantum/led_matrix_types.h
+++ b/quantum/led_matrix/led_matrix_types.h
diff --git a/quantum/led_matrix_animations/led_matrix_effects.inc b/quantum/led_matrix_animations/led_matrix_effects.inc
deleted file mode 100644
index 67237c5683..0000000000
--- a/quantum/led_matrix_animations/led_matrix_effects.inc
+++ /dev/null
@@ -1,18 +0,0 @@
-// Add your new core led matrix effect here, order determins enum order, requires "led_matrix_animations/ directory
-#include "led_matrix_animations/solid_anim.h"
-#include "led_matrix_animations/alpha_mods_anim.h"
-#include "led_matrix_animations/breathing_anim.h"
-#include "led_matrix_animations/band_anim.h"
-#include "led_matrix_animations/band_pinwheel_anim.h"
-#include "led_matrix_animations/band_spiral_anim.h"
-#include "led_matrix_animations/cycle_left_right_anim.h"
-#include "led_matrix_animations/cycle_up_down_anim.h"
-#include "led_matrix_animations/cycle_out_in_anim.h"
-#include "led_matrix_animations/dual_beacon_anim.h"
-#include "led_matrix_animations/solid_reactive_simple_anim.h"
-#include "led_matrix_animations/solid_reactive_wide.h"
-#include "led_matrix_animations/solid_reactive_cross.h"
-#include "led_matrix_animations/solid_reactive_nexus.h"
-#include "led_matrix_animations/solid_splash_anim.h"
-#include "led_matrix_animations/wave_left_right_anim.h"
-#include "led_matrix_animations/wave_up_down_anim.h"
diff --git a/quantum/matrix.c b/quantum/matrix.c
index 34d6af2e6d..d22817bf48 100644
--- a/quantum/matrix.c
+++ b/quantum/matrix.c
@@ -16,22 +16,69 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdint.h>
#include <stdbool.h>
+#include <string.h>
#include "util.h"
#include "matrix.h"
#include "debounce.h"
#include "quantum.h"
+#ifdef SPLIT_KEYBOARD
+# include "split_common/split_util.h"
+# include "split_common/transactions.h"
+
+# ifndef ERROR_DISCONNECT_COUNT
+# define ERROR_DISCONNECT_COUNT 5
+# endif // ERROR_DISCONNECT_COUNT
+
+# define ROWS_PER_HAND (MATRIX_ROWS / 2)
+#else
+# define ROWS_PER_HAND (MATRIX_ROWS)
+#endif
+
+#ifdef DIRECT_PINS_RIGHT
+# define SPLIT_MUTABLE
+#else
+# define SPLIT_MUTABLE const
+#endif
+#ifdef MATRIX_ROW_PINS_RIGHT
+# define SPLIT_MUTABLE_ROW
+#else
+# define SPLIT_MUTABLE_ROW const
+#endif
+#ifdef MATRIX_COL_PINS_RIGHT
+# define SPLIT_MUTABLE_COL
+#else
+# define SPLIT_MUTABLE_COL const
+#endif
#ifdef DIRECT_PINS
-static pin_t direct_pins[MATRIX_ROWS][MATRIX_COLS] = DIRECT_PINS;
+static SPLIT_MUTABLE pin_t direct_pins[MATRIX_ROWS][MATRIX_COLS] = DIRECT_PINS;
#elif (DIODE_DIRECTION == ROW2COL) || (DIODE_DIRECTION == COL2ROW)
-static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
-static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
+# ifdef MATRIX_ROW_PINS
+static SPLIT_MUTABLE_ROW pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
+# endif // MATRIX_ROW_PINS
+# ifdef MATRIX_COL_PINS
+static SPLIT_MUTABLE_COL pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
+# endif // MATRIX_COL_PINS
#endif
/* matrix state(1:on, 0:off) */
extern matrix_row_t raw_matrix[MATRIX_ROWS]; // raw values
extern matrix_row_t matrix[MATRIX_ROWS]; // debounced values
+#ifdef SPLIT_KEYBOARD
+// row offsets for each hand
+uint8_t thisHand, thatHand;
+#endif
+
+// user-defined overridable functions
+__attribute__((weak)) void matrix_init_pins(void);
+__attribute__((weak)) void matrix_read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row);
+__attribute__((weak)) void matrix_read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col);
+#ifdef SPLIT_KEYBOARD
+__attribute__((weak)) void matrix_slave_scan_kb(void) { matrix_slave_scan_user(); }
+__attribute__((weak)) void matrix_slave_scan_user(void) {}
+#endif
+
static inline void setPinOutput_writeLow(pin_t pin) {
ATOMIC_BLOCK_FORCEON {
setPinOutput(pin);
@@ -43,11 +90,19 @@ static inline void setPinInputHigh_atomic(pin_t pin) {
ATOMIC_BLOCK_FORCEON { setPinInputHigh(pin); }
}
+static inline uint8_t readMatrixPin(pin_t pin) {
+ if (pin != NO_PIN) {
+ return readPin(pin);
+ } else {
+ return 1;
+ }
+}
+
// matrix code
#ifdef DIRECT_PINS
-static void init_pins(void) {
+__attribute__((weak)) void matrix_init_pins(void) {
for (int row = 0; row < MATRIX_ROWS; row++) {
for (int col = 0; col < MATRIX_COLS; col++) {
pin_t pin = direct_pins[row][col];
@@ -58,7 +113,7 @@ static void init_pins(void) {
}
}
-static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) {
+__attribute__((weak)) void matrix_read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) {
// Start with a clear matrix row
matrix_row_t current_row_value = 0;
@@ -69,46 +124,57 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)
}
}
- // If the row has changed, store the row and return the changed flag.
- if (current_matrix[current_row] != current_row_value) {
- current_matrix[current_row] = current_row_value;
- return true;
- }
- return false;
+ // Update the matrix
+ current_matrix[current_row] = current_row_value;
}
#elif defined(DIODE_DIRECTION)
-# if (DIODE_DIRECTION == COL2ROW)
+# if defined(MATRIX_ROW_PINS) && defined(MATRIX_COL_PINS)
+# if (DIODE_DIRECTION == COL2ROW)
-static void select_row(uint8_t row) { setPinOutput_writeLow(row_pins[row]); }
+static bool select_row(uint8_t row) {
+ pin_t pin = row_pins[row];
+ if (pin != NO_PIN) {
+ setPinOutput_writeLow(pin);
+ return true;
+ }
+ return false;
+}
-static void unselect_row(uint8_t row) { setPinInputHigh_atomic(row_pins[row]); }
+static void unselect_row(uint8_t row) {
+ pin_t pin = row_pins[row];
+ if (pin != NO_PIN) {
+ setPinInputHigh_atomic(pin);
+ }
+}
static void unselect_rows(void) {
- for (uint8_t x = 0; x < MATRIX_ROWS; x++) {
- setPinInputHigh_atomic(row_pins[x]);
+ for (uint8_t x = 0; x < ROWS_PER_HAND; x++) {
+ unselect_row(x);
}
}
-static void init_pins(void) {
+__attribute__((weak)) void matrix_init_pins(void) {
unselect_rows();
for (uint8_t x = 0; x < MATRIX_COLS; x++) {
- setPinInputHigh_atomic(col_pins[x]);
+ if (col_pins[x] != NO_PIN) {
+ setPinInputHigh_atomic(col_pins[x]);
+ }
}
}
-static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) {
+__attribute__((weak)) void matrix_read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) {
// Start with a clear matrix row
matrix_row_t current_row_value = 0;
- // Select row
- select_row(current_row);
+ if (!select_row(current_row)) { // Select row
+ return; // skip NO_PIN row
+ }
matrix_output_select_delay();
// For each col...
for (uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) {
- // Select the col pin to read (active low)
- uint8_t pin_state = readPin(col_pins[col_index]);
+ uint8_t pin_state = readMatrixPin(col_pins[col_index]);
// Populate the matrix row with the state of the col pin
current_row_value |= pin_state ? 0 : (MATRIX_ROW_SHIFTER << col_index);
@@ -116,81 +182,114 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)
// Unselect row
unselect_row(current_row);
- matrix_output_unselect_delay(); // wait for all Col signals to go HIGH
+ matrix_output_unselect_delay(current_row, current_row_value != 0); // wait for all Col signals to go HIGH
- // If the row has changed, store the row and return the changed flag.
- if (current_matrix[current_row] != current_row_value) {
- current_matrix[current_row] = current_row_value;
+ // Update the matrix
+ current_matrix[current_row] = current_row_value;
+}
+
+# elif (DIODE_DIRECTION == ROW2COL)
+
+static bool select_col(uint8_t col) {
+ pin_t pin = col_pins[col];
+ if (pin != NO_PIN) {
+ setPinOutput_writeLow(pin);
return true;
}
return false;
}
-# elif (DIODE_DIRECTION == ROW2COL)
-
-static void select_col(uint8_t col) { setPinOutput_writeLow(col_pins[col]); }
-
-static void unselect_col(uint8_t col) { setPinInputHigh_atomic(col_pins[col]); }
+static void unselect_col(uint8_t col) {
+ pin_t pin = col_pins[col];
+ if (pin != NO_PIN) {
+ setPinInputHigh_atomic(pin);
+ }
+}
static void unselect_cols(void) {
for (uint8_t x = 0; x < MATRIX_COLS; x++) {
- setPinInputHigh_atomic(col_pins[x]);
+ unselect_col(x);
}
}
-static void init_pins(void) {
+__attribute__((weak)) void matrix_init_pins(void) {
unselect_cols();
- for (uint8_t x = 0; x < MATRIX_ROWS; x++) {
- setPinInputHigh_atomic(row_pins[x]);
+ for (uint8_t x = 0; x < ROWS_PER_HAND; x++) {
+ if (row_pins[x] != NO_PIN) {
+ setPinInputHigh_atomic(row_pins[x]);
+ }
}
}
-static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) {
- bool matrix_changed = false;
+__attribute__((weak)) void matrix_read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) {
+ bool key_pressed = false;
// Select col
- select_col(current_col);
+ if (!select_col(current_col)) { // select col
+ return; // skip NO_PIN col
+ }
matrix_output_select_delay();
// For each row...
- for (uint8_t row_index = 0; row_index < MATRIX_ROWS; row_index++) {
- // Store last value of row prior to reading
- matrix_row_t last_row_value = current_matrix[row_index];
- matrix_row_t current_row_value = last_row_value;
-
+ for (uint8_t row_index = 0; row_index < ROWS_PER_HAND; row_index++) {
// Check row pin state
- if (readPin(row_pins[row_index]) == 0) {
+ if (readMatrixPin(row_pins[row_index]) == 0) {
// Pin LO, set col bit
- current_row_value |= (MATRIX_ROW_SHIFTER << current_col);
+ current_matrix[row_index] |= (MATRIX_ROW_SHIFTER << current_col);
+ key_pressed = true;
} else {
// Pin HI, clear col bit
- current_row_value &= ~(MATRIX_ROW_SHIFTER << current_col);
- }
-
- // Determine if the matrix changed state
- if ((last_row_value != current_row_value)) {
- matrix_changed |= true;
- current_matrix[row_index] = current_row_value;
+ current_matrix[row_index] &= ~(MATRIX_ROW_SHIFTER << current_col);
}
}
// Unselect col
unselect_col(current_col);
- matrix_output_unselect_delay(); // wait for all Row signals to go HIGH
-
- return matrix_changed;
+ matrix_output_unselect_delay(current_col, key_pressed); // wait for all Row signals to go HIGH
}
-# else
-# error DIODE_DIRECTION must be one of COL2ROW or ROW2COL!
-# endif
+# else
+# error DIODE_DIRECTION must be one of COL2ROW or ROW2COL!
+# endif
+# endif // defined(MATRIX_ROW_PINS) && defined(MATRIX_COL_PINS)
#else
# error DIODE_DIRECTION is not defined!
#endif
void matrix_init(void) {
+#ifdef SPLIT_KEYBOARD
+ split_pre_init();
+
+ // Set pinout for right half if pinout for that half is defined
+ if (!isLeftHand) {
+# ifdef DIRECT_PINS_RIGHT
+ const pin_t direct_pins_right[MATRIX_ROWS][MATRIX_COLS] = DIRECT_PINS_RIGHT;
+ for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
+ for (uint8_t j = 0; j < MATRIX_COLS; j++) {
+ direct_pins[i][j] = direct_pins_right[i][j];
+ }
+ }
+# endif
+# ifdef MATRIX_ROW_PINS_RIGHT
+ const pin_t row_pins_right[MATRIX_ROWS] = MATRIX_ROW_PINS_RIGHT;
+ for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
+ row_pins[i] = row_pins_right[i];
+ }
+# endif
+# ifdef MATRIX_COL_PINS_RIGHT
+ const pin_t col_pins_right[MATRIX_COLS] = MATRIX_COL_PINS_RIGHT;
+ for (uint8_t i = 0; i < MATRIX_COLS; i++) {
+ col_pins[i] = col_pins_right[i];
+ }
+# endif
+ }
+
+ thisHand = isLeftHand ? 0 : (ROWS_PER_HAND);
+ thatHand = ROWS_PER_HAND - thisHand;
+#endif
+
// initialize key pins
- init_pins();
+ matrix_init_pins();
// initialize matrix state: all keys off
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
@@ -198,28 +297,80 @@ void matrix_init(void) {
matrix[i] = 0;
}
- debounce_init(MATRIX_ROWS);
+ debounce_init(ROWS_PER_HAND);
matrix_init_quantum();
+
+#ifdef SPLIT_KEYBOARD
+ split_post_init();
+#endif
}
-uint8_t matrix_scan(void) {
+#ifdef SPLIT_KEYBOARD
+bool matrix_post_scan(void) {
bool changed = false;
+ if (is_keyboard_master()) {
+ static uint8_t error_count;
+
+ matrix_row_t slave_matrix[ROWS_PER_HAND] = {0};
+ if (!transport_master(matrix + thisHand, slave_matrix)) {
+ error_count++;
+
+ if (error_count > ERROR_DISCONNECT_COUNT) {
+ // reset other half if disconnected
+ for (int i = 0; i < ROWS_PER_HAND; ++i) {
+ matrix[thatHand + i] = 0;
+ slave_matrix[i] = 0;
+ }
+
+ changed = true;
+ }
+ } else {
+ error_count = 0;
+
+ for (int i = 0; i < ROWS_PER_HAND; ++i) {
+ if (matrix[thatHand + i] != slave_matrix[i]) {
+ matrix[thatHand + i] = slave_matrix[i];
+ changed = true;
+ }
+ }
+ }
+
+ matrix_scan_quantum();
+ } else {
+ transport_slave(matrix + thatHand, matrix + thisHand);
+
+ matrix_slave_scan_kb();
+ }
+
+ return changed;
+}
+#endif
+
+uint8_t matrix_scan(void) {
+ matrix_row_t curr_matrix[MATRIX_ROWS] = {0};
#if defined(DIRECT_PINS) || (DIODE_DIRECTION == COL2ROW)
// Set row, read cols
- for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) {
- changed |= read_cols_on_row(raw_matrix, current_row);
+ for (uint8_t current_row = 0; current_row < ROWS_PER_HAND; current_row++) {
+ matrix_read_cols_on_row(curr_matrix, current_row);
}
#elif (DIODE_DIRECTION == ROW2COL)
// Set col, read rows
for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) {
- changed |= read_rows_on_col(raw_matrix, current_col);
+ matrix_read_rows_on_col(curr_matrix, current_col);
}
#endif
- debounce(raw_matrix, matrix, MATRIX_ROWS, changed);
+ bool changed = memcmp(raw_matrix, curr_matrix, sizeof(curr_matrix)) != 0;
+ if (changed) memcpy(raw_matrix, curr_matrix, sizeof(curr_matrix));
+#ifdef SPLIT_KEYBOARD
+ debounce(raw_matrix, matrix + thisHand, ROWS_PER_HAND, changed);
+ changed = (changed || matrix_post_scan());
+#else
+ debounce(raw_matrix, matrix, ROWS_PER_HAND, changed);
matrix_scan_quantum();
+#endif
return (uint8_t)changed;
}
diff --git a/quantum/matrix.h b/quantum/matrix.h
index 3fe691aaee..5c696622fc 100644
--- a/quantum/matrix.h
+++ b/quantum/matrix.h
@@ -56,7 +56,7 @@ matrix_row_t matrix_get_row(uint8_t row);
void matrix_print(void);
/* delay between changing matrix pin state and reading values */
void matrix_output_select_delay(void);
-void matrix_output_unselect_delay(void);
+void matrix_output_unselect_delay(uint8_t line, bool key_pressed);
/* only for backwards compatibility. delay between changing matrix pin state and reading values */
void matrix_io_delay(void);
diff --git a/quantum/matrix_common.c b/quantum/matrix_common.c
index efbad6a5fd..66c89970b1 100644
--- a/quantum/matrix_common.c
+++ b/quantum/matrix_common.c
@@ -88,7 +88,7 @@ uint8_t matrix_key_count(void) {
__attribute__((weak)) void matrix_io_delay(void) { wait_us(MATRIX_IO_DELAY); }
__attribute__((weak)) void matrix_output_select_delay(void) { waitInputPinDelay(); }
-__attribute__((weak)) void matrix_output_unselect_delay(void) { matrix_io_delay(); }
+__attribute__((weak)) void matrix_output_unselect_delay(uint8_t line, bool key_pressed) { matrix_io_delay(); }
// CUSTOM MATRIX 'LITE'
__attribute__((weak)) void matrix_init_custom(void) {}
diff --git a/quantum/mcu_selection.mk b/quantum/mcu_selection.mk
index 9268c4522e..ca0accd719 100644
--- a/quantum/mcu_selection.mk
+++ b/quantum/mcu_selection.mk
@@ -136,10 +136,6 @@ ifneq ($(findstring STM32F042, $(MCU)),)
USE_FPU ?= no
- # Options to pass to dfu-util when flashing
- DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave
- DFU_SUFFIX_ARGS ?= -v 0483 -p DF11
-
# UF2 settings
UF2_FAMILY ?= STM32F0
endif
@@ -172,10 +168,6 @@ ifneq ($(findstring STM32F072, $(MCU)),)
USE_FPU ?= no
- # Options to pass to dfu-util when flashing
- DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave
- DFU_SUFFIX_ARGS ?= -v 0483 -p DF11
-
# UF2 settings
UF2_FAMILY ?= STM32F0
endif
@@ -208,10 +200,6 @@ ifneq ($(findstring STM32F103, $(MCU)),)
USE_FPU ?= no
- # Options to pass to dfu-util when flashing
- DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave
- DFU_SUFFIX_ARGS ?= -v 0483 -p DF11
-
# UF2 settings
UF2_FAMILY ?= STM32F1
endif
@@ -244,10 +232,6 @@ ifneq ($(findstring STM32F303, $(MCU)),)
USE_FPU ?= yes
- # Options to pass to dfu-util when flashing
- DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave
- DFU_SUFFIX_ARGS ?= -v 0483 -p DF11
-
# UF2 settings
UF2_FAMILY ?= STM32F3
endif
@@ -280,10 +264,6 @@ ifneq ($(findstring STM32F401, $(MCU)),)
USE_FPU ?= yes
- # Options to pass to dfu-util when flashing
- DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave
- DFU_SUFFIX_ARGS ?= -v 0483 -p DF11
-
# UF2 settings
UF2_FAMILY ?= STM32F4
endif
@@ -321,10 +301,6 @@ ifneq ($(findstring STM32F411, $(MCU)),)
USE_FPU ?= yes
- # Options to pass to dfu-util when flashing
- DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave
- DFU_SUFFIX_ARGS ?= -v 0483 -p DF11
-
# UF2 settings
UF2_FAMILY ?= STM32F4
endif
@@ -357,10 +333,6 @@ ifneq ($(findstring STM32F446, $(MCU)),)
BOARD ?= GENERIC_STM32_F446XE
USE_FPU ?= yes
-
- # Options to pass to dfu-util when flashing
- DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave
- DFU_SUFFIX_ARGS ?= -v 0483 -p DF11
endif
ifneq ($(findstring STM32G431, $(MCU)),)
@@ -391,10 +363,6 @@ ifneq ($(findstring STM32G431, $(MCU)),)
USE_FPU ?= yes
- # Options to pass to dfu-util when flashing
- DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave
- DFU_SUFFIX_ARGS ?= -v 0483 -p DF11
-
# UF2 settings
UF2_FAMILY ?= STM32G4
endif
@@ -427,10 +395,6 @@ ifneq ($(findstring STM32G474, $(MCU)),)
USE_FPU ?= yes
- # Options to pass to dfu-util when flashing
- DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave
- DFU_SUFFIX_ARGS ?= -v 0483 -p DF11
-
# UF2 settings
UF2_FAMILY ?= STM32G4
endif
@@ -465,9 +429,39 @@ ifneq (,$(filter $(MCU),STM32L433 STM32L443))
USE_FPU ?= yes
- # Options to pass to dfu-util when flashing
- DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave
- DFU_SUFFIX_ARGS ?= -v 0483 -p DF11
+ # UF2 settings
+ UF2_FAMILY ?= STM32L4
+endif
+
+ifneq (,$(filter $(MCU),STM32L412 STM32L422))
+ # Cortex version
+ MCU = cortex-m4
+
+ # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
+ ARMV = 7
+
+ ## chip/board settings
+ # - the next two should match the directories in
+ # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
+ MCU_FAMILY = STM32
+ MCU_SERIES = STM32L4xx
+
+ # Linker script to use
+ # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
+ # or <keyboard_dir>/ld/
+ MCU_LDSCRIPT ?= STM32L412xB
+
+ # Startup code to use
+ # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
+ MCU_STARTUP ?= stm32l4xx
+
+ # Board: it should exist either in <chibios>/os/hal/boards/,
+ # <keyboard_dir>/boards/, or drivers/boards/
+ BOARD ?= GENERIC_STM32_L412XB
+
+ PLATFORM_NAME ?= platform_l432
+
+ USE_FPU ?= yes
# UF2 settings
UF2_FAMILY ?= STM32L4
diff --git a/quantum/mousekey.c b/quantum/mousekey.c
index 99bfd6b96f..c2291fb397 100644
--- a/quantum/mousekey.c
+++ b/quantum/mousekey.c
@@ -486,3 +486,5 @@ static void mousekey_debug(void) {
print_dec(mousekey_accel);
print(")\n");
}
+
+report_mouse_t mousekey_get_report(void) { return mouse_report; }
diff --git a/quantum/mousekey.h b/quantum/mousekey.h
index 70dc4bb5c5..56c91b5f1b 100644
--- a/quantum/mousekey.h
+++ b/quantum/mousekey.h
@@ -168,11 +168,12 @@ extern uint8_t mk_time_to_max;
extern uint8_t mk_wheel_max_speed;
extern uint8_t mk_wheel_time_to_max;
-void mousekey_task(void);
-void mousekey_on(uint8_t code);
-void mousekey_off(uint8_t code);
-void mousekey_clear(void);
-void mousekey_send(void);
+void mousekey_task(void);
+void mousekey_on(uint8_t code);
+void mousekey_off(uint8_t code);
+void mousekey_clear(void);
+void mousekey_send(void);
+report_mouse_t mousekey_get_report(void);
#ifdef __cplusplus
}
diff --git a/quantum/process_keycode/process_key_override.c b/quantum/process_keycode/process_key_override.c
new file mode 100644
index 0000000000..fe43eacc40
--- /dev/null
+++ b/quantum/process_keycode/process_key_override.c
@@ -0,0 +1,518 @@
+/*
+ * Copyright 2021 Jonas Gessner
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
+#include "quantum.h"
+#include "report.h"
+#include "timer.h"
+#include "process_key_override_private.h"
+
+#include <debug.h>
+
+#ifndef KEY_OVERRIDE_REPEAT_DELAY
+# define KEY_OVERRIDE_REPEAT_DELAY 500
+#endif
+
+// For benchmarking the time it takes to call process_key_override on every key press (needs keyboard debugging enabled as well)
+// #define BENCH_KEY_OVERRIDE
+
+// For debug output (needs keyboard debugging enabled as well)
+// #define DEBUG_KEY_OVERRIDE
+
+#ifdef DEBUG_KEY_OVERRIDE
+# define key_override_printf dprintf
+#else
+# define key_override_printf(str, ...) \
+ {}
+#endif
+
+// Helpers
+
+// Private functions implemented elsewhere in qmk/tmk
+extern uint8_t extract_mod_bits(uint16_t code);
+extern void set_weak_override_mods(uint8_t mods);
+extern void clear_weak_override_mods(void);
+extern void set_suppressed_override_mods(uint8_t mods);
+extern void clear_suppressed_override_mods(void);
+
+static uint16_t clear_mods_from(uint16_t keycode) {
+ switch (keycode) {
+ case QK_MODS ... QK_MODS_MAX:
+ break;
+ default:
+ return keycode;
+ }
+
+ static const uint16_t all_mods = QK_LCTL | QK_LSFT | QK_LALT | QK_LGUI | QK_RCTL | QK_RSFT | QK_RALT | QK_RGUI;
+
+ return (keycode & ~(all_mods));
+}
+
+// Internal variables
+static const key_override_t *active_override = NULL;
+static bool active_override_trigger_is_down = false;
+
+// Used to keep track of what non-modifier key was last pressed down. We never want to activate an override for a trigger key that is not the last non-mod key that was pressed down. OSes internally completely unregister a key that is held when a different key is held down after. We want to respect this here.
+static uint16_t last_key_down = 0;
+// When was the last key pressed down?
+static uint32_t last_key_down_time = 0;
+
+// What timestamp are we comparing to when waiting to register a deferred key?
+static uint32_t defer_reference_time = 0;
+// What delay should pass until deferred key is registered?
+static uint32_t defer_delay = 0;
+
+// Holds the keycode that should be registered at a later time, in order to not get false key presses
+static uint16_t deferred_register = 0;
+
+// TODO: in future maybe save in EEPROM?
+static bool enabled = true;
+
+// Public variables
+__attribute__((weak)) const key_override_t **key_overrides = NULL;
+
+// Forward decls
+static const key_override_t *clear_active_override(const bool allow_reregister);
+
+void key_override_on(void) {
+ enabled = true;
+ key_override_printf("Key override ON\n");
+}
+
+void key_override_off(void) {
+ enabled = false;
+ clear_active_override(false);
+ key_override_printf("Key override OFF\n");
+}
+
+void key_override_toggle(void) {
+ if (key_override_is_enabled()) {
+ key_override_off();
+ } else {
+ key_override_on();
+ }
+}
+
+bool key_override_is_enabled(void) { return enabled; }
+
+// Returns whether the modifiers that are pressed are such that the override should activate
+static bool key_override_matches_active_modifiers(const key_override_t *override, const uint8_t mods) {
+ // Check that negative keys pass
+ if ((override->negative_mod_mask & mods) != 0) {
+ return false;
+ }
+
+ // Immediately return true if the override requires no mods down
+ if (override->trigger_mods == 0) {
+ return true;
+ }
+
+ if ((override->options & ko_option_one_mod) != 0) {
+ // At least one of the trigger modifiers must be down
+ return (override->trigger_mods & mods) != 0;
+ } else {
+ // All trigger modifiers must be down, but each mod can be active on either side (if both sides are specified).
+
+ // Which mods, regardless of side, are required?
+ uint8_t one_sided_required_mods = (override->trigger_mods & 0b1111) | (override->trigger_mods >> 4);
+
+ // Which of the required modifiers are active?
+ uint8_t active_required_mods = override->trigger_mods & mods;
+
+ // Move the active requird mods to one side
+ uint8_t one_sided_active_required_mods = (active_required_mods & 0b1111) | (active_required_mods >> 4);
+
+ // Check that there is a full match between the required one-sided mods and active required one sided mods
+ return one_sided_active_required_mods == one_sided_required_mods;
+ }
+
+ return false;
+}
+
+static void schedule_deferred_register(const uint16_t keycode) {
+ if (timer_elapsed32(last_key_down_time) < KEY_OVERRIDE_REPEAT_DELAY) {
+ // Defer until KEY_OVERRIDE_REPEAT_DELAY has passed since the trigger key was pressed down. This emulates the behavior as holding down a key x, then holding down shift shortly after. Usually the shifted key X is not immediately produced, but rather a 'key repeat delay' passes before any repeated character is output.
+ defer_reference_time = last_key_down_time;
+ defer_delay = KEY_OVERRIDE_REPEAT_DELAY;
+ } else {
+ // Wait a very short time when a modifier event triggers the override to avoid false activations when e.g. a modifier is pressed just before a key is released (with the intention of pairing the modifier with a different key), or a modifier is lifted shortly before the trigger key is lifted. Operating systems by default reject modifier-events that happen very close to a non-modifier event.
+ defer_reference_time = timer_read32();
+ defer_delay = 50; // 50ms
+ }
+ deferred_register = keycode;
+}
+
+const key_override_t *clear_active_override(const bool allow_reregister) {
+ if (active_override == NULL) {
+ return NULL;
+ }
+
+ key_override_printf("Deactivating override\n");
+
+ deferred_register = 0;
+
+ // Clear the suppressed mods
+ clear_suppressed_override_mods();
+
+ // Unregister the replacement. First remove the weak override mods
+ clear_weak_override_mods();
+
+ const key_override_t *const old = active_override;
+
+ const uint8_t mod_free_replacement = clear_mods_from(active_override->replacement);
+
+ bool unregister_replacement = mod_free_replacement != KC_NO && // KC_NO is never registered
+ mod_free_replacement < SAFE_RANGE; // Custom keycodes are never registered
+
+ // Try firing the custom handler
+ if (active_override->custom_action != NULL) {
+ unregister_replacement &= active_override->custom_action(false, active_override->context);
+ }
+
+ // Then unregister the mod-free replacement key if desired
+ if (unregister_replacement) {
+ if (IS_KEY(mod_free_replacement)) {
+ del_key(mod_free_replacement);
+ } else {
+ key_override_printf("NOT KEY 1\n");
+ send_keyboard_report();
+ unregister_code(mod_free_replacement);
+ }
+ }
+
+ const uint16_t trigger = active_override->trigger;
+
+ const bool reregister_trigger = allow_reregister && // Check if allowed from caller
+ (active_override->options & ko_option_no_reregister_trigger) == 0 && // Check if override allows
+ active_override_trigger_is_down && // Check if trigger is even down
+ trigger != KC_NO && // KC_NO is never registered
+ trigger < SAFE_RANGE; // A custom keycode should not be registered
+
+ // Optionally re-register the trigger if it is still down
+ if (reregister_trigger) {
+ key_override_printf("Re-registering trigger deferred: %u\n", trigger);
+
+ // This will always be a modifier event, so defer always
+ schedule_deferred_register(trigger);
+ }
+
+ send_keyboard_report();
+
+ active_override = NULL;
+ active_override_trigger_is_down = false;
+
+ return old;
+}
+
+/** Checks if the key event is an allowed activation event for the provided override. Does not check things like whether the correct mods or correct trigger key is down. */
+static bool check_activation_event(const key_override_t *override, const bool key_down, const bool is_mod) {
+ ko_option_t options = override->options;
+
+ if ((options & ko_options_all_activations) == 0) {
+ // No activation option provided at all. This is wrong, but let's assume the default activations (ko_options_all_activations) were meant...
+ options = ko_options_all_activations;
+ }
+
+ if (is_mod) {
+ if (key_down) {
+ return (options & ko_option_activation_required_mod_down) != 0;
+ } else {
+ return (options & ko_option_activation_negative_mod_up) != 0;
+ }
+ } else {
+ if (key_down) {
+ return (options & ko_option_activation_trigger_down) != 0;
+ } else {
+ return false;
+ }
+ }
+}
+
+/** Iterates through the list of key overrides and tries activating each, until it finds one that activates or reaches the end of overrides. Returns true if the key action for `keycode` should be sent */
+static bool try_activating_override(const uint16_t keycode, const uint8_t layer, const bool key_down, const bool is_mod, const uint8_t active_mods, bool *activated) {
+ if (key_overrides == NULL) {
+ return true;
+ }
+
+ for (uint8_t i = 0;; i++) {
+ const key_override_t *const override = key_overrides[i];
+
+ // End of array
+ if (override == NULL) {
+ break;
+ }
+
+ // Fast, but not full mods check. Most key presses will not have any mods down, and most overrides will require mods. Hence here we filter overrides that require mods to be down while no mods are down
+ if (active_mods == 0 && override->trigger_mods != 0) {
+ key_override_printf("Not activating override: Modifiers don't match\n");
+ continue;
+ }
+
+ // Check layer
+ if ((override->layers & (1 << layer)) == 0) {
+ key_override_printf("Not activating override: Not set to activate on pressed layer\n");
+ continue;
+ }
+
+ // Check allowed activation events
+ if (!check_activation_event(override, key_down, is_mod)) {
+ key_override_printf("Not activating override: Activation event not allowed\n");
+ continue;
+ }
+
+ const bool is_trigger = override->trigger == keycode;
+
+ // Check if trigger lifted. This is a small optimization in order to skip the remaining checks
+ if (is_trigger && !key_down) {
+ key_override_printf("Not activating override: Trigger lifted\n");
+ continue;
+ }
+
+ // If the trigger is KC_NO it means 'no key', so only the required modifiers need to be down.
+ const bool no_trigger = override->trigger == KC_NO;
+
+ // Check if aleady active
+ if (override == active_override) {
+ key_override_printf("Not activating override: Alerady actived\n");
+ continue;
+ }
+
+ // Check if enabled
+ if (override->enabled != NULL && !((*(override->enabled) & 1))) {
+ key_override_printf("Not activating override: Not enabled\n");
+ continue;
+ }
+
+ // Check mods precisely
+ if (!key_override_matches_active_modifiers(override, active_mods)) {
+ key_override_printf("Not activating override: Modifiers don't match\n");
+ continue;
+ }
+
+ // Check if trigger key is down.
+ const bool trigger_down = is_trigger && key_down;
+
+ // At this point, all requirements for activation are checked, except whether the trigger key is pressed. Now we check if the required trigger is down
+ // If no trigger key is required, yes.
+ // If the trigger was just pressed, yes.
+ // If the last non-mod key that was pressed down is the trigger key, yes.
+ bool should_activate = no_trigger || trigger_down || last_key_down == override->trigger;
+
+ if (!should_activate) {
+ key_override_printf("Not activating override. Trigger not down\n");
+ continue;
+ }
+
+ key_override_printf("Activating override\n");
+
+ clear_active_override(false);
+
+ active_override = override;
+ active_override_trigger_is_down = true;
+
+ set_suppressed_override_mods(override->suppressed_mods);
+
+ if (!trigger_down && !no_trigger) {
+ // When activating a key override the trigger is is always unregistered. In the case where the key that newly pressed is not the trigger key, we have to explicitly remove the trigger key from the keyboard report. If the trigger was just pressed down we simply suppress the event which also has the effect of the trigger key not being registered in the keyboard report.
+ if (IS_KEY(override->trigger)) {
+ del_key(override->trigger);
+ } else {
+ unregister_code(override->trigger);
+ }
+ }
+
+ const uint16_t mod_free_replacement = clear_mods_from(override->replacement);
+
+ bool register_replacement = mod_free_replacement != KC_NO && // KC_NO is never registered
+ mod_free_replacement < SAFE_RANGE; // Custom keycodes are never registered
+
+ // Try firing the custom handler
+ if (override->custom_action != NULL) {
+ register_replacement &= override->custom_action(true, override->context);
+ }
+
+ if (register_replacement) {
+ const uint8_t override_mods = extract_mod_bits(override->replacement);
+ set_weak_override_mods(override_mods);
+
+ // If this is a modifier event that activates the key override we _always_ defer the actual full activation of the override
+ if (is_mod) {
+ key_override_printf("Deferring register replacement key\n");
+ schedule_deferred_register(mod_free_replacement);
+ send_keyboard_report();
+ } else {
+ if (IS_KEY(mod_free_replacement)) {
+ add_key(mod_free_replacement);
+ } else {
+ key_override_printf("NOT KEY 2\n");
+ send_keyboard_report();
+ // On macOS there seems to be a race condition when it comes to the keyboard report and consumer keycodes. It seems the OS may recognize a consumer keycode before an updated keyboard report, even if the keyboard report is actually sent before the consumer key. I assume it is some sort of race condition because it happens infrequently and very irregularly. Waiting for about at least 10ms between sending the keyboard report and sending the consumer code has shown to fix this.
+ wait_ms(10);
+ register_code(mod_free_replacement);
+ }
+ }
+ } else {
+ // If not registering the replacement key send keyboard report to update the unregistered keys.
+ send_keyboard_report();
+ }
+
+ *activated = true;
+
+ // If the trigger is down, suppress the event so that it does not get added to the keyboard report.
+ return !trigger_down;
+ }
+
+ *activated = false;
+
+ return true;
+}
+
+void matrix_scan_key_override(void) {
+ if (deferred_register == 0) {
+ return;
+ }
+
+ if (timer_elapsed32(defer_reference_time) >= defer_delay) {
+ key_override_printf("Registering deferred key\n");
+ register_code16(deferred_register);
+ deferred_register = 0;
+ defer_reference_time = 0;
+ defer_delay = 0;
+ }
+}
+
+bool process_key_override(const uint16_t keycode, const keyrecord_t *const record) {
+#ifdef BENCH_KEY_OVERRIDE
+ uint16_t start = timer_read();
+#endif
+
+ const bool key_down = record->event.pressed;
+ const bool is_mod = IS_MOD(keycode);
+
+ if (key_down) {
+ switch (keycode) {
+ case KEY_OVERRIDE_TOGGLE:
+ key_override_toggle();
+ return false;
+
+ case KEY_OVERRIDE_ON:
+ key_override_on();
+ return false;
+
+ case KEY_OVERRIDE_OFF:
+ key_override_off();
+ return false;
+
+ default:
+ break;
+ }
+ }
+
+ if (!enabled) {
+ return true;
+ }
+
+ uint8_t effective_mods = get_mods();
+
+#ifdef KEY_OVERRIDE_INCLUDE_WEAK_MODS
+ effective_mods |= get_weak_mods();
+#endif
+
+#ifndef NO_ACTION_ONESHOT
+ // Locked one shot mods are added to get_mods(), I think (why??) while oneshot mods are in get_oneshot_mods(). Still OR with get_locked_oneshot_mods because that's where those mods _should_ be saved.
+ effective_mods |= get_oneshot_locked_mods() | get_oneshot_mods();
+#endif
+
+ if (is_mod) {
+ // The mods returned from get_mods() will be updated with this new event _after_ this code runs. Hence we manually update the effective mods here to really know the effective mods.
+ if (key_down) {
+ effective_mods |= MOD_BIT(keycode);
+ } else {
+ effective_mods &= ~MOD_BIT(keycode);
+ }
+ } else {
+ if (key_down) {
+ last_key_down = keycode;
+ last_key_down_time = timer_read32();
+ deferred_register = 0;
+ }
+
+ // The last key that was pressed was just released. No more keys are therefore sending input
+ if (!key_down && keycode == last_key_down) {
+ last_key_down = 0;
+ last_key_down_time = 0;
+ // We also cancel any deferred registers because, again, no keys are sending any input. Only the last key that is pressed creates an input – this key was just lifted.
+ deferred_register = 0;
+ }
+ }
+
+ key_override_printf("key down: %u keycode: %u is mod: %u effective mods: %u\n", key_down, keycode, is_mod, effective_mods);
+
+ bool send_key_action = true;
+ bool activated = false;
+
+ // Non-mod key up events never activate a key override
+ if (is_mod || key_down) {
+ // Get the exact layer that was hit. It will be cached at this point
+ const uint8_t layer = read_source_layers_cache(record->event.key);
+
+ // Use blocked to ensure the same override is not activated again immediately after it is deactivated
+ send_key_action = try_activating_override(keycode, layer, key_down, is_mod, effective_mods, &activated);
+
+ if (!send_key_action) {
+ send_keyboard_report();
+ }
+ }
+
+ if (!activated && active_override != NULL) {
+ if (is_mod) {
+ // Check if necessary modifier of current override goes up or a negative mod goes down
+ if (!key_override_matches_active_modifiers(active_override, effective_mods)) {
+ key_override_printf("Deactivating override because necessary modifier lifted or negative mod pressed\n");
+ clear_active_override(true);
+ }
+ } else {
+ // Check if trigger of current override goes up or if override does not allow additional keys to be down and another key goes down
+ const bool is_trigger = keycode == active_override->trigger;
+ bool should_deactivate = false;
+
+ // Check if trigger key lifted
+ if (is_trigger && !key_down) {
+ should_deactivate = true;
+ active_override_trigger_is_down = false;
+ key_override_printf("Deactivating override because trigger key up\n");
+ }
+
+ // Check if another key was pressed
+ if (key_down && (active_override->options & ko_option_no_unregister_on_other_key_down) == 0) {
+ should_deactivate = true;
+ key_override_printf("Deactivating override because another key was pressed\n");
+ }
+
+ if (should_deactivate) {
+ clear_active_override(false);
+ }
+ }
+ }
+
+#ifdef BENCH_KEY_OVERRIDE
+ uint16_t elapsed = timer_elapsed(start);
+
+ dprintf("Processing key overrides took: %u ms\n", elapsed);
+#endif
+
+ return send_key_action;
+}
diff --git a/quantum/process_keycode/process_key_override.h b/quantum/process_keycode/process_key_override.h
new file mode 100644
index 0000000000..9ba59e4e9b
--- /dev/null
+++ b/quantum/process_keycode/process_key_override.h
@@ -0,0 +1,147 @@
+/*
+ * Copyright 2021 Jonas Gessner
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+
+#include <stdbool.h>
+#include <stddef.h>
+#include <stdint.h>
+
+#include "action_layer.h"
+
+/**
+ * Key overrides allow you to send a different key-modifier combination or perform a custom action when a certain modifier-key combination is pressed.
+ *
+ * For example, you may configure a key override to send the delete key when shift + backspace are pressed together, or that your volume keys become screen brightness keys when holding ctrl. The possibilities are quite vast and the documentation contains a few examples for inspiration.
+ *
+ * See the documentation and examples here: https://docs.qmk.fm/#/feature_key_overrides
+ */
+
+/** Bitfield with various options controlling the behavior of a key override. */
+typedef enum {
+ /** Allow activating when the trigger key is pressed down. */
+ ko_option_activation_trigger_down = (1 << 0),
+ /** Allow activating when a necessary modifier is pressed down. */
+ ko_option_activation_required_mod_down = (1 << 1),
+ /** Allow activating when a negative modifier is released. */
+ ko_option_activation_negative_mod_up = (1 << 2),
+
+ ko_options_all_activations = ko_option_activation_negative_mod_up | ko_option_activation_required_mod_down | ko_option_activation_trigger_down,
+
+ /** If set, any of the modifiers in trigger_mods will be enough to activate the override (logical OR of modifiers). If not set, all the modifiers in trigger_mods have to be pressed (logical AND of modifiers). */
+ ko_option_one_mod = (1 << 3),
+
+ /** If set, the trigger key will never be registered again after the override is deactivated. */
+ ko_option_no_reregister_trigger = (1 << 4),
+
+ /** If set, the override will not deactivate when another key is pressed down. Use only if you really know you need this. */
+ ko_option_no_unregister_on_other_key_down = (1 << 5),
+
+ /** The default options used by the ko_make_xxx functions. */
+ ko_options_default = ko_options_all_activations,
+} ko_option_t;
+
+/** Defines a single key override */
+typedef struct {
+ // The non-modifier keycode that triggers the override. This keycode, and the necessary modifiers (trigger_mods) must be pressed to activate this override. Set this to the keycode of the key that should activate the override. Set to KC_NO to require only the necessary modifiers to be pressed and no non-modifier.
+ uint16_t trigger;
+
+ // Which mods need to be down for activation. If both sides of a modifier are set (e.g. left ctrl and right ctrl) then only one is required to be pressed (e.g. left ctrl suffices). Use the MOD_MASK_XXX and MOD_BIT() macros for this.
+ uint8_t trigger_mods;
+
+ // This is a BITMASK (!), defining which layers this override applies to. To use this override on layer i set the ith bit (1 << i).
+ layer_state_t layers;
+
+ // Which modifiers cannot be down. It must hold that (active_mods & negative_mod_mask) == 0, otherwise the key override will not be activated. An active override will be deactivated once this is no longer true.
+ uint8_t negative_mod_mask;
+
+ // Modifiers to 'suppress' while the override is active. To suppress a modifier means that even though the modifier key is held down, the host OS sees the modifier as not pressed. Can be used to suppress the trigger modifiers, as a trivial example.
+ uint8_t suppressed_mods;
+
+ // The complex keycode to send as replacement when this override is triggered. This can be a simple keycode, a key-modifier combination (e.g. C(KC_A)), or KC_NO (to register no replacement keycode). Use in combination with suppressed_mods to get the correct modifiers to be sent.
+ uint16_t replacement;
+
+ // Options controlling the behavior of the override, such as what actions are allowed to activate the override.
+ ko_option_t options;
+
+ // If not NULL, this function will be called right before the replacement key is registered, along with the provided context and a flag indicating whether the override was activated or deactivated. This function allows you to run some custom actions for specific key overrides. If you return `false`, the replacement key is not registered/unregistered as it would normally. Return `true` to register and unregister the override normally.
+ bool (*custom_action)(bool activated, void *context);
+
+ // A context that will be passed to the custom action function.
+ void *context;
+
+ // If this points to false this override will not be used. Set to NULL to always have this override enabled.
+ bool *enabled;
+} key_override_t;
+
+/** Define this as a null-terminated array of pointers to key overrides. These key overrides will be used by qmk. */
+extern const key_override_t **key_overrides;
+
+/** Turns key overrides on */
+extern void key_override_on(void);
+
+/** Turns key overrides off */
+extern void key_override_off(void);
+
+/** Toggles key overrides on */
+extern void key_override_toggle(void);
+
+/** Returns whether key overrides are enabled */
+extern bool key_override_is_enabled(void);
+
+/**
+ * Preferrably use these macros to create key overrides. They fix many of the options to a standard setting that should satisfy most basic use-cases. Only directly create a key_override_t struct when you really need to.
+ */
+
+// clang-format off
+
+/**
+ * Convenience initializer to create a basic key override. Activates the override on all layers.
+ */
+#define ko_make_basic(trigger_mods, trigger_key, replacement_key) \
+ ko_make_with_layers(trigger_mods, trigger_key, replacement_key, ~0)
+
+/**
+ * Convenience initializer to create a basic key override. Provide a bitmap (of type layer_state_t) with the bits set for each layer on which the override should activate.
+ */
+#define ko_make_with_layers(trigger_mods, trigger_key, replacement_key, layers) \
+ ko_make_with_layers_and_negmods(trigger_mods, trigger_key, replacement_key, layers, 0)
+
+/**
+ * Convenience initializer to create a basic key override. Provide a bitmap with the bits set for each layer on which the override should activate. Also provide a negative modifier mask, that is used to define which modifiers may not be pressed.
+ */
+#define ko_make_with_layers_and_negmods(trigger_mods, trigger_key, replacement_key, layers, negative_mask) \
+ ko_make_with_layers_negmods_and_options(trigger_mods, trigger_key, replacement_key, layers, negative_mask, ko_options_default)
+
+ /**
+ * Convenience initializer to create a basic key override. Provide a bitmap with the bits set for each layer on which the override should activate. Also provide a negative modifier mask, that is used to define which modifiers may not be pressed. Provide options for additional control of the behavior of the override.
+ */
+#define ko_make_with_layers_negmods_and_options(trigger_mods_, trigger_key, replacement_key, layer_mask, negative_mask, options_) \
+ ((const key_override_t){ \
+ .trigger_mods = (trigger_mods_), \
+ .layers = (layer_mask), \
+ .suppressed_mods = (trigger_mods_), \
+ .options = (options_), \
+ .negative_mod_mask = (negative_mask), \
+ .custom_action = NULL, \
+ .context = NULL, \
+ .trigger = (trigger_key), \
+ .replacement = (replacement_key), \
+ .enabled = NULL \
+ })
+
+// clang-format on
diff --git a/quantum/process_keycode/process_key_override_private.h b/quantum/process_keycode/process_key_override_private.h
new file mode 100644
index 0000000000..1d0e134a19
--- /dev/null
+++ b/quantum/process_keycode/process_key_override_private.h
@@ -0,0 +1,24 @@
+/*
+ * Copyright 2021 Jonas Gessner
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+
+#include <stdint.h>
+#include "action.h"
+
+bool process_key_override(const uint16_t keycode, const keyrecord_t *const record);
+void matrix_scan_key_override(void);
diff --git a/quantum/process_keycode/process_rgb.c b/quantum/process_keycode/process_rgb.c
index 167c0c03c9..b9fee1ca59 100644
--- a/quantum/process_keycode/process_rgb.c
+++ b/quantum/process_keycode/process_rgb.c
@@ -14,7 +14,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "process_rgb.h"
-#include "rgb.h"
typedef void (*rgb_func_pointer)(void);
diff --git a/quantum/quantum.c b/quantum/quantum.c
index 8ccdb774bd..56ceec5db8 100644
--- a/quantum/quantum.c
+++ b/quantum/quantum.c
@@ -49,21 +49,22 @@ float goodbye_song[][2] = GOODBYE_SONG;
# ifdef DEFAULT_LAYER_SONGS
float default_layer_songs[][16][2] = DEFAULT_LAYER_SONGS;
# endif
-# ifdef SENDSTRING_BELL
-float bell_song[][2] = SONG(TERMINAL_SOUND);
-# endif
#endif
#ifdef AUTO_SHIFT_ENABLE
# include "process_auto_shift.h"
#endif
-static void do_code16(uint16_t code, void (*f)(uint8_t)) {
+#ifdef KEY_OVERRIDE_ENABLE
+# include "process_key_override_private.h"
+#endif
+
+uint8_t extract_mod_bits(uint16_t code) {
switch (code) {
case QK_MODS ... QK_MODS_MAX:
break;
default:
- return;
+ return 0;
}
uint8_t mods_to_send = 0;
@@ -80,9 +81,11 @@ static void do_code16(uint16_t code, void (*f)(uint8_t)) {
if (code & QK_LGUI) mods_to_send |= MOD_BIT(KC_LGUI);
}
- f(mods_to_send);
+ return mods_to_send;
}
+static void do_code16(uint16_t code, void (*f)(uint8_t)) { f(extract_mod_bits(code)); }
+
void register_code16(uint16_t code) {
if (IS_MOD(code) || code == KC_NO) {
do_code16(code, register_mods);
@@ -243,6 +246,9 @@ bool process_record_quantum(keyrecord_t *record) {
#if (defined(AUDIO_ENABLE) || (defined(MIDI_ENABLE) && defined(MIDI_BASIC))) && !defined(NO_MUSIC_MODE)
process_music(keycode, record) &&
#endif
+#ifdef KEY_OVERRIDE_ENABLE
+ process_key_override(keycode, record) &&
+#endif
#ifdef TAP_DANCE_ENABLE
process_tap_dance(keycode, record) &&
#endif
@@ -340,13 +346,13 @@ 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 << default_layer);
- default_layer_set(1U << default_layer);
+ eeconfig_update_default_layer((layer_state_t)1 << default_layer);
+ default_layer_set((layer_state_t)1 << default_layer);
}
layer_state_t update_tri_layer_state(layer_state_t state, uint8_t layer1, uint8_t layer2, uint8_t layer3) {
- layer_state_t mask12 = (1UL << layer1) | (1UL << layer2);
- layer_state_t mask3 = 1UL << layer3;
+ layer_state_t mask12 = ((layer_state_t)1 << layer1) | ((layer_state_t)1 << layer2);
+ layer_state_t mask3 = (layer_state_t)1 << layer3;
return (state & mask12) == mask12 ? (state | mask3) : (state & ~mask3);
}
@@ -408,6 +414,10 @@ void matrix_scan_quantum() {
matrix_scan_music();
#endif
+#ifdef KEY_OVERRIDE_ENABLE
+ matrix_scan_key_override();
+#endif
+
#ifdef SEQUENCER_ENABLE
matrix_scan_sequencer();
#endif
diff --git a/quantum/quantum.h b/quantum/quantum.h
index 46fc0eb1e4..b8c120ea2f 100644
--- a/quantum/quantum.h
+++ b/quantum/quantum.h
@@ -114,6 +114,10 @@ extern layer_state_t layer_state;
# include "process_unicodemap.h"
#endif
+#ifdef KEY_OVERRIDE_ENABLE
+# include "process_key_override.h"
+#endif
+
#ifdef TAP_DANCE_ENABLE
# include "process_tap_dance.h"
#endif
@@ -172,6 +176,10 @@ extern layer_state_t layer_state;
# include "oled_driver.h"
#endif
+#ifdef ST7565_ENABLE
+# include "st7565.h"
+#endif
+
#ifdef DIP_SWITCH_ENABLE
# include "dip_switch.h"
#endif
diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h
index c361dd670e..3d2dbde922 100644
--- a/quantum/quantum_keycodes.h
+++ b/quantum/quantum_keycodes.h
@@ -514,6 +514,11 @@ enum quantum_keycodes {
// RGB underglow/matrix (continued)
RGB_MODE_TWINKLE,
+ // Key Overrides
+ KEY_OVERRIDE_TOGGLE,
+ KEY_OVERRIDE_ON,
+ KEY_OVERRIDE_OFF,
+
// Start of custom keycode range for keyboards and keymaps - always leave at the end
SAFE_RANGE
};
diff --git a/quantum/rgb.h b/quantum/rgb.h
deleted file mode 100644
index 2602fc0b20..0000000000
--- a/quantum/rgb.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/* Copyright 2017 Jack Humbert
- *
- * 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 <http://www.gnu.org/licenses/>.
- */
-
-#pragma once
-
-__attribute__((weak)) void rgblight_toggle(void){};
-
-__attribute__((weak)) void rgblight_step(void){};
-
-__attribute__((weak)) void rgblight_step_reverse(void){};
-
-__attribute__((weak)) void rgblight_increase_hue(void){};
-
-__attribute__((weak)) void rgblight_decrease_hue(void){};
-
-__attribute__((weak)) void rgblight_increase_sat(void){};
-
-__attribute__((weak)) void rgblight_decrease_sat(void){};
-
-__attribute__((weak)) void rgblight_increase_val(void){};
-
-__attribute__((weak)) void rgblight_decrease_val(void){};
-
-__attribute__((weak)) void rgblight_increase_speed(void){};
-
-__attribute__((weak)) void rgblight_decrease_speed(void){};
diff --git a/quantum/rgb_matrix_animations/alpha_mods_anim.h b/quantum/rgb_matrix/animations/alpha_mods_anim.h
index 426d88ef35..426d88ef35 100644
--- a/quantum/rgb_matrix_animations/alpha_mods_anim.h
+++ b/quantum/rgb_matrix/animations/alpha_mods_anim.h
diff --git a/quantum/rgb_matrix_animations/breathing_anim.h b/quantum/rgb_matrix/animations/breathing_anim.h
index 340bd93e5d..340bd93e5d 100644
--- a/quantum/rgb_matrix_animations/breathing_anim.h
+++ b/quantum/rgb_matrix/animations/breathing_anim.h
diff --git a/quantum/rgb_matrix_animations/colorband_pinwheel_sat_anim.h b/quantum/rgb_matrix/animations/colorband_pinwheel_sat_anim.h
index 3df3cfda7d..3df3cfda7d 100644
--- a/quantum/rgb_matrix_animations/colorband_pinwheel_sat_anim.h
+++ b/quantum/rgb_matrix/animations/colorband_pinwheel_sat_anim.h
diff --git a/quantum/rgb_matrix_animations/colorband_pinwheel_val_anim.h b/quantum/rgb_matrix/animations/colorband_pinwheel_val_anim.h
index 7d80074fd5..7d80074fd5 100644
--- a/quantum/rgb_matrix_animations/colorband_pinwheel_val_anim.h
+++ b/quantum/rgb_matrix/animations/colorband_pinwheel_val_anim.h
diff --git a/quantum/rgb_matrix_animations/colorband_sat_anim.h b/quantum/rgb_matrix/animations/colorband_sat_anim.h
index 35b830af6b..35b830af6b 100644
--- a/quantum/rgb_matrix_animations/colorband_sat_anim.h
+++ b/quantum/rgb_matrix/animations/colorband_sat_anim.h
diff --git a/quantum/rgb_matrix_animations/colorband_spiral_sat_anim.h b/quantum/rgb_matrix/animations/colorband_spiral_sat_anim.h
index 048157aa1b..048157aa1b 100644
--- a/quantum/rgb_matrix_animations/colorband_spiral_sat_anim.h
+++ b/quantum/rgb_matrix/animations/colorband_spiral_sat_anim.h
diff --git a/quantum/rgb_matrix_animations/colorband_spiral_val_anim.h b/quantum/rgb_matrix/animations/colorband_spiral_val_anim.h
index bff2da1616..bff2da1616 100644
--- a/quantum/rgb_matrix_animations/colorband_spiral_val_anim.h
+++ b/quantum/rgb_matrix/animations/colorband_spiral_val_anim.h
diff --git a/quantum/rgb_matrix_animations/colorband_val_anim.h b/quantum/rgb_matrix/animations/colorband_val_anim.h
index f1aaf1d067..f1aaf1d067 100644
--- a/quantum/rgb_matrix_animations/colorband_val_anim.h
+++ b/quantum/rgb_matrix/animations/colorband_val_anim.h
diff --git a/quantum/rgb_matrix_animations/cycle_all_anim.h b/quantum/rgb_matrix/animations/cycle_all_anim.h
index faf8598a39..faf8598a39 100644
--- a/quantum/rgb_matrix_animations/cycle_all_anim.h
+++ b/quantum/rgb_matrix/animations/cycle_all_anim.h
diff --git a/quantum/rgb_matrix_animations/cycle_left_right_anim.h b/quantum/rgb_matrix/animations/cycle_left_right_anim.h
index cf911eb937..cf911eb937 100644
--- a/quantum/rgb_matrix_animations/cycle_left_right_anim.h
+++ b/quantum/rgb_matrix/animations/cycle_left_right_anim.h
diff --git a/quantum/rgb_matrix_animations/cycle_out_in_anim.h b/quantum/rgb_matrix/animations/cycle_out_in_anim.h
index d66acd4b2b..d66acd4b2b 100644
--- a/quantum/rgb_matrix_animations/cycle_out_in_anim.h
+++ b/quantum/rgb_matrix/animations/cycle_out_in_anim.h
diff --git a/quantum/rgb_matrix_animations/cycle_out_in_dual_anim.h b/quantum/rgb_matrix/animations/cycle_out_in_dual_anim.h
index fe8396140f..fe8396140f 100644
--- a/quantum/rgb_matrix_animations/cycle_out_in_dual_anim.h
+++ b/quantum/rgb_matrix/animations/cycle_out_in_dual_anim.h
diff --git a/quantum/rgb_matrix_animations/cycle_pinwheel_anim.h b/quantum/rgb_matrix/animations/cycle_pinwheel_anim.h
index 7799887099..7799887099 100644
--- a/quantum/rgb_matrix_animations/cycle_pinwheel_anim.h
+++ b/quantum/rgb_matrix/animations/cycle_pinwheel_anim.h
diff --git a/quantum/rgb_matrix_animations/cycle_spiral_anim.h b/quantum/rgb_matrix/animations/cycle_spiral_anim.h
index 80cfb0dbc7..80cfb0dbc7 100644
--- a/quantum/rgb_matrix_animations/cycle_spiral_anim.h
+++ b/quantum/rgb_matrix/animations/cycle_spiral_anim.h
diff --git a/quantum/rgb_matrix_animations/cycle_up_down_anim.h b/quantum/rgb_matrix/animations/cycle_up_down_anim.h
index 5016f739d6..5016f739d6 100644
--- a/quantum/rgb_matrix_animations/cycle_up_down_anim.h
+++ b/quantum/rgb_matrix/animations/cycle_up_down_anim.h
diff --git a/quantum/rgb_matrix_animations/digital_rain_anim.h b/quantum/rgb_matrix/animations/digital_rain_anim.h
index 1de45f8e8d..1de45f8e8d 100644
--- a/quantum/rgb_matrix_animations/digital_rain_anim.h
+++ b/quantum/rgb_matrix/animations/digital_rain_anim.h
diff --git a/quantum/rgb_matrix_animations/dual_beacon_anim.h b/quantum/rgb_matrix/animations/dual_beacon_anim.h
index ce94871681..ce94871681 100644
--- a/quantum/rgb_matrix_animations/dual_beacon_anim.h
+++ b/quantum/rgb_matrix/animations/dual_beacon_anim.h
diff --git a/quantum/rgb_matrix_animations/gradient_left_right_anim.h b/quantum/rgb_matrix/animations/gradient_left_right_anim.h
index 53dfd04e2c..53dfd04e2c 100644
--- a/quantum/rgb_matrix_animations/gradient_left_right_anim.h
+++ b/quantum/rgb_matrix/animations/gradient_left_right_anim.h
diff --git a/quantum/rgb_matrix_animations/gradient_up_down_anim.h b/quantum/rgb_matrix/animations/gradient_up_down_anim.h
index 7e0d2898cf..7e0d2898cf 100644
--- a/quantum/rgb_matrix_animations/gradient_up_down_anim.h
+++ b/quantum/rgb_matrix/animations/gradient_up_down_anim.h
diff --git a/quantum/rgb_matrix_animations/hue_breathing_anim.h b/quantum/rgb_matrix/animations/hue_breathing_anim.h
index 54dea958af..54dea958af 100644
--- a/quantum/rgb_matrix_animations/hue_breathing_anim.h
+++ b/quantum/rgb_matrix/animations/hue_breathing_anim.h
diff --git a/quantum/rgb_matrix_animations/hue_pendulum_anim.h b/quantum/rgb_matrix/animations/hue_pendulum_anim.h
index 2d8d36174f..2d8d36174f 100644
--- a/quantum/rgb_matrix_animations/hue_pendulum_anim.h
+++ b/quantum/rgb_matrix/animations/hue_pendulum_anim.h
diff --git a/quantum/rgb_matrix_animations/hue_wave_anim.h b/quantum/rgb_matrix/animations/hue_wave_anim.h
index fd9026fc90..fd9026fc90 100644
--- a/quantum/rgb_matrix_animations/hue_wave_anim.h
+++ b/quantum/rgb_matrix/animations/hue_wave_anim.h
diff --git a/quantum/rgb_matrix_animations/jellybean_raindrops_anim.h b/quantum/rgb_matrix/animations/jellybean_raindrops_anim.h
index 9493b38508..a17e954b1b 100644
--- a/quantum/rgb_matrix_animations/jellybean_raindrops_anim.h
+++ b/quantum/rgb_matrix/animations/jellybean_raindrops_anim.h
@@ -4,7 +4,7 @@ RGB_MATRIX_EFFECT(JELLYBEAN_RAINDROPS)
static void jellybean_raindrops_set_color(int i, effect_params_t* params) {
if (!HAS_ANY_FLAGS(g_led_config.flags[i], params->flags)) return;
- HSV hsv = {rand() & 0xFF, rand() & 0xFF, rgb_matrix_config.hsv.v};
+ HSV hsv = {rand() & 0xFF, qadd8(rand() & 0x7F, 0x80), rgb_matrix_config.hsv.v};
RGB rgb = rgb_matrix_hsv_to_rgb(hsv);
rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
}
diff --git a/quantum/rgb_matrix_animations/rainbow_beacon_anim.h b/quantum/rgb_matrix/animations/rainbow_beacon_anim.h
index 977261182f..977261182f 100644
--- a/quantum/rgb_matrix_animations/rainbow_beacon_anim.h
+++ b/quantum/rgb_matrix/animations/rainbow_beacon_anim.h
diff --git a/quantum/rgb_matrix_animations/rainbow_moving_chevron_anim.h b/quantum/rgb_matrix/animations/rainbow_moving_chevron_anim.h
index e51e7b2516..e51e7b2516 100644
--- a/quantum/rgb_matrix_animations/rainbow_moving_chevron_anim.h
+++ b/quantum/rgb_matrix/animations/rainbow_moving_chevron_anim.h
diff --git a/quantum/rgb_matrix_animations/rainbow_pinwheels_anim.h b/quantum/rgb_matrix/animations/rainbow_pinwheels_anim.h
index 1cd4ed2acf..1cd4ed2acf 100644
--- a/quantum/rgb_matrix_animations/rainbow_pinwheels_anim.h
+++ b/quantum/rgb_matrix/animations/rainbow_pinwheels_anim.h
diff --git a/quantum/rgb_matrix_animations/raindrops_anim.h b/quantum/rgb_matrix/animations/raindrops_anim.h
index 38359cdca7..38359cdca7 100644
--- a/quantum/rgb_matrix_animations/raindrops_anim.h
+++ b/quantum/rgb_matrix/animations/raindrops_anim.h
diff --git a/quantum/rgb_matrix/animations/rgb_matrix_effects.inc b/quantum/rgb_matrix/animations/rgb_matrix_effects.inc
new file mode 100644
index 0000000000..302ad79c04
--- /dev/null
+++ b/quantum/rgb_matrix/animations/rgb_matrix_effects.inc
@@ -0,0 +1,37 @@
+// Add your new core rgb matrix effect here, order determines enum order
+#include "solid_color_anim.h"
+#include "alpha_mods_anim.h"
+#include "gradient_up_down_anim.h"
+#include "gradient_left_right_anim.h"
+#include "breathing_anim.h"
+#include "colorband_sat_anim.h"
+#include "colorband_val_anim.h"
+#include "colorband_pinwheel_sat_anim.h"
+#include "colorband_pinwheel_val_anim.h"
+#include "colorband_spiral_sat_anim.h"
+#include "colorband_spiral_val_anim.h"
+#include "cycle_all_anim.h"
+#include "cycle_left_right_anim.h"
+#include "cycle_up_down_anim.h"
+#include "rainbow_moving_chevron_anim.h"
+#include "cycle_out_in_anim.h"
+#include "cycle_out_in_dual_anim.h"
+#include "cycle_pinwheel_anim.h"
+#include "cycle_spiral_anim.h"
+#include "dual_beacon_anim.h"
+#include "rainbow_beacon_anim.h"
+#include "rainbow_pinwheels_anim.h"
+#include "raindrops_anim.h"
+#include "jellybean_raindrops_anim.h"
+#include "hue_breathing_anim.h"
+#include "hue_pendulum_anim.h"
+#include "hue_wave_anim.h"
+#include "typing_heatmap_anim.h"
+#include "digital_rain_anim.h"
+#include "solid_reactive_simple_anim.h"
+#include "solid_reactive_anim.h"
+#include "solid_reactive_wide.h"
+#include "solid_reactive_cross.h"
+#include "solid_reactive_nexus.h"
+#include "splash_anim.h"
+#include "solid_splash_anim.h"
diff --git a/quantum/rgb_matrix_runners/effect_runner_dx_dy.h b/quantum/rgb_matrix/animations/runners/effect_runner_dx_dy.h
index 4867609c81..4867609c81 100644
--- a/quantum/rgb_matrix_runners/effect_runner_dx_dy.h
+++ b/quantum/rgb_matrix/animations/runners/effect_runner_dx_dy.h
diff --git a/quantum/rgb_matrix_runners/effect_runner_dx_dy_dist.h b/quantum/rgb_matrix/animations/runners/effect_runner_dx_dy_dist.h
index 9545b418d9..9545b418d9 100644
--- a/quantum/rgb_matrix_runners/effect_runner_dx_dy_dist.h
+++ b/quantum/rgb_matrix/animations/runners/effect_runner_dx_dy_dist.h
diff --git a/quantum/rgb_matrix_runners/effect_runner_i.h b/quantum/rgb_matrix/animations/runners/effect_runner_i.h
index 1881cd6c60..1881cd6c60 100644
--- a/quantum/rgb_matrix_runners/effect_runner_i.h
+++ b/quantum/rgb_matrix/animations/runners/effect_runner_i.h
diff --git a/quantum/rgb_matrix_runners/effect_runner_reactive.h b/quantum/rgb_matrix/animations/runners/effect_runner_reactive.h
index 75b7c0df4e..75b7c0df4e 100644
--- a/quantum/rgb_matrix_runners/effect_runner_reactive.h
+++ b/quantum/rgb_matrix/animations/runners/effect_runner_reactive.h
diff --git a/quantum/rgb_matrix_runners/effect_runner_reactive_splash.h b/quantum/rgb_matrix/animations/runners/effect_runner_reactive_splash.h
index 2e46ffb350..2e46ffb350 100644
--- a/quantum/rgb_matrix_runners/effect_runner_reactive_splash.h
+++ b/quantum/rgb_matrix/animations/runners/effect_runner_reactive_splash.h
diff --git a/quantum/rgb_matrix_runners/effect_runner_sin_cos_i.h b/quantum/rgb_matrix/animations/runners/effect_runner_sin_cos_i.h
index 02351de51e..02351de51e 100644
--- a/quantum/rgb_matrix_runners/effect_runner_sin_cos_i.h
+++ b/quantum/rgb_matrix/animations/runners/effect_runner_sin_cos_i.h
diff --git a/quantum/rgb_matrix/animations/runners/rgb_matrix_runners.inc b/quantum/rgb_matrix/animations/runners/rgb_matrix_runners.inc
new file mode 100644
index 0000000000..c09022bb0f
--- /dev/null
+++ b/quantum/rgb_matrix/animations/runners/rgb_matrix_runners.inc
@@ -0,0 +1,6 @@
+#include "effect_runner_dx_dy_dist.h"
+#include "effect_runner_dx_dy.h"
+#include "effect_runner_i.h"
+#include "effect_runner_sin_cos_i.h"
+#include "effect_runner_reactive.h"
+#include "effect_runner_reactive_splash.h"
diff --git a/quantum/rgb_matrix_animations/solid_color_anim.h b/quantum/rgb_matrix/animations/solid_color_anim.h
index 79d63cf133..79d63cf133 100644
--- a/quantum/rgb_matrix_animations/solid_color_anim.h
+++ b/quantum/rgb_matrix/animations/solid_color_anim.h
diff --git a/quantum/rgb_matrix_animations/solid_reactive_anim.h b/quantum/rgb_matrix/animations/solid_reactive_anim.h
index d45bb961bc..d45bb961bc 100644
--- a/quantum/rgb_matrix_animations/solid_reactive_anim.h
+++ b/quantum/rgb_matrix/animations/solid_reactive_anim.h
diff --git a/quantum/rgb_matrix_animations/solid_reactive_cross.h b/quantum/rgb_matrix/animations/solid_reactive_cross.h
index f76c68e8c7..f76c68e8c7 100644
--- a/quantum/rgb_matrix_animations/solid_reactive_cross.h
+++ b/quantum/rgb_matrix/animations/solid_reactive_cross.h
diff --git a/quantum/rgb_matrix_animations/solid_reactive_nexus.h b/quantum/rgb_matrix/animations/solid_reactive_nexus.h
index 17f94e3c18..17f94e3c18 100644
--- a/quantum/rgb_matrix_animations/solid_reactive_nexus.h
+++ b/quantum/rgb_matrix/animations/solid_reactive_nexus.h
diff --git a/quantum/rgb_matrix_animations/solid_reactive_simple_anim.h b/quantum/rgb_matrix/animations/solid_reactive_simple_anim.h
index 12eb248cc0..12eb248cc0 100644
--- a/quantum/rgb_matrix_animations/solid_reactive_simple_anim.h
+++ b/quantum/rgb_matrix/animations/solid_reactive_simple_anim.h
diff --git a/quantum/rgb_matrix_animations/solid_reactive_wide.h b/quantum/rgb_matrix/animations/solid_reactive_wide.h
index 1cc4dca728..1cc4dca728 100644
--- a/quantum/rgb_matrix_animations/solid_reactive_wide.h
+++ b/quantum/rgb_matrix/animations/solid_reactive_wide.h
diff --git a/quantum/rgb_matrix_animations/solid_splash_anim.h b/quantum/rgb_matrix/animations/solid_splash_anim.h
index 99efb4996a..99efb4996a 100644
--- a/quantum/rgb_matrix_animations/solid_splash_anim.h
+++ b/quantum/rgb_matrix/animations/solid_splash_anim.h
diff --git a/quantum/rgb_matrix_animations/splash_anim.h b/quantum/rgb_matrix/animations/splash_anim.h
index 1415bcc0fa..1415bcc0fa 100644
--- a/quantum/rgb_matrix_animations/splash_anim.h
+++ b/quantum/rgb_matrix/animations/splash_anim.h
diff --git a/quantum/rgb_matrix_animations/typing_heatmap_anim.h b/quantum/rgb_matrix/animations/typing_heatmap_anim.h
index e7dda11a2f..e7dda11a2f 100644
--- a/quantum/rgb_matrix_animations/typing_heatmap_anim.h
+++ b/quantum/rgb_matrix/animations/typing_heatmap_anim.h
diff --git a/quantum/rgb_matrix.c b/quantum/rgb_matrix/rgb_matrix.c
index ab8dbd849b..624e851581 100644
--- a/quantum/rgb_matrix.c
+++ b/quantum/rgb_matrix/rgb_matrix.c
@@ -31,22 +31,25 @@ const led_point_t k_rgb_matrix_center = {112, 32};
const led_point_t k_rgb_matrix_center = RGB_MATRIX_CENTER;
#endif
+// clang-format off
+#ifndef RGB_MATRIX_IMMEDIATE_EEPROM
+# define rgb_eeconfig_update(v) rgb_update_eeprom |= v
+#else
+# define rgb_eeconfig_update(v) if (v) eeconfig_update_rgb_matrix()
+#endif
+// clang-format on
+
__attribute__((weak)) RGB rgb_matrix_hsv_to_rgb(HSV hsv) { return hsv_to_rgb(hsv); }
// Generic effect runners
-#include "rgb_matrix_runners/effect_runner_dx_dy_dist.h"
-#include "rgb_matrix_runners/effect_runner_dx_dy.h"
-#include "rgb_matrix_runners/effect_runner_i.h"
-#include "rgb_matrix_runners/effect_runner_sin_cos_i.h"
-#include "rgb_matrix_runners/effect_runner_reactive.h"
-#include "rgb_matrix_runners/effect_runner_reactive_splash.h"
+#include "rgb_matrix_runners.inc"
// ------------------------------------------
// -----Begin rgb effect includes macros-----
#define RGB_MATRIX_EFFECT(name)
#define RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-#include "rgb_matrix_animations/rgb_matrix_effects.inc"
+#include "rgb_matrix_effects.inc"
#ifdef RGB_MATRIX_CUSTOM_KB
# include "rgb_matrix_kb.inc"
#endif
@@ -67,10 +70,6 @@ __attribute__((weak)) RGB rgb_matrix_hsv_to_rgb(HSV hsv) { return hsv_to_rgb(hsv
# define RGB_DISABLE_TIMEOUT 0
#endif
-#if RGB_DISABLE_WHEN_USB_SUSPENDED != 1
-# undef RGB_DISABLE_WHEN_USB_SUSPENDED
-#endif
-
#if !defined(RGB_MATRIX_MAXIMUM_BRIGHTNESS) || RGB_MATRIX_MAXIMUM_BRIGHTNESS > UINT8_MAX
# undef RGB_MATRIX_MAXIMUM_BRIGHTNESS
# define RGB_MATRIX_MAXIMUM_BRIGHTNESS UINT8_MAX
@@ -129,6 +128,7 @@ last_hit_t g_last_hit_tracker;
// internals
static bool suspend_state = false;
+static bool rgb_update_eeprom = false;
static uint8_t rgb_last_enable = UINT8_MAX;
static uint8_t rgb_last_effect = UINT8_MAX;
static effect_params_t rgb_effect_params = {0, LED_FLAG_ALL, false};
@@ -230,7 +230,7 @@ void process_rgb_matrix(uint8_t row, uint8_t col, bool pressed) {
memcpy(&last_hit_buffer.y[0], &last_hit_buffer.y[led_count], LED_HITS_TO_REMEMBER - led_count);
memcpy(&last_hit_buffer.tick[0], &last_hit_buffer.tick[led_count], (LED_HITS_TO_REMEMBER - led_count) * 2); // 16 bit
memcpy(&last_hit_buffer.index[0], &last_hit_buffer.index[led_count], LED_HITS_TO_REMEMBER - led_count);
- last_hit_buffer.count--;
+ last_hit_buffer.count = LED_HITS_TO_REMEMBER - led_count;
}
for (uint8_t i = 0; i < led_count; i++) {
@@ -315,6 +315,8 @@ static void rgb_task_timers(void) {
static void rgb_task_sync(void) {
// next task
+ if (rgb_update_eeprom) eeconfig_update_rgb_matrix();
+ rgb_update_eeprom = false;
if (sync_timer_elapsed32(g_rgb_timer) >= RGB_MATRIX_LED_FLUSH_LIMIT) rgb_task_state = STARTING;
}
@@ -353,7 +355,7 @@ static void rgb_task_render(uint8_t effect) {
case RGB_MATRIX_##name: \
rendering = name(&rgb_effect_params); \
break;
-#include "rgb_matrix_animations/rgb_matrix_effects.inc"
+#include "rgb_matrix_effects.inc"
#undef RGB_MATRIX_EFFECT
#if defined(RGB_MATRIX_CUSTOM_KB) || defined(RGB_MATRIX_CUSTOM_USER)
@@ -511,9 +513,7 @@ bool rgb_matrix_get_suspend_state(void) { return suspend_state; }
void rgb_matrix_toggle_eeprom_helper(bool write_to_eeprom) {
rgb_matrix_config.enable ^= 1;
rgb_task_state = STARTING;
- if (write_to_eeprom) {
- eeconfig_update_rgb_matrix();
- }
+ rgb_eeconfig_update(write_to_eeprom);
dprintf("rgb matrix toggle [%s]: rgb_matrix_config.enable = %u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", rgb_matrix_config.enable);
}
void rgb_matrix_toggle_noeeprom(void) { rgb_matrix_toggle_eeprom_helper(false); }
@@ -521,7 +521,7 @@ void rgb_matrix_toggle(void) { rgb_matrix_toggle_eeprom_helper(true); }
void rgb_matrix_enable(void) {
rgb_matrix_enable_noeeprom();
- eeconfig_update_rgb_matrix();
+ rgb_eeconfig_update(true);
}
void rgb_matrix_enable_noeeprom(void) {
@@ -531,7 +531,7 @@ void rgb_matrix_enable_noeeprom(void) {
void rgb_matrix_disable(void) {
rgb_matrix_disable_noeeprom();
- eeconfig_update_rgb_matrix();
+ rgb_eeconfig_update(true);
}
void rgb_matrix_disable_noeeprom(void) {
@@ -553,9 +553,7 @@ void rgb_matrix_mode_eeprom_helper(uint8_t mode, bool write_to_eeprom) {
rgb_matrix_config.mode = mode;
}
rgb_task_state = STARTING;
- if (write_to_eeprom) {
- eeconfig_update_rgb_matrix();
- }
+ rgb_eeconfig_update(write_to_eeprom);
dprintf("rgb matrix mode [%s]: %u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", rgb_matrix_config.mode);
}
void rgb_matrix_mode_noeeprom(uint8_t mode) { rgb_matrix_mode_eeprom_helper(mode, false); }
@@ -584,9 +582,7 @@ void rgb_matrix_sethsv_eeprom_helper(uint16_t hue, uint8_t sat, uint8_t val, boo
rgb_matrix_config.hsv.h = hue;
rgb_matrix_config.hsv.s = sat;
rgb_matrix_config.hsv.v = (val > RGB_MATRIX_MAXIMUM_BRIGHTNESS) ? RGB_MATRIX_MAXIMUM_BRIGHTNESS : val;
- if (write_to_eeprom) {
- eeconfig_update_rgb_matrix();
- }
+ rgb_eeconfig_update(write_to_eeprom);
dprintf("rgb matrix set hsv [%s]: %u,%u,%u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", rgb_matrix_config.hsv.h, rgb_matrix_config.hsv.s, rgb_matrix_config.hsv.v);
}
void rgb_matrix_sethsv_noeeprom(uint16_t hue, uint8_t sat, uint8_t val) { rgb_matrix_sethsv_eeprom_helper(hue, sat, val, false); }
@@ -623,9 +619,7 @@ void rgb_matrix_decrease_val(void) { rgb_matrix_decrease_val_helper(true); }
void rgb_matrix_set_speed_eeprom_helper(uint8_t speed, bool write_to_eeprom) {
rgb_matrix_config.speed = speed;
- if (write_to_eeprom) {
- eeconfig_update_rgb_matrix();
- }
+ rgb_eeconfig_update(write_to_eeprom);
dprintf("rgb matrix set speed [%s]: %u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", rgb_matrix_config.speed);
}
void rgb_matrix_set_speed_noeeprom(uint8_t speed) { rgb_matrix_set_speed_eeprom_helper(speed, false); }
diff --git a/quantum/rgb_matrix.h b/quantum/rgb_matrix/rgb_matrix.h
index a615b8422c..28f07c84d6 100644
--- a/quantum/rgb_matrix.h
+++ b/quantum/rgb_matrix/rgb_matrix.h
@@ -33,6 +33,8 @@
# include "is31fl3737.h"
#elif defined(IS31FL3741)
# include "is31fl3741.h"
+#elif defined(AW20216)
+# include "aw20216.h"
#elif defined(WS2812)
# include "ws2812.h"
#endif
@@ -70,7 +72,7 @@ enum rgb_matrix_effects {
// --------------------------------------
// -----Begin rgb effect enum macros-----
#define RGB_MATRIX_EFFECT(name, ...) RGB_MATRIX_##name,
-#include "rgb_matrix_animations/rgb_matrix_effects.inc"
+#include "rgb_matrix_effects.inc"
#undef RGB_MATRIX_EFFECT
#if defined(RGB_MATRIX_CUSTOM_KB) || defined(RGB_MATRIX_CUSTOM_USER)
diff --git a/quantum/rgb_matrix_drivers.c b/quantum/rgb_matrix/rgb_matrix_drivers.c
index 896fa6d0ef..dfdf452190 100644
--- a/quantum/rgb_matrix_drivers.c
+++ b/quantum/rgb_matrix/rgb_matrix_drivers.c
@@ -65,6 +65,9 @@ static void init(void) {
# endif
# elif defined(IS31FL3737)
IS31FL3737_init(DRIVER_ADDR_1);
+# if defined(DRIVER_ADDR_2) && (DRIVER_ADDR_2 != DRIVER_ADDR_1) // provides backward compatibility
+ IS31FL3737_init(DRIVER_ADDR_2);
+# endif
# else
IS31FL3741_init(DRIVER_ADDR_1);
# endif
@@ -105,7 +108,10 @@ static void init(void) {
IS31FL3733_update_led_control_registers(DRIVER_ADDR_4, 3);
# endif
# elif defined(IS31FL3737)
- IS31FL3737_update_led_control_registers(DRIVER_ADDR_1, DRIVER_ADDR_2);
+ IS31FL3737_update_led_control_registers(DRIVER_ADDR_1, 0);
+# if defined(DRIVER_ADDR_2) && (DRIVER_ADDR_2 != DRIVER_ADDR_1) // provides backward compatibility
+ IS31FL3737_update_led_control_registers(DRIVER_ADDR_2, 1);
+# endif
# else
IS31FL3741_update_led_control_registers(DRIVER_ADDR_1, 0);
# endif
@@ -152,7 +158,12 @@ const rgb_matrix_driver_t rgb_matrix_driver = {
.set_color_all = IS31FL3733_set_color_all,
};
# elif defined(IS31FL3737)
-static void flush(void) { IS31FL3737_update_pwm_buffers(DRIVER_ADDR_1, DRIVER_ADDR_2); }
+static void flush(void) {
+ IS31FL3737_update_pwm_buffers(DRIVER_ADDR_1, 0);
+# if defined(DRIVER_ADDR_2) && (DRIVER_ADDR_2 != DRIVER_ADDR_1) // provides backward compatibility
+ IS31FL3737_update_pwm_buffers(DRIVER_ADDR_2, 1);
+# endif
+}
const rgb_matrix_driver_t rgb_matrix_driver = {
.init = init,
@@ -171,6 +182,22 @@ const rgb_matrix_driver_t rgb_matrix_driver = {
};
# endif
+#elif defined(AW20216)
+# include "spi_master.h"
+static void init(void) {
+ spi_init();
+ AW20216_init();
+}
+
+static void flush(void) { AW20216_update_pwm_buffers(); }
+
+const rgb_matrix_driver_t rgb_matrix_driver = {
+ .init = init,
+ .flush = flush,
+ .set_color = AW20216_set_color,
+ .set_color_all = AW20216_set_color_all,
+};
+
#elif defined(WS2812)
# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_CUSTOM_DRIVER)
# pragma message "Cannot use RGBLIGHT and RGB Matrix using WS2812 at the same time."
diff --git a/quantum/rgb_matrix_types.h b/quantum/rgb_matrix/rgb_matrix_types.h
index df575d6577..df575d6577 100644
--- a/quantum/rgb_matrix_types.h
+++ b/quantum/rgb_matrix/rgb_matrix_types.h
diff --git a/quantum/rgb_matrix_animations/rgb_matrix_effects.inc b/quantum/rgb_matrix_animations/rgb_matrix_effects.inc
deleted file mode 100644
index 053d441506..0000000000
--- a/quantum/rgb_matrix_animations/rgb_matrix_effects.inc
+++ /dev/null
@@ -1,37 +0,0 @@
-// Add your new core rgb matrix effect here, order determins enum order, requires "rgb_matrix_animations/ directory
-#include "rgb_matrix_animations/solid_color_anim.h"
-#include "rgb_matrix_animations/alpha_mods_anim.h"
-#include "rgb_matrix_animations/gradient_up_down_anim.h"
-#include "rgb_matrix_animations/gradient_left_right_anim.h"
-#include "rgb_matrix_animations/breathing_anim.h"
-#include "rgb_matrix_animations/colorband_sat_anim.h"
-#include "rgb_matrix_animations/colorband_val_anim.h"
-#include "rgb_matrix_animations/colorband_pinwheel_sat_anim.h"
-#include "rgb_matrix_animations/colorband_pinwheel_val_anim.h"
-#include "rgb_matrix_animations/colorband_spiral_sat_anim.h"
-#include "rgb_matrix_animations/colorband_spiral_val_anim.h"
-#include "rgb_matrix_animations/cycle_all_anim.h"
-#include "rgb_matrix_animations/cycle_left_right_anim.h"
-#include "rgb_matrix_animations/cycle_up_down_anim.h"
-#include "rgb_matrix_animations/rainbow_moving_chevron_anim.h"
-#include "rgb_matrix_animations/cycle_out_in_anim.h"
-#include "rgb_matrix_animations/cycle_out_in_dual_anim.h"
-#include "rgb_matrix_animations/cycle_pinwheel_anim.h"
-#include "rgb_matrix_animations/cycle_spiral_anim.h"
-#include "rgb_matrix_animations/dual_beacon_anim.h"
-#include "rgb_matrix_animations/rainbow_beacon_anim.h"
-#include "rgb_matrix_animations/rainbow_pinwheels_anim.h"
-#include "rgb_matrix_animations/raindrops_anim.h"
-#include "rgb_matrix_animations/jellybean_raindrops_anim.h"
-#include "rgb_matrix_animations/hue_breathing_anim.h"
-#include "rgb_matrix_animations/hue_pendulum_anim.h"
-#include "rgb_matrix_animations/hue_wave_anim.h"
-#include "rgb_matrix_animations/typing_heatmap_anim.h"
-#include "rgb_matrix_animations/digital_rain_anim.h"
-#include "rgb_matrix_animations/solid_reactive_simple_anim.h"
-#include "rgb_matrix_animations/solid_reactive_anim.h"
-#include "rgb_matrix_animations/solid_reactive_wide.h"
-#include "rgb_matrix_animations/solid_reactive_cross.h"
-#include "rgb_matrix_animations/solid_reactive_nexus.h"
-#include "rgb_matrix_animations/splash_anim.h"
-#include "rgb_matrix_animations/solid_splash_anim.h"
diff --git a/quantum/rgblight.c b/quantum/rgblight/rgblight.c
index baa10ec416..54face173c 100644
--- a/quantum/rgblight.c
+++ b/quantum/rgblight/rgblight.c
@@ -890,7 +890,7 @@ void rgblight_update_sync(rgblight_syncinfo_t *syncinfo, bool write_to_eeprom) {
animation_status.restart = true;
}
# endif /* RGBLIGHT_SPLIT_NO_ANIMATION_SYNC */
-# endif /* RGBLIGHT_USE_TIMER */
+# endif /* RGBLIGHT_USE_TIMER */
}
#endif /* RGBLIGHT_SPLIT */
diff --git a/quantum/rgblight.h b/quantum/rgblight/rgblight.h
index bec2c66955..bec2c66955 100644
--- a/quantum/rgblight.h
+++ b/quantum/rgblight/rgblight.h
diff --git a/quantum/rgblight_breathe_table.h b/quantum/rgblight/rgblight_breathe_table.h
index 30245318b6..30245318b6 100644
--- a/quantum/rgblight_breathe_table.h
+++ b/quantum/rgblight/rgblight_breathe_table.h
diff --git a/quantum/rgblight_list.h b/quantum/rgblight/rgblight_list.h
index f29a646b66..0fd68b75f3 100644
--- a/quantum/rgblight_list.h
+++ b/quantum/rgblight/rgblight_list.h
@@ -15,49 +15,7 @@
*/
#pragma once
-/* RGB COLORS */
-#define RGB_WHITE 0xFF, 0xFF, 0xFF
-#define RGB_RED 0xFF, 0x00, 0x00
-#define RGB_CORAL 0xFF, 0x7C, 0x4D
-#define RGB_ORANGE 0xFF, 0x80, 0x00
-#define RGB_GOLDENROD 0xD9, 0xA5, 0x21
-#define RGB_GOLD 0xFF, 0xD9, 0x00
-#define RGB_YELLOW 0xFF, 0xFF, 0x00
-#define RGB_CHARTREUSE 0x80, 0xFF, 0x00
-#define RGB_GREEN 0x00, 0xFF, 0x00
-#define RGB_SPRINGGREEN 0x00, 0xFF, 0x80
-#define RGB_TURQUOISE 0x47, 0x6E, 0x6A
-#define RGB_TEAL 0x00, 0x80, 0x80
-#define RGB_CYAN 0x00, 0xFF, 0xFF
-#define RGB_AZURE 0x99, 0xf5, 0xFF
-#define RGB_BLUE 0x00, 0x00, 0xFF
-#define RGB_PURPLE 0x7A, 0x00, 0xFF
-#define RGB_MAGENTA 0xFF, 0x00, 0xFF
-#define RGB_PINK 0xFF, 0x80, 0xBF
-#define RGB_BLACK 0x00, 0x00, 0x00
-#define RGB_OFF RGB_BLACK
-
-/* HSV COLORS */
-#define HSV_WHITE 0, 0, 255
-#define HSV_RED 0, 255, 255
-#define HSV_CORAL 11, 176, 255
-#define HSV_ORANGE 28, 255, 255
-#define HSV_GOLDENROD 30, 218, 218
-#define HSV_GOLD 36, 255, 255
-#define HSV_YELLOW 43, 255, 255
-#define HSV_CHARTREUSE 64, 255, 255
-#define HSV_GREEN 85, 255, 255
-#define HSV_SPRINGGREEN 106, 255, 255
-#define HSV_TURQUOISE 123, 90, 112
-#define HSV_TEAL 128, 255, 128
-#define HSV_CYAN 128, 255, 255
-#define HSV_AZURE 132, 102, 255
-#define HSV_BLUE 170, 255, 255
-#define HSV_PURPLE 191, 255, 255
-#define HSV_MAGENTA 213, 255, 255
-#define HSV_PINK 234, 128, 255
-#define HSV_BLACK 0, 0, 0
-#define HSV_OFF HSV_BLACK
+#include "color.h"
/*
########################################################################################
@@ -66,7 +24,7 @@
## ##
## The functions below have been deprecated and may be removed in a future release. ##
## ##
-## Please use the values above with the RGB functions. ##
+## Please use the values in color.h with the RGB functions. ##
## ##
## ##
## ##
diff --git a/quantum/rgblight_modes.h b/quantum/rgblight/rgblight_modes.h
index 7abdb87bc6..7abdb87bc6 100644
--- a/quantum/rgblight_modes.h
+++ b/quantum/rgblight/rgblight_modes.h
diff --git a/quantum/rgblight_post_config.h b/quantum/rgblight/rgblight_post_config.h
index 3c14cb6109..3c14cb6109 100644
--- a/quantum/rgblight_post_config.h
+++ b/quantum/rgblight/rgblight_post_config.h
diff --git a/quantum/send_string.c b/quantum/send_string.c
index 7d096b4273..1a7f7a1315 100644
--- a/quantum/send_string.c
+++ b/quantum/send_string.c
@@ -20,6 +20,14 @@
#include "send_string.h"
+#if defined(AUDIO_ENABLE) && defined(SENDSTRING_BELL)
+# include "audio.h"
+# ifndef BELL_SOUND
+# define BELL_SOUND TERMINAL_SOUND
+# endif
+float bell_song[][2] = SONG(BELL_SOUND);
+#endif
+
// clang-format off
/* Bit-Packed look-up table to convert an ASCII character to whether
diff --git a/quantum/serial_link/system/serial_link.c b/quantum/serial_link/system/serial_link.c
index f77483ad8c..6363f8ff3b 100644
--- a/quantum/serial_link/system/serial_link.c
+++ b/quantum/serial_link/system/serial_link.c
@@ -29,10 +29,13 @@ SOFTWARE.
#include "serial_link/protocol/transport.h"
#include "serial_link/protocol/frame_router.h"
#include "matrix.h"
+#include "sync_timer.h"
#include <stdbool.h>
#include "print.h"
#include "config.h"
+#define SYNC_TIMER_OFFSET 2
+
static event_source_t new_data_event;
static bool serial_link_connected;
static bool is_master = false;
@@ -159,10 +162,16 @@ static matrix_object_t last_matrix = {};
SLAVE_TO_MASTER_OBJECT(keyboard_matrix, matrix_object_t);
MASTER_TO_ALL_SLAVES_OBJECT(serial_link_connected, bool);
+#ifndef DISABLE_SYNC_TIMER
+MASTER_TO_ALL_SLAVES_OBJECT(sync_timer, uint32_t);
+#endif
static remote_object_t* remote_objects[] = {
REMOTE_OBJECT(serial_link_connected),
REMOTE_OBJECT(keyboard_matrix),
+#ifndef DISABLE_SYNC_TIMER
+ REMOTE_OBJECT(sync_timer),
+#endif
};
void init_serial_link(void) {
@@ -200,14 +209,27 @@ void serial_link_update(void) {
m->rows[i] = matrix.rows[i];
}
end_write_keyboard_matrix();
+
*begin_write_serial_link_connected() = true;
end_write_serial_link_connected();
+
+#ifndef DISABLE_SYNC_TIMER
+ *begin_write_sync_timer() = sync_timer_read32() + SYNC_TIMER_OFFSET;
+ end_write_sync_timer();
+#endif
}
matrix_object_t* m = read_keyboard_matrix(0);
if (m) {
matrix_set_remote(m->rows, 0);
}
+
+#ifndef DISABLE_SYNC_TIMER
+ uint32_t* t = read_sync_timer();
+ if (t) {
+ sync_timer_update(*t);
+ }
+#endif
}
void signal_data_written(void) { chEvtBroadcast(&new_data_event); }
diff --git a/quantum/split_common/matrix.c b/quantum/split_common/matrix.c
deleted file mode 100644
index 039e7d9773..0000000000
--- a/quantum/split_common/matrix.c
+++ /dev/null
@@ -1,309 +0,0 @@
-/*
-Copyright 2012 Jun Wako <wakojun@gmail.com>
-
-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 <http://www.gnu.org/licenses/>.
-*/
-#include <stdint.h>
-#include <stdbool.h>
-#include "util.h"
-#include "matrix.h"
-#include "debounce.h"
-#include "quantum.h"
-#include "split_util.h"
-#include "config.h"
-#include "transport.h"
-
-#define ERROR_DISCONNECT_COUNT 5
-
-#define ROWS_PER_HAND (MATRIX_ROWS / 2)
-
-#ifdef DIRECT_PINS
-static pin_t direct_pins[MATRIX_ROWS][MATRIX_COLS] = DIRECT_PINS;
-#elif (DIODE_DIRECTION == ROW2COL) || (DIODE_DIRECTION == COL2ROW)
-static pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
-static pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
-#endif
-
-/* matrix state(1:on, 0:off) */
-extern matrix_row_t raw_matrix[MATRIX_ROWS]; // raw values
-extern matrix_row_t matrix[MATRIX_ROWS]; // debounced values
-
-// row offsets for each hand
-uint8_t thisHand, thatHand;
-
-// user-defined overridable functions
-__attribute__((weak)) void matrix_slave_scan_kb(void) { matrix_slave_scan_user(); }
-__attribute__((weak)) void matrix_slave_scan_user(void) {}
-
-static inline void setPinOutput_writeLow(pin_t pin) {
- ATOMIC_BLOCK_FORCEON {
- setPinOutput(pin);
- writePinLow(pin);
- }
-}
-
-static inline void setPinInputHigh_atomic(pin_t pin) {
- ATOMIC_BLOCK_FORCEON { setPinInputHigh(pin); }
-}
-
-// matrix code
-
-#ifdef DIRECT_PINS
-
-static void init_pins(void) {
- for (int row = 0; row < MATRIX_ROWS; row++) {
- for (int col = 0; col < MATRIX_COLS; col++) {
- pin_t pin = direct_pins[row][col];
- if (pin != NO_PIN) {
- setPinInputHigh(pin);
- }
- }
- }
-}
-
-static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) {
- // Start with a clear matrix row
- matrix_row_t current_row_value = 0;
-
- for (uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) {
- pin_t pin = direct_pins[current_row][col_index];
- if (pin != NO_PIN) {
- current_row_value |= readPin(pin) ? 0 : (MATRIX_ROW_SHIFTER << col_index);
- }
- }
-
- // If the row has changed, store the row and return the changed flag.
- if (current_matrix[current_row] != current_row_value) {
- current_matrix[current_row] = current_row_value;
- return true;
- }
- return false;
-}
-
-#elif defined(DIODE_DIRECTION)
-# if (DIODE_DIRECTION == COL2ROW)
-
-static void select_row(uint8_t row) { setPinOutput_writeLow(row_pins[row]); }
-
-static void unselect_row(uint8_t row) { setPinInputHigh_atomic(row_pins[row]); }
-
-static void unselect_rows(void) {
- for (uint8_t x = 0; x < ROWS_PER_HAND; x++) {
- setPinInputHigh_atomic(row_pins[x]);
- }
-}
-
-static void init_pins(void) {
- unselect_rows();
- for (uint8_t x = 0; x < MATRIX_COLS; x++) {
- setPinInputHigh_atomic(col_pins[x]);
- }
-}
-
-static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) {
- // Start with a clear matrix row
- matrix_row_t current_row_value = 0;
-
- // Select row
- select_row(current_row);
- matrix_output_select_delay();
-
- // For each col...
- for (uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) {
- // Select the col pin to read (active low)
- uint8_t pin_state = readPin(col_pins[col_index]);
-
- // Populate the matrix row with the state of the col pin
- current_row_value |= pin_state ? 0 : (MATRIX_ROW_SHIFTER << col_index);
- }
-
- // Unselect row
- unselect_row(current_row);
- matrix_output_unselect_delay(); // wait for all Col signals to go HIGH
-
- // If the row has changed, store the row and return the changed flag.
- if (current_matrix[current_row] != current_row_value) {
- current_matrix[current_row] = current_row_value;
- return true;
- }
- return false;
-}
-
-# elif (DIODE_DIRECTION == ROW2COL)
-
-static void select_col(uint8_t col) { setPinOutput_writeLow(col_pins[col]); }
-
-static void unselect_col(uint8_t col) { setPinInputHigh_atomic(col_pins[col]); }
-
-static void unselect_cols(void) {
- for (uint8_t x = 0; x < MATRIX_COLS; x++) {
- setPinInputHigh_atomic(col_pins[x]);
- }
-}
-
-static void init_pins(void) {
- unselect_cols();
- for (uint8_t x = 0; x < ROWS_PER_HAND; x++) {
- setPinInputHigh_atomic(row_pins[x]);
- }
-}
-
-static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) {
- bool matrix_changed = false;
-
- // Select col
- select_col(current_col);
- matrix_output_select_delay();
-
- // For each row...
- for (uint8_t row_index = 0; row_index < ROWS_PER_HAND; row_index++) {
- // Store last value of row prior to reading
- matrix_row_t last_row_value = current_matrix[row_index];
- matrix_row_t current_row_value = last_row_value;
-
- // Check row pin state
- if (readPin(row_pins[row_index]) == 0) {
- // Pin LO, set col bit
- current_row_value |= (MATRIX_ROW_SHIFTER << current_col);
- } else {
- // Pin HI, clear col bit
- current_row_value &= ~(MATRIX_ROW_SHIFTER << current_col);
- }
-
- // Determine if the matrix changed state
- if ((last_row_value != current_row_value)) {
- matrix_changed |= true;
- current_matrix[row_index] = current_row_value;
- }
- }
-
- // Unselect col
- unselect_col(current_col);
- matrix_output_unselect_delay(); // wait for all Row signals to go HIGH
-
- return matrix_changed;
-}
-
-# else
-# error DIODE_DIRECTION must be one of COL2ROW or ROW2COL!
-# endif
-#else
-# error DIODE_DIRECTION is not defined!
-#endif
-
-void matrix_init(void) {
- split_pre_init();
-
- // Set pinout for right half if pinout for that half is defined
- if (!isLeftHand) {
-#ifdef DIRECT_PINS_RIGHT
- const pin_t direct_pins_right[MATRIX_ROWS][MATRIX_COLS] = DIRECT_PINS_RIGHT;
- for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
- for (uint8_t j = 0; j < MATRIX_COLS; j++) {
- direct_pins[i][j] = direct_pins_right[i][j];
- }
- }
-#endif
-#ifdef MATRIX_ROW_PINS_RIGHT
- const pin_t row_pins_right[MATRIX_ROWS] = MATRIX_ROW_PINS_RIGHT;
- for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
- row_pins[i] = row_pins_right[i];
- }
-#endif
-#ifdef MATRIX_COL_PINS_RIGHT
- const pin_t col_pins_right[MATRIX_COLS] = MATRIX_COL_PINS_RIGHT;
- for (uint8_t i = 0; i < MATRIX_COLS; i++) {
- col_pins[i] = col_pins_right[i];
- }
-#endif
- }
-
- thisHand = isLeftHand ? 0 : (ROWS_PER_HAND);
- thatHand = ROWS_PER_HAND - thisHand;
-
- // initialize key pins
- init_pins();
-
- // initialize matrix state: all keys off
- for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
- raw_matrix[i] = 0;
- matrix[i] = 0;
- }
-
- debounce_init(ROWS_PER_HAND);
-
- matrix_init_quantum();
-
- split_post_init();
-}
-
-bool matrix_post_scan(void) {
- bool changed = false;
- if (is_keyboard_master()) {
- static uint8_t error_count;
-
- matrix_row_t slave_matrix[ROWS_PER_HAND] = {0};
- if (!transport_master(matrix + thisHand, slave_matrix)) {
- error_count++;
-
- if (error_count > ERROR_DISCONNECT_COUNT) {
- // reset other half if disconnected
- for (int i = 0; i < ROWS_PER_HAND; ++i) {
- matrix[thatHand + i] = 0;
- slave_matrix[i] = 0;
- }
-
- changed = true;
- }
- } else {
- error_count = 0;
-
- for (int i = 0; i < ROWS_PER_HAND; ++i) {
- if (matrix[thatHand + i] != slave_matrix[i]) {
- matrix[thatHand + i] = slave_matrix[i];
- changed = true;
- }
- }
- }
-
- matrix_scan_quantum();
- } else {
- transport_slave(matrix + thatHand, matrix + thisHand);
-
- matrix_slave_scan_kb();
- }
-
- return changed;
-}
-
-uint8_t matrix_scan(void) {
- bool local_changed = false;
-
-#if defined(DIRECT_PINS) || (DIODE_DIRECTION == COL2ROW)
- // Set row, read cols
- for (uint8_t current_row = 0; current_row < ROWS_PER_HAND; current_row++) {
- local_changed |= read_cols_on_row(raw_matrix, current_row);
- }
-#elif (DIODE_DIRECTION == ROW2COL)
- // Set col, read rows
- for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) {
- local_changed |= read_rows_on_col(raw_matrix, current_col);
- }
-#endif
-
- debounce(raw_matrix, matrix + thisHand, ROWS_PER_HAND, local_changed);
-
- bool remote_changed = matrix_post_scan();
- return (uint8_t)(local_changed || remote_changed);
-}
diff --git a/quantum/split_common/post_config.h b/quantum/split_common/post_config.h
index 4ae1d52732..a4c0a1956b 100644
--- a/quantum/split_common/post_config.h
+++ b/quantum/split_common/post_config.h
@@ -7,13 +7,4 @@
# ifndef F_SCL
# define F_SCL 100000UL // SCL frequency
# endif
-
-#else // use serial
-// When using serial, the user must define RGBLIGHT_SPLIT explicitly
-// in config.h as needed.
-// see quantum/rgblight_post_config.h
-# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT)
-// When using serial and RGBLIGHT_SPLIT need separate transaction
-# define SERIAL_USE_MULTI_TRANSACTION
-# endif
#endif
diff --git a/quantum/split_common/split_util.c b/quantum/split_common/split_util.c
index 9e75e19ce0..989829d2dc 100644
--- a/quantum/split_common/split_util.c
+++ b/quantum/split_common/split_util.c
@@ -77,7 +77,11 @@ __attribute__((weak)) bool is_keyboard_left(void) {
#if defined(SPLIT_HAND_PIN)
// Test pin SPLIT_HAND_PIN for High/Low, if low it's right hand
setPinInput(SPLIT_HAND_PIN);
+# ifdef SPLIT_HAND_PIN_LOW_IS_LEFT
+ return !readPin(SPLIT_HAND_PIN);
+# else
return readPin(SPLIT_HAND_PIN);
+# endif
#elif defined(SPLIT_HAND_MATRIX_GRID)
# ifdef SPLIT_HAND_MATRIX_GRID_LOW_IS_RIGHT
return peek_matrix_intersection(SPLIT_HAND_MATRIX_GRID);
diff --git a/quantum/split_common/transaction_id_define.h b/quantum/split_common/transaction_id_define.h
new file mode 100644
index 0000000000..464c73478a
--- /dev/null
+++ b/quantum/split_common/transaction_id_define.h
@@ -0,0 +1,94 @@
+/* Copyright 2021 QMK
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+
+enum serial_transaction_id {
+#ifdef USE_I2C
+ I2C_EXECUTE_CALLBACK,
+#endif // USE_I2C
+
+ GET_SLAVE_MATRIX_CHECKSUM,
+ GET_SLAVE_MATRIX_DATA,
+
+#ifdef SPLIT_TRANSPORT_MIRROR
+ PUT_MASTER_MATRIX,
+#endif // SPLIT_TRANSPORT_MIRROR
+
+#ifdef ENCODER_ENABLE
+ GET_ENCODERS_CHECKSUM,
+ GET_ENCODERS_DATA,
+#endif // ENCODER_ENABLE
+
+#ifndef DISABLE_SYNC_TIMER
+ PUT_SYNC_TIMER,
+#endif // DISABLE_SYNC_TIMER
+
+#if !defined(NO_ACTION_LAYER) && defined(SPLIT_LAYER_STATE_ENABLE)
+ PUT_LAYER_STATE,
+ PUT_DEFAULT_LAYER_STATE,
+#endif // !defined(NO_ACTION_LAYER) && defined(SPLIT_LAYER_STATE_ENABLE)
+
+#ifdef SPLIT_LED_STATE_ENABLE
+ PUT_LED_STATE,
+#endif // SPLIT_LED_STATE_ENABLE
+
+#ifdef SPLIT_MODS_ENABLE
+ PUT_MODS,
+#endif // SPLIT_MODS_ENABLE
+
+#ifdef BACKLIGHT_ENABLE
+ PUT_BACKLIGHT,
+#endif // BACKLIGHT_ENABLE
+
+#if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT)
+ PUT_RGBLIGHT,
+#endif // defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT)
+
+#if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
+ PUT_LED_MATRIX,
+#endif // defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
+
+#if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
+ PUT_RGB_MATRIX,
+#endif // defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT)
+
+#if defined(WPM_ENABLE) && defined(SPLIT_WPM_ENABLE)
+ PUT_WPM,
+#endif // defined(WPM_ENABLE) && defined(SPLIT_WPM_ENABLE)
+
+#if defined(SPLIT_TRANSACTION_IDS_KB) || defined(SPLIT_TRANSACTION_IDS_USER)
+ PUT_RPC_INFO,
+ PUT_RPC_REQ_DATA,
+ EXECUTE_RPC,
+ GET_RPC_RESP_DATA,
+#endif // defined(SPLIT_TRANSACTION_IDS_KB) || defined(SPLIT_TRANSACTION_IDS_USER)
+
+// keyboard-specific
+#ifdef SPLIT_TRANSACTION_IDS_KB
+ SPLIT_TRANSACTION_IDS_KB,
+#endif // SPLIT_TRANSACTION_IDS_KB
+
+// user/keymap-specific
+#ifdef SPLIT_TRANSACTION_IDS_USER
+ SPLIT_TRANSACTION_IDS_USER,
+#endif // SPLIT_TRANSACTION_IDS_USER
+
+ NUM_TOTAL_TRANSACTIONS
+};
+
+// Ensure we only use 5 bits for transaction
+_Static_assert(NUM_TOTAL_TRANSACTIONS <= (1 << 5), "Max number of usable transactions exceeded");
diff --git a/quantum/split_common/transactions.c b/quantum/split_common/transactions.c
new file mode 100644
index 0000000000..abad626e00
--- /dev/null
+++ b/quantum/split_common/transactions.c
@@ -0,0 +1,655 @@
+/* Copyright 2021 QMK
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
+#include <string.h>
+#include <stddef.h>
+
+#include "crc.h"
+#include "debug.h"
+#include "matrix.h"
+#include "quantum.h"
+#include "transactions.h"
+#include "transport.h"
+#include "transaction_id_define.h"
+
+#define SYNC_TIMER_OFFSET 2
+
+#ifndef FORCED_SYNC_THROTTLE_MS
+# define FORCED_SYNC_THROTTLE_MS 100
+#endif // FORCED_SYNC_THROTTLE_MS
+
+#define sizeof_member(type, member) sizeof(((type *)NULL)->member)
+
+#define trans_initiator2target_initializer_cb(member, cb) \
+ { &dummy, sizeof_member(split_shared_memory_t, member), offsetof(split_shared_memory_t, member), 0, 0, cb }
+#define trans_initiator2target_initializer(member) trans_initiator2target_initializer_cb(member, NULL)
+
+#define trans_target2initiator_initializer_cb(member, cb) \
+ { &dummy, 0, 0, sizeof_member(split_shared_memory_t, member), offsetof(split_shared_memory_t, member), cb }
+#define trans_target2initiator_initializer(member) trans_target2initiator_initializer_cb(member, NULL)
+
+#define transport_write(id, data, length) transport_execute_transaction(id, data, length, NULL, 0)
+#define transport_read(id, data, length) transport_execute_transaction(id, NULL, 0, data, length)
+
+#if defined(SPLIT_TRANSACTION_IDS_KB) || defined(SPLIT_TRANSACTION_IDS_USER)
+// Forward-declare the RPC callback handlers
+void slave_rpc_info_callback(uint8_t initiator2target_buffer_size, const void *initiator2target_buffer, uint8_t target2initiator_buffer_size, void *target2initiator_buffer);
+void slave_rpc_exec_callback(uint8_t initiator2target_buffer_size, const void *initiator2target_buffer, uint8_t target2initiator_buffer_size, void *target2initiator_buffer);
+#endif // defined(SPLIT_TRANSACTION_IDS_KB) || defined(SPLIT_TRANSACTION_IDS_USER)
+
+////////////////////////////////////////////////////
+// Helpers
+
+bool transaction_handler_master(bool okay, matrix_row_t master_matrix[], matrix_row_t slave_matrix[], const char *prefix, bool (*handler)(matrix_row_t master_matrix[], matrix_row_t slave_matrix[])) {
+ if (okay) {
+ bool this_okay = true;
+ for (int iter = 1; iter <= 10; ++iter) {
+ if (!this_okay) {
+ for (int i = 0; i < iter * iter; ++i) {
+ wait_us(10);
+ }
+ }
+ ATOMIC_BLOCK_FORCEON { this_okay = handler(master_matrix, slave_matrix); };
+ if (this_okay) break;
+ }
+ okay &= this_okay;
+ if (!okay) {
+ dprintf("Failed to execute %s\n", prefix);
+ }
+ }
+ return okay;
+}
+
+#define TRANSACTION_HANDLER_MASTER(prefix) \
+ do { \
+ okay &= transaction_handler_master(okay, master_matrix, slave_matrix, #prefix, &prefix##_master); \
+ } while (0)
+
+#define TRANSACTION_HANDLER_SLAVE(prefix) \
+ do { \
+ ATOMIC_BLOCK_FORCEON { prefix##_slave(master_matrix, slave_matrix); }; \
+ } while (0)
+
+inline static bool read_if_checksum_mismatch(int8_t trans_id_checksum, int8_t trans_id_retrieve, uint32_t *last_update, void *destination, const void *equiv_shmem, size_t length) {
+ uint8_t curr_checksum;
+ bool okay = transport_read(trans_id_checksum, &curr_checksum, sizeof(curr_checksum));
+ if (okay && (timer_elapsed32(*last_update) >= FORCED_SYNC_THROTTLE_MS || curr_checksum != crc8(equiv_shmem, length))) {
+ okay &= transport_read(trans_id_retrieve, destination, length);
+ okay &= curr_checksum == crc8(equiv_shmem, length);
+ if (okay) {
+ *last_update = timer_read32();
+ }
+ } else {
+ memcpy(destination, equiv_shmem, length);
+ }
+ return okay;
+}
+
+inline static bool send_if_condition(int8_t trans_id, uint32_t *last_update, bool condition, void *source, size_t length) {
+ bool okay = true;
+ if (timer_elapsed32(*last_update) >= FORCED_SYNC_THROTTLE_MS || condition) {
+ okay &= transport_write(trans_id, source, length);
+ if (okay) {
+ *last_update = timer_read32();
+ }
+ }
+ return okay;
+}
+
+inline static bool send_if_data_mismatch(int8_t trans_id, uint32_t *last_update, void *source, const void *equiv_shmem, size_t length) {
+ // Just run a memcmp to compare the source and equivalent shmem location
+ return send_if_condition(trans_id, last_update, (memcmp(source, equiv_shmem, length) != 0), source, length);
+}
+
+////////////////////////////////////////////////////
+// Slave matrix
+
+static bool slave_matrix_handlers_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) {
+ static uint32_t last_update = 0;
+ static matrix_row_t last_matrix[(MATRIX_ROWS) / 2] = {0}; // last successfully-read matrix, so we can replicate if there are checksum errors
+ matrix_row_t temp_matrix[(MATRIX_ROWS) / 2]; // holding area while we test whether or not checksum is correct
+
+ bool okay = read_if_checksum_mismatch(GET_SLAVE_MATRIX_CHECKSUM, GET_SLAVE_MATRIX_DATA, &last_update, temp_matrix, split_shmem->smatrix.matrix, sizeof(split_shmem->smatrix.matrix));
+ if (okay) {
+ // Checksum matches the received data, save as the last matrix state
+ memcpy(last_matrix, temp_matrix, sizeof(temp_matrix));
+ }
+ // Copy out the last-known-good matrix state to the slave matrix
+ memcpy(slave_matrix, last_matrix, sizeof(last_matrix));
+ return okay;
+}
+
+static void slave_matrix_handlers_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) {
+ memcpy(split_shmem->smatrix.matrix, slave_matrix, sizeof(split_shmem->smatrix.matrix));
+ split_shmem->smatrix.checksum = crc8(split_shmem->smatrix.matrix, sizeof(split_shmem->smatrix.matrix));
+}
+
+// clang-format off
+#define TRANSACTIONS_SLAVE_MATRIX_MASTER() TRANSACTION_HANDLER_MASTER(slave_matrix_handlers)
+#define TRANSACTIONS_SLAVE_MATRIX_SLAVE() TRANSACTION_HANDLER_SLAVE(slave_matrix_handlers)
+#define TRANSACTIONS_SLAVE_MATRIX_REGISTRATIONS \
+ [GET_SLAVE_MATRIX_CHECKSUM] = trans_target2initiator_initializer(smatrix.checksum), \
+ [GET_SLAVE_MATRIX_DATA] = trans_target2initiator_initializer(smatrix.matrix),
+// clang-format on
+
+////////////////////////////////////////////////////
+// Master matrix
+
+#ifdef SPLIT_TRANSPORT_MIRROR
+
+static bool master_matrix_handlers_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) {
+ static uint32_t last_update = 0;
+ return send_if_data_mismatch(PUT_MASTER_MATRIX, &last_update, master_matrix, split_shmem->mmatrix.matrix, sizeof(split_shmem->mmatrix.matrix));
+}
+
+static void master_matrix_handlers_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) {
+ // Always copy to the master matrix
+ memcpy(master_matrix, split_shmem->mmatrix.matrix, sizeof(split_shmem->mmatrix.matrix));
+}
+
+# define TRANSACTIONS_MASTER_MATRIX_MASTER() TRANSACTION_HANDLER_MASTER(master_matrix_handlers)
+# define TRANSACTIONS_MASTER_MATRIX_SLAVE() TRANSACTION_HANDLER_SLAVE(master_matrix_handlers)
+# define TRANSACTIONS_MASTER_MATRIX_REGISTRATIONS [PUT_MASTER_MATRIX] = trans_initiator2target_initializer(mmatrix.matrix),
+
+#else // SPLIT_TRANSPORT_MIRROR
+
+# define TRANSACTIONS_MASTER_MATRIX_MASTER()
+# define TRANSACTIONS_MASTER_MATRIX_SLAVE()
+# define TRANSACTIONS_MASTER_MATRIX_REGISTRATIONS
+
+#endif // SPLIT_TRANSPORT_MIRROR
+
+////////////////////////////////////////////////////
+// Encoders
+
+#ifdef ENCODER_ENABLE
+
+static bool encoder_handlers_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) {
+ static uint32_t last_update = 0;
+ uint8_t temp_state[NUMBER_OF_ENCODERS];
+
+ bool okay = read_if_checksum_mismatch(GET_ENCODERS_CHECKSUM, GET_ENCODERS_DATA, &last_update, temp_state, split_shmem->encoders.state, sizeof(temp_state));
+ if (okay) encoder_update_raw(temp_state);
+ return okay;
+}
+
+static void encoder_handlers_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) {
+ uint8_t encoder_state[NUMBER_OF_ENCODERS];
+ encoder_state_raw(encoder_state);
+ // Always prepare the encoder state for read.
+ memcpy(split_shmem->encoders.state, encoder_state, sizeof(encoder_state));
+ // Now update the checksum given that the encoders has been written to
+ split_shmem->encoders.checksum = crc8(encoder_state, sizeof(encoder_state));
+}
+
+// clang-format off
+# define TRANSACTIONS_ENCODERS_MASTER() TRANSACTION_HANDLER_MASTER(encoder_handlers)
+# define TRANSACTIONS_ENCODERS_SLAVE() TRANSACTION_HANDLER_SLAVE(encoder_handlers)
+# define TRANSACTIONS_ENCODERS_REGISTRATIONS \
+ [GET_ENCODERS_CHECKSUM] = trans_target2initiator_initializer(encoders.checksum), \
+ [GET_ENCODERS_DATA] = trans_target2initiator_initializer(encoders.state),
+// clang-format on
+
+#else // ENCODER_ENABLE
+
+# define TRANSACTIONS_ENCODERS_MASTER()
+# define TRANSACTIONS_ENCODERS_SLAVE()
+# define TRANSACTIONS_ENCODERS_REGISTRATIONS
+
+#endif // ENCODER_ENABLE
+
+////////////////////////////////////////////////////
+// Sync timer
+
+#ifndef DISABLE_SYNC_TIMER
+
+static bool sync_timer_handlers_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) {
+ static uint32_t last_update = 0;
+
+ bool okay = true;
+ if (timer_elapsed32(last_update) >= FORCED_SYNC_THROTTLE_MS) {
+ uint32_t sync_timer = sync_timer_read32() + SYNC_TIMER_OFFSET;
+ okay &= transport_write(PUT_SYNC_TIMER, &sync_timer, sizeof(sync_timer));
+ if (okay) {
+ last_update = timer_read32();
+ }
+ }
+ return okay;
+}
+
+static void sync_timer_handlers_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) {
+ static uint32_t last_sync_timer = 0;
+ if (last_sync_timer != split_shmem->sync_timer) {
+ last_sync_timer = split_shmem->sync_timer;
+ sync_timer_update(last_sync_timer);
+ }
+}
+
+# define TRANSACTIONS_SYNC_TIMER_MASTER() TRANSACTION_HANDLER_MASTER(sync_timer_handlers)
+# define TRANSACTIONS_SYNC_TIMER_SLAVE() TRANSACTION_HANDLER_SLAVE(sync_timer_handlers)
+# define TRANSACTIONS_SYNC_TIMER_REGISTRATIONS [PUT_SYNC_TIMER] = trans_initiator2target_initializer(sync_timer),
+
+#else // DISABLE_SYNC_TIMER
+
+# define TRANSACTIONS_SYNC_TIMER_MASTER()
+# define TRANSACTIONS_SYNC_TIMER_SLAVE()
+# define TRANSACTIONS_SYNC_TIMER_REGISTRATIONS
+
+#endif // DISABLE_SYNC_TIMER
+
+////////////////////////////////////////////////////
+// Layer state
+
+#if !defined(NO_ACTION_LAYER) && defined(SPLIT_LAYER_STATE_ENABLE)
+
+static bool layer_state_handlers_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) {
+ static uint32_t last_layer_state_update = 0;
+ static uint32_t last_default_layer_state_update = 0;
+
+ bool okay = send_if_condition(PUT_LAYER_STATE, &last_layer_state_update, (layer_state != split_shmem->layers.layer_state), &layer_state, sizeof(layer_state));
+ if (okay) {
+ okay &= send_if_condition(PUT_DEFAULT_LAYER_STATE, &last_default_layer_state_update, (default_layer_state != split_shmem->layers.default_layer_state), &default_layer_state, sizeof(default_layer_state));
+ }
+ return okay;
+}
+
+static void layer_state_handlers_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) {
+ layer_state = split_shmem->layers.layer_state;
+ default_layer_state = split_shmem->layers.default_layer_state;
+}
+
+// clang-format off
+# define TRANSACTIONS_LAYER_STATE_MASTER() TRANSACTION_HANDLER_MASTER(layer_state_handlers)
+# define TRANSACTIONS_LAYER_STATE_SLAVE() TRANSACTION_HANDLER_SLAVE(layer_state_handlers)
+# define TRANSACTIONS_LAYER_STATE_REGISTRATIONS \
+ [PUT_LAYER_STATE] = trans_initiator2target_initializer(layers.layer_state), \
+ [PUT_DEFAULT_LAYER_STATE] = trans_initiator2target_initializer(layers.default_layer_state),
+// clang-format on
+
+#else // !defined(NO_ACTION_LAYER) && defined(SPLIT_LAYER_STATE_ENABLE)
+
+# define TRANSACTIONS_LAYER_STATE_MASTER()
+# define TRANSACTIONS_LAYER_STATE_SLAVE()
+# define TRANSACTIONS_LAYER_STATE_REGISTRATIONS
+
+#endif // !defined(NO_ACTION_LAYER) && defined(SPLIT_LAYER_STATE_ENABLE)
+
+////////////////////////////////////////////////////
+// LED state
+
+#ifdef SPLIT_LED_STATE_ENABLE
+
+static bool led_state_handlers_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) {
+ static uint32_t last_update = 0;
+ uint8_t led_state = host_keyboard_leds();
+ return send_if_data_mismatch(PUT_LED_STATE, &last_update, &led_state, &split_shmem->led_state, sizeof(led_state));
+}
+
+static void led_state_handlers_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) {
+ void set_split_host_keyboard_leds(uint8_t led_state);
+ set_split_host_keyboard_leds(split_shmem->led_state);
+}
+
+# define TRANSACTIONS_LED_STATE_MASTER() TRANSACTION_HANDLER_MASTER(led_state_handlers)
+# define TRANSACTIONS_LED_STATE_SLAVE() TRANSACTION_HANDLER_SLAVE(led_state_handlers)
+# define TRANSACTIONS_LED_STATE_REGISTRATIONS [PUT_LED_STATE] = trans_initiator2target_initializer(led_state),
+
+#else // SPLIT_LED_STATE_ENABLE
+
+# define TRANSACTIONS_LED_STATE_MASTER()
+# define TRANSACTIONS_LED_STATE_SLAVE()
+# define TRANSACTIONS_LED_STATE_REGISTRATIONS
+
+#endif // SPLIT_LED_STATE_ENABLE
+
+////////////////////////////////////////////////////
+// Mods
+
+#ifdef SPLIT_MODS_ENABLE
+
+static bool mods_handlers_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) {
+ static uint32_t last_update = 0;
+ bool mods_need_sync = timer_elapsed32(last_update) >= FORCED_SYNC_THROTTLE_MS;
+ split_mods_sync_t new_mods;
+ new_mods.real_mods = get_mods();
+ if (!mods_need_sync && new_mods.real_mods != split_shmem->mods.real_mods) {
+ mods_need_sync = true;
+ }
+
+ new_mods.weak_mods = get_weak_mods();
+ if (!mods_need_sync && new_mods.weak_mods != split_shmem->mods.weak_mods) {
+ mods_need_sync = true;
+ }
+
+# ifndef NO_ACTION_ONESHOT
+ new_mods.oneshot_mods = get_oneshot_mods();
+ if (!mods_need_sync && new_mods.oneshot_mods != split_shmem->mods.oneshot_mods) {
+ mods_need_sync = true;
+ }
+# endif // NO_ACTION_ONESHOT
+
+ bool okay = true;
+ if (mods_need_sync) {
+ okay &= transport_write(PUT_MODS, &new_mods, sizeof(new_mods));
+ if (okay) {
+ last_update = timer_read32();
+ }
+ }
+
+ return okay;
+}
+
+static void mods_handlers_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) {
+ set_mods(split_shmem->mods.real_mods);
+ set_weak_mods(split_shmem->mods.weak_mods);
+# ifndef NO_ACTION_ONESHOT
+ set_oneshot_mods(split_shmem->mods.oneshot_mods);
+# endif
+}
+
+# define TRANSACTIONS_MODS_MASTER() TRANSACTION_HANDLER_MASTER(mods_handlers)
+# define TRANSACTIONS_MODS_SLAVE() TRANSACTION_HANDLER_SLAVE(mods_handlers)
+# define TRANSACTIONS_MODS_REGISTRATIONS [PUT_MODS] = trans_initiator2target_initializer(mods),
+
+#else // SPLIT_MODS_ENABLE
+
+# define TRANSACTIONS_MODS_MASTER()
+# define TRANSACTIONS_MODS_SLAVE()
+# define TRANSACTIONS_MODS_REGISTRATIONS
+
+#endif // SPLIT_MODS_ENABLE
+
+////////////////////////////////////////////////////
+// Backlight
+
+#ifdef BACKLIGHT_ENABLE
+
+static bool backlight_handlers_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) {
+ static uint32_t last_update = 0;
+ uint8_t level = is_backlight_enabled() ? get_backlight_level() : 0;
+ return send_if_condition(PUT_BACKLIGHT, &last_update, (level != split_shmem->backlight_level), &level, sizeof(level));
+}
+
+static void backlight_handlers_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) { backlight_set(split_shmem->backlight_level); }
+
+# define TRANSACTIONS_BACKLIGHT_MASTER() TRANSACTION_HANDLER_MASTER(backlight_handlers)
+# define TRANSACTIONS_BACKLIGHT_SLAVE() TRANSACTION_HANDLER_SLAVE(backlight_handlers)
+# define TRANSACTIONS_BACKLIGHT_REGISTRATIONS [PUT_BACKLIGHT] = trans_initiator2target_initializer(backlight_level),
+
+#else // BACKLIGHT_ENABLE
+
+# define TRANSACTIONS_BACKLIGHT_MASTER()
+# define TRANSACTIONS_BACKLIGHT_SLAVE()
+# define TRANSACTIONS_BACKLIGHT_REGISTRATIONS
+
+#endif // BACKLIGHT_ENABLE
+
+////////////////////////////////////////////////////
+// RGBLIGHT
+
+#if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT)
+
+static bool rgblight_handlers_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) {
+ static uint32_t last_update = 0;
+ rgblight_syncinfo_t rgblight_sync;
+ rgblight_get_syncinfo(&rgblight_sync);
+ if (send_if_condition(PUT_RGBLIGHT, &last_update, (rgblight_sync.status.change_flags != 0), &rgblight_sync, sizeof(rgblight_sync))) {
+ rgblight_clear_change_flags();
+ } else {
+ return false;
+ }
+ return true;
+}
+
+static void rgblight_handlers_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) {
+ // Update the RGB with the new data
+ if (split_shmem->rgblight_sync.status.change_flags != 0) {
+ rgblight_update_sync(&split_shmem->rgblight_sync, false);
+ split_shmem->rgblight_sync.status.change_flags = 0;
+ }
+}
+
+# define TRANSACTIONS_RGBLIGHT_MASTER() TRANSACTION_HANDLER_MASTER(rgblight_handlers)
+# define TRANSACTIONS_RGBLIGHT_SLAVE() TRANSACTION_HANDLER_SLAVE(rgblight_handlers)
+# define TRANSACTIONS_RGBLIGHT_REGISTRATIONS [PUT_RGBLIGHT] = trans_initiator2target_initializer(rgblight_sync),
+
+#else // defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT)
+
+# define TRANSACTIONS_RGBLIGHT_MASTER()
+# define TRANSACTIONS_RGBLIGHT_SLAVE()
+# define TRANSACTIONS_RGBLIGHT_REGISTRATIONS
+
+#endif // defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT)
+
+////////////////////////////////////////////////////
+// LED Matrix
+
+#if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
+
+static bool led_matrix_handlers_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) {
+ static uint32_t last_update = 0;
+ led_matrix_sync_t led_matrix_sync;
+ memcpy(&led_matrix_sync.led_matrix, &led_matrix_eeconfig, sizeof(led_eeconfig_t));
+ led_matrix_sync.led_suspend_state = led_matrix_get_suspend_state();
+ return send_if_data_mismatch(PUT_LED_MATRIX, &last_update, &led_matrix_sync, &split_shmem->led_matrix_sync, sizeof(led_matrix_sync));
+}
+
+static void led_matrix_handlers_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) {
+ memcpy(&led_matrix_eeconfig, &split_shmem->led_matrix_sync.led_matrix, sizeof(led_eeconfig_t));
+ led_matrix_set_suspend_state(split_shmem->led_matrix_sync.led_suspend_state);
+}
+
+# define TRANSACTIONS_LED_MATRIX_MASTER() TRANSACTION_HANDLER_MASTER(led_matrix_handlers)
+# define TRANSACTIONS_LED_MATRIX_SLAVE() TRANSACTION_HANDLER_SLAVE(led_matrix_handlers)
+# define TRANSACTIONS_LED_MATRIX_REGISTRATIONS [PUT_LED_MATRIX] = trans_initiator2target_initializer(led_matrix_sync),
+
+#else // defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
+
+# define TRANSACTIONS_LED_MATRIX_MASTER()
+# define TRANSACTIONS_LED_MATRIX_SLAVE()
+# define TRANSACTIONS_LED_MATRIX_REGISTRATIONS
+
+#endif // defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
+
+////////////////////////////////////////////////////
+// RGB Matrix
+
+#if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
+
+static bool rgb_matrix_handlers_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) {
+ static uint32_t last_update = 0;
+ rgb_matrix_sync_t rgb_matrix_sync;
+ memcpy(&rgb_matrix_sync.rgb_matrix, &rgb_matrix_config, sizeof(rgb_config_t));
+ rgb_matrix_sync.rgb_suspend_state = rgb_matrix_get_suspend_state();
+ return send_if_data_mismatch(PUT_RGB_MATRIX, &last_update, &rgb_matrix_sync, &split_shmem->rgb_matrix_sync, sizeof(rgb_matrix_sync));
+}
+
+static void rgb_matrix_handlers_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) {
+ memcpy(&rgb_matrix_config, &split_shmem->rgb_matrix_sync.rgb_matrix, sizeof(rgb_config_t));
+ rgb_matrix_set_suspend_state(split_shmem->rgb_matrix_sync.rgb_suspend_state);
+}
+
+# define TRANSACTIONS_RGB_MATRIX_MASTER() TRANSACTION_HANDLER_MASTER(rgb_matrix_handlers)
+# define TRANSACTIONS_RGB_MATRIX_SLAVE() TRANSACTION_HANDLER_SLAVE(rgb_matrix_handlers)
+# define TRANSACTIONS_RGB_MATRIX_REGISTRATIONS [PUT_RGB_MATRIX] = trans_initiator2target_initializer(rgb_matrix_sync),
+
+#else // defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
+
+# define TRANSACTIONS_RGB_MATRIX_MASTER()
+# define TRANSACTIONS_RGB_MATRIX_SLAVE()
+# define TRANSACTIONS_RGB_MATRIX_REGISTRATIONS
+
+#endif // defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
+
+////////////////////////////////////////////////////
+// WPM
+
+#if defined(WPM_ENABLE) && defined(SPLIT_WPM_ENABLE)
+
+static bool wpm_handlers_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) {
+ static uint32_t last_update = 0;
+ uint8_t current_wpm = get_current_wpm();
+ return send_if_condition(PUT_WPM, &last_update, (current_wpm != split_shmem->current_wpm), &current_wpm, sizeof(current_wpm));
+}
+
+static void wpm_handlers_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) { set_current_wpm(split_shmem->current_wpm); }
+
+# define TRANSACTIONS_WPM_MASTER() TRANSACTION_HANDLER_MASTER(wpm_handlers)
+# define TRANSACTIONS_WPM_SLAVE() TRANSACTION_HANDLER_SLAVE(wpm_handlers)
+# define TRANSACTIONS_WPM_REGISTRATIONS [PUT_WPM] = trans_initiator2target_initializer(current_wpm),
+
+#else // defined(WPM_ENABLE) && defined(SPLIT_WPM_ENABLE)
+
+# define TRANSACTIONS_WPM_MASTER()
+# define TRANSACTIONS_WPM_SLAVE()
+# define TRANSACTIONS_WPM_REGISTRATIONS
+
+#endif // defined(WPM_ENABLE) && defined(SPLIT_WPM_ENABLE)
+
+////////////////////////////////////////////////////
+
+uint8_t dummy;
+split_transaction_desc_t split_transaction_table[NUM_TOTAL_TRANSACTIONS] = {
+ // Set defaults
+ [0 ...(NUM_TOTAL_TRANSACTIONS - 1)] = {NULL, 0, 0, 0, 0, 0},
+
+#ifdef USE_I2C
+ [I2C_EXECUTE_CALLBACK] = trans_initiator2target_initializer(transaction_id),
+#endif // USE_I2C
+
+ // clang-format off
+ TRANSACTIONS_SLAVE_MATRIX_REGISTRATIONS
+ TRANSACTIONS_MASTER_MATRIX_REGISTRATIONS
+ TRANSACTIONS_ENCODERS_REGISTRATIONS
+ TRANSACTIONS_SYNC_TIMER_REGISTRATIONS
+ TRANSACTIONS_LAYER_STATE_REGISTRATIONS
+ TRANSACTIONS_LED_STATE_REGISTRATIONS
+ TRANSACTIONS_MODS_REGISTRATIONS
+ TRANSACTIONS_BACKLIGHT_REGISTRATIONS
+ TRANSACTIONS_RGBLIGHT_REGISTRATIONS
+ TRANSACTIONS_LED_MATRIX_REGISTRATIONS
+ TRANSACTIONS_RGB_MATRIX_REGISTRATIONS
+ TRANSACTIONS_WPM_REGISTRATIONS
+// clang-format on
+
+#if defined(SPLIT_TRANSACTION_IDS_KB) || defined(SPLIT_TRANSACTION_IDS_USER)
+ [PUT_RPC_INFO] = trans_initiator2target_initializer_cb(rpc_info, slave_rpc_info_callback),
+ [PUT_RPC_REQ_DATA] = trans_initiator2target_initializer(rpc_m2s_buffer),
+ [EXECUTE_RPC] = trans_initiator2target_initializer_cb(rpc_info.transaction_id, slave_rpc_exec_callback),
+ [GET_RPC_RESP_DATA] = trans_target2initiator_initializer(rpc_s2m_buffer),
+#endif // defined(SPLIT_TRANSACTION_IDS_KB) || defined(SPLIT_TRANSACTION_IDS_USER)
+};
+
+bool transactions_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) {
+ bool okay = true;
+ TRANSACTIONS_SLAVE_MATRIX_MASTER();
+ TRANSACTIONS_MASTER_MATRIX_MASTER();
+ TRANSACTIONS_ENCODERS_MASTER();
+ TRANSACTIONS_SYNC_TIMER_MASTER();
+ TRANSACTIONS_LAYER_STATE_MASTER();
+ TRANSACTIONS_LED_STATE_MASTER();
+ TRANSACTIONS_MODS_MASTER();
+ TRANSACTIONS_BACKLIGHT_MASTER();
+ TRANSACTIONS_RGBLIGHT_MASTER();
+ TRANSACTIONS_LED_MATRIX_MASTER();
+ TRANSACTIONS_RGB_MATRIX_MASTER();
+ TRANSACTIONS_WPM_MASTER();
+ return okay;
+}
+
+void transactions_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) {
+ TRANSACTIONS_SLAVE_MATRIX_SLAVE();
+ TRANSACTIONS_MASTER_MATRIX_SLAVE();
+ TRANSACTIONS_ENCODERS_SLAVE();
+ TRANSACTIONS_SYNC_TIMER_SLAVE();
+ TRANSACTIONS_LAYER_STATE_SLAVE();
+ TRANSACTIONS_LED_STATE_SLAVE();
+ TRANSACTIONS_MODS_SLAVE();
+ TRANSACTIONS_BACKLIGHT_SLAVE();
+ TRANSACTIONS_RGBLIGHT_SLAVE();
+ TRANSACTIONS_LED_MATRIX_SLAVE();
+ TRANSACTIONS_RGB_MATRIX_SLAVE();
+ TRANSACTIONS_WPM_SLAVE();
+}
+
+#if defined(SPLIT_TRANSACTION_IDS_KB) || defined(SPLIT_TRANSACTION_IDS_USER)
+
+void transaction_register_rpc(int8_t transaction_id, slave_callback_t callback) {
+ // Prevent invoking RPC on QMK core sync data
+ if (transaction_id <= GET_RPC_RESP_DATA) return;
+
+ // Set the callback
+ split_transaction_table[transaction_id].slave_callback = callback;
+ split_transaction_table[transaction_id].initiator2target_offset = offsetof(split_shared_memory_t, rpc_m2s_buffer);
+ split_transaction_table[transaction_id].target2initiator_offset = offsetof(split_shared_memory_t, rpc_s2m_buffer);
+}
+
+bool transaction_rpc_exec(int8_t transaction_id, uint8_t initiator2target_buffer_size, const void *initiator2target_buffer, uint8_t target2initiator_buffer_size, void *target2initiator_buffer) {
+ // Prevent invoking RPC on QMK core sync data
+ if (transaction_id <= GET_RPC_RESP_DATA) return false;
+ // Prevent sizing issues
+ if (initiator2target_buffer_size > RPC_M2S_BUFFER_SIZE) return false;
+ if (target2initiator_buffer_size > RPC_S2M_BUFFER_SIZE) return false;
+
+ // Prepare the metadata block
+ rpc_sync_info_t info = {.transaction_id = transaction_id, .m2s_length = initiator2target_buffer_size, .s2m_length = target2initiator_buffer_size};
+
+ // Make sure the local side knows that we're not sending the full block of data
+ split_transaction_table[PUT_RPC_REQ_DATA].initiator2target_buffer_size = initiator2target_buffer_size;
+ split_transaction_table[GET_RPC_RESP_DATA].target2initiator_buffer_size = target2initiator_buffer_size;
+
+ // Run through the sequence:
+ // * set the transaction ID and lengths
+ // * send the request data
+ // * execute RPC callback
+ // * retrieve the response data
+ if (!transport_write(PUT_RPC_INFO, &info, sizeof(info))) {
+ return false;
+ }
+ if (!transport_write(PUT_RPC_REQ_DATA, initiator2target_buffer, initiator2target_buffer_size)) {
+ return false;
+ }
+ if (!transport_write(EXECUTE_RPC, &transaction_id, sizeof(transaction_id))) {
+ return false;
+ }
+ if (!transport_read(GET_RPC_RESP_DATA, target2initiator_buffer, target2initiator_buffer_size)) {
+ return false;
+ }
+ return true;
+}
+
+void slave_rpc_info_callback(uint8_t initiator2target_buffer_size, const void *initiator2target_buffer, uint8_t target2initiator_buffer_size, void *target2initiator_buffer) {
+ // The RPC info block contains the intended transaction ID, as well as the sizes for both inbound and outbound data.
+ // Ignore the args -- the `split_shmem` already has the info, we just need to act upon it.
+ // We must keep the `split_transaction_table` non-const, so that it is able to be modified at runtime.
+
+ split_transaction_table[PUT_RPC_REQ_DATA].initiator2target_buffer_size = split_shmem->rpc_info.m2s_length;
+ split_transaction_table[GET_RPC_RESP_DATA].target2initiator_buffer_size = split_shmem->rpc_info.s2m_length;
+}
+
+void slave_rpc_exec_callback(uint8_t initiator2target_buffer_size, const void *initiator2target_buffer, uint8_t target2initiator_buffer_size, void *target2initiator_buffer) {
+ // We can assume that the buffer lengths are correctly set, now, given that sequentially the rpc_info callback was already executed.
+ // Go through the rpc_info and execute _that_ transaction's callback, with the scratch buffers as inputs.
+ int8_t transaction_id = split_shmem->rpc_info.transaction_id;
+ if (transaction_id < NUM_TOTAL_TRANSACTIONS) {
+ split_transaction_desc_t *trans = &split_transaction_table[transaction_id];
+ if (trans->slave_callback) {
+ trans->slave_callback(split_shmem->rpc_info.m2s_length, split_shmem->rpc_m2s_buffer, split_shmem->rpc_info.s2m_length, split_shmem->rpc_s2m_buffer);
+ }
+ }
+}
+
+#endif // defined(SPLIT_TRANSACTION_IDS_KB) || defined(SPLIT_TRANSACTION_IDS_USER)
diff --git a/quantum/split_common/transactions.h b/quantum/split_common/transactions.h
new file mode 100644
index 0000000000..4306ba1d87
--- /dev/null
+++ b/quantum/split_common/transactions.h
@@ -0,0 +1,54 @@
+/* Copyright 2021 QMK
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+
+#include "stdint.h"
+#include "stdbool.h"
+
+#include "matrix.h"
+#include "transaction_id_define.h"
+#include "transport.h"
+
+typedef void (*slave_callback_t)(uint8_t initiator2target_buffer_size, const void *initiator2target_buffer, uint8_t target2initiator_buffer_size, void *target2initiator_buffer);
+
+// Split transaction Descriptor
+typedef struct _split_transaction_desc_t {
+ uint8_t * status;
+ uint8_t initiator2target_buffer_size;
+ uint16_t initiator2target_offset;
+ uint8_t target2initiator_buffer_size;
+ uint16_t target2initiator_offset;
+ slave_callback_t slave_callback;
+} split_transaction_desc_t;
+
+// Forward declaration for the split transactions
+extern split_transaction_desc_t split_transaction_table[NUM_TOTAL_TRANSACTIONS];
+
+#define split_shmem_offset_ptr(offset) ((void *)(((uint8_t *)split_shmem) + (offset)))
+#define split_trans_initiator2target_buffer(trans) (split_shmem_offset_ptr((trans)->initiator2target_offset))
+#define split_trans_target2initiator_buffer(trans) (split_shmem_offset_ptr((trans)->target2initiator_offset))
+
+// returns false if valid data not received from slave
+bool transactions_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]);
+void transactions_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]);
+
+void transaction_register_rpc(int8_t transaction_id, slave_callback_t callback);
+
+bool transaction_rpc_exec(int8_t transaction_id, uint8_t initiator2target_buffer_size, const void *initiator2target_buffer, uint8_t target2initiator_buffer_size, void *target2initiator_buffer);
+
+#define transaction_rpc_send(transaction_id, initiator2target_buffer_size, initiator2target_buffer) transaction_rpc_exec(transaction_id, initiator2target_buffer_size, initiator2target_buffer, 0, NULL)
+#define transaction_rpc_recv(transaction_id, target2initiator_buffer_size, target2initiator_buffer) transaction_rpc_exec(transaction_id, 0, NULL, target2initiator_buffer_size, target2initiator_buffer)
diff --git a/quantum/split_common/transport.c b/quantum/split_common/transport.c
index 9ed0f7591b..a711ef85f0 100644
--- a/quantum/split_common/transport.c
+++ b/quantum/split_common/transport.c
@@ -1,452 +1,118 @@
-#include <string.h>
-#include <stddef.h>
-
-#include "config.h"
-#include "matrix.h"
-#include "quantum.h"
-
-#define ROWS_PER_HAND (MATRIX_ROWS / 2)
-#define SYNC_TIMER_OFFSET 2
-
-#ifdef RGBLIGHT_ENABLE
-# include "rgblight.h"
-#endif
-
-#ifdef BACKLIGHT_ENABLE
-# include "backlight.h"
-#endif
-
-#ifdef ENCODER_ENABLE
-# include "encoder.h"
-static pin_t encoders_pad[] = ENCODERS_PAD_A;
-# define NUMBER_OF_ENCODERS (sizeof(encoders_pad) / sizeof(pin_t))
-#endif
-
-#if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
-# include "led_matrix.h"
-#endif
-#if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
-# include "rgb_matrix.h"
-#endif
-
-#if defined(USE_I2C)
+/* Copyright 2021 QMK
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
-# include "i2c_master.h"
-# include "i2c_slave.h"
-
-typedef struct _I2C_slave_buffer_t {
-# ifndef DISABLE_SYNC_TIMER
- uint32_t sync_timer;
-# endif
-# ifdef SPLIT_TRANSPORT_MIRROR
- matrix_row_t mmatrix[ROWS_PER_HAND];
-# endif
- matrix_row_t smatrix[ROWS_PER_HAND];
-# ifdef SPLIT_MODS_ENABLE
- uint8_t real_mods;
- uint8_t weak_mods;
-# ifndef NO_ACTION_ONESHOT
- uint8_t oneshot_mods;
-# endif
-# endif
-# ifdef BACKLIGHT_ENABLE
- uint8_t backlight_level;
-# endif
-# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT)
- rgblight_syncinfo_t rgblight_sync;
-# endif
-# ifdef ENCODER_ENABLE
- uint8_t encoder_state[NUMBER_OF_ENCODERS];
-# endif
-# ifdef WPM_ENABLE
- uint8_t current_wpm;
-# endif
-# if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
- led_eeconfig_t led_matrix;
- bool led_suspend_state;
-# endif
-# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
- rgb_config_t rgb_matrix;
- bool rgb_suspend_state;
-# endif
-} I2C_slave_buffer_t;
+#include <string.h>
+#include <debug.h>
-static I2C_slave_buffer_t *const i2c_buffer = (I2C_slave_buffer_t *)i2c_slave_reg;
+#include "transactions.h"
+#include "transport.h"
+#include "transaction_id_define.h"
+#include "atomic_util.h"
-# define I2C_SYNC_TIME_START offsetof(I2C_slave_buffer_t, sync_timer)
-# define I2C_KEYMAP_MASTER_START offsetof(I2C_slave_buffer_t, mmatrix)
-# define I2C_KEYMAP_SLAVE_START offsetof(I2C_slave_buffer_t, smatrix)
-# define I2C_REAL_MODS_START offsetof(I2C_slave_buffer_t, real_mods)
-# define I2C_WEAK_MODS_START offsetof(I2C_slave_buffer_t, weak_mods)
-# define I2C_ONESHOT_MODS_START offsetof(I2C_slave_buffer_t, oneshot_mods)
-# define I2C_BACKLIGHT_START offsetof(I2C_slave_buffer_t, backlight_level)
-# define I2C_RGB_START offsetof(I2C_slave_buffer_t, rgblight_sync)
-# define I2C_ENCODER_START offsetof(I2C_slave_buffer_t, encoder_state)
-# define I2C_WPM_START offsetof(I2C_slave_buffer_t, current_wpm)
-# define I2C_LED_MATRIX_START offsetof(I2C_slave_buffer_t, led_matrix)
-# define I2C_LED_SUSPEND_START offsetof(I2C_slave_buffer_t, led_suspend_state)
-# define I2C_RGB_MATRIX_START offsetof(I2C_slave_buffer_t, rgb_matrix)
-# define I2C_RGB_SUSPEND_START offsetof(I2C_slave_buffer_t, rgb_suspend_state)
+#ifdef USE_I2C
-# define TIMEOUT 100
+# ifndef SLAVE_I2C_TIMEOUT
+# define SLAVE_I2C_TIMEOUT 100
+# endif // SLAVE_I2C_TIMEOUT
# ifndef SLAVE_I2C_ADDRESS
# define SLAVE_I2C_ADDRESS 0x32
# endif
-// Get rows from other half over i2c
-bool transport_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) {
- i2c_readReg(SLAVE_I2C_ADDRESS, I2C_KEYMAP_SLAVE_START, (void *)slave_matrix, sizeof(i2c_buffer->smatrix), TIMEOUT);
-# ifdef SPLIT_TRANSPORT_MIRROR
- i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_KEYMAP_MASTER_START, (void *)master_matrix, sizeof(i2c_buffer->mmatrix), TIMEOUT);
-# endif
+# include "i2c_master.h"
+# include "i2c_slave.h"
- // write backlight info
-# ifdef BACKLIGHT_ENABLE
- uint8_t level = is_backlight_enabled() ? get_backlight_level() : 0;
- if (level != i2c_buffer->backlight_level) {
- if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_BACKLIGHT_START, (void *)&level, sizeof(level), TIMEOUT) >= 0) {
- i2c_buffer->backlight_level = level;
- }
- }
-# endif
+// Ensure the I2C buffer has enough space
+_Static_assert(sizeof(split_shared_memory_t) <= I2C_SLAVE_REG_COUNT, "split_shared_memory_t too large for I2C_SLAVE_REG_COUNT");
-# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT)
- if (rgblight_get_change_flags()) {
- rgblight_syncinfo_t rgblight_sync;
- rgblight_get_syncinfo(&rgblight_sync);
- if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_RGB_START, (void *)&rgblight_sync, sizeof(rgblight_sync), TIMEOUT) >= 0) {
- rgblight_clear_change_flags();
- }
- }
-# endif
+split_shared_memory_t *const split_shmem = (split_shared_memory_t *)i2c_slave_reg;
-# ifdef ENCODER_ENABLE
- i2c_readReg(SLAVE_I2C_ADDRESS, I2C_ENCODER_START, (void *)i2c_buffer->encoder_state, sizeof(i2c_buffer->encoder_state), TIMEOUT);
- encoder_update_raw(i2c_buffer->encoder_state);
-# endif
+void transport_master_init(void) { i2c_init(); }
+void transport_slave_init(void) { i2c_slave_init(SLAVE_I2C_ADDRESS); }
-# ifdef WPM_ENABLE
- uint8_t current_wpm = get_current_wpm();
- if (current_wpm != i2c_buffer->current_wpm) {
- if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_WPM_START, (void *)&current_wpm, sizeof(current_wpm), TIMEOUT) >= 0) {
- i2c_buffer->current_wpm = current_wpm;
- }
+i2c_status_t transport_trigger_callback(int8_t id) {
+ // If there's no callback, indicate that we were successful
+ if (!split_transaction_table[id].slave_callback) {
+ return I2C_STATUS_SUCCESS;
}
-# endif
-# ifdef SPLIT_MODS_ENABLE
- uint8_t real_mods = get_mods();
- if (real_mods != i2c_buffer->real_mods) {
- if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_REAL_MODS_START, (void *)&real_mods, sizeof(real_mods), TIMEOUT) >= 0) {
- i2c_buffer->real_mods = real_mods;
+ // Kick off the "callback executor", now that data has been written to the slave
+ split_shmem->transaction_id = id;
+ split_transaction_desc_t *trans = &split_transaction_table[I2C_EXECUTE_CALLBACK];
+ return i2c_writeReg(SLAVE_I2C_ADDRESS, trans->initiator2target_offset, split_trans_initiator2target_buffer(trans), trans->initiator2target_buffer_size, SLAVE_I2C_TIMEOUT);
+}
+
+bool transport_execute_transaction(int8_t id, const void *initiator2target_buf, uint16_t initiator2target_length, void *target2initiator_buf, uint16_t target2initiator_length) {
+ i2c_status_t status;
+ split_transaction_desc_t *trans = &split_transaction_table[id];
+ if (initiator2target_length > 0) {
+ size_t len = trans->initiator2target_buffer_size < initiator2target_length ? trans->initiator2target_buffer_size : initiator2target_length;
+ memcpy(split_trans_initiator2target_buffer(trans), initiator2target_buf, len);
+ if ((status = i2c_writeReg(SLAVE_I2C_ADDRESS, trans->initiator2target_offset, split_trans_initiator2target_buffer(trans), len, SLAVE_I2C_TIMEOUT)) < 0) {
+ return false;
}
}
- uint8_t weak_mods = get_weak_mods();
- if (weak_mods != i2c_buffer->weak_mods) {
- if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_WEAK_MODS_START, (void *)&weak_mods, sizeof(weak_mods), TIMEOUT) >= 0) {
- i2c_buffer->weak_mods = weak_mods;
- }
+ // If we need to execute a callback on the slave, do so
+ if ((status = transport_trigger_callback(id)) < 0) {
+ return false;
}
-# ifndef NO_ACTION_ONESHOT
- uint8_t oneshot_mods = get_oneshot_mods();
- if (oneshot_mods != i2c_buffer->oneshot_mods) {
- if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_ONESHOT_MODS_START, (void *)&oneshot_mods, sizeof(oneshot_mods), TIMEOUT) >= 0) {
- i2c_buffer->oneshot_mods = oneshot_mods;
+ if (target2initiator_length > 0) {
+ size_t len = trans->target2initiator_buffer_size < target2initiator_length ? trans->target2initiator_buffer_size : target2initiator_length;
+ if ((status = i2c_readReg(SLAVE_I2C_ADDRESS, trans->target2initiator_offset, split_trans_target2initiator_buffer(trans), len, SLAVE_I2C_TIMEOUT)) < 0) {
+ return false;
}
+ memcpy(target2initiator_buf, split_trans_target2initiator_buffer(trans), len);
}
-# endif
-# endif
-# if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
- i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_LED_MATRIX_START, (void *)led_matrix_eeconfig, sizeof(i2c_buffer->led_matrix), TIMEOUT);
- bool suspend_state = led_matrix_get_suspend_state();
- i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_LED_SUSPEND_START, (void *)suspend_state, sizeof(i2c_buffer->led_suspend_state), TIMEOUT);
-# endif
-# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
- i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_RGB_MATRIX_START, (void *)rgb_matrix_config, sizeof(i2c_buffer->rgb_matrix), TIMEOUT);
- bool suspend_state = rgb_matrix_get_suspend_state();
- i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_RGB_SUSPEND_START, (void *)suspend_state, sizeof(i2c_buffer->rgb_suspend_state), TIMEOUT);
-# endif
-
-# ifndef DISABLE_SYNC_TIMER
- i2c_buffer->sync_timer = sync_timer_read32() + SYNC_TIMER_OFFSET;
- i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_SYNC_TIME_START, (void *)&i2c_buffer->sync_timer, sizeof(i2c_buffer->sync_timer), TIMEOUT);
-# endif
return true;
}
-void transport_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) {
-# ifndef DISABLE_SYNC_TIMER
- sync_timer_update(i2c_buffer->sync_timer);
-# endif
- // Copy matrix to I2C buffer
- memcpy((void *)i2c_buffer->smatrix, (void *)slave_matrix, sizeof(i2c_buffer->smatrix));
-# ifdef SPLIT_TRANSPORT_MIRROR
- memcpy((void *)master_matrix, (void *)i2c_buffer->mmatrix, sizeof(i2c_buffer->mmatrix));
-# endif
-
-// Read Backlight Info
-# ifdef BACKLIGHT_ENABLE
- backlight_set(i2c_buffer->backlight_level);
-# endif
-
-# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT)
- // Update the RGB with the new data
- if (i2c_buffer->rgblight_sync.status.change_flags != 0) {
- rgblight_update_sync(&i2c_buffer->rgblight_sync, false);
- i2c_buffer->rgblight_sync.status.change_flags = 0;
- }
-# endif
-
-# ifdef ENCODER_ENABLE
- encoder_state_raw(i2c_buffer->encoder_state);
-# endif
-
-# ifdef WPM_ENABLE
- set_current_wpm(i2c_buffer->current_wpm);
-# endif
-
-# ifdef SPLIT_MODS_ENABLE
- set_mods(i2c_buffer->real_mods);
- set_weak_mods(i2c_buffer->weak_mods);
-# ifndef NO_ACTION_ONESHOT
- set_oneshot_mods(i2c_buffer->oneshot_mods);
-# endif
-# endif
-
-# if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
- memcpy((void *)i2c_buffer->led_matrix, (void *)led_matrix_eeconfig, sizeof(i2c_buffer->led_matrix));
- led_matrix_set_suspend_state(i2c_buffer->led_suspend_state);
-# endif
-# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
- memcpy((void *)i2c_buffer->rgb_matrix, (void *)rgb_matrix_config, sizeof(i2c_buffer->rgb_matrix));
- rgb_matrix_set_suspend_state(i2c_buffer->rgb_suspend_state);
-# endif
-}
-
-void transport_master_init(void) { i2c_init(); }
-
-void transport_slave_init(void) { i2c_slave_init(SLAVE_I2C_ADDRESS); }
-
-#else // USE_SERIAL
+#else // USE_I2C
# include "serial.h"
-typedef struct _Serial_s2m_buffer_t {
- // TODO: if MATRIX_COLS > 8 change to uint8_t packed_matrix[] for pack/unpack
- matrix_row_t smatrix[ROWS_PER_HAND];
-
-# ifdef ENCODER_ENABLE
- uint8_t encoder_state[NUMBER_OF_ENCODERS];
-# endif
-
-} Serial_s2m_buffer_t;
-
-typedef struct _Serial_m2s_buffer_t {
-# ifdef SPLIT_MODS_ENABLE
- uint8_t real_mods;
- uint8_t weak_mods;
-# ifndef NO_ACTION_ONESHOT
- uint8_t oneshot_mods;
-# endif
-# endif
-# ifndef DISABLE_SYNC_TIMER
- uint32_t sync_timer;
-# endif
-# ifdef SPLIT_TRANSPORT_MIRROR
- matrix_row_t mmatrix[ROWS_PER_HAND];
-# endif
-# ifdef BACKLIGHT_ENABLE
- uint8_t backlight_level;
-# endif
-# ifdef WPM_ENABLE
- uint8_t current_wpm;
-# endif
-# if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
- led_eeconfig_t led_matrix;
- bool led_suspend_state;
-# endif
-# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
- rgb_config_t rgb_matrix;
- bool rgb_suspend_state;
-# endif
-} Serial_m2s_buffer_t;
-
-# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT)
-// When MCUs on both sides drive their respective RGB LED chains,
-// it is necessary to synchronize, so it is necessary to communicate RGB
-// information. In that case, define RGBLIGHT_SPLIT with info on the number
-// of LEDs on each half.
-//
-// Otherwise, if the master side MCU drives both sides RGB LED chains,
-// there is no need to communicate.
-
-typedef struct _Serial_rgblight_t {
- rgblight_syncinfo_t rgblight_sync;
-} Serial_rgblight_t;
+static split_shared_memory_t shared_memory;
+split_shared_memory_t *const split_shmem = &shared_memory;
-volatile Serial_rgblight_t serial_rgblight = {};
-uint8_t volatile status_rgblight = 0;
-# endif
-
-volatile Serial_s2m_buffer_t serial_s2m_buffer = {};
-volatile Serial_m2s_buffer_t serial_m2s_buffer = {};
-uint8_t volatile status0 = 0;
-
-enum serial_transaction_id {
- GET_SLAVE_MATRIX = 0,
-# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT)
- PUT_RGBLIGHT,
-# endif
-};
-
-SSTD_t transactions[] = {
- [GET_SLAVE_MATRIX] =
- {
- (uint8_t *)&status0,
- sizeof(serial_m2s_buffer),
- (uint8_t *)&serial_m2s_buffer,
- sizeof(serial_s2m_buffer),
- (uint8_t *)&serial_s2m_buffer,
- },
-# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT)
- [PUT_RGBLIGHT] =
- {
- (uint8_t *)&status_rgblight, sizeof(serial_rgblight), (uint8_t *)&serial_rgblight, 0, NULL // no slave to master transfer
- },
-# endif
-};
-
-void transport_master_init(void) { soft_serial_initiator_init(transactions, TID_LIMIT(transactions)); }
-
-void transport_slave_init(void) { soft_serial_target_init(transactions, TID_LIMIT(transactions)); }
+void transport_master_init(void) { soft_serial_initiator_init(); }
+void transport_slave_init(void) { soft_serial_target_init(); }
-# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT)
-
-// rgblight synchronization information communication.
-
-void transport_rgblight_master(void) {
- if (rgblight_get_change_flags()) {
- rgblight_get_syncinfo((rgblight_syncinfo_t *)&serial_rgblight.rgblight_sync);
- if (soft_serial_transaction(PUT_RGBLIGHT) == TRANSACTION_END) {
- rgblight_clear_change_flags();
- }
- }
-}
-
-void transport_rgblight_slave(void) {
- if (status_rgblight == TRANSACTION_ACCEPTED) {
- rgblight_update_sync((rgblight_syncinfo_t *)&serial_rgblight.rgblight_sync, false);
- status_rgblight = TRANSACTION_END;
+bool transport_execute_transaction(int8_t id, const void *initiator2target_buf, uint16_t initiator2target_length, void *target2initiator_buf, uint16_t target2initiator_length) {
+ split_transaction_desc_t *trans = &split_transaction_table[id];
+ if (initiator2target_length > 0) {
+ size_t len = trans->initiator2target_buffer_size < initiator2target_length ? trans->initiator2target_buffer_size : initiator2target_length;
+ memcpy(split_trans_initiator2target_buffer(trans), initiator2target_buf, len);
}
-}
-# else
-# define transport_rgblight_master()
-# define transport_rgblight_slave()
-# endif
-
-bool transport_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) {
-# ifndef SERIAL_USE_MULTI_TRANSACTION
- if (soft_serial_transaction() != TRANSACTION_END) {
- return false;
- }
-# else
- transport_rgblight_master();
- if (soft_serial_transaction(GET_SLAVE_MATRIX) != TRANSACTION_END) {
+ if (soft_serial_transaction(id) != TRANSACTION_END) {
return false;
}
-# endif
- // TODO: if MATRIX_COLS > 8 change to unpack()
- for (int i = 0; i < ROWS_PER_HAND; ++i) {
- slave_matrix[i] = serial_s2m_buffer.smatrix[i];
-# ifdef SPLIT_TRANSPORT_MIRROR
- serial_m2s_buffer.mmatrix[i] = master_matrix[i];
-# endif
+ if (target2initiator_length > 0) {
+ size_t len = trans->target2initiator_buffer_size < target2initiator_length ? trans->target2initiator_buffer_size : target2initiator_length;
+ memcpy(target2initiator_buf, split_trans_target2initiator_buffer(trans), len);
}
-# ifdef BACKLIGHT_ENABLE
- // Write backlight level for slave to read
- serial_m2s_buffer.backlight_level = is_backlight_enabled() ? get_backlight_level() : 0;
-# endif
-
-# ifdef ENCODER_ENABLE
- encoder_update_raw((uint8_t *)serial_s2m_buffer.encoder_state);
-# endif
-
-# ifdef WPM_ENABLE
- // Write wpm to slave
- serial_m2s_buffer.current_wpm = get_current_wpm();
-# endif
-
-# ifdef SPLIT_MODS_ENABLE
- serial_m2s_buffer.real_mods = get_mods();
- serial_m2s_buffer.weak_mods = get_weak_mods();
-# ifndef NO_ACTION_ONESHOT
- serial_m2s_buffer.oneshot_mods = get_oneshot_mods();
-# endif
-# endif
-
-# if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
- serial_m2s_buffer.led_matrix = led_matrix_eeconfig;
- serial_m2s_buffer.led_suspend_state = led_matrix_get_suspend_state();
-# endif
-# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
- serial_m2s_buffer.rgb_matrix = rgb_matrix_config;
- serial_m2s_buffer.rgb_suspend_state = rgb_matrix_get_suspend_state();
-# endif
-
-# ifndef DISABLE_SYNC_TIMER
- serial_m2s_buffer.sync_timer = sync_timer_read32() + SYNC_TIMER_OFFSET;
-# endif
return true;
}
-void transport_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) {
- transport_rgblight_slave();
-# ifndef DISABLE_SYNC_TIMER
- sync_timer_update(serial_m2s_buffer.sync_timer);
-# endif
-
- // TODO: if MATRIX_COLS > 8 change to pack()
- for (int i = 0; i < ROWS_PER_HAND; ++i) {
- serial_s2m_buffer.smatrix[i] = slave_matrix[i];
-# ifdef SPLIT_TRANSPORT_MIRROR
- master_matrix[i] = serial_m2s_buffer.mmatrix[i];
-# endif
- }
-# ifdef BACKLIGHT_ENABLE
- backlight_set(serial_m2s_buffer.backlight_level);
-# endif
-
-# ifdef ENCODER_ENABLE
- encoder_state_raw((uint8_t *)serial_s2m_buffer.encoder_state);
-# endif
+#endif // USE_I2C
-# ifdef WPM_ENABLE
- set_current_wpm(serial_m2s_buffer.current_wpm);
-# endif
-
-# ifdef SPLIT_MODS_ENABLE
- set_mods(serial_m2s_buffer.real_mods);
- set_weak_mods(serial_m2s_buffer.weak_mods);
-# ifndef NO_ACTION_ONESHOT
- set_oneshot_mods(serial_m2s_buffer.oneshot_mods);
-# endif
-# endif
-
-# if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
- led_matrix_eeconfig = serial_m2s_buffer.led_matrix;
- led_matrix_set_suspend_state(serial_m2s_buffer.led_suspend_state);
-# endif
-# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
- rgb_matrix_config = serial_m2s_buffer.rgb_matrix;
- rgb_matrix_set_suspend_state(serial_m2s_buffer.rgb_suspend_state);
-# endif
-}
+bool transport_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) { return transactions_master(master_matrix, slave_matrix); }
-#endif
+void transport_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) { transactions_slave(master_matrix, slave_matrix); } \ No newline at end of file
diff --git a/quantum/split_common/transport.h b/quantum/split_common/transport.h
index a9f66301bf..2e07f6b25c 100644
--- a/quantum/split_common/transport.h
+++ b/quantum/split_common/transport.h
@@ -1,10 +1,175 @@
+/* Copyright 2021 QMK
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
#pragma once
+#include "stdint.h"
+#include "stdbool.h"
+
+#include "progmem.h"
+#include "action_layer.h"
#include "matrix.h"
+#ifndef RPC_M2S_BUFFER_SIZE
+# define RPC_M2S_BUFFER_SIZE 32
+#endif // RPC_M2S_BUFFER_SIZE
+
+#ifndef RPC_S2M_BUFFER_SIZE
+# define RPC_S2M_BUFFER_SIZE 32
+#endif // RPC_S2M_BUFFER_SIZE
+
void transport_master_init(void);
void transport_slave_init(void);
// returns false if valid data not received from slave
bool transport_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]);
void transport_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]);
+
+bool transport_execute_transaction(int8_t id, const void *initiator2target_buf, uint16_t initiator2target_length, void *target2initiator_buf, uint16_t target2initiator_length);
+
+#ifdef ENCODER_ENABLE
+# include "encoder.h"
+# define NUMBER_OF_ENCODERS (sizeof((pin_t[])ENCODERS_PAD_A) / sizeof(pin_t))
+#endif // ENCODER_ENABLE
+
+#ifdef BACKLIGHT_ENABLE
+# include "backlight.h"
+#endif // BACKLIGHT_ENABLE
+
+#ifdef RGBLIGHT_ENABLE
+# include "rgblight.h"
+#endif // RGBLIGHT_ENABLE
+
+typedef struct _split_slave_matrix_sync_t {
+ uint8_t checksum;
+ matrix_row_t matrix[(MATRIX_ROWS) / 2];
+} split_slave_matrix_sync_t;
+
+#ifdef SPLIT_TRANSPORT_MIRROR
+typedef struct _split_master_matrix_sync_t {
+ matrix_row_t matrix[(MATRIX_ROWS) / 2];
+} split_master_matrix_sync_t;
+#endif // SPLIT_TRANSPORT_MIRROR
+
+#ifdef ENCODER_ENABLE
+typedef struct _split_slave_encoder_sync_t {
+ uint8_t checksum;
+ uint8_t state[NUMBER_OF_ENCODERS];
+} split_slave_encoder_sync_t;
+#endif // ENCODER_ENABLE
+
+#if !defined(NO_ACTION_LAYER) && defined(SPLIT_LAYER_STATE_ENABLE)
+typedef struct _split_layers_sync_t {
+ layer_state_t layer_state;
+ layer_state_t default_layer_state;
+} split_layers_sync_t;
+#endif // !defined(NO_ACTION_LAYER) && defined(SPLIT_LAYER_STATE_ENABLE)
+
+#if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
+# include "led_matrix.h"
+
+typedef struct _led_matrix_sync_t {
+ led_eeconfig_t led_matrix;
+ bool led_suspend_state;
+} led_matrix_sync_t;
+#endif // defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
+
+#if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
+# include "rgb_matrix.h"
+
+typedef struct _rgb_matrix_sync_t {
+ rgb_config_t rgb_matrix;
+ bool rgb_suspend_state;
+} rgb_matrix_sync_t;
+#endif // defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
+
+#ifdef SPLIT_MODS_ENABLE
+typedef struct _split_mods_sync_t {
+ uint8_t real_mods;
+ uint8_t weak_mods;
+# ifndef NO_ACTION_ONESHOT
+ uint8_t oneshot_mods;
+# endif // NO_ACTION_ONESHOT
+} split_mods_sync_t;
+#endif // SPLIT_MODS_ENABLE
+
+#if defined(SPLIT_TRANSACTION_IDS_KB) || defined(SPLIT_TRANSACTION_IDS_USER)
+typedef struct _rpc_sync_info_t {
+ int8_t transaction_id;
+ uint8_t m2s_length;
+ uint8_t s2m_length;
+} rpc_sync_info_t;
+#endif // defined(SPLIT_TRANSACTION_IDS_KB) || defined(SPLIT_TRANSACTION_IDS_USER)
+
+typedef struct _split_shared_memory_t {
+#ifdef USE_I2C
+ int8_t transaction_id;
+#endif // USE_I2C
+
+ split_slave_matrix_sync_t smatrix;
+
+#ifdef SPLIT_TRANSPORT_MIRROR
+ split_master_matrix_sync_t mmatrix;
+#endif // SPLIT_TRANSPORT_MIRROR
+
+#ifdef ENCODER_ENABLE
+ split_slave_encoder_sync_t encoders;
+#endif // ENCODER_ENABLE
+
+#ifndef DISABLE_SYNC_TIMER
+ uint32_t sync_timer;
+#endif // DISABLE_SYNC_TIMER
+
+#if !defined(NO_ACTION_LAYER) && defined(SPLIT_LAYER_STATE_ENABLE)
+ split_layers_sync_t layers;
+#endif // !defined(NO_ACTION_LAYER) && defined(SPLIT_LAYER_STATE_ENABLE)
+
+#ifdef SPLIT_LED_STATE_ENABLE
+ uint8_t led_state;
+#endif // SPLIT_LED_STATE_ENABLE
+
+#ifdef SPLIT_MODS_ENABLE
+ split_mods_sync_t mods;
+#endif // SPLIT_MODS_ENABLE
+
+#ifdef BACKLIGHT_ENABLE
+ uint8_t backlight_level;
+#endif // BACKLIGHT_ENABLE
+
+#if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT)
+ rgblight_syncinfo_t rgblight_sync;
+#endif // defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT)
+
+#if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
+ led_matrix_sync_t led_matrix_sync;
+#endif // defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
+
+#if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
+ rgb_matrix_sync_t rgb_matrix_sync;
+#endif // defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
+
+#if defined(WPM_ENABLE) && defined(SPLIT_WPM_ENABLE)
+ uint8_t current_wpm;
+#endif // defined(WPM_ENABLE) && defined(SPLIT_WPM_ENABLE)
+
+#if defined(SPLIT_TRANSACTION_IDS_KB) || defined(SPLIT_TRANSACTION_IDS_USER)
+ rpc_sync_info_t rpc_info;
+ uint8_t rpc_m2s_buffer[RPC_M2S_BUFFER_SIZE];
+ uint8_t rpc_s2m_buffer[RPC_S2M_BUFFER_SIZE];
+#endif // defined(SPLIT_TRANSACTION_IDS_KB) || defined(SPLIT_TRANSACTION_IDS_USER)
+} split_shared_memory_t;
+
+extern split_shared_memory_t *const split_shmem; \ No newline at end of file
diff --git a/show_options.mk b/show_options.mk
index cd04f6a0d7..dd1ad5171f 100644
--- a/show_options.mk
+++ b/show_options.mk
@@ -44,6 +44,7 @@ OTHER_OPTION_NAMES = \
AUTO_SHIFT_MODIFIERS \
COMBO_ENABLE \
KEY_LOCK_ENABLE \
+ KEY_OVERRIDE_ENABLE \
LEADER_ENABLE \
PRINTING_ENABLE \
STENO_ENABLE \
@@ -86,17 +87,18 @@ OTHER_OPTION_NAMES = \
LTO_ENABLE
define NAME_ECHO
- @echo " $1 = $($1) # $(origin $1)"
+ @printf " %-30s = %-16s # %s\\n" "$1" "$($1)" "$(origin $1)"
endef
.PHONY: show_build_options0 show_build_options
show_build_options0:
- @echo " KEYBOARD = $(KEYBOARD)"
- @echo " KEYMAP = $(KEYMAP)"
- @echo " MCU = $(MCU)"
- @echo " MCU_SERIES = $(MCU_SERIES)"
- @echo " PLATFORM = $(PLATFORM)"
+ @echo " KEYBOARD = $(KEYBOARD)"
+ @echo " KEYMAP = $(KEYMAP)"
+ @echo " MCU = $(MCU)"
+ @echo " MCU_SERIES = $(MCU_SERIES)"
+ @echo " PLATFORM = $(PLATFORM)"
+ @echo " BOOTLOADER = $(BOOTLOADER)"
@echo " FIRMWARE_FORMAT = $(FIRMWARE_FORMAT)"
@echo
@echo "Build Options:"
diff --git a/testlist.mk b/testlist.mk
index 0d7609b9f0..d256f4c815 100644
--- a/testlist.mk
+++ b/testlist.mk
@@ -1,6 +1,7 @@
TEST_LIST = $(notdir $(patsubst %/rules.mk,%,$(wildcard $(ROOT_DIR)/tests/*/rules.mk)))
FULL_TESTS := $(TEST_LIST)
+include $(ROOT_DIR)/quantum/debounce/tests/testlist.mk
include $(ROOT_DIR)/quantum/sequencer/tests/testlist.mk
include $(ROOT_DIR)/quantum/serial_link/tests/testlist.mk
diff --git a/tmk_core/avr.mk b/tmk_core/avr.mk
index 690154535b..2efde22127 100644
--- a/tmk_core/avr.mk
+++ b/tmk_core/avr.mk
@@ -301,7 +301,7 @@ ifneq ($(strip $(BOOTLOADER)), qmk-dfu)
endif
make -C lib/lufa/Bootloaders/DFU/ clean
$(QMK_BIN) generate-dfu-header --quiet --keyboard $(KEYBOARD) --output lib/lufa/Bootloaders/DFU/Keyboard.h
- $(eval MAX_SIZE=$(shell n=`$(CC) -E -mmcu=$(MCU) $(CFLAGS) $(OPT_DEFS) tmk_core/common/avr/bootloader_size.c 2> /dev/null | sed -ne 's/\r//;/^#/n;/^AVR_SIZE:/,$${s/^AVR_SIZE: //;p;}'` && echo $$(($$n)) || echo 0))
+ $(eval MAX_SIZE=$(shell n=`$(CC) -E -mmcu=$(MCU) -D__ASSEMBLER__ $(CFLAGS) $(OPT_DEFS) tmk_core/common/avr/bootloader_size.c 2> /dev/null | sed -ne 's/\r//;/^#/n;/^AVR_SIZE:/,$${s/^AVR_SIZE: //;p;}'` && echo $$(($$n)) || echo 0))
$(eval PROGRAM_SIZE_KB=$(shell n=`expr $(MAX_SIZE) / 1024` && echo $$(($$n)) || echo 0))
$(eval BOOT_SECTION_SIZE_KB=$(shell n=`expr $(BOOTLOADER_SIZE) / 1024` && echo $$(($$n)) || echo 0))
$(eval FLASH_SIZE_KB=$(shell n=`expr $(PROGRAM_SIZE_KB) + $(BOOT_SECTION_SIZE_KB)` && echo $$(($$n)) || echo 0))
diff --git a/tmk_core/chibios.mk b/tmk_core/chibios.mk
index 97299b7d32..7eda360460 100644
--- a/tmk_core/chibios.mk
+++ b/tmk_core/chibios.mk
@@ -390,8 +390,10 @@ ifndef TEENSY_LOADER_CLI
endif
endif
+TEENSY_LOADER_CLI_MCU ?= $(MCU_LDSCRIPT)
+
define EXEC_TEENSY
- $(TEENSY_LOADER_CLI) -mmcu=$(MCU_LDSCRIPT) -w -v $(BUILD_DIR)/$(TARGET).hex
+ $(TEENSY_LOADER_CLI) -mmcu=$(TEENSY_LOADER_CLI_MCU) -w -v $(BUILD_DIR)/$(TARGET).hex
endef
teensy: $(BUILD_DIR)/$(TARGET).hex cpfirmware sizeafter
@@ -408,6 +410,8 @@ else ifeq ($(strip $(BOOTLOADER)),kiibohd)
$(call EXEC_DFU_UTIL)
else ifeq ($(strip $(MCU_FAMILY)),KINETIS)
$(call EXEC_TEENSY)
+else ifeq ($(strip $(MCU_FAMILY)),MIMXRT1062)
+ $(call EXEC_TEENSY)
else ifeq ($(strip $(MCU_FAMILY)),STM32)
$(call EXEC_DFU_UTIL)
else
diff --git a/tmk_core/common/action_layer.c b/tmk_core/common/action_layer.c
index af2d7d964b..ed1a4bd20d 100644
--- a/tmk_core/common/action_layer.c
+++ b/tmk_core/common/action_layer.c
@@ -131,32 +131,32 @@ bool layer_state_cmp(layer_state_t cmp_layer_state, uint8_t layer) {
if (!cmp_layer_state) {
return layer == 0;
}
- return (cmp_layer_state & (1UL << layer)) != 0;
+ return (cmp_layer_state & ((layer_state_t)1 << layer)) != 0;
}
/** \brief Layer move
*
* Turns on the given layer and turn off all other layers
*/
-void layer_move(uint8_t layer) { layer_state_set(1UL << layer); }
+void layer_move(uint8_t layer) { layer_state_set((layer_state_t)1 << layer); }
/** \brief Layer on
*
* Turns on given layer
*/
-void layer_on(uint8_t layer) { layer_state_set(layer_state | (1UL << layer)); }
+void layer_on(uint8_t layer) { layer_state_set(layer_state | ((layer_state_t)1 << layer)); }
/** \brief Layer off
*
* Turns off given layer
*/
-void layer_off(uint8_t layer) { layer_state_set(layer_state & ~(1UL << layer)); }
+void layer_off(uint8_t layer) { layer_state_set(layer_state & ~((layer_state_t)1 << layer)); }
/** \brief Layer invert
*
* Toggle the given layer (set it if it's unset, or unset it if it's set)
*/
-void layer_invert(uint8_t layer) { layer_state_set(layer_state ^ (1UL << layer)); }
+void layer_invert(uint8_t layer) { layer_state_set(layer_state ^ ((layer_state_t)1 << layer)); }
/** \brief Layer or
*
@@ -258,7 +258,7 @@ uint8_t layer_switch_get_layer(keypos_t key) {
layer_state_t layers = layer_state | default_layer_state;
/* check top layer first */
for (int8_t i = MAX_LAYER - 1; i >= 0; i--) {
- if (layers & (1UL << i)) {
+ if (layers & ((layer_state_t)1 << i)) {
action = action_for_key(i, key);
if (action.code != ACTION_TRANSPARENT) {
return i;
diff --git a/tmk_core/common/action_layer.h b/tmk_core/common/action_layer.h
index d72cd3e3a5..b87d096eed 100644
--- a/tmk_core/common/action_layer.h
+++ b/tmk_core/common/action_layer.h
@@ -21,6 +21,29 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "keyboard.h"
#include "action.h"
+#ifdef DYNAMIC_KEYMAP_ENABLE
+# ifndef DYNAMIC_KEYMAP_LAYER_COUNT
+# define DYNAMIC_KEYMAP_LAYER_COUNT 4
+# endif
+# if DYNAMIC_KEYMAP_LAYER_COUNT <= 8
+# ifndef LAYER_STATE_8BIT
+# define LAYER_STATE_8BIT
+# endif
+# elif DYNAMIC_KEYMAP_LAYER_COUNT <= 16
+# ifndef LAYER_STATE_16BIT
+# define LAYER_STATE_16BIT
+# endif
+# else
+# ifndef LAYER_STATE_32BIT
+# define LAYER_STATE_32BIT
+# endif
+# endif
+#endif
+
+#if !defined(LAYER_STATE_8BIT) && !defined(LAYER_STATE_16BIT) && !defined(LAYER_STATE_32BIT)
+# define LAYER_STATE_32BIT
+#endif
+
#if defined(LAYER_STATE_8BIT)
typedef uint8_t layer_state_t;
# define MAX_LAYER_BITS 3
@@ -35,13 +58,15 @@ typedef uint16_t layer_state_t;
# define MAX_LAYER 16
# endif
# define get_highest_layer(state) biton16(state)
-#else
+#elif defined(LAYER_STATE_32BIT)
typedef uint32_t layer_state_t;
# define MAX_LAYER_BITS 5
# ifndef MAX_LAYER
# define MAX_LAYER 32
# endif
# define get_highest_layer(state) biton32(state)
+#else
+# error Layer Mask size not specified. HOW?!
#endif
/*
@@ -92,7 +117,7 @@ layer_state_t layer_state_set_kb(layer_state_t state);
# define layer_state_set(layer)
# define layer_state_is(layer) (layer == 0)
-# define layer_state_cmp(state, layer) (state == 0 ? layer == 0 : (state & 1UL << layer) != 0)
+# define layer_state_cmp(state, layer) (state == 0 ? layer == 0 : (state & (layer_state_t)1 << layer) != 0)
# define layer_debug()
# define layer_clear()
diff --git a/tmk_core/common/action_util.c b/tmk_core/common/action_util.c
index a57c8bf66a..2b3c00cba0 100644
--- a/tmk_core/common/action_util.c
+++ b/tmk_core/common/action_util.c
@@ -27,6 +27,10 @@ extern keymap_config_t keymap_config;
static uint8_t real_mods = 0;
static uint8_t weak_mods = 0;
static uint8_t macro_mods = 0;
+#ifdef KEY_OVERRIDE_ENABLE
+static uint8_t weak_override_mods = 0;
+static uint8_t suppressed_mods = 0;
+#endif
#ifdef USB_6KRO_ENABLE
# define RO_ADD(a, b) ((a + b) % KEYBOARD_REPORT_KEYS)
@@ -229,6 +233,7 @@ void send_keyboard_report(void) {
keyboard_report->mods = real_mods;
keyboard_report->mods |= weak_mods;
keyboard_report->mods |= macro_mods;
+
#ifndef NO_ACTION_ONESHOT
if (oneshot_mods) {
# if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0))
@@ -244,6 +249,13 @@ void send_keyboard_report(void) {
}
#endif
+
+#ifdef KEY_OVERRIDE_ENABLE
+ // These need to be last to be able to properly control key overrides
+ keyboard_report->mods &= ~suppressed_mods;
+ keyboard_report->mods |= weak_override_mods;
+#endif
+
host_keyboard_send(keyboard_report);
}
@@ -299,6 +311,22 @@ void set_weak_mods(uint8_t mods) { weak_mods = mods; }
*/
void clear_weak_mods(void) { weak_mods = 0; }
+#ifdef KEY_OVERRIDE_ENABLE
+/** \brief set weak mods used by key overrides. DO not call this manually
+ */
+void set_weak_override_mods(uint8_t mods) { weak_override_mods = mods; }
+/** \brief clear weak mods used by key overrides. DO not call this manually
+ */
+void clear_weak_override_mods(void) { weak_override_mods = 0; }
+
+/** \brief set suppressed mods used by key overrides. DO not call this manually
+ */
+void set_suppressed_override_mods(uint8_t mods) { suppressed_mods = mods; }
+/** \brief clear suppressed mods used by key overrides. DO not call this manually
+ */
+void clear_suppressed_override_mods(void) { suppressed_mods = 0; }
+#endif
+
/* macro modifier */
/** \brief get macro mods
*
diff --git a/tmk_core/common/arm_atsam/_timer.h b/tmk_core/common/arm_atsam/_timer.h
new file mode 100644
index 0000000000..77402b612a
--- /dev/null
+++ b/tmk_core/common/arm_atsam/_timer.h
@@ -0,0 +1,19 @@
+/* Copyright 2021 Simon Arlott
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+#pragma once
+
+// The platform is 32-bit, so prefer 32-bit timers to avoid overflow
+#define FAST_TIMER_T_SIZE 32
diff --git a/tmk_core/common/avr/_timer.h b/tmk_core/common/avr/_timer.h
new file mode 100644
index 0000000000..b81e0f68b7
--- /dev/null
+++ b/tmk_core/common/avr/_timer.h
@@ -0,0 +1,19 @@
+/* Copyright 2021 Simon Arlott
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+#pragma once
+
+// The platform is 8-bit, so prefer 16-bit timers to reduce code size
+#define FAST_TIMER_T_SIZE 16
diff --git a/tmk_core/common/avr/gpio.h b/tmk_core/common/avr/gpio.h
index 231556c29c..e9be68491d 100644
--- a/tmk_core/common/avr/gpio.h
+++ b/tmk_core/common/avr/gpio.h
@@ -20,6 +20,8 @@
typedef uint8_t pin_t;
+/* Operation of GPIO by pin. */
+
#define setPinInput(pin) (DDRx_ADDRESS(pin) &= ~_BV((pin)&0xF), PORTx_ADDRESS(pin) &= ~_BV((pin)&0xF))
#define setPinInputHigh(pin) (DDRx_ADDRESS(pin) &= ~_BV((pin)&0xF), PORTx_ADDRESS(pin) |= _BV((pin)&0xF))
#define setPinInputLow(pin) _Static_assert(0, "AVR processors cannot implement an input as pull low")
@@ -32,3 +34,16 @@ typedef uint8_t pin_t;
#define readPin(pin) ((bool)(PINx_ADDRESS(pin) & _BV((pin)&0xF)))
#define togglePin(pin) (PORTx_ADDRESS(pin) ^= _BV((pin)&0xF))
+
+/* Operation of GPIO by port. */
+
+typedef uint8_t port_data_t;
+
+#define readPort(port) PINx_ADDRESS(port)
+
+#define setPortBitInput(port, bit) (DDRx_ADDRESS(port) &= ~_BV((bit)&0xF), PORTx_ADDRESS(port) &= ~_BV((bit)&0xF))
+#define setPortBitInputHigh(port, bit) (DDRx_ADDRESS(port) &= ~_BV((bit)&0xF), PORTx_ADDRESS(port) |= _BV((bit)&0xF))
+#define setPortBitOutput(port, bit) (DDRx_ADDRESS(port) |= _BV((bit)&0xF))
+
+#define writePortBitLow(port, bit) (PORTx_ADDRESS(port) &= ~_BV((bit)&0xF))
+#define writePortBitHigh(port, bit) (PORTx_ADDRESS(port) |= _BV((bit)&0xF))
diff --git a/tmk_core/common/chibios/_timer.h b/tmk_core/common/chibios/_timer.h
new file mode 100644
index 0000000000..77402b612a
--- /dev/null
+++ b/tmk_core/common/chibios/_timer.h
@@ -0,0 +1,19 @@
+/* Copyright 2021 Simon Arlott
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+#pragma once
+
+// The platform is 32-bit, so prefer 32-bit timers to avoid overflow
+#define FAST_TIMER_T_SIZE 32
diff --git a/tmk_core/common/chibios/bootloader.c b/tmk_core/common/chibios/bootloader.c
index 11f7abf432..f9514ee5f3 100644
--- a/tmk_core/common/chibios/bootloader.c
+++ b/tmk_core/common/chibios/bootloader.c
@@ -95,7 +95,7 @@ void enter_bootloader_mode_if_requested(void) {
}
}
-#elif defined(KL2x) || defined(K20x) || defined(MK66F18) // STM32_BOOTLOADER_DUAL_BANK // STM32_BOOTLOADER_ADDRESS
+#elif defined(KL2x) || defined(K20x) || defined(MK66F18) || defined(MIMXRT1062) // STM32_BOOTLOADER_DUAL_BANK // STM32_BOOTLOADER_ADDRESS
/* Kinetis */
# if defined(BOOTLOADER_KIIBOHD)
@@ -103,7 +103,8 @@ void enter_bootloader_mode_if_requested(void) {
# define SCB_AIRCR_VECTKEY_WRITEMAGIC 0x05FA0000
const uint8_t sys_reset_to_loader_magic[] = "\xff\x00\x7fRESET TO LOADER\x7f\x00\xff";
__attribute__((weak)) void bootloader_jump(void) {
- __builtin_memcpy((void *)VBAT, (const void *)sys_reset_to_loader_magic, sizeof(sys_reset_to_loader_magic));
+ void *volatile vbat = (void *)VBAT;
+ __builtin_memcpy(vbat, (const void *)sys_reset_to_loader_magic, sizeof(sys_reset_to_loader_magic));
// request reset
SCB->AIRCR = SCB_AIRCR_VECTKEY_WRITEMAGIC | SCB_AIRCR_SYSRESETREQ_Msk;
}
diff --git a/tmk_core/common/chibios/gpio.h b/tmk_core/common/chibios/gpio.h
index 5d0e142abc..4d057f1cab 100644
--- a/tmk_core/common/chibios/gpio.h
+++ b/tmk_core/common/chibios/gpio.h
@@ -20,6 +20,8 @@
typedef ioline_t pin_t;
+/* Operation of GPIO by pin. */
+
#define setPinInput(pin) palSetLineMode(pin, PAL_MODE_INPUT)
#define setPinInputHigh(pin) palSetLineMode(pin, PAL_MODE_INPUT_PULLUP)
#define setPinInputLow(pin) palSetLineMode(pin, PAL_MODE_INPUT_PULLDOWN)
@@ -32,3 +34,17 @@ typedef ioline_t pin_t;
#define readPin(pin) palReadLine(pin)
#define togglePin(pin) palToggleLine(pin)
+
+/* Operation of GPIO by port. */
+
+typedef uint16_t port_data_t;
+
+#define readPort(pin) palReadPort(PAL_PORT(pin))
+
+#define setPortBitInput(pin, bit) palSetPadMode(PAL_PORT(pin), bit, PAL_MODE_INPUT)
+#define setPortBitInputHigh(pin, bit) palSetPadMode(PAL_PORT(pin), bit, PAL_MODE_INPUT_PULLUP)
+#define setPortBitInputLow(pin, bit) palSetPadMode(PAL_PORT(pin), bit, PAL_MODE_INPUT_PULLDOWN)
+#define setPortBitOutput(pin, bit) palSetPadMode(PAL_PORT(pin), bit, PAL_MODE_OUTPUT_PUSHPULL)
+
+#define writePortBitLow(pin, bit) palClearLine(PAL_LINE(PAL_PORT(pin), bit))
+#define writePortBitHigh(pin, bit) palSetLine(PAL_LINE(PAL_PORT(pin), bit))
diff --git a/tmk_core/common/host.c b/tmk_core/common/host.c
index e7d92cfac6..a8b391e893 100644
--- a/tmk_core/common/host.c
+++ b/tmk_core/common/host.c
@@ -17,6 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <stdint.h>
//#include <avr/interrupt.h>
+#include "keyboard.h"
#include "keycode.h"
#include "host.h"
#include "util.h"
@@ -35,15 +36,20 @@ void host_set_driver(host_driver_t *d) { driver = d; }
host_driver_t *host_get_driver(void) { return driver; }
+#ifdef SPLIT_KEYBOARD
+uint8_t split_led_state = 0;
+void set_split_host_keyboard_leds(uint8_t led_state) { split_led_state = led_state; }
+#endif
+
uint8_t host_keyboard_leds(void) {
+#ifdef SPLIT_KEYBOARD
+ if (!is_keyboard_master()) return split_led_state;
+#endif
if (!driver) return 0;
return (*driver->keyboard_leds)();
}
-led_t host_keyboard_led_state(void) {
- if (!driver) return (led_t){0};
- return (led_t)((*driver->keyboard_leds)());
-}
+led_t host_keyboard_led_state(void) { return (led_t)host_keyboard_leds(); }
/* send report */
void host_keyboard_send(report_keyboard_t *report) {
diff --git a/tmk_core/common/keyboard.c b/tmk_core/common/keyboard.c
index 3d6092e71c..28fa97bc8f 100644
--- a/tmk_core/common/keyboard.c
+++ b/tmk_core/common/keyboard.c
@@ -85,6 +85,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifdef OLED_DRIVER_ENABLE
# include "oled_driver.h"
#endif
+#ifdef ST7565_ENABLE
+# include "st7565.h"
+#endif
#ifdef VELOCIKEY_ENABLE
# include "velocikey.h"
#endif
@@ -100,6 +103,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifdef EEPROM_DRIVER
# include "eeprom_driver.h"
#endif
+#if defined(CRC_ENABLE)
+# include "crc.h"
+#endif
static uint32_t last_input_modification_time = 0;
uint32_t last_input_activity_time(void) { return last_input_modification_time; }
@@ -297,6 +303,9 @@ void keyboard_init(void) {
timer_init();
sync_timer_init();
matrix_init();
+#if defined(CRC_ENABLE)
+ crc_init();
+#endif
#ifdef VIA_ENABLE
via_init();
#endif
@@ -306,6 +315,9 @@ void keyboard_init(void) {
#ifdef OLED_DRIVER_ENABLE
oled_init(OLED_ROTATION_0);
#endif
+#ifdef ST7565_ENABLE
+ st7565_init(DISPLAY_ROTATION_0);
+#endif
#ifdef PS2_MOUSE_ENABLE
ps2_mouse_init();
#endif
@@ -470,6 +482,18 @@ MATRIX_LOOP_END:
# endif
#endif
+#ifdef ST7565_ENABLE
+ st7565_task();
+# ifndef ST7565_DISABLE_TIMEOUT
+ // Wake up display if user is using those fabulous keys or spinning those encoders!
+# ifdef ENCODER_ENABLE
+ if (matrix_changed || encoders_changed) st7565_on();
+# else
+ if (matrix_changed) st7565_on();
+# endif
+# endif
+#endif
+
#ifdef MOUSEKEY_ENABLE
// mousekey repeat & acceleration
mousekey_task();
diff --git a/tmk_core/common/progmem.h b/tmk_core/common/progmem.h
index 4e4771e523..3a7a169682 100644
--- a/tmk_core/common/progmem.h
+++ b/tmk_core/common/progmem.h
@@ -3,6 +3,7 @@
#if defined(__AVR__)
# include <avr/pgmspace.h>
#else
+# include <string.h>
# define PROGMEM
# define PSTR(x) x
# define PGM_P const char*
diff --git a/tmk_core/common/sync_timer.c b/tmk_core/common/sync_timer.c
index de24b463b6..68b92d8b43 100644
--- a/tmk_core/common/sync_timer.c
+++ b/tmk_core/common/sync_timer.c
@@ -26,7 +26,7 @@ SOFTWARE.
#include "sync_timer.h"
#include "keyboard.h"
-#if defined(SPLIT_KEYBOARD) && !defined(DISABLE_SYNC_TIMER)
+#if (defined(SPLIT_KEYBOARD) || defined(SERIAL_LINK_ENABLE)) && !defined(DISABLE_SYNC_TIMER)
volatile int32_t sync_timer_ms;
void sync_timer_init(void) { sync_timer_ms = 0; }
diff --git a/tmk_core/common/sync_timer.h b/tmk_core/common/sync_timer.h
index 9ddef45bb2..744e2b50d5 100644
--- a/tmk_core/common/sync_timer.h
+++ b/tmk_core/common/sync_timer.h
@@ -32,7 +32,7 @@ SOFTWARE.
extern "C" {
#endif
-#if defined(SPLIT_KEYBOARD) && !defined(DISABLE_SYNC_TIMER)
+#if (defined(SPLIT_KEYBOARD) || defined(SERIAL_LINK_ENABLE)) && !defined(DISABLE_SYNC_TIMER)
void sync_timer_init(void);
void sync_timer_update(uint32_t time);
uint16_t sync_timer_read(void);
diff --git a/tmk_core/common/timer.h b/tmk_core/common/timer.h
index 58f637dd93..928811a2b7 100644
--- a/tmk_core/common/timer.h
+++ b/tmk_core/common/timer.h
@@ -1,5 +1,6 @@
/*
Copyright 2011 Jun Wako <wakojun@gmail.com>
+Copyright 2021 Simon Arlott
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
@@ -17,13 +18,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
+#if __has_include_next("_timer.h")
+# include_next "_timer.h" /* Include the platform's _timer.h */
+#endif
+
#include <stdint.h>
#include <stdbool.h>
-#if defined(__AVR__)
-# include "avr/timer_avr.h"
-#endif
-
#define TIMER_DIFF(a, b, max) ((max == UINT8_MAX) ? ((uint8_t)((a) - (b))) : ((max == UINT16_MAX) ? ((uint16_t)((a) - (b))) : ((max == UINT32_MAX) ? ((uint32_t)((a) - (b))) : ((a) >= (b) ? (a) - (b) : (max) + 1 - (b) + (a)))))
#define TIMER_DIFF_8(a, b) TIMER_DIFF(a, b, UINT8_MAX)
#define TIMER_DIFF_16(a, b) TIMER_DIFF(a, b, UINT16_MAX)
@@ -47,6 +48,21 @@ uint32_t timer_elapsed32(uint32_t last);
#define timer_expired(current, future) ((uint16_t)(current - future) < UINT16_MAX / 2)
#define timer_expired32(current, future) ((uint32_t)(current - future) < UINT32_MAX / 2)
+// Use an appropriate timer integer size based on architecture (16-bit will overflow sooner)
+#if FAST_TIMER_T_SIZE < 32
+# define TIMER_DIFF_FAST(a, b) TIMER_DIFF_16(a, b)
+# define timer_expired_fast(current, future) timer_expired(current, future)
+typedef uint16_t fast_timer_t;
+fast_timer_t inline timer_read_fast(void) { return timer_read(); }
+fast_timer_t inline timer_elapsed_fast(fast_timer_t last) { return timer_elapsed(last); }
+#else
+# define TIMER_DIFF_FAST(a, b) TIMER_DIFF_32(a, b)
+# define timer_expired_fast(current, future) timer_expired32(current, future)
+typedef uint32_t fast_timer_t;
+fast_timer_t inline timer_read_fast(void) { return timer_read32(); }
+fast_timer_t inline timer_elapsed_fast(fast_timer_t last) { return timer_elapsed32(last); }
+#endif
+
#ifdef __cplusplus
}
#endif
diff --git a/tmk_core/protocol/chibios/usb_main.c b/tmk_core/protocol/chibios/usb_main.c
index d04302acae..407b8ea75d 100644
--- a/tmk_core/protocol/chibios/usb_main.c
+++ b/tmk_core/protocol/chibios/usb_main.c
@@ -903,7 +903,8 @@ static void send_extra(uint8_t report_id, uint16_t data) {
return;
}
- report_extra_t report = {.report_id = report_id, .usage = data};
+ static report_extra_t report;
+ report = (report_extra_t){.report_id = report_id, .usage = data};
usbStartTransmitI(&USB_DRIVER, SHARED_IN_EPNUM, (uint8_t *)&report, sizeof(report_extra_t));
osalSysUnlock();
@@ -1051,45 +1052,44 @@ void virtser_task(void) {
#ifdef JOYSTICK_ENABLE
void send_joystick_packet(joystick_t *joystick) {
- joystick_report_t rep = {
+ static joystick_report_t rep;
+ rep = (joystick_report_t) {
# if JOYSTICK_AXES_COUNT > 0
.axes =
- {
- joystick->axes[0],
+ { joystick->axes[0],
# if JOYSTICK_AXES_COUNT >= 2
- joystick->axes[1],
+ joystick->axes[1],
# endif
# if JOYSTICK_AXES_COUNT >= 3
- joystick->axes[2],
+ joystick->axes[2],
# endif
# if JOYSTICK_AXES_COUNT >= 4
- joystick->axes[3],
+ joystick->axes[3],
# endif
# if JOYSTICK_AXES_COUNT >= 5
- joystick->axes[4],
+ joystick->axes[4],
# endif
# if JOYSTICK_AXES_COUNT >= 6
- joystick->axes[5],
+ joystick->axes[5],
# endif
- },
+ },
# endif // JOYSTICK_AXES_COUNT>0
# if JOYSTICK_BUTTON_COUNT > 0
- .buttons =
- {
- joystick->buttons[0],
+ .buttons = {
+ joystick->buttons[0],
# if JOYSTICK_BUTTON_COUNT > 8
- joystick->buttons[1],
+ joystick->buttons[1],
# endif
# if JOYSTICK_BUTTON_COUNT > 16
- joystick->buttons[2],
+ joystick->buttons[2],
# endif
# if JOYSTICK_BUTTON_COUNT > 24
- joystick->buttons[3],
+ joystick->buttons[3],
# endif
- }
+ }
# endif // JOYSTICK_BUTTON_COUNT>0
};
diff --git a/tmk_core/protocol/lufa/lufa.c b/tmk_core/protocol/lufa/lufa.c
index 63619fdb3b..4ac079e168 100644
--- a/tmk_core/protocol/lufa/lufa.c
+++ b/tmk_core/protocol/lufa/lufa.c
@@ -314,45 +314,44 @@ static void Console_Task(void) {
void send_joystick_packet(joystick_t *joystick) {
uint8_t timeout = 255;
- joystick_report_t r = {
+ static joystick_report_t;
+ r = (joystick_report_t) {
# if JOYSTICK_AXES_COUNT > 0
.axes =
- {
- joystick->axes[0],
+ { joystick->axes[0],
# if JOYSTICK_AXES_COUNT >= 2
- joystick->axes[1],
+ joystick->axes[1],
# endif
# if JOYSTICK_AXES_COUNT >= 3
- joystick->axes[2],
+ joystick->axes[2],
# endif
# if JOYSTICK_AXES_COUNT >= 4
- joystick->axes[3],
+ joystick->axes[3],
# endif
# if JOYSTICK_AXES_COUNT >= 5
- joystick->axes[4],
+ joystick->axes[4],
# endif
# if JOYSTICK_AXES_COUNT >= 6
- joystick->axes[5],
+ joystick->axes[5],
# endif
- },
+ },
# endif // JOYSTICK_AXES_COUNT>0
# if JOYSTICK_BUTTON_COUNT > 0
- .buttons =
- {
- joystick->buttons[0],
+ .buttons = {
+ joystick->buttons[0],
# if JOYSTICK_BUTTON_COUNT > 8
- joystick->buttons[1],
+ joystick->buttons[1],
# endif
# if JOYSTICK_BUTTON_COUNT > 16
- joystick->buttons[2],
+ joystick->buttons[2],
# endif
# if JOYSTICK_BUTTON_COUNT > 24
- joystick->buttons[3],
+ joystick->buttons[3],
# endif
- }
+ }
# endif // JOYSTICK_BUTTON_COUNT>0
};
@@ -768,7 +767,8 @@ static void send_extra(uint8_t report_id, uint16_t data) {
if (USB_DeviceState != DEVICE_STATE_Configured) return;
- report_extra_t r = {.report_id = report_id, .usage = data};
+ static report_extra_t r;
+ r = (report_extra_t){.report_id = report_id, .usage = data};
Endpoint_SelectEndpoint(SHARED_IN_EPNUM);
/* Check if write ready for a polling interval around 10ms */
diff --git a/tmk_core/protocol/usb_descriptor.c b/tmk_core/protocol/usb_descriptor.c
index ba7760f283..7a4a790315 100644
--- a/tmk_core/protocol/usb_descriptor.c
+++ b/tmk_core/protocol/usb_descriptor.c
@@ -351,7 +351,7 @@ const USB_Descriptor_Device_t PROGMEM DeviceDescriptor = {
.Size = sizeof(USB_Descriptor_Device_t),
.Type = DTYPE_Device
},
- .USBSpecification = VERSION_BCD(1, 1, 0),
+ .USBSpecification = VERSION_BCD(2, 0, 0),
#if VIRTSER_ENABLE
.Class = USB_CSCP_IADDeviceClass,
@@ -953,10 +953,10 @@ const USB_Descriptor_String_t PROGMEM ProductString = {
#if defined(SERIAL_NUMBER)
const USB_Descriptor_String_t PROGMEM SerialNumberString = {
.Header = {
- .Size = USB_STRING_LEN(sizeof(STR(SERIAL_NUMBER)) - 1), // Subtract 1 for null terminator
+ .Size = USB_STRING_LEN(sizeof(SERIAL_NUMBER) - 1), // Subtract 1 for null terminator
.Type = DTYPE_String
},
- .UnicodeString = LSTR(SERIAL_NUMBER)
+ .UnicodeString = USBSTR(SERIAL_NUMBER)
};
#endif
diff --git a/tmk_core/protocol/usb_descriptor_common.h b/tmk_core/protocol/usb_descriptor_common.h
index b1f602c82e..ce0cf09763 100644
--- a/tmk_core/protocol/usb_descriptor_common.h
+++ b/tmk_core/protocol/usb_descriptor_common.h
@@ -16,6 +16,10 @@
#pragma once
+// Prefix string literal with L for descriptors
+#define USBCONCAT(a, b) a##b
+#define USBSTR(s) USBCONCAT(L, s)
+
/////////////////////
// RAW Usage page and ID configuration
diff --git a/tmk_core/protocol/vusb/vusb.c b/tmk_core/protocol/vusb/vusb.c
index 9362fbde78..98cebf6012 100644
--- a/tmk_core/protocol/vusb/vusb.c
+++ b/tmk_core/protocol/vusb/vusb.c
@@ -272,7 +272,8 @@ static void send_extra(uint8_t report_id, uint16_t data) {
last_id = report_id;
last_data = data;
- report_extra_t report = {.report_id = report_id, .usage = data};
+ static report_extra_t report;
+ report = (report_extra_t){.report_id = report_id, .usage = data};
if (usbInterruptIsReadyShared()) {
usbSetInterruptShared((void *)&report, sizeof(report_extra_t));
}
@@ -598,10 +599,10 @@ const PROGMEM usbStringDescriptor_t usbStringDescriptorProduct = {
#if defined(SERIAL_NUMBER)
const PROGMEM usbStringDescriptor_t usbStringDescriptorSerial = {
.header = {
- .bLength = USB_STRING_LEN(sizeof(STR(SERIAL_NUMBER)) - 1),
+ .bLength = USB_STRING_LEN(sizeof(SERIAL_NUMBER) - 1),
.bDescriptorType = USBDESCR_STRING
},
- .bString = LSTR(SERIAL_NUMBER)
+ .bString = USBSTR(SERIAL_NUMBER)
};
#endif
diff --git a/tmk_core/rules.mk b/tmk_core/rules.mk
index fc2dc68be2..597f7aa827 100644
--- a/tmk_core/rules.mk
+++ b/tmk_core/rules.mk
@@ -458,7 +458,7 @@ ifeq ($(findstring avr-gcc,$(CC)),avr-gcc)
SIZE_MARGIN = 1024
check-size:
- $(eval MAX_SIZE=$(shell n=`$(CC) -E -mmcu=$(MCU) $(CFLAGS) $(OPT_DEFS) tmk_core/common/avr/bootloader_size.c 2> /dev/null | sed -ne 's/\r//;/^#/n;/^AVR_SIZE:/,$${s/^AVR_SIZE: //;p;}'` && echo $$(($$n)) || echo 0))
+ $(eval MAX_SIZE=$(shell n=`$(CC) -E -mmcu=$(MCU) -D__ASSEMBLER__ $(CFLAGS) $(OPT_DEFS) tmk_core/common/avr/bootloader_size.c 2> /dev/null | sed -ne 's/\r//;/^#/n;/^AVR_SIZE:/,$${s/^AVR_SIZE: //;p;}'` && echo $$(($$n)) || echo 0))
$(eval CURRENT_SIZE=$(shell if [ -f $(BUILD_DIR)/$(TARGET).hex ]; then $(SIZE) --target=$(FORMAT) $(BUILD_DIR)/$(TARGET).hex | $(AWK) 'NR==2 {print $$4}'; else printf 0; fi))
$(eval FREE_SIZE=$(shell expr $(MAX_SIZE) - $(CURRENT_SIZE)))
$(eval OVER_SIZE=$(shell expr $(CURRENT_SIZE) - $(MAX_SIZE)))
diff --git a/users/bbaserdem/rules.mk b/users/bbaserdem/rules.mk
index 94f01cdffc..8b9741cf93 100644
--- a/users/bbaserdem/rules.mk
+++ b/users/bbaserdem/rules.mk
@@ -16,8 +16,6 @@ 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
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/config.h b/users/bcat/config.h
index 16188950e2..5bb93f3833 100644
--- a/users/bcat/config.h
+++ b/users/bcat/config.h
@@ -33,7 +33,7 @@
#if defined(RGB_MATRIX_ENABLE)
/* Turn off per-key RGB when the host goes to sleep. */
-# define RGB_DISABLE_WHEN_USB_SUSPENDED true
+# define RGB_DISABLE_WHEN_USB_SUSPENDED
/* Keep per-key RGB increments consistent across keyboards. */
# undef RGB_MATRIX_HUE_STEP
diff --git a/users/bcat/rules.mk b/users/bcat/rules.mk
index 3442a78ac2..d49c04a402 100644
--- a/users/bcat/rules.mk
+++ b/users/bcat/rules.mk
@@ -27,7 +27,6 @@ MIDI_ENABLE = no
SLEEP_LED_ENABLE = no
# Disable other unused options on all keyboards.
-API_SYSEX_ENABLE = no
AUTO_SHIFT_ENABLE = no
COMBO_ENABLE = no
KEYBOARD_LOCK_ENABLE = no
diff --git a/users/bocaj/config.h b/users/bocaj/config.h
index 2a44aabfc4..ecfb09c6f9 100644
--- a/users/bocaj/config.h
+++ b/users/bocaj/config.h
@@ -28,7 +28,7 @@
// # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (not recommened)
# define RGB_MATRIX_FRAMEBUFFER_EFFECTS
// # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
// # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
// # define EECONFIG_RGB_MATRIX (uint32_t *)16
diff --git a/users/curry/config.h b/users/curry/config.h
index b982dab038..e3c0a103ef 100644
--- a/users/curry/config.h
+++ b/users/curry/config.h
@@ -17,7 +17,7 @@
#if defined(RGB_MATRIX_ENABLE)
# define RGB_MATRIX_KEYPRESSES
# define RGB_MATRIX_FRAMEBUFFER_EFFECTS
-# define RGB_DISABLE_WHEN_USB_SUSPENDED true
+# define RGB_DISABLE_WHEN_USB_SUSPENDED
# define DISABLE_RGB_MATRIX_ALPHAS_MODS
# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
diff --git a/users/danielo515/process_records.h b/users/danielo515/process_records.h
index 4906076865..caa85e6292 100644
--- a/users/danielo515/process_records.h
+++ b/users/danielo515/process_records.h
@@ -78,8 +78,8 @@ enum layers {
#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_OVRR ES_MORD
+#define KC_E_APOS ES_QUOT
#define KC_E_IEXL ES_IEXL
//========== Short hand for complex key combinations
#define WIN_LEFT_HALF LALT(LGUI(KC_LEFT))
diff --git a/users/drashna/config.h b/users/drashna/config.h
index 5f7c32ff35..445e180825 100644
--- a/users/drashna/config.h
+++ b/users/drashna/config.h
@@ -17,34 +17,49 @@
#pragma once
// Use custom magic number so that when switching branches, EEPROM always gets reset
-#define EECONFIG_MAGIC_NUMBER (uint16_t)0x1339
+#define EECONFIG_MAGIC_NUMBER (uint16_t)0x1339
/* Set Polling rate to 1000Hz */
#define USB_POLLING_INTERVAL_MS 1
#if defined(SPLIT_KEYBOARD)
# define SPLIT_MODS_ENABLE
-# define SPLIT_TRANSPORT_MIRROR
+# define SPLIT_LAYER_STATE_ENABLE
+# define SPLIT_LED_STATE_ENABLE
+
+// # define SPLIT_TRANSPORT_MIRROR
# define SERIAL_USE_MULTI_TRANSACTION
-// # define SPLIT_NUM_TRANSACTIONS_KB 2
+# define SPLIT_TRANSACTION_IDS_USER RPC_ID_USER_STATE_SYNC
#endif
#ifdef AUDIO_ENABLE
-
# define AUDIO_CLICKY
-# define STARTUP_SONG SONG(RICK_ROLL)
-# define GOODBYE_SONG SONG(SONIC_RING)
-# define DEFAULT_LAYER_SONGS \
- { SONG(QWERTY_SOUND), SONG(COLEMAK_SOUND), SONG(DVORAK_SOUND), SONG(OVERWATCH_THEME) }
-
# define AUDIO_CLICKY_FREQ_RANDOMNESS 1.5f
-# 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)
-# define UNICODE_SONG_WINC SONG(RICK_ROLL)
-#endif // !AUDIO_ENABLE
+# ifdef USER_SONG_LIST
+# define STARTUP_SONG SONG(RICK_ROLL)
+# define GOODBYE_SONG SONG(SONIC_RING)
+# define DEFAULT_LAYER_SONGS \
+ { SONG(QWERTY_SOUND), SONG(COLEMAK_SOUND), SONG(DVORAK_SOUND), SONG(OVERWATCH_THEME) }
+# define UNICODE_SONG_MAC SONG(MARIO_THEME)
+# define UNICODE_SONG_LNX SONG(MARIO_POWERUP)
+# define UNICODE_SONG_WIN SONG(MARIO_ONEUP)
+# define UNICODE_SONG_BSD SONG(RICK_ROLL)
+# define UNICODE_SONG_WINC SONG(RICK_ROLL)
+# else
+# define STARTUP_SONG SONG(STARTUP_SOUND)
+# define GOODBYE_SONG SONG(GOODBYE_SOUND)
+# define DEFAULT_LAYER_SONGS \
+ { SONG(QWERTY_SOUND), SONG(COLEMAK_SOUND), SONG(DVORAK_SOUND), SONG(WORKMAN_SOUND) }
+# define UNICODE_SONG_MAC SONG(QWERTY_SOUND)
+# define UNICODE_SONG_LNX SONG(COLEMAK_SOUND)
+# define UNICODE_SONG_WIN SONG(DVORAK_SOUND)
+# define UNICODE_SONG_BSD SONG(WORKMAN_SOUND)
+# define UNICODE_SONG_WINC SONG(PLOVER_GOODBYE_SOUND)
+# endif
+#endif // !AUDIO_ENABLE
+
+#define UNICODE_SELECTED_MODES UC_WIN, UC_MAC
#ifdef RGBLIGHT_ENABLE
# define RGBLIGHT_SLEEP
@@ -56,18 +71,16 @@
# else
# define RGBLIGHT_ANIMATIONS
# endif
-# define RGBLIGHT_EFFECT_TWINKLE_LIFE 250
-# define RGBLIGHT_EFFECT_TWINKLE_PROBABILITY 1/24
-#endif // RGBLIGHT_ENABLE
+# define RGBLIGHT_EFFECT_TWINKLE_LIFE 250
+# define RGBLIGHT_EFFECT_TWINKLE_PROBABILITY 1 / 24
+#endif // RGBLIGHT_ENABLE
#ifdef RGB_MATRIX_ENABLE
-# define RGB_MATRIX_KEYPRESSES // reacts to keypresses (will slow down matrix scan by a lot)
+# define RGB_MATRIX_KEYPRESSES // reacts to keypresses (will slow down matrix scan by a lot)
// # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (not recommened)
# define RGB_MATRIX_FRAMEBUFFER_EFFECTS
-// # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
-// # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
-// # define EECONFIG_RGB_MATRIX (uint32_t *)16
+// # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
+// # define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
# if defined(__AVR__) && !defined(__AVR_AT90USB1286__) && !defined(KEYBOARD_launchpad)
# define DISABLE_RGB_MATRIX_ALPHAS_MODS
@@ -107,8 +120,8 @@
# define DISABLE_RGB_MATRIX_MULTISPLASH
# define DISABLE_RGB_MATRIX_SOLID_SPLASH
# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
-# endif // AVR
-#endif // RGB_MATRIX_ENABLE
+# endif // AVR
+#endif // RGB_MATRIX_ENABLE
#ifdef OLED_DRIVER_ENABLE
# ifdef SPLIT_KEYBOARD
@@ -120,7 +133,7 @@
# ifdef OLED_FONT_H
# undef OLED_FONT_H
# endif
-# define OLED_FONT_H "drashna_font.h"
+# define OLED_FONT_H "drashna_font.h"
# define OLED_FONT_END 255
// # define OLED_FONT_5X5
// # define OLED_FONT_AZTECH
@@ -135,16 +148,16 @@
#ifndef ONESHOT_TAP_TOGGLE
# define ONESHOT_TAP_TOGGLE 2
-#endif // !ONESHOT_TAP_TOGGLE
+#endif // !ONESHOT_TAP_TOGGLE
#ifndef ONESHOT_TIMEOUT
# define ONESHOT_TIMEOUT 3000
-#endif // !ONESHOT_TIMEOUT
+#endif // !ONESHOT_TIMEOUT
#ifdef QMK_KEYS_PER_SCAN
# undef QMK_KEYS_PER_SCAN
# define QMK_KEYS_PER_SCAN 2
-#endif // !QMK_KEYS_PER_SCAN
+#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,
@@ -152,8 +165,8 @@
// actually sends Ctrl-x. That's bad.)
#define IGNORE_MOD_TAP_INTERRUPT
#undef PERMISSIVE_HOLD
-//#define TAPPING_FORCE_HOLD
-//#define RETRO_TAPPING
+//#define TAPPING_FORCE_HOLD_PER_KEY
+//#define RETRO_TAPPING_PER_KEY
#ifndef KEYBOARD_kyria_rev1
# define TAPPING_TERM_PER_KEY
#endif
@@ -166,7 +179,7 @@
#ifdef TAPPING_TERM
# undef TAPPING_TERM
-#endif // TAPPING_TERM
+#endif // TAPPING_TERM
#if defined(KEYBOARD_ergodox_ez)
# define TAPPING_TERM 185
#elif defined(KEYBOARD_crkbd)
@@ -185,14 +198,16 @@
# undef LOCKING_RESYNC_ENABLE
#endif
+#define LAYER_STATE_16BIT
+
#ifdef CONVERT_TO_PROTON_C
// pins that are available but not present on Pro Micro
-# define A3 PAL_LINE(GPIOA, 3)
-# define A4 PAL_LINE(GPIOA, 4)
-# define A5 PAL_LINE(GPIOA, 5)
-# define A6 PAL_LINE(GPIOA, 6)
-# define A7 PAL_LINE(GPIOA, 7)
-# define A8 PAL_LINE(GPIOA, 8)
+# define A3 PAL_LINE(GPIOA, 3)
+# define A4 PAL_LINE(GPIOA, 4)
+# define A5 PAL_LINE(GPIOA, 5)
+# define A6 PAL_LINE(GPIOA, 6)
+# define A7 PAL_LINE(GPIOA, 7)
+# define A8 PAL_LINE(GPIOA, 8)
# define A13 PAL_LINE(GPIOA, 13)
# define A14 PAL_LINE(GPIOA, 14)
# define A15 PAL_LINE(GPIOA, 15)
@@ -203,3 +218,79 @@
# define C14 PAL_LINE(GPIOC, 14)
# define C15 PAL_LINE(GPIOC, 15)
#endif
+
+#ifdef MOUSEKEY_ENABLE
+// mouse movement config
+# ifdef MK_3_SPEED
+# undef MK_3_SPEED
+# endif
+# define MK_KINETIC_SPEED
+# ifdef MK_KINETIC_SPEED
+# ifndef MOUSEKEY_DELAY
+# define MOUSEKEY_DELAY 8
+# endif
+# ifndef MOUSEKEY_INTERVAL
+# define MOUSEKEY_INTERVAL 20
+# endif
+# ifdef MOUSEKEY_MOVE_DELTA
+# define MOUSEKEY_MOVE_DELTA 25
+# endif
+# else
+# ifndef MOUSEKEY_DELAY
+# define MOUSEKEY_DELAY 300
+# endif
+# ifndef MOUSEKEY_INTERVAL
+# define MOUSEKEY_INTERVAL 50
+# endif
+# ifndef MOUSEKEY_MOVE_DELTA
+# define MOUSEKEY_MOVE_DELTA 5
+# endif
+# endif
+# ifndef MOUSEKEY_MAX_SPEED
+# define MOUSEKEY_MAX_SPEED 7
+# endif
+# ifndef MOUSEKEY_TIME_TO_MAX
+# define MOUSEKEY_TIME_TO_MAX 60
+# endif
+# ifndef MOUSEKEY_INITIAL_SPEED
+# define MOUSEKEY_INITIAL_SPEED 100
+# endif
+# ifndef MOUSEKEY_BASE_SPEED
+# define MOUSEKEY_BASE_SPEED 1000
+# endif
+# ifndef MOUSEKEY_DECELERATED_SPEED
+# define MOUSEKEY_DECELERATED_SPEED 400
+# endif
+# ifndef MOUSEKEY_ACCELERATED_SPEED
+# define MOUSEKEY_ACCELERATED_SPEED 3000
+# endif
+// mouse scroll config
+# ifndef MOUSEKEY_WHEEL_DELAY
+# define MOUSEKEY_WHEEL_DELAY 15
+# endif
+# ifndef MOUSEKEY_WHEEL_DELTA
+# define MOUSEKEY_WHEEL_DELTA 1
+# endif
+# ifndef MOUSEKEY_WHEEL_INTERVAL
+# define MOUSEKEY_WHEEL_INTERVAL 50
+# endif
+# ifndef MOUSEKEY_WHEEL_MAX_SPEED
+# define MOUSEKEY_WHEEL_MAX_SPEED 8
+# endif
+# ifndef MOUSEKEY_WHEEL_TIME_TO_MAX
+# define MOUSEKEY_WHEEL_TIME_TO_MAX 80
+# endif
+// mouse scroll kinetic config
+# ifndef MOUSEKEY_WHEEL_INITIAL_MOVEMENTS
+# define MOUSEKEY_WHEEL_INITIAL_MOVEMENTS 8
+# endif
+# ifndef MOUSEKEY_WHEEL_BASE_MOVEMENTS
+# define MOUSEKEY_WHEEL_BASE_MOVEMENTS 48
+# endif
+# ifndef MOUSEKEY_WHEEL_ACCELERATED_MOVEMENTS
+# define MOUSEKEY_WHEEL_ACCELERATED_MOVEMENTS 48
+# endif
+# ifndef MOUSEKEY_WHEEL_DECELERATED_MOVEMENTS
+# define MOUSEKEY_WHEEL_DECELERATED_MOVEMENTS 8
+# endif
+#endif // MOUSEKEY_ENABLE
diff --git a/users/drashna/drashna.c b/users/drashna/drashna.c
index a493737262..b54d0cfcc0 100644
--- a/users/drashna/drashna.c
+++ b/users/drashna/drashna.c
@@ -86,6 +86,9 @@ void keyboard_post_init_user(void) {
#if defined(RGB_MATRIX_ENABLE)
keyboard_post_init_rgb_matrix();
#endif
+#if defined(SPLIT_KEYBOARD) && defined(SPLIT_TRANSACTION_IDS_USER)
+ keyboard_post_init_transport_sync();
+#endif
keyboard_post_init_keymap();
}
@@ -100,12 +103,12 @@ void shutdown_user(void) {
rgblight_enable_noeeprom();
rgblight_mode_noeeprom(1);
rgblight_setrgb_red();
-#endif // RGBLIGHT_ENABLE
+#endif // RGBLIGHT_ENABLE
#ifdef RGB_MATRIX_ENABLE
rgb_matrix_set_color_all(0xFF, 0x00, 0x00);
rgb_matrix_update_pwm_buffers();
-#endif // RGB_MATRIX_ENABLE
+#endif // RGB_MATRIX_ENABLE
shutdown_keymap();
}
@@ -120,7 +123,11 @@ void suspend_power_down_user(void) {
__attribute__((weak)) void suspend_wakeup_init_keymap(void) {}
-void suspend_wakeup_init_user(void) { suspend_wakeup_init_keymap(); }
+void suspend_wakeup_init_user(void) {
+ if (layer_state_is(_GAMEPAD)) { layer_off(_GAMEPAD); }
+ if (layer_state_is(_DIABLO)) { layer_off(_DIABLO); }
+ suspend_wakeup_init_keymap();
+}
__attribute__((weak)) void matrix_scan_keymap(void) {}
@@ -135,13 +142,13 @@ void matrix_scan_user(void) {
startup_user();
}
-#ifdef TAP_DANCE_ENABLE // Run Diablo 3 macro checking code.
+#ifdef TAP_DANCE_ENABLE // Run Diablo 3 macro checking code.
run_diablo_macro_check();
-#endif // TAP_DANCE_ENABLE
+#endif // TAP_DANCE_ENABLE
#if defined(RGBLIGHT_ENABLE)
matrix_scan_rgb_light();
-#endif // RGBLIGHT_ENABLE
+#endif // RGBLIGHT_ENABLE
#if defined(RGB_MATRIX_ENABLE)
matrix_scan_rgb_matrix();
#endif
@@ -160,15 +167,13 @@ __attribute__((weak)) layer_state_t layer_state_set_keymap(layer_state_t 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) {
- if (!is_keyboard_master()) {
- return state;
- }
+ if (!is_keyboard_master()) { return state; }
state = layer_state_set_keymap(state);
state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST);
#if defined(RGBLIGHT_ENABLE)
state = layer_state_set_rgb_light(state);
-#endif // RGBLIGHT_ENABLE
+#endif // RGBLIGHT_ENABLE
#if defined(AUDIO_ENABLE) && !defined(__arm__)
static bool is_gamepad_on = false;
if (layer_state_cmp(state, _GAMEPAD) != is_gamepad_on) {
@@ -187,15 +192,13 @@ __attribute__((weak)) layer_state_t default_layer_state_set_keymap(layer_state_t
// Runs state check and changes underglow color and animation
layer_state_t default_layer_state_set_user(layer_state_t state) {
- if (!is_keyboard_master()) {
- return state;
- }
+ if (!is_keyboard_master()) { return 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 // RGBLIGHT_ENABLE
#endif
return state;
}
diff --git a/users/drashna/drashna.h b/users/drashna/drashna.h
index e66f106574..f1d756f742 100644
--- a/users/drashna/drashna.h
+++ b/users/drashna/drashna.h
@@ -22,7 +22,7 @@
#include "process_records.h"
#ifdef TAP_DANCE_ENABLE
# include "tap_dances.h"
-#endif // TAP_DANCE_ENABLE
+#endif // TAP_DANCE_ENABLE
#if defined(RGBLIGHT_ENABLE)
# include "rgb_stuff.h"
#endif
@@ -33,7 +33,10 @@
# include "oled_stuff.h"
#endif
#if defined(PIMORONI_TRACKBALL_ENABLE)
-# include "pimoroni_trackball.h"
+# include "drivers/sensors/pimoroni_trackball.h"
+#endif
+#ifdef SPLIT_KEYBOARD
+# include "transport_sync.h"
#endif
/* Define layer names */
@@ -98,12 +101,12 @@ We use custom codes here, so we can substitute the right stuff
# 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
+#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
+#endif // TAP_DANCE_ENABLE
#if defined(DRASHNA_CUSTOM_TRANSPORT) && defined(POINTING_DEVICE_ENABLE)
void master_mouse_send(int8_t x, int8_t y);
diff --git a/users/drashna/drashna_font.h b/users/drashna/drashna_font.h
index 6a3865a44d..46ebf3710a 100644
--- a/users/drashna/drashna_font.h
+++ b/users/drashna/drashna_font.h
@@ -5,8 +5,9 @@
#include "progmem.h"
+// clang-format off
static const unsigned char font[] PROGMEM = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x00 0
+ 0x07, 0x08, 0x7F, 0x08, 0x07, 0x00, // 0x00 0
0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00, // 0x01 1
0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00, // 0x02 2
0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00, // 0x03 3 ♥
@@ -1304,3 +1305,5 @@ static const unsigned char font[] PROGMEM = {
#endif
};
+
+// clang-format on
diff --git a/users/drashna/drashna_transport.c b/users/drashna/drashna_transport.c
deleted file mode 100644
index 9df11c9bdf..0000000000
--- a/users/drashna/drashna_transport.c
+++ /dev/null
@@ -1,603 +0,0 @@
-/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
- *
- * 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 <http://www.gnu.org/licenses/>.
- */
-
-#include <string.h>
-#include <stddef.h>
-
-#include "matrix.h"
-#include QMK_KEYBOARD_H
-
-#define ROWS_PER_HAND (MATRIX_ROWS / 2)
-#define SYNC_TIMER_OFFSET 2
-
-#ifdef RGBLIGHT_ENABLE
-# include "rgblight.h"
-#endif
-
-#ifdef BACKLIGHT_ENABLE
-# include "backlight.h"
-#endif
-
-#ifdef ENCODER_ENABLE
-# include "encoder.h"
-static pin_t encoders_pad[] = ENCODERS_PAD_A;
-# define NUMBER_OF_ENCODERS (sizeof(encoders_pad) / sizeof(pin_t))
-#endif
-
-#ifdef POINTING_DEVICE_ENABLE
-static uint16_t device_cpi = 0;
-static int8_t split_mouse_x = 0, split_mouse_y = 0;
-#endif
-
-#ifdef OLED_DRIVER_ENABLE
-# include "oled_driver.h"
-#endif
-
-#if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
-# include "led_matrix.h"
-#endif
-#if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
-# include "rgb_matrix.h"
-#endif
-
-#if defined(USE_I2C)
-
-# include "i2c_master.h"
-# include "i2c_slave.h"
-
-typedef struct _I2C_slave_buffer_t {
-# ifndef DISABLE_SYNC_TIMER
- uint32_t sync_timer;
-# endif
-# ifdef SPLIT_TRANSPORT_MIRROR
- matrix_row_t mmatrix[ROWS_PER_HAND];
-# endif
- matrix_row_t smatrix[ROWS_PER_HAND];
-# ifdef SPLIT_MODS_ENABLE
- uint8_t real_mods;
- uint8_t weak_mods;
-# ifndef NO_ACTION_ONESHOT
- uint8_t oneshot_mods;
-# endif
-# endif
-# ifdef BACKLIGHT_ENABLE
- uint8_t backlight_level;
-# endif
-# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT)
- rgblight_syncinfo_t rgblight_sync;
-# endif
-# ifdef ENCODER_ENABLE
- uint8_t encoder_state[NUMBER_OF_ENCODERS];
-# endif
-# ifdef WPM_ENABLE
- uint8_t current_wpm;
-# endif
-# if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
- led_eeconfig_t led_matrix;
- bool led_suspend_state;
-# endif
-# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
- rgb_config_t rgb_matrix;
- bool rgb_suspend_state;
-# endif
- int8_t mouse_x;
- int8_t mouse_y;
- uint16_t device_cpi;
- bool oled_on;
- layer_state_t t_layer_state;
- layer_state_t t_default_layer_state;
-} __attribute__((packed)) I2C_slave_buffer_t;
-
-static I2C_slave_buffer_t *const i2c_buffer = (I2C_slave_buffer_t *)i2c_slave_reg;
-
-# define I2C_BACKLIGHT_START offsetof(I2C_slave_buffer_t, backlight_level)
-# define I2C_RGB_START offsetof(I2C_slave_buffer_t, rgblight_sync)
-# define I2C_KEYMAP_MASTER_START offsetof(I2C_slave_buffer_t, mmatrix)
-# define I2C_KEYMAP_SLAVE_START offsetof(I2C_slave_buffer_t, smatrix)
-# define I2C_SYNC_TIME_START offsetof(I2C_slave_buffer_t, sync_timer)
-# define I2C_REAL_MODS_START offsetof(I2C_slave_buffer_t, real_mods)
-# define I2C_WEAK_MODS_START offsetof(I2C_slave_buffer_t, weak_mods)
-# define I2C_ONESHOT_MODS_START offsetof(I2C_slave_buffer_t, oneshot_mods)
-# define I2C_ENCODER_START offsetof(I2C_slave_buffer_t, encoder_state)
-# define I2C_WPM_START offsetof(I2C_slave_buffer_t, current_wpm)
-# define I2C_MOUSE_X_START offsetof(I2C_slave_buffer_t, mouse_x)
-# define I2C_MOUSE_Y_START offsetof(I2C_slave_buffer_t, mouse_y)
-# define I2C_MOUSE_DPI_START offsetof(I2C_slave_buffer_t, device_cpi)
-# define I2C_OLED_ON_START offsetof(I2C_slave_buffer_t, oled_on)
-# define I2C_LAYER_STATE_START offsetof(I2C_slave_buffer_t, t_layer_state)
-# define I2C_DEFAULT_LAYER_STATE_START offsetof(I2C_slave_buffer_t, t_default_layer_state)
-# define I2C_LED_MATRIX_START offsetof(I2C_slave_buffer_t, led_matrix)
-# define I2C_LED_SUSPEND_START offsetof(I2C_slave_buffer_t, led_suspend_state)
-# define I2C_RGB_MATRIX_START offsetof(I2C_slave_buffer_t, rgb_matrix)
-# define I2C_RGB_SUSPEND_START offsetof(I2C_slave_buffer_t, rgb_suspend_state)
-
-# define TIMEOUT 100
-
-# ifndef SLAVE_I2C_ADDRESS
-# define SLAVE_I2C_ADDRESS 0x32
-# endif
-
-// Get rows from other half over i2c
-bool transport_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) {
- i2c_readReg(SLAVE_I2C_ADDRESS, I2C_KEYMAP_SLAVE_START, (void *)slave_matrix, sizeof(i2c_buffer->smatrix), TIMEOUT);
-# ifdef SPLIT_TRANSPORT_MIRROR
- i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_KEYMAP_MASTER_START, (void *)master_matrix, sizeof(i2c_buffer->mmatrix), TIMEOUT);
-# endif
- // write backlight info
-# ifdef BACKLIGHT_ENABLE
- uint8_t level = is_backlight_enabled() ? get_backlight_level() : 0;
- if (level != i2c_buffer->backlight_level) {
- if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_BACKLIGHT_START, (void *)&level, sizeof(level), TIMEOUT) >= 0) {
- i2c_buffer->backlight_level = level;
- }
- }
-# endif
-
-# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT)
- if (rgblight_get_change_flags()) {
- rgblight_syncinfo_t rgblight_sync;
- rgblight_get_syncinfo(&rgblight_sync);
- if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_RGB_START, (void *)&rgblight_sync, sizeof(rgblight_sync), TIMEOUT) >= 0) {
- rgblight_clear_change_flags();
- }
- }
-# endif
-
-# ifdef ENCODER_ENABLE
- i2c_readReg(SLAVE_I2C_ADDRESS, I2C_ENCODER_START, (void *)i2c_buffer->encoder_state, sizeof(i2c_buffer->encoder_state), TIMEOUT);
- encoder_update_raw(i2c_buffer->encoder_state);
-# endif
-
-# ifdef WPM_ENABLE
- uint8_t current_wpm = get_current_wpm();
- if (current_wpm != i2c_buffer->current_wpm) {
- if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_WPM_START, (void *)&current_wpm, sizeof(current_wpm), TIMEOUT) >= 0) {
- i2c_buffer->current_wpm = current_wpm;
- }
- }
-# endif
-
-# ifdef POINTING_DEVICE_ENABLE
- if (is_keyboard_left()) {
- report_mouse_t temp_report = pointing_device_get_report();
- i2c_readReg(SLAVE_I2C_ADDRESS, I2C_MOUSE_X_START, (void *)&i2c_buffer->mouse_x, sizeof(i2c_buffer->mouse_x), TIMEOUT);
- temp_report.x = i2c_buffer->mouse_x;
- i2c_readReg(SLAVE_I2C_ADDRESS, I2C_MOUSE_Y_START, (void *)&i2c_buffer->mouse_y, sizeof(i2c_buffer->mouse_y), TIMEOUT);
- temp_report.y = i2c_buffer->mouse_y;
- pointing_device_set_report(temp_report);
-
- if (device_cpi != i2c_buffer->device_cpi) {
- if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_MOUSE_DPI_START, (void *)&device_cpi, sizeof(device_cpi), TIMEOUT) >= 0) {
- i2c_buffer->device_cpi = device_cpi
- }
- }
- }
-# endif
-
-# ifdef SPLIT_MODS_ENABLE
- uint8_t real_mods = get_mods();
- if (real_mods != i2c_buffer->real_mods) {
- if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_REAL_MODS_START, (void *)&real_mods, sizeof(real_mods), TIMEOUT) >= 0) {
- i2c_buffer->real_mods = real_mods;
- }
- }
-
- uint8_t weak_mods = get_weak_mods();
- if (weak_mods != i2c_buffer->weak_mods) {
- if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_WEAK_MODS_START, (void *)&weak_mods, sizeof(weak_mods), TIMEOUT) >= 0) {
- i2c_buffer->weak_mods = weak_mods;
- }
- }
-
-# ifndef NO_ACTION_ONESHOT
- uint8_t oneshot_mods = get_oneshot_mods();
- if (oneshot_mods != i2c_buffer->oneshot_mods) {
- if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_ONESHOT_MODS_START, (void *)&oneshot_mods, sizeof(oneshot_mods), TIMEOUT) >= 0) {
- i2c_buffer->oneshot_mods = oneshot_mods;
- }
- }
-# endif
-# endif
-
- if (layer_state != i2c_buffer->t_layer_state) {
- if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_LAYER_STATE_START, (void *)&layer_state, sizeof(layer_state), TIMEOUT) >= 0) {
- i2c_buffer->t_layer_state = layer_state;
- }
- }
-
- if (default_layer_state != i2c_buffer->t_default_layer_state) {
- if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_DEFAULT_LAYER_STATE_START, (void *)&default_layer_state, sizeof(default_layer_state), TIMEOUT) >= 0) {
- i2c_buffer->t_default_layer_state = default_layer_state;
- }
- }
-
-# ifdef OLED_DRIVER_ENABLE
- bool is_oled_on = is_oled_on();
- if (is_oled_on != i2c_buffer->oled_on) {
- if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_LAYER_STATE_START, (void *)&is_oled_on, sizeof(is_oled_on), TIMEOUT) >= 0) {
- i2c_buffer->oled_on = is_oled_on;
- }
- }
-# endif
-
-# if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
- i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_LED_MATRIX_START, (void *)led_matrix_eeconfig, sizeof(i2c_buffer->led_matrix), TIMEOUT);
- bool suspend_state = led_matrix_get_suspend_state();
- i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_LED_SUSPEND_START, (void *)suspend_state, sizeof(i2c_buffer->led_suspend_state), TIMEOUT);
-# endif
-# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
- i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_RGB_MATRIX_START, (void *)rgb_matrix_config, sizeof(i2c_buffer->rgb_matrix), TIMEOUT);
- bool suspend_state = rgb_matrix_get_suspend_state();
- i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_RGB_SUSPEND_START, (void *)suspend_state, sizeof(i2c_buffer->rgb_suspend_state), TIMEOUT);
-# endif
-
-# ifndef DISABLE_SYNC_TIMER
- i2c_buffer->sync_timer = sync_timer_read32() + SYNC_TIMER_OFFSET;
- i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_SYNC_TIME_START, (void *)&i2c_buffer->sync_timer, sizeof(i2c_buffer->sync_timer), TIMEOUT);
-# endif
-
- return true;
-}
-
-void transport_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) {
-# ifndef DISABLE_SYNC_TIMER
- sync_timer_update(i2c_buffer->sync_timer);
-# endif
- // Copy matrix to I2C buffer
- memcpy((void *)i2c_buffer->smatrix, (void *)slave_matrix, sizeof(i2c_buffer->smatrix));
-# ifdef SPLIT_TRANSPORT_MIRROR
- memcpy((void *)master_matrix, (void *)i2c_buffer->mmatrix, sizeof(i2c_buffer->mmatrix));
-# endif
-
-// Read Backlight Info
-# ifdef BACKLIGHT_ENABLE
- backlight_set(i2c_buffer->backlight_level);
-# endif
-
-# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT)
- // Update the RGB with the new data
- if (i2c_buffer->rgblight_sync.status.change_flags != 0) {
- rgblight_update_sync(&i2c_buffer->rgblight_sync, false);
- i2c_buffer->rgblight_sync.status.change_flags = 0;
- }
-# endif
-
-# ifdef ENCODER_ENABLE
- encoder_state_raw(i2c_buffer->encoder_state);
-# endif
-
-# ifdef WPM_ENABLE
- set_current_wpm(i2c_buffer->current_wpm);
-# endif
-
-# ifdef POINTING_DEVICE_ENABLE
- if (!is_keyboard_left()) {
- static uint16_t cpi;
- if (cpi != i2c_buffer->device_cpi) {
- cpi = i2c_buffer->device_cpi;
- pmw_set_cpi(cpi);
- }
- i2c_buffer->mouse_x = split_mouse_x;
- i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_MOUSE_X_START, (void *)&i2c_buffer->mouse_x, sizeof(i2c_buffer->mouse_x), TIMEOUT);
- i2c_buffer->mouse_y = split_mouse_y;
- i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_MOUSE_Y_START, (void *)&i2c_buffer->mouse_y, sizeof(i2c_buffer->mouse_y), TIMEOUT);
- }
-
-# endif
-
-# ifdef SPLIT_MODS_ENABLE
- set_mods(i2c_buffer->real_mods);
- set_weak_mods(i2c_buffer->weak_mods);
-# ifndef NO_ACTION_ONESHOT
- set_oneshot_mods(i2c_buffer->oneshot_mods);
-# endif
-# endif
-
- if (layer_state != i2c_buffer->t_layer_state) {
- layer_state = i2c_buffer->t_layer_state;
- }
- if (default_layer_state != i2c_buffer->t_default_layer_state) {
- default_layer_state = i2c_buffer->t_default_layer_state;
- }
-
-# ifdef OLED_DRIVER_ENABLE
- if (i2c_buffer->oled_on) {
- oled_on();
- } else {
- oled_off();
- }
-# endif
-
-# if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
- memcpy((void *)i2c_buffer->led_matrix, (void *)led_matrix_eeconfig, sizeof(i2c_buffer->led_matrix));
- led_matrix_set_suspend_state(i2c_buffer->led_suspend_state);
-# endif
-# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
- memcpy((void *)i2c_buffer->rgb_matrix, (void *)rgb_matrix_config, sizeof(i2c_buffer->rgb_matrix));
- rgb_matrix_set_suspend_state(i2c_buffer->rgb_suspend_state);
-# endif
-}
-
-void transport_master_init(void) { i2c_init(); }
-
-void transport_slave_init(void) { i2c_slave_init(SLAVE_I2C_ADDRESS); }
-
-#else // USE_SERIAL
-
-# include "serial.h"
-
-typedef struct _Serial_s2m_buffer_t {
- // TODO: if MATRIX_COLS > 8 change to uint8_t packed_matrix[] for pack/unpack
- matrix_row_t smatrix[ROWS_PER_HAND];
-# ifdef ENCODER_ENABLE
- uint8_t encoder_state[NUMBER_OF_ENCODERS];
-# endif
- int8_t mouse_x;
- int8_t mouse_y;
-} __attribute__((packed)) Serial_s2m_buffer_t;
-
-typedef struct _Serial_m2s_buffer_t {
-# ifdef SPLIT_MODS_ENABLE
- uint8_t real_mods;
- uint8_t weak_mods;
-# ifndef NO_ACTION_ONESHOT
- uint8_t oneshot_mods;
-# endif
-# endif
-# ifndef DISABLE_SYNC_TIMER
- uint32_t sync_timer;
-# endif
-# ifdef SPLIT_TRANSPORT_MIRROR
- matrix_row_t mmatrix[ROWS_PER_HAND];
-# endif
-# ifdef BACKLIGHT_ENABLE
- uint8_t backlight_level;
-# endif
-# ifdef WPM_ENABLE
- uint8_t current_wpm;
-# endif
- uint16_t device_cpi;
- bool oled_on;
- layer_state_t t_layer_state;
- layer_state_t t_default_layer_state;
-# if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
- led_eeconfig_t led_matrix;
- bool led_suspend_state;
-# endif
-# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
- rgb_config_t rgb_matrix;
- bool rgb_suspend_state;
-# endif
-} __attribute__((packed)) Serial_m2s_buffer_t;
-
-# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT)
-// When MCUs on both sides drive their respective RGB LED chains,
-// it is necessary to synchronize, so it is necessary to communicate RGB
-// information. In that case, define RGBLIGHT_SPLIT with info on the number
-// of LEDs on each half.
-//
-// Otherwise, if the master side MCU drives both sides RGB LED chains,
-// there is no need to communicate.
-
-typedef struct _Serial_rgblight_t {
- rgblight_syncinfo_t rgblight_sync;
-} Serial_rgblight_t;
-
-volatile Serial_rgblight_t serial_rgblight = {};
-uint8_t volatile status_rgblight = 0;
-# endif
-
-volatile Serial_s2m_buffer_t serial_s2m_buffer = {};
-volatile Serial_m2s_buffer_t serial_m2s_buffer = {};
-uint8_t volatile status0 = 0;
-
-enum serial_transaction_id {
- GET_SLAVE_MATRIX = 0,
-# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT)
- PUT_RGBLIGHT,
-# endif
-};
-
-SSTD_t transactions[] = {
- [GET_SLAVE_MATRIX] =
- {
- (uint8_t *)&status0,
- sizeof(serial_m2s_buffer),
- (uint8_t *)&serial_m2s_buffer,
- sizeof(serial_s2m_buffer),
- (uint8_t *)&serial_s2m_buffer,
- },
-# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT)
- [PUT_RGBLIGHT] =
- {
- (uint8_t *)&status_rgblight, sizeof(serial_rgblight), (uint8_t *)&serial_rgblight, 0, NULL // no slave to master transfer
- },
-# endif
-};
-
-void transport_master_init(void) { soft_serial_initiator_init(transactions, TID_LIMIT(transactions)); }
-
-void transport_slave_init(void) { soft_serial_target_init(transactions, TID_LIMIT(transactions)); }
-
-# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT)
-
-// rgblight synchronization information communication.
-
-void transport_rgblight_master(void) {
- if (rgblight_get_change_flags()) {
- rgblight_get_syncinfo((rgblight_syncinfo_t *)&serial_rgblight.rgblight_sync);
- if (soft_serial_transaction(PUT_RGBLIGHT) == TRANSACTION_END) {
- rgblight_clear_change_flags();
- }
- }
-}
-
-void transport_rgblight_slave(void) {
- if (status_rgblight == TRANSACTION_ACCEPTED) {
- rgblight_update_sync((rgblight_syncinfo_t *)&serial_rgblight.rgblight_sync, false);
- status_rgblight = TRANSACTION_END;
- }
-}
-
-# else
-# define transport_rgblight_master()
-# define transport_rgblight_slave()
-# endif
-
-bool transport_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) {
-# ifndef SERIAL_USE_MULTI_TRANSACTION
- if (soft_serial_transaction() != TRANSACTION_END) {
- return false;
- }
-# else
- transport_rgblight_master();
- if (soft_serial_transaction(GET_SLAVE_MATRIX) != TRANSACTION_END) {
- return false;
- }
-# endif
-
- // TODO: if MATRIX_COLS > 8 change to unpack()
- for (int i = 0; i < ROWS_PER_HAND; ++i) {
- slave_matrix[i] = serial_s2m_buffer.smatrix[i];
-# ifdef SPLIT_TRANSPORT_MIRROR
- serial_m2s_buffer.mmatrix[i] = master_matrix[i];
-# endif
- }
-
-# ifdef BACKLIGHT_ENABLE
- // Write backlight level for slave to read
- serial_m2s_buffer.backlight_level = is_backlight_enabled() ? get_backlight_level() : 0;
-# endif
-
-# ifdef ENCODER_ENABLE
- encoder_update_raw((uint8_t *)serial_s2m_buffer.encoder_state);
-# endif
-
-# ifdef WPM_ENABLE
- // Write wpm to slave
- serial_m2s_buffer.current_wpm = get_current_wpm();
-# endif
-
-# ifdef SPLIT_MODS_ENABLE
- serial_m2s_buffer.real_mods = get_mods();
- serial_m2s_buffer.weak_mods = get_weak_mods();
-# ifndef NO_ACTION_ONESHOT
- serial_m2s_buffer.oneshot_mods = get_oneshot_mods();
-# endif
-# endif
-
-# ifdef POINTING_DEVICE_ENABLE
- if (is_keyboard_left()) {
- report_mouse_t temp_report = pointing_device_get_report();
- temp_report.x = serial_s2m_buffer.mouse_x;
- temp_report.y = serial_s2m_buffer.mouse_y;
- pointing_device_set_report(temp_report);
- serial_m2s_buffer.device_cpi = device_cpi;
- }
-# endif
-
- serial_m2s_buffer.t_layer_state = layer_state;
- serial_m2s_buffer.t_default_layer_state = default_layer_state;
-# ifdef OLED_DRIVER_ENABLE
- serial_m2s_buffer.oled_on = is_oled_on();
-# endif
-
-# if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
- serial_m2s_buffer.led_matrix = led_matrix_eeconfig;
- serial_m2s_buffer.led_suspend_state = led_matrix_get_suspend_state();
-# endif
-# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
- serial_m2s_buffer.rgb_matrix = rgb_matrix_config;
- serial_m2s_buffer.rgb_suspend_state = rgb_matrix_get_suspend_state();
-# endif
-
-# ifndef DISABLE_SYNC_TIMER
- serial_m2s_buffer.sync_timer = sync_timer_read32() + SYNC_TIMER_OFFSET;
-# endif
- return true;
-}
-
-void transport_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) {
- transport_rgblight_slave();
-# ifndef DISABLE_SYNC_TIMER
- sync_timer_update(serial_m2s_buffer.sync_timer);
-# endif
-
- // TODO: if MATRIX_COLS > 8 change to pack()
- for (int i = 0; i < ROWS_PER_HAND; ++i) {
- serial_s2m_buffer.smatrix[i] = slave_matrix[i];
-# ifdef SPLIT_TRANSPORT_MIRROR
- master_matrix[i] = serial_m2s_buffer.mmatrix[i];
-# endif
- }
-
-# ifdef BACKLIGHT_ENABLE
- backlight_set(serial_m2s_buffer.backlight_level);
-# endif
-
-# ifdef ENCODER_ENABLE
- encoder_state_raw((uint8_t *)serial_s2m_buffer.encoder_state);
-# endif
-
-# ifdef WPM_ENABLE
- set_current_wpm(serial_m2s_buffer.current_wpm);
-# endif
-
-# ifdef SPLIT_MODS_ENABLE
- set_mods(serial_m2s_buffer.real_mods);
- set_weak_mods(serial_m2s_buffer.weak_mods);
-# ifndef NO_ACTION_ONESHOT
- set_oneshot_mods(serial_m2s_buffer.oneshot_mods);
-# endif
-# endif
-
-# ifdef POINTING_DEVICE_ENABLE
- if (!is_keyboard_left()) {
- static uint16_t cpi;
- if (cpi != serial_m2s_buffer.device_cpi) {
- cpi = serial_m2s_buffer.device_cpi;
- pmw_set_cpi(cpi);
- }
- serial_s2m_buffer.mouse_x = split_mouse_x;
- serial_s2m_buffer.mouse_y = split_mouse_y;
- }
-# endif
-
- if (layer_state != serial_m2s_buffer.t_layer_state) {
- layer_state = serial_m2s_buffer.t_layer_state;
- }
- if (default_layer_state != serial_m2s_buffer.t_default_layer_state) {
- default_layer_state = serial_m2s_buffer.t_default_layer_state;
- }
-# ifdef OLED_DRIVER_ENABLE
- if (serial_m2s_buffer.oled_on) {
- oled_on();
- } else {
- oled_off();
- }
-# endif
-
-# if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
- led_matrix_eeconfig = serial_m2s_buffer.led_matrix;
- led_matrix_set_suspend_state(serial_m2s_buffer.led_suspend_state);
-# endif
-# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
- rgb_matrix_config = serial_m2s_buffer.rgb_matrix;
- rgb_matrix_set_suspend_state(serial_m2s_buffer.rgb_suspend_state);
-# endif
-}
-
-#endif
diff --git a/users/drashna/oled_stuff.c b/users/drashna/oled_stuff.c
index 98e467d930..253c5181ee 100644
--- a/users/drashna/oled_stuff.c
+++ b/users/drashna/oled_stuff.c
@@ -25,7 +25,7 @@
#endif
uint32_t oled_timer = 0;
-static char keylog_str[KEYLOGGER_LENGTH + 1] = {"\n"};
+static char keylog_str[KEYLOGGER_LENGTH + 1] = { 0 };
static uint16_t log_timer = 0;
// clang-format off
@@ -57,12 +57,12 @@ void add_keylog(uint16_t keycode) {
keycode = 0;
}
- for (uint8_t i = (KEYLOGGER_LENGTH - 1); i > 0; --i) {
- keylog_str[i] = keylog_str[i - 1];
+ for (uint8_t i = 1; i < KEYLOGGER_LENGTH; i++) {
+ keylog_str[i-1] = keylog_str[i];
}
if (keycode < (sizeof(code_to_name) / sizeof(char))) {
- keylog_str[0] = pgm_read_byte(&code_to_name[keycode]);
+ keylog_str[(KEYLOGGER_LENGTH - 1)] = pgm_read_byte(&code_to_name[keycode]);
}
log_timer = timer_read();
@@ -92,30 +92,14 @@ void render_keylogger_status(void) {
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;
+ 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);
@@ -159,12 +143,12 @@ void render_keylock_status(uint8_t led_usb_state) {
}
void render_matrix_scan_rate(void) {
#ifdef DEBUG_MATRIX_SCAN_RATE
- char matrix_rate[5];
- uint16_t n = get_matrix_scan_rate();
+ char matrix_rate[5];
+ uint16_t n = get_matrix_scan_rate();
matrix_rate[4] = '\0';
matrix_rate[3] = '0' + n % 10;
- matrix_rate[2] = ( n /= 10) % 10 ? '0' + (n) % 10 : (n / 10) % 10 ? '0' : ' ';
- matrix_rate[1] = n / 10 ? '0' + n / 10 : ' ';
+ matrix_rate[2] = (n /= 10) % 10 ? '0' + (n) % 10 : (n / 10) % 10 ? '0' : ' ';
+ matrix_rate[1] = n / 10 ? '0' + n / 10 : ' ';
matrix_rate[0] = ' ';
oled_write_P(PSTR("MS:"), false);
oled_write(matrix_rate, false);
@@ -284,6 +268,10 @@ void render_user_status(void) {
oled_write_P(rgb_layer_status[userspace_config.rgb_layer_change], false);
static const char PROGMEM nukem_good[2][3] = {{0xF8, 0xF9, 0}, {0xF6, 0xF7, 0}};
oled_write_P(nukem_good[0], userspace_config.nuke_switch);
+#if defined(UNICODE_ENABLE)
+ static const char PROGMEM uc_mod_status[5][3] = {{0xEA, 0xEB, 0}, {0xEC, 0xED, 0}};
+ oled_write_P(uc_mod_status[get_unicode_input_mode() == UC_MAC], false);
+#endif
#if defined(OLED_DISPLAY_128X64)
oled_advance_page(true);
#endif
@@ -306,34 +294,34 @@ void render_wpm(void) {
char wpm_counter[4];
wpm_counter[3] = '\0';
wpm_counter[2] = '0' + n % 10;
- wpm_counter[1] = ( n /= 10) % 10 ? '0' + (n) % 10 : (n / 10) % 10 ? '0' : ' ';
+ wpm_counter[1] = (n /= 10) % 10 ? '0' + (n) % 10 : (n / 10) % 10 ? '0' : ' ';
wpm_counter[0] = n / 10 ? '0' + n / 10 : ' ';
# else
char wpm_counter[6];
wpm_counter[5] = '\0';
wpm_counter[4] = '0' + n % 10;
- wpm_counter[3] = ( n /= 10) % 10 ? '0' + (n) % 10 : (n / 10) % 10 ? '0' : ' ';
+ wpm_counter[3] = (n /= 10) % 10 ? '0' + (n) % 10 : (n / 10) % 10 ? '0' : ' ';
wpm_counter[2] = n / 10 ? '0' + n / 10 : ' ';
wpm_counter[1] = ' ';
wpm_counter[0] = ' ';
- # endif
+# endif
oled_write_P(PSTR(OLED_RENDER_WPM_COUNTER), false);
oled_write(wpm_counter, false);
#endif
}
-#ifdef KEYBOARD_handwired_dactyl_manuform_5x6_right_trackball
+#if defined(KEYBOARD_handwired_tractyl_manuform_5x6_right)
extern keyboard_config_t keyboard_config;
extern uint16_t dpi_array[];
void render_pointing_dpi_status(void) {
- char dpi_status[6];
- uint16_t n = dpi_array[keyboard_config.dpi_config];
+ char dpi_status[6];
+ uint16_t n = dpi_array[keyboard_config.dpi_config];
dpi_status[5] = '\0';
dpi_status[4] = '0' + n % 10;
- dpi_status[3] = ( n /= 10) % 10 ? '0' + (n) % 10 : (n / 10) % 10 ? '0' : ' ';
- dpi_status[2] = ( n /= 10) % 10 ? '0' + (n) % 10 : (n / 10) % 10 ? '0' : ' ';
- dpi_status[1] = n / 10 ? '0' + n / 10 : ' ';
+ dpi_status[3] = (n /= 10) % 10 ? '0' + (n) % 10 : (n / 10) % 10 ? '0' : ' ';
+ dpi_status[2] = (n /= 10) % 10 ? '0' + (n) % 10 : (n / 10) % 10 ? '0' : ' ';
+ dpi_status[1] = n / 10 ? '0' + n / 10 : ' ';
dpi_status[0] = ' ';
oled_write_P(PSTR(" DPI: "), false);
oled_write(dpi_status, false);
@@ -360,7 +348,7 @@ void render_status_main(void) {
# else
render_wpm();
# endif
-# ifdef KEYBOARD_handwired_dactyl_manuform_5x6_right_trackball
+# if defined(KEYBOARD_handwired_tractyl_manuform_5x6_right)
render_pointing_dpi_status();
# endif
oled_write_P(PSTR("\n"), false);
@@ -375,6 +363,15 @@ void render_status_main(void) {
render_keylogger_status();
}
+__attribute__((weak)) oled_rotation_t oled_init_keymap(oled_rotation_t rotation) { return rotation; }
+
+oled_rotation_t oled_init_user(oled_rotation_t rotation) {
+ for (uint8_t i = 0; i < (KEYLOGGER_LENGTH - 1); i++) {
+ add_keylog(0);
+ }
+ return oled_init_keymap(rotation);
+}
+
void oled_task_user(void) {
update_log();
@@ -385,7 +382,7 @@ void oled_task_user(void) {
} else {
oled_on();
}
- render_status_main(); // Renders the current keyboard state (layer, lock, caps, scroll, etc)
+ 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
index 1f4440bd42..ad9cf09ed2 100644
--- a/users/drashna/oled_stuff.h
+++ b/users/drashna/oled_stuff.h
@@ -19,97 +19,98 @@
#include "quantum.h"
#include "oled_driver.h"
-void oled_driver_render_logo(void);
-bool process_record_user_oled(uint16_t keycode, keyrecord_t *record);
+void oled_driver_render_logo(void);
+bool process_record_user_oled(uint16_t keycode, keyrecord_t *record);
+oled_rotation_t oled_init_keymap(oled_rotation_t rotation);
extern uint32_t oled_timer;
#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:"
-# 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_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:"
+# 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_ONESHOT "1SHT"
-# define OLED_RENDER_BOOTMAGIC_SWAP "SWAP"
-# define OLED_RENDER_BOOTMAGIC_CAPS "CAPS"
+# define OLED_RENDER_BOOTMAGIC_SWAP "SWAP"
+# 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"
+# define OLED_RENDER_USER_NAME "USER:"
+# define OLED_RENDER_USER_ANIM "Anim"
+# define OLED_RENDER_USER_LAYR "Layr"
+# define OLED_RENDER_USER_NUKE "Nuke"
-# define OLED_RENDER_WPM_COUNTER "WPM: "
+# define OLED_RENDER_WPM_COUNTER "WPM: "
#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 "NumL"
-# define OLED_RENDER_LOCK_CAPS "CapL"
-# define OLED_RENDER_LOCK_SCLK "ScrL"
-
-# define OLED_RENDER_MODS_NAME "Mods: "
-# define OLED_RENDER_MODS_SFT "Shft"
-# define OLED_RENDER_MODS_CTL "Ctrl"
-# define OLED_RENDER_MODS_ALT "Alt\n"
-# define OLED_RENDER_MODS_GUI "GUI\n"
-
-# 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_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 "NumL"
+# define OLED_RENDER_LOCK_CAPS "CapL"
+# define OLED_RENDER_LOCK_SCLK "ScrL"
+
+# define OLED_RENDER_MODS_NAME "Mods: "
+# define OLED_RENDER_MODS_SFT "Shft"
+# define OLED_RENDER_MODS_CTL "Ctrl"
+# define OLED_RENDER_MODS_ALT "Alt\n"
+# define OLED_RENDER_MODS_GUI "GUI\n"
+
+# 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_ONESHOT "1SHT"
-# define OLED_RENDER_BOOTMAGIC_SWAP "SWAP"
-# define OLED_RENDER_BOOTMAGIC_CAPS "CAPS"
+# define OLED_RENDER_BOOTMAGIC_SWAP "SWAP"
+# 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"
+# define OLED_RENDER_USER_NAME "USER:"
+# define OLED_RENDER_USER_ANIM "Anim"
+# define OLED_RENDER_USER_LAYR "Layr"
+# define OLED_RENDER_USER_NUKE "Nuke"
-# define OLED_RENDER_WPM_COUNTER "WPM: "
+# define OLED_RENDER_WPM_COUNTER "WPM: "
#endif
diff --git a/users/drashna/pimoroni_trackball.c b/users/drashna/pimoroni_trackball.c
deleted file mode 100644
index a6ca6c9966..0000000000
--- a/users/drashna/pimoroni_trackball.c
+++ /dev/null
@@ -1,151 +0,0 @@
-/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
- *
- * 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 <http://www.gnu.org/licenses/>.
- */
-
-#include "pimoroni_trackball.h"
-#include "i2c_master.h"
-
-static uint8_t scrolling = 0;
-static int16_t x_offset = 0;
-static int16_t y_offset = 0;
-static int16_t h_offset = 0;
-static int16_t v_offset = 0;
-static float precisionSpeed = 1;
-
-#ifndef I2C_TIMEOUT
-# define I2C_TIMEOUT 100
-#endif
-#ifndef MOUSE_DEBOUNCE
-# define MOUSE_DEBOUNCE 5
-#endif
-
-void trackball_set_rgbw(uint8_t red, uint8_t green, uint8_t blue, uint8_t white) {
- uint8_t data[] = {0x00, red, green, blue, white};
- i2c_transmit(TRACKBALL_ADDRESS << 1, data, sizeof(data), I2C_TIMEOUT);
-}
-
-int16_t mouse_offset(uint8_t positive, uint8_t negative, int16_t scale) {
- int16_t offset = (int16_t)positive - (int16_t)negative;
- int16_t magnitude = (int16_t)(scale * offset * offset * precisionSpeed);
- return offset < 0 ? -magnitude : magnitude;
-}
-
-void update_member(int8_t* member, int16_t* offset) {
- if (*offset > 127) {
- *member = 127;
- *offset -= 127;
- } else if (*offset < -127) {
- *member = -127;
- *offset += 127;
- } else {
- *member = *offset;
- *offset = 0;
- }
-}
-
-__attribute__((weak)) void trackball_check_click(bool pressed, report_mouse_t* mouse) {
- if (pressed) {
- mouse->buttons |= MOUSE_BTN1;
- } else {
- mouse->buttons &= ~MOUSE_BTN1;
- }
-}
-
-void trackball_register_button(bool pressed, enum mouse_buttons button) {
- report_mouse_t currentReport = pointing_device_get_report();
- if (pressed) {
- currentReport.buttons |= button;
- } else {
- currentReport.buttons &= ~button;
- }
- pointing_device_set_report(currentReport);
-}
-
-float trackball_get_precision(void) { return precisionSpeed; }
-void trackball_set_precision(float precision) { precisionSpeed = precision; }
-bool trackball_is_scrolling(void) { return scrolling; }
-void trackball_set_scrolling(bool scroll) { scrolling = scroll; }
-
-bool has_report_changed (report_mouse_t first, report_mouse_t second) {
- return !(
- (!first.buttons && first.buttons == second.buttons) &&
- (!first.x && first.x == second.x) &&
- (!first.y && first.y == second.y) &&
- (!first.h && first.h == second.h) &&
- (!first.v && first.v == second.v) );
-}
-
-
-__attribute__((weak)) void pointing_device_init(void) { trackball_set_rgbw(0x00, 0x00, 0x00, 0x4F); }
-
-void pointing_device_task(void) {
- static bool debounce;
- static uint16_t debounce_timer;
- uint8_t state[5] = {};
- if (i2c_readReg(TRACKBALL_ADDRESS << 1, 0x04, state, 5, I2C_TIMEOUT) == I2C_STATUS_SUCCESS) {
- if (!state[4] && !debounce) {
- if (scrolling) {
-#ifdef PIMORONI_TRACKBALL_INVERT_X
- h_offset += mouse_offset(state[2], state[3], 1);
-#else
- h_offset -= mouse_offset(state[2], state[3], 1);
-#endif
-#ifdef PIMORONI_TRACKBALL_INVERT_Y
- v_offset += mouse_offset(state[1], state[0], 1);
-#else
- v_offset -= mouse_offset(state[1], state[0], 1);
-#endif
- } else {
-#ifdef PIMORONI_TRACKBALL_INVERT_X
- x_offset -= mouse_offset(state[2], state[3], 5);
-#else
- x_offset += mouse_offset(state[2], state[3], 5);
-#endif
-#ifdef PIMORONI_TRACKBALL_INVERT_Y
- y_offset -= mouse_offset(state[1], state[0], 5);
-#else
- y_offset += mouse_offset(state[1], state[0], 5);
-#endif
- }
- } else {
- if (state[4]) {
- debounce = true;
- debounce_timer = timer_read();
- }
- }
- }
-
- if (timer_elapsed(debounce_timer) > MOUSE_DEBOUNCE) debounce = false;
-
- report_mouse_t mouse = pointing_device_get_report();
-
- trackball_check_click(state[4] & (1 << 7), &mouse);
-
-#ifndef PIMORONI_TRACKBALL_ROTATE
- update_member(&mouse.x, &x_offset);
- update_member(&mouse.y, &y_offset);
- update_member(&mouse.h, &h_offset);
- update_member(&mouse.v, &v_offset);
-#else
- update_member(&mouse.x, &y_offset);
- update_member(&mouse.y, &x_offset);
- update_member(&mouse.h, &v_offset);
- update_member(&mouse.v, &h_offset);
-#endif
- pointing_device_set_report(mouse);
- if (has_report_changed(mouse, pointing_device_get_report())) {
- pointing_device_send();
- }
-}
diff --git a/users/drashna/process_records.c b/users/drashna/process_records.c
index ef901226e0..124354a5bc 100644
--- a/users/drashna/process_records.c
+++ b/users/drashna/process_records.c
@@ -29,10 +29,10 @@ 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
uprintf("KL: kc: 0x%04X, col: %2u, row: %2u, pressed: %b, time: %5u, int: %b, count: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed, record->event.time, record->tap.interrupted, record->tap.count);
-#endif // KEYLOGGER_ENABLE
+#endif // KEYLOGGER_ENABLE
#ifdef OLED_DRIVER_ENABLE
process_record_user_oled(keycode, record);
-#endif // OLED
+#endif // OLED
if (!(process_record_keymap(keycode, record) && process_record_secrets(keycode, record)
#ifdef RGB_MATRIX_ENABLE
@@ -59,7 +59,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
break;
- case KC_MAKE: // Compiles the firmware, and adds the flash command based on keyboard bootloader
+ 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());
@@ -90,56 +90,44 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
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);
- }
+ 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;
- }
+ for (uint8_t index = 0; index < 4; index++) { diablo_timer[index].key_interval = 0; }
}
-#endif // TAP_DANCE_ENABLE
+#endif // TAP_DANCE_ENABLE
break;
- case KC_CCCV: // One key copy/paste
+ 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
+ if (timer_elapsed(copy_paste_timer) > TAPPING_TERM) { // Hold, copy
tap_code16(LCTL(KC_C));
- } else { // Tap, paste
+ } else { // Tap, paste
tap_code16(LCTL(KC_V));
}
}
break;
#ifdef UNICODE_ENABLE
- case UC_FLIP: // (ノಠ痊ಠ)ノ彡┻â”â”»
- if (record->event.pressed) {
- send_unicode_string("(ノಠ痊ಠ)ノ彡┻â”â”»");
- }
+ case UC_FLIP: // (ノಠ痊ಠ)ノ彡┻â”â”»
+ if (record->event.pressed) { send_unicode_string("(ノಠ痊ಠ)ノ彡┻â”â”»"); }
break;
- case UC_TABL: // ┬─┬ノ( º _ ºノ)
- if (record->event.pressed) {
- send_unicode_string("┬─┬ノ( º _ ºノ)");
- }
+ case UC_TABL: // ┬─┬ノ( º _ ºノ)
+ if (record->event.pressed) { send_unicode_string("┬─┬ノ( º _ ºノ)"); }
break;
- case UC_SHRG: // ¯\_(ツ)_/¯
- if (record->event.pressed) {
- send_unicode_string("¯\\_(ツ)_/¯");
- }
+ case UC_SHRG: // ¯\_(ツ)_/¯
+ if (record->event.pressed) { send_unicode_string("¯\\_(ツ)_/¯"); }
break;
- case UC_DISA: // ಠ_ಠ
- if (record->event.pressed) {
- send_unicode_string("ಠ_ಠ");
- }
+ case UC_DISA: // ಠ_ಠ
+ if (record->event.pressed) { send_unicode_string("ಠ_ಠ"); }
break;
#endif
- case KC_RGB_T: // This allows me to use underglow as layer indication, or as normal
+ 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;
@@ -149,14 +137,14 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
# 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)
+ 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
+#endif // RGBLIGHT_ENABLE
break;
#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE)
@@ -176,7 +164,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
return false;
break;
- case RGB_MODE_FORWARD ... RGB_MODE_GRADIENT: // quantum_keycodes.h L400 for definitions
+ 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)
@@ -194,9 +182,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
is_eeprom_updated = true;
}
# endif
- if (is_eeprom_updated) {
- eeconfig_update_user(userspace_config.raw);
- }
+ if (is_eeprom_updated) { eeconfig_update_user(userspace_config.raw); }
}
#endif
}
diff --git a/users/drashna/process_records.h b/users/drashna/process_records.h
index f60e6d7ebc..f65cfc03c1 100644
--- a/users/drashna/process_records.h
+++ b/users/drashna/process_records.h
@@ -17,58 +17,58 @@
#pragma once
#include "drashna.h"
-#if defined(KEYBOARD_handwired_dactyl_manuform_5x6_right_trackball)
+#if defined(KEYBOARD_handwired_tractyl_manuform_5x6_right)
# 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_DIABLO_CLEAR, // Clears all Diablo Timers
- 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
- KC_NUKE, // NUCLEAR LAUNCH DETECTED!!!
- UC_FLIP, // (ಠ痊ಠ)â”»â”â”»
- UC_TABL, // ┬─┬ノ( º _ ºノ)
- UC_SHRG, // ¯\_(ツ)_/¯
- UC_DISA, // ಠ_ಠ
- NEW_SAFE_RANGE // use "NEWPLACEHOLDER for keymap specific codes
+ 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_DIABLO_CLEAR, // Clears all Diablo Timers
+ 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
+ KC_NUKE, // NUCLEAR LAUNCH DETECTED!!!
+ UC_FLIP, // (ಠ痊ಠ)â”»â”â”»
+ UC_TABL, // ┬─┬ノ( º _ ºノ)
+ UC_SHRG, // ¯\_(ツ)_/¯
+ UC_DISA, // ಠ_ಠ
+ 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 OS_TOGG
-#define TG_GAME TG(_GAMEPAD)
-#define TG_DBLO TG(_DIABLO)
-#define OS_LWR OSL(_LOWER)
-#define OS_RSE OSL(_RAISE)
+#define LOWER MO(_LOWER)
+#define RAISE MO(_RAISE)
+#define ADJUST MO(_ADJUST)
+#define TG_MODS OS_TOGG
+#define TG_GAME TG(_GAMEPAD)
+#define TG_DBLO TG(_DIABLO)
+#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 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 QWERTY KC_QWERTY
+#define DVORAK KC_DVORAK
+#define COLEMAK KC_COLEMAK
+#define WORKMAN KC_WORKMAN
#define KC_RESET RESET
#define KC_RST KC_RESET
@@ -77,9 +77,9 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record);
# define KC_C1R3 SH_T(KC_TAB)
#elif defined(DRASHNA_LP)
# define KC_C1R3 TG(_GAMEPAD)
-#else // SWAP_HANDS_ENABLE
+#else // SWAP_HANDS_ENABLE
# define KC_C1R3 KC_TAB
-#endif // SWAP_HANDS_ENABLE
+#endif // SWAP_HANDS_ENABLE
#define BK_LWER LT(_LOWER, KC_BSPC)
#define SP_LWER LT(_LOWER, KC_SPC)
diff --git a/users/drashna/rgb_matrix_stuff.c b/users/drashna/rgb_matrix_stuff.c
index 9e9e1e4279..9fbe6214bf 100644
--- a/users/drashna/rgb_matrix_stuff.c
+++ b/users/drashna/rgb_matrix_stuff.c
@@ -28,33 +28,27 @@ static uint32_t hypno_timer;
void rgb_matrix_layer_helper(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode, uint8_t speed, uint8_t led_type, uint8_t led_min, uint8_t led_max) {
HSV hsv = {hue, sat, val};
- if (hsv.v > rgb_matrix_get_val()) {
- hsv.v = rgb_matrix_get_val();
- }
+ if (hsv.v > rgb_matrix_get_val()) { hsv.v = rgb_matrix_get_val(); }
switch (mode) {
- case 1: // breathing
- {
- uint16_t time = scale16by8(g_rgb_timer, 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_INDICATOR_SET_COLOR(i, rgb.r, rgb.g, rgb.b);
+ case 1: // breathing
+ {
+ uint16_t time = scale16by8(g_rgb_timer, 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_INDICATOR_SET_COLOR(i, rgb.r, rgb.g, rgb.b); }
}
+ break;
}
- 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_INDICATOR_SET_COLOR(i, rgb.r, rgb.g, rgb.b);
+ 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_INDICATOR_SET_COLOR(i, rgb.r, rgb.g, rgb.b); }
}
+ break;
}
- break;
- }
}
}
@@ -62,38 +56,30 @@ __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 && sync_timer_elapsed32(hypno_timer) > 15000) {
- rgb_matrix_mode_noeeprom(RGB_MATRIX_REST_MODE);
- }
+ if (userspace_config.rgb_matrix_idle_anim && rgb_matrix_get_mode() == RGB_MATRIX_TYPING_HEATMAP && sync_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);
- }
+ 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 = sync_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);
- }
+ 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
+ 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);
- }
+ if (userspace_config.rgb_matrix_idle_anim) { rgb_matrix_mode_noeeprom(RGB_MATRIX_TYPING_HEATMAP); }
}
#endif
break;
diff --git a/users/drashna/rgb_stuff.c b/users/drashna/rgb_stuff.c
index 6723ad4bf5..1665638cf1 100644
--- a/users/drashna/rgb_stuff.c
+++ b/users/drashna/rgb_stuff.c
@@ -28,7 +28,7 @@ void rgblight_sethsv_default_helper(uint8_t index) { rgblight_sethsv_at(rgblight
static rgblight_fadeout lights[RGBLED_NUM];
/* Handler for fading/twinkling effect */
-void scan_rgblight_fadeout(void) { // Don't effing change this function .... rgblight_sethsv is supppppper intensive
+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) {
@@ -38,21 +38,15 @@ void scan_rgblight_fadeout(void) { // Don't effing change this function .... rg
if (light->life) {
light->life -= 1;
- if (get_highest_layer(layer_state) == 0) {
- sethsv(light->hue + rand() % 0xF, 255, light->life, (LED_TYPE *)&led[light_index]);
- }
+ if (get_highest_layer(layer_state) == 0) { sethsv(light->hue + rand() % 0xF, 255, light->life, (LED_TYPE *)&led[light_index]); }
light->timer = sync_timer_read();
} else {
- if (light->enabled && get_highest_layer(layer_state) == 0) {
- rgblight_sethsv_default_helper(light_index);
- }
+ if (light->enabled && get_highest_layer(layer_state) == 0) { rgblight_sethsv_default_helper(light_index); }
litup = light->enabled = false;
}
}
}
- if (litup && get_highest_layer(layer_state) == 0) {
- rgblight_set();
- }
+ if (litup && get_highest_layer(layer_state) == 0) { rgblight_set(); }
}
/* Triggers a LED to fade/twinkle.
@@ -98,9 +92,7 @@ void start_rgb_light(void) {
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 ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX)) { temp_keycode &= 0xFF; }
switch (temp_keycode) {
# ifdef RGBLIGHT_TWINKLE
@@ -110,11 +102,9 @@ bool process_record_user_rgb_light(uint16_t keycode, keyrecord_t *record) {
case KC_KP_SLASH ... KC_KP_DOT:
case KC_F13 ... KC_F24:
case KC_AUDIO_MUTE ... KC_MEDIA_REWIND:
- if (record->event.pressed) {
- start_rgb_light();
- }
+ if (record->event.pressed) { start_rgb_light(); }
break;
-# endif // RGBLIGHT_TWINKLE
+# endif // RGBLIGHT_TWINKLE
}
return true;
}
@@ -129,9 +119,7 @@ static uint16_t rgblight_startup_loop_timer;
void keyboard_post_init_rgb_light(void) {
# if defined(RGBLIGHT_STARTUP_ANIMATION)
is_enabled = rgblight_is_enabled();
- if (userspace_config.rgb_layer_change) {
- rgblight_enable_noeeprom();
- }
+ if (userspace_config.rgb_layer_change) { rgblight_enable_noeeprom(); }
if (rgblight_is_enabled()) {
layer_state_set_rgb_light(layer_state);
old_hue = rgblight_get_hue();
@@ -145,7 +133,7 @@ void keyboard_post_init_rgb_light(void) {
void matrix_scan_rgb_light(void) {
# ifdef RGBLIGHT_TWINKLE
scan_rgblight_fadeout();
-# endif // RGBLIGHT_ENABLE
+# endif // RGBLIGHT_ENABLE
# if defined(RGBLIGHT_STARTUP_ANIMATION)
if (is_rgblight_startup && is_keyboard_master()) {
@@ -156,12 +144,8 @@ void matrix_scan_rgb_light(void) {
rgblight_startup_loop_timer = sync_timer_read();
if (counter == 255) {
is_rgblight_startup = false;
- if (!is_enabled) {
- rgblight_disable_noeeprom();
- }
- if (userspace_config.rgb_layer_change) {
- layer_state_set_rgb_light(layer_state);
- }
+ if (!is_enabled) { rgblight_disable_noeeprom(); }
+ if (userspace_config.rgb_layer_change) { layer_state_set_rgb_light(layer_state); }
}
}
}
@@ -179,55 +163,25 @@ layer_state_t layer_state_set_rgb_light(layer_state_t state) {
if (userspace_config.rgb_layer_change) {
switch (get_highest_layer(state | default_layer_state)) {
case _MACROS: // mouse
- if (!layer_state_cmp(state, _GAMEPAD) && !layer_state_cmp(state, _DIABLO)) {
- rgblight_set_hsv_and_mode(HSV_CHARTREUSE, RGBLIGHT_MODE_BREATHING + 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;
- 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;
- case _COLEMAK:
- rgblight_set_hsv_and_mode(HSV_MAGENTA, RGBLIGHT_MODE_STATIC_LIGHT);
- break;
- case _DVORAK:
- rgblight_set_hsv_and_mode(HSV_SPRINGGREEN, RGBLIGHT_MODE_STATIC_LIGHT);
- break;
- case _WORKMAN:
- rgblight_set_hsv_and_mode(HSV_GOLDENROD, RGBLIGHT_MODE_STATIC_LIGHT);
- break;
- case _NORMAN:
- rgblight_set_hsv_and_mode(HSV_CORAL, RGBLIGHT_MODE_STATIC_LIGHT);
- break;
- case _MALTRON:
- rgblight_set_hsv_and_mode(HSV_YELLOW, RGBLIGHT_MODE_STATIC_LIGHT);
- break;
- case _EUCALYN:
- rgblight_set_hsv_and_mode(HSV_PINK, RGBLIGHT_MODE_STATIC_LIGHT);
- break;
- case _CARPLAX:
- rgblight_set_hsv_and_mode(HSV_BLUE, RGBLIGHT_MODE_STATIC_LIGHT);
- break;
- default:
- rgblight_set_hsv_and_mode(HSV_CYAN, RGBLIGHT_MODE_STATIC_LIGHT);
+ if (!layer_state_cmp(state, _GAMEPAD) && !layer_state_cmp(state, _DIABLO)) { rgblight_set_hsv_and_mode(HSV_CHARTREUSE, RGBLIGHT_MODE_BREATHING + 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;
+ 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;
+ case _COLEMAK: rgblight_set_hsv_and_mode(HSV_MAGENTA, RGBLIGHT_MODE_STATIC_LIGHT); break;
+ case _DVORAK: rgblight_set_hsv_and_mode(HSV_SPRINGGREEN, RGBLIGHT_MODE_STATIC_LIGHT); break;
+ case _WORKMAN: rgblight_set_hsv_and_mode(HSV_GOLDENROD, RGBLIGHT_MODE_STATIC_LIGHT); break;
+ case _NORMAN: rgblight_set_hsv_and_mode(HSV_CORAL, RGBLIGHT_MODE_STATIC_LIGHT); break;
+ case _MALTRON: rgblight_set_hsv_and_mode(HSV_YELLOW, RGBLIGHT_MODE_STATIC_LIGHT); break;
+ case _EUCALYN: rgblight_set_hsv_and_mode(HSV_PINK, RGBLIGHT_MODE_STATIC_LIGHT); break;
+ case _CARPLAX: rgblight_set_hsv_and_mode(HSV_BLUE, RGBLIGHT_MODE_STATIC_LIGHT); break;
+ default: rgblight_set_hsv_and_mode(HSV_CYAN, RGBLIGHT_MODE_STATIC_LIGHT); break;
}
}
-# endif // RGBLIGHT_ENABLE
+# endif // RGBLIGHT_ENABLE
return state;
}
diff --git a/users/drashna/rules.mk b/users/drashna/rules.mk
index b79051508b..b9156f6a46 100644
--- a/users/drashna/rules.mk
+++ b/users/drashna/rules.mk
@@ -74,34 +74,35 @@ endif
ifeq ($(strip $(PIMORONI_TRACKBALL_ENABLE)), yes)
POINTING_DEVICE_ENABLE := yes
OPT_DEFS += -DPIMORONI_TRACKBALL_ENABLE
- SRC += pimoroni_trackball.c
+ SRC += drivers/sensors/pimoroni_trackball.c
QUANTUM_LIB_SRC += i2c_master.c
endif
CUSTOM_SPLIT_TRANSPORT ?= yes
ifeq ($(strip $(SPLIT_KEYBOARD)), yes)
- ifneq ($(strip $(SPLIT_TRANSPORT)), custom)
- ifeq ($(strip $(CUSTOM_SPLIT_TRANSPORT)), yes)
- SPLIT_TRANSPORT = custom
- QUANTUM_LIB_SRC += drashna_transport.c
- OPT_DEFS += -DDRASHNA_CUSTOM_TRANSPORT
- # Unused functions are pruned away, which is why we can add multiple drivers here without bloat.
- ifeq ($(PLATFORM),AVR)
- ifneq ($(NO_I2C),yes)
- QUANTUM_LIB_SRC += i2c_master.c \
- i2c_slave.c
- endif
- endif
+ QUANTUM_LIB_SRC += transport_sync.c
+ # ifneq ($(strip $(SPLIT_TRANSPORT)), custom)
+ # ifeq ($(strip $(CUSTOM_SPLIT_TRANSPORT)), yes)
+ # SPLIT_TRANSPORT = custom
+ # QUANTUM_LIB_SRC += drashna_transport.c
+ # OPT_DEFS += -DDRASHNA_CUSTOM_TRANSPORT
+ # # Unused functions are pruned away, which is why we can add multiple drivers here without bloat.
+ # ifeq ($(PLATFORM),AVR)
+ # ifneq ($(NO_I2C),yes)
+ # QUANTUM_LIB_SRC += i2c_master.c \
+ # i2c_slave.c
+ # endif
+ # endif
- SERIAL_DRIVER ?= bitbang
- OPT_DEFS += -DSERIAL_DRIVER_$(strip $(shell echo $(SERIAL_DRIVER) | tr '[:lower:]' '[:upper:]'))
- ifeq ($(strip $(SERIAL_DRIVER)), bitbang)
- QUANTUM_LIB_SRC += serial.c
- else
- QUANTUM_LIB_SRC += serial_$(strip $(SERIAL_DRIVER)).c
- endif
- endif
- endif
+ # SERIAL_DRIVER ?= bitbang
+ # OPT_DEFS += -DSERIAL_DRIVER_$(strip $(shell echo $(SERIAL_DRIVER) | tr '[:lower:]' '[:upper:]'))
+ # ifeq ($(strip $(SERIAL_DRIVER)), bitbang)
+ # QUANTUM_LIB_SRC += serial.c
+ # else
+ # QUANTUM_LIB_SRC += serial_$(strip $(SERIAL_DRIVER)).c
+ # endif
+ # endif
+ # endif
endif
# DEBUG_MATRIX_SCAN_RATE_ENABLE = api
diff --git a/users/drashna/tap_dances.c b/users/drashna/tap_dances.c
index 01873489d8..6b27afc5ae 100644
--- a/users/drashna/tap_dances.c
+++ b/users/drashna/tap_dances.c
@@ -26,7 +26,7 @@ uint8_t diablo_times[] = {0, 1, 3, 5, 10, 30};
// Cycle through the times for the macro, starting at 0, for disabled.
void diablo_tapdance_master(qk_tap_dance_state_t *state, void *user_data) {
- diable_keys_t *diablo_keys = (diable_keys_t *)user_data;
+ diable_keys_t *diablo_keys = (diable_keys_t *)user_data;
// Sets the keycode based on the index
diablo_timer[diablo_keys->index].keycode = diablo_keys->keycode;
@@ -34,7 +34,7 @@ void diablo_tapdance_master(qk_tap_dance_state_t *state, void *user_data) {
if (state->count >= (sizeof(diablo_times) / sizeof(uint8_t))) {
diablo_timer[diablo_keys->index].key_interval = 0;
reset_tap_dance(state);
- } else { // else set the interval (tapdance count starts at 1, array starts at 0, so offset by one)
+ } else { // else set the interval (tapdance count starts at 1, array starts at 0, so offset by one)
diablo_timer[diablo_keys->index].key_interval = diablo_times[state->count - 1];
}
}
@@ -64,9 +64,7 @@ void run_diablo_macro_check(void) {
// reset the timer, since enough time has passed
diablo_timer[index].timer = timer_read();
// send keycode ONLY if we're on the diablo layer.
- if (IS_LAYER_ON(_DIABLO)) {
- tap_code(diablo_timer[index].keycode);
- }
+ if (IS_LAYER_ON(_DIABLO)) { tap_code(diablo_timer[index].keycode); }
}
}
}
diff --git a/users/drashna/tap_dances.h b/users/drashna/tap_dances.h
index 7f73f28036..182cc6756c 100644
--- a/users/drashna/tap_dances.h
+++ b/users/drashna/tap_dances.h
@@ -43,4 +43,4 @@ enum {
TD_D3_4
};
// clang-format on
-#endif // TAP_DANCE_ENABLE
+#endif // TAP_DANCE_ENABLE
diff --git a/users/drashna/template.c b/users/drashna/template.c
index f98964ae4f..636955c43f 100644
--- a/users/drashna/template.c
+++ b/users/drashna/template.c
@@ -54,9 +54,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
break;
case VRSN:
- if (record->event.pressed) {
- SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
- }
+ if (record->event.pressed) { SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); }
return false;
break;
}
@@ -89,7 +87,7 @@ __attribute__((weak)) void startup_keymap(void) {}
void startup_user(void) {
#ifdef RGBLIGHT_ENABLE
matrix_init_rgb();
-#endif // RGBLIGHT_ENABLE
+#endif // RGBLIGHT_ENABLE
startup_keymap();
}
diff --git a/users/drashna/template.h b/users/drashna/template.h
index cb1ad75d8a..e00a0530e3 100644
--- a/users/drashna/template.h
+++ b/users/drashna/template.h
@@ -24,8 +24,8 @@
#define BASE 0
enum custom_keycodes {
- VRSN = SAFE_RANGE, // can always be here
+ VRSN = SAFE_RANGE, // can always be here
KC_MAKE,
KC_RESET,
- NEWPLACEHOLDER // use "NEWPLACEHOLDER for keymap specific codes
+ NEWPLACEHOLDER // use "NEWPLACEHOLDER for keymap specific codes
};
diff --git a/users/drashna/transport_sync.c b/users/drashna/transport_sync.c
new file mode 100644
index 0000000000..baa1f7651a
--- /dev/null
+++ b/users/drashna/transport_sync.c
@@ -0,0 +1,80 @@
+#ifdef SPLIT_TRANSACTION_IDS_USER
+#include "transport_sync.h"
+#include "transactions.h"
+#include <string.h>
+
+typedef struct {
+ bool oled_on;
+ uint16_t keymap_config;
+} user_runtime_config_t;
+
+user_runtime_config_t user_state;
+
+void user_sync(uint8_t initiator2target_buffer_size, const void* initiator2target_buffer, uint8_t target2initiator_buffer_size, void* target2initiator_buffer) {
+ if (initiator2target_buffer_size == sizeof(user_state)) {
+ memcpy(&user_state, initiator2target_buffer, initiator2target_buffer_size);
+ }
+}
+
+void keyboard_post_init_transport_sync(void) {
+ // Register keyboard state sync split transaction
+ transaction_register_rpc(RPC_ID_USER_STATE_SYNC, user_sync);
+}
+
+void user_state_update(void) {
+ if (is_keyboard_master()) {
+
+#ifdef OLED_DRIVER_ENABLE
+ user_state.oled_on = is_oled_on();
+#endif
+
+ user_state.keymap_config = keymap_config.raw;
+ } else {
+#ifdef OLED_DRIVER_ENABLE
+ if (user_state.oled_on) {
+ oled_on();
+ } else {
+ oled_off();
+ }
+#endif
+ if (keymap_config.raw != user_state.keymap_config) {
+ keymap_config.raw = user_state.keymap_config;
+ }
+ }
+}
+
+void user_state_sync(void) {
+ if (is_keyboard_master()) {
+ // Keep track of the last state, so that we can tell if we need to propagate to slave
+ static user_runtime_config_t last_user_state;
+ static uint32_t last_sync;
+ bool needs_sync = false;
+
+ // Check if the state values are different
+ if (memcmp(&user_state, &last_user_state, sizeof(user_state))) {
+ needs_sync = true;
+ memcpy(&last_user_state, &user_state, sizeof(user_state));
+ }
+
+ // Send to slave every 500ms regardless of state change
+ if (timer_elapsed32(last_sync) > 250) {
+ needs_sync = true;
+ }
+
+ // Perform the sync if requested
+ if (needs_sync) {
+ if (transaction_rpc_send(RPC_ID_USER_STATE_SYNC, sizeof(user_state), &user_state)) {
+ last_sync = timer_read32();
+ }
+ }
+ }
+}
+
+void housekeeping_task_user(void) {
+ // Update kb_state so we can send to slave
+ user_state_update();
+
+ // Data sync from master to slave
+ user_state_sync();
+}
+#endif
diff --git a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/default/config.h b/users/drashna/transport_sync.h
index 5bad6bcab3..e2b3eae76b 100644
--- a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/default/config.h
+++ b/users/drashna/transport_sync.h
@@ -1,3 +1,4 @@
+
/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
*
* This program is free software: you can redistribute it and/or modify
@@ -14,9 +15,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-
-
#pragma once
+#include "drashna.h"
-#include "../drashna/config.h"
+void keyboard_post_init_transport_sync(void);
diff --git a/users/dshields/rules.mk b/users/dshields/rules.mk
index 462649289b..00e18521be 100644
--- a/users/dshields/rules.mk
+++ b/users/dshields/rules.mk
@@ -5,7 +5,6 @@ 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
diff --git a/users/ericgebhart/base_layers.h b/users/ericgebhart/base_layers.h
index caf0810574..fd88a40aef 100644
--- a/users/ericgebhart/base_layers.h
+++ b/users/ericgebhart/base_layers.h
@@ -87,7 +87,7 @@
// the bottom rows for keyboards on bepo.
// bepo on bepo - not enough space to go around....
-#define ___BOTTOM_LEFT_BP___ LCTL(BP_C), BP_ECRC, LCTL(BP_V), KC_LEFT, KC_RIGHT
+#define ___BOTTOM_LEFT_BP___ LCTL(BP_C), BP_ECIR, LCTL(BP_V), KC_LEFT, KC_RIGHT
#define ___BOTTOM_RIGHT_BP___ KC_UP, KC_DOWN, DB_BACKSLASH, BP_CCED, BP_PERC
// for dvorak on bepo
diff --git a/users/ericgebhart/core_keys.h b/users/ericgebhart/core_keys.h
index 035f740016..a71d905749 100644
--- a/users/ericgebhart/core_keys.h
+++ b/users/ericgebhart/core_keys.h
@@ -231,7 +231,7 @@ enum {
#define BP_SFT_T_E SFT_T(BP_E)
#define BP_SFT_T_M SFT_T(BP_M)
-#define BP_SFT_T_ECRC SFT_T(BP_ECRC)
+#define BP_SFT_T_ECRC SFT_T(BP_ECIR)
#define BP_SFT_T_CCED SFT_T(BP_CCED)
#define BP_LT_SYMB_COMM LT(SYMB,BP_COMM)
diff --git a/users/ericgebhart/core_keysets.h b/users/ericgebhart/core_keysets.h
index ffe02192f6..5baf02ccf6 100644
--- a/users/ericgebhart/core_keysets.h
+++ b/users/ericgebhart/core_keysets.h
@@ -111,33 +111,33 @@
// Bepo on fr-bepo software layer
// for bepo on bepo
-/* BP_DLR, BP_DQOT, BP_LGIL, BP_RGIL, BP_LPRN, BP_RPRN, KC_DEL, */
-#define ___SYMBOL_BEPO_L___ /* BP_DLR */ BP_DQOT, BP_LGIL, BP_RGIL, BP_LPRN, BP_RPRN
+/* BP_DLR, BP_DQUO, BP_LDAQ, BP_RDAQ, BP_LPRN, BP_RPRN, KC_DEL, */
+#define ___SYMBOL_BEPO_L___ /* BP_DLR */ BP_DQUO, BP_LDAQ, BP_RDAQ, BP_LPRN, BP_RPRN
/* KC_DEL, BP_AT, BP_PLUS, BP_MINS, BP_SLSH, BP_ASTR, BP_EQL, */
-#define ___SYMBOL_BEPO_R___ BP_AT, BP_PLUS, BP_MINS, BP_SLASH, BP_ASTR /* BP_EQL, BP_PERC */
+#define ___SYMBOL_BEPO_R___ BP_AT, BP_PLUS, BP_MINS, BP_SLSH, BP_ASTR /* BP_EQL, BP_PERC */
-#define ___BEPO_FR_L1___ BP_B, BP_ECUT, BP_P, BP_O, BP_EGRV
+#define ___BEPO_FR_L1___ BP_B, BP_EACU, BP_P, BP_O, BP_EGRV
#define ___BEPO_FR_L2___ BP_SFT_T_A, BP_LT_KP_U, BP_LT_SYMB_I, BP_LT_MDIA_E, BP_COMM
-#define ___BEPO_FR_L3___ /*BP_ECRC*/ BP_AGRV, BP_Y, BP_X, BP_DOT, BP_K
+#define ___BEPO_FR_L3___ /*BP_ECIR*/ 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
+#define ___BEPO_FR_R1___ /* BP_DCIR,*/ BP_V, BP_D, BP_L, BP_J, BP_Z
#define ___BEPO_FR_R2___ /* BP_C, */ BP_T, BP_LT_SYMB_S, BP_LT_MDIA_R, BP_LT_KP_N, BP_SFT_T_M //BP_CCED
-#define ___BEPO_FR_R3___ BP_APOS, BP_Q, BP_G, BP_H, BP_F //BP_SFT_T_W
+#define ___BEPO_FR_R3___ BP_QUOT, BP_Q, BP_G, BP_H, BP_F //BP_SFT_T_W
-/* BP_DLR, BP_DQOT, BP_LGIL, BP_RGIL, BP_LPRN, BP_RPRN, KC_DEL, */
-/* KC_TAB, BP_B, BP_ECUT, BP_P, BP_O, BP_EGRV, KC_BSPC, */
+/* BP_DLR, BP_DQUO, BP_LDAQ, BP_RDAQ, BP_LPRN, BP_RPRN, KC_DEL, */
+/* KC_TAB, BP_B, BP_EACU, BP_P, BP_O, BP_EGRV, KC_BSPC, */
/* KC_LSFT, BP_A, BP_U, BP_I, BP_E, BP_COMM, */
/* KC_LCTRL, BP_AGRV, BP_Y, BP_X, BP_DOT, BP_K, KC_ENT, */
-/* ESC_FN, BP_ECRC, KC_LGUI, KC_LALT, SPC_RALT, */
+/* ESC_FN, BP_ECIR, KC_LGUI, KC_LALT, SPC_RALT, */
/* TT(SWAP), KC_MNXT, */
/* KC_MPLY, */
/* TT(FN), TT(NUMS), KC_MPRV, */
/* /\* right hand *\/ */
/* KC_DEL, BP_AT, BP_PLUS, BP_MINS, BP_SLSH, BP_ASTR, BP_EQL, */
-/* KC_BSPC, BP_DCRC, BP_V, BP_D, BP_L, BP_J, BP_Z, */
+/* KC_BSPC, BP_DCIR, BP_V, BP_D, BP_L, BP_J, BP_Z, */
/* BP_C, BP_T, BP_S, BP_R, BP_N, M_RSFT, */
-/* KC_ENT, BP_APOS, BP_Q, BP_G, BP_H, BP_F, W_RCTL, */
+/* KC_ENT, BP_QUOT, BP_Q, BP_G, BP_H, BP_F, W_RCTL, */
/*******************************************************************/
@@ -183,7 +183,7 @@
#define ___KEYPAD_4_ALT___ KC_P0, KC_DOT, KC_PENT, KC_PENT
// For Bepo
-#define ___KEYPAD_1_BP___ DB_7, DB_8, DB_9, BP_SLASH
+#define ___KEYPAD_1_BP___ DB_7, DB_8, DB_9, BP_SLSH
#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
@@ -225,9 +225,9 @@
// SYMBOLS FOR BEPO
// The top row. Bepo has symbols not numbers. Numbers are the shifted values.
-#define ___SYMBOL_BEPO_L___ /* BP_DLR */ BP_DQOT, BP_LGIL, BP_RGIL, BP_LPRN, BP_RPRN
+#define ___SYMBOL_BEPO_L___ /* BP_DLR */ BP_DQUO, BP_LDAQ, BP_RDAQ, BP_LPRN, BP_RPRN
/* KC_DEL, BP_AT, BP_PLUS, BP_MINS, BP_SLSH, BP_ASTR, BP_EQL, */
-#define ___SYMBOL_BEPO_R___ BP_AT, BP_PLUS, BP_MINS, BP_SLASH, BP_ASTR /* BP_EQL, BP_PERC */
+#define ___SYMBOL_BEPO_R___ BP_AT, BP_PLUS, BP_MINS, BP_SLSH, BP_ASTR /* BP_EQL, BP_PERC */
// An arrangement for the left hand with a focus on the ()[]{}s.
#define ___SYMBOLS_1_BP___ KC_EXLM, BP_AT, DB_LCBR, DB_RCBR, DB_PIPE
@@ -237,7 +237,7 @@
// A larger 6 column arrangement for the left hand, A merge of dvorak and the above.
#define ___SYMBOLS6_1_BP___ DB_GRV, DB_LESS, DB_GRTR, DB_LCBR, DB_RCBR, DB_HASH
#define ___SYMBOLS6_2_BP___ KC_AMPR, BP_AT, BP_ASTR, DB_LPRN, DB_RPRN, BP_PERC
-#define ___SYMBOLS6_3_BP___ BP_DLR, BP_DQOT, DB_QUOT, DB_LBRC, DB_RBRC, KC_COLON
+#define ___SYMBOLS6_3_BP___ BP_DLR, BP_DQUO, DB_QUOT, DB_LBRC, DB_RBRC, KC_COLON
#define ___SYMBOLS6_4_BP___ ___2___, DB_TILD, DB_DOT, KC_EXLM, DB_SCOLON
#define ___SYMBOLS5_4_BP___ ___, DB_TILD, DB_DOT, KC_EXLM, DB_SCOLON
@@ -248,9 +248,9 @@
#define ___SYMPAD_1_BP___ DB_GRV, BP_AMPR, BP_ASTR, DB_LCBR, BP_PLUS, DB_PIPE
#define ___SYMPAD_2_BP___ DB_TILD, BP_DLR, BP_PERC, DB_CIRC, BP_ASTR, DB_GRV
#define ___SYMPAD_3_BP___ ___, BP_EXLM, BP_AT, DB_HASH, BP_MINS, BP_SLSH
-#define ___SYMPAD_4_BP___ ___, DB_RCBR, DB_DOT, BP_EQL, BP_MINUS, DB_BACKSLASH
+#define ___SYMPAD_4_BP___ ___, DB_RCBR, DB_DOT, BP_EQL, BP_MINS, DB_BACKSLASH
-#define ___5_SYMPAD_4_BP___ DB_RCBR, DB_DOT, BP_EQL, BP_MINUS, DB_BACKSLASH
+#define ___5_SYMPAD_4_BP___ DB_RCBR, DB_DOT, BP_EQL, BP_MINS, DB_BACKSLASH
// Parts are parts.
// MOUSE, ARROW and MEDIA KEY SETS
diff --git a/users/ericgebhart/ericgebhart.c b/users/ericgebhart/ericgebhart.c
index abb87899b7..d34563865d 100644
--- a/users/ericgebhart/ericgebhart.c
+++ b/users/ericgebhart/ericgebhart.c
@@ -86,25 +86,25 @@ static void switch_default_layer(uint8_t layer) {
// reasnably sized array without difficulties. The macro is for the constant declarations
// the function is for when we use it.
const uint8_t key_translations[][2][2] = {
- [GR(DB_1)] = {{BP_DQOT, MOD_LSFT}, {BP_DCRC, MOD_LSFT}},
- [GR(DB_2)] = {{BP_LGIL, MOD_LSFT}, {BP_AT, MOD_NONE}},
- [GR(DB_3)] = {{BP_RGIL, MOD_LSFT}, {BP_DLR, MOD_LSFT}},
+ [GR(DB_1)] = {{BP_DQUO, MOD_LSFT}, {BP_DCIR, MOD_LSFT}},
+ [GR(DB_2)] = {{BP_LDAQ, MOD_LSFT}, {BP_AT, MOD_NONE}},
+ [GR(DB_3)] = {{BP_RDAQ, MOD_LSFT}, {BP_DLR, MOD_LSFT}},
[GR(DB_4)] = {{BP_LPRN, MOD_LSFT}, {BP_DLR, MOD_NONE}},
[GR(DB_5)] = {{BP_RPRN, MOD_LSFT}, {BP_PERC, MOD_NONE}},
[GR(DB_6)] = {{BP_AT, MOD_LSFT}, {BP_AT, MOD_BIT(KC_RALT)}},
[GR(DB_7)] = {{BP_PLUS, MOD_LSFT}, {BP_P, MOD_BIT(KC_RALT)}},
[GR(DB_8)] = {{BP_MINS, MOD_LSFT}, {BP_ASTR, MOD_NONE}},
- [GR(DB_9)] = {{BP_SLASH, MOD_LSFT}, {BP_LPRN, MOD_NONE}},
+ [GR(DB_9)] = {{BP_SLSH, MOD_LSFT}, {BP_LPRN, MOD_NONE}},
[GR(DB_0)] = {{BP_ASTR, MOD_LSFT}, {BP_RPRN, MOD_NONE}},
[GR(DB_GRV)] = {{BP_PERC, MOD_LSFT}, {BP_K, MOD_BIT(KC_RALT)}},
[GR(DB_SCOLON)] = {{BP_COMM, MOD_LSFT}, {BP_DOT, MOD_LSFT}},
- [GR(DB_SLASH)] = {{BP_SLASH, MOD_NONE}, {BP_APOS, MOD_LSFT}},
+ [GR(DB_SLASH)] = {{BP_SLSH, MOD_NONE}, {BP_QUOT, MOD_LSFT}},
[GR(DB_BACKSLASH)] = {{BP_AGRV, MOD_BIT(KC_RALT)}, {BP_B, MOD_BIT(KC_RALT)}},
[GR(DB_EQL)] = {{BP_EQL, MOD_NONE}, {BP_PLUS, MOD_NONE}},
- [GR(DB_COMM)] = {{BP_COMMA, MOD_NONE}, {BP_LGIL, MOD_BIT(KC_RALT)}},
- [GR(DB_DOT)] = {{BP_DOT, MOD_NONE}, {BP_RGIL, MOD_BIT(KC_RALT)}},
- [GR(DB_QUOT)] = {{BP_APOS, MOD_NONE}, {BP_DQOT, MOD_NONE}},
- [GR(DB_MINUS)] = {{BP_MINUS, MOD_NONE}, {KC_SPC, MOD_BIT(KC_RALT)}},
+ [GR(DB_COMM)] = {{BP_COMM, MOD_NONE}, {BP_LDAQ, MOD_BIT(KC_RALT)}},
+ [GR(DB_DOT)] = {{BP_DOT, MOD_NONE}, {BP_RDAQ, MOD_BIT(KC_RALT)}},
+ [GR(DB_QUOT)] = {{BP_QUOT, MOD_NONE}, {BP_DQUO, MOD_NONE}},
+ [GR(DB_MINUS)] = {{BP_MINS, MOD_NONE}, {KC_SPC, MOD_BIT(KC_RALT)}},
[GR(DB_LPRN)] = {{BP_LPRN, MOD_NONE}, {BP_LPRN, MOD_BIT(KC_RALT)}},
[GR(DB_RPRN)] = {{BP_RPRN, MOD_NONE}, {BP_RPRN, MOD_BIT(KC_RALT)}},
[GR(DB_LBRC)] = {{BP_Y, MOD_BIT(KC_RALT)}, {BP_LPRN, MOD_BIT(KC_RALT)}},
@@ -116,8 +116,8 @@ const uint8_t key_translations[][2][2] = {
[GR(DB_PIPE)] = {{BP_B, MOD_BIT(KC_RALT)}, {BP_B, MOD_BIT(KC_RALT)}},
[GR(DB_TILD)] = {{BP_K, MOD_BIT(KC_RALT)}, {BP_K, MOD_BIT(KC_RALT)}},
[GR(DB_CIRC)] = {{BP_AT, MOD_BIT(KC_RALT)}, {BP_AT, MOD_BIT(KC_RALT)}},
- [GR(DB_LESS)] = {{BP_LGIL, MOD_BIT(KC_RALT)}, {BP_LGIL, MOD_BIT(KC_RALT)}},
- [GR(DB_GRTR)] = {{BP_RGIL, MOD_BIT(KC_RALT)}, {BP_RGIL, MOD_BIT(KC_RALT)}},
+ [GR(DB_LESS)] = {{BP_LDAQ, MOD_BIT(KC_RALT)}, {BP_LDAQ, MOD_BIT(KC_RALT)}},
+ [GR(DB_GRTR)] = {{BP_RDAQ, MOD_BIT(KC_RALT)}, {BP_RDAQ, MOD_BIT(KC_RALT)}},
};
diff --git a/users/ericgebhart/rules.mk b/users/ericgebhart/rules.mk
index 70017a5950..360abed948 100755
--- a/users/ericgebhart/rules.mk
+++ b/users/ericgebhart/rules.mk
@@ -12,4 +12,3 @@ CONSOLE_ENABLE = no # Console for debug
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
UNICODE_ENABLE = no
SLEEP_LED_ENABLE = no
-API_SYSEX_ENABLE = no
diff --git a/users/romus/rules.mk b/users/romus/rules.mk
index 12bbabb020..58f7ccf9c8 100644
--- a/users/romus/rules.mk
+++ b/users/romus/rules.mk
@@ -16,8 +16,6 @@ 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
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/sigul/sigul.c b/users/sigul/sigul.c
index 0995ca7360..16bcd411d9 100644
--- a/users/sigul/sigul.c
+++ b/users/sigul/sigul.c
@@ -40,13 +40,13 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
case IT_APDQ:
if (record->event.pressed){
if (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT)){
- register_code16(IT_DQOT);
+ register_code16(IT_DQUO);
} else {
- register_code16(IT_APOS);
+ register_code16(IT_QUOT);
}
} else {
- unregister_code16(IT_DQOT);
- unregister_code16(IT_APOS);
+ unregister_code16(IT_DQUO);
+ unregister_code16(IT_QUOT);
}
return false;
break;
@@ -55,13 +55,13 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if (record->event.pressed){
if (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT)){
unregister_code16(KC_LSFT);
- register_code16(IT_LESS);
+ register_code16(IT_LABK);
register_code16(KC_LSFT);
} else {
register_code16(IT_COMM);
}
} else {
- unregister_code16(IT_LESS);
+ unregister_code16(IT_LABK);
unregister_code16(IT_COMM);
}
return false;
@@ -70,12 +70,12 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
case IT_DTMR:
if (record->event.pressed){
if (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT)){
- register_code16(IT_MORE);
+ register_code16(IT_RABK);
} else {
register_code16(IT_DOT);
}
} else {
- unregister_code16(IT_MORE);
+ unregister_code16(IT_RABK);
unregister_code16(IT_DOT);
}
return false;
@@ -84,12 +84,12 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
case IT_SLQS:
if (record->event.pressed){
if (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT)){
- register_code16(IT_QST);
+ register_code16(IT_QUES);
} else {
register_code16(IT_SLSH);
}
} else {
- unregister_code16(IT_QST);
+ unregister_code16(IT_QUES);
unregister_code16(IT_SLSH);
}
return false;
diff --git a/users/sigul/sigul.h b/users/sigul/sigul.h
index 6adc670638..8f806017cc 100644
--- a/users/sigul/sigul.h
+++ b/users/sigul/sigul.h
@@ -15,10 +15,10 @@ enum userspace_layers {
enum userspace_custom_keycodes {
QWERTY = SAFE_RANGE,
// custom keycodes for an Italian ANSI layout with accented vowels
- IT_CMLS, // IT_COMM and IT_LESS when combined with shift
- IT_DTMR, // IT_DOT and IT_MORE when combined with shift
- IT_SLQS, // IT_SLSH and IT_QST when combined with shift
- IT_APDQ, // IT_APO and IT_DQOT when combined with shift
+ IT_CMLS, // IT_COMM and IT_LABK when combined with shift
+ IT_DTMR, // IT_DOT and IT_RABK when combined with shift
+ IT_SLQS, // IT_SLSH and IT_QUES when combined with shift
+ IT_APDQ, // IT_APO and IT_DQUO when combined with shift
IT_SCCL, // IT_SMCL and IT_COLN when combined with shift
SECRET0,
SECRET1,
diff --git a/users/spacebarracecar/spacebarracecar.c b/users/spacebarracecar/spacebarracecar.c
index bbd864aa93..3141b8758e 100644
--- a/users/spacebarracecar/spacebarracecar.c
+++ b/users/spacebarracecar/spacebarracecar.c
@@ -178,11 +178,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
return false;
case CU_AE:
- UML(DE_AE)
+ UML(DE_ADIA)
case CU_OE:
- UML(DE_OE)
+ UML(DE_ODIA)
case CU_UE:
- UML(DE_UE)
+ UML(DE_UDIA)
case CU_SS:
if(record->event.pressed) {
timer_timeout();
@@ -291,9 +291,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
return false;
case CU_COMM:
- SHIFT_NO(DE_COMM, DE_LESS)
+ SHIFT_NO(DE_COMM, DE_LABK)
case CU_DOT:
- SHIFT_NORM(DE_DOT, DE_LESS)
+ SHIFT_NORM(DE_DOT, DE_LABK)
case CU_SLSH:
SHIFT_ALL(DE_7, DE_SS)
case CU_SCLN:
@@ -315,7 +315,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
case CU_RBRC:
SHIFT_ALGR(DE_9, DE_0)
case CU_BSLS:
- SHIFT_ALGR(DE_SS, DE_LESS)
+ SHIFT_ALGR(DE_SS, DE_LABK)
case CU_Z:
CTRL(DE_Z, KC_Z)
case CU_Y:
diff --git a/users/spidey3/config.h b/users/spidey3/config.h
index 7062fde030..f5f5e07f0f 100644
--- a/users/spidey3/config.h
+++ b/users/spidey3/config.h
@@ -1,7 +1,7 @@
#pragma once
-#define LED_DISABLE_WHEN_USB_SUSPENDED true
-#define RGB_DISABLE_WHEN_USB_SUSPENDED true
+#define LED_DISABLE_WHEN_USB_SUSPENDED
+#define RGB_DISABLE_WHEN_USB_SUSPENDED
#define RGBLIGHT_LAYERS
#define RGBLIGHT_MAX_LAYERS 17
#define RGBLIGHT_LAYER_BLINK
diff --git a/users/tominabox1/config.h b/users/tominabox1/config.h
index 2a8c1e943d..004f58ab53 100644
--- a/users/tominabox1/config.h
+++ b/users/tominabox1/config.h
@@ -31,7 +31,7 @@
// 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_DISABLE_WHEN_USB_SUSPENDED // 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
diff --git a/util/update_chibios_mirror.sh b/util/update_chibios_mirror.sh
new file mode 100755
index 0000000000..3df689f54e
--- /dev/null
+++ b/util/update_chibios_mirror.sh
@@ -0,0 +1,55 @@
+#!/bin/bash
+
+################################
+# Configuration
+
+# The branches to mirror
+branches="trunk stable_20.3.x stable_21.6.x"
+
+# The tags to mirror
+tags="ver19.1.3 ver20.3.1 ver20.3.2 ver20.3.3 ver21.6.0"
+
+################################
+# Actions
+
+set -eEuo pipefail
+umask 022
+
+this_script="$(realpath "${BASH_SOURCE[0]}")"
+script_dir="$(realpath "$(dirname "$this_script")")"
+qmk_firmware_dir="$(realpath "$script_dir/../")"
+chibios_dir="$qmk_firmware_dir/lib/chibios"
+
+chibios_git_location=$(realpath "$chibios_dir/$(cat "$chibios_dir/.git" | awk '/gitdir:/ {print $2}')")
+chibios_git_config=$(realpath "$chibios_git_location/config")
+
+cd "$chibios_dir"
+
+if [[ -z "$(cat "$chibios_git_config" | grep '\[svn-remote "svn"\]')" ]] ; then
+ git svn init --stdlayout --prefix='svn/' http://svn.osdn.net/svnroot/chibios/
+fi
+
+if [[ -z "$(cat "$chibios_git_config" | grep '\[remote "qmk"\]')" ]] ; then
+ git remote add qmk git@github.com:qmk/ChibiOS.git
+ git remote set-url qmk git@github.com:qmk/ChibiOS.git --push
+fi
+
+echo "Updating remotes..."
+git fetch --all --tags --prune
+
+echo "Fetching latest from subversion..."
+git svn fetch
+
+echo "Updating branches..."
+for branch in $branches ; do
+ echo "Creating branch 'svn-mirror/$branch' from 'svn/$branch'..."
+ git branch -f svn-mirror/$branch svn/$branch \
+ && git push qmk svn-mirror/$branch
+done
+
+echo "Updating tags..."
+for tagname in $tags ; do
+ echo "Creating tag 'svn-mirror/$tagname' from 'svn/tags/$tagname'..."
+ GIT_COMMITTER_DATE="$(git log -n1 --pretty=format:'%ad' svn/tags/$tagname)" git tag -f -a -m "Tagging $tagname" svn-mirror/$tagname svn/tags/$tagname
+ git push qmk svn-mirror/$tagname
+done \ No newline at end of file