summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmin Bandali <amin@gnu.org>2018-09-18 01:53:19 -0400
committerAmin Bandali <amin@gnu.org>2018-09-18 09:36:20 -0400
commitd716e61e25683caccb5409b900f9386d22c26280 (patch)
tree09667b6c1305475f83a7a57945e7f2f39cf25c4c
parent11a97c6847ba346367987bae67c28ea3613c595a (diff)
downloadconfigs-d716e61e25683caccb5409b900f9386d22c26280.tar.gz
configs-d716e61e25683caccb5409b900f9386d22c26280.tar.xz
configs-d716e61e25683caccb5409b900f9386d22c26280.zip
[rc/{sway,X}] add custom keyboard layout, mapping Menu to Alt_R
back when i wasn't on wayland, i used to use xmodmap to remap the menu key to right alt, xmodmap -e "keycode 135 = Alt_R", since, as it turns out, setxkbmap doesn't have an option for that. there being no xkb option for changing menu into right alt meant i was stuck with it on sway, since setxkbmap is X-specific. figuring out how to write my own xkb rules was "fun". at first i did a separate aminb file containing aminb:menu_ralt (à la altwin:menu); but decided it would be simpler to just define my own us(basic)-based layout and make all the changes there. also, no need to map right control to right alt using ctrl:rctrl_ralt anymore.
-rw-r--r--rc.org16
1 files changed, 14 insertions, 2 deletions
diff --git a/rc.org b/rc.org
index 654bd8e..c8c71bc 100644
--- a/rc.org
+++ b/rc.org
@@ -3827,8 +3827,8 @@ input "2:7:SynPS/2_Synaptics_TouchPad" {
input "1:1:AT_Translated_Set_2_keyboard" {
repeat_delay 200
repeat_rate 45
- xkb_layout us,ir
- xkb_options ctrl:nocaps,altwin:swap_alt_win,ctrl:rctrl_ralt,grp:shifts_toggle
+ xkb_layout us_ab,ir
+ xkb_options ctrl:nocaps,altwin:swap_alt_win,grp:shifts_toggle
}
@@ -5047,6 +5047,18 @@ URxvt.color7: #D3D7CF
URxvt.color15: #EEEEEC
#+end_src
+*** xkb us_ab keyboard layout
+
+#+begin_src conf :tangle "/sudo::/usr/share/X11/xkb/symbols/us_ab" :comments none
+default partial alphanumeric_keys
+xkb_symbols "us_ab" {
+ include "us(basic)"
+ name[Group1]= "English (US)(aminb)";
+
+ key <MENU> { [ Alt_R ] };
+};
+#+end_src
+
** XDG
:PROPERTIES:
:header-args+: :tangle ~/.config/user-dirs.dirs