Signed-off-by: Stacy Harper <contact@stacyharper.net> Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>master
parent
d430cce8ff
commit
f86cc46d03
6 changed files with 77 additions and 2 deletions
@ -0,0 +1,22 @@ |
||||
xkb_keymap { |
||||
xkb_keycodes "(unnamed)" { |
||||
minimum = 122; |
||||
maximum = 124; |
||||
<VOL-> = 122; |
||||
<VOL+> = 123; |
||||
<POWR> = 124; |
||||
alias <I122> = <VOL->; |
||||
alias <I123> = <VOL+>; |
||||
alias <I124> = <POWR>; |
||||
}; |
||||
xkb_types "(unnamed)" { |
||||
}; |
||||
xkb_compatibility "(unnamed)" { |
||||
}; |
||||
xkb_symbols "(unnamed)" { |
||||
name[group1]="Mobile Convenient Buttons"; |
||||
key <VOL-> { [ Down ] }; |
||||
key <VOL+> { [ Up ] }; |
||||
key <POWR> { [ Return ] }; |
||||
}; |
||||
}; |
@ -0,0 +1,22 @@ |
||||
xkb_keymap { |
||||
xkb_keycodes "(unnamed)" { |
||||
minimum = 122; |
||||
maximum = 124; |
||||
<VOL-> = 122; |
||||
<VOL+> = 123; |
||||
<POWR> = 124; |
||||
alias <I122> = <VOL->; |
||||
alias <I123> = <VOL+>; |
||||
alias <I124> = <POWR>; |
||||
}; |
||||
xkb_types "(unnamed)" { |
||||
}; |
||||
xkb_compatibility "(unnamed)" { |
||||
}; |
||||
xkb_symbols "(unnamed)" { |
||||
name[group1]="Mobile Convenient Buttons"; |
||||
key <VOL-> { [ XF86AudioLowerVolume ] }; |
||||
key <VOL+> { [ XF86AudioRaiseVolume ] }; |
||||
key <POWR> { [ XF86PowerOff ] }; |
||||
}; |
||||
}; |
@ -0,0 +1,20 @@ |
||||
#!/bin/sh |
||||
|
||||
inputs=" |
||||
1:1:1c21800.lradc |
||||
0:0:axp20x-pek |
||||
" |
||||
|
||||
setup_xkb() { |
||||
for input in $inputs; do |
||||
swaymsg input "$input" xkb_file "$1" |
||||
done |
||||
} |
||||
|
||||
swaymsg -t subscribe -m "['mode']" | while read -r message; do |
||||
if printf %s "$message" | grep -q menu; then |
||||
setup_xkb /usr/share/sxmo/sway/xkb_mobile_movement_buttons |
||||
else |
||||
setup_xkb /usr/share/sxmo/sway/xkb_mobile_normal_buttons |
||||
fi |
||||
done |
Loading…
Reference in new issue