matchBind
True if matches the named keybind (follows Keybind.also). See matchKeyBind.
Parameters
- self:Key
- Key
- keybind_name:[]const u8
- []const u8
Source
Implementation
pub fn matchBind(self: Key, keybind_name: []const u8) bool {
const cw = dvui.currentWindow();
var name = keybind_name;
while (true) {
if (cw.keybinds.get(name)) |kb| {
if (self.matchKeyBind(kb)) {
return true;
} else if (kb.also) |also_name| {
name = also_name;
continue;
} else {
return false;
}
} else {
return false;
}
}
}