Macro keycode name refactoring (#18958)
This commit is contained in:
parent
fe00c80211
commit
4d33f356a6
10 changed files with 243 additions and 116 deletions
|
@ -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;')
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue