From 41912341fc9638e667591d428e6e3cf1f2be813b Mon Sep 17 00:00:00 2001 From: jamke <47451874+jamke@users.noreply.github.com> Date: Tue, 8 Aug 2023 06:16:27 +0000 Subject: [PATCH] Improve layout filtering of options for setxkbmap Currently options like shift_caps_switch, lctrl_rctrl_switch and other first-last layout toggles is broken because they are not be filtered out. The provided code maybe does it better. Note, that solution was not tested by me! It is just an idea how it is possible to improve fc08f4e. Docs: The list of options for keyboard layout switching is present in 'grp' chapter of `/usr/share/X11/xkb/rules`. Note: I am not sure that "while pressed" shortcuts will work or if it work now. --- qubesadmin/tools/qvm_start_daemon.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qubesadmin/tools/qvm_start_daemon.py b/qubesadmin/tools/qvm_start_daemon.py index 9832b1db..555e2350 100644 --- a/qubesadmin/tools/qvm_start_daemon.py +++ b/qubesadmin/tools/qvm_start_daemon.py @@ -180,7 +180,7 @@ def __init__(self, binary_string): self.variants = split_string[3].decode().split(',') self.options = split_string[4].decode() self.options = ",".join(opt for opt in self.options.split(",") - if not opt.endswith("_toggle")) + if not opt.startswith("grp:")) def get_property(self, layout_num): """Return the selected keyboard layout as formatted for keyboard_layout