mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-17 13:03:48 -07:00
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`
This commit is contained in:
@@ -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 += "]";
|
||||
|
Reference in New Issue
Block a user