mirror of
https://github.com/rbreaves/kinto.git
synced 2025-08-08 11:58:27 +02:00
- Resolves multi-language support under xkeysnail. Closes #192.
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -2,3 +2,5 @@
|
|||||||
.DS_Store
|
.DS_Store
|
||||||
__pycache__/
|
__pycache__/
|
||||||
xkeysnail/
|
xkeysnail/
|
||||||
|
keybindings_*
|
||||||
|
mutter_*
|
||||||
|
@@ -44,7 +44,7 @@ define_conditional_modmap(re.compile(termStr, re.IGNORECASE), {
|
|||||||
# Key.LEFT_ALT: Key.RIGHT_CTRL, # Chromebook
|
# Key.LEFT_ALT: Key.RIGHT_CTRL, # Chromebook
|
||||||
# # Left Ctrl Stays Left Ctrl
|
# # Left Ctrl Stays Left Ctrl
|
||||||
# Key.LEFT_META: Key.LEFT_ALT, # Chromebook
|
# Key.LEFT_META: Key.LEFT_ALT, # Chromebook
|
||||||
# Key.RIGHT_ALT: Key.RIGHT_CTRL, # Chromebook
|
# Key.RIGHT_ALT: Key.RIGHT_CTRL, # Chromebook - Multi-language (Remove)
|
||||||
# Key.RIGHT_CTRL: Key.RIGHT_ALT, # Chromebook
|
# Key.RIGHT_CTRL: Key.RIGHT_ALT, # Chromebook
|
||||||
# # Right Meta does not exist on chromebooks
|
# # Right Meta does not exist on chromebooks
|
||||||
|
|
||||||
@@ -52,7 +52,7 @@ define_conditional_modmap(re.compile(termStr, re.IGNORECASE), {
|
|||||||
# Key.LEFT_ALT: Key.RIGHT_CTRL, # WinMac
|
# Key.LEFT_ALT: Key.RIGHT_CTRL, # WinMac
|
||||||
# Key.LEFT_META: Key.LEFT_ALT, # WinMac
|
# Key.LEFT_META: Key.LEFT_ALT, # WinMac
|
||||||
# Key.LEFT_CTRL: Key.LEFT_CTRL, # WinMac
|
# Key.LEFT_CTRL: Key.LEFT_CTRL, # WinMac
|
||||||
# Key.RIGHT_ALT: Key.RIGHT_CTRL, # WinMac
|
# Key.RIGHT_ALT: Key.RIGHT_CTRL, # WinMac - Multi-language (Remove)
|
||||||
# Key.RIGHT_META: Key.RIGHT_ALT, # WinMac
|
# Key.RIGHT_META: Key.RIGHT_ALT, # WinMac
|
||||||
# Key.RIGHT_CTRL: Key.LEFT_CTRL, # WinMac
|
# Key.RIGHT_CTRL: Key.LEFT_CTRL, # WinMac
|
||||||
|
|
||||||
|
@@ -149,6 +149,15 @@ if [ $# -eq 0 ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $1 == "1" || $1 == "2" || $1 == "3" || $1 == "4" || $1 == "kintowin" || $1 == "winmac" || $1 == "mac" || $1 == "chromebook" ]]; then
|
if [[ $1 == "1" || $1 == "2" || $1 == "3" || $1 == "4" || $1 == "kintowin" || $1 == "winmac" || $1 == "mac" || $1 == "chromebook" ]]; then
|
||||||
|
rightalt=false
|
||||||
|
while true; do
|
||||||
|
read -rep $'\nDo you want multi-language support (the right Alt key will not remap)? (y/n)\n' yn
|
||||||
|
case $yn in
|
||||||
|
[Yy]* ) rightalt=true; break;;
|
||||||
|
[Nn]* ) break;;
|
||||||
|
# * ) echo "Please answer yes or no.";;
|
||||||
|
esac
|
||||||
|
done
|
||||||
branch=$(git rev-parse --abbrev-ref HEAD)
|
branch=$(git rev-parse --abbrev-ref HEAD)
|
||||||
if [ "$branch" == "dev" ] || [ "$branch" == "alpha" ];then
|
if [ "$branch" == "dev" ] || [ "$branch" == "alpha" ];then
|
||||||
while true; do
|
while true; do
|
||||||
@@ -251,6 +260,11 @@ elif [[ $1 == "4" || $1 == "kintowin" ]]; then
|
|||||||
perl -pi -e "s/(# )(.*)(# KintoWin)/\$2\$3/g" ./xkeysnail-config/kinto.py.new
|
perl -pi -e "s/(# )(.*)(# KintoWin)/\$2\$3/g" ./xkeysnail-config/kinto.py.new
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if "$rightalt"; then
|
||||||
|
echo "Enabling mutli-language support."
|
||||||
|
perl -pi -e "s/(\w.*)(Multi-language)/# \$1\$2/g" ./xkeysnail-config/kinto.py.new
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ $1 == "1" || $1 == "2" || $1 == "3" || $1 == "4" || $1 == "kintowin" || $1 == "winmac" || $1 == "mac" || $1 == "chromebook" ]]; then
|
if [[ $1 == "1" || $1 == "2" || $1 == "3" || $1 == "4" || $1 == "kintowin" || $1 == "winmac" || $1 == "mac" || $1 == "chromebook" ]]; then
|
||||||
mv ./xkeysnail-config/kinto.py.new ~/.config/kinto/kinto.py
|
mv ./xkeysnail-config/kinto.py.new ~/.config/kinto/kinto.py
|
||||||
# if [ "$distro" == "fedora" ];then
|
# if [ "$distro" == "fedora" ];then
|
||||||
|
Reference in New Issue
Block a user