From 75ac498c9dbc3dec790bd765daacac7de8d1b0cf Mon Sep 17 00:00:00 2001 From: Ben Reaves Date: Tue, 8 Dec 2020 12:36:13 -0600 Subject: [PATCH 1/4] - Added Browser preferences hotkey Cmd+, #348 --- windows/kinto.ahk | 13 +++++++++++++ xkeysnail-config/kinto.py | 17 +++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/windows/kinto.ahk b/windows/kinto.ahk index 689d721..d9a150b 100644 --- a/windows/kinto.ahk +++ b/windows/kinto.ahk @@ -447,6 +447,19 @@ GroupAdd, intellij, ahk_exe idea64.exe ; Dev Tools #^i::send {Ctrl Down}{Shift Down}i{Shift Up}{Ctrl Up} #^j::send {Ctrl Down}{Shift Down}j{Shift Up}{Ctrl Up} + ; Open preferences + #IfWinActive ahk_exe firefox.exe + ^,::send {Alt Down}{Shift Down}t{Shift Up}{Alt Up}o{Enter} + #If + #IfWinActive ahk_exe chrome.exe + ^,::send {Alt Down}e{Alt Up}s{Enter} + #If + #IfWinActive ahk_exe msedge.exe + ^,::send {Alt Down}e{Alt Up}s{Enter} + #If + #IfWinActive ahk_exe opera.exe + ^,::send {Ctrl Down}{F12}{Ctrl Up} + #If #If ; Sublime Text Remaps for VS Code diff --git a/xkeysnail-config/kinto.py b/xkeysnail-config/kinto.py index 29456fd..25b9c92 100644 --- a/xkeysnail-config/kinto.py +++ b/xkeysnail-config/kinto.py @@ -16,6 +16,14 @@ browsers = ["Chromium","Chromium-browser","Google-chrome","microsoft-edge-dev"," browsers = [browser.casefold() for browser in browsers] browserStr = "|".join(str(x) for x in browsers) +chromes = ["Chromium","Chromium-browser","Google-chrome","microsoft-edge-dev","microsoft-edge"] +chromes = [chrome.casefold() for chrome in chromes] +chromeStr = "|".join(str(x) for x in chromes) + +# edges = ["microsoft-edge-dev","microsoft-edge"] +# edges = [edge.casefold() for edge in edges] +# edgeStr = "|".join(str(x) for x in edges) + mscodes = ["code","vscodium"] codeStr = "|".join(str(x) for x in mscodes) @@ -203,6 +211,15 @@ define_keymap(re.compile(browserStr, re.IGNORECASE),{ K("Super-RC-J"): K("RC-Shift-J"), # Dev tools }) +# Open preferences in browsers +define_keymap(re.compile("Firefox", re.IGNORECASE),{ + K("C-comma"): [K("M-t"), K("o"),K("Enter")], +}) +define_keymap(re.compile(chromeStr, re.IGNORECASE),{ + K("C-comma"): [K("M-e"), K("s"),K("Enter")], +}) +# Opera C-F12 + define_keymap(None,{ K("RC-Space"): K("Alt-F1"), # Default SL - Launch Application Menu (gnome/kde) K("RC-F3"):K("Super-d"), # Default SL - Show Desktop (gnome/kde,eos) From 3458246fbf9f16279ee13d099effb8e9481c48aa Mon Sep 17 00:00:00 2001 From: Ben Reaves Date: Thu, 10 Dec 2020 19:41:41 -0600 Subject: [PATCH 2/4] - Fixed dev tools shortcuts on #347 --- windows/kinto.ahk | 4 ++-- xkeysnail-config/kinto.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/windows/kinto.ahk b/windows/kinto.ahk index d9a150b..5727144 100644 --- a/windows/kinto.ahk +++ b/windows/kinto.ahk @@ -445,8 +445,8 @@ GroupAdd, intellij, ahk_exe idea64.exe #IfWinActive ahk_group browsers ^q::send {Alt Down}f{Alt Up}x ; exit all windows ; Dev Tools - #^i::send {Ctrl Down}{Shift Down}i{Shift Up}{Ctrl Up} - #^j::send {Ctrl Down}{Shift Down}j{Shift Up}{Ctrl Up} + !^i::send {Ctrl Down}{Shift Down}i{Shift Up}{Ctrl Up} + !^j::send {Ctrl Down}{Shift Down}j{Shift Up}{Ctrl Up} ; Open preferences #IfWinActive ahk_exe firefox.exe ^,::send {Alt Down}{Shift Down}t{Shift Up}{Alt Up}o{Enter} diff --git a/xkeysnail-config/kinto.py b/xkeysnail-config/kinto.py index 25b9c92..254839b 100644 --- a/xkeysnail-config/kinto.py +++ b/xkeysnail-config/kinto.py @@ -206,9 +206,9 @@ define_keymap(re.compile("org.gnome.nautilus", re.IGNORECASE),{ # Keybindings for Browsers define_keymap(re.compile(browserStr, re.IGNORECASE),{ - K("RC-Q"): K("RC-Q"), # Close all browsers Instances - K("Super-RC-I"): K("RC-Shift-I"), # Dev tools - K("Super-RC-J"): K("RC-Shift-J"), # Dev tools + K("RC-Q"): K("RC-Q"), # Close all browsers Instances + K("M-RC-I"): K("RC-Shift-I"), # Dev tools + K("M-RC-J"): K("RC-Shift-J"), # Dev tools }) # Open preferences in browsers From d499e338abf35d9d2727e994cd0468a8f59cc6ee Mon Sep 17 00:00:00 2001 From: Ben Reaves Date: Thu, 10 Dec 2020 20:14:37 -0600 Subject: [PATCH 3/4] - Updated Firefox preferences hotkey for Win/Linux --- windows/kinto.ahk | 2 +- xkeysnail-config/kinto.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/windows/kinto.ahk b/windows/kinto.ahk index 5727144..b779486 100644 --- a/windows/kinto.ahk +++ b/windows/kinto.ahk @@ -449,7 +449,7 @@ GroupAdd, intellij, ahk_exe idea64.exe !^j::send {Ctrl Down}{Shift Down}j{Shift Up}{Ctrl Up} ; Open preferences #IfWinActive ahk_exe firefox.exe - ^,::send {Alt Down}{Shift Down}t{Shift Up}{Alt Up}o{Enter} + ^,::send, {Ctrl Down}t{Ctrl Up}about:preferences{Enter} #If #IfWinActive ahk_exe chrome.exe ^,::send {Alt Down}e{Alt Up}s{Enter} diff --git a/xkeysnail-config/kinto.py b/xkeysnail-config/kinto.py index 254839b..62a0e6d 100644 --- a/xkeysnail-config/kinto.py +++ b/xkeysnail-config/kinto.py @@ -213,7 +213,7 @@ define_keymap(re.compile(browserStr, re.IGNORECASE),{ # Open preferences in browsers define_keymap(re.compile("Firefox", re.IGNORECASE),{ - K("C-comma"): [K("M-t"), K("o"),K("Enter")], + K("C-comma"): [K("C-T"),K("a"),K("b"),K("o"),K("u"),K("t"),K(":"),K("p"),K("r"),K("e"),K("f"),K("e"),K("r"),K("e"),K("n"),K("c"),K("e"),K("s"),K("Enter")], }) define_keymap(re.compile(chromeStr, re.IGNORECASE),{ K("C-comma"): [K("M-e"), K("s"),K("Enter")], From 87d7589d7dc8949586409d3206ac9833a5072797 Mon Sep 17 00:00:00 2001 From: Ben Reaves Date: Thu, 10 Dec 2020 21:00:42 -0600 Subject: [PATCH 4/4] - Updated firefox prefs on linux side --- xkeysnail-config/kinto.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xkeysnail-config/kinto.py b/xkeysnail-config/kinto.py index 62a0e6d..0c5526f 100644 --- a/xkeysnail-config/kinto.py +++ b/xkeysnail-config/kinto.py @@ -213,7 +213,7 @@ define_keymap(re.compile(browserStr, re.IGNORECASE),{ # Open preferences in browsers define_keymap(re.compile("Firefox", re.IGNORECASE),{ - K("C-comma"): [K("C-T"),K("a"),K("b"),K("o"),K("u"),K("t"),K(":"),K("p"),K("r"),K("e"),K("f"),K("e"),K("r"),K("e"),K("n"),K("c"),K("e"),K("s"),K("Enter")], + K("C-comma"): [K("C-T"),K("a"),K("b"),K("o"),K("u"),K("t"),K("Shift-SEMICOLON"),K("p"),K("r"),K("e"),K("f"),K("e"),K("r"),K("e"),K("n"),K("c"),K("e"),K("s"),K("Enter")], }) define_keymap(re.compile(chromeStr, re.IGNORECASE),{ K("C-comma"): [K("M-e"), K("s"),K("Enter")],