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:
parent
9a88c19f1a
commit
f0e4f6622e
4 changed files with 33 additions and 21 deletions
|
|
@ -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 += "]";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue