fix(keymap-upgrader): Filter key codes to bindings

Changed the key code upgrader to only replace codes that appear in
"bindings" properties. Modifier flags such as MOD_LCTL are no longer
valid as key codes, but they are still used in "mods" properties and
should not be replaced there.
This commit is contained in:
Joel Spadin
2024-01-22 12:43:24 -06:00
parent 37fcf190e6
commit d4be70587d
2 changed files with 28 additions and 6 deletions

View File

@@ -11,10 +11,13 @@ Some behaviors, key codes, and other features have been renamed to be more consi
Paste the contents of a `.keymap` file below. Then, hover your mouse over the upgraded keymap and click the `Copy` button in the upper-right corner to copy it to your clipboard.
You will likely need to realign columns in the upgraded keymap. The upgrader also does not handle
codes inside a `#define`, so you will need to update those manually using
:::warning
The upgrader does not handle key codes inside a `#define` or a behavior creation macro such as `ZMK_MACRO()`, so you will need to update those manually using
[this list of deprecated codes and replacements](https://github.com/zmkfirmware/zmk/blob/main/docs/src/keymap-upgrade/keycodes.ts).
:::
import KeymapUpgrader from "@site/src/components/KeymapUpgrader/index";
<KeymapUpgrader />