From 58d4fe64da134d1b22f360575264cdfd971cf7fe Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Wed, 10 Dec 2025 20:11:55 +0800 Subject: [PATCH] feat: add bing flag p --- src/config/parse_config.h | 6 +++++- src/mango.c | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/config/parse_config.h b/src/config/parse_config.h index 2d10ed2..717fbe6 100644 --- a/src/config/parse_config.h +++ b/src/config/parse_config.h @@ -43,6 +43,7 @@ typedef struct { bool isdefaultmode; bool islockapply; bool isreleaseapply; + bool ispassapply; } KeyBinding; typedef struct { @@ -426,6 +427,9 @@ void parse_bind_flags(const char *str, KeyBinding *kb) { case 'r': kb->isreleaseapply = true; break; + case 'p': + kb->ispassapply = true; + break; default: // 忽略其他字符或可根据需要处理错误 break; @@ -1890,7 +1894,7 @@ void parse_option(Config *config, char *key, char *value) { config->exec_once_count++; - } else if (regex_match("^bind[s|l|r]*$", key)) { + } else if (regex_match("^bind[s|l|r|p]*$", key)) { config->key_bindings = realloc(config->key_bindings, (config->key_bindings_count + 1) * sizeof(KeyBinding)); diff --git a/src/mango.c b/src/mango.c index f140782..5d0bf10 100644 --- a/src/mango.c +++ b/src/mango.c @@ -3385,7 +3385,11 @@ keybinding(uint32_t state, bool locked, uint32_t mods, xkb_keysym_t sym, k->func) { isbreak = k->func(&k->arg); - handled = 1; + + if (!k->ispassapply) + handled = 1; + else + handled = 0; if (isbreak) break;