From 4858b9cf289bece9da6ac533a259944fb6f43a84 Mon Sep 17 00:00:00 2001 From: RedBearAK <64876997+RedBearAK@users.noreply.github.com> Date: Thu, 1 Jul 2021 03:04:16 -0800 Subject: [PATCH 1/2] Add Cmd+Shift+Braces for tab navigation in file managers This adds Cmd+Shift+Braces as an option for tab navigation in most Linux file managers. Also fixes the standard tab navigation shortcuts (Ctrl+PgUp/PgDn) to work in SpaceFM. This shortcut works in Finder on macOS. Tested this code in: Caja Dolphin Nautilus Nemo PCManFM[-Qt] SpaceFM (default is Ctrl+Tab/Ctrl+Shift+Tab, now remapping from Ctrl+PgUp/PgDn) Thunar --- linux/kinto.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/linux/kinto.py b/linux/kinto.py index 44ba676..90bce09 100755 --- a/linux/kinto.py +++ b/linux/kinto.py @@ -316,6 +316,10 @@ define_keymap(re.compile("pcmanfm|pcmanfm-qt", re.IGNORECASE),{ # Keybindings overrides for SpaceFM # (overrides some bindings from general file manager code block below) define_keymap(re.compile("spacefm", re.IGNORECASE),{ + K("RC-Page_Up"): K("C-Shift-Tab"), # Go to prior tab + K("RC-Page_Down"): K("C-Tab"), # Go to next tab + K("RC-Shift-Left_Brace"): K("C-Shift-Tab"), # Go to prior tab + K("RC-Shift-Right_Brace"): K("C-Tab"), # Go to next tab K("RC-Shift-N"): [K("RC-F")], # Create new folder is Ctrl+F by default K("RC-Backspace"): [K("Delete"),K("Enter")], # Move to Trash (delete, bypass dialog) K("RC-comma"): [K("M-V"),K("p")], # Overrides "Open preferences dialog" shortcut below @@ -376,6 +380,8 @@ define_keymap(re.compile(filemanagerStr, re.IGNORECASE),{ # K("RC-Down"): K("M-Down"), # Go Down dir (only works on folders) [not universal] # K("RC-Down"): K("RC-O"), # Go Down dir (open folder/file) [not universal] K("RC-Down"): K("Enter"), # Go Down dir (open folder/file) [universal] + K("RC-Shift-Left_Brace"): K("C-Page_Up"), # Go to prior tab + K("RC-Shift-Right_Brace"): K("C-Page_Down"), # Go to next tab ########################################################################################################### ### Open in New Window | Move to Trash | Duplicate file/folder ### ########################################################################################################### From b3fc4c9202ce540e819dcf3cfbf3b3ad6a20cd5c Mon Sep 17 00:00:00 2001 From: RedBearAK <64876997+RedBearAK@users.noreply.github.com> Date: Thu, 1 Jul 2021 03:09:11 -0800 Subject: [PATCH 2/2] Minor formatting fix --- linux/kinto.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/linux/kinto.py b/linux/kinto.py index 90bce09..36d3a31 100755 --- a/linux/kinto.py +++ b/linux/kinto.py @@ -318,8 +318,8 @@ define_keymap(re.compile("pcmanfm|pcmanfm-qt", re.IGNORECASE),{ define_keymap(re.compile("spacefm", re.IGNORECASE),{ K("RC-Page_Up"): K("C-Shift-Tab"), # Go to prior tab K("RC-Page_Down"): K("C-Tab"), # Go to next tab - K("RC-Shift-Left_Brace"): K("C-Shift-Tab"), # Go to prior tab - K("RC-Shift-Right_Brace"): K("C-Tab"), # Go to next tab + K("RC-Shift-Left_Brace"): K("C-Shift-Tab"), # Go to prior tab + K("RC-Shift-Right_Brace"): K("C-Tab"), # Go to next tab K("RC-Shift-N"): [K("RC-F")], # Create new folder is Ctrl+F by default K("RC-Backspace"): [K("Delete"),K("Enter")], # Move to Trash (delete, bypass dialog) K("RC-comma"): [K("M-V"),K("p")], # Overrides "Open preferences dialog" shortcut below