Compare commits

...

20 Commits
1.1-8 ... 1.1-9

Author SHA1 Message Date
Ben Reaves
1e46a4dc74 Merge pull request #237 from RedBearAK/patch-1
Update xkeysnail_service.sh

Looks good, thanks!
2020-07-08 11:39:16 -05:00
RedBearAK
7aeb3dc44c Update xkeysnail_service.sh
Add command to create ~/.config/autostart in case it doesn’t exist.
2020-07-07 23:27:00 -08:00
Ben Reaves
6968e08f2f Update README.md 2020-07-07 19:49:36 -05:00
Ben Reaves
40ea2b6175 Update README.md 2020-07-07 17:37:12 -05:00
Ben Reaves
367d55b04b Merge pull request #235 from rbreaves/dev
- Fixed alt/cmd swap append issue & added proper close all for browsers
2020-07-07 17:02:49 -05:00
Ben Reaves
2864ae409a - Added proper quit hotkey for browsers, except edge (windows). Closes
#232
2020-07-07 16:54:43 -05:00
Ben Reaves
e477848b59 - Removes appending argument from alt/cmd swap on official apple keyboards. Closes #233 2020-07-07 16:15:32 -05:00
Ben Reaves
26dacc7984 Merge pull request #234 from thebitstick/patch-1
Electron Apps have their own names unfortunately
2020-07-06 23:53:23 -05:00
TheBitStick
a3d8ac782a Electron Apps have their own names unfortunately
#232
2020-07-06 23:23:30 -05:00
Ben Reaves
acd0b8031e - Added proper quit hotkey for browsers (linux) 2020-07-06 20:20:16 -05:00
Ben Reaves
9543eba753 Merge pull request #231 from rbreaves/dev
- Multi-language on Right Alt key was incompleted. Closes #192
2020-07-04 17:54:16 -05:00
Ben Reaves
738aee9465 - Multi-language on Right Alt key was incompleted. Closes #192 2020-07-04 17:52:48 -05:00
Ben Reaves
dc826b8454 Merge pull request #230 from rbreaves/dev
- Added copy/paste/sigint for mintty (Windows)
2020-07-03 23:16:41 -05:00
Ben Reaves
8bd6ed242f - Added copy/paste/sigint for mintty (Windows) 2020-07-03 23:15:51 -05:00
Ben Reaves
d96e238550 Merge pull request #226 from rbreaves/dev
- Fuller description of the install type options
2020-07-01 16:04:51 -05:00
Ben Reaves
e1948dcb08 - Fuller description of the install type options 2020-07-01 16:03:34 -05:00
Ben Reaves
7e0680ff75 Update README.md 2020-06-28 12:28:37 -05:00
Ben Reaves
a46bb911c9 Update README.md 2020-06-21 19:42:50 -05:00
Ben Reaves
f4cad2a1e3 Update README.md 2020-06-21 19:37:24 -05:00
Ben Reaves
ba10ff6ced Update README.md 2020-06-20 02:21:52 -05:00
4 changed files with 76 additions and 30 deletions

View File

