summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/format.yml8
-rw-r--r--.github/workflows/lint.yml9
-rw-r--r--data/mappings/info_config.hjson6
-rw-r--r--data/mappings/info_rules.hjson1
-rw-r--r--data/schemas/keyboard.jsonschema31
-rw-r--r--docs/newbs_building_firmware.md2
-rw-r--r--docs/reference_info_json.md21
-rw-r--r--keyboards/bioi/main.c2
-rw-r--r--keyboards/cannonkeys/ortho60v2/config.h23
-rw-r--r--keyboards/cannonkeys/ortho60v2/halconf.h23
-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.mk1
-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/gmmk/pro/rev1/ansi/keymaps/andrebrait/rules.mk19
-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/keebio/nyquist/keymaps/danielhklein/keymap.c1
-rw-r--r--lib/python/qmk/cli/__init__.py1
-rw-r--r--lib/python/qmk/cli/migrate.py81
-rwxr-xr-xlib/python/qmk/cli/new/keymap.py56
-rw-r--r--lib/python/qmk/submodules.py2
-rw-r--r--quantum/action_tapping.c161
-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/usb_descriptor.c3
-rw-r--r--users/sethBarberee/config.h3
-rw-r--r--util/udev/50-qmk.rules3
36 files changed, 755 insertions, 136 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/data/mappings/info_config.hjson b/data/mappings/info_config.hjson
index c1c01ff70f..8f7b34d41a 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"},
@@ -122,7 +126,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..5c0c23c2b1 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,
@@ -511,6 +527,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/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/reference_info_json.md b/docs/reference_info_json.md
index d5469c835a..2da67668c0 100644
--- a/docs/reference_info_json.md
+++ b/docs/reference_info_json.md
@@ -333,3 +333,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]
+ },
+}
+``` \ No newline at end of file
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/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/cannonkeys/ortho60v2/halconf.h b/keyboards/cannonkeys/ortho60v2/halconf.h
new file mode 100644
index 0000000000..cef26f106c
--- /dev/null
+++ b/keyboards/cannonkeys/ortho60v2/halconf.h
@@ -0,0 +1,23 @@
+ /*
+ * 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
+ * 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_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/cannonkeys/ortho60v2/keymaps/via/rules.mk b/keyboards/cannonkeys/ortho60v2/keymaps/via/rules.mk
new file mode 100644
index 0000000000..1e5b99807c
--- /dev/null
+++ b/keyboards/cannonkeys/ortho60v2/keymaps/via/rules.mk
@@ -0,0 +1 @@
+VIA_ENABLE = yes
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/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/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/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/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/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/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/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/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/usb_descriptor.c b/tmk_core/protocol/usb_descriptor.c
index 99c52952a0..c7d78be856 100644
--- a/tmk_core/protocol/usb_descriptor.c
+++ b/tmk_core/protocol/usb_descriptor.c
@@ -45,9 +45,6 @@
# include "joystick.h"
#endif
-// TODO: wb32 support defines ISO macro which breaks PRODUCT stringification
-#undef ISO
-
// clang-format off
/*
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"