summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/format.yml8
-rw-r--r--.github/workflows/lint.yml9
-rw-r--r--builddefs/build_test.mk1
-rw-r--r--builddefs/common_features.mk8
-rw-r--r--builddefs/testlist.mk1
-rw-r--r--data/constants/keycodes/extras/keycodes_uk_0.0.1.hjson353
-rw-r--r--data/constants/keycodes/extras/keycodes_us_0.0.1.hjson155
-rw-r--r--data/mappings/info_config.hjson7
-rw-r--r--data/mappings/info_rules.hjson1
-rw-r--r--data/schemas/keyboard.jsonschema32
-rw-r--r--docs/_summary.md1
-rw-r--r--docs/feature_os_detection.md77
-rw-r--r--docs/feature_pointing_device.md21
-rw-r--r--docs/ja/feature_grave_esc.md4
-rw-r--r--docs/newbs_building_firmware.md2
-rw-r--r--docs/platformdev_rp2040.md6
-rw-r--r--docs/reference_info_json.md35
-rw-r--r--docs/zh-cn/feature_grave_esc.md4
-rw-r--r--drivers/sensors/pmw3360.c2
-rw-r--r--drivers/sensors/pmw33xx_common.c8
-rw-r--r--drivers/sensors/pmw33xx_common.h16
-rw-r--r--keyboards/1upkeyboards/pi40/config.h4
-rw-r--r--keyboards/anavi/knob1/config.h2
-rw-r--r--keyboards/atreus/keymaps/replicaJunction/config.h51
-rw-r--r--keyboards/atreus/keymaps/replicaJunction/keymap.c95
-rw-r--r--keyboards/atreus/keymaps/replicaJunction/readme.md7
-rw-r--r--keyboards/atreus/keymaps/replicaJunction/rules.mk28
-rw-r--r--keyboards/bioi/f60/readme.md2
-rw-r--r--keyboards/bioi/main.c2
-rw-r--r--keyboards/boardsource/lulu/rp2040/config.h2
-rw-r--r--keyboards/bobpad/readme.md2
-rw-r--r--keyboards/cannonkeys/ortho60v2/config.h23
-rw-r--r--keyboards/cannonkeys/ortho60v2/halconf.h (renamed from keyboards/kprepublic/bm16a/bm16a.c)11
-rw-r--r--keyboards/cannonkeys/ortho60v2/info.json105
-rw-r--r--keyboards/cannonkeys/ortho60v2/keymaps/default/keymap.c99
-rw-r--r--keyboards/cannonkeys/ortho60v2/keymaps/via/keymap.c53
-rw-r--r--keyboards/cannonkeys/ortho60v2/keymaps/via/rules.mk (renamed from keyboards/xelus/xs60/keymaps/via/rules.mk)0
-rw-r--r--keyboards/cannonkeys/ortho60v2/mcuconf.h9
-rw-r--r--keyboards/cannonkeys/ortho60v2/ortho60v2.c31
-rw-r--r--keyboards/cannonkeys/ortho60v2/ortho60v2.h19
-rw-r--r--keyboards/cannonkeys/ortho60v2/readme.md22
-rw-r--r--keyboards/cannonkeys/ortho60v2/rules.mk2
-rw-r--r--keyboards/controllerworks/mini36/config.h2
-rw-r--r--keyboards/controllerworks/mini42/config.h2
-rw-r--r--keyboards/creatkeebs/glacier/readme.md2
-rw-r--r--keyboards/creatkeebs/thera/readme.md2
-rw-r--r--keyboards/gmmk/pro/rev1/ansi/keymaps/andrebrait/rules.mk19
-rw-r--r--keyboards/handwired/axon/readme.md4
-rw-r--r--keyboards/handwired/jscotto/scotto9/info.json4
-rw-r--r--keyboards/handwired/jscotto/scottostarter/info.json4
-rw-r--r--keyboards/handwired/onekey/kb2040/config.h2
-rw-r--r--keyboards/handwired/swiftrax/digicarp65/readme.md2
-rw-r--r--keyboards/idobao/id75/v1/config.h1
-rw-r--r--keyboards/idobao/id80/v2/config.h1
-rw-r--r--keyboards/idobao/id87/v1/config.h1
-rw-r--r--keyboards/idobao/montex/v1/config.h1
-rw-r--r--keyboards/kbdfans/kbdpad/mk3/info.json2
-rw-r--r--keyboards/keebio/nyquist/keymaps/danielhklein/keymap.c1
-rw-r--r--keyboards/keebio/sinc/rev3/config.h2
-rw-r--r--keyboards/keyboardio/atreus/keymaps/replicaJunction/config.h51
-rw-r--r--keyboards/keyboardio/atreus/keymaps/replicaJunction/keymap.c94
-rw-r--r--keyboards/keyboardio/atreus/keymaps/replicaJunction/readme.md6
-rw-r--r--keyboards/keyboardio/atreus/keymaps/replicaJunction/rules.mk29
-rw-r--r--keyboards/kprepublic/bm16a/bm16a.h39
-rw-r--r--keyboards/kprepublic/bm16a/config.h128
-rw-r--r--keyboards/kprepublic/bm16a/info.json33
-rw-r--r--keyboards/kprepublic/bm16a/v1/info.json75
-rw-r--r--keyboards/kprepublic/bm16a/v1/keymaps/default/keymap.c (renamed from keyboards/kprepublic/bm16a/keymaps/default/keymap.c)0
-rw-r--r--keyboards/kprepublic/bm16a/v1/keymaps/default/readme.md (renamed from keyboards/kprepublic/bm16a/keymaps/default/readme.md)0
-rw-r--r--keyboards/kprepublic/bm16a/v1/keymaps/factory/keymap.c (renamed from keyboards/kprepublic/bm16a/keymaps/factory/keymap.c)0
-rw-r--r--keyboards/kprepublic/bm16a/v1/keymaps/factory/readme.md (renamed from keyboards/kprepublic/bm16a/keymaps/factory/readme.md)0
-rw-r--r--keyboards/kprepublic/bm16a/v1/keymaps/via/keymap.c (renamed from keyboards/kprepublic/bm16a/keymaps/via/keymap.c)0
-rw-r--r--keyboards/kprepublic/bm16a/v1/keymaps/via/readme.md (renamed from keyboards/kprepublic/bm16a/keymaps/via/readme.md)0
-rw-r--r--keyboards/kprepublic/bm16a/v1/keymaps/via/rules.mk (renamed from keyboards/kprepublic/bm16a/keymaps/via/rules.mk)0
-rw-r--r--keyboards/kprepublic/bm16a/v1/readme.md (renamed from keyboards/kprepublic/bm16a/readme.md)2
-rw-r--r--keyboards/kprepublic/bm16a/v1/rules.mk1
-rw-r--r--keyboards/kprepublic/bm16a/v2/config.h12
-rw-r--r--keyboards/kprepublic/bm16a/v2/halconf.h8
-rw-r--r--keyboards/kprepublic/bm16a/v2/info.json120
-rw-r--r--keyboards/kprepublic/bm16a/v2/keymaps/default/keymap.c19
-rw-r--r--keyboards/kprepublic/bm16a/v2/mcuconf.h9
-rw-r--r--keyboards/kprepublic/bm16a/v2/readme.md27
-rw-r--r--keyboards/kprepublic/bm16a/v2/rules.mk1
-rw-r--r--keyboards/late9/readme.md2
-rw-r--r--keyboards/linworks/fave65h/readme.md2
-rw-r--r--keyboards/linworks/fave84h/readme.md2
-rw-r--r--keyboards/linworks/fave87h/readme.md2
-rw-r--r--keyboards/mechanickeys/miniashen40/readme.md2
-rw-r--r--keyboards/moonlander/config.h2
-rw-r--r--keyboards/moonlander/moonlander.c88
-rw-r--r--keyboards/moonlander/moonlander.h28
-rw-r--r--keyboards/neopad/readme.md2
-rw-r--r--keyboards/pearlboards/atlas/readme.md2
-rw-r--r--keyboards/pearlboards/pandora/readme.md7
-rw-r--r--keyboards/pearlboards/pearl/readme.md2
-rw-r--r--keyboards/pearlboards/zeus/readme.md2
-rw-r--r--keyboards/pearlboards/zeuspad/readme.md2
-rw-r--r--keyboards/polycarbdiet/s20/readme.md2
-rw-r--r--keyboards/ramonimbao/mona/v1_1/readme.md2
-rw-r--r--keyboards/ramonimbao/mona/v32a/readme.md2
-rw-r--r--keyboards/ryanskidmore/rskeys100/readme.md2
-rwxr-xr-xkeyboards/ryloo_studio/m0110/readme.md4
-rw-r--r--keyboards/studiokestra/bourgeau/readme.md2
-rw-r--r--keyboards/studiokestra/cascade/readme.md2
-rw-r--r--keyboards/studiokestra/galatea/readme.md2
-rw-r--r--keyboards/studiokestra/nue/readme.md2
-rw-r--r--keyboards/xelus/xs60/hotswap/config.h (renamed from keyboards/xelus/xs60/config.h)23
-rw-r--r--keyboards/xelus/xs60/hotswap/halconf.h (renamed from keyboards/xelus/xs60/halconf.h)2
-rw-r--r--keyboards/xelus/xs60/hotswap/hotswap.c (renamed from keyboards/xelus/xs60/xs60.c)4
-rw-r--r--keyboards/xelus/xs60/hotswap/hotswap.h34
-rw-r--r--keyboards/xelus/xs60/hotswap/info.json83
-rw-r--r--keyboards/xelus/xs60/hotswap/keymaps/default/keymap.c81
-rw-r--r--keyboards/xelus/xs60/hotswap/keymaps/via/config.h (renamed from keyboards/xelus/xs60/keymaps/via/config.h)2
-rw-r--r--keyboards/xelus/xs60/hotswap/keymaps/via/keymap.c128
-rw-r--r--keyboards/xelus/xs60/hotswap/keymaps/via/rules.mk1
-rw-r--r--keyboards/xelus/xs60/hotswap/mcuconf.h (renamed from keyboards/xelus/xs60/mcuconf.h)2
-rw-r--r--keyboards/xelus/xs60/hotswap/readme.md16
-rw-r--r--keyboards/xelus/xs60/hotswap/rules.mk (renamed from keyboards/kprepublic/bm16a/rules.mk)19
-rw-r--r--keyboards/xelus/xs60/soldered/config.h50
-rw-r--r--keyboards/xelus/xs60/soldered/halconf.h22
-rw-r--r--keyboards/xelus/xs60/soldered/info.json (renamed from keyboards/xelus/xs60/info.json)7
-rw-r--r--keyboards/xelus/xs60/soldered/keymaps/default/keymap.c (renamed from keyboards/xelus/xs60/keymaps/default/keymap.c)46
-rw-r--r--keyboards/xelus/xs60/soldered/keymaps/via/config.h19
-rw-r--r--keyboards/xelus/xs60/soldered/keymaps/via/keymap.c (renamed from keyboards/xelus/xs60/keymaps/via/keymap.c)46
-rw-r--r--keyboards/xelus/xs60/soldered/keymaps/via/rules.mk1
-rw-r--r--keyboards/xelus/xs60/soldered/mcuconf.h23
-rw-r--r--keyboards/xelus/xs60/soldered/readme.md (renamed from keyboards/xelus/xs60/readme.md)5
-rw-r--r--keyboards/xelus/xs60/soldered/rules.mk (renamed from keyboards/xelus/xs60/rules.mk)3
-rw-r--r--keyboards/xelus/xs60/soldered/soldered.c20
-rw-r--r--keyboards/xelus/xs60/soldered/soldered.h (renamed from keyboards/xelus/xs60/xs60.h)2
-rw-r--r--keyboards/xiudi/xd75/keymaps/replicajunction/config.h51
-rw-r--r--keyboards/xiudi/xd75/keymaps/replicajunction/keymap.c138
-rw-r--r--keyboards/xiudi/xd75/keymaps/replicajunction/readme.md5
-rw-r--r--keyboards/xiudi/xd75/keymaps/replicajunction/rules.mk29
-rw-r--r--keyboards/ydkb/just60/readme.md2
-rw-r--r--layouts/community/ergodox/replicaJunction/config.h51
-rw-r--r--layouts/community/ergodox/replicaJunction/keymap.c378
-rw-r--r--layouts/community/ergodox/replicaJunction/readme.md5
-rw-r--r--layouts/community/ergodox/replicaJunction/rules.mk33
m---------lib/chibios-contrib0
-rw-r--r--lib/python/qmk/cli/__init__.py1
-rwxr-xr-xlib/python/qmk/cli/generate/api.py9
-rw-r--r--lib/python/qmk/cli/generate/keycodes.py54
-rw-r--r--lib/python/qmk/cli/migrate.py81
-rwxr-xr-xlib/python/qmk/cli/new/keymap.py56
-rw-r--r--lib/python/qmk/keycodes.py73
-rw-r--r--lib/python/qmk/submodules.py2
-rw-r--r--platforms/chibios/boards/GENERIC_PROMICRO_RP2040/configs/config.h2
-rw-r--r--platforms/chibios/boards/PJRC_TEENSY_3_5/board/board.mk11
-rw-r--r--platforms/chibios/boards/PJRC_TEENSY_3_5/board/extra.c7
-rw-r--r--platforms/chibios/boards/PJRC_TEENSY_3_6/board/board.mk11
-rw-r--r--platforms/chibios/boards/PJRC_TEENSY_3_6/board/extra.c7
-rw-r--r--platforms/chibios/boards/QMK_PM2040/configs/config.h2
-rw-r--r--quantum/action_tapping.c161
-rw-r--r--quantum/keymap_extras/keymap_uk.h96
-rw-r--r--quantum/keymap_extras/keymap_us.h75
-rw-r--r--quantum/matrix.c10
-rw-r--r--quantum/os_detection.c129
-rw-r--r--quantum/os_detection.h (renamed from users/replicaJunction/rj_layers.h)34
-rw-r--r--quantum/os_detection/tests/os_detection.cpp164
-rw-r--r--quantum/os_detection/tests/rules.mk5
-rw-r--r--quantum/os_detection/tests/testlist.mk1
-rw-r--r--quantum/rgblight/rgblight.h17
-rw-r--r--readme.md4
-rw-r--r--tests/basic/test_tapping.cpp69
-rw-r--r--tmk_core/protocol/chibios/usb_main.c64
-rw-r--r--tmk_core/protocol/lufa/lufa.c2
-rw-r--r--tmk_core/protocol/usb_descriptor.c10
-rw-r--r--tmk_core/protocol/usb_descriptor.h2
-rw-r--r--tmk_core/protocol/vusb/vusb.c7
-rw-r--r--users/replicaJunction/features/.gitignore2
-rw-r--r--users/replicaJunction/features/caps_word.c105
-rw-r--r--users/replicaJunction/features/caps_word.h26
-rw-r--r--users/replicaJunction/features/mouse_jiggle.c46
-rw-r--r--users/replicaJunction/features/mouse_jiggle.h23
-rw-r--r--users/replicaJunction/features/num_word.c129
-rw-r--r--users/replicaJunction/features/num_word.h27
-rw-r--r--users/replicaJunction/features/secrets.c51
-rw-r--r--users/replicaJunction/features/secrets.h30
-rw-r--r--users/replicaJunction/features/super_alt_tab.c52
-rw-r--r--users/replicaJunction/features/super_alt_tab.h27
-rw-r--r--users/replicaJunction/keycode_aliases.h85
-rw-r--r--users/replicaJunction/matrix_scan.c35
-rw-r--r--users/replicaJunction/process_records.c149
-rw-r--r--users/replicaJunction/process_records.h21
-rw-r--r--users/replicaJunction/readme.md93
-rw-r--r--users/replicaJunction/replicaJunction.c25
-rw-r--r--users/replicaJunction/replicaJunction.h42
-rw-r--r--users/replicaJunction/rj_keycodes.h63
-rw-r--r--users/replicaJunction/rules.mk33
-rw-r--r--users/sethBarberee/config.h3
-rw-r--r--util/udev/50-qmk.rules3
192 files changed, 3002 insertions, 2756 deletions
diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml
index b6ce4063fe..a93fb3a488 100644
--- a/.github/workflows/format.yml
+++ b/.github/workflows/format.yml
@@ -27,16 +27,14 @@ jobs:
run: |
pip3 install -r requirements-dev.txt
- - uses: trilom/file-changes-action@v1.2.4
+ - name: Get changed files
id: file_changes
- with:
- output: ' '
- fileOutput: ' '
+ uses: tj-actions/changed-files@v34
- name: Run qmk formatters
shell: 'bash {0}'
run: |
- cat ~/files_added.txt ~/files_modified.txt > ~/files_changed.txt
+ echo '${{ steps.file_changes.outputs.added_files}}' '${{ steps.file_changes.outputs.modified_files}}' > ~/files_changed.txt
qmk format-c --core-only $(< ~/files_changed.txt) || true
qmk format-python $(< ~/files_changed.txt) || true
qmk format-text $(< ~/files_changed.txt) || true
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index 5b8a45f26b..af656cf80f 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -19,21 +19,20 @@ jobs:
- name: Install dependencies
run: pip3 install -r requirements-dev.txt
- - uses: trilom/file-changes-action@v1.2.4
+ - name: Get changed files
id: file_changes
- with:
- output: '\n'
+ uses: tj-actions/changed-files@v34
- name: Print info
run: |
git rev-parse --short HEAD
echo ${{ github.event.pull_request.base.sha }}
- echo '${{ steps.file_changes.outputs.files}}'
+ echo '${{ steps.file_changes.outputs.all_changed_files}}'
- name: Run qmk lint
shell: 'bash {0}'
run: |
- QMK_CHANGES=$(echo -e '${{ steps.file_changes.outputs.files}}')
+ QMK_CHANGES=$(echo -e '${{ steps.file_changes.outputs.all_changed_files}}' | sed 's/ /\n/g')
QMK_KEYBOARDS=$(qmk list-keyboards)
exit_code=0
diff --git a/builddefs/build_test.mk b/builddefs/build_test.mk
index 7c8fdd20e5..4230598373 100644
--- a/builddefs/build_test.mk
+++ b/builddefs/build_test.mk
@@ -62,6 +62,7 @@ include $(PLATFORM_PATH)/common.mk
include $(TMK_PATH)/protocol.mk
include $(QUANTUM_PATH)/debounce/tests/rules.mk
include $(QUANTUM_PATH)/encoder/tests/rules.mk
+include $(QUANTUM_PATH)/os_detection/tests/rules.mk
include $(QUANTUM_PATH)/sequencer/tests/rules.mk
include $(QUANTUM_PATH)/wear_leveling/tests/rules.mk
include $(QUANTUM_PATH)/logging/print.mk
diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk
index d9130b5338..dbcfcb7145 100644
--- a/builddefs/common_features.mk
+++ b/builddefs/common_features.mk
@@ -907,3 +907,11 @@ ifeq ($(strip $(ENCODER_ENABLE)), yes)
OPT_DEFS += -DENCODER_MAP_ENABLE
endif
endif
+
+ifeq ($(strip $(OS_DETECTION_ENABLE)), yes)
+ SRC += $(QUANTUM_DIR)/os_detection.c
+ OPT_DEFS += -DOS_DETECTION_ENABLE
+ ifeq ($(strip $(OS_DETECTION_DEBUG_ENABLE)), yes)
+ OPT_DEFS += -DOS_DETECTION_DEBUG_ENABLE
+ endif
+endif
diff --git a/builddefs/testlist.mk b/builddefs/testlist.mk
index 8a30a44972..74a794adcd 100644
--- a/builddefs/testlist.mk
+++ b/builddefs/testlist.mk
@@ -3,6 +3,7 @@ FULL_TESTS := $(notdir $(TEST_LIST))
include $(QUANTUM_PATH)/debounce/tests/testlist.mk
include $(QUANTUM_PATH)/encoder/tests/testlist.mk
+include $(QUANTUM_PATH)/os_detection/tests/testlist.mk
include $(QUANTUM_PATH)/sequencer/tests/testlist.mk
include $(QUANTUM_PATH)/wear_leveling/tests/testlist.mk
include $(PLATFORM_PATH)/test/testlist.mk
diff --git a/data/constants/keycodes/extras/keycodes_uk_0.0.1.hjson b/data/constants/keycodes/extras/keycodes_uk_0.0.1.hjson
new file mode 100644
index 0000000000..006bf5c59e
--- /dev/null
+++ b/data/constants/keycodes/extras/keycodes_uk_0.0.1.hjson
@@ -0,0 +1,353 @@
+{
+ "aliases": {
+/*
+ * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
+ * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ │
+ * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
+ * │ │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ │
+ * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │
+ * │ │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ # │ │
+ * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤
+ * │ │ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ │
+ * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
+ * │ │ │ │ │ │ │ │ │
+ * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
+ */
+ "KC_GRV": {
+ "key": "UK_GRV",
+ "label": "`"
+ },
+ "KC_1": {
+ "key": "UK_1",
+ "label": "1"
+ },
+ "KC_2": {
+ "key": "UK_2",
+ "label": "2"
+ },
+ "KC_3": {
+ "key": "UK_3",
+ "label": "3"
+ },
+ "KC_4": {
+ "key": "UK_4",
+ "label": "4"
+ },
+ "KC_5": {
+ "key": "UK_5",
+ "label": "5"
+ },
+ "KC_6": {
+ "key": "UK_6",
+ "label": "6"
+ },
+ "KC_7": {
+ "key": "UK_7",
+ "label": "7"
+ },
+ "KC_8": {
+ "key": "UK_8",
+ "label": "8"
+ },
+ "KC_9": {
+ "key": "UK_9",
+ "label": "9"
+ },
+ "KC_0": {
+ "key": "UK_0",
+ "label": "0"
+ },
+ "KC_MINS": {
+ "key": "UK_MINS",
+ "label": "-"
+ },
+ "KC_EQL": {
+ "key": "UK_EQL",
+ "label": "="
+ },
+ "KC_Q": {
+ "key": "UK_Q",
+ "label": "Q"
+ },
+ "KC_W": {
+ "key": "UK_W",
+ "label": "W"
+ },
+ "KC_E": {
+ "key": "UK_E",
+ "label": "E"
+ },
+ "KC_R": {
+ "key": "UK_R",
+ "label": "R"
+ },
+ "KC_T": {
+ "key": "UK_T",
+ "label": "T"
+ },
+ "KC_Y": {
+ "key": "UK_Y",
+ "label": "Y"
+ },
+ "KC_U": {
+ "key": "UK_U",
+ "label": "U"
+ },
+ "KC_I": {
+ "key": "UK_I",
+ "label": "I"
+ },
+ "KC_O": {
+ "key": "UK_O",
+ "label": "O"
+ },
+ "KC_P": {
+ "key": "UK_P",
+ "label": "P"
+ },
+ "KC_LBRC": {
+ "key": "UK_LBRC",
+ "label": "["
+ },
+ "KC_RBRC": {
+ "key": "UK_RBRC",
+ "label": "]"
+ },
+ "KC_A": {
+ "key": "UK_A",
+ "label": "A"
+ },
+ "KC_S": {
+ "key": "UK_S",
+ "label": "S"
+ },
+ "KC_D": {
+ "key": "UK_D",
+ "label": "D"
+ },
+ "KC_F": {
+ "key": "UK_F",
+ "label": "F"
+ },
+ "KC_G": {
+ "key": "UK_G",
+ "label": "G"
+ },
+ "KC_H": {
+ "key": "UK_H",
+ "label": "H"
+ },
+ "KC_J": {
+ "key": "UK_J",
+ "label": "J"
+ },
+ "KC_K": {
+ "key": "UK_K",
+ "label": "K"
+ },
+ "KC_L": {
+ "key": "UK_L",
+ "label": "L"
+ },
+ "KC_SCLN": {
+ "key": "UK_SCLN",
+ "label": ";"
+ },
+ "KC_QUOT": {
+ "key": "UK_QUOT",
+ "label": "'"
+ },
+ "KC_NUHS": {
+ "key": "UK_HASH",
+ "label": "#"
+ },
+ "KC_NUBS": {
+ "key": "UK_BSLS",
+ "label": "\\"
+ },
+ "KC_Z": {
+ "key": "UK_Z",
+ "label": "Z"
+ },
+ "KC_X": {
+ "key": "UK_X",
+ "label": "X"
+ },
+ "KC_C": {
+ "key": "UK_C",
+ "label": "C"
+ },
+ "KC_V": {
+ "key": "UK_V",
+ "label": "V"
+ },
+ "KC_B": {
+ "key": "UK_B",
+ "label": "B"
+ },
+ "KC_N": {
+ "key": "UK_N",
+ "label": "N"
+ },
+ "KC_M": {
+ "key": "UK_M",
+ "label": "M"
+ },
+ "KC_COMM": {
+ "key": "UK_COMM",
+ "label": ","
+ },
+ "KC_DOT": {
+ "key": "UK_DOT",
+ "label": "."
+ },
+ "KC_SLSH": {
+ "key": "UK_SLSH",
+ "label": "/"
+ },
+
+/* Shifted symbols
+ * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
+ * │ ¬ │ ! │ " │ £ │ $ │ % │ ^ │ & │ * │ ( │ ) │ _ │ + │ │
+ * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
+ * │ │ │ │ │ │ │ │ │ │ │ │ { │ } │ │
+ * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │
+ * │ │ │ │ │ │ │ │ │ │ │ : │ @ │ ~ │ │
+ * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤
+ * │ │ | │ │ │ │ │ │ │ │ < │ > │ ? │ │
+ * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
+ * │ │ │ │ │ │ │ │ │
+ * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
+ */
+ "S(UK_GRV)": {
+ "key": "UK_NOT",
+ "label": "¬"
+ },
+ "S(UK_1)": {
+ "key": "UK_EXLM",
+ "label": "!"
+ },
+ "S(UK_2)": {
+ "key": "UK_DQUO",
+ "label": "\""
+ },
+ "S(UK_3)": {
+ "key": "UK_PND",
+ "label": "£"
+ },
+ "S(UK_4)": {
+ "key": "UK_DLR",
+ "label": "$"
+ },
+ "S(UK_5)": {
+ "key": "UK_PERC",
+ "label": "%"
+ },
+ "S(UK_6)": {
+ "key": "UK_CIRC",
+ "label": "^"
+ },
+ "S(UK_7)": {
+ "key": "UK_AMPR",
+ "label": "&"
+ },
+ "S(UK_8)": {
+ "key": "UK_ASTR",
+ "label": "*"
+ },
+ "S(UK_9)": {
+ "key": "UK_LPRN",
+ "label": "("
+ },
+ "S(UK_0)": {
+ "key": "UK_RPRN",
+ "label": ")"
+ },
+ "S(UK_MINS)": {
+ "key": "UK_UNDS",
+ "label": "_"
+ },
+ "S(UK_EQL)": {
+ "key": "UK_PLUS",
+ "label": "+"
+ },
+ "S(UK_LBRC)": {
+ "key": "UK_LCBR",
+ "label": "{"
+ },
+ "S(UK_RBRC)": {
+ "key": "UK_RCBR",
+ "label": "}"
+ },
+ "S(UK_SCLN)": {
+ "key": "UK_COLN",
+ "label": ":"
+ },
+ "S(UK_QUOT)": {
+ "key": "UK_AT",
+ "label": "@"
+ },
+ "S(UK_HASH)": {
+ "key": "UK_TILD",
+ "label": "~"
+ },
+ "S(UK_BSLS)": {
+ "key": "UK_PIPE",
+ "label": "|"
+ },
+ "S(UK_COMM)": {
+ "key": "UK_LABK",
+ "label": "<"
+ },
+ "S(UK_DOT)": {
+ "key": "UK_RABK",
+ "label": ">"
+ },
+ "S(UK_SLSH)": {
+ "key": "UK_QUES",
+ "label": "?"
+ },
+
+/* AltGr symbols
+ * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
+ * │ ¦ │ │ │ │ € │ │ │ │ │ │ │ │ │ │
+ * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
+ * │ │ │ │ É │ │ │ │ Ú │ Í │ Ó │ │ │ │ │
+ * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │
+ * │ │ Á │ │ │ │ │ │ │ │ │ │ │ │ │
+ * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤
+ * │ │ │ │ │ │ │ │ │ │ │ │ │ │
+ * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
+ * │ │ │ │ │ │ │ │ │
+ * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
+ */
+ "ALGR(UK_GRV)": {
+ "key": "UK_BRKP",
+ "label": "¦"
+ },
+ "ALGR(UK_4)": {
+ "key": "UK_EURO",
+ "label": "€"
+ },
+ "ALGR(KC_E)": {
+ "key": "UK_EACU",
+ "label": "É"
+ },
+ "ALGR(KC_U)": {
+ "key": "UK_UACU",
+ "label": "Ú"
+ },
+ "ALGR(KC_I)": {
+ "key": "UK_IACU",
+ "label": "Í"
+ },
+ "ALGR(KC_O)": {
+ "key": "UK_OACU",
+ "label": "Ó"
+ },
+ "ALGR(KC_A)": {
+ "key": "UK_AACU",
+ "label": "Á"
+ }
+ }
+} \ No newline at end of file
diff --git a/data/constants/keycodes/extras/keycodes_us_0.0.1.hjson b/data/constants/keycodes/extras/keycodes_us_0.0.1.hjson
new file mode 100644
index 0000000000..af7e462611
--- /dev/null
+++ b/data/constants/keycodes/extras/keycodes_us_0.0.1.hjson
@@ -0,0 +1,155 @@
+{
+ "aliases": {
+/* Shifted symbols
+ * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
+ * │ ~ │ ! │ @ │ # │ $ │ % │ ^ │ & │ * │ ( │ ) │ _ │ + │ │
+ * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
+ * │ │ │ │ │ │ │ │ │ │ │ │ { │ } │ | │
+ * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤
+ * │ │ │ │ │ │ │ │ │ │ │ : │ " │ │
+ * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤
+ * │ │ │ │ │ │ │ │ │ < │ > │ ? │ │
+ * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
+ * │ │ │ │ │ │ │ │ │
+ * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
+ */
+ "S(KC_GRAVE)": {
+ "key": "KC_TILD",
+ "label": "~",
+ "aliases": [
+ "KC_TILDE"
+ ]
+ },
+ "S(KC_1)": {
+ "key": "KC_EXLM",
+ "label": "!",
+ "aliases": [
+ "KC_EXCLAIM"
+ ]
+ },
+ "S(KC_2)": {
+ "key": "KC_AT",
+ "label": "@"
+ },
+ "S(KC_3)": {
+ "key": "KC_HASH",
+ "label": "#"
+ },
+ "S(KC_4)": {
+ "key": "KC_DLR",
+ "label": "$",
+ "aliases": [
+ "KC_DOLLAR"
+ ]
+ },
+ "S(KC_5)": {
+ "key": "KC_PERC",
+ "label": "%",
+ "aliases": [
+ "KC_PERCENT"
+ ]
+ },
+ "S(KC_6)": {
+ "key": "KC_CIRC",
+ "label": "^",
+ "aliases": [
+ "KC_CIRCUMFLEX"
+ ]
+ },
+ "S(KC_7)": {
+ "key": "KC_AMPR",
+ "label": "&",
+ "aliases": [
+ "KC_AMPERSAND"
+ ]
+ },
+ "S(KC_8)": {
+ "key": "KC_ASTR",
+ "label": "*",
+ "aliases": [
+ "KC_ASTERISK"
+ ]
+ },
+ "S(KC_9)": {
+ "key": "KC_LPRN",
+ "label": "(",
+ "aliases": [
+ "KC_LEFT_PAREN"
+ ]
+ },
+ "S(KC_0)": {
+ "key": "KC_RPRN",
+ "label": ")",
+ "aliases": [
+ "KC_RIGHT_PAREN"
+ ]
+ },
+ "S(KC_MINUS)": {
+ "key": "KC_UNDS",
+ "label": "_",
+ "aliases": [
+ "KC_UNDERSCORE"
+ ]
+ },
+ "S(KC_EQUAL)": {
+ "key": "KC_PLUS",
+ "label": "+"
+ },
+ "S(KC_LEFT_BRACKET)": {
+ "key": "KC_LCBR",
+ "label": "{",
+ "aliases": [
+ "KC_LEFT_CURLY_BRACE"
+ ]
+ },
+ "S(KC_RIGHT_BRACKET)": {
+ "key": "KC_RCBR",
+ "label": "}",
+ "aliases": [
+ "KC_RIGHT_CURLY_BRACE"
+ ]
+ },
+ "S(KC_BACKSLASH)": {
+ "key": "KC_PIPE",
+ "label": "|"
+ },
+ "S(KC_SEMICOLON)": {
+ "key": "KC_COLN",
+ "label": ":",
+ "aliases": [
+ "KC_COLON"
+ ]
+ },
+ "S(KC_QUOTE)": {
+ "key": "KC_DQUO",
+ "label": "\"",
+ "aliases": [
+ "KC_DOUBLE_QUOTE",
+ "KC_DQT"
+ ]
+ },
+ "S(KC_COMMA)": {
+ "key": "KC_LABK",
+ "label": "<",
+ "aliases": [
+ "KC_LEFT_ANGLE_BRACKET",
+ "KC_LT"
+ ]
+ },
+ "S(KC_DOT)": {
+ "key": "KC_RABK",
+ "label": ">",
+ "aliases": [
+ "KC_RIGHT_ANGLE_BRACKET",
+ "KC_GT"
+ ]
+ },
+ "S(KC_SLASH)": {
+ "key": "KC_QUES",
+ "label": "?",
+ "aliases": [
+ "KC_QUESTION"
+ ]
+ }
+ }
+}
diff --git a/data/mappings/info_config.hjson b/data/mappings/info_config.hjson
index c1c01ff70f..414439d6e7 100644
--- a/data/mappings/info_config.hjson
+++ b/data/mappings/info_config.hjson
@@ -18,6 +18,10 @@
"BACKLIGHT_ON_STATE": {"info_key": "backlight.on_state", "value_type": "int"},
"BACKLIGHT_PIN": {"info_key": "backlight.pin"},
"BACKLIGHT_PINS": {"info_key": "backlight.pins", "value_type": "array"},
+ "BOOTMAGIC_LITE_ROW": {"info_key": "bootmagic.matrix.0", "value_type": "int"},
+ "BOOTMAGIC_LITE_COLUMN": {"info_key": "bootmagic.matrix.1", "value_type": "int"},
+ "BOOTMAGIC_LITE_ROW_RIGHT": {"info_key": "split.bootmagic.matrix.0", "value_type": "int"},
+ "BOOTMAGIC_LITE_COLUMN_RIGHT": {"info_key": "split.bootmagic.matrix.1", "value_type": "int"},
"BOTH_SHIFTS_TURNS_ON_CAPS_WORD": {"info_key": "caps_word.both_shifts_turns_on", "value_type": "bool"},
"CAPS_WORD_IDLE_TIMEOUT": {"info_key": "caps_word.idle_timeout", "value_type": "int"},
"COMBO_COUNT": {"info_key": "combo.count", "value_type": "int"},
@@ -51,6 +55,7 @@
"LED_MATRIX_VAL_STEP": {"info_key": "led_matrix.val_steps", "value_type": "int"},
"LED_MATRIX_SPD_STEP": {"info_key": "led_matrix.speed_steps", "value_type": "int"},
"MATRIX_HAS_GHOST": {"info_key": "matrix_pins.ghost", "value_type": "bool"},
+ "MATRIX_INPUT_PRESSED_STATE": {"info_key": "matrix_pins.input_pressed_state", "value_type": "int"},
"MATRIX_IO_DELAY": {"info_key": "matrix_pins.io_delay", "value_type": "int"},
"MOUSEKEY_DELAY": {"info_key": "mousekey.delay", "value_type": "int"},
"MOUSEKEY_INTERVAL": {"info_key": "mousekey.interval", "value_type": "int"},
@@ -122,7 +127,7 @@
"DEBOUNCING_DELAY": {"info_key": "_invalid.debouncing_delay", "invalid": true, "replace_with": "DEBOUNCE"},
"PREVENT_STUCK_MODIFIERS": {"info_key": "_invalid.prevent_stuck_mods", "invalid": true},
"UNUSED_PINS": {"info_key": "_invalid.unused_pins", "deprecated": true},
- "RGBLIGHT_ANIMATIONS": {"info_key": "rgblight.animations.all", "value_type": "bool", "deprecated": true},
+ "RGBLIGHT_ANIMATIONS": {"info_key": "_invalid.rgblight.animations.all", "value_type": "bool", "invalid": true},
"QMK_KEYS_PER_SCAN": {"info_key": "qmk.keys_per_scan", "value_type": "int", "deprecated": true},
// USB params, need to mark as failure when specified in config.h, rather than deprecated
diff --git a/data/mappings/info_rules.hjson b/data/mappings/info_rules.hjson
index 2f8656c4bf..b020d0c813 100644
--- a/data/mappings/info_rules.hjson
+++ b/data/mappings/info_rules.hjson
@@ -12,6 +12,7 @@
// replace_with: use with a key marked deprecated or invalid to designate a replacement
"BOARD": {"info_key": "board"},
"BOOTLOADER": {"info_key": "bootloader", "warn_duplicate": false},
+ "BOOTMAGIC_ENABLE": {"info_key": "bootmagic.enabled", "value_type": "bool"},
"BLUETOOTH_DRIVER": {"info_key": "bluetooth.driver"},
"CAPS_WORD_ENABLE": {"info_key": "caps_word.enabled", "value_type": "bool"},
"DEBOUNCE_TYPE": {"info_key": "build.debounce_type"},
diff --git a/data/schemas/keyboard.jsonschema b/data/schemas/keyboard.jsonschema
index 921726a5e9..7844bfd579 100644
--- a/data/schemas/keyboard.jsonschema
+++ b/data/schemas/keyboard.jsonschema
@@ -131,6 +131,22 @@
}
}
},
+ "bootmagic":{
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "enabled": {"type": "boolean"},
+ "matrix": {
+ "type": "array",
+ "minItems": 2,
+ "maxItems": 2,
+ "items": {
+ "type": "integer",
+ "minimum": 0
+ }
+ }
+ }
+ },
"board": {
"type": "string",
"minLength": 2,
@@ -288,6 +304,7 @@
"custom": {"type": "boolean"},
"custom_lite": {"type": "boolean"},
"ghost": {"type": "boolean"},
+ "input_pressed_state": {"$ref": "qmk.definitions.v1#/unsigned_int"},
"io_delay": {"$ref": "qmk.definitions.v1#/unsigned_int"},
"direct": {
"type": "array",
@@ -511,6 +528,21 @@
"additionalProperties": false,
"properties": {
"enabled": {"type": "boolean"},
+ "bootmagic":{
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "matrix": {
+ "type": "array",
+ "minItems": 2,
+ "maxItems": 2,
+ "items": {
+ "type": "integer",
+ "minimum": 0
+ }
+ }
+ }
+ },
"matrix_grid": {
"type": "array",
"items": {"$ref": "qmk.definitions.v1#/mcu_pin"}
diff --git a/docs/_summary.md b/docs/_summary.md
index 738c24ee42..d388d08391 100644
--- a/docs/_summary.md
+++ b/docs/_summary.md
@@ -85,6 +85,7 @@
* [Key Overrides](feature_key_overrides.md)
* [Layers](feature_layers.md)
* [One Shot Keys](one_shot_keys.md)
+ * [OS Detection](feature_os_detection.md)
* [Raw HID](feature_rawhid.md)
* [Secure](feature_secure.md)
* [Send String](feature_send_string.md)
diff --git a/docs/feature_os_detection.md b/docs/feature_os_detection.md
new file mode 100644
index 0000000000..f32e419807
--- /dev/null
+++ b/docs/feature_os_detection.md
@@ -0,0 +1,77 @@
+# OS Detection
+
+This feature makes a best guess at the host OS based on OS specific behavior during USB setup. It may not always get the correct OS, and shouldn't be relied on as for critical functionality.
+
+Using it you can have OS specific key mappings or combos which work differently on different devices.
+
+It is available for keyboards which use ChibiOS, LUFA and V-USB.
+
+## Usage
+
+In your `rules.mk` add:
+
+```make
+OS_DETECTION_ENABLE = yes
+```
+
+Include `"os_detection.h"` in your `keymap.c`.
+It declares `os_variant_t detected_host_os(void);` which you can call to get detected OS.
+
+It returns one of the following values:
+
+```c
+enum {
+ OS_UNSURE,
+ OS_LINUX,
+ OS_WINDOWS,
+ OS_MACOS,
+ OS_IOS,
+} os_variant_t;
+```
+
+?> Note that it takes some time after firmware is booted to detect the OS.
+This time is quite short, probably hundreds of milliseconds, but this data may be not ready in keyboard and layout setup functions which run very early during firmware startup.
+
+## Debug
+
+If OS is guessed incorrectly, you may want to collect data about USB setup packets to refine the detection logic.
+
+To do so in your `rules.mk` add:
+
+```make
+OS_DETECTION_DEBUG_ENABLE = yes
+CONSOLE_ENABLE = yes
+```
+
+And also include `"os_detection.h"` in your `keymap.c`.
+
+Then you can define custom keycodes to store data about USB setup packets in EEPROM (persistent memory) and to print it later on host where you can run `qmk console`:
+
+```c
+enum custom_keycodes {
+ STORE_SETUPS = SAFE_RANGE,
+ PRINT_SETUPS,
+};
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case STORE_SETUPS:
+ if (record->event.pressed) {
+ store_setups_in_eeprom();
+ }
+ return false;
+ case PRINT_SETUPS:
+ if (record->event.pressed) {
+ print_stored_setups();
+ }
+ return false;
+ }
+}
+```
+
+Then please open an issue on Github with this information and tell what OS was not detected correctly and if you have any intermediate devices between keyboard and your computer.
+
+
+## Credits
+
+Original idea is coming from [FingerprintUSBHost](https://github.com/keyboardio/FingerprintUSBHost) project.
diff --git a/docs/feature_pointing_device.md b/docs/feature_pointing_device.md
index be984dd5a5..ecb7ee42cb 100644
--- a/docs/feature_pointing_device.md
+++ b/docs/feature_pointing_device.md
@@ -22,11 +22,11 @@ POINTING_DEVICE_DRIVER = adns5050
The ADNS 5050 sensor uses a serial type protocol for communication, and requires an additional light source.
-| Setting | Description | Default |
-| ------------------- | ------------------------------------------------------------------- | -------------------------- |
-| `ADNS5050_SCLK_PIN` | (Required) The pin connected to the clock pin of the sensor. | `POINTING_DEVICE_SCLK_PIN` |
-| `ADNS5050_SDIO_PIN` | (Required) The pin connected to the data pin of the sensor. | `POINTING_DEVICE_SDIO_PIN` |
-| `ADNS5050_CS_PIN` | (Required) The pin connected to the cable select pin of the sensor. | `POINTING_DEVICE_CS_PIN` |
+| Setting | Description | Default |
+| ------------------- | ------------------------------------------------------------------ | -------------------------- |
+| `ADNS5050_SCLK_PIN` | (Required) The pin connected to the clock pin of the sensor. | `POINTING_DEVICE_SCLK_PIN` |
+| `ADNS5050_SDIO_PIN` | (Required) The pin connected to the data pin of the sensor. | `POINTING_DEVICE_SDIO_PIN` |
+| `ADNS5050_CS_PIN` | (Required) The pin connected to the Chip Select pin of the sensor. | `POINTING_DEVICE_CS_PIN` |
@@ -48,7 +48,7 @@ The ADNS 9800 is an SPI driven optical sensor, that uses laser output for surfac
| `ADNS9800_SPI_LSBFIRST` | (Optional) Sets the Least/Most Significant Byte First setting for SPI. | `false` |
| `ADNS9800_SPI_MODE` | (Optional) Sets the SPI Mode for the sensor. | `3` |
| `ADNS9800_SPI_DIVISOR` | (Optional) Sets the SPI Divisor used for SPI communication. | _varies_ |
-| `ADNS9800_CS_PIN` | (Required) Sets the Cable Select pin connected to the sensor. | `POINTING_DEVICE_CS_PIN` |
+| `ADNS9800_CS_PIN` | (Required) Sets the Chip Select pin connected to the sensor. | `POINTING_DEVICE_CS_PIN` |
The CPI range is 800-8200, in increments of 200. Defaults to 1800 CPI.
@@ -124,7 +124,7 @@ Default attenuation is set to 4X, although if you are using a thicker overlay (s
| `CIRQUE_PINNACLE_SPI_LSBFIRST` | (Optional) Sets the Least/Most Significant Byte First setting for SPI. | `false` |
| `CIRQUE_PINNACLE_SPI_MODE` | (Optional) Sets the SPI Mode for the sensor. | `1` |
| `CIRQUE_PINNACLE_SPI_DIVISOR` | (Optional) Sets the SPI Divisor used for SPI communication. | _varies_ |
-| `CIRQUE_PINNACLE_SPI_CS_PIN` | (Required) Sets the Cable Select pin connected to the sensor. | `POINTING_DEVICE_CS_PIN` |
+| `CIRQUE_PINNACLE_SPI_CS_PIN` | (Required) Sets the Chip Select pin connected to the sensor. | `POINTING_DEVICE_CS_PIN` |
Default Scaling is 1024. Actual CPI depends on trackpad diameter.
@@ -218,11 +218,14 @@ POINTING_DEVICE_DRIVER = pmw3389
The CPI range is 50-16000, in increments of 50. Defaults to 2000 CPI.
Both PMW 3360 and PMW 3389 are SPI driven optical sensors, that use a built in IR LED for surface tracking.
+If you have different CS wiring on each half you can use `PMW33XX_CS_PIN_RIGHT` or `PMW33XX_CS_PINS_RIGHT` in combination with `PMW33XX_CS_PIN` or `PMW33XX_CS_PINS` to configure both sides independently. If `_RIGHT` values aren't provided, they default to be the same as the left ones.
| Setting | Description | Default |
| ---------------------------- | ------------------------------------------------------------------------------------------- | ------------------------ |
-| `PMW33XX_CS_PIN` | (Required) Sets the Cable Select pin connected to the sensor. | `POINTING_DEVICE_CS_PIN` |
-| `PMW33XX_CS_PINS` | (Alternative) Sets the Cable Select pins connected to multiple sensors. | _not defined_ |
+| `PMW33XX_CS_PIN` | (Required) Sets the Chip Select pin connected to the sensor. | `POINTING_DEVICE_CS_PIN` |
+| `PMW33XX_CS_PINS` | (Alternative) Sets the Chip Select pins connected to multiple sensors. | `{PMW33XX_CS_PIN}` |
+| `PMW33XX_CS_PIN_RIGHT` | (Optional) Sets the Chip Select pin connected to the sensor on the right half. | `PMW33XX_CS_PIN` |
+| `PMW33XX_CS_PINS_RIGHT` | (Optional) Sets the Chip Select pins connected to multiple sensors on the right half. | `{PMW33XX_CS_PIN_RIGHT}` |
| `PMW33XX_CPI` | (Optional) Sets counts per inch sensitivity of the sensor. | _varies_ |
| `PMW33XX_CLOCK_SPEED` | (Optional) Sets the clock speed that the sensor runs at. | `2000000` |
| `PMW33XX_SPI_DIVISOR` | (Optional) Sets the SPI Divisor used for SPI communication. | _varies_ |
diff --git a/docs/ja/feature_grave_esc.md b/docs/ja/feature_grave_esc.md
index 8c6680d74d..746e9e5d14 100644
--- a/docs/ja/feature_grave_esc.md
+++ b/docs/ja/feature_grave_esc.md
@@ -9,7 +9,7 @@
## 使用法
-キーマップ内の `KC_GRAVE` キー (通常は`1` キーの左)を `KC_GESC` に置き換えます。ほとんどの場合、このキーは押された時に `KC_ESC` を出力します。ただし、Shift あるいは GUI を押したままにすると、代わりに `KC_GRV` を出力します。
+キーマップ内の `KC_GRAVE` キー (通常は`1` キーの左)を `QK_GESC` に置き換えます。ほとんどの場合、このキーは押された時に `KC_ESC` を出力します。ただし、Shift あるいは GUI を押したままにすると、代わりに `KC_GRV` を出力します。
## OS に見えるもの
@@ -19,7 +19,7 @@
| キー | エイリアス | 説明 |
|---------|-----------|------------------------------------------------------------------|
-| `KC_GESC` | `GRAVE_ESC` | 押された場合に Escape。Shift あるいは GUI が押されたままの場合は <code>&#96;</code> |
+| `QK_GESC` | `GRAVE_ESC` | 押された場合に Escape。Shift あるいは GUI が押されたままの場合は <code>&#96;</code> |
### 注意事項
diff --git a/docs/newbs_building_firmware.md b/docs/newbs_building_firmware.md
index 6163c6b02e..de9217e9f0 100644
--- a/docs/newbs_building_firmware.md
+++ b/docs/newbs_building_firmware.md
@@ -28,7 +28,7 @@ If you did not configure your environment, or you have multiple keyboards, you c
Look at the output from that command, you should see something like this:
- Ψ <github_username> keymap directory created in: /home/me/qmk_firmware/keyboards/clueboard/66/rev3/keymaps/<github_username>
+ Ψ Created a new keymap called <github_username> in: /home/me/qmk_firmware/keyboards/clueboard/66/rev3/keymaps/<github_username>.
This is the location of your new `keymap.c` file.
diff --git a/docs/platformdev_rp2040.md b/docs/platformdev_rp2040.md
index 3a6f1a1683..11a93edd89 100644
--- a/docs/platformdev_rp2040.md
+++ b/docs/platformdev_rp2040.md
@@ -38,8 +38,8 @@ QMK RP2040 support builds upon ChibiOS and thus follows their convention for act
| RP2040 Peripheral | `mcuconf.h` values | `I2C_DRIVER` |
| ----------------- | ------------------ | ------------ |
-| `I2C0` | `RP_I2C_USE_I2C0` | `I2CD1` |
-| `I2C1` | `RP_I2C_USE_I2C1` | `I2CD2` |
+| `I2C0` | `RP_I2C_USE_I2C0` | `I2CD0` |
+| `I2C1` | `RP_I2C_USE_I2C1` | `I2CD1` |
To configure the I2C driver please read the [ChibiOS/ARM](i2c_driver.md#arm-configuration) section.
@@ -74,7 +74,7 @@ This is the default board that is chosen, unless any other RP2040 board is selec
| Driver configuration define | Value |
| -------------------------------------------------------------------------- | ------------------------------------ |
| **I2C driver** | |
-| `I2C_DRIVER` | `I2CD2` |
+| `I2C_DRIVER` | `I2CD1` |
| `I2C1_SDA_PIN` | `GP2` |
| `I2C1_SCL_PIN` | `GP3` |
| **SPI driver** | |
diff --git a/docs/reference_info_json.md b/docs/reference_info_json.md
index d5469c835a..354863f507 100644
--- a/docs/reference_info_json.md
+++ b/docs/reference_info_json.md
@@ -113,6 +113,20 @@ Example:
}
```
+### Additional Options
+
+* `input_pressed_state`
+ * This configures state of the GPIO pins when the key is pressed - `1` for high, `0` for low
+ * Default: `0`
+
+Example:
+
+```json
+ "matrix_pins": {
+ "input_pressed_state": 1,
+},
+```
+
## Non-RGB LED Lighting
This section controls basic 2-pin LEDs, which typically pass through keyswitches and are soldered into the PCB, or are placed in PCB sockets.
@@ -333,3 +347,24 @@ Example:
}
}
```
+
+## Bootmagic
+
+This section configures [Bootmagic Lite](feature_bootmagic.md) support.
+
+The following options can be configured:
+
+|Key |Description |
+|---------|-----------------------------------------------------------------------------|
+|`matrix` | A two item list describing the row and column location for the trigger key. |
+
+Example:
+
+```json
+{
+ "bootmagic": {
+ "enabled": true,
+ "matrix": [0, 0]
+ },
+}
+```
diff --git a/docs/zh-cn/feature_grave_esc.md b/docs/zh-cn/feature_grave_esc.md
index f57dabeaff..1795a508ef 100644
--- a/docs/zh-cn/feature_grave_esc.md
+++ b/docs/zh-cn/feature_grave_esc.md
@@ -11,7 +11,7 @@
## 使用方法
-在配列中使用 `KC_GESC` 替换 `KC_GRAVE` (一般都在`1`键左边)。默认点击会输出 `KC_ESC`,按下Shift或GUI键时,点击会输出 `KC_GRV`
+在配列中使用 `QK_GESC` 替换 `KC_GRAVE` (一般都在`1`键左边)。默认点击会输出 `KC_ESC`,按下Shift或GUI键时,点击会输出 `KC_GRV`
## 操作系统视角
@@ -21,7 +21,7 @@
|键 |别名 |描述 |
|---------|-----------|------------------------------------------------------------------|
-|`KC_GESC`|`GRAVE_ESC`|单击输出Escape, 按住Shift或GUI时输出<code>&#96;</code> |
+|`QK_GESC`|`GRAVE_ESC`|单击输出Escape, 按住Shift或GUI时输出<code>&#96;</code> |
### 须留意
diff --git a/drivers/sensors/pmw3360.c b/drivers/sensors/pmw3360.c
index 2c6d91d588..81dca002e2 100644
--- a/drivers/sensors/pmw3360.c
+++ b/drivers/sensors/pmw3360.c
@@ -9,8 +9,6 @@
#include "pmw33xx_common.h"
#include "progmem.h"
-extern const size_t pmw33xx_number_of_sensors;
-
uint16_t pmw33xx_get_cpi(uint8_t sensor) {
if (sensor >= pmw33xx_number_of_sensors) {
return 0;
diff --git a/drivers/sensors/pmw33xx_common.c b/drivers/sensors/pmw33xx_common.c
index b8d4e532ca..82a7ec3297 100644
--- a/drivers/sensors/pmw33xx_common.c
+++ b/drivers/sensors/pmw33xx_common.c
@@ -1,3 +1,4 @@
+// Copyright 2022 Pablo Martinez (@elpekenin)
// Copyright 2022 Daniel Kao (dkao)
// Copyright 2022 Stefan Kerkmann (KarlK90)
// Copyright 2022 Ulrich Spörlein (@uqs)
@@ -17,10 +18,11 @@
extern const uint8_t pmw33xx_firmware_data[PMW33XX_FIRMWARE_LENGTH] PROGMEM;
extern const uint8_t pmw33xx_firmware_signature[3] PROGMEM;
-static const pin_t cs_pins[] = PMW33XX_CS_PINS;
-static bool in_burst[ARRAY_SIZE(cs_pins)] = {0};
+static const pin_t cs_pins_left[] = PMW33XX_CS_PINS;
+static const pin_t cs_pins_right[] = PMW33XX_CS_PINS_RIGHT;
-const size_t pmw33xx_number_of_sensors = ARRAY_SIZE(cs_pins);
+static bool in_burst_left[ARRAY_SIZE(cs_pins_left)] = {0};
+static bool in_burst_right[ARRAY_SIZE(cs_pins_right)] = {0};
bool __attribute__((cold)) pmw33xx_upload_firmware(uint8_t sensor);
bool __attribute__((cold)) pmw33xx_check_signature(uint8_t sensor);
diff --git a/drivers/sensors/pmw33xx_common.h b/drivers/sensors/pmw33xx_common.h
index c725e80f24..88523b8420 100644
--- a/drivers/sensors/pmw33xx_common.h
+++ b/drivers/sensors/pmw33xx_common.h
@@ -1,3 +1,4 @@
+// Copyright 2022 Pablo Martinez (@elpekenin)
// Copyright 2022 Daniel Kao (dkao)
// Copyright 2022 Stefan Kerkmann (KarlK90)
// Copyright 2022 Ulrich Spörlein (@uqs)
@@ -9,6 +10,7 @@
#pragma once
+#include "quantum.h" //to get is_keyboard_left
#include <stdint.h>
#include "spi_master.h"
#include "util.h"
@@ -79,6 +81,20 @@ _Static_assert(sizeof((pmw33xx_report_t){0}.motion) == 1, "pmw33xx_report_t.moti
# endif
#endif
+// Support single spelling and default to be the same as left side
+#if !defined(PMW33XX_CS_PINS_RIGHT)
+# if !defined(PMW33XX_CS_PIN_RIGHT)
+# define PMW33XX_CS_PIN_RIGHT PMW33XX_CS_PIN
+# endif
+# define PMW33XX_CS_PINS_RIGHT \
+ { PMW33XX_CS_PIN_RIGHT }
+#endif
+
+// Defines so the old variable names are swapped by the appropiate value on each half
+#define cs_pins (is_keyboard_left() ? cs_pins_left : cs_pins_right)
+#define in_burst (is_keyboard_left() ? in_burst_left : in_burst_right)
+#define pmw33xx_number_of_sensors (is_keyboard_left() ? ARRAY_SIZE((pin_t[])PMW33XX_CS_PINS) : ARRAY_SIZE((pin_t[])PMW33XX_CS_PINS_RIGHT))
+
#if PMW33XX_CPI > PMW33XX_CPI_MAX || PMW33XX_CPI < PMW33XX_CPI_MIN || (PMW33XX_CPI % PMW33XX_CPI_STEP) != 0U
# pragma message "PMW33XX_CPI has to be in the range of " STR(PMW33XX_CPI_MAX) "-" STR(PMW33XX_CPI_MIN) " in increments of " STR(PMW33XX_CPI_STEP) ". But it is " STR(PMW33XX_CPI) "."
# error Use correct PMW33XX_CPI value.
diff --git a/keyboards/1upkeyboards/pi40/config.h b/keyboards/1upkeyboards/pi40/config.h
index 5e0d0e12ae..ce63293269 100644
--- a/keyboards/1upkeyboards/pi40/config.h
+++ b/keyboards/1upkeyboards/pi40/config.h
@@ -11,7 +11,7 @@
# define OLED_DISPLAY_128X32
#define I2C1_SCL_PIN GP17
#define I2C1_SDA_PIN GP16
-#define I2C_DRIVER I2CD1
+#define I2C_DRIVER I2CD0
#define OLED_BRIGHTNESS 128
#define OLED_FONT_H "keyboards/1upkeyboards/pi40/lib/glcdfont.c"
#endif
@@ -96,4 +96,4 @@
/* Bootmagic Lite key configuration */
#define BOOTMAGIC_LITE_ROW 0
-#define BOOTMAGIC_LITE_COLUMN 0 \ No newline at end of file
+#define BOOTMAGIC_LITE_COLUMN 0
diff --git a/keyboards/anavi/knob1/config.h b/keyboards/anavi/knob1/config.h
index f677aa9b23..178e0f45ca 100644
--- a/keyboards/anavi/knob1/config.h
+++ b/keyboards/anavi/knob1/config.h
@@ -23,7 +23,7 @@
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 500U
-#define I2C_DRIVER I2CD2
+#define I2C_DRIVER I2CD1
#define I2C1_SDA_PIN GP6
#define I2C1_SCL_PIN GP7
diff --git a/keyboards/atreus/keymaps/replicaJunction/config.h b/keyboards/atreus/keymaps/replicaJunction/config.h
deleted file mode 100644
index a02f9a95db..0000000000
--- a/keyboards/atreus/keymaps/replicaJunction/config.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/* Copyright 2021 Joshua T.
- *
- * 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
-
-// Do not allow one macro to contain the other macro
-#define DYNAMIC_MACRO_NO_NESTING
-
-// "THE most important tap hold configuration setting"
-// https://precondition.github.io/home-row-mods#ignore-mod-tap-interrupt
-// https://docs.qmk.fm/#/tap_hold?id=ignore-mod-tap-interrupt
-#define IGNORE_MOD_TAP_INTERRUPT
-
-// This one is a style choice. Play with it both on and off to see which
-// one suits you better.
-// https://precondition.github.io/home-row-mods#permissive-hold
-// https://docs.qmk.fm/#/tap_hold?id=permissive-hold
-#define PERMISSIVE_HOLD
-
-// If you press a dual-role key for longer than TAPPING_TERM, then
-// release it without pressing another key, without this setting nothing
-// would happen. With this setting, it sends the key's tap function.
-// https://precondition.github.io/home-row-mods#retro-tapping
-#define RETRO_TAPPING
-
-// Disable some unused features to save space
-#undef LOCKING_SUPPORT_ENABLE
-#undef LOCKING_RESYNC_ENABLE
-
-/////
-// Flags for stuff in my userspace
-
-#define USER_INCLUDE_GAMING_LAYER
-#define USER_INCLUDE_MACRO_LAYER
-
-// "Super Alt-Tab"
-// https://docs.qmk.fm/#/feature_macros?id=super-alt%E2%86%AFtab
-#define USER_SUPER_ALT_TAB_TIMEOUT 500
diff --git a/keyboards/atreus/keymaps/replicaJunction/keymap.c b/keyboards/atreus/keymaps/replicaJunction/keymap.c
deleted file mode 100644
index fbefb52df6..0000000000
--- a/keyboards/atreus/keymaps/replicaJunction/keymap.c
+++ /dev/null
@@ -1,95 +0,0 @@
-/* Copyright 2021 Joshua T.
- *
- * 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 "replicaJunction.h"
-
-#define BSP_SYM LT(L_SYMBOLS, KC_BSPC)
-#define SPC_NAV LT(L_NAVIGATION, KC_SPC)
-#define EQL_FUN LT(L_FN, KC_EQL)
-
-#define ESC_SFT LSFT_T(KC_ESC)
-#define TAB_SFT RSFT_T(KC_TAB)
-
-#define DF_TYPE DF(L_BASE)
-#define DF_GAME DF(L_GAMING)
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-
-[L_BASE] = LAYOUT(
- KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SCLN,
- KC_A, KC_R, KC_S, KC_T, KC_G, KC_M, KC_N, KC_E, KC_I, KC_O,
- KC_Z, KC_X, KC_C, KC_D, KC_V, KC_K, KC_H, KC_COMM,KC_DOT, KC_SLSH,
- KC_ESC, KC_LGUI,KC_TAB, ESC_SFT,BSP_SYM,CTL_DEL,ALT_ENT,SPC_NAV,TAB_SFT,KC_MINS,KC_QUOT,EQL_FUN
-),
-
-[L_GAMING] = LAYOUT(
- _______,_______,_______,_______,_______, _______,_______,_______,_______,_______,
- _______,_______,_______,_______,_______, _______,_______,_______,_______,_______,
- _______,_______,KC_C, KC_D, _______, _______,_______,_______,_______,_______,
- _______,KC_TAB, KC_LALT,KC_LSFT,KC_SPC, KC_LCTL,KC_LALT,KC_BSPC,KC_BTN1,KC_BTN2,KC_BTN3,_______
-),
-
-[L_NUMBERS] = LAYOUT(
- _______,_______,_______,_______,_______, KC_HASH,KC_7, KC_8, KC_9, KC_SLSH,
- _______,_______,_______,_______,_______, KC_PLUS,KC_4, KC_5, KC_6, KC_ASTR,
- _______,_______,_______,_______,_______, KC_MINS,KC_1, KC_2, KC_3, KC_BSLS,
- _______,_______,_______,_______,_______,_______,_______,_______,KC_0, KC_0, KC_DOT, KC_ENT
-),
-
-[L_SYMBOLS] = LAYOUT(
- KC_AT, KC_LT, KC_DLR, KC_GT, XXXXXXX, XXXXXXX,KC_LBRC,KC_UNDS,KC_RBRC,XXXXXXX,
- KC_BSLS,KC_LPRN,KC_DQUO,KC_RPRN,KC_HASH, KC_PERC,KC_LCBR,KC_EQL, KC_RCBR,KC_PIPE,
- KC_EXLM,KC_COLN,KC_ASTR,KC_PLUS,XXXXXXX, XXXXXXX,KC_AMPR,KC_CIRC,KC_TILD,KC_GRV,
- _______,_______,_______,_______,ooooooo,_______,_______,ooooooo,CAPWORD,_______,_______,_______
-),
-
-[L_NAVIGATION] = LAYOUT(
- OS_UNDO,OS_CUT, OS_PAST,OS_COPY,OS_SALL, KC_PGUP,KC_HOME,KC_UP, KC_END, KC_DEL,
- KC_LGUI,KC_LALT,KC_LSFT,KC_LCTL,_______, KC_PGDN,KC_LEFT,KC_DOWN,KC_RGHT,KC_BSPC,
- WIN_V, _______,_______,OS_FIND,SEARCH, _______,SFT_TAB,KC_TAB, KC_APP, KC_PSCR,
- _______,_______,_______,NUMWORD,ooooooo,_______,_______,ooooooo,_______,_______,_______,_______
-),
-
-[L_FN] = LAYOUT(
- QK_BOOT, _______,_______,_______,_______, KC_VOLU,KC_F9, KC_F10, KC_F11, KC_F12,
- MS_JIGL,_______,_______,_______,_______, KC_MUTE,KC_F5, KC_F6, KC_F7, KC_F8,
- _______,K_SECR1,K_SECR2,K_SECR3,K_SECR4, KC_VOLD,KC_F1, KC_F2, KC_F3, KC_F4,
- DF_TYPE,DF_GAME,_______,_______,_______,KC_LCTL,KC_LALT,_______,_______,_______,_______,ooooooo
-),
-
-[L_MACROS] = LAYOUT(
- QK_MAKE,_______,DM_REC2,DM_REC1,DM_RSTP, _______,SHEBANG,_______,_______,_______,
- QK_FLSH,_______,DM_PLY2,DM_PLY1,_______, PRG_NE, PRG_EQ, PRG_GEQ,PRG_LEQ,PRG_ARR,
- QK_VERS,_______,_______,_______,_______, _______,PS_ITEM,FS_PIPE,_______,FS_ARR,
- _______,_______,_______,_______,ooooooo,_______,_______,ooooooo,_______,_______,_______,_______
-)
-
-
-// Template
-// [L_FUNC] = LAYOUT(
-// _______,_______,_______,_______,_______, _______,_______,_______,_______,_______,
-// _______,_______,_______,_______,_______, _______,_______,_______,_______,_______,
-// _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,
-// _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______
-// ),
-
-};
-
-layer_state_t layer_state_set_user(layer_state_t state) {
- return update_tri_layer_state(state, L_SYMBOLS, L_NAVIGATION, L_MACROS);
-}
-
diff --git a/keyboards/atreus/keymaps/replicaJunction/readme.md b/keyboards/atreus/keymaps/replicaJunction/readme.md
deleted file mode 100644
index 6aa356f4f7..0000000000
--- a/keyboards/atreus/keymaps/replicaJunction/readme.md
+++ /dev/null
@@ -1,7 +0,0 @@
-# replicaJunction - Atreus Layout
-
-I no longer actively use this keyboard. I've replaced it with the [Keyboardio Atreus](../../../keyboardio/atreus/keymaps/replicaJunction/readme.md).
-
-I still try to make sure the layout compiles, but I'm no longer tweaking it or adding new features.
-
-Most of the interesting features in this layout are defined in [my userspace folder](../../../../users/replicaJunction/readme.md). Refer to the documentation and code there for more details.
diff --git a/keyboards/atreus/keymaps/replicaJunction/rules.mk b/keyboards/atreus/keymaps/replicaJunction/rules.mk
deleted file mode 100644
index 13730aec65..0000000000
--- a/keyboards/atreus/keymaps/replicaJunction/rules.mk
+++ /dev/null
@@ -1,28 +0,0 @@
-# Userspace options
-USER_CAPS_WORD_ENABLE = yes
-USER_MOUSE_JIGGLE_ENABLE = yes
-USER_NUM_WORD_ENABLE = yes
-USER_SECRETS_ENABLE = yes
-
-DYNAMIC_MACRO_ENABLE = yes
-
-# Extra features that are nice but takes space. Enable only if they're
-# used in the layout.
-WPM_ENABLE = no
-# EXTRAKEY_ENABLE = no # For volume keys and similar
-# MOUSEKEY_ENABLE = no # Them mouse keys yo
-KEY_OVERRIDE_ENABLE = no
-LEADER_ENABLE = no
-TAP_DANCE_ENABLE = no
-# RGBLIGHT_ENABLE = no # Keyboard RGB underglow
-RGB_MATRIX_ENABLE = no
-
-# Features I definitely don't care aboud
-LTO_ENABLE = yes
-CONSOLE_ENABLE = no
-VERBOSE = no
-DEBUG_MATRIX_SCAN_RATE = no
-DEBUG_MATRIX = no
-MAGIC_ENABLE = no
-SPACE_CADET_ENABLE = no
-GRAVE_ESC_ENABLE = no
diff --git a/keyboards/bioi/f60/readme.md b/keyboards/bioi/f60/readme.md
index 9b5c8e8591..8c32c7e7f9 100644
--- a/keyboards/bioi/f60/readme.md
+++ b/keyboards/bioi/f60/readme.md
@@ -21,5 +21,5 @@ See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_to
## Bootloader
* **Bootmagic reset**: Hold down the top left key (ESC) and plug in the keyboard
-* **Physical reset button**: Short the two small pads labeled "QK_BOOT" the back of the PCB
+* **Physical reset button**: Short the two small pads labeled `RESET` the back of the PCB
* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available
diff --git a/keyboards/bioi/main.c b/keyboards/bioi/main.c
index bba54dfab1..eb149eb7cd 100644
--- a/keyboards/bioi/main.c
+++ b/keyboards/bioi/main.c
@@ -56,7 +56,7 @@ extern keymap_config_t keymap_config;
#include "virtser.h"
#endif
-#if (defined(RGB_MIDI) | defined(RGBLIGHT_ANIMATIONS)) & defined(RGBLIGHT_ENABLE)
+#if defined(RGBLIGHT_ENABLE)
#include "rgblight.h"
#endif
diff --git a/keyboards/boardsource/lulu/rp2040/config.h b/keyboards/boardsource/lulu/rp2040/config.h
index 2e02e03500..2c86e48e6f 100644
--- a/keyboards/boardsource/lulu/rp2040/config.h
+++ b/keyboards/boardsource/lulu/rp2040/config.h
@@ -6,6 +6,6 @@
#define SERIAL_USART_FULL_DUPLEX
#define SERIAL_USART_TX_PIN GP0
#define SERIAL_USART_RX_PIN GP1
-#define I2C_DRIVER I2CD2
+#define I2C_DRIVER I2CD1
#define I2C1_SDA_PIN GP22
#define I2C1_SCL_PIN GP23
diff --git a/keyboards/bobpad/readme.md b/keyboards/bobpad/readme.md
index 75e6e03202..c69f2e9d99 100644
--- a/keyboards/bobpad/readme.md
+++ b/keyboards/bobpad/readme.md
@@ -19,7 +19,7 @@ Flashing example for this keyboard:
## Bootloader
Enter the bootloader in 3 ways:
-* **Physical reset button**: Briefly short the pad connected to QK_BOOT and GND on the back
+* **Physical reset button**: Briefly short the pad connected to *RESET* and *GND* on the back
* **Keycode in layout**: Press the key mapped to `QK_BOOT`, this is the recommened method
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/cannonkeys/ortho60v2/config.h b/keyboards/cannonkeys/ortho60v2/config.h
new file mode 100644
index 0000000000..2af75a1715
--- /dev/null
+++ b/keyboards/cannonkeys/ortho60v2/config.h
@@ -0,0 +1,23 @@
+/*
+Copyright 2022 CannonKeys
+
+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 RP2040_BOOTLOADER_DOUBLE_TAP_RESET // Activates the double-tap behavior
+#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 200U // Timeout window in ms in which the double tap can occur.
+
+#define BACKLIGHT_PWM_DRIVER PWMD6
+#define BACKLIGHT_PWM_CHANNEL RP2040_PWM_CHANNEL_A
diff --git a/keyboards/kprepublic/bm16a/bm16a.c b/keyboards/cannonkeys/ortho60v2/halconf.h
index 9676b50119..cef26f106c 100644
--- a/keyboards/kprepublic/bm16a/bm16a.c
+++ b/keyboards/cannonkeys/ortho60v2/halconf.h
@@ -1,4 +1,5 @@
-/* Copyright 2019
+ /*
+ * Copyright Andrew Kannan 2022
*
* 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
@@ -13,4 +14,10 @@
* 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 "bm16a.h"
+
+
+#pragma once
+
+#define HAL_USE_PWM TRUE
+
+#include_next <halconf.h>
diff --git a/keyboards/cannonkeys/ortho60v2/info.json b/keyboards/cannonkeys/ortho60v2/info.json
new file mode 100644
index 0000000000..08f5321d84
--- /dev/null
+++ b/keyboards/cannonkeys/ortho60v2/info.json
@@ -0,0 +1,105 @@
+{
+ "keyboard_name": "Ortho60 v2",
+ "maintainer": "awkannan",
+ "manufacturer": "CannonKeys",
+ "processor": "RP2040",
+ "bootloader": "rp2040",
+ "usb": {
+ "vid": "0xCA04",
+ "pid": "0x0019",
+ "device_version": "0.0.1"
+ },
+ "url": "https://cannonkeys.com",
+ "diode_direction": "COL2ROW",
+ "matrix_pins": {
+ "cols": ["GP7", "GP6", "GP5", "GP4", "GP3", "GP2", "GP1", "GP0", "GP13", "GP24", "GP23", "GP22"],
+ "rows": ["GP27", "GP18", "GP19", "GP25", "GP26"]
+ },
+ "features": {
+ "bootmagic": true,
+ "command": false,
+ "console": false,
+ "extrakey": true,
+ "mousekey": true,
+ "nkro": true,
+ "backlight": true,
+ "encoder": true
+ },
+ "encoder": {
+ "rotary": [
+ { "pin_a": "GP28", "pin_b": "GP29" }
+ ]
+ },
+ "backlight": {
+ "breathing": true,
+ "breathing_period": 5,
+ "levels": 15,
+ "pin": "GP12"
+ },
+ "layouts": {
+ "LAYOUT_ortho_5x12": {
+ "layout": [
+ { "label": "`", "matrix": [0, 0], "x": 0.0, "y": 0.0 },
+ { "label": "1", "matrix": [0, 1], "x": 1.0, "y": 0.0 },
+ { "label": "2", "matrix": [0, 2], "x": 2.0, "y": 0.0 },
+ { "label": "3", "matrix": [0, 3], "x": 3.0, "y": 0.0 },
+ { "label": "4", "matrix": [0, 4], "x": 4.0, "y": 0.0 },
+ { "label": "5", "matrix": [0, 5], "x": 5.0, "y": 0.0 },
+ { "label": "6", "matrix": [0, 6], "x": 6.0, "y": 0.0 },
+ { "label": "7", "matrix": [0, 7], "x": 7.0, "y": 0.0 },
+ { "label": "8", "matrix": [0, 8], "x": 8.0, "y": 0.0 },
+ { "label": "9", "matrix": [0, 9], "x": 9.0, "y": 0.0 },
+ { "label": "0", "matrix": [0, 10], "x": 10.0, "y": 0.0 },
+ { "label": "Del", "matrix": [0, 11], "x": 11.0, "y": 0.0 },
+ { "label": "Tab", "matrix": [1, 0], "x": 0.0, "y": 1.0 },
+ { "label": "Q", "matrix": [1, 1], "x": 1.0, "y": 1.0 },
+ { "label": "W", "matrix": [1, 2], "x": 2.0, "y": 1.0 },
+ { "label": "E", "matrix": [1, 3], "x": 3.0, "y": 1.0 },
+ { "label": "R", "matrix": [1, 4], "x": 4.0, "y": 1.0 },
+ { "label": "T", "matrix": [1, 5], "x": 5.0, "y": 1.0 },
+ { "label": "Y", "matrix": [1, 6], "x": 6.0, "y": 1.0 },
+ { "label": "U", "matrix": [1, 7], "x": 7.0, "y": 1.0 },
+ { "label": "I", "matrix": [1, 8], "x": 8.0, "y": 1.0 },
+ { "label": "O", "matrix": [1, 9], "x": 9.0, "y": 1.0 },
+ { "label": "P", "matrix": [1, 10], "x": 10.0, "y": 1.0 },
+ { "label": "Back Space", "matrix": [1, 11], "x": 11.0, "y": 1.0 },
+ { "label": "Esc", "matrix": [2, 0], "x": 0.0, "y": 2.0 },
+ { "label": "A", "matrix": [2, 1], "x": 1.0, "y": 2.0 },
+ { "label": "S", "matrix": [2, 2], "x": 2.0, "y": 2.0 },
+ { "label": "D", "matrix": [2, 3], "x": 3.0, "y": 2.0 },
+ { "label": "F", "matrix": [2, 4], "x": 4.0, "y": 2.0 },
+ { "label": "G", "matrix": [2, 5], "x": 5.0, "y": 2.0 },
+ { "label": "H", "matrix": [2, 6], "x": 6.0, "y": 2.0 },
+ { "label": "J", "matrix": [2, 7], "x": 7.0, "y": 2.0 },
+ { "label": "K", "matrix": [2, 8], "x": 8.0, "y": 2.0 },
+ { "label": "L", "matrix": [2, 9], "x": 9.0, "y": 2.0 },
+ { "label": ";", "matrix": [2, 10], "x": 10.0, "y": 2.0 },
+ { "label": "'", "matrix": [2, 11], "x": 11.0, "y": 2.0 },
+ { "label": "Shift", "matrix": [3, 0], "x": 0.0, "y": 3.0 },
+ { "label": "Z", "matrix": [3, 1], "x": 1.0, "y": 3.0 },
+ { "label": "X", "matrix": [3, 2], "x": 2.0, "y": 3.0 },
+ { "label": "C", "matrix": [3, 3], "x": 3.0, "y": 3.0 },
+ { "label": "V", "matrix": [3, 4], "x": 4.0, "y": 3.0 },
+ { "label": "B", "matrix": [3, 5], "x": 5.0, "y": 3.0 },
+ { "label": "N", "matrix": [3, 6], "x": 6.0, "y": 3.0 },
+ { "label": "M", "matrix": [3, 7], "x": 7.0, "y": 3.0 },
+ { "label": ",", "matrix": [3, 8], "x": 8.0, "y": 3.0 },
+ { "label": ".", "matrix": [3, 9], "x": 9.0, "y": 3.0 },
+ { "label": "/", "matrix": [3, 10], "x": 10.0, "y": 3.0 },
+ { "label": "Return", "matrix": [3, 11], "x": 11.0, "y": 3.0 },
+ { "matrix": [4, 0], "x": 0.0, "y": 4.0 },
+ { "label": "Ctrl", "matrix": [4, 1], "x": 1.0, "y": 4.0 },
+ { "label": "Alt", "matrix": [4, 2], "x": 2.0, "y": 4.0 },
+ { "label": "Super", "matrix": [4, 3], "x": 3.0, "y": 4.0 },
+ { "label": "Lower", "matrix": [4, 4], "x": 4.0, "y": 4.0 },
+ { "matrix": [4, 5], "x": 5.0, "y": 4.0 },
+ { "matrix": [4, 6], "x": 6.0, "y": 4.0 },
+ { "label": "Raise", "matrix": [4, 7], "x": 7.0, "y": 4.0 },
+ { "label": "&larr;", "matrix": [4, 8], "x": 8.0, "y": 4.0 },
+ { "label": "&darr;", "matrix": [4, 9], "x": 9.0, "y": 4.0 },
+ { "label": "&uarr;", "matrix": [4, 10], "x": 10.0, "y": 4.0 },
+ { "label": "&rarr;", "matrix": [4, 11], "x": 11.0, "y": 4.0 }
+ ]
+ }
+ }
+}
diff --git a/keyboards/cannonkeys/ortho60v2/keymaps/default/keymap.c b/keyboards/cannonkeys/ortho60v2/keymaps/default/keymap.c
new file mode 100644
index 0000000000..1f042bdd20
--- /dev/null
+++ b/keyboards/cannonkeys/ortho60v2/keymaps/default/keymap.c
@@ -0,0 +1,99 @@
+/*
+Copyright 2012,2013 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 QMK_KEYBOARD_H
+
+
+// Each layer gets a name for readability, which is then used in the keymap matrix below.
+// The underscores don't mean anything - you can have a layer called STUFF or any other name.
+// Layer names don't all need to be of the same length, obviously, and you can also skip them
+// entirely and just use numbers.
+enum custom_layers {
+ _BASE,
+ _RAISE,
+ _LOWER,
+};
+
+enum custom_keycodes {
+ QWERTY = SAFE_RANGE,
+ LOWER,
+ RAISE
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+/* Qwerty
+ * ,-----------------------------------------------------------------------------------.
+ * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Tab | Q | W | E | R | T | Y | U | I | O | P | Del |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Esc | A | S | D | F | G | H | J | K | L | ; | " |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_BASE] = LAYOUT_ortho_5x12(
+ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL,
+ KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
+ BL_TOGG, KC_LCTL, KC_LALT, KC_LGUI, MO(_LOWER), KC_SPC, KC_SPC, MO(_RAISE), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
+/* Lower
+ * ,-----------------------------------------------------------------------------------.
+ * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | Next | Vol- | Vol+ | Play |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_LOWER] = LAYOUT_ortho_5x12(
+ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,
+ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL,
+ KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
+ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),KC_HOME, KC_END, _______,
+ QK_BOOT, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+),
+
+/* Raise
+ * ,-----------------------------------------------------------------------------------.
+ * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | Next | Vol- | Vol+ | Play |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_RAISE] = LAYOUT_ortho_5x12(
+ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
+ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL,
+ KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
+ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______,
+ RGB_TOG, RGB_MOD, BL_INC, BL_DEC, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+)
+};
diff --git a/keyboards/cannonkeys/ortho60v2/keymaps/via/keymap.c b/keyboards/cannonkeys/ortho60v2/keymaps/via/keymap.c
new file mode 100644
index 0000000000..8d0060d015
--- /dev/null
+++ b/keyboards/cannonkeys/ortho60v2/keymaps/via/keymap.c
@@ -0,0 +1,53 @@
+/*
+Copyright 2012,2013 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 QMK_KEYBOARD_H
+
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+[0] = LAYOUT_ortho_5x12(
+ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL,
+ KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
+ BL_TOGG, KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
+
+[1] = LAYOUT_ortho_5x12(
+ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,
+ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL,
+ KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
+ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),KC_HOME, KC_END, _______,
+ QK_BOOT, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+),
+
+[2] = LAYOUT_ortho_5x12(
+ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
+ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL,
+ KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
+ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______,
+ RGB_TOG, RGB_MOD, BL_INC, BL_DEC, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+),
+
+[3] = LAYOUT_ortho_5x12(
+ 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_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
+)
+};
diff --git a/keyboards/xelus/xs60/keymaps/via/rules.mk b/keyboards/cannonkeys/ortho60v2/keymaps/via/rules.mk
index 1e5b99807c..1e5b99807c 100644
--- a/keyboards/xelus/xs60/keymaps/via/rules.mk
+++ b/keyboards/cannonkeys/ortho60v2/keymaps/via/rules.mk
diff --git a/keyboards/cannonkeys/ortho60v2/mcuconf.h b/keyboards/cannonkeys/ortho60v2/mcuconf.h
new file mode 100644
index 0000000000..533c3f1e23
--- /dev/null
+++ b/keyboards/cannonkeys/ortho60v2/mcuconf.h
@@ -0,0 +1,9 @@
+// Copyright 2022 Andrew Kannan
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#pragma once
+
+#include_next "mcuconf.h"
+
+#undef RP_PWM_USE_PWM6
+#define RP_PWM_USE_PWM6 TRUE
diff --git a/keyboards/cannonkeys/ortho60v2/ortho60v2.c b/keyboards/cannonkeys/ortho60v2/ortho60v2.c
new file mode 100644
index 0000000000..0fc9239ee8
--- /dev/null
+++ b/keyboards/cannonkeys/ortho60v2/ortho60v2.c
@@ -0,0 +1,31 @@
+/*
+Copyright 2022 CannonKeys
+
+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 "ortho60v2.h"
+
+#ifdef ENCODER_ENABLE
+bool encoder_update_kb(uint8_t index, bool clockwise) {
+ if (!encoder_update_user(index, clockwise)) {
+ return false;
+ }
+ if (clockwise) {
+ tap_code_delay(KC_VOLU, 10);
+ } else {
+ tap_code_delay(KC_VOLD, 10);
+ }
+ return true;
+}
+#endif
diff --git a/keyboards/cannonkeys/ortho60v2/ortho60v2.h b/keyboards/cannonkeys/ortho60v2/ortho60v2.h
new file mode 100644
index 0000000000..a9ca3d7e47
--- /dev/null
+++ b/keyboards/cannonkeys/ortho60v2/ortho60v2.h
@@ -0,0 +1,19 @@
+/*
+Copyright 2022 CannonKeys
+
+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"
diff --git a/keyboards/cannonkeys/ortho60v2/readme.md b/keyboards/cannonkeys/ortho60v2/readme.md
new file mode 100644
index 0000000000..e02e0f0914
--- /dev/null
+++ b/keyboards/cannonkeys/ortho60v2/readme.md
@@ -0,0 +1,22 @@
+# Ortho60 v2
+
+A 5x12 Ortholinear keyboard powered by an onboard RP2040
+
+* Keyboard Maintainer: [Andrew Kannan](https://github.com/awkannan1)
+* Hardware Supported: RP2040
+* Hardware Availability: [CannonKeys](https://cannonkeys.com)
+
+Make example for this keyboard (after setting up your build environment):
+
+ make cannonkeys/ortho60v2: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).
+
+
+## Bootloader
+
+Enter the bootloader in 3 ways:
+
+* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard
+* **Physical reset button**: Swap the boot switch on the back of the PCB to "1" and hit the reset button. Or double tap the reset button quickly while the boot switch is set to "0".
+* **Keycode in layout**: Press the key mapped to `RESET` if it is available
diff --git a/keyboards/cannonkeys/ortho60v2/rules.mk b/keyboards/cannonkeys/ortho60v2/rules.mk
new file mode 100644
index 0000000000..59f8593f18
--- /dev/null
+++ b/keyboards/cannonkeys/ortho60v2/rules.mk
@@ -0,0 +1,2 @@
+EEPROM_DRIVER = wear_leveling
+WEAR_LEVELING_DRIVER = rp2040_flash
diff --git a/keyboards/controllerworks/mini36/config.h b/keyboards/controllerworks/mini36/config.h
index 0903534838..c4f428d366 100644
--- a/keyboards/controllerworks/mini36/config.h
+++ b/keyboards/controllerworks/mini36/config.h
@@ -33,6 +33,6 @@
#define SPLIT_LED_STATE_ENABLE
#define SPLIT_MODS_ENABLE
-#define I2C_DRIVER I2CD1
+#define I2C_DRIVER I2CD0
#define I2C1_SCL_PIN GP25
#define I2C1_SDA_PIN GP24
diff --git a/keyboards/controllerworks/mini42/config.h b/keyboards/controllerworks/mini42/config.h
index 420e616ad2..ad01588e55 100644
--- a/keyboards/controllerworks/mini42/config.h
+++ b/keyboards/controllerworks/mini42/config.h
@@ -27,7 +27,7 @@
#define SPLIT_MODS_ENABLE
#undef I2C_DRIVER
-#define I2C_DRIVER I2CD1
+#define I2C_DRIVER I2CD0
#undef I2C1_SCL_PIN
#define I2C1_SCL_PIN GP25
#undef I2C1_SDA_PIN
diff --git a/keyboards/creatkeebs/glacier/readme.md b/keyboards/creatkeebs/glacier/readme.md
index 0a38629863..0f13b6857d 100644
--- a/keyboards/creatkeebs/glacier/readme.md
+++ b/keyboards/creatkeebs/glacier/readme.md
@@ -16,7 +16,7 @@ A 80% keyboard
Enter the bootloader in 2 ways:
-* Physical reset button: Press the `QK_BOOT` button on the back of the PCB.
+* Physical reset button: Press the `RESET` button on the back of the PCB.
* Keycode in layout: Press the key mapped to `QK_BOOT` if it is available.
### Building the Firmware
diff --git a/keyboards/creatkeebs/thera/readme.md b/keyboards/creatkeebs/thera/readme.md
index 2f78a154fd..2990f9a3b0 100644
--- a/keyboards/creatkeebs/thera/readme.md
+++ b/keyboards/creatkeebs/thera/readme.md
@@ -18,7 +18,7 @@ A 75% keyboard
Enter the bootloader in 2 ways:
-* Physical reset button: Press the `QK_BOOT` button on the back of the PCB.
+* Physical reset button: Press the `RESET` button on the back of the PCB.
* Keycode in layout: Press the key mapped to `QK_BOOT` if it is available.
### Building the Firmware
diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/andrebrait/rules.mk b/keyboards/gmmk/pro/rev1/ansi/keymaps/andrebrait/rules.mk
index 8983ba87c3..d5942a2e90 100644
--- a/keyboards/gmmk/pro/rev1/ansi/keymaps/andrebrait/rules.mk
+++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/andrebrait/rules.mk
@@ -2,3 +2,22 @@
# Disabling MouseKey because it breaks my KVM switch
MOUSEKEY_ENABLE = no
+
+# Cherry MX-style switches and diodes are not susceptible to noise, no need for noise-resistant algorithms.
+# This significantly reduces latency.
+#
+# The matrix scan frequency seems to be around 1820 Hz, so even sym_defer_g would perform ok,
+# but the "defer" part would mean we would wait DEBOUNCE ms before sending any events.
+# Using "asym_eager_defer_pk" does not seem to benefit us in anything.
+# The GMMK Pro has more then enough system resources for a per-key algorithm.
+# Using an "eager" algorithm leads to extremely low latency while also reducing the chances of chattering
+# due to it's "post-event" debouncing (of sorts).
+#
+# I have observed zero chattering or double-keypress issues on my Gateron Yellow switches.
+# Most chattering issues on the GMMK Pro seem to be related to its proprietary hot-swap sockets anyway.
+DEBOUNCE_TYPE = sym_eager_pk
+
+# Useful for debugging
+# CONSOLE_ENABLE = yes
+# DEBUG_MATRIX_SCAN_RATE_ENABLE = yes
+# DEBUG_MATRIX_SCAN_RATE = yes
diff --git a/keyboards/handwired/axon/readme.md b/keyboards/handwired/axon/readme.md
index d48297b4f7..ca422130ef 100644
--- a/keyboards/handwired/axon/readme.md
+++ b/keyboards/handwired/axon/readme.md
@@ -15,8 +15,8 @@ Make example for this keyboard (after setting up your build environment):
## To reset into bootloader mode:
1. While plugged in, press and hold `BOOT` switch
-2. While holding `BOOT`, press `QK_BOOT` and hold it for a second or two
-3. Release `QK_BOOT`
+2. While holding `BOOT`, press `RESET` and hold it for a second or two
+3. Release `RESET`
4. Release `BOOT`
5. The keyboard should now be recognized as a USBasp programmer device.
diff --git a/keyboards/handwired/jscotto/scotto9/info.json b/keyboards/handwired/jscotto/scotto9/info.json
index 09ae9eea77..d29ccc3fd1 100644
--- a/keyboards/handwired/jscotto/scotto9/info.json
+++ b/keyboards/handwired/jscotto/scotto9/info.json
@@ -31,12 +31,12 @@
"layout": [
{ "matrix": [0, 0], "x": 0, "y": 0 },
{ "matrix": [0, 1], "x": 1, "y": 0 },
- { "matrix": [0, 2], "x": 2, "y": 0 }
+ { "matrix": [0, 2], "x": 2, "y": 0 },
// Row 2
{ "matrix": [1, 0], "x": 0, "y": 1 },
{ "matrix": [1, 1], "x": 1, "y": 1 },
- { "matrix": [1, 2], "x": 2, "y": 1 }
+ { "matrix": [1, 2], "x": 2, "y": 1 },
// Row 3
{ "matrix": [2, 0], "x": 0, "y": 2 },
diff --git a/keyboards/handwired/jscotto/scottostarter/info.json b/keyboards/handwired/jscotto/scottostarter/info.json
index 5bc3c14cc7..08bccff0d3 100644
--- a/keyboards/handwired/jscotto/scottostarter/info.json
+++ b/keyboards/handwired/jscotto/scottostarter/info.json
@@ -87,8 +87,8 @@
{ "matrix": [4, 2], "x": 2, "y": 4},
{ "matrix": [4, 4], "x": 4, "y": 4},
{ "matrix": [4, 7], "x": 7, "y": 4},
- { "matrix": [4, 8], "x": 8, "y": 4 }
- { "matrix": [4, 9], "x": 9, "y": 4 }
+ { "matrix": [4, 8], "x": 8, "y": 4 },
+ { "matrix": [4, 9], "x": 9, "y": 4 },
{ "matrix": [4, 10], "x": 10, "y": 4 }
]
}
diff --git a/keyboards/handwired/onekey/kb2040/config.h b/keyboards/handwired/onekey/kb2040/config.h
index c6c6dbe2cf..20a41b1624 100644
--- a/keyboards/handwired/onekey/kb2040/config.h
+++ b/keyboards/handwired/onekey/kb2040/config.h
@@ -16,7 +16,7 @@
// settings for the oled keyboard demo with Adafruit 0.91" OLED display on the Stemma QT port
#define OLED_DISPLAY_128X32
-#define I2C_DRIVER I2CD1
+#define I2C_DRIVER I2CD0
#define I2C1_SDA_PIN GP12
#define I2C1_SCL_PIN GP13
diff --git a/keyboards/handwired/swiftrax/digicarp65/readme.md b/keyboards/handwired/swiftrax/digicarp65/readme.md
index 34e0c0b755..a10c1b567a 100644
--- a/keyboards/handwired/swiftrax/digicarp65/readme.md
+++ b/keyboards/handwired/swiftrax/digicarp65/readme.md
@@ -17,5 +17,5 @@ See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_to
Enter the bootloader in 3 ways:
* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (top left key)and plug in the keyboard
-* **Physical reset button**: Briefly short the pad on the back of the PCB labeled QK_BOOT
+* **Physical reset button**: Briefly short the pad on the back of the PCB labeled `RESET`
* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available
diff --git a/keyboards/idobao/id75/v1/config.h b/keyboards/idobao/id75/v1/config.h
index 0bb05a810c..82e7d705ee 100644
--- a/keyboards/idobao/id75/v1/config.h
+++ b/keyboards/idobao/id75/v1/config.h
@@ -45,7 +45,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGB_DI_PIN F0
#ifdef RGB_DI_PIN
- // RGBLIGHT_ANIMATIONS
#define RGBLIGHT_EFFECT_ALTERNATING
#define RGBLIGHT_EFFECT_BREATHING
#define RGBLIGHT_EFFECT_CHRISTMAS
diff --git a/keyboards/idobao/id80/v2/config.h b/keyboards/idobao/id80/v2/config.h
index a007cff40c..57f26aee57 100644
--- a/keyboards/idobao/id80/v2/config.h
+++ b/keyboards/idobao/id80/v2/config.h
@@ -71,7 +71,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGBLIGHT_LIMIT_VAL 180 /* The maximum brightness level */
#define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
- // RGBLIGHT_ANIMATIONS
#define RGBLIGHT_EFFECT_ALTERNATING
#define RGBLIGHT_EFFECT_BREATHING
#define RGBLIGHT_EFFECT_CHRISTMAS
diff --git a/keyboards/idobao/id87/v1/config.h b/keyboards/idobao/id87/v1/config.h
index 6c2d6fc9ce..11372855c0 100644
--- a/keyboards/idobao/id87/v1/config.h
+++ b/keyboards/idobao/id87/v1/config.h
@@ -50,7 +50,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGB_DI_PIN E2
#ifdef RGB_DI_PIN
- // RGBLIGHT_ANIMATIONS
#define RGBLIGHT_EFFECT_ALTERNATING
#define RGBLIGHT_EFFECT_BREATHING
#define RGBLIGHT_EFFECT_CHRISTMAS
diff --git a/keyboards/idobao/montex/v1/config.h b/keyboards/idobao/montex/v1/config.h
index fe1ea61d35..3d1a614e8a 100644
--- a/keyboards/idobao/montex/v1/config.h
+++ b/keyboards/idobao/montex/v1/config.h
@@ -46,7 +46,6 @@
#define RGB_DI_PIN B1
#ifdef RGB_DI_PIN
- // RGBLIGHT_ANIMATIONS
#define RGBLIGHT_EFFECT_ALTERNATING
#define RGBLIGHT_EFFECT_BREATHING
#define RGBLIGHT_EFFECT_CHRISTMAS
diff --git a/keyboards/kbdfans/kbdpad/mk3/info.json b/keyboards/kbdfans/kbdpad/mk3/info.json
index 2faabc311c..a22c82c681 100644
--- a/keyboards/kbdfans/kbdpad/mk3/info.json
+++ b/keyboards/kbdfans/kbdpad/mk3/info.json
@@ -47,7 +47,7 @@
"max_brightness": 128
},
"rgblight": {
- "pin": "F5",
+ "pin": "F5"
},
"usb": {
"device_version": "3.0.0",
diff --git a/keyboards/keebio/nyquist/keymaps/danielhklein/keymap.c b/keyboards/keebio/nyquist/keymaps/danielhklein/keymap.c
index 00f0bb3ced..a65fc3b688 100644
--- a/keyboards/keebio/nyquist/keymaps/danielhklein/keymap.c
+++ b/keyboards/keebio/nyquist/keymaps/danielhklein/keymap.c
@@ -36,7 +36,6 @@ enum custom_keycodes {
// Underglow setup
#define RGBLIGHT_SLEEP
-#define RGBLIGHT_ANIMATIONS
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
diff --git a/keyboards/keebio/sinc/rev3/config.h b/keyboards/keebio/sinc/rev3/config.h
index 14ce6d29f1..9b27501d3c 100644
--- a/keyboards/keebio/sinc/rev3/config.h
+++ b/keyboards/keebio/sinc/rev3/config.h
@@ -23,7 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define SERIAL_USART_PIN_SWAP
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 1000U
-#define I2C_DRIVER I2CD2
+#define I2C_DRIVER I2CD1
#define I2C1_SCL_PIN GP22
#define I2C1_SDA_PIN GP23
diff --git a/keyboards/keyboardio/atreus/keymaps/replicaJunction/config.h b/keyboards/keyboardio/atreus/keymaps/replicaJunction/config.h
deleted file mode 100644
index a02f9a95db..0000000000
--- a/keyboards/keyboardio/atreus/keymaps/replicaJunction/config.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/* Copyright 2021 Joshua T.
- *
- * 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
-
-// Do not allow one macro to contain the other macro
-#define DYNAMIC_MACRO_NO_NESTING
-
-// "THE most important tap hold configuration setting"
-// https://precondition.github.io/home-row-mods#ignore-mod-tap-interrupt
-// https://docs.qmk.fm/#/tap_hold?id=ignore-mod-tap-interrupt
-#define IGNORE_MOD_TAP_INTERRUPT
-
-// This one is a style choice. Play with it both on and off to see which
-// one suits you better.
-// https://precondition.github.io/home-row-mods#permissive-hold
-// https://docs.qmk.fm/#/tap_hold?id=permissive-hold
-#define PERMISSIVE_HOLD
-
-// If you press a dual-role key for longer than TAPPING_TERM, then
-// release it without pressing another key, without this setting nothing
-// would happen. With this setting, it sends the key's tap function.
-// https://precondition.github.io/home-row-mods#retro-tapping
-#define RETRO_TAPPING
-
-// Disable some unused features to save space
-#undef LOCKING_SUPPORT_ENABLE
-#undef LOCKING_RESYNC_ENABLE
-
-/////
-// Flags for stuff in my userspace
-
-#define USER_INCLUDE_GAMING_LAYER
-#define USER_INCLUDE_MACRO_LAYER
-
-// "Super Alt-Tab"
-// https://docs.qmk.fm/#/feature_macros?id=super-alt%E2%86%AFtab
-#define USER_SUPER_ALT_TAB_TIMEOUT 500
diff --git a/keyboards/keyboardio/atreus/keymaps/replicaJunction/keymap.c b/keyboards/keyboardio/atreus/keymaps/replicaJunction/keymap.c
deleted file mode 100644
index 5607f8d0d9..0000000000
--- a/keyboards/keyboardio/atreus/keymaps/replicaJunction/keymap.c
+++ /dev/null
@@ -1,94 +0,0 @@
-/* Copyright 2021 Joshua T.
- *
- * 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 "replicaJunction.h"
-
-#define BSP_SYM LT(L_SYMBOLS, KC_BSPC)
-#define SPC_NAV LT(L_NAVIGATION, KC_SPC)
-#define EQL_FUN LT(L_FN, KC_EQL)
-
-#define ESC_SFT LSFT_T(KC_ESC)
-#define TAB_SFT RSFT_T(KC_TAB)
-
-#define DF_TYPE DF(L_BASE)
-#define DF_GAME DF(L_GAMING)
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-
-[L_BASE] = LAYOUT(
- KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SCLN,
- KC_A, KC_R, KC_S, KC_T, KC_G, KC_M, KC_N, KC_E, KC_I, KC_O,
- KC_Z, KC_X, KC_C, KC_D, KC_V, SALTTAB,KC_BSLS,KC_K, KC_H, KC_COMM,KC_DOT, KC_SLSH,
- KC_ESC, KC_LGUI,KC_TAB, ESC_SFT,BSP_SYM,CTL_DEL,ALT_ENT,SPC_NAV,TAB_SFT,KC_MINS,KC_QUOT,EQL_FUN
-),
-
-[L_GAMING] = LAYOUT(
- _______,_______,_______,_______,_______, _______,_______,_______,_______,_______,
- _______,_______,_______,_______,_______, _______,_______,_______,_______,_______,
- _______,_______,KC_C, KC_D, _______,_______,QK_LOCK,_______,_______,_______,_______,_______,
- _______,KC_TAB, KC_LALT,KC_LSFT,KC_SPC, KC_LCTL,KC_LALT,KC_BSPC,KC_BTN1,KC_BTN2,KC_BTN3,_______
-),
-
-[L_NUMBERS] = LAYOUT(
- _______,_______,_______,_______,_______, KC_HASH,KC_7, KC_8, KC_9, KC_SLSH,
- _______,_______,_______,_______,_______, KC_PLUS,KC_4, KC_5, KC_6, KC_ASTR,
- _______,_______,_______,_______,_______,_______,_______,KC_MINS,KC_1, KC_2, KC_3, KC_BSLS,
- _______,_______,_______,_______,_______,_______,_______,_______,KC_0, KC_0, KC_DOT, KC_ENT
-),
-
-[L_SYMBOLS] = LAYOUT(
- KC_AT, KC_LT, KC_DLR, KC_GT, XXXXXXX, XXXXXXX,KC_LBRC,KC_UNDS,KC_RBRC,XXXXXXX,
- KC_BSLS,KC_LPRN,KC_DQUO,KC_RPRN,KC_HASH, KC_PERC,KC_LCBR,KC_EQL, KC_RCBR,KC_PIPE,
- KC_EXLM,KC_COLN,KC_ASTR,KC_PLUS,XXXXXXX,_______,_______,XXXXXXX,KC_AMPR,KC_CIRC,KC_TILD,KC_GRV,
- _______,_______,_______,_______,ooooooo,_______,_______,ooooooo,CAPWORD,_______,_______,_______
-),
-
-[L_NAVIGATION] = LAYOUT(
- OS_UNDO,OS_CUT, OS_PAST,OS_COPY,OS_SALL, KC_PGUP,KC_HOME,KC_UP, KC_END, KC_DEL,
- KC_LGUI,KC_LALT,KC_LSFT,KC_LCTL,_______, KC_PGDN,KC_LEFT,KC_DOWN,KC_RGHT,KC_BSPC,
- WIN_V, _______,_______,OS_FIND,SEARCH, _______,_______,_______,SFT_TAB,KC_TAB, KC_APP, KC_PSCR,
- _______,_______,_______,NUMWORD,ooooooo,_______,_______,ooooooo,_______,_______,_______,_______
-),
-
-[L_FN] = LAYOUT(
- _______,_______,_______,_______,_______, KC_VOLU,KC_F9, KC_F10, KC_F11, KC_F12,
- _______,_______,_______,_______,_______, KC_MUTE,KC_F5, KC_F6, KC_F7, KC_F8,
- _______,K_SECR1,K_SECR2,K_SECR3,K_SECR4,MS_JIGL,QK_BOOT, KC_VOLD,KC_F1, KC_F2, KC_F3, KC_F4,
- DF_TYPE,DF_GAME,_______,_______,_______,KC_LCTL,KC_LALT,_______,_______,_______,_______,ooooooo
-),
-
-[L_MACROS] = LAYOUT(
- QK_MAKE,_______,DM_REC2,DM_REC1,DM_RSTP, _______,SHEBANG,_______,_______,_______,
- QK_FLSH,_______,DM_PLY2,DM_PLY1,_______, PRG_NE, PRG_EQ, PRG_GEQ,PRG_LEQ,PRG_ARR,
- QK_VERS,_______,_______,_______,_______,_______,_______,_______,PS_ITEM,FS_PIPE,_______,FS_ARR,
- _______,_______,_______,_______,ooooooo,_______,_______,ooooooo,_______,_______,_______,_______
-)
-
-
-// Template
-// [L_FUNC] = LAYOUT(
-// _______,_______,_______,_______,_______, _______,_______,_______,_______,_______,
-// _______,_______,_______,_______,_______, _______,_______,_______,_______,_______,
-// _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,
-// _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______
-// ),
-
-};
-
-layer_state_t layer_state_set_user(layer_state_t state) {
- return update_tri_layer_state(state, L_SYMBOLS, L_NAVIGATION, L_MACROS);
-}
diff --git a/keyboards/keyboardio/atreus/keymaps/replicaJunction/readme.md b/keyboards/keyboardio/atreus/keymaps/replicaJunction/readme.md
deleted file mode 100644
index 88f948a94f..0000000000
--- a/keyboards/keyboardio/atreus/keymaps/replicaJunction/readme.md
+++ /dev/null
@@ -1,6 +0,0 @@
-replicaJunction - Keyboardio Atreus
-===================================
-
-A 44-key layout designed for daily programming usage and occasional, light gaming.
-
-Most of the interesting logic in this is defined and described in [my userspace](../../../../../users/replicaJunction/readme.md), so check that out if you're interested in how things work. The CAPSWORD and NUMWORD features are especially important for a keyboard this size.
diff --git a/keyboards/keyboardio/atreus/keymaps/replicaJunction/rules.mk b/keyboards/keyboardio/atreus/keymaps/replicaJunction/rules.mk
deleted file mode 100644
index 7e0b3c9cac..0000000000
--- a/keyboards/keyboardio/atreus/keymaps/replicaJunction/rules.mk
+++ /dev/null
@@ -1,29 +0,0 @@
-# Userspace options
-USER_CAPS_WORD_ENABLE = yes
-USER_MOUSE_JIGGLE_ENABLE = yes
-USER_NUM_WORD_ENABLE = yes
-USER_SECRETS_ENABLE = yes
-USER_SUPER_ALT_TAB_ENABLE = yes
-
-DYNAMIC_MACRO_ENABLE = yes
-
-# Extra features that are nice but takes space. Enable only if they're
-# used in the layout.
-WPM_ENABLE = no
-# EXTRAKEY_ENABLE = no # For volume keys and similar
-# MOUSEKEY_ENABLE = no # Them mouse keys yo
-KEY_OVERRIDE_ENABLE = no
-LEADER_ENABLE = no
-TAP_DANCE_ENABLE = no
-# RGBLIGHT_ENABLE = no # Keyboard RGB underglow
-RGB_MATRIX_ENABLE = no
-
-# Features I definitely don't care aboud
-LTO_ENABLE = yes
-CONSOLE_ENABLE = no
-VERBOSE = no
-DEBUG_MATRIX_SCAN_RATE = no
-DEBUG_MATRIX = no
-MAGIC_ENABLE = no
-SPACE_CADET_ENABLE = no
-GRAVE_ESC_ENABLE = no
diff --git a/keyboards/kprepublic/bm16a/bm16a.h b/keyboards/kprepublic/bm16a/bm16a.h
deleted file mode 100644
index cf8bab4730..0000000000
--- a/keyboards/kprepublic/bm16a/bm16a.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/* Copyright 2019
- *
- * 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"
-
-/* This a shortcut to help you visually see your layout.
- *
- * The first section contains all of the arguments representing the physical
- * layout of the board and position of the keys.
- *
- * The second converts the arguments into a two-dimensional array which
- * represents the switch matrix.
- */
-#define LAYOUT_ortho_4x4( \
- K01, K02, K03, K04, \
- K11, K12, K13, K14, \
- K21, K22, K23, K24, \
- K31, K32, K33, K34 \
-) \
-{ \
- { K01, K02, K03, K04 }, \
- { K11, K12, K13, K14 }, \
- { K21, K22, K23, K24 }, \
- { K31, K32, K33, K34 } \
-}
diff --git a/keyboards/kprepublic/bm16a/config.h b/keyboards/kprepublic/bm16a/config.h
deleted file mode 100644
index e5cc440d25..0000000000
--- a/keyboards/kprepublic/bm16a/config.h
+++ /dev/null
@@ -1,128 +0,0 @@
-/* Copyright 2019
- *
- * 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"
-
-/* key matrix size */
-#define MATRIX_ROWS 4
-#define MATRIX_COLS 4
-
-/*
- * 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 { D3, D5, D1, D2}
-#define MATRIX_COL_PINS { D6, D4, D7, B4}
-
-/* COL2ROW, ROW2COL*/
-#define DIODE_DIRECTION COL2ROW
-
-/*
- * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
- */
-//#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
-
-#define BACKLIGHT_PIN B6
-// #define BACKLIGHT_BREATHING
-#define BACKLIGHT_LEVELS 5
-
-#define RGB_DI_PIN E2
-#define RGBLED_NUM 4
-#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
-#define RGBLIGHT_EFFECT_TWINKLE
-// #ifdef RGB_DI_PIN
-// #define RGBLED_NUM 16
-// #define RGBLIGHT_HUE_STEP 8
-// #define RGBLIGHT_SAT_STEP 8
-// #define RGBLIGHT_VAL_STEP 8
-// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
-// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
-// #endif
-
-/* 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
-
-/* number of backlight levels */
-
-/* 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 userful 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
-
-/* Bootmagic Lite key configuration */
-// #define BOOTMAGIC_LITE_ROW 0
-// #define BOOTMAGIC_LITE_COLUMN 0
diff --git a/keyboards/kprepublic/bm16a/info.json b/keyboards/kprepublic/bm16a/info.json
deleted file mode 100644
index 6c616e11d1..0000000000
--- a/keyboards/kprepublic/bm16a/info.json
+++ /dev/null
@@ -1,33 +0,0 @@
-{
- "keyboard_name": "bm16a",
- "manufacturer": "KPrepublic",
- "url": "",
- "maintainer": "qmk",
- "usb": {
- "vid": "0x4B50",
- "pid": "0x016A",
- "device_version": "0.0.1"
- },
- "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/kprepublic/bm16a/v1/info.json b/keyboards/kprepublic/bm16a/v1/info.json
new file mode 100644
index 0000000000..6c700b37b8
--- /dev/null
+++ b/keyboards/kprepublic/bm16a/v1/info.json
@@ -0,0 +1,75 @@
+{
+ "keyboard_name": "bm16a",
+ "manufacturer": "KPrepublic",
+ "url": "",
+ "maintainer": "qmk",
+ "usb": {
+ "vid": "0x4B50",
+ "pid": "0x016A",
+ "device_version": "0.0.1"
+ },
+ "processor": "atmega32u4",
+ "bootloader": "atmel-dfu",
+ "features": {
+ "bootmagic": true,
+ "mousekey": true,
+ "extrakey": true,
+ "console": false,
+ "command": false,
+ "nkro": true,
+ "backlight": true,
+ "rgblight": true,
+ "audio": false
+ },
+ "matrix_pins": {
+ "rows": ["D3", "D5", "D1", "D2"],
+ "cols": ["D6", "D4", "D7", "B4"]
+ },
+ "diode_direction": "COL2ROW",
+ "backlight": {
+ "pin": "B6",
+ "levels": 5
+ },
+ "rgblight": {
+ "pin": "E2",
+ "led_count": 4,
+ "animations": {
+ "breathing": true,
+ "rainbow_mood": true,
+ "rainbow_swirl": true,
+ "snake": true,
+ "knight": true,
+ "christmas": true,
+ "static_gradient": true,
+ "rgb_test": true,
+ "alternating": true,
+ "twinkle": true
+ }
+ },
+ "community_layouts": ["ortho_4x4"],
+ "layouts": {
+ "LAYOUT_ortho_4x4": {
+ "layout": [
+ {"matrix": [0, 0], "x": 0, "y": 0},
+ {"matrix": [0, 1], "x": 1, "y": 0},
+ {"matrix": [0, 2], "x": 2, "y": 0},
+ {"matrix": [0, 3], "x": 3, "y": 0},
+
+ {"matrix": [1, 0], "x": 0, "y": 1},
+ {"matrix": [1, 1], "x": 1, "y": 1},
+ {"matrix": [1, 2], "x": 2, "y": 1},
+ {"matrix": [1, 3], "x": 3, "y": 1},
+
+ {"matrix": [2, 0], "x": 0, "y": 2},
+ {"matrix": [2, 1], "x": 1, "y": 2},
+ {"matrix": [2, 2], "x": 2, "y": 2},
+ {"matrix": [2, 3], "x": 3, "y": 2},
+
+ {"matrix": [3, 0], "x": 0, "y": 3},
+ {"matrix": [3, 1], "x": 1, "y": 3},
+ {"matrix": [3, 2], "x": 2, "y": 3},
+ {"matrix": [3, 3], "x": 3, "y": 3}
+ ]
+ }
+ }
+}
diff --git a/keyboards/kprepublic/bm16a/keymaps/default/keymap.c b/keyboards/kprepublic/bm16a/v1/keymaps/default/keymap.c
index 0255603d33..0255603d33 100644
--- a/keyboards/kprepublic/bm16a/keymaps/default/keymap.c
+++ b/keyboards/kprepublic/bm16a/v1/keymaps/default/keymap.c
diff --git a/keyboards/kprepublic/bm16a/keymaps/default/readme.md b/keyboards/kprepublic/bm16a/v1/keymaps/default/readme.md
index f356f2cca0..f356f2cca0 100644
--- a/keyboards/kprepublic/bm16a/keymaps/default/readme.md
+++ b/keyboards/kprepublic/bm16a/v1/keymaps/default/readme.md
diff --git a/keyboards/kprepublic/bm16a/keymaps/factory/keymap.c b/keyboards/kprepublic/bm16a/v1/keymaps/factory/keymap.c
index 08f3476266..08f3476266 100644
--- a/keyboards/kprepublic/bm16a/keymaps/factory/keymap.c
+++ b/keyboards/kprepublic/bm16a/v1/keymaps/factory/keymap.c
diff --git a/keyboards/kprepublic/bm16a/keymaps/factory/readme.md b/keyboards/kprepublic/bm16a/v1/keymaps/factory/readme.md
index 11c952366e..11c952366e 100644
--- a/keyboards/kprepublic/bm16a/keymaps/factory/readme.md
+++ b/keyboards/kprepublic/bm16a/v1/keymaps/factory/readme.md
diff --git a/keyboards/kprepublic/bm16a/keymaps/via/keymap.c b/keyboards/kprepublic/bm16a/v1/keymaps/via/keymap.c
index 8b41b08dfe..8b41b08dfe 100644
--- a/keyboards/kprepublic/bm16a/keymaps/via/keymap.c
+++ b/keyboards/kprepublic/bm16a/v1/keymaps/via/keymap.c
diff --git a/keyboards/kprepublic/bm16a/keymaps/via/readme.md b/keyboards/kprepublic/bm16a/v1/keymaps/via/readme.md
index b381108759..b381108759 100644
--- a/keyboards/kprepublic/bm16a/keymaps/via/readme.md
+++ b/keyboards/kprepublic/bm16a/v1/keymaps/via/readme.md
diff --git a/keyboards/kprepublic/bm16a/keymaps/via/rules.mk b/keyboards/kprepublic/bm16a/v1/keymaps/via/rules.mk
index 36b7ba9cbc..36b7ba9cbc 100644
--- a/keyboards/kprepublic/bm16a/keymaps/via/rules.mk
+++ b/keyboards/kprepublic/bm16a/v1/keymaps/via/rules.mk
diff --git a/keyboards/kprepublic/bm16a/readme.md b/keyboards/kprepublic/bm16a/v1/readme.md
index b1c111b74b..d24a879505 100644
--- a/keyboards/kprepublic/bm16a/readme.md
+++ b/keyboards/kprepublic/bm16a/v1/readme.md
@@ -10,6 +10,6 @@ A 16 key macropad, with USB C, RGB underglow and backlight.
Make example for this keyboard (after setting up your build environment):
- make kprepublic/bm16a:default
+ make kprepublic/bm16a/v1: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/kprepublic/bm16a/v1/rules.mk b/keyboards/kprepublic/bm16a/v1/rules.mk
new file mode 100644
index 0000000000..6e7633bfe0
--- /dev/null
+++ b/keyboards/kprepublic/bm16a/v1/rules.mk
@@ -0,0 +1 @@
+# This file intentionally left blank
diff --git a/keyboards/kprepublic/bm16a/v2/config.h b/keyboards/kprepublic/bm16a/v2/config.h
new file mode 100644
index 0000000000..f4ac9e7a3b
--- /dev/null
+++ b/keyboards/kprepublic/bm16a/v2/config.h
@@ -0,0 +1,12 @@
+// Copyright 2022 fauxpark (@fauxpark)
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#pragma once
+
+#define RGB_DI_PIN B9
+#define RGB_MATRIX_LED_COUNT 16
+
+#define WS2812_PWM_DRIVER PWMD4
+#define WS2812_PWM_CHANNEL 4
+#define WS2812_DMA_STREAM STM32_DMA1_STREAM7
+#define WS2812_DMA_CHANNEL 7
diff --git a/keyboards/kprepublic/bm16a/v2/halconf.h b/keyboards/kprepublic/bm16a/v2/halconf.h
new file mode 100644
index 0000000000..da579a54a5
--- /dev/null
+++ b/keyboards/kprepublic/bm16a/v2/halconf.h
@@ -0,0 +1,8 @@
+// Copyright 2022 fauxpark (@fauxpark)
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#pragma once
+
+#define HAL_USE_PWM TRUE
+
+#include_next <halconf.h>
diff --git a/keyboards/kprepublic/bm16a/v2/info.json b/keyboards/kprepublic/bm16a/v2/info.json
new file mode 100644
index 0000000000..39b7ef6758
--- /dev/null
+++ b/keyboards/kprepublic/bm16a/v2/info.json
@@ -0,0 +1,120 @@
+{
+ "manufacturer": "kprepublic",
+ "keyboard_name": "BM16v2",
+ "maintainer": "qmk",
+ "bootloader": "stm32duino",
+ "diode_direction": "COL2ROW",
+ "features": {
+ "bootmagic": true,
+ "command": false,
+ "console": false,
+ "extrakey": true,
+ "mousekey": true,
+ "nkro": true,
+ "rgb_matrix": true
+ },
+ "matrix_pins": {
+ "cols": ["B1", "A3", "B0", "B4"],
+ "rows": ["A8", "A9", "B5", "B3"]
+ },
+ "processor": "STM32F103", // GD32F303CCT6
+ "url": "",
+ "usb": {
+ "device_version": "0.0.2",
+ "pid": "0x016C",
+ "vid": "0x4B50"
+ },
+ "layouts": {
+ "LAYOUT_ortho_4x4": {
+ "layout": [
+ {"matrix": [0, 0], "x": 0, "y": 0},
+ {"matrix": [0, 1], "x": 1, "y": 0},
+ {"matrix": [0, 2], "x": 2, "y": 0},
+ {"matrix": [0, 3], "x": 3, "y": 0},
+
+ {"matrix": [1, 0], "x": 0, "y": 1},
+ {"matrix": [1, 1], "x": 1, "y": 1},
+ {"matrix": [1, 2], "x": 2, "y": 1},
+ {"matrix": [1, 3], "x": 3, "y": 1},
+
+ {"matrix": [2, 0], "x": 0, "y": 2},
+ {"matrix": [2, 1], "x": 1, "y": 2},
+ {"matrix": [2, 2], "x": 2, "y": 2},
+ {"matrix": [2, 3], "x": 3, "y": 2},
+
+ {"matrix": [3, 0], "x": 0, "y": 3},
+ {"matrix": [3, 1], "x": 1, "y": 3},
+ {"matrix": [3, 2], "x": 2, "y": 3},
+ {"matrix": [3, 3], "x": 3, "y": 3}
+ ]
+ }
+ },
+ "community_layouts": ["ortho_4x4"],
+ "rgb_matrix": {
+ "driver": "WS2812",
+ "animations": {
+ "alphas_mods": true,
+ "gradient_up_down": true,
+ "gradient_left_right": true,
+ "breathing": true,
+ "band_sat": true,
+ "band_val": true,
+ "band_pinwheel_sat": true,
+ "band_pinwheel_val": true,
+ "band_spiral_sat": true,
+ "band_spiral_val": true,
+ "cycle_all": true,
+ "cycle_left_right": true,
+ "cycle_up_down": true,
+ "cycle_out_in": true,
+ "cycle_out_in_dual": true,
+ "rainbow_moving_chevron": true,
+ "cycle_pinwheel": true,
+ "cycle_spiral": true,
+ "dual_beacon": true,
+ "rainbow_beacon": true,
+ "rainbow_pinwheels": true,
+ "raindrops": true,
+ "jellybean_raindrops": true,
+ "hue_breathing": true,
+ "hue_pendulum": true,
+ "hue_wave": true,
+ "pixel_fractal": true,
+ "pixel_flow": true,
+ "pixel_rain": true,
+ "solid_reactive_simple": true,
+ "solid_reactive": true,
+ "solid_reactive_wide": true,
+ "solid_reactive_multiwide": true,
+ "solid_reactive_cross": true,
+ "solid_reactive_multicross": true,
+ "solid_reactive_nexus": true,
+ "solid_reactive_multinexus": true,
+ "splash": true,
+ "multisplash": true,
+ "solid_splash": true,
+ "solid_multisplash": true
+ },
+ "layout": [
+ {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4},
+ {"matrix": [0, 1], "x": 75, "y": 0, "flags": 4},
+ {"matrix": [0, 2], "x": 149, "y": 0, "flags": 4},
+ {"matrix": [0, 3], "x": 224, "y": 0, "flags": 4},
+
+ {"matrix": [1, 0], "x": 0, "y": 21, "flags": 4},
+ {"matrix": [1, 1], "x": 75, "y": 21, "flags": 4},
+ {"matrix": [1, 2], "x": 149, "y": 21, "flags": 4},
+ {"matrix": [1, 3], "x": 224, "y": 21, "flags": 4},
+
+ {"matrix": [2, 0], "x": 0, "y": 43, "flags": 4},
+ {"matrix": [2, 1], "x": 75, "y": 43, "flags": 4},
+ {"matrix": [2, 2], "x": 149, "y": 43, "flags": 4},
+ {"matrix": [2, 3], "x": 224, "y": 43, "flags": 4},
+
+ {"matrix": [3, 0], "x": 0, "y": 64, "flags": 4},
+ {"matrix": [3, 1], "x": 75, "y": 64, "flags": 4},
+ {"matrix": [3, 2], "x": 149, "y": 64, "flags": 4},
+ {"matrix": [3, 3], "x": 224, "y": 64, "flags": 4},
+ ]
+ }
+}
diff --git a/keyboards/kprepublic/bm16a/v2/keymaps/default/keymap.c b/keyboards/kprepublic/bm16a/v2/keymaps/default/keymap.c
new file mode 100644
index 0000000000..0cb2b68fb9
--- /dev/null
+++ b/keyboards/kprepublic/bm16a/v2/keymaps/default/keymap.c
@@ -0,0 +1,19 @@
+// Copyright 2022 fauxpark (@fauxpark)
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include QMK_KEYBOARD_H
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [0] = LAYOUT_ortho_4x4(
+ KC_P7, KC_P8, KC_P9, KC_PMNS,
+ KC_P4, KC_P5, KC_P6, KC_PPLS,
+ KC_P1, KC_P2, KC_P3, KC_PENT,
+ KC_P0, KC_PDOT, KC_SPC, MO(1)
+ ),
+ [1] = LAYOUT_ortho_4x4(
+ QK_BOOT, KC_PAST, KC_PSLS, _______,
+ RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD,
+ RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD,
+ _______, _______, _______, _______
+ )
+};
diff --git a/keyboards/kprepublic/bm16a/v2/mcuconf.h b/keyboards/kprepublic/bm16a/v2/mcuconf.h
new file mode 100644
index 0000000000..493b83b87c
--- /dev/null
+++ b/keyboards/kprepublic/bm16a/v2/mcuconf.h
@@ -0,0 +1,9 @@
+// Copyright 2022 fauxpark (@fauxpark)
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#pragma once
+
+#include_next <mcuconf.h>
+
+#undef STM32_PWM_USE_TIM4
+#define STM32_PWM_USE_TIM4 TRUE
diff --git a/keyboards/kprepublic/bm16a/v2/readme.md b/keyboards/kprepublic/bm16a/v2/readme.md
new file mode 100644
index 0000000000..0af553f126
--- /dev/null
+++ b/keyboards/kprepublic/bm16a/v2/readme.md
@@ -0,0 +1,27 @@
+# BM16A V2
+
+![bm16v2](https://i.imgur.com/3nr7bSoh.png)
+
+A 16 key macropad, with USB-C and per-key RGB.
+
+* Keyboard Maintainer: QMK Community
+* Hardware Supported: BM16A PCB (`BM16V2-ARM`)
+* Hardware Availability: [KPrepublic](https://kprepublic.com/collections/bm16/products/bm16a-16-keys-custom-mechanical-keyboard-pcb-plate-programmed-numpad-layouts-qmk-firmware-with-rgb-bottom-underglow-alps-mx)
+
+Make example for this keyboard (after setting up your build environment):
+
+ make kprepublic/bm16v2:default
+
+Flashing example for this keyboard:
+
+ make kprepublic/bm16a/v2: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).
+
+## Bootloader
+
+Enter the bootloader in 3 ways:
+
+* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard
+* **Physical reset button**: Briefly press the button on the back of the PCB - some may have pads you must short instead
+* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available
diff --git a/keyboards/kprepublic/bm16a/v2/rules.mk b/keyboards/kprepublic/bm16a/v2/rules.mk
new file mode 100644
index 0000000000..c1285e300c
--- /dev/null
+++ b/keyboards/kprepublic/bm16a/v2/rules.mk
@@ -0,0 +1 @@
+WS2812_DRIVER = pwm
diff --git a/keyboards/late9/readme.md b/keyboards/late9/readme.md
index 93e5a40823..1d85e788fb 100644
--- a/keyboards/late9/readme.md
+++ b/keyboards/late9/readme.md
@@ -20,7 +20,7 @@ Flashing example for this keyboard:
make late9/rev1:default:flash
-When asked by the terminal, short with a metal wire the pins on the backside of the board highlighted as `RST` (one is the `QK_BOOT` and the other one is `GROUND`) to enter the bootloader and let the OS detects the device.
+When asked by the terminal, short with a metal wire the pins on the backside of the board highlighted as `RST` (one is the `RESET` and the other one is `GROUND`) to enter the bootloader and let the OS detects the device.
After installing this firmware you can use Bootmagic to enter the bootloader while plugging in your LATE-9. By default it's the button on the upper-left of the keyboard.
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 [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/linworks/fave65h/readme.md b/keyboards/linworks/fave65h/readme.md
index 09649fa860..7a95f65ac5 100644
--- a/keyboards/linworks/fave65h/readme.md
+++ b/keyboards/linworks/fave65h/readme.md
@@ -17,7 +17,7 @@ Make example for this keyboard (after setting up your build environment):
## Bootloader Enter the bootloader in 3 ways:
* **Bootmagic reset**: Hold down the key ESC key and plug in the keyboard (Top Left most switch)
-* **Physical reset short**: Briefly short the 2 pads labelled QK_BOOT on the back of the PCB
+* **Physical reset short**: Briefly short the 2 pads labelled `RESET` on the back of the PCB
* **Keycode in layout**: Press the B key on layer 1 which is mapped to `QK_BOOT`
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/linworks/fave84h/readme.md b/keyboards/linworks/fave84h/readme.md
index 22ce5fd428..dab29f6766 100644
--- a/keyboards/linworks/fave84h/readme.md
+++ b/keyboards/linworks/fave84h/readme.md
@@ -19,5 +19,5 @@ See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_to
## Bootloader Enter the bootloader in 3 ways:
* **Bootmagic reset**: Hold down the key ESC key and plug in the keyboard (Top Left most switch)
-* **Physical reset short**: Briefly short the 2 pads labelled QK_BOOT on the back of the PCB
+* **Physical reset short**: Briefly short the 2 pads labelled `RESET` on the back of the PCB
* **Keycode in layout**: Press the B key on layer 1 which is mapped to `QK_BOOT`
diff --git a/keyboards/linworks/fave87h/readme.md b/keyboards/linworks/fave87h/readme.md
index bda921a61b..f06d8458c0 100644
--- a/keyboards/linworks/fave87h/readme.md
+++ b/keyboards/linworks/fave87h/readme.md
@@ -19,5 +19,5 @@ See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_to
## Bootloader Enter the bootloader in 3 ways:
* **Bootmagic reset**: Hold down the key ESC key and plug in the keyboard (Top Left most switch)
-* **Physical reset short**: Briefly short the 2 pads labelled QK_BOOT on the back of the PCB
+* **Physical reset short**: Briefly short the 2 pads labelled `RESET` on the back of the PCB
* **Keycode in layout**: Press the B key on layer 1 which is mapped to `QK_BOOT`
diff --git a/keyboards/mechanickeys/miniashen40/readme.md b/keyboards/mechanickeys/miniashen40/readme.md
index c61398ba1a..67753d37bd 100644
--- a/keyboards/mechanickeys/miniashen40/readme.md
+++ b/keyboards/mechanickeys/miniashen40/readme.md
@@ -32,7 +32,7 @@ Enter the bootloader in 3 ways:
* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard
* **Physical**:
1. Press and hold `BOOT` switch
- 2. Tap `QK_BOOT` switch
+ 2. Tap `RESET` switch
3. Release `BOOT` switch
* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available
diff --git a/keyboards/moonlander/config.h b/keyboards/moonlander/config.h
index 7db3a184fa..9aff554ace 100644
--- a/keyboards/moonlander/config.h
+++ b/keyboards/moonlander/config.h
@@ -76,7 +76,7 @@
#define DRIVER_1_LED_TOTAL 36
#define DRIVER_2_LED_TOTAL 36
#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
-#define RGB_MATRIX_CENTER { 125, 26 }
+#define RGB_MATRIX_CENTER { 120, 36 }
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 175
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
#define RGB_MATRIX_KEYPRESSES
diff --git a/keyboards/moonlander/moonlander.c b/keyboards/moonlander/moonlander.c
index 2d6b1f037b..83b5997b53 100644
--- a/keyboards/moonlander/moonlander.c
+++ b/keyboards/moonlander/moonlander.c
@@ -264,50 +264,54 @@ const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
};
led_config_t g_led_config = { {
- { 0, 5, 10, 15, 20, 25, 29 },
- { 1, 6, 11, 16, 21, 26, 30 },
- { 2, 7, 12, 17, 22, 27, 31 },
- { 3, 8, 13, 18, 23, 28, NO_LED },
- { 4, 9, 14, 19, 24, NO_LED, NO_LED },
- { 32, 33, 34, 35, NO_LED, NO_LED, NO_LED },
- { 65, 61, 56, 51, 46, 41, 36 },
- { 66, 62, 57, 52, 47, 42, 37 },
- { 67, 63, 58, 53, 48, 43, 38 },
- { NO_LED, 64, 59, 54, 49, 44, 39 },
- { NO_LED, NO_LED, 60, 55, 50, 45, 40 },
- { NO_LED, NO_LED, NO_LED, 71, 70, 69, 68 },
+ { 0, 5, 10, 15, 20, 25, 29 },
+ { 1, 6, 11, 16, 21, 26, 30 },
+ { 2, 7, 12, 17, 22, 27, 31 },
+ { 3, 8, 13, 18, 23, 28, NO_LED },
+ { 4, 9, 14, 19, 24, NO_LED, NO_LED },
+ { 32, 33, 34, 35, NO_LED, NO_LED, NO_LED },
+ { 65, 61, 56, 51, 46, 41, 36 },
+ { 66, 62, 57, 52, 47, 42, 37 },
+ { 67, 63, 58, 53, 48, 43, 38 },
+ { NO_LED, 64, 59, 54, 49, 44, 39 },
+ { NO_LED, NO_LED, 60, 55, 50, 45, 40 },
+ { NO_LED, NO_LED, NO_LED, 71, 70, 69, 68 }
}, {
- { 0, 0 }, { 0, 12 }, { 0, 25 }, { 0, 38 }, { 0, 51 },
- { 17, 0 }, { 17, 12 }, { 17, 25 }, { 17, 38 }, { 17, 51 },
- { 34, 0 }, { 34, 12 }, { 34, 25 }, { 34, 38 }, { 34, 51 },
- { 51, 0 }, { 51, 12 }, { 51, 25 }, { 51, 38 }, { 51, 51 },
- { 68, 0 }, { 68, 12 }, { 68, 25 }, { 68, 38 }, { 68, 51 },
- { 86, 0 }, { 86, 12 }, { 86, 25 }, { 86, 38 },
- { 105, 0 }, { 105, 12 }, { 105, 25 },
- { 90, 55 }, { 105, 68 }, { 116, 86 }, { 116, 59 },
-
- { 250, 0 }, { 250, 12 }, { 250, 25 }, { 250, 38 }, { 250, 51 },
- { 233, 0 }, { 233, 12 }, { 233, 25 }, { 233, 38 }, { 233, 51 },
- { 216, 0 }, { 216, 12 }, { 216, 25 }, { 216, 38 }, { 216, 51 },
- { 198, 0 }, { 198, 12 }, { 198, 25 }, { 198, 38 }, { 198, 51 },
- { 181, 0 }, { 181, 12 }, { 181, 25 }, { 181, 38 }, { 181, 51 },
- { 163, 0 }, { 163, 12 }, { 163, 25 }, { 163, 38 },
- { 146, 0 }, { 146, 12 }, { 146, 25 },
- { 161, 55 }, { 161, 68 }, { 146, 86 }, { 131, 59 }
-
+ { 0, 4}, { 0, 20}, { 0, 36}, { 0, 52}, { 0, 68},
+ { 16, 3}, { 16, 19}, { 16, 35}, { 16, 51}, { 16, 67},
+ { 32, 1}, { 32, 17}, { 32, 33}, { 32, 49}, { 32, 65},
+ { 48, 0}, { 48, 16}, { 48, 32}, { 48, 48}, { 48, 64},
+ { 64, 1}, { 64, 17}, { 64, 33}, { 64, 49}, { 64, 65},
+ { 80, 3}, { 80, 19}, { 80, 35}, { 80, 51},
+ { 96, 4}, { 96, 20}, { 96, 36},
+ { 88, 69}, {100, 80}, {112, 91}, {108, 69},
+
+ {240, 4}, {240, 20}, {240, 36}, {240, 52}, {240, 68},
+ {224, 3}, {224, 19}, {224, 35}, {224, 51}, {224, 67},
+ {208, 1}, {208, 17}, {208, 33}, {208, 49}, {208, 65},
+ {192, 0}, {192, 16}, {192, 32}, {192, 48}, {192, 64},
+ {176, 1}, {176, 17}, {176, 33}, {176, 49}, {176, 65},
+ {160, 3}, {160, 19}, {160, 35}, {160, 51},
+ {144, 4}, {144, 20}, {144, 36},
+ {152, 69}, {140, 80}, {128, 91}, {132, 69}
}, {
- 1, 1, 1, 1, 1, 4,
- 4, 4, 4, 1, 4, 4,
- 4, 4, 1, 4, 4, 4,
- 4, 1, 4, 4, 4, 4,
- 1, 4, 4, 4, 4, 4,
- 4, 4, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 4,
- 4, 4, 4, 1, 4, 4,
- 4, 4, 1, 4, 4, 4,
- 4, 1, 4, 4, 4, 4,
- 1, 4, 4, 4, 4, 4,
- 4, 4, 1, 1, 1, 1
+ 1, 1, 1, 1, 1,
+ 4, 4, 4, 4, 1,
+ 4, 4, 4, 4, 1,
+ 4, 4, 4, 4, 1,
+ 4, 4, 4, 4, 1,
+ 4, 4, 4, 4,
+ 1, 1, 1,
+ 1, 1, 1, 1,
+
+ 1, 1, 1, 1, 1,
+ 4, 4, 4, 4, 1,
+ 4, 4, 4, 4, 1,
+ 4, 4, 4, 4, 1,
+ 4, 4, 4, 4, 1,
+ 4, 4, 4, 4,
+ 1, 1, 1,
+ 1, 1, 1, 1
} };
// clang-format on
diff --git a/keyboards/moonlander/moonlander.h b/keyboards/moonlander/moonlander.h
index 19618a9e2a..96e0b0ff14 100644
--- a/keyboards/moonlander/moonlander.h
+++ b/keyboards/moonlander/moonlander.h
@@ -59,6 +59,34 @@ extern bool mcp23018_leds[];
{ KC_NO, KC_NO, ka2, ka3, ka4, ka5, ka6 }, \
{ KC_NO, KC_NO, KC_NO, kb3, kb4, kb5, kb6 } \
}
+
+#define LED_LAYOUT_moonlander( \
+ l00, l01, l02, l03, l04, l05, l06, l60, l61, l62, l63, l64, l65, l66, \
+ l10, l11, l12, l13, l14, l15, l16, l70, l71, l72, l73, l74, l75, l76, \
+ l20, l21, l22, l23, l24, l25, l26, l80, l81, l82, l83, l84, l85, l86, \
+ l30, l31, l32, l33, l34, l35, l91, l92, l93, l94, l95, l96, \
+ l40, l41, l42, l43, l44, l53, lb3, la2, la3, la4, la5, la6, \
+ l50, l51, l52, lb4, lb5, lb6 \
+) \
+{ \
+ l00, l10, l20, l30, l40, \
+ l01, l11, l21, l31, l41, \
+ l02, l12, l22, l32, l42, \
+ l03, l13, l23, l33, l43, \
+ l04, l14, l24, l34, l44, \
+ l05, l15, l25, l35, \
+ l06, l16, l26, \
+ l50, l51, l52, l53, \
+\
+ l66, l76, l86, l96, la6, \
+ l65, l75, l85, l95, la5, \
+ l64, l74, l84, l94, la4, \
+ l63, l73, l83, l93, la3, \
+ l62, l72, l82, l92, la2, \
+ l61, l71, l81, l91, \
+ l60, l70, l80, \
+ lb6, lb5, lb4, lb3 \
+}
// clang-format on
enum planck_ez_keycodes {
diff --git a/keyboards/neopad/readme.md b/keyboards/neopad/readme.md
index 6d2bd8a288..9e83e9bb6d 100644
--- a/keyboards/neopad/readme.md
+++ b/keyboards/neopad/readme.md
@@ -19,7 +19,7 @@ Flashing example for this keyboard:
make neopad/rev1:default:flash
-When asked by the terminal, press the dedicated `QK_BOOT` button (the one above the 2 LEDs) to enter the bootloader and let the OS detects the device.
+When asked by the terminal, press the dedicated `RESET` button (the one above the 2 LEDs) to enter the bootloader and let the OS detects the device.
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 [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/pearlboards/atlas/readme.md b/keyboards/pearlboards/atlas/readme.md
index 5161dd2a55..3631df8a29 100644
--- a/keyboards/pearlboards/atlas/readme.md
+++ b/keyboards/pearlboards/atlas/readme.md
@@ -18,5 +18,5 @@ See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_to
Enter the bootloader in 2 ways:
-* **Physical reset button**: Briefly press the button on the back of the PCB labeled "QK_BOOT"
+* **Physical reset button**: Briefly press the button on the back of the PCB labeled `RESET`
* **Keycode in layout**: Press the key mapped to `QK_BOOT` in conjunction with the key mapped to `MO(1))`
diff --git a/keyboards/pearlboards/pandora/readme.md b/keyboards/pearlboards/pandora/readme.md
index 2ac1d8acbc..c90311507d 100644
--- a/keyboards/pearlboards/pandora/readme.md
+++ b/keyboards/pearlboards/pandora/readme.md
@@ -15,3 +15,10 @@ Make example for this keyboard (after setting up your build environment):
make pearlboards/pandora: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).
+
+## Bootloader
+
+Enter the bootloader in 2 ways:
+
+* **Physical reset button**: Briefly press the button on the back of the PCB labeled `RESET`
+* **Keycode in layout**: Press the key mapped to `QK_BOOT` in conjunction with the key mapped to `MO(1))`
diff --git a/keyboards/pearlboards/pearl/readme.md b/keyboards/pearlboards/pearl/readme.md
index e12d59c8b0..8a8d2b9a3b 100644
--- a/keyboards/pearlboards/pearl/readme.md
+++ b/keyboards/pearlboards/pearl/readme.md
@@ -18,5 +18,5 @@ See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_to
Enter the bootloader in 2 ways:
-* **Physical reset button**: Briefly press the button on the front left of the PCB labeled "QK_BOOT"
+* **Physical reset button**: Briefly press the button on the front left of the PCB labeled `RESET`
* **Keycode in layout**: Press the key mapped to `QK_BOOT` in conjunction with the key mapped to `MO(1))`
diff --git a/keyboards/pearlboards/zeus/readme.md b/keyboards/pearlboards/zeus/readme.md
index 2db71d3c64..b8217e81c1 100644
--- a/keyboards/pearlboards/zeus/readme.md
+++ b/keyboards/pearlboards/zeus/readme.md
@@ -18,5 +18,5 @@ See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_to
Enter the bootloader in 2 ways:
-* **Physical reset button**: Briefly press the button on the back of the PCB labeled "QK_BOOT"
+* **Physical reset button**: Briefly press the button on the back of the PCB labeled `RESET`
* **Keycode in layout**: Press the key mapped to `QK_BOOT` in conjunction with the key mapped to `MO(1))`
diff --git a/keyboards/pearlboards/zeuspad/readme.md b/keyboards/pearlboards/zeuspad/readme.md
index 690af89b79..b64be5261a 100644
--- a/keyboards/pearlboards/zeuspad/readme.md
+++ b/keyboards/pearlboards/zeuspad/readme.md
@@ -18,5 +18,5 @@ See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_to
Enter the bootloader in 2 ways:
-* **Physical reset button**: Briefly press the button on the front of the PCB labeled "QK_BOOT"
+* **Physical reset button**: Briefly press the button on the front of the PCB labeled `RESET`
* **Keycode in layout**: Press the key mapped to `QK_BOOT` in conjunction with the key mapped to `MO(1))`
diff --git a/keyboards/polycarbdiet/s20/readme.md b/keyboards/polycarbdiet/s20/readme.md
index e40f999a1c..eee783a4ff 100644
--- a/keyboards/polycarbdiet/s20/readme.md
+++ b/keyboards/polycarbdiet/s20/readme.md
@@ -17,7 +17,7 @@ Flashing example for this keyboard:
make polycarbdiet/s20:default:flash
**Reset Method:**
-- Press the `QK_BOOT` button on the under side of the PCB
+- Press the `RESET` button on the under side of the PCB
**Bootloader Method:**
- Hold down the key located at `K00`, commonly programmed as `ESC`, while plugging in the keyboard.
diff --git a/keyboards/ramonimbao/mona/v1_1/readme.md b/keyboards/ramonimbao/mona/v1_1/readme.md
index 17ae6012bd..b28fedd76c 100644
--- a/keyboards/ramonimbao/mona/v1_1/readme.md
+++ b/keyboards/ramonimbao/mona/v1_1/readme.md
@@ -7,7 +7,7 @@ A gummy-worm o-ring mount 60% marble keyboard. Now with ALPS/MX, Caps Lock LED,
* Keyboard Maintainer: [Ramon Imbao](https://github.com/ramonimbao)
* Hardware Supported: ATmega32u4
-To get to the bootloader, with the USB cable plugged in, press the `QK_BOOT` button on the back of the PCB.
+To get to the bootloader, with the USB cable plugged in, press the `RESET` button on the back of the PCB.
Make example for this keyboard (after setting up your build environment):
diff --git a/keyboards/ramonimbao/mona/v32a/readme.md b/keyboards/ramonimbao/mona/v32a/readme.md
index f9a730691f..61a3deefaa 100644
--- a/keyboards/ramonimbao/mona/v32a/readme.md
+++ b/keyboards/ramonimbao/mona/v32a/readme.md
@@ -7,7 +7,7 @@ A gummy-worm o-ring mount 60% marble keyboard. Now with ALPS/MX, Caps Lock LED,
* Keyboard Maintainer: [Ramon Imbao](https://github.com/ramonimbao)
* Hardware Supported: ATmega32A
-To get to the bootloader, with the USB cable plugged in, press the `QK_BOOT` button on the back of the PCB.
+To get to the bootloader, with the USB cable plugged in, press the `RESET` button on the back of the PCB.
Make example for this keyboard (after setting up your build environment):
diff --git a/keyboards/ryanskidmore/rskeys100/readme.md b/keyboards/ryanskidmore/rskeys100/readme.md
index 3100e74f2d..4be465dbde 100644
--- a/keyboards/ryanskidmore/rskeys100/readme.md
+++ b/keyboards/ryanskidmore/rskeys100/readme.md
@@ -19,4 +19,4 @@ See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_to
## Bootloader
-To enter the bootloader, press the `QK_BOOT` button on your daughterboard PCB while it's plugged in. \ No newline at end of file
+To enter the bootloader, press the `RESET` button on your daughterboard PCB while it's plugged in. \ No newline at end of file
diff --git a/keyboards/ryloo_studio/m0110/readme.md b/keyboards/ryloo_studio/m0110/readme.md
index 8729ef6319..78a59f0e62 100755
--- a/keyboards/ryloo_studio/m0110/readme.md
+++ b/keyboards/ryloo_studio/m0110/readme.md
@@ -16,9 +16,9 @@ Flashing example for this keyboard:
Putting the Keyboard in Bootloader Mode:
-The shipped PCB did not come with a reset button. To put the PCB in bootloader mode: locate the 2 `QK_BOOT` pins in the back of the PCB and short them with a conductive wire or tweezer.
+The shipped PCB did not come with a reset button. To put the PCB in bootloader mode: locate the 2 `RESET` pins in the back of the PCB and short them with a conductive wire or tweezer.
-![Ryloo Studio M0110 PCB QK_BOOT pins location](https://i.imgur.com/QJWmpqF.jpeg)
+![Ryloo Studio M0110 PCB RESET pins location](https://i.imgur.com/QJWmpqF.jpeg)
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/studiokestra/bourgeau/readme.md b/keyboards/studiokestra/bourgeau/readme.md
index b0a0bb2a89..16f87618e0 100644
--- a/keyboards/studiokestra/bourgeau/readme.md
+++ b/keyboards/studiokestra/bourgeau/readme.md
@@ -11,7 +11,7 @@ Compact 75% universal hotswap PCB with USB-C that supports a fixed 6.25U bottom
There are 3 ways to put the board in bootloader mode:
- Hold the top-left key (typically `Esc`) while plugging in the USB cable, OR
-- While the PCB is plugged into the PC, press the physical `QK_BOOT` button on the back of the board, OR
+- While the PCB is plugged into the PC, press the physical `RESET` button on the back of the board, OR
- With the default layout, toggle Layer 1 and press the `ESC` key.
## Compiling Firmware
diff --git a/keyboards/studiokestra/cascade/readme.md b/keyboards/studiokestra/cascade/readme.md
index e217b3edea..db55844ed1 100644
--- a/keyboards/studiokestra/cascade/readme.md
+++ b/keyboards/studiokestra/cascade/readme.md
@@ -11,7 +11,7 @@
There are 3 ways to put the board in bootloader mode:
- Hold the top-left key (typically `Esc`) while plugging in the USB cable, OR
-- While the PCB is plugged into the PC, press the physical `QK_BOOT` button on the back of the board, OR
+- While the PCB is plugged into the PC, press the physical `RESET` button on the back of the board, OR
- With the default layout, toggle Layer 1 and press the `ESC` key.
## Compiling Firmware
diff --git a/keyboards/studiokestra/galatea/readme.md b/keyboards/studiokestra/galatea/readme.md
index 08a6eae011..1268c596bf 100644
--- a/keyboards/studiokestra/galatea/readme.md
+++ b/keyboards/studiokestra/galatea/readme.md
@@ -13,7 +13,7 @@ TKL H87/88c compatible PCB with support for the most common layouts.
There are 3 ways to put the board in bootloader mode:
- Hold the top-left key (typically `Esc`) while plugging in the USB cable, OR
-- While the PCB is plugged into the PC, press the physical `QK_BOOT` button on the back of the board, OR
+- While the PCB is plugged into the PC, press the physical `RESET` button on the back of the board, OR
- With the default layout, toggle Layer 1 and press the `R` key.
## Compiling Firmware
diff --git a/keyboards/studiokestra/nue/readme.md b/keyboards/studiokestra/nue/readme.md
index f29f27be22..42e72902e4 100644
--- a/keyboards/studiokestra/nue/readme.md
+++ b/keyboards/studiokestra/nue/readme.md
@@ -11,7 +11,7 @@
There are 3 ways to put the board in bootloader mode:
- Hold the top-left key (typically `Esc`) while plugging in the USB cable, OR
-- While the PCB is plugged into the PC, press the physical `QK_BOOT` button on the back of the board, OR
+- While the PCB is plugged into the PC, press the physical `RESET` button on the back of the board, OR
- With the default layout, toggle Layer 1 and press the `R` key.
## Compiling Firmware
diff --git a/keyboards/xelus/xs60/config.h b/keyboards/xelus/xs60/hotswap/config.h
index a61cd22e53..5604b8139b 100644
--- a/keyboards/xelus/xs60/config.h
+++ b/keyboards/xelus/xs60/hotswap/config.h
@@ -1,4 +1,4 @@
-/* Copyright 2021 Harrison Chan (Xelus)
+/* Copyright 2022 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
@@ -16,17 +16,6 @@
#pragma once
-/* key matrix size */
-#define MATRIX_ROWS 5
-#define MATRIX_COLS 14
-
-/* key matrix pins */
-#define MATRIX_ROW_PINS { B4, B3, A15, A14, A7 }
-#define MATRIX_COL_PINS { B0, B1, A8, A9, B5, A6, C14, C15, A0, A5, A4, A3, A2, A1 }
-
-/* COL2ROW or ROW2COL */
-#define DIODE_DIRECTION COL2ROW
-
/* Set 0 if debouncing isn't needed */
#define DEBOUNCE 5
@@ -50,3 +39,13 @@
// More EEPROM for layers
#define DYNAMIC_KEYMAP_EEPROM_MAX_ADDR 8191
+
+// RGBLIGHT
+#define RGB_DI_PIN A10
+#define RGBLED_NUM 8 // actually only has 1
+#define RGBLIGHT_LAYERS
+#define WS2812_EXTERNAL_PULLUP
+#define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF
+
+// Bitbang WS2812
+#define NOP_FUDGE 0.4
diff --git a/keyboards/xelus/xs60/halconf.h b/keyboards/xelus/xs60/hotswap/halconf.h
index 73481c72a6..b494afca7f 100644
--- a/keyboards/xelus/xs60/halconf.h
+++ b/keyboards/xelus/xs60/hotswap/halconf.h
@@ -1,4 +1,4 @@
-/* Copyright 2021 Harrison Chan (Xelus)
+/* Copyright 2022 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
diff --git a/keyboards/xelus/xs60/xs60.c b/keyboards/xelus/xs60/hotswap/hotswap.c
index 95247c934a..cb84eeca18 100644
--- a/keyboards/xelus/xs60/xs60.c
+++ b/keyboards/xelus/xs60/hotswap/hotswap.c
@@ -1,4 +1,4 @@
-/* Copyright 2021 Harrison Chan (Xelus)
+/* Copyright 2022 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
@@ -14,7 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "xs60.h"
+#include "hotswap.h"
// tested and working
void matrix_io_delay(void) { __asm__ volatile("nop\nnop\nnop\n"); }
diff --git a/keyboards/xelus/xs60/hotswap/hotswap.h b/keyboards/xelus/xs60/hotswap/hotswap.h
new file mode 100644
index 0000000000..b2d4431554
--- /dev/null
+++ b/keyboards/xelus/xs60/hotswap/hotswap.h
@@ -0,0 +1,34 @@
+/* Copyright 2022 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/>.
+ */
+#pragma once
+
+#include "quantum.h"
+
+#define XXX KC_NO
+
+#define LAYOUT_60_ansi_tsangan_split_rshift( \
+ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
+ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
+ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \
+ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3C, K3D, \
+ K40, K41, K42, K45, K4A, K4B, K4D \
+) { \
+ { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \
+ { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \
+ { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, XXX, K2D }, \
+ { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, XXX, K3C, K3D }, \
+ { K40, K41, K42, XXX, XXX, K45, XXX, XXX, XXX, XXX, K4A, K4B, XXX, K4D } \
+}
diff --git a/keyboards/xelus/xs60/hotswap/info.json b/keyboards/xelus/xs60/hotswap/info.json
new file mode 100644
index 0000000000..e16b675902
--- /dev/null
+++ b/keyboards/xelus/xs60/hotswap/info.json
@@ -0,0 +1,83 @@
+{
+ "keyboard_name": "XS60 Hotswap",
+ "manufacturer": "Xelus",
+ "url": "",
+ "maintainer": "Xelus22",
+ "usb": {
+ "vid": "0x5845",
+ "pid": "0x5861",
+ "device_version": "0.0.1"
+ },
+ "diode_direction": "COL2ROW",
+ "matrix_pins": {
+ "cols": ["B0", "B1", "A8", "A9", "B5", "A6", "C14", "C15", "A0", "A5","A4","A3","A2","A1"],
+ "rows": ["B4", "B3", "A15", "A14", "A7"]
+ },
+ "layouts": {
+ "LAYOUT_60_ansi_tsangan_split_rshift": {
+ "layout": [
+ {"label":"Esc", "x":0, "y":0},
+ {"label":"1", "x":1, "y":0},
+ {"label":"2", "x":2, "y":0},
+ {"label":"3", "x":3, "y":0},
+ {"label":"4", "x":4, "y":0},
+ {"label":"5", "x":5, "y":0},
+ {"label":"6", "x":6, "y":0},
+ {"label":"7", "x":7, "y":0},
+ {"label":"8", "x":8, "y":0},
+ {"label":"9", "x":9, "y":0},
+ {"label":"0", "x":10, "y":0},
+ {"label":"-", "x":11, "y":0},
+ {"label":"=", "x":12, "y":0},
+ {"label":"Backspace", "x":13, "y":0, "w":2},
+ {"label":"Tab", "x":0, "y":1, "w":1.5},
+ {"label":"Q", "x":1.5, "y":1},
+ {"label":"W", "x":2.5, "y":1},
+ {"label":"E", "x":3.5, "y":1},
+ {"label":"R", "x":4.5, "y":1},
+ {"label":"T", "x":5.5, "y":1},
+ {"label":"Y", "x":6.5, "y":1},
+ {"label":"U", "x":7.5, "y":1},
+ {"label":"I", "x":8.5, "y":1},
+ {"label":"O", "x":9.5, "y":1},
+ {"label":"P", "x":10.5, "y":1},
+ {"label":"[", "x":11.5, "y":1},
+ {"label":"]", "x":12.5, "y":1},
+ {"label":"Backspace", "x":13.5, "y":1, "w":1.5},
+ {"label":"Caps Lock", "x":0, "y":2, "w":1.75},
+ {"label":"A", "x":1.75, "y":2},
+ {"label":"S", "x":2.75, "y":2},
+ {"label":"D", "x":3.75, "y":2},
+ {"label":"F", "x":4.75, "y":2},
+ {"label":"G", "x":5.75, "y":2},
+ {"label":"H", "x":6.75, "y":2},
+ {"label":"J", "x":7.75, "y":2},
+ {"label":"K", "x":8.75, "y":2},
+ {"label":"L", "x":9.75, "y":2},
+ {"label":";", "x":10.75, "y":2},
+ {"label":"'", "x":11.75, "y":2},
+ {"label":"Enter", "x":12.75, "y":2, "w":2.25},
+ {"label":"Shift", "x":0, "y":3, "w":2.25},
+ {"label":"Z", "x":2.25, "y":3},
+ {"label":"X", "x":3.25, "y":3},
+ {"label":"C", "x":4.25, "y":3},
+ {"label":"V", "x":5.25, "y":3},
+ {"label":"B", "x":6.25, "y":3},
+ {"label":"N", "x":7.25, "y":3},
+ {"label":"M", "x":8.25, "y":3},
+ {"label":",", "x":9.25, "y":3},
+ {"label":".", "x":10.25, "y":3},
+ {"label":"/", "x":11.25, "y":3},
+ {"label":"Shift", "x":12.25, "y":3, "w":1.75},
+ {"label":"Fn", "x":14, "y":3},
+ {"label":"Ctrl", "x":0, "y":4, "w":1.5},
+ {"label":"GUI", "x":1.5, "y":4},
+ {"label":"Alt", "x":2.5, "y":4, "w":1.5},
+ {"label":"Space", "x":4, "y":4, "w":7},
+ {"label":"Alt", "x":11, "y":4, "w":1.5},
+ {"label":"GUI", "x":12.5, "y":4},
+ {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}
+ ]
+ }
+ }
+}
diff --git a/keyboards/xelus/xs60/hotswap/keymaps/default/keymap.c b/keyboards/xelus/xs60/hotswap/keymaps/default/keymap.c
new file mode 100644
index 0000000000..87aa2adc03
--- /dev/null
+++ b/keyboards/xelus/xs60/hotswap/keymaps/default/keymap.c
@@ -0,0 +1,81 @@
+/* Copyright 2022 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/>.
+ */
+
+// Default layout for XS60
+#include QMK_KEYBOARD_H
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+// Default layer: Pressing caps-lock momentarily switches to Layer 1.
+// This is the default layer. Pressing an empty keycode on another layer will take you here.
+ [0] = LAYOUT_60_ansi_tsangan_split_rshift(
+ 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_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_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(1),
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL
+ ),
+
+ [1] = LAYOUT_60_ansi_tsangan_split_rshift(
+ 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_CAPS, KC_TRNS, KC_UP , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE,
+ KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, 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_RSFT, KC_PGUP, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END
+ )
+};
+
+#ifdef RGBLIGHT_LAYERS
+const rgblight_segment_t PROGMEM my_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS(
+ {0, 1, HSV_ORANGE}
+);
+
+const rgblight_segment_t PROGMEM my_layer1_layer[] = RGBLIGHT_LAYER_SEGMENTS(
+ {0, 1, HSV_CYAN}
+);
+
+const rgblight_segment_t PROGMEM my_layer2_layer[] = RGBLIGHT_LAYER_SEGMENTS(
+ {0, 1, HSV_PURPLE}
+);
+
+const rgblight_segment_t PROGMEM my_layer3_layer[] = RGBLIGHT_LAYER_SEGMENTS(
+ {0, 1, HSV_GREEN}
+);
+
+// Now define the array of layers. Later layers take precedence
+const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST(
+ my_capslock_layer,
+ my_layer1_layer, // Overrides caps lock layer
+ my_layer2_layer, // Overrides other layers
+ my_layer3_layer // Overrides other layers
+);
+
+void keyboard_post_init_user(void) {
+ // Enable the LED layers
+ rgblight_layers = my_rgb_layers;
+}
+
+bool led_update_user(led_t led_state) {
+ rgblight_set_layer_state(0, led_state.caps_lock);
+ return true;
+}
+
+layer_state_t layer_state_set_user(layer_state_t state) {
+ rgblight_set_layer_state(1, layer_state_cmp(state, 1));
+ rgblight_set_layer_state(2, layer_state_cmp(state, 2));
+ rgblight_set_layer_state(3, layer_state_cmp(state, 3));
+ return state;
+}
+#endif
diff --git a/keyboards/xelus/xs60/keymaps/via/config.h b/keyboards/xelus/xs60/hotswap/keymaps/via/config.h
index 8c0ed0c6e3..965c516a63 100644
--- a/keyboards/xelus/xs60/keymaps/via/config.h
+++ b/keyboards/xelus/xs60/hotswap/keymaps/via/config.h
@@ -1,4 +1,4 @@
-/* Copyright 2021 Harrison Chan (Xelus)
+/* Copyright 2022 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
diff --git a/keyboards/xelus/xs60/hotswap/keymaps/via/keymap.c b/keyboards/xelus/xs60/hotswap/keymaps/via/keymap.c
new file mode 100644
index 0000000000..b749a01580
--- /dev/null
+++ b/keyboards/xelus/xs60/hotswap/keymaps/via/keymap.c
@@ -0,0 +1,128 @@
+/* Copyright 2022 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/>.
+ */
+
+#include QMK_KEYBOARD_H
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+// Default layer: Pressing caps-lock momentarily switches to Layer 1.
+// This is the default layer. Pressing an empty keycode on another layer will take you here.
+ [0] = LAYOUT_60_ansi_tsangan_split_rshift(
+ 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_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_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_RSFT, MO(1),
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL
+ ),
+
+ [1] = LAYOUT_60_ansi_tsangan_split_rshift(
+ 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_CAPS, KC_TRNS, KC_UP , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE,
+ KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, 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_RSFT, KC_PGUP, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END
+ ),
+
+ [2] = LAYOUT_60_ansi_tsangan_split_rshift(
+ 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_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
+ ),
+
+ [3] = LAYOUT_60_ansi_tsangan_split_rshift(
+ 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_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
+ ),
+
+ [4] = LAYOUT_60_ansi_tsangan_split_rshift(
+ 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_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
+ ),
+
+ [5] = LAYOUT_60_ansi_tsangan_split_rshift(
+ 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_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
+ ),
+
+ [6] = LAYOUT_60_ansi_tsangan_split_rshift(
+ 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_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
+ ),
+
+ [7] = LAYOUT_60_ansi_tsangan_split_rshift(
+ 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_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
+ )
+};
+
+#ifdef RGBLIGHT_LAYERS
+const rgblight_segment_t PROGMEM my_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS(
+ {0, 1, HSV_ORANGE}
+);
+
+const rgblight_segment_t PROGMEM my_layer1_layer[] = RGBLIGHT_LAYER_SEGMENTS(
+ {0, 1, HSV_CYAN}
+);
+
+const rgblight_segment_t PROGMEM my_layer2_layer[] = RGBLIGHT_LAYER_SEGMENTS(
+ {0, 1, HSV_PURPLE}
+);
+
+const rgblight_segment_t PROGMEM my_layer3_layer[] = RGBLIGHT_LAYER_SEGMENTS(
+ {0, 1, HSV_GREEN}
+);
+
+// Now define the array of layers. Later layers take precedence
+const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST(
+ my_capslock_layer,
+ my_layer1_layer, // Overrides caps lock layer
+ my_layer2_layer, // Overrides other layers
+ my_layer3_layer // Overrides other layers
+);
+
+void keyboard_post_init_user(void) {
+ // Enable the LED layers
+ rgblight_layers = my_rgb_layers;
+}
+
+bool led_update_user(led_t led_state) {
+ rgblight_set_layer_state(0, led_state.caps_lock);
+ return true;
+}
+
+layer_state_t layer_state_set_user(layer_state_t state) {
+ rgblight_set_layer_state(1, layer_state_cmp(state, 1));
+ rgblight_set_layer_state(2, layer_state_cmp(state, 2));
+ rgblight_set_layer_state(3, layer_state_cmp(state, 3));
+ return state;
+}
+#endif
diff --git a/keyboards/xelus/xs60/hotswap/keymaps/via/rules.mk b/keyboards/xelus/xs60/hotswap/keymaps/via/rules.mk
new file mode 100644
index 0000000000..1e5b99807c
--- /dev/null
+++ b/keyboards/xelus/xs60/hotswap/keymaps/via/rules.mk
@@ -0,0 +1 @@
+VIA_ENABLE = yes
diff --git a/keyboards/xelus/xs60/mcuconf.h b/keyboards/xelus/xs60/hotswap/mcuconf.h
index a1d2f9480e..95f3845f57 100644
--- a/keyboards/xelus/xs60/mcuconf.h
+++ b/keyboards/xelus/xs60/hotswap/mcuconf.h
@@ -1,4 +1,4 @@
-/* Copyright 2021 Harrison Chan (Xelus)
+/* Copyright 2022 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
diff --git a/keyboards/xelus/xs60/hotswap/readme.md b/keyboards/xelus/xs60/hotswap/readme.md
new file mode 100644
index 0000000000..a8c7801c84
--- /dev/null
+++ b/keyboards/xelus/xs60/hotswap/readme.md
@@ -0,0 +1,16 @@
+# XS60HS
+
+XS60HS - ANSI, tsangan bottom row.
+
+* Keyboard Maintainer: [Xelus22](https://github.com/Xelus22)
+* Hardware Supported: Group buys
+
+Make example for this keyboard (after setting up your build environment):
+
+ make xelus/xs60/hotswap:default
+
+Reset your keyboard in 3 ways:
+* Bootmagic reset: hold down the top left key (usually ESC) and plugin the keyboard
+* Physical reset button: on the back of the PCB, there should be a small golden button you can press
+
+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/kprepublic/bm16a/rules.mk b/keyboards/xelus/xs60/hotswap/rules.mk
index 325564a154..a013327f56 100644
--- a/keyboards/kprepublic/bm16a/rules.mk
+++ b/keyboards/xelus/xs60/hotswap/rules.mk
@@ -1,8 +1,8 @@
# MCU name
-MCU = atmega32u4
+MCU = STM32L422
# Bootloader selection
-BOOTLOADER = atmel-dfu
+BOOTLOADER = stm32-dfu
# Build Options
# change yes to no to disable
@@ -10,11 +10,18 @@ BOOTLOADER = atmel-dfu
BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
MOUSEKEY_ENABLE = yes # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
-CONSOLE_ENABLE = no # Console for debug
+CONSOLE_ENABLE = yes # Console for debug
COMMAND_ENABLE = no # Commands for debug and configuration
NKRO_ENABLE = yes # Enable N-Key Rollover
-BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
-RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
AUDIO_ENABLE = no # Audio output
-LAYOUTS = ortho_4x4
+EEPROM_DRIVER = i2c
+
+RGBLIGHT_ENABLE = yes
+WS2812_DRIVER = bitbang
+
+LTO_ENABLE = yes
+OPT = 2
+
+# LAYOUTS = LAYOUT_60_ansi_tsangan_split_rshift
diff --git a/keyboards/xelus/xs60/soldered/config.h b/keyboards/xelus/xs60/soldered/config.h
new file mode 100644
index 0000000000..bb97900a03
--- /dev/null
+++ b/keyboards/xelus/xs60/soldered/config.h
@@ -0,0 +1,50 @@
+/* Copyright 2022 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/>.
+ */
+
+#pragma once
+
+/* Set 0 if debouncing isn't needed */
+#define DEBOUNCE 5
+
+/* 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
+
+// I2C setup
+#define I2C1_SCL_PAL_MODE 4
+#define I2C1_SDA_PAL_MODE 4
+#define I2C1_TIMINGR_PRESC 0U
+#define I2C1_TIMINGR_SCLDEL 7U
+#define I2C1_TIMINGR_SDADEL 0U
+#define I2C1_TIMINGR_SCLH 45U
+#define I2C1_TIMINGR_SCLL 149U
+
+// I2C EEPROM
+#define EEPROM_I2C_24LC64
+
+// More EEPROM for layers
+
+// RGBLIGHT
+#define RGB_DI_PIN A10
+#define RGBLED_NUM 8 // actually only has 1
+#define RGBLIGHT_LAYERS
+#define WS2812_EXTERNAL_PULLUP
+#define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF
+
+// Bitbang WS2812
+#define NOP_FUDGE 0.4
diff --git a/keyboards/xelus/xs60/soldered/halconf.h b/keyboards/xelus/xs60/soldered/halconf.h
new file mode 100644
index 0000000000..b494afca7f
--- /dev/null
+++ b/keyboards/xelus/xs60/soldered/halconf.h
@@ -0,0 +1,22 @@
+/* Copyright 2022 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/>.
+ */
+
+#pragma once
+
+#define HAL_USE_I2C TRUE
+
+#include_next <halconf.h>
+
diff --git a/keyboards/xelus/xs60/info.json b/keyboards/xelus/xs60/soldered/info.json
index 089d728b01..c44aaca642 100644
--- a/keyboards/xelus/xs60/info.json
+++ b/keyboards/xelus/xs60/soldered/info.json
@@ -1,5 +1,5 @@
{
- "keyboard_name": "XS60",
+ "keyboard_name": "XS60 Soldered",
"manufacturer": "Xelus",
"url": "",
"maintainer": "Xelus22",
@@ -8,6 +8,11 @@
"pid": "0x5860",
"device_version": "0.0.1"
},
+ "diode_direction": "COL2ROW",
+ "matrix_pins": {
+ "cols": ["B0", "B1", "A8", "A9", "B5", "A6", "C14", "C15", "A0", "A5", "A4", "A3", "A2", "A1"],
+ "rows": ["B4", "B3", "A15", "A14", "A7"]
+ },
"layouts": {
"LAYOUT_60_ansi_split_bs_rshift": {
"layout": [
diff --git a/keyboards/xelus/xs60/keymaps/default/keymap.c b/keyboards/xelus/xs60/soldered/keymaps/default/keymap.c
index 6970b02543..63d910eff4 100644
--- a/keyboards/xelus/xs60/keymaps/default/keymap.c
+++ b/keyboards/xelus/xs60/soldered/keymaps/default/keymap.c
@@ -1,4 +1,4 @@
-/* Copyright 2021 Harrison Chan (Xelus)
+/* Copyright 2022 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
@@ -36,3 +36,47 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END
)
};
+
+
+#ifdef RGBLIGHT_LAYERS
+const rgblight_segment_t PROGMEM my_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS(
+ {0, 1, HSV_ORANGE}
+);
+
+const rgblight_segment_t PROGMEM my_layer1_layer[] = RGBLIGHT_LAYER_SEGMENTS(
+ {0, 1, HSV_CYAN}
+);
+
+const rgblight_segment_t PROGMEM my_layer2_layer[] = RGBLIGHT_LAYER_SEGMENTS(
+ {0, 1, HSV_PURPLE}
+);
+
+const rgblight_segment_t PROGMEM my_layer3_layer[] = RGBLIGHT_LAYER_SEGMENTS(
+ {0, 1, HSV_GREEN}
+);
+
+// Now define the array of layers. Later layers take precedence
+const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST(
+ my_capslock_layer,
+ my_layer1_layer, // Overrides caps lock layer
+ my_layer2_layer, // Overrides other layers
+ my_layer3_layer // Overrides other layers
+);
+
+void keyboard_post_init_user(void) {
+ // Enable the LED layers
+ rgblight_layers = my_rgb_layers;
+}
+
+bool led_update_user(led_t led_state) {
+ rgblight_set_layer_state(0, led_state.caps_lock);
+ return true;
+}
+
+layer_state_t layer_state_set_user(layer_state_t state) {
+ rgblight_set_layer_state(1, layer_state_cmp(state, 1));
+ rgblight_set_layer_state(2, layer_state_cmp(state, 2));
+ rgblight_set_layer_state(3, layer_state_cmp(state, 3));
+ return state;
+}
+#endif
diff --git a/keyboards/xelus/xs60/soldered/keymaps/via/config.h b/keyboards/xelus/xs60/soldered/keymaps/via/config.h
new file mode 100644
index 0000000000..965c516a63
--- /dev/null
+++ b/keyboards/xelus/xs60/soldered/keymaps/via/config.h
@@ -0,0 +1,19 @@
+/* Copyright 2022 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/>.
+ */
+#pragma once
+
+// More layers
+#define DYNAMIC_KEYMAP_LAYER_COUNT 8
diff --git a/keyboards/xelus/xs60/keymaps/via/keymap.c b/keyboards/xelus/xs60/soldered/keymaps/via/keymap.c
index 76901c41c7..a6ae08741a 100644
--- a/keyboards/xelus/xs60/keymaps/via/keymap.c
+++ b/keyboards/xelus/xs60/soldered/keymaps/via/keymap.c
@@ -1,4 +1,4 @@
-/* Copyright 2021 Harrison Chan (Xelus)
+/* Copyright 2022 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
@@ -83,3 +83,47 @@ 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
)
};
+
+
+#ifdef RGBLIGHT_LAYERS
+const rgblight_segment_t PROGMEM my_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS(
+ {0, 1, HSV_ORANGE}
+);
+
+const rgblight_segment_t PROGMEM my_layer1_layer[] = RGBLIGHT_LAYER_SEGMENTS(
+ {0, 1, HSV_CYAN}
+);
+
+const rgblight_segment_t PROGMEM my_layer2_layer[] = RGBLIGHT_LAYER_SEGMENTS(
+ {0, 1, HSV_PURPLE}
+);
+
+const rgblight_segment_t PROGMEM my_layer3_layer[] = RGBLIGHT_LAYER_SEGMENTS(
+ {0, 1, HSV_GREEN}
+);
+
+// Now define the array of layers. Later layers take precedence
+const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST(
+ my_capslock_layer,
+ my_layer1_layer, // Overrides caps lock layer
+ my_layer2_layer, // Overrides other layers
+ my_layer3_layer // Overrides other layers
+);
+
+void keyboard_post_init_user(void) {
+ // Enable the LED layers
+ rgblight_layers = my_rgb_layers;
+}
+
+bool led_update_user(led_t led_state) {
+ rgblight_set_layer_state(0, led_state.caps_lock);
+ return true;
+}
+
+layer_state_t layer_state_set_user(layer_state_t state) {
+ rgblight_set_layer_state(1, layer_state_cmp(state, 1));
+ rgblight_set_layer_state(2, layer_state_cmp(state, 2));
+ rgblight_set_layer_state(3, layer_state_cmp(state, 3));
+ return state;
+}
+#endif
diff --git a/keyboards/xelus/xs60/soldered/keymaps/via/rules.mk b/keyboards/xelus/xs60/soldered/keymaps/via/rules.mk
new file mode 100644
index 0000000000..1e5b99807c
--- /dev/null
+++ b/keyboards/xelus/xs60/soldered/keymaps/via/rules.mk
@@ -0,0 +1 @@
+VIA_ENABLE = yes
diff --git a/keyboards/xelus/xs60/soldered/mcuconf.h b/keyboards/xelus/xs60/soldered/mcuconf.h
new file mode 100644
index 0000000000..95f3845f57
--- /dev/null
+++ b/keyboards/xelus/xs60/soldered/mcuconf.h
@@ -0,0 +1,23 @@
+/* Copyright 2022 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/>.
+ */
+
+#pragma once
+
+#include_next <mcuconf.h>
+
+#undef STM32_I2C_USE_I2C1
+#define STM32_I2C_USE_I2C1 TRUE
+
diff --git a/keyboards/xelus/xs60/readme.md b/keyboards/xelus/xs60/soldered/readme.md
index f169f7f169..24a0b96280 100644
--- a/keyboards/xelus/xs60/readme.md
+++ b/keyboards/xelus/xs60/soldered/readme.md
@@ -1,4 +1,4 @@
-# XS60
+# XS60 Soldered
XS60 ANSI, normal + tsangan bottom row.
@@ -7,10 +7,9 @@ XS60 ANSI, normal + tsangan bottom row.
Make example for this keyboard (after setting up your build environment):
- make xelus/xs60:default
+ make xelus/xs60/soldered:default
Reset your keyboard in 3 ways:
-* Software reset on Fn + Backspace
* Bootmagic reset: hold down the top left key (usually ESC) and plugin the keyboard
* Physical reset button: on the back of the PCB, there should be a small golden button you can press
diff --git a/keyboards/xelus/xs60/rules.mk b/keyboards/xelus/xs60/soldered/rules.mk
index 65c7d981ef..17919eff22 100644
--- a/keyboards/xelus/xs60/rules.mk
+++ b/keyboards/xelus/xs60/soldered/rules.mk
@@ -18,6 +18,9 @@ AUDIO_ENABLE = no # Audio output
EEPROM_DRIVER = i2c
+RGBLIGHT_ENABLE = yes
+WS2812_DRIVER = bitbang
+
LTO_ENABLE = yes
OPT = 2
diff --git a/keyboards/xelus/xs60/soldered/soldered.c b/keyboards/xelus/xs60/soldered/soldered.c
new file mode 100644
index 0000000000..bedf318221
--- /dev/null
+++ b/keyboards/xelus/xs60/soldered/soldered.c
@@ -0,0 +1,20 @@
+/* Copyright 2022 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/>.
+ */
+
+#include "soldered.h"
+
+// tested and working
+void matrix_io_delay(void) { __asm__ volatile("nop\nnop\nnop\n"); }
diff --git a/keyboards/xelus/xs60/xs60.h b/keyboards/xelus/xs60/soldered/soldered.h
index 41ecb4efaf..bcfd1437de 100644
--- a/keyboards/xelus/xs60/xs60.h
+++ b/keyboards/xelus/xs60/soldered/soldered.h
@@ -1,4 +1,4 @@
-/* Copyright 2021 Harrison Chan (Xelus)
+/* Copyright 2022 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
diff --git a/keyboards/xiudi/xd75/keymaps/replicajunction/config.h b/keyboards/xiudi/xd75/keymaps/replicajunction/config.h
deleted file mode 100644
index a02f9a95db..0000000000
--- a/keyboards/xiudi/xd75/keymaps/replicajunction/config.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/* Copyright 2021 Joshua T.
- *
- * 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
-
-// Do not allow one macro to contain the other macro
-#define DYNAMIC_MACRO_NO_NESTING
-
-// "THE most important tap hold configuration setting"
-// https://precondition.github.io/home-row-mods#ignore-mod-tap-interrupt
-// https://docs.qmk.fm/#/tap_hold?id=ignore-mod-tap-interrupt
-#define IGNORE_MOD_TAP_INTERRUPT
-
-// This one is a style choice. Play with it both on and off to see which
-// one suits you better.
-// https://precondition.github.io/home-row-mods#permissive-hold
-// https://docs.qmk.fm/#/tap_hold?id=permissive-hold
-#define PERMISSIVE_HOLD
-
-// If you press a dual-role key for longer than TAPPING_TERM, then
-// release it without pressing another key, without this setting nothing
-// would happen. With this setting, it sends the key's tap function.
-// https://precondition.github.io/home-row-mods#retro-tapping
-#define RETRO_TAPPING
-
-// Disable some unused features to save space
-#undef LOCKING_SUPPORT_ENABLE
-#undef LOCKING_RESYNC_ENABLE
-
-/////
-// Flags for stuff in my userspace
-
-#define USER_INCLUDE_GAMING_LAYER
-#define USER_INCLUDE_MACRO_LAYER
-
-// "Super Alt-Tab"
-// https://docs.qmk.fm/#/feature_macros?id=super-alt%E2%86%AFtab
-#define USER_SUPER_ALT_TAB_TIMEOUT 500
diff --git a/keyboards/xiudi/xd75/keymaps/replicajunction/keymap.c b/keyboards/xiudi/xd75/keymaps/replicajunction/keymap.c
deleted file mode 100644
index 06e048e9f9..0000000000
--- a/keyboards/xiudi/xd75/keymaps/replicajunction/keymap.c
+++ /dev/null
@@ -1,138 +0,0 @@
-/* Copyright 2021 Joshua T.
- *
- * 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 "replicaJunction.h"
-
-// enum additional_keyboard_layers {
-// L_RGB = _LAYER_SAFE_RANGE
-// };
-
-#define BSP_SYM LT(L_SYMBOLS, KC_BSPC)
-#define SPC_NAV LT(L_NAVIGATION, KC_SPC)
-#define ESC_NUM LT(L_NUMBERS, KC_ESC)
-#define MO_FN MO(L_FN)
-#define MO_MAC MO(L_MACROS)
-
-#define DF_TYPE DF(L_BASE)
-#define DF_GAME DF(L_GAMING)
-
-#define ESC_SFT LSFT_T(KC_ESC)
-#define TAB_SFT RSFT_T(KC_TAB)
-
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [L_BASE] = LAYOUT_ortho_5x15(
- KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_GRV, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
- KC_EQL, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_LBRC, KC_BSLS, KC_RBRC, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS,
- KC_MINS, KC_A, KC_R, KC_S, KC_T, KC_G, SALTTAB, KC_UP, KC_END, KC_M, KC_N, KC_E, KC_I, KC_O, KC_QUOT,
- NUMWORD, KC_Z, KC_X, KC_C, KC_D, KC_V, KC_LEFT, KC_DOWN, KC_RGHT, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, CAPWORD,
- KC_LCTL, KC_LGUI, KC_LALT, MO_FN, ESC_SFT, BSP_SYM, CTL_DEL, KC_ENT, ALT_ENT, SPC_NAV, TAB_SFT, MO_FN, KC_RALT, KC_RGUI, KC_RCTL
- ),
-
-
- [L_GAMING] = LAYOUT_ortho_5x15(
- KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_GRV, 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_BSLS, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_QUOT,
- KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_HOME, KC_DEL, KC_PGUP, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT,
- KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_END, KC_UP, KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
- KC_LCTL, KC_LCTL, KC_LALT, KC_LSFT, KC_SPC, KC_LALT, KC_LEFT, KC_DOWN, KC_RGHT, KC_BSPC, KC_SPC, MO_FN, KC_RALT, KC_RGUI, KC_RCTL
- ),
-
-
- // [L_QWERTY] = LAYOUT_ortho_5x15(
- // KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_GRV, 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_BSLS, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_QUOT,
- // KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_HOME, KC_DEL, KC_PGUP, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT,
- // KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_END, KC_UP, KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
- // KC_LCTL, KC_LGUI, KC_LALT, MO(_FN), KC_SPC, KC_SPC, KC_LEFT, KC_DOWN, KC_RGHT, KC_SPC, KC_SPC, MO(_FN), KC_RALT, KC_RGUI, KC_RCTL
- // ),
-
-
- // [L_CURSOR] = LAYOUT_ortho_5x15(
- // _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- // _______, _______, _______, _______, _______, _______, _______, _______, _______, OS_SALL, OS_COPY, OS_PAST, OS_CUT, OS_UNDO, _______,
- // _______, KC_LGUI, KC_LALT, KC_LSFT, KC_LCTL, _______, _______, _______, SEARCH, SALTTAB, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______,
- // _______, KC_RGUI, KC_RALT, KC_RSFT, KC_RCTL, _______, _______, _______, _______, OS_FIND, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______,
- // _______, _______, _______, _______, _______, ooooooo, _______, _______, _______, SPC_NAV, _______, _______, _______, _______, _______
- // ),
-
-
- [L_NUMBERS] = LAYOUT_ortho_5x15(
- _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_NUM, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HASH, KC_P7, KC_P8, KC_P9, KC_PSLS, SFT_TAB,
- _______, KC_LGUI, KC_LALT, KC_LSFT, KC_LCTL, _______, _______, _______, _______, KC_PPLS, KC_P4, KC_P5, KC_P6, KC_PAST, KC_TAB,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PMNS, KC_P1, KC_P2, KC_P3, KC_BSLS, KC_EQL,
- _______, _______, _______, _______, ooooooo, _______, _______, _______, _______, _______, KC_P0, KC_P0, KC_PDOT, KC_PENT, _______
- ),
-
-
- [L_SYMBOLS] = LAYOUT_ortho_5x15(
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, KC_AT, KC_LT, KC_DLR, KC_GT, XXXXXXX, _______, _______, _______, XXXXXXX, KC_LBRC, KC_UNDS, KC_RBRC, XXXXXXX, _______,
- _______, KC_BSLS, KC_LPRN, KC_DQUO, KC_RPRN, KC_HASH, _______, _______, _______, KC_PERC, KC_LCBR, KC_EQL, KC_RCBR, KC_PIPE, _______,
- _______, KC_EXLM, KC_COLN, KC_ASTR, KC_PLUS, XXXXXXX, _______, _______, _______, XXXXXXX, KC_AMPR, KC_CIRC, KC_TILD, KC_GRV, _______,
- _______, _______, _______, _______, _______, ooooooo, _______, _______, _______, ooooooo, _______, _______, _______, _______, _______
- ),
-
-
- [L_NAVIGATION] = LAYOUT_ortho_5x15(
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, OS_UNDO, OS_CUT, OS_PAST, OS_COPY, OS_SALL, _______, _______, _______, KC_PGUP, KC_HOME, KC_UP, KC_END, KC_DEL, _______,
- _______, KC_LGUI, KC_LALT, KC_LSFT, KC_LCTL, _______, _______, _______, _______, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_BSPC, _______,
- _______, WIN_V, _______, _______, OS_FIND, SEARCH, _______, _______, _______, _______, SFT_TAB, KC_TAB, KC_APP, KC_PSCR, _______,
- _______, _______, _______, _______, _______, ooooooo, _______, _______, _______, ooooooo, _______, _______, _______, _______, _______
- ),
-
-
- [L_FN] = LAYOUT_ortho_5x15(
- DF_TYPE, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, MS_JIGL, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
- DF_GAME, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, _______, _______, _______, _______, KC_VOLU, _______, _______, _______, _______, KC_F12,
- _______, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, KC_CAPS, QK_BOOT, _______, KC_MUTE, _______, _______, _______, _______, _______,
- _______, RGB_M_P, RGB_M_B, _______, _______, _______, _______, _______, _______, KC_VOLD, K_SECR1, K_SECR2, K_SECR3, K_SECR4, _______,
- _______, _______, _______, ooooooo, _______, _______, _______, _______, _______, _______, _______, ooooooo, _______, _______, _______
- ),
-
-
- [L_MACROS] = LAYOUT_ortho_5x15(
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, QK_MAKE, _______, DM_REC2, DM_REC1, _______, _______, _______, _______, _______, SHEBANG, _______, _______, _______, _______,
- _______, QK_FLSH, _______, DM_PLY2, DM_PLY1, DM_RSTP, _______, _______, _______, PRG_NE, PRG_EQ, PRG_GEQ, PRG_LEQ, PRG_ARR, _______,
- _______, QK_VERS, _______, _______, _______, _______, _______, _______, _______, _______, PS_ITEM, FS_PIPE, _______, FS_ARR, _______,
- _______, _______, _______, _______, ooooooo, _______, _______, _______, _______, ooooooo, _______, _______, _______, _______, _______
- )
-
- // [_FN] = LAYOUT_ortho_5x15( /* FUNCTION */
- // _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_NUM, KC_SLSH, KC_ASTR, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
- // KC_MSEL, KC_CALC, KC_MYCM, KC_MAIL, RGB_HUD, RGB_HUI, KC_P7, KC_P8, KC_P9, KC_MINS, _______, _______, KC_PSCR, KC_SCRL, KC_F12,
- // KC_MPRV, KC_MPLY, KC_MNXT, KC_MSTP, RGB_SAD, RGB_SAI, KC_P4, KC_P5, KC_P6, KC_PLUS, _______, QK_BOOT, _______, _______, _______,
- // KC_VOLD, KC_MUTE, KC_VOLU, KC_APP, RGB_VAD, RGB_VAI, KC_P1, KC_P2, KC_P3, KC_PENT, _______, _______, _______, _______, _______,
- // _______, _______, RGB_TOG, ooooooo, RGB_RMOD,RGB_MOD, KC_P0, _______, KC_PDOT, KC_PENT, KC_PENT, ooooooo, _______, _______, _______
- // )
-
- // // Template
- // [_LAYER] = LAYOUT_ortho_5x15(
- // _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- // _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- // _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- // _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- // _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
- // ),
-};
-
-layer_state_t layer_state_set_user(layer_state_t state) {
- return update_tri_layer_state(state, L_SYMBOLS, L_NAVIGATION, L_MACROS);
-}
diff --git a/keyboards/xiudi/xd75/keymaps/replicajunction/readme.md b/keyboards/xiudi/xd75/keymaps/replicajunction/readme.md
deleted file mode 100644
index 980a2f7272..0000000000
--- a/keyboards/xiudi/xd75/keymaps/replicajunction/readme.md
+++ /dev/null
@@ -1,5 +0,0 @@
-# replicaJunction - XD75 layout
-
-As a longtime ortho user, I prefer the "pseudo-split" keymap, where the center 3 columns are used for other purposes. This leaves 6 columns on each side to used like a split Preonic.
-
-Most of the goodies in this layout are defined in [my userspace folder](../../../../users/replicaJunction/readme.md). Better explanations of the interesting features are provided there.
diff --git a/keyboards/xiudi/xd75/keymaps/replicajunction/rules.mk b/keyboards/xiudi/xd75/keymaps/replicajunction/rules.mk
deleted file mode 100644
index 7e0b3c9cac..0000000000
--- a/keyboards/xiudi/xd75/keymaps/replicajunction/rules.mk
+++ /dev/null
@@ -1,29 +0,0 @@
-# Userspace options
-USER_CAPS_WORD_ENABLE = yes
-USER_MOUSE_JIGGLE_ENABLE = yes
-USER_NUM_WORD_ENABLE = yes
-USER_SECRETS_ENABLE = yes
-USER_SUPER_ALT_TAB_ENABLE = yes
-
-DYNAMIC_MACRO_ENABLE = yes
-
-# Extra features that are nice but takes space. Enable only if they're
-# used in the layout.
-WPM_ENABLE = no
-# EXTRAKEY_ENABLE = no # For volume keys and similar
-# MOUSEKEY_ENABLE = no # Them mouse keys yo
-KEY_OVERRIDE_ENABLE = no
-LEADER_ENABLE = no
-TAP_DANCE_ENABLE = no
-# RGBLIGHT_ENABLE = no # Keyboard RGB underglow
-RGB_MATRIX_ENABLE = no
-
-# Features I definitely don't care aboud
-LTO_ENABLE = yes
-CONSOLE_ENABLE = no
-VERBOSE = no
-DEBUG_MATRIX_SCAN_RATE = no
-DEBUG_MATRIX = no
-MAGIC_ENABLE = no
-SPACE_CADET_ENABLE = no
-GRAVE_ESC_ENABLE = no
diff --git a/keyboards/ydkb/just60/readme.md b/keyboards/ydkb/just60/readme.md
index 76eee5dced..1fe05bd3ea 100644
--- a/keyboards/ydkb/just60/readme.md
+++ b/keyboards/ydkb/just60/readme.md
@@ -2,7 +2,7 @@
Just60 keyboard produced by Yang. The keyboard comes with a custom Mass Storage Device bootloader and a TMK based firmware from ydkb.io.
-To use a QMK based firmware, you might want to install a QMK bootloader. The PCB exposes 6 pins for ISP(In-System Programming), and they are located just under the ATMega32U4 chip. From left to right, the pins are `VCC`, `SCLK`, `MOSI`, `MISO`, `QK_BOOT`, `GND`. The `GND` is the square one. You could program the flash with any AVR programmer, or a Raspberry Pi with `avrdude`.
+To use a QMK based firmware, you might want to install a QMK bootloader. The PCB exposes 6 pins for ISP(In-System Programming), and they are located just under the ATMega32U4 chip. From left to right, the pins are `VCC`, `SCLK`, `MOSI`, `MISO`, `RESET`, `GND`. The `GND` is the square one. You could program the flash with any AVR programmer, or a Raspberry Pi with `avrdude`.
Backlight LEDs and Bluetooth are not working yet.
diff --git a/layouts/community/ergodox/replicaJunction/config.h b/layouts/community/ergodox/replicaJunction/config.h
deleted file mode 100644
index a02f9a95db..0000000000
--- a/layouts/community/ergodox/replicaJunction/config.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/* Copyright 2021 Joshua T.
- *
- * 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
-
-// Do not allow one macro to contain the other macro
-#define DYNAMIC_MACRO_NO_NESTING
-
-// "THE most important tap hold configuration setting"
-// https://precondition.github.io/home-row-mods#ignore-mod-tap-interrupt
-// https://docs.qmk.fm/#/tap_hold?id=ignore-mod-tap-interrupt
-#define IGNORE_MOD_TAP_INTERRUPT
-
-// This one is a style choice. Play with it both on and off to see which
-// one suits you better.
-// https://precondition.github.io/home-row-mods#permissive-hold
-// https://docs.qmk.fm/#/tap_hold?id=permissive-hold
-#define PERMISSIVE_HOLD
-
-// If you press a dual-role key for longer than TAPPING_TERM, then
-// release it without pressing another key, without this setting nothing
-// would happen. With this setting, it sends the key's tap function.
-// https://precondition.github.io/home-row-mods#retro-tapping
-#define RETRO_TAPPING
-
-// Disable some unused features to save space
-#undef LOCKING_SUPPORT_ENABLE
-#undef LOCKING_RESYNC_ENABLE
-
-/////
-// Flags for stuff in my userspace
-
-#define USER_INCLUDE_GAMING_LAYER
-#define USER_INCLUDE_MACRO_LAYER
-
-// "Super Alt-Tab"
-// https://docs.qmk.fm/#/feature_macros?id=super-alt%E2%86%AFtab
-#define USER_SUPER_ALT_TAB_TIMEOUT 500
diff --git a/layouts/community/ergodox/replicaJunction/keymap.c b/layouts/community/ergodox/replicaJunction/keymap.c
deleted file mode 100644
index 4e0559a3e2..0000000000
--- a/layouts/community/ergodox/replicaJunction/keymap.c
+++ /dev/null
@@ -1,378 +0,0 @@
-/* Copyright 2021 Joshua T.
- *
- * 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 "replicaJunction.h"
-
-// Most layers are defined in my userspace, but this keyboard has
-// an extra one.
-enum additional_keyboard_layers {
- L_SYSLEDS = _LAYER_SAFE_RANGE
-};
-
-#define BSP_SYM LT(L_SYMBOLS, KC_BSPC)
-#define SPC_NAV LT(L_NAVIGATION, KC_SPC)
-
-#define MO_FN MO(L_FN)
-#define MO_MAC MO(L_MACROS)
-#define MO_SLED MO(L_SYSLEDS)
-
-#define TG_GAME TG(L_GAMING)
-
-#define ESC_SFT LSFT_T(KC_ESC)
-#define TAB_SFT RSFT_T(KC_TAB)
-
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-
-
-[L_BASE] = LAYOUT_ergodox(
- KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS,
- KC_EQL, KC_Q, KC_W, KC_F, KC_P, KC_B, NUMWORD,
- KC_MINS, KC_A, KC_R, KC_S, KC_T, KC_G,
- KC_LSFT, KC_Z, KC_X, KC_C, KC_D, KC_V, KC_RBRC,
- KC_LCTL, KC_LGUI ,KC_LALT, MO_FN, ESC_SFT,
- KC_HOME, KC_END,
- KC_PGUP,
- BSP_SYM, CTL_DEL, KC_PGDN,
-
- TG_GAME, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL,
- CAPWORD, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS,
- KC_M, KC_N, KC_E, KC_I, KC_O, KC_QUOT,
- QK_LOCK, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
- TAB_SFT, MO_FN, KC_RALT, KC_RGUI, MO_SLED,
- KC_LEFT, KC_RGHT,
- KC_UP,
- KC_DOWN, ALT_ENT, SPC_NAV
-),
-
-
-[L_GAMING] = LAYOUT_ergodox(
- KC_GRV, _______,_______,_______,_______,_______,_______,
- KC_TAB, _______,_______,_______,_______,_______,_______,
- KC_ESC, KC_A, KC_R, KC_S, KC_T, _______,
- KC_LSFT,_______,_______,KC_C, KC_D, _______,_______,
- _______,_______,KC_TAB, KC_LALT,KC_LCTL,
- QK_LOCK,_______,
- _______,
- KC_SPC, KC_LSFT,_______,
-
- ooooooo,_______,_______,_______,_______,_______,_______,
- _______,_______,_______,_______,_______,_______,_______,
- _______,KC_N, KC_E, KC_I, KC_O, _______,
- _______,_______,_______,_______,_______,_______,_______,
- MO_FN, KC_LEFT,KC_DOWN,KC_UP, KC_RGHT,
- KC_BTN3,_______,
- KC_BTN2,
- KC_BTN1,KC_ENT, KC_BSPC
-),
-
-
-[L_NUMBERS] = LAYOUT_ergodox(
- _______,_______,_______,_______,_______,_______,_______,
- _______,_______,_______,_______,_______,_______,_______,
- _______,KC_LGUI,KC_LALT,KC_LSFT,KC_LCTL,_______,
- _______,_______,_______,_______,_______,_______,_______,
- _______,_______,_______,_______,_______,
- _______,_______,
- _______,
- _______,_______,_______,
-
- _______,KC_NUM, _______,_______,_______,_______,_______,
- KC_NUM, KC_HASH,KC_P7, KC_P8, KC_P9, KC_PSLS,SFT_TAB,
- KC_PPLS,KC_P4, KC_P5, KC_P6, KC_PAST,KC_TAB,
- _______,KC_PMNS,KC_P1, KC_P2, KC_P3, KC_BSLS,KC_EQL,
- KC_P0, KC_P0, KC_PDOT,KC_PENT,_______,
- _______,_______,
- _______,
- _______,_______,_______
-),
-
-
-[L_SYMBOLS] = LAYOUT_ergodox(
- _______,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______,
- _______,KC_AT, KC_LT, KC_DLR, KC_GT, XXXXXXX,_______,
- _______,KC_BSLS,KC_LPRN,KC_DQUO,KC_RPRN,KC_HASH,
- _______,KC_EXLM,KC_COLN,KC_ASTR,KC_PLUS,XXXXXXX,_______,
- _______,_______,_______,_______,_______,
- _______,_______,
- _______,
- ooooooo,_______,_______,
-
- _______,KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
- _______,XXXXXXX,KC_LBRC,KC_UNDS,KC_RBRC,XXXXXXX,KC_F12,
- KC_PERC,KC_LCBR,KC_EQL, KC_RCBR,KC_PIPE,_______,
- _______,XXXXXXX,KC_AMPR,KC_CIRC,KC_TILD,KC_GRV, _______,
- _______,_______,_______,_______,_______,
- _______,_______,
- _______,
- _______,_______,ooooooo
-),
-
-
-[L_NAVIGATION] = LAYOUT_ergodox(
- _______,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______,
- _______,OS_UNDO,OS_CUT, OS_PAST,OS_COPY,OS_SALL,_______,
- _______,KC_LGUI,KC_LSFT,KC_LALT,KC_LCTL,_______,
- _______,WIN_V, _______,_______,OS_FIND,SEARCH, _______,
- _______,_______,_______,_______,_______,
- _______,_______,
- _______,
- _______,_______,_______,
-
- _______,KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
- _______,KC_PGUP,KC_HOME,KC_UP, KC_END, KC_DEL, KC_F12,
- KC_PGDN,KC_LEFT,KC_DOWN,KC_RGHT,KC_BSPC,_______,
- _______,_______,SFT_TAB,KC_TAB, KC_APP, KC_PSCR,_______,
- _______,_______,_______,_______,_______,
- _______,_______,
- _______,
- _______,_______,ooooooo
-),
-
-
-[L_FN] = LAYOUT_ergodox(
- _______,_______,_______,_______,_______,_______,_______,
- _______,QK_VERS,_______,DM_REC2,DM_REC1,DM_RSTP,_______,
- _______,QK_MAKE,_______,DM_PLY2,DM_PLY1,_______,
- _______,QK_FLSH,K_SECR1,K_SECR2,K_SECR3,K_SECR4,_______,
- _______,_______,_______,ooooooo,_______,
- _______,_______,
- _______,
- KC_LCTL,_______,_______,
-
- _______,_______,_______,_______,_______,_______,_______,
- _______,KC_VOLU,KC_F9, KC_F10, KC_F11, KC_F12, _______,
- KC_MUTE,KC_F5, KC_F6, KC_F7, KC_F8, _______,
- _______,KC_VOLD,KC_F1, KC_F2, KC_F3, KC_F4, _______,
- _______,ooooooo,_______,_______,_______,
- _______,QK_BOOT,
- _______,
- _______,_______,KC_LALT
-),
-
-
-[L_MACROS] = LAYOUT_ergodox(
- _______,_______,_______,_______,_______,_______,_______,
- _______,_______,_______,DM_REC2,DM_REC1,_______,_______,
- _______,_______,_______,DM_PLY2,DM_PLY1,DM_RSTP,
- _______,_______,_______,_______,_______,_______,_______,
- _______,_______,_______,_______,_______,
- _______,_______,
- _______,
- ooooooo,_______,_______,
-
- _______,_______,_______,_______,_______,_______,_______,
- _______,_______,SHEBANG,_______,_______,_______,_______,
- PRG_NE, PRG_EQ, PRG_GEQ,PRG_LEQ,PRG_ARR,_______,
- _______,_______,PS_ITEM,FS_PIPE,_______,FS_ARR, _______,
- _______,_______,_______,_______,_______,
- _______,_______,
- _______,
- _______,_______,ooooooo
-),
-
-
-
-[L_SYSLEDS] = LAYOUT_ergodox(
- _______,_______,_______,_______,_______,_______,_______,
- _______,_______,_______,_______,_______,_______,_______,
- _______,_______,_______,_______,_______,_______,
- _______,_______,_______,_______,_______,_______,_______,
- _______,_______,_______,_______,_______,
- _______,_______,
- _______,
- _______,_______,_______,
-
- KC_NUM, _______,_______,_______,_______,_______,_______,
- KC_CAPS,_______,_______,_______,_______,_______,_______,
- _______,_______,_______,_______,_______,_______,
- KC_SCRL,_______,_______,_______,_______,_______,_______,
- _______,_______,_______,_______,ooooooo,
- _______,_______,
- _______,
- _______,_______,_______
-)
-
-// Template
-// [_NUMBERS] = LAYOUT_ergodox(
-// _______,_______,_______,_______,_______,_______,_______,
-// _______,_______,_______,_______,_______,_______,_______,
-// _______,_______,_______,_______,_______,_______,
-// _______,_______,_______,_______,_______,_______,_______,
-// _______,_______,_______,_______,_______,
-// _______,_______,
-// _______,
-// _______,_______,_______,
-
-// _______,_______,_______,_______,_______,_______,_______,
-// _______,_______,_______,_______,_______,_______,_______,
-// _______,_______,_______,_______,_______,_______,
-// _______,_______,_______,_______,_______,_______,_______,
-// _______,_______,_______,_______,_______,
-// _______,_______,
-// _______,
-// _______,_______,_______
-// ),
-
-};
-
-void keyboard_post_init_user_kb(void) {
- ergodox_right_led_1_on();
-}
-
-
-////////////////////////////////////////////////////////////
-// System LED code
-////////////////////////////////////////////////////////////
-
-// We need to track both the layer state and the system LED state in
-// order to update the LEDs appropriately when either one changes.
-// These are both represented as a bitmask.
-//
-// There is a global 'layer_state' variable but it is set after the call
-// to layer_state_set_user(), so it doesn't work properly for our
-// purposes.
-static uint32_t current_layer_state = 0;
-static uint8_t sys_led_state = 0;
-
-// Whether the given layer (one of the constant defined at the top) is active.
-#define LAYER_ON(state, layer) (state & (1<<layer))
-
-// Brightness of LEDs (0-255)
-// Default value is 255. Use a lesser value for dimmer LEDs.
-static const uint8_t max_led_value = 255;
-
-void led_1_on(void) {
- ergodox_right_led_1_on();
- ergodox_right_led_1_set(max_led_value);
-}
-
-void led_2_on(void) {
- ergodox_right_led_2_on();
- ergodox_right_led_2_set(max_led_value);
-}
-
-void led_3_on(void) {
- ergodox_right_led_3_on();
- ergodox_right_led_3_set(max_led_value);
-}
-
-// The onboard LED doesn't support brightness, but this function keeps
-// things consistent.
-void led_board_on(void) {
- ergodox_board_led_on();
-}
-
-void led_1_off(void) {
- ergodox_right_led_1_off();
-}
-
-void led_2_off(void) {
- ergodox_right_led_2_off();
-}
-
-void led_3_off(void) {
- ergodox_right_led_3_off();
-}
-
-void led_board_off(void) {
- ergodox_board_led_off();
-}
-
-void set_leds_by_system_state(uint8_t led_state) {
- led_t host_led_state = host_keyboard_led_state();
-
- if (led_state & host_led_state.num_lock) {
- led_1_on();
- }
- else {
- led_1_off();
- }
-
- if (led_state & host_led_state.caps_lock) {
- led_2_on();
- }
- else {
- led_2_off();
- }
-
- if (led_state & host_led_state.scroll_lock) {
- led_3_on();
- }
- else {
- led_3_off();
- }
-}
-
-void set_leds_by_layer_state(uint32_t layer_state) {
- if (LAYER_ON(layer_state, L_FN)) {
- led_1_on();
- led_2_on();
- led_3_on();
- led_board_off();
- }
- else if (LAYER_ON(layer_state, L_GAMING)) {
- led_1_off();
- led_2_off();
- led_3_off();
- led_board_on();
- }
- else if (LAYER_ON(layer_state, L_NUMBERS)) {
- led_1_on();
- led_2_off();
- led_3_off();
- led_board_off();
- }
- else if (LAYER_ON(layer_state, L_NAVIGATION)) {
- led_1_off();
- led_2_on();
- led_3_off();
- led_board_off();
- }
- else {
- led_1_on();
- led_2_off();
- led_3_off();
- led_board_off();
- }
-}
-
-void led_set_kb(uint8_t usb_led) {
- sys_led_state = usb_led;
-
- if (LAYER_ON(current_layer_state, L_SYSLEDS)) {
- set_leds_by_system_state(sys_led_state);
- }
- else {
- set_leds_by_layer_state(current_layer_state);
- }
-
- led_set_user(usb_led);
-}
-
-layer_state_t layer_state_set_kb(layer_state_t state) {
- current_layer_state = state;
-
- if (LAYER_ON(state, L_SYSLEDS)) {
- set_leds_by_system_state(sys_led_state);
- }
- else {
- set_leds_by_layer_state(state);
- }
-
- return update_tri_layer_state(state, L_SYMBOLS, L_NAVIGATION, L_MACROS);
-}
diff --git a/layouts/community/ergodox/replicaJunction/readme.md b/layouts/community/ergodox/replicaJunction/readme.md
deleted file mode 100644
index 57e4480474..0000000000
--- a/layouts/community/ergodox/replicaJunction/readme.md
+++ /dev/null
@@ -1,5 +0,0 @@
-# replicaJunction - Ergodox (EZ) Layout
-
-Most of the goodies in this layout are defined in [my userspace folder](../../../../users/replicaJunction/readme.md). Better explanations of the interesting features are provided there.
-
-One feature is worth pointing out here, since it's keyboard-specific: handling of the LEDs. Normally, I use the LEDs to indicate layer state, but it's occasionally useful to be able to view the system state as well (num lock, caps lock, scroll lock). The final layer in the keymap, `L_SYSLEDS`, is used to indicate this. I have a MO key that temporarily switches the LED behavior to show system state, and on this layer, the three keys with LEDs are each used to toggle the respective lock.
diff --git a/layouts/community/ergodox/replicaJunction/rules.mk b/layouts/community/ergodox/replicaJunction/rules.mk
deleted file mode 100644
index 523639cc46..0000000000
--- a/layouts/community/ergodox/replicaJunction/rules.mk
+++ /dev/null
@@ -1,33 +0,0 @@
-# https://docs.qmk.fm/getting_started_make_guide.html
-
-# Userspace options
-USER_CAPS_WORD_ENABLE = yes
-USER_NUM_WORD_ENABLE = yes
-USER_SECRETS_ENABLE = yes
-USER_SUPER_ALT_TAB_ENABLE = yes
-
-# Features to enable
-DYNAMIC_MACRO_ENABLE = yes
-KEY_LOCK_ENABLE = yes
-
-# Extra features that are nice but takes space. Enable only if they're
-# used in the layout.
-WPM_ENABLE = no
-# EXTRAKEY_ENABLE = no # For volume keys and similar
-# MOUSEKEY_ENABLE = no # Them mouse keys yo
-KEY_OVERRIDE_ENABLE = no
-LEADER_ENABLE = no
-TAP_DANCE_ENABLE = no
-# RGBLIGHT_ENABLE = no # Keyboard RGB underglow
-RGB_MATRIX_ENABLE = no
-
-# Features I definitely don't care aboud
-LTO_ENABLE = yes
-CONSOLE_ENABLE = no
-VERBOSE = no
-DEBUG_MATRIX_SCAN_RATE = no
-DEBUG_MATRIX = no
-MAGIC_ENABLE = no
-SPACE_CADET_ENABLE = no
-GRAVE_ESC_ENABLE = no
-
diff --git a/lib/chibios-contrib b/lib/chibios-contrib
-Subproject bb8356fb5a3a9bbc1561826f174a9a631c61454
+Subproject 1130173eae6b7402443aff18ad68228acbe25cc
diff --git a/lib/python/qmk/cli/__init__.py b/lib/python/qmk/cli/__init__.py
index 9190af4e50..4e3ce63da3 100644
--- a/lib/python/qmk/cli/__init__.py
+++ b/lib/python/qmk/cli/__init__.py
@@ -71,6 +71,7 @@ subcommands = [
'qmk.cli.list.keymaps',
'qmk.cli.list.layouts',
'qmk.cli.kle2json',
+ 'qmk.cli.migrate',
'qmk.cli.multibuild',
'qmk.cli.new.keyboard',
'qmk.cli.new.keymap',
diff --git a/lib/python/qmk/cli/generate/api.py b/lib/python/qmk/cli/generate/api.py
index 8650a36b84..dd4830f543 100755
--- a/lib/python/qmk/cli/generate/api.py
+++ b/lib/python/qmk/cli/generate/api.py
@@ -11,7 +11,7 @@ from qmk.info import info_json
from qmk.json_encoders import InfoJSONEncoder
from qmk.json_schema import json_load
from qmk.keyboard import find_readme, list_keyboards
-from qmk.keycodes import load_spec, list_versions
+from qmk.keycodes import load_spec, list_versions, list_languages
DATA_PATH = Path('data')
TEMPLATE_PATH = DATA_PATH / 'templates/api/'
@@ -44,6 +44,13 @@ def _resolve_keycode_specs(output_folder):
output_file = output_folder / f'constants/keycodes_{version}.json'
output_file.write_text(json.dumps(overall, indent=4), encoding='utf-8')
+ for lang in list_languages():
+ for version in list_versions(lang):
+ overall = load_spec(version, lang)
+
+ output_file = output_folder / f'constants/keycodes_{lang}_{version}.json'
+ output_file.write_text(json.dumps(overall, indent=4), encoding='utf-8')
+
# Purge files consumed by 'load_spec'
shutil.rmtree(output_folder / 'constants/keycodes/')
diff --git a/lib/python/qmk/cli/generate/keycodes.py b/lib/python/qmk/cli/generate/keycodes.py
index 29b7db3c80..cf80689708 100644
--- a/lib/python/qmk/cli/generate/keycodes.py
+++ b/lib/python/qmk/cli/generate/keycodes.py
@@ -8,6 +8,24 @@ from qmk.path import normpath
from qmk.keycodes import load_spec
+def _render_key(key):
+ width = 7
+ if 'S(' in key:
+ width += len('S()')
+ if 'A(' in key:
+ width += len('A()')
+ if 'RCTL(' in key:
+ width += len('RCTL()')
+ if 'ALGR(' in key:
+ width += len('ALGR()')
+ return key.ljust(width)
+
+
+def _render_label(label):
+ label = label.replace("\\", "(backslash)")
+ return label
+
+
def _generate_ranges(lines, keycodes):
lines.append('')
lines.append('enum qk_keycode_ranges {')
@@ -67,6 +85,22 @@ def _generate_helpers(lines, keycodes):
lines.append(f'#define IS_{ group.upper() }_KEYCODE(code) ((code) >= {lo} && (code) <= {hi})')
+def _generate_aliases(lines, keycodes):
+ lines.append('')
+ lines.append('// Aliases')
+ for key, value in keycodes["aliases"].items():
+ define = _render_key(value.get("key"))
+ val = _render_key(key)
+ label = _render_label(value.get("label"))
+
+ lines.append(f'#define {define} {val} // {label}')
+
+ lines.append('')
+ for key, value in keycodes["aliases"].items():
+ for alias in value.get("aliases", []):
+ lines.append(f'#define {alias} {value.get("key")}')
+
+
@cli.argument('-v', '--version', arg_only=True, required=True, help='Version of keycodes to generate.')
@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")
@@ -86,3 +120,23 @@ def generate_keycodes(cli):
# Show the results
dump_lines(cli.args.output, keycodes_h_lines, cli.args.quiet)
+
+
+@cli.argument('-v', '--version', arg_only=True, required=True, help='Version of keycodes to generate.')
+@cli.argument('-l', '--lang', arg_only=True, required=True, help='Language of keycodes to generate.')
+@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.subcommand('Used by the make system to generate keymap_{lang}.h from keycodes_{lang}_{version}.json', hidden=True)
+def generate_keycode_extras(cli):
+ """Generates the header file.
+ """
+
+ # Build the header file.
+ keycodes_h_lines = [GPL2_HEADER_C_LIKE, GENERATED_HEADER_C_LIKE, '#pragma once', '#include "keymap.h"', '// clang-format off']
+
+ keycodes = load_spec(cli.args.version, cli.args.lang)
+
+ _generate_aliases(keycodes_h_lines, keycodes)
+
+ # Show the results
+ dump_lines(cli.args.output, keycodes_h_lines, cli.args.quiet)
diff --git a/lib/python/qmk/cli/migrate.py b/lib/python/qmk/cli/migrate.py
new file mode 100644
index 0000000000..4164f9c8ad
--- /dev/null
+++ b/lib/python/qmk/cli/migrate.py
@@ -0,0 +1,81 @@
+"""Migrate keyboard configuration to "Data Driven"
+"""
+import json
+from pathlib import Path
+from dotty_dict import dotty
+
+from milc import cli
+
+from qmk.keyboard import keyboard_completer, keyboard_folder, resolve_keyboard
+from qmk.info import info_json, find_info_json
+from qmk.json_encoders import InfoJSONEncoder
+from qmk.json_schema import json_load
+
+
+def _candidate_files(keyboard):
+ kb_dir = Path(resolve_keyboard(keyboard))
+
+ cur_dir = Path('keyboards')
+ files = []
+ for dir in kb_dir.parts:
+ cur_dir = cur_dir / dir
+ files.append(cur_dir / 'config.h')
+ files.append(cur_dir / 'rules.mk')
+
+ return [file for file in files if file.exists()]
+
+
+@cli.argument('-f', '--filter', arg_only=True, action='append', default=[], help="Filter the performed migrations based on the supplied value. Supported format is 'KEY' located from 'data/mappings'. May be passed multiple times.")
+@cli.argument('-kb', '--keyboard', arg_only=True, type=keyboard_folder, completer=keyboard_completer, required=True, help='The keyboard\'s name')
+@cli.subcommand('Migrate keyboard config to "Data Driven".', hidden=True)
+def migrate(cli):
+ """Migrate keyboard configuration to "Data Driven"
+ """
+ # Merge mappings as we do not care to where "KEY" is found just that its removed
+ info_config_map = json_load(Path('data/mappings/info_config.hjson'))
+ info_rules_map = json_load(Path('data/mappings/info_rules.hjson'))
+ info_map = {**info_config_map, **info_rules_map}
+
+ # Parse target info.json which will receive updates
+ target_info = Path(find_info_json(cli.args.keyboard)[0])
+ info_data = dotty(json_load(target_info))
+
+ # Already parsed used for updates
+ kb_info_json = dotty(info_json(cli.args.keyboard))
+
+ # List of candidate files
+ files = _candidate_files(cli.args.keyboard)
+
+ # Filter down keys if requested
+ keys = info_map.keys()
+ if cli.args.filter:
+ keys = list(set(keys) & set(cli.args.filter))
+
+ cli.log.info(f'{{fg_green}}Migrating keyboard {{fg_cyan}}{cli.args.keyboard}{{fg_green}}.{{fg_reset}}')
+
+ # Start migration
+ for file in files:
+ cli.log.info(f' Migrating file {file}')
+ file_contents = file.read_text(encoding='utf-8').split('\n')
+ for key in keys:
+ for num, line in enumerate(file_contents):
+ if line.startswith(f'{key} =') or line.startswith(f'#define {key} '):
+ cli.log.info(f' Migrating {key}...')
+
+ while line.rstrip().endswith('\\'):
+ file_contents.pop(num)
+ line = file_contents[num]
+ file_contents.pop(num)
+
+ update_key = info_map[key]["info_key"]
+ if update_key in kb_info_json:
+ info_data[update_key] = kb_info_json[update_key]
+
+ file.write_text('\n'.join(file_contents), encoding='utf-8')
+
+ # Finally write out updated info.json
+ cli.log.info(f' Updating {target_info}')
+ target_info.write_text(json.dumps(info_data.to_dict(), cls=InfoJSONEncoder))
+
+ cli.log.info(f'{{fg_green}}Migration of keyboard {{fg_cyan}}{cli.args.keyboard}{{fg_green}} complete!{{fg_reset}}')
+ cli.log.info(f"Verify build with {{fg_yellow}}qmk compile -kb {cli.args.keyboard} -km default{{fg_reset}}.")
diff --git a/lib/python/qmk/cli/new/keymap.py b/lib/python/qmk/cli/new/keymap.py
index 60cb743cb6..e7823bc46d 100755
--- a/lib/python/qmk/cli/new/keymap.py
+++ b/lib/python/qmk/cli/new/keymap.py
@@ -1,12 +1,32 @@
"""This script automates the copying of the default keymap into your own keymap.
"""
import shutil
-from pathlib import Path
-import qmk.path
+from milc import cli
+from milc.questions import question
+
+from qmk.path import is_keyboard, keymap
+from qmk.git import git_get_username
from qmk.decorators import automagic_keyboard, automagic_keymap
from qmk.keyboard import keyboard_completer, keyboard_folder
-from milc import cli
+
+
+def prompt_keyboard():
+ prompt = """{fg_yellow}Select Keyboard{style_reset_all}
+If you`re unsure you can view a full list of supported keyboards with {fg_yellow}qmk list-keyboards{style_reset_all}.
+
+Keyboard Name? """
+
+ return question(prompt)
+
+
+def prompt_user():
+ prompt = """
+{fg_yellow}Name Your Keymap{style_reset_all}
+Used for maintainer, copyright, etc
+
+Your GitHub Username? """
+ return question(prompt, default=git_get_username())
@cli.argument('-kb', '--keyboard', type=keyboard_folder, completer=keyboard_completer, help='Specify keyboard name. Example: 1upkeyboards/1up60hse')
@@ -17,32 +37,34 @@ from milc import cli
def new_keymap(cli):
"""Creates a new keymap for the keyboard of your choosing.
"""
- # ask for user input if keyboard or keymap was not provided in the command line
- keyboard = cli.config.new_keymap.keyboard if cli.config.new_keymap.keyboard else input("Keyboard Name: ")
- keymap = cli.config.new_keymap.keymap if cli.config.new_keymap.keymap else input("Keymap Name: ")
+ cli.log.info('{style_bright}Generating a new keymap{style_normal}')
+ cli.echo('')
- # generate keymap paths
- kb_path = Path('keyboards') / keyboard
- keymap_path = qmk.path.keymap(keyboard)
- keymap_path_default = keymap_path / 'default'
- keymap_path_new = keymap_path / keymap
+ # ask for user input if keyboard or keymap was not provided in the command line
+ kb_name = cli.config.new_keymap.keyboard if cli.config.new_keymap.keyboard else prompt_keyboard()
+ user_name = cli.config.new_keymap.keymap if cli.config.new_keymap.keymap else prompt_user()
# check directories
- if not kb_path.exists():
- cli.log.error('Keyboard %s does not exist!', kb_path)
+ if not is_keyboard(kb_name):
+ cli.log.error(f'Keyboard {{fg_cyan}}{kb_name}{{fg_reset}} does not exist! Please choose a valid name.')
return False
+ # generate keymap paths
+ km_path = keymap(kb_name)
+ keymap_path_default = km_path / 'default'
+ keymap_path_new = km_path / user_name
+
if not keymap_path_default.exists():
- cli.log.error('Keyboard default %s does not exist!', keymap_path_default)
+ cli.log.error(f'Default keymap {{fg_cyan}}{keymap_path_default}{{fg_reset}} does not exist!')
return False
if keymap_path_new.exists():
- cli.log.error('Keymap %s already exists!', keymap_path_new)
+ cli.log.error(f'Keymap {{fg_cyan}}{user_name}{{fg_reset}} already exists! Please choose a different name.')
return False
# create user directory with default keymap files
shutil.copytree(keymap_path_default, keymap_path_new, symlinks=True)
# end message to user
- cli.log.info("%s keymap directory created in: %s", keymap, keymap_path_new)
- cli.log.info("Compile a firmware with your new keymap by typing: \n\n\tqmk compile -kb %s -km %s\n", keyboard, keymap)
+ cli.log.info(f'{{fg_green}}Created a new keymap called {{fg_cyan}}{user_name}{{fg_green}} in: {{fg_cyan}}{keymap_path_new}.{{fg_reset}}')
+ cli.log.info(f"Compile a firmware with your new keymap by typing: {{fg_yellow}}qmk compile -kb {kb_name} -km {user_name}{{fg_reset}}.")
diff --git a/lib/python/qmk/keycodes.py b/lib/python/qmk/keycodes.py
index cf1ee0767a..600163bab9 100644
--- a/lib/python/qmk/keycodes.py
+++ b/lib/python/qmk/keycodes.py
@@ -2,7 +2,42 @@ from pathlib import Path
from qmk.json_schema import deep_update, json_load, validate
-CONSTANTS_PATH = Path('data/constants/keycodes/')
+CONSTANTS_PATH = Path('data/constants/')
+KEYCODES_PATH = CONSTANTS_PATH / 'keycodes'
+EXTRAS_PATH = KEYCODES_PATH / 'extras'
+
+
+def _find_versions(path, prefix):
+ ret = []
+ for file in path.glob(f'{prefix}_[0-9].[0-9].[0-9].hjson'):
+ ret.append(file.stem.split('_')[-1])
+
+ ret.sort(reverse=True)
+ return ret
+
+
+def _load_fragments(path, prefix, version):
+ file = path / f'{prefix}_{version}.hjson'
+ if not file.exists():
+ raise ValueError(f'Requested keycode spec ({prefix}:{version}) is invalid!')
+
+ # Load base
+ spec = json_load(file)
+
+ # Merge in fragments
+ fragments = path.glob(f'{prefix}_{version}_*.hjson')
+ for file in fragments:
+ deep_update(spec, json_load(file))
+
+ return spec
+
+
+def _search_path(lang=None):
+ return EXTRAS_PATH if lang else KEYCODES_PATH
+
+
+def _search_prefix(lang=None):
+ return f'keycodes_{lang}' if lang else 'keycodes'
def _validate(spec):
@@ -19,26 +54,20 @@ def _validate(spec):
raise ValueError(f'Keycode spec contains duplicate keycodes! ({",".join(duplicates)})')
-def load_spec(version):
+def load_spec(version, lang=None):
"""Build keycode data from the requested spec file
"""
if version == 'latest':
- version = list_versions()[0]
+ version = list_versions(lang)[0]
- file = CONSTANTS_PATH / f'keycodes_{version}.hjson'
- if not file.exists():
- raise ValueError(f'Requested keycode spec ({version}) is invalid!')
+ path = _search_path(lang)
+ prefix = _search_prefix(lang)
# Load base
- spec = json_load(file)
-
- # Merge in fragments
- fragments = CONSTANTS_PATH.glob(f'keycodes_{version}_*.hjson')
- for file in fragments:
- deep_update(spec, json_load(file))
+ spec = _load_fragments(path, prefix, version)
# Sort?
- spec['keycodes'] = dict(sorted(spec['keycodes'].items()))
+ spec['keycodes'] = dict(sorted(spec.get('keycodes', {}).items()))
# Validate?
_validate(spec)
@@ -46,12 +75,20 @@ def load_spec(version):
return spec
-def list_versions():
+def list_versions(lang=None):
"""Return available versions - sorted newest first
"""
- ret = []
- for file in CONSTANTS_PATH.glob('keycodes_[0-9].[0-9].[0-9].hjson'):
- ret.append(file.stem.split('_')[1])
+ path = _search_path(lang)
+ prefix = _search_prefix(lang)
+
+ return _find_versions(path, prefix)
+
+
+def list_languages():
+ """Return available languages
+ """
+ ret = set()
+ for file in EXTRAS_PATH.glob('keycodes_*_[0-9].[0-9].[0-9].hjson'):
+ ret.add(file.stem.split('_')[1])
- ret.sort(reverse=True)
return ret
diff --git a/lib/python/qmk/submodules.py b/lib/python/qmk/submodules.py
index 52efa602a0..d37ca5e644 100644
--- a/lib/python/qmk/submodules.py
+++ b/lib/python/qmk/submodules.py
@@ -40,7 +40,7 @@ def status():
else:
raise ValueError('Unknown `git submodule status` sha-1 prefix character: "%s"' % status)
- submodule_logs = cli.run(['git', 'submodule', '-q', 'foreach', 'git --no-pager log --pretty=format:"$sm_path%x01%h%x01%ad%x01%s%x0A" --date=iso -n1'])
+ submodule_logs = cli.run(['git', 'submodule', '-q', 'foreach', 'git --no-pager log --no-show-signature --pretty=format:"$sm_path%x01%h%x01%ad%x01%s%x0A" --date=iso -n1'])
for log_line in submodule_logs.stdout.split('\n'):
if not log_line:
continue
diff --git a/platforms/chibios/boards/GENERIC_PROMICRO_RP2040/configs/config.h b/platforms/chibios/boards/GENERIC_PROMICRO_RP2040/configs/config.h
index 7fe9b654e1..9209e99e76 100644
--- a/platforms/chibios/boards/GENERIC_PROMICRO_RP2040/configs/config.h
+++ b/platforms/chibios/boards/GENERIC_PROMICRO_RP2040/configs/config.h
@@ -8,7 +8,7 @@
*========================**/
#if !defined(I2C_DRIVER)
-# define I2C_DRIVER I2CD2
+# define I2C_DRIVER I2CD1
#endif
#if !defined(I2C1_SDA_PIN)
diff --git a/platforms/chibios/boards/PJRC_TEENSY_3_5/board/board.mk b/platforms/chibios/boards/PJRC_TEENSY_3_5/board/board.mk
new file mode 100644
index 0000000000..e129836b08
--- /dev/null
+++ b/platforms/chibios/boards/PJRC_TEENSY_3_5/board/board.mk
@@ -0,0 +1,11 @@
+include $(CHIBIOS_CONTRIB)/os/hal/boards/PJRC_TEENSY_3_5/board.mk
+
+# List of all the board related files.
+BOARDSRC += $(BOARD_PATH)/board/extra.c
+
+# Required include directories
+BOARDINC += $(BOARD_PATH)/board
+
+# Shared variables
+ALLCSRC += $(BOARDSRC)
+ALLINC += $(BOARDINC)
diff --git a/platforms/chibios/boards/PJRC_TEENSY_3_5/board/extra.c b/platforms/chibios/boards/PJRC_TEENSY_3_5/board/extra.c
new file mode 100644
index 0000000000..4940d6d99b
--- /dev/null
+++ b/platforms/chibios/boards/PJRC_TEENSY_3_5/board/extra.c
@@ -0,0 +1,7 @@
+#include <hal.h>
+
+void restart_usb_driver(USBDriver *usbp) {
+ // Do nothing. Restarting the USB driver on the Teensy 3.6 breaks it,
+ // resulting in a keyboard which can wake up a PC from Suspend-to-RAM, but
+ // does not actually produce any keypresses until you un-plug and re-plug.
+}
diff --git a/platforms/chibios/boards/PJRC_TEENSY_3_6/board/board.mk b/platforms/chibios/boards/PJRC_TEENSY_3_6/board/board.mk
new file mode 100644
index 0000000000..aba195db04
--- /dev/null
+++ b/platforms/chibios/boards/PJRC_TEENSY_3_6/board/board.mk
@@ -0,0 +1,11 @@
+include $(CHIBIOS_CONTRIB)/os/hal/boards/PJRC_TEENSY_3_6/board.mk
+
+# List of all the board related files.
+BOARDSRC += $(BOARD_PATH)/board/extra.c
+
+# Required include directories
+BOARDINC += $(BOARD_PATH)/board
+
+# Shared variables
+ALLCSRC += $(BOARDSRC)
+ALLINC += $(BOARDINC)
diff --git a/platforms/chibios/boards/PJRC_TEENSY_3_6/board/extra.c b/platforms/chibios/boards/PJRC_TEENSY_3_6/board/extra.c
new file mode 100644
index 0000000000..4940d6d99b
--- /dev/null
+++ b/platforms/chibios/boards/PJRC_TEENSY_3_6/board/extra.c
@@ -0,0 +1,7 @@
+#include <hal.h>
+
+void restart_usb_driver(USBDriver *usbp) {
+ // Do nothing. Restarting the USB driver on the Teensy 3.6 breaks it,
+ // resulting in a keyboard which can wake up a PC from Suspend-to-RAM, but
+ // does not actually produce any keypresses until you un-plug and re-plug.
+}
diff --git a/platforms/chibios/boards/QMK_PM2040/configs/config.h b/platforms/chibios/boards/QMK_PM2040/configs/config.h
index 8c773f8b19..ec85ae0cf4 100644
--- a/platforms/chibios/boards/QMK_PM2040/configs/config.h
+++ b/platforms/chibios/boards/QMK_PM2040/configs/config.h
@@ -4,7 +4,7 @@
#pragma once
#ifndef I2C_DRIVER
-# define I2C_DRIVER I2CD2
+# define I2C_DRIVER I2CD1
#endif
#ifndef I2C1_SDA_PIN
# define I2C1_SDA_PIN D1
diff --git a/quantum/action_tapping.c b/quantum/action_tapping.c
index df3317ac05..b5386a5e17 100644
--- a/quantum/action_tapping.c
+++ b/quantum/action_tapping.c
@@ -117,6 +117,66 @@ void action_tapping_process(keyrecord_t record) {
}
}
+/* Some conditionally defined helper macros to keep process_tapping more
+ * readable. The conditional definition of tapping_keycode and all the
+ * conditional uses of it are hidden inside macros named TAP_...
+ */
+# if (defined(AUTO_SHIFT_ENABLE) && defined(RETRO_SHIFT)) || defined(PERMISSIVE_HOLD_PER_KEY) || defined(TAPPING_FORCE_HOLD_PER_KEY) || defined(HOLD_ON_OTHER_KEY_PRESS_PER_KEY)
+# define TAP_DEFINE_KEYCODE uint16_t tapping_keycode = get_record_keycode(&tapping_key, false)
+# else
+# define TAP_DEFINE_KEYCODE
+# endif
+
+# if defined(AUTO_SHIFT_ENABLE) && defined(RETRO_SHIFT)
+# ifdef RETRO_TAPPING_PER_KEY
+# define TAP_GET_RETRO_TAPPING get_retro_tapping(tapping_keycode, &tapping_key)
+# else
+# define TAP_GET_RETRO_TAPPING true
+# endif
+# define MAYBE_RETRO_SHIFTING(ev) (TAP_GET_RETRO_TAPPING && (RETRO_SHIFT + 0) != 0 && TIMER_DIFF_16((ev).time, tapping_key.event.time) < (RETRO_SHIFT + 0))
+# define TAP_IS_LT IS_LT(tapping_keycode)
+# define TAP_IS_MT IS_MT(tapping_keycode)
+# define TAP_IS_RETRO IS_RETRO(tapping_keycode)
+# else
+# define TAP_GET_RETRO_TAPPING false
+# define MAYBE_RETRO_SHIFTING(ev) false
+# define TAP_IS_LT false
+# define TAP_IS_MT false
+# define TAP_IS_RETRO false
+# endif
+
+# ifdef PERMISSIVE_HOLD_PER_KEY
+# define TAP_GET_PERMISSIVE_HOLD get_permissive_hold(tapping_keycode, &tapping_key)
+# elif defined(PERMISSIVE_HOLD)
+# define TAP_GET_PERMISSIVE_HOLD true
+# else
+# define TAP_GET_PERMISSIVE_HOLD false
+# endif
+
+# ifdef HOLD_ON_OTHER_KEY_PRESS_PER_KEY
+# define TAP_GET_HOLD_ON_OTHER_KEY_PRESS get_hold_on_other_key_press(tapping_keycode, &tapping_key)
+# elif defined(HOLD_ON_OTHER_KEY_PRESS)
+# define TAP_GET_HOLD_ON_OTHER_KEY_PRESS true
+# else
+# define TAP_GET_HOLD_ON_OTHER_KEY_PRESS false
+# endif
+
+# ifdef IGNORE_MOD_TAP_INTERRUPT_PER_KEY
+# define TAP_GET_IGNORE_MOD_TAP_INTERRUPT get_ignore_mod_tap_interrupt(tapping_keycode, &tapping_key)
+# elif defined(IGNORE_MOD_TAP_INTERRUPT)
+# define TAP_GET_IGNORE_MOD_TAP_INTERRUPT true
+# else
+# define TAP_GET_IGNORE_MOD_TAP_INTERRUPT false
+# endif
+
+# ifdef TAPPING_FORCE_HOLD_PER_KEY
+# define TAP_GET_TAPPING_FORCE_HOLD get_tapping_force_hold(tapping_keycode, &tapping_key)
+# elif defined(TAPPING_FORCE_HOLD)
+# define TAP_GET_TAPPING_FORCE_HOLD true
+# else
+# define TAP_GET_TAPPING_FORCE_HOLD false
+# endif
+
/** \brief Tapping
*
* Rule: Tap key is typed(pressed and released) within TAPPING_TERM.
@@ -125,24 +185,11 @@ void action_tapping_process(keyrecord_t record) {
/* return true when key event is processed or consumed. */
bool process_tapping(keyrecord_t *keyp) {
keyevent_t event = keyp->event;
-# if (defined(AUTO_SHIFT_ENABLE) && defined(RETRO_SHIFT)) || defined(PERMISSIVE_HOLD_PER_KEY) || defined(TAPPING_FORCE_HOLD_PER_KEY) || defined(HOLD_ON_OTHER_KEY_PRESS_PER_KEY)
- uint16_t tapping_keycode = get_record_keycode(&tapping_key, false);
-# endif
+ TAP_DEFINE_KEYCODE;
// if tapping
if (IS_TAPPING_PRESSED()) {
- // clang-format off
- if (WITHIN_TAPPING_TERM(event)
-# if defined(AUTO_SHIFT_ENABLE) && defined(RETRO_SHIFT)
- || (
-# ifdef RETRO_TAPPING_PER_KEY
- get_retro_tapping(tapping_keycode, &tapping_key) &&
-# endif
- (RETRO_SHIFT + 0) != 0 && TIMER_DIFF_16(event.time, tapping_key.event.time) < (RETRO_SHIFT + 0)
- )
-# endif
- ) {
- // clang-format on
+ if (WITHIN_TAPPING_TERM(event) || MAYBE_RETRO_SHIFTING(event)) {
if (tapping_key.tap.count == 0) {
if (IS_TAPPING_RECORD(keyp) && !event.pressed) {
# if defined(AUTO_SHIFT_ENABLE) && defined(RETRO_SHIFT)
@@ -164,57 +211,31 @@ bool process_tapping(keyrecord_t *keyp) {
* useful for long TAPPING_TERM but may prevent fast typing.
*/
// clang-format off
-# if defined(PERMISSIVE_HOLD) || defined(PERMISSIVE_HOLD_PER_KEY) || (defined(AUTO_SHIFT_ENABLE) && defined(RETRO_SHIFT))
else if (
(
- IS_RELEASED(event) && waiting_buffer_typed(event)
-# ifdef PERMISSIVE_HOLD_PER_KEY
- && get_permissive_hold(tapping_keycode, &tapping_key)
-# elif defined(PERMISSIVE_HOLD)
- && true
-# endif
+ IS_RELEASED(event) && waiting_buffer_typed(event) &&
+ TAP_GET_PERMISSIVE_HOLD
)
// Causes nested taps to not wait past TAPPING_TERM/RETRO_SHIFT
// unnecessarily and fixes them for Layer Taps.
-# if defined(AUTO_SHIFT_ENABLE) && defined(RETRO_SHIFT)
- || (
-# ifdef RETRO_TAPPING_PER_KEY
- get_retro_tapping(tapping_keycode, &tapping_key) &&
-# endif
+ || (TAP_GET_RETRO_TAPPING &&
(
// Rolled over the two keys.
- (
- (
- false
-# if defined(HOLD_ON_OTHER_KEY_PRESS) || defined(HOLD_ON_OTHER_KEY_PRESS_PER_KEY)
- || (
- IS_LT(tapping_keycode)
-# ifdef HOLD_ON_OTHER_KEY_PRESS_PER_KEY
- && get_hold_on_other_key_press(tapping_keycode, &tapping_key)
-# endif
- )
-# endif
-# if !defined(IGNORE_MOD_TAP_INTERRUPT) || defined(IGNORE_MOD_TAP_INTERRUPT_PER_KEY)
- || (
- IS_MT(tapping_keycode)
-# ifdef IGNORE_MOD_TAP_INTERRUPT_PER_KEY
- && !get_ignore_mod_tap_interrupt(tapping_keycode, &tapping_key)
-# endif
- )
-# endif
- ) && tapping_key.tap.interrupted == true
+ (tapping_key.tap.interrupted == true && (
+ (TAP_IS_LT && TAP_GET_HOLD_ON_OTHER_KEY_PRESS) ||
+ (TAP_IS_MT && !TAP_GET_IGNORE_MOD_TAP_INTERRUPT)
+ )
)
// Makes Retro Shift ignore [IGNORE_MOD_TAP_INTERRUPT's
// effects on nested taps for MTs and the default
// behavior of LTs] below TAPPING_TERM or RETRO_SHIFT.
|| (
- IS_RETRO(tapping_keycode)
+ TAP_IS_RETRO
&& (event.key.col != tapping_key.event.key.col || event.key.row != tapping_key.event.key.row)
&& IS_RELEASED(event) && waiting_buffer_typed(event)
)
)
)
-# endif
) {
// clang-format on
debug("Tapping: End. No tap. Interfered by typing key\n");
@@ -224,13 +245,12 @@ bool process_tapping(keyrecord_t *keyp) {
// enqueue
return false;
}
-# endif
/* Process release event of a key pressed before tapping starts
* Without this unexpected repeating will occur with having fast repeating setting
* https://github.com/tmk/tmk_keyboard/issues/60
*/
else if (IS_RELEASED(event) && !waiting_buffer_typed(event)) {
- // Modifier should be retained till end of this tapping.
+ // Modifier/Layer should be retained till end of this tapping.
action_t action = layer_switch_get_action(event.key);
switch (action.kind.id) {
case ACT_LMODS:
@@ -243,6 +263,16 @@ bool process_tapping(keyrecord_t *keyp) {
if (action.key.mods && keyp->tap.count == 0) return false;
if (IS_MOD(action.key.code)) return false;
break;
+ case ACT_LAYER_TAP:
+ case ACT_LAYER_TAP_EXT:
+ switch (action.layer_tap.code) {
+ case 0 ...(OP_TAP_TOGGLE - 1):
+ case OP_ON_OFF:
+ case OP_OFF_ON:
+ case OP_SET_CLEAR:
+ return false;
+ }
+ break;
}
// Release of key should be process immediately.
debug("Tapping: release event of a key pressed before tapping\n");
@@ -252,11 +282,7 @@ bool process_tapping(keyrecord_t *keyp) {
// set interrupted flag when other key preesed during tapping
if (event.pressed) {
tapping_key.tap.interrupted = true;
-# if defined(HOLD_ON_OTHER_KEY_PRESS) || defined(HOLD_ON_OTHER_KEY_PRESS_PER_KEY)
-# if defined(HOLD_ON_OTHER_KEY_PRESS_PER_KEY)
- if (get_hold_on_other_key_press(tapping_keycode, &tapping_key))
-# endif
- {
+ if (TAP_GET_HOLD_ON_OTHER_KEY_PRESS) {
debug("Tapping: End. No tap. Interfered by pressed key\n");
process_record(&tapping_key);
tapping_key = (keyrecord_t){};
@@ -264,7 +290,6 @@ bool process_tapping(keyrecord_t *keyp) {
// enqueue
return false;
}
-# endif
}
// enqueue
return false;
@@ -357,27 +382,10 @@ bool process_tapping(keyrecord_t *keyp) {
}
}
} else if (IS_TAPPING_RELEASED()) {
- // clang-format off
- if (WITHIN_TAPPING_TERM(event)
-# if defined(AUTO_SHIFT_ENABLE) && defined(RETRO_SHIFT)
- || (
-# ifdef RETRO_TAPPING_PER_KEY
- get_retro_tapping(tapping_keycode, &tapping_key) &&
-# endif
- (RETRO_SHIFT + 0) != 0 && TIMER_DIFF_16(event.time, tapping_key.event.time) < (RETRO_SHIFT + 0)
- )
-# endif
- ) {
- // clang-format on
+ if (WITHIN_TAPPING_TERM(event) || MAYBE_RETRO_SHIFTING(event)) {
if (event.pressed) {
if (IS_TAPPING_RECORD(keyp)) {
-//# ifndef TAPPING_FORCE_HOLD
-# if !defined(TAPPING_FORCE_HOLD) || defined(TAPPING_FORCE_HOLD_PER_KEY)
- if (
-# ifdef TAPPING_FORCE_HOLD_PER_KEY
- !get_tapping_force_hold(tapping_keycode, &tapping_key) &&
-# endif
- !tapping_key.tap.interrupted && tapping_key.tap.count > 0) {
+ if (!TAP_GET_TAPPING_FORCE_HOLD && !tapping_key.tap.interrupted && tapping_key.tap.count > 0) {
// sequential tap.
keyp->tap = tapping_key.tap;
if (keyp->tap.count < 15) keyp->tap.count += 1;
@@ -389,7 +397,6 @@ bool process_tapping(keyrecord_t *keyp) {
debug_tapping_key();
return true;
}
-# endif
// FIX: start new tap again
tapping_key = *keyp;
return true;
diff --git a/quantum/keymap_extras/keymap_uk.h b/quantum/keymap_extras/keymap_uk.h
index 03fe8149f0..a6c42eafbf 100644
--- a/quantum/keymap_extras/keymap_uk.h
+++ b/quantum/keymap_extras/keymap_uk.h
@@ -1,39 +1,33 @@
-/* Copyright 2015-2016 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/>.
- */
+// Copyright 2022 QMK
+// SPDX-License-Identifier: GPL-2.0-or-later
-#pragma once
+/*******************************************************************************
+ 88888888888 888 d8b .d888 d8b 888 d8b
+ 888 888 Y8P d88P" Y8P 888 Y8P
+ 888 888 888 888
+ 888 88888b. 888 .d8888b 888888 888 888 .d88b. 888 .d8888b
+ 888 888 "88b 888 88K 888 888 888 d8P Y8b 888 88K
+ 888 888 888 888 "Y8888b. 888 888 888 88888888 888 "Y8888b.
+ 888 888 888 888 X88 888 888 888 Y8b. 888 X88
+ 888 888 888 888 88888P' 888 888 888 "Y8888 888 88888P'
+ 888 888
+ 888 888
+ 888 888
+ .d88b. .d88b. 88888b. .d88b. 888d888 8888b. 888888 .d88b. .d88888
+ d88P"88b d8P Y8b 888 "88b d8P Y8b 888P" "88b 888 d8P Y8b d88" 888
+ 888 888 88888888 888 888 88888888 888 .d888888 888 88888888 888 888
+ Y88b 888 Y8b. 888 888 Y8b. 888 888 888 Y88b. Y8b. Y88b 888
+ "Y88888 "Y8888 888 888 "Y8888 888 "Y888888 "Y888 "Y8888 "Y88888
+ 888
+ Y8b d88P
+ "Y88P"
+*******************************************************************************/
+#pragma once
#include "keymap.h"
-
// clang-format off
-/*
- * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
- * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ │
- * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
- * │ │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ │
- * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │
- * │ │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ # │ │
- * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤
- * │ │ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ │
- * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
- * │ │ │ │ │ │ │ │ │
- * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
- */
-// Row 1
+// Aliases
#define UK_GRV KC_GRV // `
#define UK_1 KC_1 // 1
#define UK_2 KC_2 // 2
@@ -47,7 +41,6 @@
#define UK_0 KC_0 // 0
#define UK_MINS KC_MINS // -
#define UK_EQL KC_EQL // =
-// Row 2
#define UK_Q KC_Q // Q
#define UK_W KC_W // W
#define UK_E KC_E // E
@@ -60,7 +53,6 @@
#define UK_P KC_P // P
#define UK_LBRC KC_LBRC // [
#define UK_RBRC KC_RBRC // ]
-// Row 3
#define UK_A KC_A // A
#define UK_S KC_S // S
#define UK_D KC_D // D
@@ -73,7 +65,6 @@
#define UK_SCLN KC_SCLN // ;
#define UK_QUOT KC_QUOT // '
#define UK_HASH KC_NUHS // #
-// Row 4
#define UK_BSLS KC_NUBS // (backslash)
#define UK_Z KC_Z // Z
#define UK_X KC_X // X
@@ -85,21 +76,6 @@
#define UK_COMM KC_COMM // ,
#define UK_DOT KC_DOT // .
#define UK_SLSH KC_SLSH // /
-
-/* Shifted symbols
- * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
- * │ ¬ │ ! │ " │ £ │ $ │ % │ ^ │ & │ * │ ( │ ) │ _ │ + │ │
- * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
- * │ │ │ │ │ │ │ │ │ │ │ │ { │ } │ │
- * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │
- * │ │ │ │ │ │ │ │ │ │ │ : │ @ │ ~ │ │
- * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤
- * │ │ | │ │ │ │ │ │ │ │ < │ > │ ? │ │
- * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
- * │ │ │ │ │ │ │ │ │
- * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
- */
-// Row 1
#define UK_NOT S(UK_GRV) // ¬
#define UK_EXLM S(UK_1) // !
#define UK_DQUO S(UK_2) // "
@@ -113,39 +89,21 @@
#define UK_RPRN S(UK_0) // )
#define UK_UNDS S(UK_MINS) // _
#define UK_PLUS S(UK_EQL) // +
-// Row 2
#define UK_LCBR S(UK_LBRC) // {
#define UK_RCBR S(UK_RBRC) // }
-// Row 3
#define UK_COLN S(UK_SCLN) // :
#define UK_AT S(UK_QUOT) // @
#define UK_TILD S(UK_HASH) // ~
-// Row 4
#define UK_PIPE S(UK_BSLS) // |
#define UK_LABK S(UK_COMM) // <
#define UK_RABK S(UK_DOT) // >
#define UK_QUES S(UK_SLSH) // ?
-
-/* AltGr symbols
- * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
- * │ ¦ │ │ │ │ € │ │ │ │ │ │ │ │ │ │
- * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
- * │ │ │ │ É │ │ │ │ Ú │ Í │ Ó │ │ │ │ │
- * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │
- * │ │ Á │ │ │ │ │ │ │ │ │ │ │ │ │
- * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤
- * │ │ │ │ │ │ │ │ │ │ │ │ │ │
- * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
- * │ │ │ │ │ │ │ │ │
- * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
- */
-// Row 1
#define UK_BRKP ALGR(UK_GRV) // ¦
#define UK_EURO ALGR(UK_4) // €
-// Row 2
#define UK_EACU ALGR(KC_E) // É
#define UK_UACU ALGR(KC_U) // Ú
#define UK_IACU ALGR(KC_I) // Í
#define UK_OACU ALGR(KC_O) // Ó
-// Row 3
#define UK_AACU ALGR(KC_A) // Á
+
+
diff --git a/quantum/keymap_extras/keymap_us.h b/quantum/keymap_extras/keymap_us.h
index b18c701679..c5c5285848 100644
--- a/quantum/keymap_extras/keymap_us.h
+++ b/quantum/keymap_extras/keymap_us.h
@@ -1,52 +1,55 @@
// Copyright 2022 QMK
// SPDX-License-Identifier: GPL-2.0-or-later
-#pragma once
+/*******************************************************************************
+ 88888888888 888 d8b .d888 d8b 888 d8b
+ 888 888 Y8P d88P" Y8P 888 Y8P
+ 888 888 888 888
+ 888 88888b. 888 .d8888b 888888 888 888 .d88b. 888 .d8888b
+ 888 888 "88b 888 88K 888 888 888 d8P Y8b 888 88K
+ 888 888 888 888 "Y8888b. 888 888 888 88888888 888 "Y8888b.
+ 888 888 888 888 X88 888 888 888 Y8b. 888 X88
+ 888 888 888 888 88888P' 888 888 888 "Y8888 888 88888P'
+ 888 888
+ 888 888
+ 888 888
+ .d88b. .d88b. 88888b. .d88b. 888d888 8888b. 888888 .d88b. .d88888
+ d88P"88b d8P Y8b 888 "88b d8P Y8b 888P" "88b 888 d8P Y8b d88" 888
+ 888 888 88888888 888 888 88888888 888 .d888888 888 88888888 888 888
+ Y88b 888 Y8b. 888 888 Y8b. 888 888 888 Y88b. Y8b. Y88b 888
+ "Y88888 "Y8888 888 888 "Y8888 888 "Y888888 "Y888 "Y8888 "Y88888
+ 888
+ Y8b d88P
+ "Y88P"
+*******************************************************************************/
+#pragma once
#include "keymap.h"
-
// clang-format off
-/* Shifted symbols
- * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
- * │ ~ │ ! │ @ │ # │ $ │ % │ ^ │ & │ * │ ( │ ) │ _ │ + │ │
- * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
- * │ │ │ │ │ │ │ │ │ │ │ │ { │ } │ | │
- * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤
- * │ │ │ │ │ │ │ │ │ │ │ : │ " │ │
- * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤
- * │ │ │ │ │ │ │ │ │ < │ > │ ? │ │
- * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
- * │ │ │ │ │ │ │ │ │
- * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
- */
-// Row 1
+// Aliases
#define KC_TILD S(KC_GRAVE) // ~
-#define KC_EXLM S(KC_1) // !
-#define KC_AT S(KC_2) // @
-#define KC_HASH S(KC_3) // #
-#define KC_DLR S(KC_4) // $
-#define KC_PERC S(KC_5) // %
-#define KC_CIRC S(KC_6) // ^
-#define KC_AMPR S(KC_7) // &
-#define KC_ASTR S(KC_8) // *
-#define KC_LPRN S(KC_9) // (
-#define KC_RPRN S(KC_0) // )
+#define KC_EXLM S(KC_1) // !
+#define KC_AT S(KC_2) // @
+#define KC_HASH S(KC_3) // #
+#define KC_DLR S(KC_4) // $
+#define KC_PERC S(KC_5) // %
+#define KC_CIRC S(KC_6) // ^
+#define KC_AMPR S(KC_7) // &
+#define KC_ASTR S(KC_8) // *
+#define KC_LPRN S(KC_9) // (
+#define KC_RPRN S(KC_0) // )
#define KC_UNDS S(KC_MINUS) // _
#define KC_PLUS S(KC_EQUAL) // +
-// Row 2
-#define KC_LCBR S(KC_LEFT_BRACKET) // {
+#define KC_LCBR S(KC_LEFT_BRACKET) // {
#define KC_RCBR S(KC_RIGHT_BRACKET) // }
-#define KC_PIPE S(KC_BACKSLASH) // |
-// Row 3
+#define KC_PIPE S(KC_BACKSLASH) // |
#define KC_COLN S(KC_SEMICOLON) // :
-#define KC_DQUO S(KC_QUOTE) // "
-// Row 4
+#define KC_DQUO S(KC_QUOTE) // "
#define KC_LABK S(KC_COMMA) // <
-#define KC_RABK S(KC_DOT) // >
+#define KC_RABK S(KC_DOT) // >
#define KC_QUES S(KC_SLASH) // ?
-// alias stuff
#define KC_TILDE KC_TILD
#define KC_EXCLAIM KC_EXLM
#define KC_DOLLAR KC_DLR
@@ -57,16 +60,14 @@
#define KC_LEFT_PAREN KC_LPRN
#define KC_RIGHT_PAREN KC_RPRN
#define KC_UNDERSCORE KC_UNDS
-
#define KC_LEFT_CURLY_BRACE KC_LCBR
#define KC_RIGHT_CURLY_BRACE KC_RCBR
-
#define KC_COLON KC_COLN
#define KC_DOUBLE_QUOTE KC_DQUO
#define KC_DQT KC_DQUO
-
#define KC_LEFT_ANGLE_BRACKET KC_LABK
#define KC_LT KC_LABK
#define KC_RIGHT_ANGLE_BRACKET KC_RABK
#define KC_GT KC_RABK
#define KC_QUESTION KC_QUES
+
diff --git a/quantum/matrix.c b/quantum/matrix.c
index db683104ed..0de65c6cdd 100644
--- a/quantum/matrix.c
+++ b/quantum/matrix.c
@@ -46,6 +46,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
# define SPLIT_MUTABLE_COL const
#endif
+#ifndef MATRIX_INPUT_PRESSED_STATE
+# define MATRIX_INPUT_PRESSED_STATE 0
+#endif
+
#ifdef DIRECT_PINS
static SPLIT_MUTABLE pin_t direct_pins[ROWS_PER_HAND][MATRIX_COLS] = DIRECT_PINS;
#elif (DIODE_DIRECTION == ROW2COL) || (DIODE_DIRECTION == COL2ROW)
@@ -93,7 +97,7 @@ static inline void setPinInputHigh_atomic(pin_t pin) {
static inline uint8_t readMatrixPin(pin_t pin) {
if (pin != NO_PIN) {
- return readPin(pin);
+ return (readPin(pin) == MATRIX_INPUT_PRESSED_STATE) ? 0 : 1;
} else {
return 1;
}
@@ -121,9 +125,7 @@ __attribute__((weak)) void matrix_read_cols_on_row(matrix_row_t current_matrix[]
matrix_row_t row_shifter = MATRIX_ROW_SHIFTER;
for (uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++, row_shifter <<= 1) {
pin_t pin = direct_pins[current_row][col_index];
- if (pin != NO_PIN) {
- current_row_value |= readPin(pin) ? 0 : row_shifter;
- }
+ current_row_value |= readMatrixPin(pin) ? 0 : row_shifter;
}
// Update the matrix
diff --git a/quantum/os_detection.c b/quantum/os_detection.c
new file mode 100644
index 0000000000..b1511afb14
--- /dev/null
+++ b/quantum/os_detection.c
@@ -0,0 +1,129 @@
+/* Copyright 2022 Ruslan Sayfutdinov (@KapJI)
+ *
+ * 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 "os_detection.h"
+
+#include <string.h>
+
+#ifdef OS_DETECTION_DEBUG_ENABLE
+# include "eeconfig.h"
+# include "eeprom.h"
+# include "print.h"
+
+# define STORED_USB_SETUPS 50
+# define EEPROM_USER_OFFSET (uint8_t*)EECONFIG_SIZE
+
+uint16_t usb_setups[STORED_USB_SETUPS];
+#endif
+
+#ifdef OS_DETECTION_ENABLE
+struct setups_data_t {
+ uint8_t count;
+ uint8_t cnt_02;
+ uint8_t cnt_04;
+ uint8_t cnt_ff;
+ uint16_t last_wlength;
+ os_variant_t detected_os;
+};
+
+struct setups_data_t setups_data = {
+ .count = 0,
+ .cnt_02 = 0,
+ .cnt_04 = 0,
+ .cnt_ff = 0,
+ .detected_os = OS_UNSURE,
+};
+
+// Some collected sequences of wLength can be found in tests.
+void make_guess(void) {
+ if (setups_data.count < 3) {
+ return;
+ }
+ if (setups_data.cnt_ff >= 2 && setups_data.cnt_04 >= 1) {
+ setups_data.detected_os = OS_WINDOWS;
+ return;
+ }
+ if (setups_data.count == setups_data.cnt_ff) {
+ // Linux has 3 packets with 0xFF.
+ setups_data.detected_os = OS_LINUX;
+ return;
+ }
+ if (setups_data.count == 5 && setups_data.last_wlength == 0xFF && setups_data.cnt_ff == 1 && setups_data.cnt_02 == 2) {
+ setups_data.detected_os = OS_MACOS;
+ return;
+ }
+ if (setups_data.count == 4 && setups_data.cnt_ff == 0 && setups_data.cnt_02 == 2) {
+ // iOS and iPadOS don't have the last 0xFF packet.
+ setups_data.detected_os = OS_IOS;
+ return;
+ }
+ if (setups_data.cnt_ff == 0 && setups_data.cnt_02 == 3 && setups_data.cnt_04 == 1) {
+ // This is actually PS5.
+ setups_data.detected_os = OS_LINUX;
+ return;
+ }
+ if (setups_data.cnt_ff >= 1 && setups_data.cnt_02 == 0 && setups_data.cnt_04 == 0) {
+ // This is actually Quest 2 or Nintendo Switch.
+ setups_data.detected_os = OS_LINUX;
+ return;
+ }
+}
+
+void process_wlength(const uint16_t w_length) {
+# ifdef OS_DETECTION_DEBUG_ENABLE
+ usb_setups[setups_data.count] = w_length;
+# endif
+ setups_data.count++;
+ setups_data.last_wlength = w_length;
+ if (w_length == 0x2) {
+ setups_data.cnt_02++;
+ } else if (w_length == 0x4) {
+ setups_data.cnt_04++;
+ } else if (w_length == 0xFF) {
+ setups_data.cnt_ff++;
+ }
+ make_guess();
+}
+
+os_variant_t detected_host_os(void) {
+ return setups_data.detected_os;
+}
+
+void erase_wlength_data(void) {
+ memset(&setups_data, 0, sizeof(setups_data));
+}
+#endif // OS_DETECTION_ENABLE
+
+#ifdef OS_DETECTION_DEBUG_ENABLE
+void print_stored_setups(void) {
+# ifdef CONSOLE_ENABLE
+ uint8_t cnt = eeprom_read_byte(EEPROM_USER_OFFSET);
+ for (uint16_t i = 0; i < cnt; ++i) {
+ uint16_t* addr = (uint16_t*)EEPROM_USER_OFFSET + i * sizeof(uint16_t) + sizeof(uint8_t);
+ xprintf("i: %d, wLength: 0x%02X\n", i, eeprom_read_word(addr));
+ }
+# endif
+}
+
+void store_setups_in_eeprom(void) {
+ eeprom_update_byte(EEPROM_USER_OFFSET, setups_data.count);
+ for (uint16_t i = 0; i < setups_data.count; ++i) {
+ uint16_t* addr = (uint16_t*)EEPROM_USER_OFFSET + i * sizeof(uint16_t) + sizeof(uint8_t);
+ eeprom_update_word(addr, usb_setups[i]);
+ }
+}
+
+#endif // OS_DETECTION_DEBUG_ENABLE
diff --git a/users/replicaJunction/rj_layers.h b/quantum/os_detection.h
index f6296af053..e643dcd27f 100644
--- a/users/replicaJunction/rj_layers.h
+++ b/quantum/os_detection.h
@@ -1,4 +1,4 @@
-/* Copyright 2021 Joshua T.
+/* Copyright 2022 Ruslan Sayfutdinov (@KapJI)
*
* 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
@@ -16,25 +16,23 @@
#pragma once
-enum rj_layers {
- L_BASE,
+#include <stdint.h>
-#ifdef USER_INCLUDE_QWERTY
- L_QWERTY,
-#endif
+#ifdef OS_DETECTION_ENABLE
+typedef enum {
+ OS_UNSURE,
+ OS_LINUX,
+ OS_WINDOWS,
+ OS_MACOS,
+ OS_IOS,
+} os_variant_t;
-#ifdef USER_INCLUDE_GAMING_LAYER
- L_GAMING,
+void process_wlength(const uint16_t w_length);
+os_variant_t detected_host_os(void);
+void erase_wlength_data(void);
#endif
- L_NUMBERS,
- L_SYMBOLS,
- L_NAVIGATION,
- L_FN,
-
-#ifdef USER_INCLUDE_MACRO_LAYER
- L_MACROS,
+#ifdef OS_DETECTION_DEBUG_ENABLE
+void print_stored_setups(void);
+void store_setups_in_eeprom(void);
#endif
-
- _LAYER_SAFE_RANGE
-};
diff --git a/quantum/os_detection/tests/os_detection.cpp b/quantum/os_detection/tests/os_detection.cpp
new file mode 100644
index 0000000000..102349852e
--- /dev/null
+++ b/quantum/os_detection/tests/os_detection.cpp
@@ -0,0 +1,164 @@
+/* Copyright 2022 Ruslan Sayfutdinov (@KapJI)
+ *
+ * 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"
+
+extern "C" {
+#include "os_detection.h"
+}
+
+class OsDetectionTest : public ::testing::Test {
+ protected:
+ void SetUp() override {
+ erase_wlength_data();
+ }
+};
+
+os_variant_t check_sequence(const std::vector<uint16_t> &w_lengths) {
+ for (auto &w_length : w_lengths) {
+ process_wlength(w_length);
+ }
+ return detected_host_os();
+}
+
+/* Some collected data.
+
+ChibiOS:
+Windows 10: [FF, FF, 4, 24, 4, 24, 4, FF, 24, FF, 4, FF, 24, 4, 24, 20A, 20A, 20A, 20A, 20A, 20A, 20A, 20A, 20A, 20A, 20A, 20A, 20A, 20A, 20A, 20A, 20A, 20A, 20A, 20A, 20A, 20A, 20A, 20A]
+Windows 10 (another host): [FF, FF, 4, 24, 4, 24, 4, 24, 4, 24, 4, 24]
+macOS 12.5: [2, 24, 2, 28, FF]
+iOS/iPadOS 15.6: [2, 24, 2, 28]
+Linux (including Android, Raspberry Pi and WebOS TV): [FF, FF, FF]
+PS5: [2, 4, 2, 28, 2, 24]
+Nintendo Switch: [82, FF, 40, 40, FF, 40, 40, FF, 40, 40, FF, 40, 40, FF, 40, 40]
+Quest 2: [FF, FF, FF, FE, FF, FE, FF, FE, FF, FE, FF]
+
+LUFA:
+Windows 10 (first connect): [12, FF, FF, 4, 10, FF, FF, FF, 4, 10, 20A, 20A, 20A, 20A, 20A, 20A]
+Windows 10 (subsequent connect): [FF, FF, 4, 10, FF, 4, FF, 10, FF, 20A, 20A, 20A, 20A, 20A, 20A]
+Windows 10 (another host): [FF, FF, 4, 10, 4, 10]
+macOS: [2, 10, 2, E, FF]
+iOS/iPadOS: [2, 10, 2, E]
+Linux: [FF, FF, FF]
+PS5: [2, 4, 2, E, 2, 10]
+Nintendo Switch: [82, FF, 40, 40, FF, 40, 40]
+
+V-USB:
+Windows 10: [FF, FF, 4, E, FF]
+Windows 10 (another host): [FF, FF, 4, E, 4]
+macOS: [2, E, 2, E, FF]
+iOS/iPadOS: [2, E, 2, E]
+Linux: [FF, FF, FF]
+PS5: [2, 4, 2, E, 2]
+Nintendo Switch: [82, FF, 40, 40]
+Quest 2: [FF, FF, FF, FE]
+
+Common parts:
+Windows: [..., FF, FF, 4, ...]
+macOS: [2, _, 2, _, FF]
+iOS/iPadOS: [2, _, 2, _]
+Linux: [FF, FF, FF]
+PS5: [2, 4, 2, _, 2, ...]
+Nintendo Switch: [82, FF, 40, 40, ...]
+Quest 2: [FF, FF, FF, FE, ...]
+*/
+TEST_F(OsDetectionTest, TestLinux) {
+ EXPECT_EQ(check_sequence({0xFF, 0xFF, 0xFF}), OS_LINUX);
+}
+
+TEST_F(OsDetectionTest, TestChibiosMacos) {
+ EXPECT_EQ(check_sequence({0x2, 0x24, 0x2, 0x28, 0xFF}), OS_MACOS);
+}
+
+TEST_F(OsDetectionTest, TestLufaMacos) {
+ EXPECT_EQ(check_sequence({0x2, 0x10, 0x2, 0xE, 0xFF}), OS_MACOS);
+}
+
+TEST_F(OsDetectionTest, TestVusbMacos) {
+ EXPECT_EQ(check_sequence({0x2, 0xE, 0x2, 0xE, 0xFF}), OS_MACOS);
+}
+
+TEST_F(OsDetectionTest, TestChibiosIos) {
+ EXPECT_EQ(check_sequence({0x2, 0x24, 0x2, 0x28}), OS_IOS);
+}
+
+TEST_F(OsDetectionTest, TestLufaIos) {
+ EXPECT_EQ(check_sequence({0x2, 0x10, 0x2, 0xE}), OS_IOS);
+}
+
+TEST_F(OsDetectionTest, TestVusbIos) {
+ EXPECT_EQ(check_sequence({0x2, 0xE, 0x2, 0xE}), OS_IOS);
+}
+
+TEST_F(OsDetectionTest, TestChibiosWindows10) {
+ EXPECT_EQ(check_sequence({0xFF, 0xFF, 0x4, 0x24, 0x4, 0x24, 0x4, 0xFF, 0x24, 0xFF, 0x4, 0xFF, 0x24, 0x4, 0x24, 0x20A, 0x20A, 0x20A, 0x20A, 0x20A, 0x20A, 0x20A, 0x20A, 0x20A, 0x20A, 0x20A, 0x20A, 0x20A, 0x20A, 0x20A, 0x20A, 0x20A, 0x20A, 0x20A, 0x20A, 0x20A, 0x20A, 0x20A, 0x20A}), OS_WINDOWS);
+}
+
+TEST_F(OsDetectionTest, TestChibiosWindows10_2) {
+ EXPECT_EQ(check_sequence({0xFF, 0xFF, 0x4, 0x24, 0x4, 0x24, 0x4, 0x24, 0x4, 0x24, 0x4, 0x24}), OS_WINDOWS);
+}
+
+TEST_F(OsDetectionTest, TestLufaWindows10) {
+ EXPECT_EQ(check_sequence({0x12, 0xFF, 0xFF, 0x4, 0x10, 0xFF, 0xFF, 0xFF, 0x4, 0x10, 0x20A, 0x20A, 0x20A, 0x20A, 0x20A, 0x20A}), OS_WINDOWS);
+}
+
+TEST_F(OsDetectionTest, TestLufaWindows10_2) {
+ EXPECT_EQ(check_sequence({0xFF, 0xFF, 0x4, 0x10, 0xFF, 0x4, 0xFF, 0x10, 0xFF, 0x20A, 0x20A, 0x20A, 0x20A, 0x20A, 0x20A}), OS_WINDOWS);
+}
+
+TEST_F(OsDetectionTest, TestLufaWindows10_3) {
+ EXPECT_EQ(check_sequence({0xFF, 0xFF, 0x4, 0x10, 0x4, 0x10}), OS_WINDOWS);
+}
+
+TEST_F(OsDetectionTest, TestVusbWindows10) {
+ EXPECT_EQ(check_sequence({0xFF, 0xFF, 0x4, 0xE, 0xFF}), OS_WINDOWS);
+}
+
+TEST_F(OsDetectionTest, TestVusbWindows10_2) {
+ EXPECT_EQ(check_sequence({0xFF, 0xFF, 0x4, 0xE, 0x4}), OS_WINDOWS);
+}
+
+TEST_F(OsDetectionTest, TestChibiosPs5) {
+ EXPECT_EQ(check_sequence({0x2, 0x4, 0x2, 0x28, 0x2, 0x24}), OS_LINUX);
+}
+
+TEST_F(OsDetectionTest, TestLufaPs5) {
+ EXPECT_EQ(check_sequence({0x2, 0x4, 0x2, 0xE, 0x2, 0x10}), OS_LINUX);
+}
+
+TEST_F(OsDetectionTest, TestVusbPs5) {
+ EXPECT_EQ(check_sequence({0x2, 0x4, 0x2, 0xE, 0x2}), OS_LINUX);
+}
+
+TEST_F(OsDetectionTest, TestChibiosNintendoSwitch) {
+ EXPECT_EQ(check_sequence({0x82, 0xFF, 0x40, 0x40, 0xFF, 0x40, 0x40, 0xFF, 0x40, 0x40, 0xFF, 0x40, 0x40, 0xFF, 0x40, 0x40}), OS_LINUX);
+}
+
+TEST_F(OsDetectionTest, TestLufaNintendoSwitch) {
+ EXPECT_EQ(check_sequence({0x82, 0xFF, 0x40, 0x40, 0xFF, 0x40, 0x40}), OS_LINUX);
+}
+
+TEST_F(OsDetectionTest, TestVusbNintendoSwitch) {
+ EXPECT_EQ(check_sequence({0x82, 0xFF, 0x40, 0x40}), OS_LINUX);
+}
+
+TEST_F(OsDetectionTest, TestChibiosQuest2) {
+ EXPECT_EQ(check_sequence({0xFF, 0xFF, 0xFF, 0xFE, 0xFF, 0xFE, 0xFF, 0xFE, 0xFF, 0xFE, 0xFF}), OS_LINUX);
+}
+
+TEST_F(OsDetectionTest, TestVusbQuest2) {
+ EXPECT_EQ(check_sequence({0xFF, 0xFF, 0xFF, 0xFE}), OS_LINUX);
+}
diff --git a/quantum/os_detection/tests/rules.mk b/quantum/os_detection/tests/rules.mk
new file mode 100644
index 0000000000..9bfe373f46
--- /dev/null
+++ b/quantum/os_detection/tests/rules.mk
@@ -0,0 +1,5 @@
+os_detection_DEFS := -DOS_DETECTION_ENABLE
+
+os_detection_SRC := \
+ $(QUANTUM_PATH)/os_detection/tests/os_detection.cpp \
+ $(QUANTUM_PATH)/os_detection.c
diff --git a/quantum/os_detection/tests/testlist.mk b/quantum/os_detection/tests/testlist.mk
new file mode 100644
index 0000000000..405a7b82d5
--- /dev/null
+++ b/quantum/os_detection/tests/testlist.mk
@@ -0,0 +1 @@
+TEST_LIST += os_detection
diff --git a/quantum/rgblight/rgblight.h b/quantum/rgblight/rgblight.h
index 46e8e07212..7693888462 100644
--- a/quantum/rgblight/rgblight.h
+++ b/quantum/rgblight/rgblight.h
@@ -68,23 +68,6 @@
|-----------------|-----------------------------------|
*****/
-#ifdef RGBLIGHT_ANIMATIONS
-// for backward compatibility
-# 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
-
-#ifdef RGBLIGHT_STATIC_PATTERNS
-# define RGBLIGHT_EFFECT_STATIC_GRADIENT
-#endif
-
// clang-format off
// check dynamic animation effects chose ?
diff --git a/readme.md b/readme.md
index 5649ddfa09..c2fcda103e 100644
--- a/readme.md
+++ b/readme.md
@@ -1,3 +1,7 @@
+# THIS IS THE DEVELOP BRANCH
+
+Warning- This is the `develop` branch of QMK Firmware. You may encounter broken code here. Please see [Breaking Changes](https://docs.qmk.fm/#/breaking_changes) for more information.
+
# Quantum Mechanical Keyboard Firmware
[![Current Version](https://img.shields.io/github/tag/qmk/qmk_firmware.svg)](https://github.com/qmk/qmk_firmware/tags)
diff --git a/tests/basic/test_tapping.cpp b/tests/basic/test_tapping.cpp
index 6ff9cfe22b..faf9b9fe91 100644
--- a/tests/basic/test_tapping.cpp
+++ b/tests/basic/test_tapping.cpp
@@ -121,3 +121,72 @@ TEST_F(Tapping, ANewTapWithinTappingTermIsBuggy) {
key_shift_hold_p_tap.release();
run_one_scan_loop();
}
+
+TEST_F(Tapping, TapA_CTL_T_KeyWhileReleasingShift) {
+ TestDriver driver;
+ InSequence s;
+ auto shift_key = KeymapKey(0, 7, 0, KC_LSFT);
+ auto mod_tap_hold_key = KeymapKey(0, 8, 0, CTL_T(KC_P));
+
+ set_keymap({shift_key, mod_tap_hold_key});
+
+ shift_key.press();
+ // Shift is reported
+ EXPECT_REPORT(driver, (KC_LSFT));
+ run_one_scan_loop();
+ testing::Mock::VerifyAndClearExpectations(&driver);
+
+ mod_tap_hold_key.press();
+ // Tapping keys does nothing on press
+ EXPECT_NO_REPORT(driver);
+ run_one_scan_loop();
+
+ shift_key.release();
+ // Releasing shift is delayed while tapping is in progress
+ EXPECT_NO_REPORT(driver);
+ run_one_scan_loop();
+ testing::Mock::VerifyAndClearExpectations(&driver);
+
+ mod_tap_hold_key.release();
+ // Releasing mod-tap key reports the tap and releases shift
+ EXPECT_REPORT(driver, (KC_LSFT, KC_P));
+ EXPECT_REPORT(driver, (KC_P));
+ EXPECT_EMPTY_REPORT(driver);
+ run_one_scan_loop();
+ testing::Mock::VerifyAndClearExpectations(&driver);
+}
+
+TEST_F(Tapping, TapA_CTL_T_KeyWhileReleasingLayer) {
+ TestDriver driver;
+ InSequence s;
+ auto layer_key = KeymapKey(0, 7, 0, MO(1));
+ auto trans_key = KeymapKey(1, 7, 0, KC_TRNS);
+ auto mod_tap_hold_key0 = KeymapKey(0, 8, 0, CTL_T(KC_P));
+ auto mod_tap_hold_key1 = KeymapKey(1, 8, 0, CTL_T(KC_Q));
+
+ set_keymap({layer_key, trans_key, mod_tap_hold_key0, mod_tap_hold_key1});
+
+ layer_key.press();
+ // Pressing the layer key does nothing
+ EXPECT_NO_REPORT(driver);
+ run_one_scan_loop();
+
+ mod_tap_hold_key1.press();
+ // Tapping layer 1 mod-tap key does nothing on press
+ EXPECT_NO_REPORT(driver);
+ run_one_scan_loop();
+
+ layer_key.release();
+ // Releasing layer is delayed while tapping is in progress
+ EXPECT_NO_REPORT(driver);
+ run_one_scan_loop();
+ testing::Mock::VerifyAndClearExpectations(&driver);
+
+ mod_tap_hold_key1.release();
+ // Releasing mod-tap key reports the tap of the layer 1 key
+ // If delayed layer release is broken, this reports the layer 0 key
+ EXPECT_REPORT(driver, (KC_Q));
+ EXPECT_EMPTY_REPORT(driver);
+ run_one_scan_loop();
+ testing::Mock::VerifyAndClearExpectations(&driver);
+}
diff --git a/tmk_core/protocol/chibios/usb_main.c b/tmk_core/protocol/chibios/usb_main.c
index 62a11faff7..47edd7cb8c 100644
--- a/tmk_core/protocol/chibios/usb_main.c
+++ b/tmk_core/protocol/chibios/usb_main.c
@@ -76,12 +76,24 @@ static void keyboard_idle_timer_cb(void *arg);
#endif
report_keyboard_t keyboard_report_sent = {{0}};
-#ifdef MOUSE_ENABLE
-report_mouse_t mouse_report_blank = {0};
-#endif /* MOUSE_ENABLE */
+report_mouse_t mouse_report_sent = {0};
+
+union {
+ uint8_t report_id;
+ report_keyboard_t keyboard;
#ifdef EXTRAKEY_ENABLE
-uint8_t extra_report_blank[3] = {0};
-#endif /* EXTRAKEY_ENABLE */
+ report_extra_t extra;
+#endif
+#ifdef MOUSE_ENABLE
+ report_mouse_t mouse;
+#endif
+#ifdef DIGITIZER_ENABLE
+ report_digitizer_t digitizer;
+#endif
+#ifdef JOYSTICK_ENABLE
+ joystick_report_t joystick;
+#endif
+} universal_report_blank = {0};
/* ---------------------------------------------------------
* Descriptors and USB driver objects
@@ -111,9 +123,10 @@ uint8_t extra_report_blank[3] = {0};
static const USBDescriptor *usb_get_descriptor_cb(USBDriver *usbp, uint8_t dtype, uint8_t dindex, uint16_t wIndex) {
(void)usbp;
static USBDescriptor desc;
- uint16_t wValue = ((uint16_t)dtype << 8) | dindex;
- desc.ud_string = NULL;
- desc.ud_size = get_usb_descriptor(wValue, wIndex, (const void **const) & desc.ud_string);
+ uint16_t wValue = ((uint16_t)dtype << 8) | dindex;
+ uint16_t wLength = ((uint16_t)usbp->setup[7] << 8) | usbp->setup[6];
+ desc.ud_string = NULL;
+ desc.ud_size = get_usb_descriptor(wValue, wIndex, wLength, (const void **const) & desc.ud_string);
if (desc.ud_string == NULL)
return NULL;
else
@@ -585,7 +598,8 @@ static uint16_t get_hword(uint8_t *p) {
*/
static uint8_t set_report_buf[2] __attribute__((aligned(4)));
-static void set_led_transfer_cb(USBDriver *usbp) {
+
+static void set_led_transfer_cb(USBDriver *usbp) {
if (usbp->setup[6] == 2) { /* LSB(wLength) */
uint8_t report_id = set_report_buf[0];
if ((report_id == REPORT_ID_KEYBOARD) || (report_id == REPORT_ID_NKRO)) {
@@ -614,20 +628,38 @@ static bool usb_request_hook_cb(USBDriver *usbp) {
switch (usbp->setup[1]) { /* bRequest */
case HID_GET_REPORT:
switch (usbp->setup[4]) { /* LSB(wIndex) (check MSB==0?) */
+#ifndef KEYBOARD_SHARED_EP
case KEYBOARD_INTERFACE:
- usbSetupTransfer(usbp, (uint8_t *)&keyboard_report_sent, sizeof(keyboard_report_sent), NULL);
+ usbSetupTransfer(usbp, (uint8_t *)&keyboard_report_sent, KEYBOARD_REPORT_SIZE, NULL);
return TRUE;
break;
-
+#endif
#if defined(MOUSE_ENABLE) && !defined(MOUSE_SHARED_EP)
case MOUSE_INTERFACE:
- usbSetupTransfer(usbp, (uint8_t *)&mouse_report_blank, sizeof(mouse_report_blank), NULL);
+ usbSetupTransfer(usbp, (uint8_t *)&mouse_report_sent, sizeof(mouse_report_sent), NULL);
return TRUE;
break;
#endif
-
+#ifdef SHARED_EP_ENABLE
+ case SHARED_INTERFACE:
+# ifdef KEYBOARD_SHARED_EP
+ if (usbp->setup[2] == REPORT_ID_KEYBOARD) {
+ usbSetupTransfer(usbp, (uint8_t *)&keyboard_report_sent, KEYBOARD_REPORT_SIZE, NULL);
+ return TRUE;
+ break;
+ }
+# endif
+# ifdef MOUSE_SHARED_EP
+ if (usbp->setup[2] == REPORT_ID_MOUSE) {
+ usbSetupTransfer(usbp, (uint8_t *)&mouse_report_sent, sizeof(mouse_report_sent), NULL);
+ return TRUE;
+ break;
+ }
+# endif
+#endif /* SHARED_EP_ENABLE */
default:
- usbSetupTransfer(usbp, NULL, 0, NULL);
+ universal_report_blank.report_id = usbp->setup[2];
+ usbSetupTransfer(usbp, (uint8_t *)&universal_report_blank, usbp->setup[6], NULL);
return TRUE;
break;
}
@@ -665,8 +697,7 @@ static bool usb_request_hook_cb(USBDriver *usbp) {
if ((usbp->setup[4] == KEYBOARD_INTERFACE) && (usbp->setup[5] == 0)) { /* wIndex */
keyboard_protocol = ((usbp->setup[2]) != 0x00); /* LSB(wValue) */
#ifdef NKRO_ENABLE
- keymap_config.nkro = !!keyboard_protocol;
- if (!keymap_config.nkro && keyboard_idle) {
+ if (!keyboard_protocol && keyboard_idle) {
#else /* NKRO_ENABLE */
if (keyboard_idle) {
#endif /* NKRO_ENABLE */
@@ -921,6 +952,7 @@ void send_mouse(report_mouse_t *report) {
}
}
usbStartTransmitI(&USB_DRIVER, MOUSE_IN_EPNUM, (uint8_t *)report, sizeof(report_mouse_t));
+ mouse_report_sent = *report;
osalSysUnlock();
}
diff --git a/tmk_core/protocol/lufa/lufa.c b/tmk_core/protocol/lufa/lufa.c
index 8f36e02b9a..99f7d31287 100644
--- a/tmk_core/protocol/lufa/lufa.c
+++ b/tmk_core/protocol/lufa/lufa.c
@@ -901,5 +901,5 @@ void protocol_post_task(void) {
}
uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint16_t wIndex, const void **const DescriptorAddress) {
- return get_usb_descriptor(wValue, wIndex, DescriptorAddress);
+ return get_usb_descriptor(wValue, wIndex, USB_ControlRequest.wLength, DescriptorAddress);
}
diff --git a/tmk_core/protocol/usb_descriptor.c b/tmk_core/protocol/usb_descriptor.c
index 99c52952a0..5ab9e3ff4f 100644
--- a/tmk_core/protocol/usb_descriptor.c
+++ b/tmk_core/protocol/usb_descriptor.c
@@ -45,8 +45,9 @@
# include "joystick.h"
#endif
-// TODO: wb32 support defines ISO macro which breaks PRODUCT stringification
-#undef ISO
+#ifdef OS_DETECTION_ENABLE
+# include "os_detection.h"
+#endif
// clang-format off
@@ -1095,7 +1096,7 @@ const USB_Descriptor_String_t PROGMEM SerialNumberString = {
* is called so that the descriptor details can be passed back and the appropriate descriptor sent back to the
* USB host.
*/
-uint16_t get_usb_descriptor(const uint16_t wValue, const uint16_t wIndex, const void** const DescriptorAddress) {
+uint16_t get_usb_descriptor(const uint16_t wValue, const uint16_t wIndex, const uint16_t wLength, const void** const DescriptorAddress) {
const uint8_t DescriptorType = (wValue >> 8);
const uint8_t DescriptorIndex = (wValue & 0xFF);
const void* Address = NULL;
@@ -1137,6 +1138,9 @@ uint16_t get_usb_descriptor(const uint16_t wValue, const uint16_t wIndex, const
break;
#endif
}
+#ifdef OS_DETECTION_ENABLE
+ process_wlength(wLength);
+#endif
break;
case HID_DTYPE_HID:
diff --git a/tmk_core/protocol/usb_descriptor.h b/tmk_core/protocol/usb_descriptor.h
index bc5e84e586..ed84f4c9ab 100644
--- a/tmk_core/protocol/usb_descriptor.h
+++ b/tmk_core/protocol/usb_descriptor.h
@@ -308,4 +308,4 @@ enum usb_endpoints {
#define JOYSTICK_EPSIZE 8
#define DIGITIZER_EPSIZE 8
-uint16_t get_usb_descriptor(const uint16_t wValue, const uint16_t wIndex, const void** const DescriptorAddress);
+uint16_t get_usb_descriptor(const uint16_t wValue, const uint16_t wIndex, const uint16_t wLength, const void** const DescriptorAddress);
diff --git a/tmk_core/protocol/vusb/vusb.c b/tmk_core/protocol/vusb/vusb.c
index 2d17761978..b3eeff9e01 100644
--- a/tmk_core/protocol/vusb/vusb.c
+++ b/tmk_core/protocol/vusb/vusb.c
@@ -44,6 +44,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
# include "ring_buffer.h"
#endif
+#ifdef OS_DETECTION_ENABLE
+# include "os_detection.h"
+#endif
+
#define NEXT_INTERFACE __COUNTER__
/*
@@ -1013,6 +1017,9 @@ USB_PUBLIC usbMsgLen_t usbFunctionDescriptor(struct usbRequest *rq) {
break;
#endif
}
+#ifdef OS_DETECTION_ENABLE
+ process_wlength(rq->wLength.word);
+#endif
break;
case USBDESCR_HID:
switch (rq->wValue.bytes[0]) {
diff --git a/users/replicaJunction/features/.gitignore b/users/replicaJunction/features/.gitignore
deleted file mode 100644
index 9b590ee802..0000000000
--- a/users/replicaJunction/features/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-# Do not include the secrets definitions
-secret_definitions.h
diff --git a/users/replicaJunction/features/caps_word.c b/users/replicaJunction/features/caps_word.c
deleted file mode 100644
index 536da81ec7..0000000000
--- a/users/replicaJunction/features/caps_word.c
+++ /dev/null
@@ -1,105 +0,0 @@
-/* Copyright 2021 Joshua T.
- *
- * 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 "caps_word.h"
-
-static bool is_caps_word_on = false;
-
-bool is_caps_word_enabled(void) {
- return is_caps_word_on;
-}
-
-void enable_caps_word(void) {
- if (is_caps_word_on) return;
- is_caps_word_on = true;
- tap_code(KC_CAPS);
-}
-
-void disable_caps_word(void) {
- if (!is_caps_word_on) return;
- is_caps_word_on = false;
- tap_code(KC_CAPS);
-}
-
-void toggle_caps_word(void) {
- if (is_caps_word_on) {
- disable_caps_word();
- }
- else {
- enable_caps_word();
- }
-}
-
-bool should_terminate_caps_word(uint16_t keycode, const keyrecord_t *record) {
- switch (keycode) {
- // Keycodes which should not disable caps word mode
- case KC_A ... KC_Z:
- case KC_1 ... KC_0:
- case KC_MINS:
- case KC_UNDS:
- case KC_BSPC:
- return false;
-
- default:
- if (record->event.pressed) {
- return true;
- }
- return false;
- }
-
- // Should be unreachable
- return false;
-}
-
-
-bool process_record_caps_word(uint16_t keycode, const keyrecord_t *record) {
- // Nothing in this function acts on key release
- if (!record->event.pressed) {
- return true;
- }
-
- // Handle the custom keycodes that go with this feature
- if (keycode == CAPWORD) {
- enable_caps_word();
- return false;
- }
-
- // If the behavior isn't enabled and the keypress isn't a keycode to
- // toggle the behavior, allow QMK to handle the keypress as usual
- if (!is_caps_word_on) {
- return true;
- }
-
- // Get the base keycode of a mod or layer tap key
- switch (keycode) {
- case QK_MOD_TAP ... QK_MOD_TAP_MAX:
- case QK_LAYER_TAP ... QK_LAYER_TAP_MAX:
- case QK_TAP_DANCE ... QK_TAP_DANCE_MAX:
- // Earlier return if this has not been considered tapped yet
- if (record->tap.count == 0)
- return true;
- keycode = keycode & 0xFF;
- break;
- default:
- break;
- }
-
- if (should_terminate_caps_word(keycode, record)) {
- disable_caps_word();
- }
-
- return true;
-}
diff --git a/users/replicaJunction/features/caps_word.h b/users/replicaJunction/features/caps_word.h
deleted file mode 100644
index 4182ce5829..0000000000
--- a/users/replicaJunction/features/caps_word.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/* Copyright 2021 Joshua T.
- *
- * 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 QMK_KEYBOARD_H
-#include "rj_keycodes.h"
-
-bool is_caps_word_enabled(void);
-void enable_caps_word(void);
-void disable_caps_word(void);
-void toggle_caps_word(void);
-
-bool process_record_caps_word(uint16_t keycode, const keyrecord_t *record);
diff --git a/users/replicaJunction/features/mouse_jiggle.c b/users/replicaJunction/features/mouse_jiggle.c
deleted file mode 100644
index b2c451d33e..0000000000
--- a/users/replicaJunction/features/mouse_jiggle.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/* Copyright 2021 Joshua T.
- *
- * 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 "mouse_jiggle.h"
-
-bool is_mouse_jiggle_active = false;
-
-void matrix_scan_mouse_jiggle(void) {
- if (is_mouse_jiggle_active) {
- tap_code(KC_MS_UP);
- tap_code(KC_MS_DOWN);
- }
-}
-
-bool process_record_mouse_jiggle(uint16_t keycode, const keyrecord_t *record) {
- if (!record->event.pressed) {
- return true;
- }
-
- if (is_mouse_jiggle_active) {
- // If active, quit whenever another key is pressed
- is_mouse_jiggle_active = false;
- return true;
- }
-
- if (keycode != MS_JIGL) {
- return true;
- }
-
- is_mouse_jiggle_active = true;
- SEND_STRING("Mouse jiggler enabled");
- return false;
-}
diff --git a/users/replicaJunction/features/mouse_jiggle.h b/users/replicaJunction/features/mouse_jiggle.h
deleted file mode 100644
index ba2c6e7570..0000000000
--- a/users/replicaJunction/features/mouse_jiggle.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/* Copyright 2021 Joshua T.
- *
- * 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 QMK_KEYBOARD_H
-#include "rj_keycodes.h"
-
-void matrix_scan_mouse_jiggle(void);
-
-bool process_record_mouse_jiggle(uint16_t keycode, const keyrecord_t *record);
diff --git a/users/replicaJunction/features/num_word.c b/users/replicaJunction/features/num_word.c
deleted file mode 100644
index 4cca5c19ae..0000000000
--- a/users/replicaJunction/features/num_word.c
+++ /dev/null
@@ -1,129 +0,0 @@
-/* Copyright 2021 Joshua T.
- *
- * 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 "num_word.h"
-
-static uint16_t num_word_timer = 0;
-static bool is_num_word_on = false;
-
-bool is_num_word_enabled(void) {
- return is_num_word_on;
-}
-
-void enable_num_word(void) {
- if (is_num_word_on) return;
- is_num_word_on = true;
- layer_on(L_NUMBERS);
-}
-
-void disable_num_word(void) {
- if (!is_num_word_on) return;
- is_num_word_on = false;
- layer_off(L_NUMBERS);
-}
-
-void toggle_num_word(void) {
- if (is_num_word_on) {
- disable_num_word();
- }
- else {
- enable_num_word();
- }
-}
-
-bool should_terminate_num_word(uint16_t keycode, const keyrecord_t *record) {
- switch (keycode) {
- // Keycodes which should not disable num word mode.
- // We could probably be more brief with these definitions by using
- // a couple more ranges, but I believe "explicit is better than
- // implicit"
- case KC_1 ... KC_0:
- case KC_EQL:
- case KC_SCLN:
- case KC_MINS:
- case KC_DOT:
-
- // Numpad keycodes
- case KC_P1 ... KC_P0:
- case KC_PSLS ... KC_PPLS:
- case KC_PDOT:
-
- // Misc
- case KC_UNDS:
- case KC_BSPC:
- return false;
-
- default:
- if (record->event.pressed) {
- return true;
- }
- return false;
- }
-
- // Should be unreachable
- return false;
-}
-
-
-bool process_record_num_word(uint16_t keycode, const keyrecord_t *record) {
- // Handle the custom keycodes that go with this feature
- if (keycode == NUMWORD) {
- if (record->event.pressed) {
- enable_num_word();
- num_word_timer = timer_read();
- return false;
- }
- else {
- if (timer_elapsed(num_word_timer) > TAPPING_TERM) {
- // If the user held the key longer than TAPPING_TERM,
- // consider it a hold, and disable the behavior on
- // key release.
- disable_num_word();
- return false;
- }
- }
- }
-
- // Other than the custom keycodes, nothing else in this feature will
- // activate if the behavior is not on, so allow QMK to handle the
- // event as usual
- if (!is_num_word_on) return true;
-
- // Nothing else acts on key release, either
- if (!record->event.pressed) {
- return true;
- }
-
- // Get the base keycode of a mod or layer tap key
- switch (keycode) {
- case QK_MOD_TAP ... QK_MOD_TAP_MAX:
- case QK_LAYER_TAP ... QK_LAYER_TAP_MAX:
- case QK_TAP_DANCE ... QK_TAP_DANCE_MAX:
- // Earlier return if this has not been considered tapped yet
- if (record->tap.count == 0)
- return true;
- keycode = keycode & 0xFF;
- break;
- default:
- break;
- }
-
- if (should_terminate_num_word(keycode, record)) {
- disable_num_word();
- }
-
- return true;
-}
diff --git a/users/replicaJunction/features/num_word.h b/users/replicaJunction/features/num_word.h
deleted file mode 100644
index 194c4e2e0d..0000000000
--- a/users/replicaJunction/features/num_word.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/* Copyright 2021 Joshua T.
- *
- * 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 QMK_KEYBOARD_H
-#include "rj_keycodes.h"
-#include "rj_layers.h"
-
-bool is_num_word_enabled(void);
-void enable_num_word(void);
-void disable_num_word(void);
-void toggle_num_word(void);
-
-bool process_record_num_word(uint16_t keycode, const keyrecord_t *record);
diff --git a/users/replicaJunction/features/secrets.c b/users/replicaJunction/features/secrets.c
deleted file mode 100644
index 3e1ea283dc..0000000000
--- a/users/replicaJunction/features/secrets.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/* Copyright 2021 Joshua T.
- *
- * 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/>.
- */
-
-// Before you can compile with this feature, you'll need to manually
-// create a file in this directory called "secret_definitions.h"
-// containing the data to be added.
-//
-// Example implementation:
-//
-// #pragma once
-// static const char * const secrets[] = {
-// "secret1",
-// "secret2",
-// "secret3",
-// "secret4"
-// }
-
-#include QMK_KEYBOARD_H
-#include "replicaJunction.h"
-#include "secrets.h"
-#include "secret_definitions.h"
-
-#ifndef MACRO_TIMER
-# define MACRO_TIMER 5
-#endif
-
-bool process_record_secrets(uint16_t keycode, const keyrecord_t *record) {
- switch (keycode) {
- case K_SECR1 ... K_SECR4: // Secrets! Externally defined strings, not stored in repo
- if (!record->event.pressed) {
- clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED);
- send_string_with_delay(secrets[keycode - K_SECR1], MACRO_TIMER);
- }
- return false;
- }
-
- return true;
-}
diff --git a/users/replicaJunction/features/secrets.h b/users/replicaJunction/features/secrets.h
deleted file mode 100644
index ef43962272..0000000000
--- a/users/replicaJunction/features/secrets.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Copyright 2021 Joshua T.
- *
- * 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 QMK_KEYBOARD_H
-
-// NOTE: In some implementations of the "secrets" functionality, the
-// secrets.h file is the file that actually contains secret text.
-//
-// This is not the case in my implementation. That file is called
-// "secret_definitions.h", and it's in a local .gitignore file so it
-// does not get committed.
-//
-// The inclusion of this file is not an error, and there is no sensitive
-// text here.
-
-bool process_record_secrets(uint16_t keycode, const keyrecord_t *record);
diff --git a/users/replicaJunction/features/super_alt_tab.c b/users/replicaJunction/features/super_alt_tab.c
deleted file mode 100644
index 9759898c87..0000000000
--- a/users/replicaJunction/features/super_alt_tab.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/* Copyright 2021 Joshua T.
- *
- * 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 "super_alt_tab.h"
-
-// https://docs.qmk.fm/#/feature_macros?id=super-alt%E2%86%AFtab
-
-bool is_alt_tab_active = false;
-uint16_t alt_tab_timer = 0;
-
-void matrix_scan_super_alt_tab(void) {
- if (is_alt_tab_active) {
- if (timer_elapsed(alt_tab_timer) > USER_SUPER_ALT_TAB_TIMEOUT) {
- unregister_code(KC_LALT);
- is_alt_tab_active = false;
- }
- }
-}
-
-
-bool process_record_super_alt_tab(uint16_t keycode, const keyrecord_t *record) {
- if (keycode != SALTTAB) {
- return true;
- }
-
- if (record->event.pressed) {
- if (!is_alt_tab_active) {
- is_alt_tab_active = true;
- register_code(KC_LALT);
- }
- alt_tab_timer = timer_read();
- register_code(KC_TAB);
- }
- else {
- unregister_code(KC_TAB);
- }
-
- return false;
-}
diff --git a/users/replicaJunction/features/super_alt_tab.h b/users/replicaJunction/features/super_alt_tab.h
deleted file mode 100644
index 8bdf2bc22e..0000000000
--- a/users/replicaJunction/features/super_alt_tab.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/* Copyright 2021 Joshua T.
- *
- * 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 QMK_KEYBOARD_H
-#include "rj_keycodes.h"
-
-#ifndef USER_SUPER_ALT_TAB_TIMEOUT
-# define USER_SUPER_ALT_TAB_TIMEOUT 500
-#endif
-
-void matrix_scan_super_alt_tab(void);
-
-bool process_record_super_alt_tab(uint16_t keycode, const keyrecord_t *record);
diff --git a/users/replicaJunction/keycode_aliases.h b/users/replicaJunction/keycode_aliases.h
deleted file mode 100644
index b1006a863c..0000000000
--- a/users/replicaJunction/keycode_aliases.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/* Copyright 2021 Joshua T.
- *
- * 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 QMK_KEYBOARD_H
-
-// Transparent, but indicates that this key must be blocked (for example, a layer shift key)
-#define ooooooo KC_TRNS
-
-
-#define SFT_TAB LSFT(KC_TAB)
-#define WIN_TAB LGUI(KC_TAB)
-#define WIN_L LGUI(KC_L)
-#define WIN_V LGUI(KC_V)
-#define ALT_F4 LALT(KC_F4)
-#define CTL_DEL LCTL_T(KC_DEL)
-#define CTL_ESC CTL_T(KC_ESC)
-#define ALT_ENT ALT_T(KC_ENT)
-#define ALT_TAB ALT_T(KC_TAB)
-
-#define OSM_LSF OSM(MOD_LSFT)
-#define OSM_RSF OSM(MOD_RSFT)
-
-// OS shortcuts (Windows)
-#define OS_COPY LCTL(KC_C)
-#define OS_PAST LCTL(KC_V)
-#define OS_CUT LCTL(KC_X)
-#define OS_UNDO LCTL(KC_Z)
-#define OS_SALL LCTL(KC_A)
-#define OS_FIND LCTL(KC_F)
-
-
-// Home row modifiers
-#define GUI_A LGUI_T(KC_A)
-#define ALT_R LALT_T(KC_R)
-#define SFT_S LSFT_T(KC_S)
-#define CRT_T LCTL_T(KC_T) // we can't call this CTL_T because that name is taken!
-
-#define CRT_N RCTL_T(KC_N)
-#define SFT_E RSFT_T(KC_E)
-#define ALT_I RALT_T(KC_I)
-#define GUI_O RGUI_T(KC_O)
-
-
-// Mouse keys
-#define M_UP KC_MS_UP
-#define M_DOWN KC_MS_DOWN
-#define M_LEFT KC_MS_LEFT
-#define M_RIGHT KC_MS_RIGHT
-#define M_LCLIK KC_MS_BTN1
-#define M_RCLIK KC_MS_BTN2
-#define M_MCLIK KC_MS_BTN3
-#define M_WHLUP KC_WH_U
-#define M_WHLDN KC_WH_D
-
-
-// Windows 10 shortcuts: change desktop to the left/right
-#define DESKLFT LCTL(LGUI(KC_LEFT))
-#define DESKRGT LCTL(LGUI(KC_RGHT))
-
-
-// Application-specific shortcuts
-
-// Search: defined in Everything Search Engine as the keypress to show/hide the window
-#define SEARCH HYPR(KC_S)
-
-// Microsoft PowerToys hotkeys
-// https://github.com/microsoft/PowerToys
-#define PTYRUN LALT(KC_SPC) // PowerToys Run
-#define PTYZONE LGUI(KC_GRV) // PowerToys FancyZones
-#define PTYCOLR LGUI(LSFT(KC_C)) // PowerToys ColorPicker
diff --git a/users/replicaJunction/matrix_scan.c b/users/replicaJunction/matrix_scan.c
deleted file mode 100644
index 969799550a..0000000000
--- a/users/replicaJunction/matrix_scan.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/* Copyright 2021 Joshua T.
- *
- * 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 "replicaJunction.h"
-
-__attribute__ ((weak))
-void matrix_scan_user_kb(void) { }
-
-// Runs on every matrix scan. Be careful what goes here - you can really impact the
-// responsiveness of your keyboard if you add too much in this function.
-void matrix_scan_user(void) {
-#ifdef USER_MOUSE_JIGGLE_ENABLE
- matrix_scan_mouse_jiggle();
-#endif
-
-#ifdef USER_SUPER_ALT_TAB_ENABLE
- matrix_scan_super_alt_tab();
-#endif
-
- matrix_scan_user_kb();
-}
diff --git a/users/replicaJunction/process_records.c b/users/replicaJunction/process_records.c
deleted file mode 100644
index abce215261..0000000000
--- a/users/replicaJunction/process_records.c
+++ /dev/null
@@ -1,149 +0,0 @@
-/* Copyright 2021 Joshua T.
- *
- * 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 "process_records.h"
-
-uint8_t mod_state;
-
-
-__attribute__ ((weak))
-bool process_record_user_kb(uint16_t keycode, keyrecord_t *record) {
- return true;
-}
-
-// Runs for each key down or up event.
-bool process_record_user(uint16_t keycode, keyrecord_t *record) {
- // Returning true here will cause QMK to continue handling the key normally.
- // Returning false indicates that we've handled everything the keycode should do, and QMK
- // should not continue handling the keypress.
- //
- // NOTE: There is also a process_record_kb function that can be defined in the keyboard-
- // specific code. This allows the keyboard to have its own process_record function.
- // This is supposed to be "higher" than the user function, meaning the kb function
- // is shared for all keymaps for the keyboard.
- //
- // For this reason, I add my own function, called process_record_user_kb, and at the end
- // of this function, I defer to that one if it exists.
- // return process_record_user(keycode, record);
-
-
- // Custom keycode / function handling, based on the core function
- // process_record_quantum
- // https://github.com/qmk/qmk_firmware/blob/master/quantum/quantum.c
-
- if (!(
-#ifdef USER_CAPS_WORD_ENABLE
- process_record_caps_word(keycode, record) &&
-#endif
-#ifdef USER_MOUSE_JIGGLE_ENABLE
- process_record_mouse_jiggle(keycode, record) &&
-#endif
-#ifdef USER_NUM_WORD_ENABLE
- process_record_num_word(keycode, record) &&
-#endif
-#ifdef USER_SECRETS_ENABLE
- process_record_secrets(keycode, record) &&
-#endif
-#ifdef USER_SUPER_ALT_TAB_ENABLE
- process_record_super_alt_tab(keycode, record) &&
-#endif
- true)) {
- return false;
- }
-
-
- // Miscellaneous keycode handling
- mod_state = get_mods();
-
- switch(keycode)
- {
- case QK_MAKE: {
- if (record->event.pressed)
- SEND_STRING("qmk compile --keyboard " QMK_KEYBOARD " --keymap " QMK_KEYMAP);
- return false;
- }
- case QK_FLSH: {
- if (record->event.pressed) {
- SEND_STRING("qmk flash --keyboard " QMK_KEYBOARD " --keymap " QMK_KEYMAP);
- }
- return false;
- }
- case QK_VERS: {
- if (record->event.pressed) {
- SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION ", Built on: " QMK_BUILDDATE);
- }
- return false;
- }
- case PRG_EQ: {
- if (record->event.pressed) {
- SEND_STRING("==");
- }
- return false;
- }
- case PRG_NE: {
- if (record->event.pressed) {
- SEND_STRING("!=");
- }
- return false;
- }
- case PRG_GEQ: {
- if (record->event.pressed) {
- SEND_STRING(">=");
- }
- return false;
- }
- case PRG_LEQ: {
- if (record->event.pressed) {
- SEND_STRING("<=");
- }
- return false;
- }
- case PRG_ARR: {
- if (record->event.pressed) {
- SEND_STRING("=>");
- }
- return false;
- }
-
- case PS_ITEM: {
- if (record->event.pressed) {
- SEND_STRING("$_");
- }
- return false;
- }
- case FS_PIPE: {
- if (record->event.pressed) {
- SEND_STRING("|>");
- }
- return false;
- }
- case FS_ARR: {
- if (record->event.pressed) {
- SEND_STRING("->");
- }
- return false;
- }
- case SHEBANG: {
- if (record->event.pressed) {
- SEND_STRING("#!");
- }
- return false;
- }
- }
-
- return process_record_user_kb(keycode, record);
-}
diff --git a/users/replicaJunction/process_records.h b/users/replicaJunction/process_records.h
deleted file mode 100644
index 224bc6f4ff..0000000000
--- a/users/replicaJunction/process_records.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/* Copyright 2021 Joshua T.
- *
- * 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 QMK_KEYBOARD_H
-#include "replicaJunction.h"
-
-bool process_record_user_kb(uint16_t keycode, keyrecord_t *record);
diff --git a/users/replicaJunction/readme.md b/users/replicaJunction/readme.md
deleted file mode 100644
index 9d728f9029..0000000000
--- a/users/replicaJunction/readme.md
+++ /dev/null
@@ -1,93 +0,0 @@
-replicaJunction QMK Userspace
-=============================
-
-# Overview
-I alternate between a few keyboards, one of which is the 44-key Keyboardio Atreus. Small keyboards require a liberal use of layers. Even though larger keyboards don't rely on layers as heavily, my muscle memory adapted to my Atreus layout, so I've ended up building several of those features in my keymaps for larger boards as well.
-
-The result, I believe, is a good compromise between ergonomics and ease of use.
-
-The code in this userspace is designed to be very modular. I use a few different keyboards, and I'm constantly tweaking one or another, so I want the ability to add and remove features from the firmware at compile-time. While my endgame goal is to get all the layouts to be compatible, in practice, it's been years and I'm still not to that point...
-
-Modular code also means that it should be easy to identify and adapt specific pieces to your own firmware.
-
-## Keyboards and Keymaps
-
-The following keyboards use the files in this userspace:
-
-* [Atreus](../../keyboards/atreus/keymaps/replicaJunction/readme.md) (42-key)
-* [Ergodox](../../layouts/community/ergodox/replicaJunction/readme.md)
-* [Keyboardio Atreus](../../keyboards/keyboardio/atreus/keymaps/replicaJunction/readme.md) (44-key)
-* [XD75](../../keyboards/xd75/keymaps/replicaJunction/readme.md)
-
-# Features
-
-* **Secrets**, as [explained by Drashna](https://github.com/qmk/qmk_firmware/blob/master/users/drashna/readme_secrets.md)
-* **CAPSWORD** and **NUMWORD**
-* Mouse jiggler
-* Super alt-tab
-
-## Secrets
-My implementation of the "secrets" concept is very similar to Drashna's, but I've chosen to allow most of the supporting code to be committed to the repo. The only thing missing is a file called `secret_definitions.h`, which contains the actual text contained in those macros.
-
-To use my implementation, create a file of that name in the same directory. Make sure you've got a `.gitignore` file in place, and add these contents to the definitions file:
-
-```c
-#pragma once
-static const char * const secrets[] = {
- "secret1",
- "secret2",
- "secret3",
- "secret4"
-}
-```
-
-Change the quoted text to the text you'd like and you're golden. If you need more (or fewer) items, you'll probably need to adjust the code in `secrets.c` as well, since it looks for up to four items in a switch case.
-
-## CAPSWORD and NUMWORD
-The concept here is simple: more often than you'd think, you need to type a single word in ALL CAPS. An easy example for me, as a programmer, is a constant value; in most programming languages, constants are typed in all caps by convention.
-
-You typically have a few choices, but each one comes with a drawback. Here are the options I'm aware of:
-
-* Use proper typing technique and alternate which hand holds Shift for each keypress
- * This can often end up requiring you to switch / re-press Shift again and again, making this a tedious process
-* Hold a single Shift key down
- * This can lead to uncomfortable finger gymnastics
-* Hit the Caps Lock key, then hit it again when you're done
- * Requires you to remember to hit it again, meaning a higher cognitive load
- * In some layouts for smaller keyboards, Caps Lock is not easily accessible (sometimes not mapped at all)
-
-The solution to this problem is CAPSWORD. When enabled, it activates Caps Lock and begins running an additional callback on each keypress. If the keypress is an alphanumeric key or one of a specific few symbols (such as the underscore), nothing happens. Otherwise, before processing the keypress, Caps Lock is disabled again.
-
-NUMWORD is a similar concept, but has a slightly more elaborate implementation. There's a bit of extra logic in the NUMWORD code that allows the keycode to act as a tap/hold key as well. Tapping enables NUMWORD while number keys are in use, while holding the key enables a number layer for the duration of the key hold and disables it again afterwards.
-
-**Note:** The implementation of NUMWORD requires that the keyboard's layer definitions be accessible in a header file. In my case, since I use a fairly standard set of layers, I've declared it in my userspace.
-
-## Mouse Jiggler
-This adds a keycode that will move the mouse cursor on each matrix scan. Used to prevent the screen from locking if you're temporarily doing something else (working on a different machine, reading / writing, etc.).
-
-When you press the keycode, the keyboard will write the text "Mouse jiggler enabled" to signify that the behavior is active. I suggest opening a Notepad window before pressing the key.
-
-Pressing any key will automatically disable the feature again. This is because it causes a huge hit to the reliability and performance of the keyboard while it's active (adding stuff to every matrix scan will do that). I kept forgetting to turn it off before trying to use the keyboard again, so I decided to make it automatically disable itself.
-
-Enable this by setting `USER_MOUSE_JIGGLE_ENABLE = yes` in your `rules.mk` file. The feature also depends on the Mouse Keys feature, so ensure you don't disable `MOUSEKEY_ENABLE`.
-
-## Super Alt-Tab
-Taken [straight out of the QMK documentation](https://docs.qmk.fm/#/feature_macros?id=super-alt%E2%86%AFtab), this is an easy way to shift between a couple different windows. I use it with a very low interval when I'm alternating back and forth between two known windows with no real need for the visual feedback and thought. If you want to be able to browse the open windows before the function releases Alt, I'd suggest raising `USER_SUPER_ALT_TAB_TIMEOUT` to a higher value.
-
-# Credits
-I'm absolutely sure I've missed a few sources here. If you see something in my code that you think is yours and isn't credited here, I sincerely apologize.
-
-[bpruitt-goddard](https://github.com/qmk/qmk_firmware/blob/master/keyboards/ergodox_ez/keymaps/bpruitt-goddard/readme.md)
-* Dynamic macro tap-dance (no longer used, but I did use this for a while)
-
-[Drashna](https://github.com/qmk/qmk_firmware/blob/master/users/drashna/readme.md)
-* Secrets concept and basic implementation
-* "Wrappers" concept (no longer used, but I did use this for a while)
-
-[Treeman](https://github.com/treeman/qmk_firmware/blob/master/keyboards/kyria/keymaps/treeman)
-* CAPSWORD and NUMBERWORD concept
- * I re-implented some of the code based on my own prefences, but I did use some implementation code from here
- * [Treeman's blog post](https://www.jonashietala.se/blog/2021/06/03/the-t-34-keyboard-layout/) provides more context on these features, and is a great read
-
-[QMK issue #452](https://github.com/qmk/qmk_firmware/issues/452)
-* Helped clarify a good organizational structure for the individual features in this userspace
diff --git a/users/replicaJunction/replicaJunction.c b/users/replicaJunction/replicaJunction.c
deleted file mode 100644
index 55d8b77166..0000000000
--- a/users/replicaJunction/replicaJunction.c
+++ /dev/null
@@ -1,25 +0,0 @@
-/* Copyright 2021 Joshua T.
- *
- * 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 "replicaJunction.h"
-
-__attribute__ ((weak))
-void keyboard_post_init_user_kb(void) { }
-
-void keyboard_post_init_user(void) {
- keyboard_post_init_user_kb();
-}
diff --git a/users/replicaJunction/replicaJunction.h b/users/replicaJunction/replicaJunction.h
deleted file mode 100644
index f3b7bcea0a..0000000000
--- a/users/replicaJunction/replicaJunction.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* Copyright 2021 Joshua T.
- *
- * 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 QMK_KEYBOARD_H
-#include "rj_keycodes.h"
-#include "rj_layers.h"
-#include "keycode_aliases.h"
-#include "version.h"
-
-#ifdef USER_CAPS_WORD_ENABLE
-# include "features/caps_word.h"
-#endif
-
-#ifdef USER_MOUSE_JIGGLE_ENABLE
-# include "features/mouse_jiggle.h"
-#endif
-
-#ifdef USER_NUM_WORD_ENABLE
-# include "features/num_word.h"
-#endif
-
-#ifdef USER_SECRETS_ENABLE
-# include "features/secrets.h"
-#endif
-
-#ifdef USER_SUPER_ALT_TAB_ENABLE
-# include "features/super_alt_tab.h"
-#endif
diff --git a/users/replicaJunction/rj_keycodes.h b/users/replicaJunction/rj_keycodes.h
deleted file mode 100644
index fde2698dfe..0000000000
--- a/users/replicaJunction/rj_keycodes.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/* Copyright 2021 Joshua T.
- *
- * 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 QMK_KEYBOARD_H
-
-// Custom keycodes and macros
-enum userspace_custom_keycodes {
- QK_MAKE = SAFE_RANGE, // QMK make command
- QK_FLSH, // QMK flash command
- QK_VERS, // QMK version
-
- // Programming macros
- PRG_EQ, // ==
- PRG_NE, // !=
- PRG_GEQ, // >=
- PRG_LEQ, // <=
- PRG_ARR, // =>
- PS_ITEM, // $_ (PowerShell - $PSItem variable)
- FS_PIPE, // |> (F# pipe operator)
- FS_ARR, // -> (F# lambda / pattern matching)
- SHEBANG, // #!
-
- // USER_CAPS_WORD_ENABLE
- CAPWORD,
-
-#ifdef USER_NUM_WORD_ENABLE
- NUMWORD,
-#endif
-
- // USER_ENABLE_CUSTOM_SHIFT_CODES
- // Custom characters that send different symbols than usual when shifted
- KCC_COM, // , or !
- KCC_DOT, // . or @
- KCC_QUO, // ' or ~
-
- // USER_MOUSE_JIGGLE_ENABLE
- MS_JIGL,
-
- // USER_ENABLE_SUPER_ALT_TAB
- SALTTAB,
-
- // USER_ENABLE_SECRETS
- K_SECR1,
- K_SECR2,
- K_SECR3,
- K_SECR4,
-
- DYNAMIC_MACRO_RANGE
-};
diff --git a/users/replicaJunction/rules.mk b/users/replicaJunction/rules.mk
deleted file mode 100644
index addaa04d97..0000000000
--- a/users/replicaJunction/rules.mk
+++ /dev/null
@@ -1,33 +0,0 @@
-SRC += replicaJunction.c
-
-# Only load these source files if the features are enabled. Keyboards can
-# enable or disable these features in their own rules.mk files.
-
-ifeq ($(strip $(USER_CAPS_WORD_ENABLE)), yes)
- SRC += features/caps_word.c
- OPT_DEFS += -DUSER_CAPS_WORD_ENABLE
-endif
-
-ifeq ($(strip $(USER_MOUSE_JIGGLE_ENABLE)), yes)
- SRC += features/mouse_jiggle.c
- OPT_DEFS += -DUSER_MOUSE_JIGGLE_ENABLE
-endif
-
-ifeq ($(strip $(USER_NUM_WORD_ENABLE)), yes)
- SRC += features/num_word.c
- OPT_DEFS += -DUSER_NUM_WORD_ENABLE
-endif
-
-ifeq ($(strip $(USER_SECRETS_ENABLE)), yes)
- SRC += features/secrets.c
- OPT_DEFS += -DUSER_SECRETS_ENABLE
-endif
-
-ifeq ($(strip $(USER_SUPER_ALT_TAB_ENABLE)), yes)
- SRC += features/super_alt_tab.c
- OPT_DEFS += -DUSER_SUPER_ALT_TAB_ENABLE
-endif
-
-# Define these last so any other logic can set up some defines first
-SRC += matrix_scan.c \
- process_records.c
diff --git a/users/sethBarberee/config.h b/users/sethBarberee/config.h
index 7e9fd7d2f1..f323b27368 100644
--- a/users/sethBarberee/config.h
+++ b/users/sethBarberee/config.h
@@ -28,9 +28,6 @@
# endif
// Trim animations I don't use/like
-# ifdef RGBLIGHT_ANIMATIONS
-# undef RGBLIGHT_ANIMATIONS
-# endif
# ifndef RGBLIGHT_EFFECT_BREATHING
# define RGBLIGHT_EFFECT_BREATHING
# endif
diff --git a/util/udev/50-qmk.rules b/util/udev/50-qmk.rules
index 86f1dc9004..1cc19b4142 100644
--- a/util/udev/50-qmk.rules
+++ b/util/udev/50-qmk.rules
@@ -81,3 +81,6 @@ SUBSYSTEMS=="usb", ATTRS{idVendor}=="314b", ATTRS{idProduct}=="0106", TAG+="uacc
# GD32V DFU
SUBSYSTEMS=="usb", ATTRS{idVendor}=="28e9", ATTRS{idProduct}=="0189", TAG+="uaccess"
+
+# WB32 DFU
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="342d", ATTRS{idProduct}=="dfa0", TAG+="uaccess"