summaryrefslogtreecommitdiff
path: root/lib/python/qmk
diff options
context:
space:
mode:
authorNick Brassel <nick@tzarc.org>2022-11-05 23:22:11 +1100
committerGitHub <noreply@github.com>2022-11-05 23:22:11 +1100
commit4d33f356a62c195f5498ed2fe8dd3ea434d5a689 (patch)
tree9e9c99d43512b2890836facfd8ae4e447dfa5810 /lib/python/qmk
parentfe00c8021192c43e27e5a91a5193d7fbe07b9fa8 (diff)
Macro keycode name refactoring (#18958)
Diffstat (limited to 'lib/python/qmk')
-rw-r--r--lib/python/qmk/keymap.py2
-rw-r--r--lib/python/qmk/tests/test_cli_commands.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/python/qmk/keymap.py b/lib/python/qmk/keymap.py
index fc1421962f..315af35b73 100644
--- a/lib/python/qmk/keymap.py
+++ b/lib/python/qmk/keymap.py
@@ -266,7 +266,7 @@ def generate_c(keymap_json):
new_macro = "".join(macro)
new_macro = new_macro.replace('""', '')
- macro_txt.append(f' case MACRO_{i}:')
+ macro_txt.append(f' case QK_MACRO_{i}:')
macro_txt.append(f' SEND_STRING({new_macro});')
macro_txt.append(' return false;')
diff --git a/lib/python/qmk/tests/test_cli_commands.py b/lib/python/qmk/tests/test_cli_commands.py
index 9bfc5a0a79..e598b281a6 100644
--- a/lib/python/qmk/tests/test_cli_commands.py
+++ b/lib/python/qmk/tests/test_cli_commands.py
@@ -150,8 +150,8 @@ def test_json2c():
def test_json2c_macros():
result = check_subcommand("json2c", 'keyboards/handwired/pytest/macro/keymaps/default/keymap.json')
check_returncode(result)
- assert 'LAYOUT_ortho_1x1(MACRO_0)' in result.stdout
- assert 'case MACRO_0:' in result.stdout
+ assert 'LAYOUT_ortho_1x1(QK_MACRO_0)' in result.stdout
+ assert 'case QK_MACRO_0:' in result.stdout
assert 'SEND_STRING("Hello, World!"SS_TAP(X_ENTER));' in result.stdout