Difference between revisions of "Synergy"

From WTFwiki
Jump to navigation Jump to search
(Created page with "== Map Alt_R to Super_L w/setxkbmap == * Upstream code located at: https://github.com/xkbcommon/libxkbcommon * Files on disk located at: /usr/share/X11/xkb/{symbols/altwin,rul...")
(No difference)

Revision as of 19:44, 3 February 2022

Map Alt_R to Super_L w/setxkbmap

(ins)^:jontow@phoenix:~/GIT-external/libxkbcommon/test/data/symbols$ git diff
diff --git a/test/data/rules/evdev b/test/data/rules/evdev
index e949490..890deaf 100644
--- a/test/data/rules/evdev
+++ b/test/data/rules/evdev
@@ -970,6 +970,8 @@
   altwin:hyper_win     =       +altwin(hyper_win)
   altwin:alt_super_win =       +altwin(alt_super_win)
   altwin:swap_lalt_lwin        =       +altwin(swap_lalt_lwin)
+  altwin:swap_ralt_lwin        =       +altwin(swap_ralt_lwin)
+  altwin:swap_ralt_rwin        =       +altwin(swap_ralt_rwin)
   altwin:swap_alt_win  =       +altwin(swap_alt_win)
   altwin:prtsc_rwin    =       +altwin(prtsc_rwin)
   grab:debug           =       +srvr_ctrl(grab_debug)
diff --git a/test/data/symbols/altwin b/test/data/symbols/altwin
index 038456b..354700c 100644
--- a/test/data/symbols/altwin
+++ b/test/data/symbols/altwin
@@ -114,6 +114,14 @@ xkb_symbols "swap_ralt_rwin" {
     key <RWIN> { [ Alt_R, Meta_R ] };
 };
 
+// Swap the right Alt and Super_L.
+hidden partial modifier_keys
+xkb_symbols "swap_ralt_lwin" {
+    key <RALT> { type[Group1] = "ONE_LEVEL",
+                 symbols[Group1] = [ Super_L ] };
+    key <RWIN> { [ Alt_R, Meta_R ] };
+};
+
 // Win is mapped to the PrtSc key (and the usual Win key).
 partial modifier_keys
 xkb_symbols "prtsc_rwin" {

Once patched, use with setxkbmap(1):

 $ setxkbmap -option altwin:swap_ralt_lwin