mirror of
https://github.com/labwc/labwc.git
synced 2026-04-17 06:46:28 -04:00
Add overrideInhibition to keyboard.keybind
Some checks failed
labwc.github.io / notify (push) Has been cancelled
Some checks failed
labwc.github.io / notify (push) Has been cancelled
This commit is contained in:
parent
4c7a9960a4
commit
c5ea41e876
4 changed files with 15 additions and 3 deletions
|
|
@ -760,7 +760,8 @@ References:
|
||||||
Stores the keyboard layout either globally or per window and restores
|
Stores the keyboard layout either globally or per window and restores
|
||||||
it when switching back to the window. Default is global.
|
it when switching back to the window. Default is global.
|
||||||
|
|
||||||
*<keyboard><keybind key="" layoutDependent="" onRelease="" allowWhenLocked="">*
|
*<keyboard><keybind key="" layoutDependent="" onRelease="" allowWhenLocked=""
|
||||||
|
overrideInhibition="">*
|
||||||
Define a *key* binding in the format *modifier-key*, where supported
|
Define a *key* binding in the format *modifier-key*, where supported
|
||||||
modifiers are:
|
modifiers are:
|
||||||
- S (shift)
|
- S (shift)
|
||||||
|
|
@ -808,6 +809,11 @@ References:
|
||||||
*allowWhenLocked* [yes|no]
|
*allowWhenLocked* [yes|no]
|
||||||
Make this keybind work even if the screen is locked. Default is no.
|
Make this keybind work even if the screen is locked. Default is no.
|
||||||
|
|
||||||
|
*overrideInhibition* [yes|no]
|
||||||
|
Make this keybind work even if the view inhibits keybinds. Default is no.
|
||||||
|
This can be used to prevent W-Tab and similar keybinds from being
|
||||||
|
delivered to Virtual Machines, VNC clients or nested compositors.
|
||||||
|
|
||||||
*onRelease* [yes|no]
|
*onRelease* [yes|no]
|
||||||
When yes, fires the keybind action when the key or key
|
When yes, fires the keybind action when the key or key
|
||||||
combination is released, rather than first pressed. This is useful to
|
combination is released, rather than first pressed. This is useful to
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@ struct keybind {
|
||||||
struct wl_list actions; /* struct action.link */
|
struct wl_list actions; /* struct action.link */
|
||||||
struct wl_list link; /* struct rcxml.keybinds */
|
struct wl_list link; /* struct rcxml.keybinds */
|
||||||
bool on_release;
|
bool on_release;
|
||||||
|
bool override_inhibition;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -602,6 +602,7 @@ fill_keybind(xmlNode *node)
|
||||||
lab_xml_get_bool(node, "onRelease", &keybind->on_release);
|
lab_xml_get_bool(node, "onRelease", &keybind->on_release);
|
||||||
lab_xml_get_bool(node, "layoutDependent", &keybind->use_syms_only);
|
lab_xml_get_bool(node, "layoutDependent", &keybind->use_syms_only);
|
||||||
lab_xml_get_bool(node, "allowWhenLocked", &keybind->allow_when_locked);
|
lab_xml_get_bool(node, "allowWhenLocked", &keybind->allow_when_locked);
|
||||||
|
lab_xml_get_bool(node, "overrideInhibition", &keybind->override_inhibition);
|
||||||
|
|
||||||
append_parsed_actions(node, &keybind->actions);
|
append_parsed_actions(node, &keybind->actions);
|
||||||
}
|
}
|
||||||
|
|
@ -1706,6 +1707,8 @@ deduplicate_key_bindings(void)
|
||||||
wl_list_remove(¤t->link);
|
wl_list_remove(¤t->link);
|
||||||
keybind_destroy(current);
|
keybind_destroy(current);
|
||||||
cleared++;
|
cleared++;
|
||||||
|
} else if (actions_contain_toggle_keybinds(¤t->actions)) {
|
||||||
|
current->override_inhibition = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (replaced) {
|
if (replaced) {
|
||||||
|
|
|
||||||
|
|
@ -203,8 +203,10 @@ match_keybinding_for_sym(uint32_t modifiers,
|
||||||
if (modifiers ^ keybind->modifiers) {
|
if (modifiers ^ keybind->modifiers) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (view_inhibits_actions(server.active_view, &keybind->actions)) {
|
if (!(keybind->override_inhibition)) {
|
||||||
continue;
|
if (view_inhibits_actions(server.active_view, &keybind->actions)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (sym == XKB_KEY_NoSymbol) {
|
if (sym == XKB_KEY_NoSymbol) {
|
||||||
/* Use keycodes */
|
/* Use keycodes */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue