feat: support index arg in switch_keyboard_layout

This commit is contained in:
DreamMaoMao 2026-02-19 09:59:58 +08:00
parent 08ed32cb3a
commit 78e7bc9f34
2 changed files with 8 additions and 1 deletions

View file

@ -997,6 +997,7 @@ FuncType parse_func_name(char *func_name, Arg *arg, char *arg_value,
(*arg).v = strdup(arg_value);
} else if (strcmp(func_name, "switch_keyboard_layout") == 0) {
func = switch_keyboard_layout;
(*arg).i = CLAMP_INT(atoi(arg_value), 0, 100);
} else if (strcmp(func_name, "setlayout") == 0) {
func = setlayout;
(*arg).v = strdup(arg_value);