Skip to content

Commit

Permalink
Improve layout filtering of options for setxkbmap
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jamke committed Aug 8, 2023
1 parent 4023ee2 commit 4191234
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion qubesadmin/tools/qvm_start_daemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4191234

Please sign in to comment.