@@ -21,9 +21,7 @@ Seamless copy and paste with all apps and terminals. The zero effort solution.
[How to install (Windows)](#How-to-install-Windows) [How to install (Windows)](#How-to-install-Windows)
[Shortcut Creation (Xkeysnail)](#Shortcut-Creation-Xkeysnail) [Shortcut Creation](#Shortcut-Creation)
[Shortcut Creation (Autohotkey)](#Shortcut-Creation-Autohotkey)
[Other Notes Related to Install](#Other-Notes-Related-to-Install) [Other Notes Related to Install](#Other-Notes-Related-to-Install)
@@ -100,8 +98,6 @@ Other programs that will be installed when you run ./setup.py
Note: Sublime Text users should disable screen rotation hotkeys as they will interfere with multi-cursor and possibly other combos. See https://windowsloop.com/disable-screen-rotation-keyboard-shortcut/ for details. Note: Sublime Text users should disable screen rotation hotkeys as they will interfere with multi-cursor and possibly other combos. See https://windowsloop.com/disable-screen-rotation-keyboard-shortcut/ for details.
Does not have complete parity with the Linux edition, but it is getting very close now. Only lacks some Sublime Text 3 remaps at this point.
Users can now hotswap between Apple and Windows based keyboards without having to logoff and back on, and Windows is currently the only implementation with a system tray (but this feature is coming to Budgie, XFCE, Mate, Gnome, and lastly KDE). Users can now hotswap between Apple and Windows based keyboards without having to logoff and back on, and Windows is currently the only implementation with a system tray (but this feature is coming to Budgie, XFCE, Mate, Gnome, and lastly KDE).
<img src="https://user-images.githubusercontent.com/10969616/84471498-100c7d00-ac4b-11ea-972d-60c1907831ec.png" width="50%"> <img src="https://user-images.githubusercontent.com/10969616/84471498-100c7d00-ac4b-11ea-972d-60c1907831ec.png" width="50%">
@@ -113,6 +109,7 @@ Users can now hotswap between Apple and Windows based keyboards without having t
1. clone this repo 1. clone this repo
``` ```
git clone https://github.com/rbreaves/kinto.git git clone https://github.com/rbreaves/kinto.git
cd kinto
``` ```
2. Install python3 (If needed) 2. Install python3 (If needed)
@@ -160,8 +157,16 @@ To Uninstall Kinto - Select Uninstall
``` ```
py setup.py py setup.py
``` ```
## Shortcut Creation
## Shortcut Creation (Xkeysnail) Note: A new project, [Universal Keys](https://github.com/rbreaves/Universal-Keys), has been created that will be updated to contain all current remaps - plus many more. Once that is done, Kinto will be updated to programmatically pull the latest keymaps from simple csv comma delimited files & will build out key remaps from there. This will also allow for more types of remaps within an application category, Sublime Text 3 to VS Code or VS Code to Sublime Text 3, Photoshop to Gimp, Gimp to Photoshop, etc & it will ensure that xkeysnail (linux) & autohotkey (windows) are pulling from the same data set.
[Linux Shortcut Creation (Xkeysnail)](#Linux-Xkeysnail)
[Windows Shortcut Creation (Autohotkey)](#Windows-Autohotkey)
## Linux (Xkeysnail)
**GUI Keys** **GUI Keys**
| Value| Description|Mac/Kinto Equivalent| | Value| Description|Mac/Kinto Equivalent|
@@ -199,7 +204,7 @@ sudo systemctl restart xkeysnail
More information can be seen on the readme page of [xkeysnail](https://github.com/mooz/xkeysnail). More information can be seen on the readme page of [xkeysnail](https://github.com/mooz/xkeysnail).
## Shortcut Creation (Autohotkey) ## Windows (Autohotkey)
This applies to the Windows version of Kinto and how to add additional support for Applications. The configuration file location is `~/.kinto/kinto.ahk` and after updating it you will want to right click on the tray icon and click on setting your keyboard type again and it will re-apply the latest changes. This applies to the Windows version of Kinto and how to add additional support for Applications. The configuration file location is `~/.kinto/kinto.ahk` and after updating it you will want to right click on the tray icon and click on setting your keyboard type again and it will re-apply the latest changes.
@@ -237,7 +242,7 @@ With this being Autohotkey you can easily pull knowledge from the Autohotkey for
#If #If
``` ```
I don't have too many examples on this one have only ran into a single UWP app, and most developers seem to be shying away from it. Kinto currently support "Fluent Terminal" which is a UWP app, but it is also being grouped together with other Terminal apps for hotkey remapping. You may take a look at that, but you may also create a new Autohotkey file and use the Window Spy feature built into Autohotkey to help you discover the full name and class names of any application. I don't have too many examples on this one, most developers seem to be shying away from UWP. Kinto currently supports "Fluent Terminal" which is a UWP app, but it is also being grouped with other Terminal apps for hotkey remapping. You may take a look at that, but you may also want to try creating a new Autohotkey file and use the Window Spy feature built into Autohotkey to help you discover the full name and class names of any application.
## Shortcut Creation (XKB) ## Shortcut Creation (XKB)
The older xkb shortcut method info can be read about in ticket [#125](https://github.com/rbreaves/kinto/issues/125). The older xkb shortcut method info can be read about in ticket [#125](https://github.com/rbreaves/kinto/issues/125).
@@ -330,6 +335,21 @@ systemctl --user stop keyswap && setxkbmap -option;setxkbmap -option altwin:swap
## Troubleshooting ## Troubleshooting
### Installed successfully, but modifier keys are not properly remapped?
Are you using a VM on macOS? If so you may need to disable automatic remapping of the Cmd key when using Vmware Fusion of Parallels.
Disable Parallels Re-mapping:
1) Open Parallels and go to Preferences.
2) Click Keyboard and disable the Virtual machine shortcuts.
3) Close Preferences.
To disable keyboard mapping:
1) From Fusion's menu bar, click VMware Fusion > Preferences...
2) Click Keyboard & Mouse.
3) Click the Key Mappings tab.
4) Deselect Enable Key Mapping.
### Does not start when you log in or after you reboot? ### Does not start when you log in or after you reboot?
Kinto (xkb/x11) = keyswap Kinto (xkb/x11) = keyswap

View File

@@ -75,6 +75,7 @@ GroupAdd, terminals, ahk_exe ConEmu64.exe
GroupAdd, terminals, ahk_exe powershell.exe GroupAdd, terminals, ahk_exe powershell.exe
GroupAdd, terminals, ahk_exe WindowsTerminal.exe GroupAdd, terminals, ahk_exe WindowsTerminal.exe
GroupAdd, terminals, ahk_exe Hyper.exe GroupAdd, terminals, ahk_exe Hyper.exe
GroupAdd, terminals, ahk_exe mintty.exe
GroupAdd, terminals, ahk_exe Cmd.exe GroupAdd, terminals, ahk_exe Cmd.exe
GroupAdd, terminals, ahk_exe Terminus.exe GroupAdd, terminals, ahk_exe Terminus.exe
GroupAdd, terminals, Fluent Terminal ahk_class ApplicationFrameWindow GroupAdd, terminals, Fluent Terminal ahk_class ApplicationFrameWindow
@@ -95,6 +96,12 @@ GroupAdd, editors, ahk_exe sublime_text.exe
GroupAdd, editors, ahk_exe VSCodium.exe GroupAdd, editors, ahk_exe VSCodium.exe
GroupAdd, editors, ahk_exe Code.exe GroupAdd, editors, ahk_exe Code.exe
GroupAdd, browsers, ahk_exe chrome.exe
GroupAdd, browsers, ahk_exe opera.exe
GroupAdd, browsers, ahk_exe firefox.exe
; Disabled Edge for now - no ability to close all instances
; GroupAdd, browsers, Microsoft Edge ahk_class ApplicationFrameWindow
GroupAdd, vscode, ahk_exe VSCodium.exe GroupAdd, vscode, ahk_exe VSCodium.exe
GroupAdd, vscode, ahk_exe Code.exe GroupAdd, vscode, ahk_exe Code.exe
@@ -201,6 +208,11 @@ $^+Right::Send +{End}
; Cmd+Space Alternative ; Cmd+Space Alternative
^Space::Send ^{Esc} ^Space::Send ^{Esc}
; Close all browsers
#IfWinActive ahk_group browsers
^q::send {Alt Down}f{Alt Up}x ; exit all windows
#If
; Sublime Text Remaps for VS Code ; Sublime Text Remaps for VS Code
#IfWinActive ahk_group vscode #IfWinActive ahk_group vscode
; Remap Ctrl+Shift to behave like macOS Sublimetext ; Remap Ctrl+Shift to behave like macOS Sublimetext
@@ -286,7 +298,10 @@ $^+Right::Send +{End}
; Paste ; Paste
^v:: ^v::
If WinActive("ahk_group posix"){ If WinActive("ahk_exe mintty.exe"){
Send {Shift down}{Insert}{Shift up}
}
else if WinActive("ahk_group posix"){
Send {Blind}{Shift down}v{Shift up} Send {Blind}{Shift down}v{Shift up}
} }
else{ else{

View File

@@ -10,6 +10,11 @@ terminals = ["gnome-terminal","konsole","io.elementary.terminal","terminator","s
terminals = [term.casefold() for term in terminals] terminals = [term.casefold() for term in terminals]
termStr = "|".join(str(x) for x in terminals) termStr = "|".join(str(x) for x in terminals)
# Use for browser specific hotkeys
browsers = ["Chromium","Chromium-browser","Google-chrome","Epiphany","Firefox","Discord"]
browsers = [browser.casefold() for browser in browsers]
browserStr = "|".join(str(x) for x in browsers)
mscodes = ["code","vscodium"] mscodes = ["code","vscodium"]
codeStr = "|".join(str(x) for x in mscodes) codeStr = "|".join(str(x) for x in mscodes)
@@ -18,22 +23,22 @@ define_conditional_modmap(lambda wm_class: wm_class.casefold() not in terminals,
# # Chromebook # # Chromebook
# Key.LEFT_ALT: Key.RIGHT_CTRL, # Chromebook # Key.LEFT_ALT: Key.RIGHT_CTRL, # Chromebook
# Key.LEFT_CTRL: Key.LEFT_ALT, # Chromebook # Key.LEFT_CTRL: 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 - Multi-language (Remove)
# # Default Mac/Win # # Default Mac/Win
# 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_META, # WinMac # Key.LEFT_CTRL: Key.LEFT_META, # 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 - Multi-language (Remove)
# Key.RIGHT_CTRL: Key.RIGHT_META, # WinMac # Key.RIGHT_CTRL: Key.RIGHT_META, # WinMac - Multi-language (Remove)
# # Mac Only # # Mac Only
# Key.LEFT_META: Key.RIGHT_CTRL, # Mac # Key.LEFT_META: Key.RIGHT_CTRL, # Mac
# Key.LEFT_CTRL: Key.LEFT_META, # Mac # Key.LEFT_CTRL: Key.LEFT_META, # Mac
# Key.RIGHT_META: Key.RIGHT_CTRL, # Mac # Key.RIGHT_META: Key.RIGHT_CTRL, # Mac - Multi-language (Remove)
# Key.RIGHT_CTRL: Key.RIGHT_META, # Mac # Key.RIGHT_CTRL: Key.RIGHT_META, # Mac - Multi-language (Remove)
}) })
# [Conditional modmap] Change modifier keys in certain applications # [Conditional modmap] Change modifier keys in certain applications
@@ -51,14 +56,14 @@ define_conditional_modmap(re.compile(termStr, re.IGNORECASE), {
# 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 - Multi-language (Remove) # Key.RIGHT_ALT: Key.RIGHT_CTRL, # WinMac - Multi-language (Remove)
# Key.RIGHT_META: Key.RIGHT_ALT, # WinMac # Key.RIGHT_META: Key.RIGHT_ALT, # WinMac - Multi-language (Remove)
# Key.RIGHT_CTRL: Key.LEFT_CTRL, # WinMac # Key.RIGHT_CTRL: Key.LEFT_CTRL, # WinMac - Multi-language (Remove)
# # Mac Only # # Mac Only
# Key.LEFT_META: Key.RIGHT_CTRL, # Mac # Key.LEFT_META: Key.RIGHT_CTRL, # Mac
# # Left Ctrl Stays Left Ctrl # # Left Ctrl Stays Left Ctrl
# Key.RIGHT_META: Key.RIGHT_CTRL, # Mac # Key.RIGHT_META: Key.RIGHT_CTRL, # Mac - Multi-language (Remove)
# Key.RIGHT_CTRL: Key.LEFT_CTRL, # Mac # Key.RIGHT_CTRL: Key.LEFT_CTRL, # Mac - Multi-language (Remove)
}) })
# Keybindings for Nautilus # Keybindings for Nautilus
@@ -69,6 +74,11 @@ define_keymap(re.compile("org.gnome.nautilus", re.IGNORECASE),{
K("RC-Right"): K("M-Right"), # Go Forward K("RC-Right"): K("M-Right"), # Go Forward
}) })
# Keybindings for Browsers
define_keymap(re.compile(browserStr, re.IGNORECASE),{
K("RC-Q"): K("RC-Q"), # Close all browsers Instances
})
define_keymap(None,{ define_keymap(None,{
# Basic App hotkey functions # Basic App hotkey functions
K("RC-Q"): K("Alt-F4"), K("RC-Q"): K("Alt-F4"),

View File

@@ -75,13 +75,13 @@ function uninstall {
function removeAppleKB { function removeAppleKB {
# Undo Apple keyboard cmd & alt swap # Undo Apple keyboard cmd & alt swap
if test -f "/sys/module/hid_apple/parameters/swap_opt_cmd" && [ `cat /sys/module/hid_apple/parameters/swap_opt_cmd` == "1" ]; then if test -f "/sys/module/hid_apple/parameters/swap_opt_cmd" && [ `cat /sys/module/hid_apple/parameters/swap_opt_cmd` == "1" ]; then
echo '0' | sudo tee -a /sys/module/hid_apple/parameters/swap_opt_cmd echo '0' | sudo tee /sys/module/hid_apple/parameters/swap_opt_cmd
echo 'options hid_apple swap_opt_cmd=0' | sudo tee -a /etc/modprobe.d/hid_apple.conf echo 'options hid_apple swap_opt_cmd=0' | sudo tee /etc/modprobe.d/hid_apple.conf
sudo update-initramfs -u -k all sudo update-initramfs -u -k all
fi fi
if test -f "/sys/module/applespi/parameters/swap_opt_cmd" && [ `cat /sys/module/applespi/parameters/swap_opt_cmd` == "1" ]; then if test -f "/sys/module/applespi/parameters/swap_opt_cmd" && [ `cat /sys/module/applespi/parameters/swap_opt_cmd` == "1" ]; then
echo '0' | sudo tee -a /sys/module/applespi/parameters/swap_opt_cmd echo '0' | sudo tee /sys/module/applespi/parameters/swap_opt_cmd
echo 'options applespi swap_opt_cmd=0' | sudo tee -a /etc/modprobe.d/applespi.conf echo 'options applespi swap_opt_cmd=0' | sudo tee /etc/modprobe.d/applespi.conf
sudo update-initramfs -u -k all sudo update-initramfs -u -k all
fi fi
} }
@@ -151,9 +151,9 @@ function budgieUpdate {
if [ $# -eq 0 ]; then if [ $# -eq 0 ]; then
echo "Install Kinto - xkeysnail (udev)" echo "Install Kinto - xkeysnail (udev)"
echo " 1) Windows & Mac (HID driver)" echo " 1) Windows & Mac (HID driver) - Most Standard keyboards (& 1st party usb/bt Apple keyboards)"
echo " 2) Mac Only & VMs on Macbooks" echo " 2) Mac Only & VMs on Macbooks - 3rd & 1st party Apple keyboards"
echo " 3) Chromebook" echo " 3) Chromebook - Chromebook running Linux"
# echo " 5) Uninstall" # echo " 5) Uninstall"
read n read n
@@ -168,7 +168,7 @@ vssublime=false
if [[ $1 == "1" || $1 == "2" || $1 == "3" || $1 == "winmac" || $1 == "mac" || $1 == "chromebook" ]]; then if [[ $1 == "1" || $1 == "2" || $1 == "3" || $1 == "winmac" || $1 == "mac" || $1 == "chromebook" ]]; then
while true; do while true; do
read -rep $'\nDo you want multi-language support (the right Alt key will not remap)? (y/N)\n' yn read -rep $'\nDo you want multi-language on Right Alt key? (y/N)\naka Left side remaps, right side doesn\'t\n' yn
case $yn in case $yn in
[Yy]* ) rightalt=true; break;; [Yy]* ) rightalt=true; break;;
* ) break;; * ) break;;
@@ -234,6 +234,7 @@ if [[ $1 == "1" || $1 == "2" || $1 == "3" || $1 == "winmac" || $1 == "mac" || $1
chmod +x ~/.kde/Autostart/kintohost.sh chmod +x ~/.kde/Autostart/kintohost.sh
# KDE startup - xhost fix # KDE startup - xhost fix
mkdir -p ~/.config/autostart
yes | cp -rf ./xkeysnail-config/xkeysnail.desktop ~/.config/autostart/xkeysnail.desktop yes | cp -rf ./xkeysnail-config/xkeysnail.desktop ~/.config/autostart/xkeysnail.desktop
yes | cp -rf ./xkeysnail-config/xkeystart.sh ~/.config/kinto/xkeystart.sh yes | cp -rf ./xkeysnail-config/xkeystart.sh ~/.config/kinto/xkeystart.sh
@@ -270,10 +271,10 @@ fi
if [[ $1 == "1" || $1 == "winmac" ]]; then if [[ $1 == "1" || $1 == "winmac" ]]; then
if ls /sys/module | grep hid_apple >/dev/null 2>&1 ; then if ls /sys/module | grep hid_apple >/dev/null 2>&1 ; then
echo '1' | sudo tee -a /sys/module/hid_apple/parameters/swap_opt_cmd;echo 'options hid_apple swap_opt_cmd=1' | sudo tee -a /etc/modprobe.d/hid_apple.conf;sudo update-initramfs -u -k all echo '1' | sudo tee /sys/module/hid_apple/parameters/swap_opt_cmd;echo 'options hid_apple swap_opt_cmd=1' | sudo tee /etc/modprobe.d/hid_apple.conf;sudo update-initramfs -u -k all
fi fi
if ls /sys/module | grep applespi >/dev/null 2>&1 ; then if ls /sys/module | grep applespi >/dev/null 2>&1 ; then
echo '1' | sudo tee -a /sys/module/applespi/parameters/swap_opt_cmd;echo 'options applespi swap_opt_cmd=1' | sudo tee -a /etc/modprobe.d/applespi.conf;sudo update-initramfs -u -k all echo '1' | sudo tee /sys/module/applespi/parameters/swap_opt_cmd;echo 'options applespi swap_opt_cmd=1' | sudo tee /etc/modprobe.d/applespi.conf;sudo update-initramfs -u -k all
fi fi
if ! ls /sys/module | grep apple ; then if ! ls /sys/module | grep apple ; then
removeAppleKB removeAppleKB