From d642966ba89cd96397a525179fc56a4862d361b4 Mon Sep 17 00:00:00 2001 From: Ben Reaves Date: Tue, 29 Sep 2020 04:06:28 -0500 Subject: [PATCH 01/12] - Fixes copy/paste for cmd/mintty in Win10 --- windows/kinto.ahk | 33 +++++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/windows/kinto.ahk b/windows/kinto.ahk index f8fc3e1..4323359 100644 --- a/windows/kinto.ahk +++ b/windows/kinto.ahk @@ -111,6 +111,9 @@ GroupAdd, ConEmu, ahk_exe ConEmu.exe GroupAdd, ConEmu, ahk_exe ConEmu64.exe GroupAdd, ConEmu, ahk_exe WindowsTerminal.exe +GroupAdd, ExcPaste, ahk_exe Cmd.exe +GroupAdd, ExcPaste, ahk_exe mintty.exe + GroupAdd, editors, ahk_exe sublime_text.exe GroupAdd, editors, ahk_exe VSCodium.exe GroupAdd, editors, ahk_exe Code.exe @@ -446,31 +449,45 @@ GroupAdd, intellij, ahk_exe idea64.exe #IfWinActive ahk_group terminals ; End of Line - #e:: + #e:: ; Default + ; !e:: ; CB/IBM Send {End} return ; Beginning of Line - #a:: + #a:: ; Default + ; !a:: ; CB/IBM Send {Home} return ; Copy ^c:: - SetKeyDelay -1 - Send {Blind}{LShift down}{c DownTemp} + If WinActive("ahk_exe cmd.exe"){ + Send {Enter} + } + else if WinActive("ahk_exe mintty.exe"){ + SetKeyDelay -1 + Send {Blind}{Insert} + } + else{ + SetKeyDelay -1 + Send {Blind}{LShift down}{c DownTemp} + } return ^c up:: - SetKeyDelay -1 - Send {Blind}{c Up}{LShift Up} + If not WinActive("ahk_group cmd.exe"){ + SetKeyDelay -1 + Send {Blind}{c Up}{LShift Up} + } return ; Sigints - interrupt - $#c::Send {Ctrl down}c{Ctrl up} + $#c::Send {Ctrl down}c{Ctrl up} ; Default + ; $!c::Send {Ctrl down}c{Ctrl up} ; CB/IBM ; Paste - ^v:: + $^v:: If WinActive("ahk_exe mintty.exe"){ Send {Shift down}{Insert}{Shift up} } From cd9f3042bd6587a76f9167303e99bc29746b8488 Mon Sep 17 00:00:00 2001 From: Ben Reaves Date: Fri, 2 Oct 2020 04:38:46 -0500 Subject: [PATCH 02/12] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6b4b8ad..3a44823 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# Kinto +# Kinto.sh -![kinto-color-132](https://user-images.githubusercontent.com/10969616/84361571-7d5bd780-ab91-11ea-81bc-4d3a2ca51c4e.png) +![kinto-color-132](https://user-images.githubusercontent.com/10969616/94909511-e3ce7380-0468-11eb-8807-b9b723b75e65.gif) [![GitHub release](https://img.shields.io/github/release/rbreaves/kinto.svg)](https://github.com/rbreaves/kinto/releases/latest) From f4daa290403b693df886f7accd8b8e575e478805 Mon Sep 17 00:00:00 2001 From: Ben Reaves Date: Fri, 2 Oct 2020 04:42:23 -0500 Subject: [PATCH 03/12] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3a44823..0164a54 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Kinto.sh -![kinto-color-132](https://user-images.githubusercontent.com/10969616/94909511-e3ce7380-0468-11eb-8807-b9b723b75e65.gif) +![kinto-color-132](https://user-images.githubusercontent.com/10969616/94909977-9d2d4900-0469-11eb-8710-986289fe7240.gif) [![GitHub release](https://img.shields.io/github/release/rbreaves/kinto.svg)](https://github.com/rbreaves/kinto/releases/latest) From 1bdef2f5197fd20446f06896b9ee5c129c1c36c8 Mon Sep 17 00:00:00 2001 From: Ben Reaves Date: Sat, 3 Oct 2020 23:52:44 -0500 Subject: [PATCH 04/12] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 0164a54..b84b095 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,8 @@ Seamless copy and paste with all apps and terminals. The zero effort solution. +Note: This project does a lot more than just copy & paste for terminals. I really do mean type like a mac and additions can easily be added to a single file, kinto.py/ahk. + ## Table of Contents [What does this do exactly?](#What-does-this-do-exactly) From b87dfdab9c49e0c951e464c02e375edb5bda56c1 Mon Sep 17 00:00:00 2001 From: Ben Reaves Date: Sat, 10 Oct 2020 01:18:52 -0500 Subject: [PATCH 05/12] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index b84b095..f70972f 100644 --- a/README.md +++ b/README.md @@ -61,6 +61,8 @@ Kinto works for standard Windows, Apple and Chromebook keyboards. The following |---|---|---|---|---| |**Virtual**| LCtrl | Alt | RCtrl |Spacebar| +Note: RCtrl for terminals is also adding in Shift most of the time, however it depends on the specific terminal in use and will change itself to the expected keymaps of that terminal application. + ## What's different? Compared to most other remappers ***this is a complete system-wide remap of your base level modifier keys***, this saves time. You're not going to die a death of a thousand papercuts from trying to support every shortcut key under the sun. From 03029e22dc6cbf1d4724416d80077d75dc57f591 Mon Sep 17 00:00:00 2001 From: Ben Reaves Date: Sat, 10 Oct 2020 13:52:04 -0500 Subject: [PATCH 06/12] Update README.md --- README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index f70972f..3ac001f 100644 --- a/README.md +++ b/README.md @@ -290,44 +290,44 @@ git pull origin master Under systemd this is how you control Kinto. -Kinto (xkb/x11) = keyswap +Recommended Installed - Kinto (udev/xkeysnail/x11) = xkeysnail -Kinto (udev/xkeysnail/x11) = xkeysnail +Older Install - Kinto (xkb/x11) = keyswap Status ``` -systemctl --user status keyswap sudo systemctl status xkeysnail +systemctl --user status keyswap # older - you probably should not run this one ``` Stop (your keymap will return to normal) ``` -systemctl --user stop keyswap sudo systemctl stop xkeysnail +systemctl --user stop keyswap # older - you probably should not run this one ``` Start ``` -systemctl --user start keyswap sudo systemctl start xkeysnail +systemctl --user start keyswap # older - you probably should not run this one ``` Restart ``` -systemctl --user restart keyswap sudo systemctl restart xkeysnail +systemctl --user restart keyswap # older - you probably should not run this one ``` Enable ``` -systemctl --user enable keyswap sudo systemctl enable xkeysnail +systemctl --user enable keyswap # older - you probably should not run this one ``` Disable ``` -systemctl --user disable keyswap sudo systemctl disable xkeysnail +systemctl --user disable keyswap # older - you probably should not run this one ``` ## Learning macOS style hotkeys on Linux From 0b849d21e8a06fb4f8c6653e98156fe06ac32efa Mon Sep 17 00:00:00 2001 From: Ben Reaves Date: Sat, 10 Oct 2020 13:53:08 -0500 Subject: [PATCH 07/12] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3ac001f..8c2cc4c 100644 --- a/README.md +++ b/README.md @@ -290,7 +290,7 @@ git pull origin master Under systemd this is how you control Kinto. -Recommended Installed - Kinto (udev/xkeysnail/x11) = xkeysnail +Recommended Install - Kinto (udev/xkeysnail/x11) = xkeysnail Older Install - Kinto (xkb/x11) = keyswap From b72def92ce9e6bca9400f2a7a54d3bda60238838 Mon Sep 17 00:00:00 2001 From: Ben Reaves Date: Sun, 11 Oct 2020 00:49:02 -0500 Subject: [PATCH 08/12] - Reversing App Launcher hotkey from OS to kinto.py --- setup.py | 22 +++++++++++++++------- xkeysnail-config/kinto.py | 20 ++++++++++++-------- xkeysnail_service.sh | 4 ++++ 3 files changed, 31 insertions(+), 15 deletions(-) diff --git a/setup.py b/setup.py index 24f1543..6952486 100755 --- a/setup.py +++ b/setup.py @@ -150,7 +150,8 @@ def setShortcuts(): # Too slow on appearing, compared to the app menu # # if dename != "budgie": - cmdline("gsettings set org.gnome.desktop.wm.keybindings panel-main-menu \"['Space','Space']\"") + cmdline("gsettings reset org.gnome.desktop.wm.keybindings panel-main-menu") + # cmdline("gsettings set org.gnome.desktop.wm.keybindings panel-main-menu \"['Space','Space']\"") # else: # cmdline("gsettings set org.gnome.desktop.wm.keybindings panel-main-menu \"['F1']\"") # cmdline("gsettings set org.gnome.desktop.wm.keybindings panel-run-dialog \"['Space','Space']\"") @@ -163,12 +164,14 @@ def setShortcuts(): cmdline("gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-left ['']") cmdline("gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-right ['']") cmdline("gsettings set org.gnome.desktop.wm.keybindings minimize \"['h','F9']\"") - cmdline("gsettings set org.gnome.desktop.wm.keybindings panel-main-menu \"['Space','Space']\"") + cmdline("gsettings reset org.gnome.desktop.wm.keybindings panel-main-menu") + # cmdline("gsettings set org.gnome.desktop.wm.keybindings panel-main-menu \"['Space','Space']\"") elif distro == "pop!_os" and dename == "gnome": cmdline("gsettings set org.gnome.desktop.wm.keybindings close \"['F4','w']\"") cmdline("gsettings set org.gnome.desktop.wm.keybindings toggle-maximized \"['F10','Up']\"") cmdline("gsettings set org.gnome.desktop.wm.keybindings minimize \"['h','F9']\"") - cmdline("gsettings set org.gnome.desktop.wm.keybindings panel-main-menu \"['Space','Space']\"") + cmdline("gsettings reset org.gnome.desktop.wm.keybindings panel-main-menu") + # cmdline("gsettings set org.gnome.desktop.wm.keybindings panel-main-menu \"['Space','Space']\"") cmdline("gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-up \"['Up','Left']\"") cmdline("gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-down \"['Down','Right']\"") cmdline("gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-left ['']") @@ -182,7 +185,8 @@ def setShortcuts(): cmdline("gsettings set org.gnome.desktop.wm.keybindings switch-applications-backward \"['F14','F14','Tab']\"") cmdline("gsettings set org.gnome.desktop.wm.keybindings show-desktop \"['d','Down']\"") cmdline("gsettings set org.gnome.desktop.wm.keybindings toggle-maximized \"['F10','Up']\"") - cmdline("gsettings set org.gnome.desktop.wm.keybindings panel-main-menu \"['Space','Space']\"") + cmdline("gsettings reset org.gnome.desktop.wm.keybindings panel-main-menu") + # cmdline("gsettings set org.gnome.desktop.wm.keybindings panel-main-menu \"['Space','Space']\"") cmdline("gsettings set org.gnome.desktop.wm.keybindings minimize \"['h','F9']\"") cmdline("gsettings set org.gnome.desktop.wm.keybindings panel-main-menu \"['Space','Space']\"") if(kintotype == 2): @@ -205,8 +209,11 @@ def setShortcuts(): cmdline('xfconf-query --channel xfce4-keyboard-shortcuts --property "/xfwm4/custom/backslash" --create --type string --set "cycle_reverse_windows_key"') # cmdline('xfconf-query --channel xfce4-keyboard-shortcuts --property "/xfwm4/custom/h" --create --type string --set "hide_window_key"') # Don't need to undo other maps for menu - cmdline('xfconf-query --channel xfce4-keyboard-shortcuts --property "/commands/custom/space" --create --type string --set "xfce4-popup-whiskermenu"') - cmdline('xfconf-query --channel xfce4-keyboard-shortcuts --property "/commands/custom/space" --create --type string --set "xfce4-popup-whiskermenu"') + # cmdline('xfconf-query --channel xfce4-keyboard-shortcuts --property "/commands/custom/space" --create --type string --set "xfce4-popup-whiskermenu"') + # cmdline('xfconf-query --channel xfce4-keyboard-shortcuts --property "/commands/custom/space" --create --type string --set "xfce4-popup-whiskermenu"') + cmdline('xfconf-query --reset --channel xfce4-keyboard-shortcuts --property "/commands/custom/space"') + cmdline('xfconf-query --reset --channel xfce4-keyboard-shortcuts --property "/commands/custom/space"') + cmdline('xfconf-query --channel xfce4-keyboard-shortcuts --property "/commands/default/Escape" --create --type string --set "xfce4-popup-whiskermenu"') # Reset move to desktop shortcuts cmdline('xfconf-query --channel xfce4-keyboard-shortcuts --property "/xfwm4/custom/Home" --reset') cmdline('xfconf-query --channel xfce4-keyboard-shortcuts --property "/xfwm4/custom/End" --reset') @@ -229,7 +236,8 @@ def setShortcuts(): cmdline("gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-left ['']") cmdline("gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-right ['']") cmdline("gsettings set org.gnome.desktop.wm.keybindings minimize \"['h','F9']\"") - cmdline("gsettings set org.gnome.desktop.wm.keybindings panel-main-menu \"['Space','Space']\"") + # cmdline("gsettings set org.gnome.desktop.wm.keybindings panel-main-menu \"['Space','Space']\"") + cmdline("gsettings reset org.gnome.desktop.wm.keybindings panel-main-menu") cmdline("gsettings set org.gnome.mutter.keybindings toggle-tiled-right \"['Right']\"") cmdline("gsettings set org.gnome.mutter.keybindings toggle-tiled-left \"['Left']\"") # org.gnome.mutter.keybindings toggle-tiled-right ['Right'] diff --git a/xkeysnail-config/kinto.py b/xkeysnail-config/kinto.py index 4fd35e5..3a54d2f 100644 --- a/xkeysnail-config/kinto.py +++ b/xkeysnail-config/kinto.py @@ -91,8 +91,8 @@ define_keymap(re.compile("jetbrains-idea", re.IGNORECASE),{ K("C-Super-g"): K("C-M-Shift-j"), # Select all occurrences K("Super-Shift-g"): K("M-Shift-j"), # Unselect occurrence # Editing - K("Super-Space"): K("C-Space"), # Basic code completion - K("Super-Shift-Space"): K("C-Shift-Space"), # Smart code completion + K("Super-Space"): K("LC-Space"), # Basic code completion + K("Super-Shift-Space"): K("LC-Shift-Space"),# Smart code completion K("Super-j"): K("C-q"), # Quick documentation lookup K("C-n"): K("M-Insert"), # Generate code... K("Super-o"): K("C-o"), # Override methods @@ -170,6 +170,10 @@ define_keymap(re.compile(browserStr, re.IGNORECASE),{ }) define_keymap(None,{ + # Launch Application Menu + # K("RC-Space"): K("Alt-F1"), # gnome + # K("RC-Space"): K("LC-Escape"), # xfce4 + # # K("RC-Space"): K(""), # kde # Basic App hotkey functions K("RC-Q"): K("Alt-F4"), K("RC-H"): K("Alt-F9"), @@ -213,13 +217,13 @@ define_keymap(None,{ }) define_keymap(lambda wm_class: wm_class.casefold() not in mscodes,{ - K("Super-Space"): K("C-Space"), # Basic code completion + K("Super-Space"): K("LC-Space"), # Basic code completion # Wordwise remaining - for Everything but VS Code - K("M-Left"): K("C-Left"), # Left of Word - K("M-Shift-Left"): K("C-Shift-Left"), # Select Left of Word - K("M-Right"): K("C-Right"), # Right of Word - K("M-Shift-Right"): K("C-Shift-Right"), # Select Right of Word - K("M-Shift-g"): K("C-Shift-g"), # View source control + K("M-Left"): K("C-Left"), # Left of Word + K("M-Shift-Left"): K("C-Shift-Left"), # Select Left of Word + K("M-Right"): K("C-Right"), # Right of Word + K("M-Shift-Right"): K("C-Shift-Right"), # Select Right of Word + K("M-Shift-g"): K("C-Shift-g"), # View source control # ** VS Code fix ** # Electron issue precludes normal keybinding fix. # Alt menu auto-focus/toggle gets in the way. diff --git a/xkeysnail_service.sh b/xkeysnail_service.sh index bbe8ce9..0e9e320 100755 --- a/xkeysnail_service.sh +++ b/xkeysnail_service.sh @@ -269,6 +269,10 @@ if [[ $1 == "1" || $1 == "2" || $1 == "3" || $1 == "winmac" || $1 == "mac" || $1 fi fi +if [[ $dename == "gnome" || dename == "budgie" ]]; then + perl -pi -e "s/(# )(.*)(# gnome)/\$2\$3/g" ./xkeysnail-config/kinto.py.new +fi + if [[ $1 == "1" || $1 == "winmac" ]]; then if ls /sys/module | grep hid_apple >/dev/null 2>&1 ; then 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 From 5f9a6f7a3136952681443792cf38640be684f686 Mon Sep 17 00:00:00 2001 From: Ben Reaves Date: Sun, 11 Oct 2020 14:02:54 -0500 Subject: [PATCH 09/12] - Fixed uninstaller for xfce & kde on restoring original shortcut keys --- xkeysnail_service.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xkeysnail_service.sh b/xkeysnail_service.sh index 0e9e320..8d68688 100755 --- a/xkeysnail_service.sh +++ b/xkeysnail_service.sh @@ -60,13 +60,13 @@ function uninstall { fi elif [ "$dename" == "kde" ]; then echo "Restoring DE hotkeys..." - kwinkeys = $(ls | grep -m1 "kwinrc") - kdekeys = $(ls | grep -m1 "kglobalshortcutsrc") + kwinkeys=$(ls | grep -m1 "kwinrc") + kdekeys=$(ls | grep -m1 "kglobalshortcutsrc") cp ./"$kdekeys" ~/.config/kglobalshortcutsrc cp ./"$kwinkeys" ~/.config/kwinrc elif [ "$dename" == "xfce" ]; then echo "Restoring DE hotkeys..." - xfcekeys = $(ls | grep -m1 "xfce4-keyboard") + xfcekeys=$(ls | grep -m1 "xfce4-keyboard") cp ./"$xfcekeys" ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml fi fi From 58a2ac4f35be1237988f7af4635d370d33bb0a46 Mon Sep 17 00:00:00 2001 From: Ben Reaves Date: Sun, 11 Oct 2020 17:39:49 -0500 Subject: [PATCH 10/12] - Added Cmd-Space support for EnsoOS --- xkeysnail-config/kinto.py | 2 +- xkeysnail_service.sh | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/xkeysnail-config/kinto.py b/xkeysnail-config/kinto.py index 3a54d2f..1fb3f6d 100644 --- a/xkeysnail-config/kinto.py +++ b/xkeysnail-config/kinto.py @@ -172,7 +172,7 @@ define_keymap(re.compile(browserStr, re.IGNORECASE),{ define_keymap(None,{ # Launch Application Menu # K("RC-Space"): K("Alt-F1"), # gnome - # K("RC-Space"): K("LC-Escape"), # xfce4 + # K("RC-Space"): K("LC-Esc"), # xfce4 # # K("RC-Space"): K(""), # kde # Basic App hotkey functions K("RC-Q"): K("Alt-F4"), diff --git a/xkeysnail_service.sh b/xkeysnail_service.sh index 8d68688..f2ebca1 100755 --- a/xkeysnail_service.sh +++ b/xkeysnail_service.sh @@ -300,6 +300,11 @@ elif [[ $1 == "3" || $1 == "chromebook" ]]; then perl -pi -e "s/(# )(.*)(# xfce4)/\$2\$3/g" ./xkeysnail-config/kinto.py.new perl -pi -e "s/(\w.*)(# Default)/# \$1\$2/g" ./xkeysnail-config/kinto.py.new fi +if [[ $dename == "xfce" ]] && ls /etc/apt/sources.list.d/enso* 1> /dev/null 2>&1; then + echo "enso OS detected, applying Cmd-Space for Launchy..." + perl -pi -e "s/(K\(\"RC-Space)(.*)(# )(xfce4)/\$3\$1\$2\$3\$4/g" ./xkeysnail-config/kinto.py.new + xfconf-query --channel xfce4-keyboard-shortcuts --property "/commands/custom/space" --create --type string --set "launchy" +fi if $rightalt ; then perl -pi -e "s/(\w.*)(Multi-language)/# \$1\$2/g" ./xkeysnail-config/kinto.py.new >/dev/null 2>&1 From 0c1b83ecb7f944b5bfa22a7648539a51b9498bb3 Mon Sep 17 00:00:00 2001 From: Ben Reaves Date: Sun, 11 Oct 2020 18:05:09 -0500 Subject: [PATCH 11/12] - Added Cmd-Space fix for KDE and silenced output --- xkeysnail-config/kinto.py | 3 +-- xkeysnail_service.sh | 8 ++++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/xkeysnail-config/kinto.py b/xkeysnail-config/kinto.py index 1fb3f6d..28786ee 100644 --- a/xkeysnail-config/kinto.py +++ b/xkeysnail-config/kinto.py @@ -171,9 +171,8 @@ define_keymap(re.compile(browserStr, re.IGNORECASE),{ define_keymap(None,{ # Launch Application Menu - # K("RC-Space"): K("Alt-F1"), # gnome + # K("RC-Space"): K("Alt-F1"), # gnome/kde # K("RC-Space"): K("LC-Esc"), # xfce4 - # # K("RC-Space"): K(""), # kde # Basic App hotkey functions K("RC-Q"): K("Alt-F4"), K("RC-H"): K("Alt-F9"), diff --git a/xkeysnail_service.sh b/xkeysnail_service.sh index f2ebca1..702c90e 100755 --- a/xkeysnail_service.sh +++ b/xkeysnail_service.sh @@ -270,7 +270,11 @@ if [[ $1 == "1" || $1 == "2" || $1 == "3" || $1 == "winmac" || $1 == "mac" || $1 fi if [[ $dename == "gnome" || dename == "budgie" ]]; then - perl -pi -e "s/(# )(.*)(# gnome)/\$2\$3/g" ./xkeysnail-config/kinto.py.new + perl -pi -e "s/(# )(.*)(# gnome)/\$2\$3/g" ./xkeysnail-config/kinto.py.new >/dev/null 2>&1 +fi +if [[ $dename == "kde" ]]; then + echo "Applying Cmd-Space to open App Launcher for KDE..." + perl -pi -e "s/(# )(.*)(#.*kde)/\$2\$3/g" ./xkeysnail-config/kinto.py.new >/dev/null 2>&1 fi if [[ $1 == "1" || $1 == "winmac" ]]; then @@ -302,7 +306,7 @@ elif [[ $1 == "3" || $1 == "chromebook" ]]; then fi if [[ $dename == "xfce" ]] && ls /etc/apt/sources.list.d/enso* 1> /dev/null 2>&1; then echo "enso OS detected, applying Cmd-Space for Launchy..." - perl -pi -e "s/(K\(\"RC-Space)(.*)(# )(xfce4)/\$3\$1\$2\$3\$4/g" ./xkeysnail-config/kinto.py.new + perl -pi -e "s/(K\(\"RC-Space)(.*)(# )(xfce4)/\$3\$1\$2\$3\$4/g" ./xkeysnail-config/kinto.py.new >/dev/null 2>&1 xfconf-query --channel xfce4-keyboard-shortcuts --property "/commands/custom/space" --create --type string --set "launchy" fi From 29a77f74ded2ad27ef2f2a76c1609ffc1c737566 Mon Sep 17 00:00:00 2001 From: Ben Reaves Date: Sun, 11 Oct 2020 18:16:02 -0500 Subject: [PATCH 12/12] - Moved basic code completion to VS Code for Linux to proper location --- xkeysnail-config/kinto.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/xkeysnail-config/kinto.py b/xkeysnail-config/kinto.py index 28786ee..190d4c0 100644 --- a/xkeysnail-config/kinto.py +++ b/xkeysnail-config/kinto.py @@ -216,13 +216,12 @@ define_keymap(None,{ }) define_keymap(lambda wm_class: wm_class.casefold() not in mscodes,{ - K("Super-Space"): K("LC-Space"), # Basic code completion # Wordwise remaining - for Everything but VS Code - K("M-Left"): K("C-Left"), # Left of Word - K("M-Shift-Left"): K("C-Shift-Left"), # Select Left of Word - K("M-Right"): K("C-Right"), # Right of Word - K("M-Shift-Right"): K("C-Shift-Right"), # Select Right of Word - K("M-Shift-g"): K("C-Shift-g"), # View source control + K("M-Left"): K("C-Left"), # Left of Word + K("M-Shift-Left"): K("C-Shift-Left"), # Select Left of Word + K("M-Right"): K("C-Right"), # Right of Word + K("M-Shift-Right"): K("C-Shift-Right"), # Select Right of Word + K("M-Shift-g"): K("C-Shift-g"), # View source control # ** VS Code fix ** # Electron issue precludes normal keybinding fix. # Alt menu auto-focus/toggle gets in the way. @@ -241,6 +240,7 @@ define_keymap(lambda wm_class: wm_class.casefold() not in mscodes,{ # Keybindings for VS Code define_keymap(re.compile(codeStr, re.IGNORECASE),{ + K("Super-Space"): K("LC-Space"), # Basic code completion # Wordwise remaining - for VS Code # Alt-F19 hack fixes Alt menu activation K("M-Left"): [K("M-F19"),K("C-Left")], # Left of Word