diff --git a/.xkb/symbols/mac_gui b/.xkb/symbols/mac_gui index 2996749..989ae68 100644 --- a/.xkb/symbols/mac_gui +++ b/.xkb/symbols/mac_gui @@ -28,6 +28,11 @@ // RedirectKey(key=,modifiers=NewMod,clearmods=Control+Mod1) // ] // }; +hidden partial modifier_keys +xkb_symbols "swapescape" { + key { [ Escape ] }; + key { [ Caps_Lock ] }; +}; default partial xkb_symbols "mac_levelssym" { // // Minimize window Cmd + H = Alt + F9 // // 2 caveats diff --git a/README.md b/README.md index 4a640d3..8916351 100644 --- a/README.md +++ b/README.md @@ -57,8 +57,39 @@ sudo apt install python3 ./setup.py ``` +To Uninstall Kinto + +``` +./uninstall.sh +``` + +## How to Add Setxkbmap Option inside Kinto + +To summarize you'll need to pull the partial out of the symbols file the option resides in and then add that to the mac_gui file and lastly reference it in the keymap file(s) you want it in. + +symbols directory +``` +/usr/share/X11/xkb/symbols/ +``` + +symbols file +``` +~/.xkb/symbols/mac_gui +``` + +keymap files +``` +~/.xkb/keymap/kbd.mac.gui +~/.xkb/keymap/kbd.mac.term +``` + +A more detailed explaination is here. +https://github.com/rbreaves/kinto/issues/50#issuecomment-595953373 + ## How to Add or Change keymaps for Applications +Note: All of the following is already done in Kinto (but may also change as improvements are made). The following is purely for documentation and example sake as they are real examples of how to leverage the json config to support additional keymaps. + **First it is important to understand how Kinto operates.** 1. It listens for any focus/active window changes diff --git a/setup.py b/setup.py index 89e2525..eb25280 100755 --- a/setup.py +++ b/setup.py @@ -141,21 +141,22 @@ if len(check_x11) == 0: check_xbind = cmdline("which xbindkeys 2>/dev/null").strip() check_xdotool = cmdline("which xdotool 2>/dev/null").strip() +check_ibus = cmdline("which ibus-setup 2>/dev/null").strip() -pkgm = cmdline("which apt 2>/dev/null").strip() +pkgm = cmdline("which apt-get 2>/dev/null").strip() if len(pkgm) == 0: pkgm = cmdline("which dnf 2>/dev/null").strip() if len(pkgm) > 0: - pkgm += " install -y " + pkgm += " check-update;sudo dnf install -y " else: pkgm += " install -y " - pkgm = "apt-get update && sudo " + pkgm + pkgm += " update; sudo apt-get install -y " if len(pkgm) == 0: pkgm = cmdline("which pacman 2>/dev/null").strip() if len(pkgm) > 0: - pkgm += " -S " + pkgm += " -Syy; sudo pacman -S " if len(pkgm) == 0: @@ -166,14 +167,18 @@ if len(pkgm) == 0: runpkg = 0 run_pkg = "" -if len(check_xbind) > 0 and len(check_xdotool) > 0: - print("Xbindkeys, and xdotool requirement is installed.") +if len(check_xbind) > 0 and len(check_xdotool) > 0 and len(check_ibus) > 0: + print("Xbindkeys, xdotool and IBus requirement is installed.") if len(check_xbind) == 0: run_pkg = "xbindkeys" runpkg = 1 if len(check_xdotool) == 0: run_pkg += " xdotool" runpkg = 1 +if len(check_ibus) == 0: + # may differ with distro, but for now + run_pkg += " ibus" + runpkg = 1 if runpkg != 0: requirements(pkgm)