summaryrefslogtreecommitdiff
path: root/src/debug/HyprCtl.cpp
diff options
context:
space:
mode:
authoroutfoxxed <outfoxxed@outfoxxed.me>2023-06-14 04:08:56 -0700
committerGitHub <noreply@github.com>2023-06-14 13:08:56 +0200
commitf0e4f6622e3e9addc530119b804d2f71395455e7 (patch)
treefb26406e4fd956c0573ae4745edc23c8506793af /src/debug/HyprCtl.cpp
parent9a88c19f1ad2acad3cdfd2c81af6e40f2a0219b1 (diff)
Implement pass binds (#2503)
* Implement pass binds Pass binds run the associated dispatcher but do not prevent windows from receiving the bind. * Fix pass binds not working properly with release binds * Rename `pass` to `nonConsuming`
Diffstat (limited to 'src/debug/HyprCtl.cpp')
-rw-r--r--src/debug/HyprCtl.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/debug/HyprCtl.cpp b/src/debug/HyprCtl.cpp
index 7510e96e..58099bc8 100644
--- a/src/debug/HyprCtl.cpp
+++ b/src/debug/HyprCtl.cpp
@@ -592,6 +592,8 @@ std::string bindsRequest(HyprCtl::eHyprCtlOutputFormat format) {
ret += "r";
if (kb.repeat)
ret += "e";
+ if (kb.nonConsuming)
+ ret += "n";
ret += getFormat("\n\tmodmask: %u\n\tsubmap: %s\n\tkey: %s\n\tkeycode: %d\n\tdispatcher: %s\n\targ: %s\n\n", kb.modmask, kb.submap.c_str(), kb.key.c_str(), kb.keycode,
kb.handler.c_str(), kb.arg.c_str());
@@ -607,6 +609,7 @@ std::string bindsRequest(HyprCtl::eHyprCtlOutputFormat format) {
"mouse": %s,
"release": %s,
"repeat": %s,
+ "non_consuming": %s,
"modmask": %u,
"submap": "%s",
"key": "%s",
@@ -614,8 +617,9 @@ std::string bindsRequest(HyprCtl::eHyprCtlOutputFormat format) {
"dispatcher": "%s",
"arg": "%s"
},)#",
- kb.locked ? "true" : "false", kb.mouse ? "true" : "false", kb.release ? "true" : "false", kb.repeat ? "true" : "false", kb.modmask,
- escapeJSONStrings(kb.submap).c_str(), escapeJSONStrings(kb.key).c_str(), kb.keycode, escapeJSONStrings(kb.handler).c_str(), escapeJSONStrings(kb.arg).c_str());
+ kb.locked ? "true" : "false", kb.mouse ? "true" : "false", kb.release ? "true" : "false", kb.repeat ? "true" : "false", kb.nonConsuming ? "true" : "false",
+ kb.modmask, escapeJSONStrings(kb.submap).c_str(), escapeJSONStrings(kb.key).c_str(), kb.keycode, escapeJSONStrings(kb.handler).c_str(),
+ escapeJSONStrings(kb.arg).c_str());
}
trimTrailingComma(ret);
ret += "]";