mirror of
https://github.com/rbreaves/kinto.git
synced 2025-08-06 02:48:26 +02:00
- Improved Windows UX, Added System Tray, Kinto icon assets
This commit is contained in:
BIN
assets/kinto-black.ico
Normal file
BIN
assets/kinto-black.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 102 KiB |
BIN
assets/kinto-color-black.ico
Normal file
BIN
assets/kinto-color-black.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 106 KiB |
BIN
assets/kinto-color.ico
Normal file
BIN
assets/kinto-color.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 106 KiB |
BIN
assets/kinto-white.ico
Normal file
BIN
assets/kinto-white.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 102 KiB |
31
setup.py
31
setup.py
@@ -7,39 +7,46 @@ from prekinto import *
|
|||||||
homedir = os.path.expanduser("~")
|
homedir = os.path.expanduser("~")
|
||||||
|
|
||||||
def windows_setup():
|
def windows_setup():
|
||||||
keymaps = ["Apple keyboard standard", "Apple keyboard w/ Caps lock as Esc", "Windows keyboard standard", "Windows keyboard w/ Caps lock as Esc","Uninstall"]
|
keymaps = ["Apple keyboard standard", "Windows keyboard standard","Uninstall"]
|
||||||
for index, item in enumerate(keymaps):
|
for index, item in enumerate(keymaps):
|
||||||
print(" %i. %s" % (index+1, item.capitalize()))
|
print(" %i. %s" % (index+1, item.capitalize()))
|
||||||
default = 0
|
default = 0
|
||||||
while not int(default) in range(1,len(keymaps)+1):
|
while not int(default) in range(1,len(keymaps)+1):
|
||||||
default = int(input("\nPlease enter your desired keymap (1 - " + str(len(keymaps)) + ") : "))
|
default = int(input("\nPlease enter your desired keymap (1 - " + str(len(keymaps)) + ") : "))
|
||||||
print("")
|
print("")
|
||||||
|
# Short DOS path notation
|
||||||
path= cmdline('echo %cd%')[:-1]
|
path= cmdline('echo %cd%')[:-1]
|
||||||
|
print("Copying autohotkey combinations for Terminals & Editors...")
|
||||||
|
os.system("copy /Y " + path + "\\windows\\kinto.ahk " + path + "\\windows\\kinto-new.ahk")
|
||||||
if default == 1:
|
if default == 1:
|
||||||
os.system("regedit " + path + "\\windows\\macbook_winctrl_swap.reg")
|
os.system('perl -pi -e "s/(; )(.*)(; MacModifiers)/$2$3/g" ./windows/kinto-new.ahk')
|
||||||
|
# os.system("regedit " + path + "\\windows\\macbook_winctrl_swap.reg")
|
||||||
elif default == 2:
|
elif default == 2:
|
||||||
os.system("regedit " + path + "\\windows\\macbook_winctrl_capsesc_swap.reg")
|
os.system('perl -pi -e "s/(; )(.*)(; WinModifiers)/$2$3/g" ./windows/kinto-new.ahk')
|
||||||
|
# os.system("regedit " + path + "\\windows\\standard_ctrlalt_swap.reg")
|
||||||
elif default == 3:
|
elif default == 3:
|
||||||
os.system("regedit " + path + "\\windows\\standard_ctrlalt_swap.reg")
|
|
||||||
elif default == 4:
|
|
||||||
os.system("regedit " + path + "\\windows\\standard_ctrlalt_capsesc_swap.reg")
|
|
||||||
elif default == 5:
|
|
||||||
os.system("regedit " + path + "\\windows\\remove_keyswap.reg")
|
os.system("regedit " + path + "\\windows\\remove_keyswap.reg")
|
||||||
stvscode = yn_choice(bcolors.CYELLOW2 + "Would you like to use Sublime Text 3 keymaps in VS Code?\n" + bcolors.ENDC)
|
stvscode = yn_choice(bcolors.CYELLOW2 + "Would you like to use Sublime Text 3 keymaps in VS Code?\n" + bcolors.ENDC)
|
||||||
if default > 0 and default < 5:
|
if default > 0 and default < 3:
|
||||||
print("Will now install chocolatey and autohotkey with elevated privileges...")
|
print("Will now install chocolatey and autohotkey with elevated privileges...")
|
||||||
print("This install will fail if you are not running with elevated privileges")
|
print("This install will fail if you are not running with elevated privileges")
|
||||||
os.system('powershell -executionpolicy bypass ".\\windows\\autohotkey.ps1"')
|
os.system('powershell -executionpolicy bypass ".\\windows\\autohotkey.ps1"')
|
||||||
os.system('refreshenv')
|
os.system('refreshenv')
|
||||||
print("\nWill now install Ubuntu Terminal Theme as default...")
|
print("\nWill now install Ubuntu Terminal Theme as default...")
|
||||||
os.system("regedit " + path + "\\windows\\theme_ubuntu.reg")
|
os.system("regedit " + path + "\\windows\\theme_ubuntu.reg")
|
||||||
print("Copying autohotkey combinations for Terminals & Editors...")
|
|
||||||
os.system("copy /Y " + path + "\\windows\\kinto.ahk " + path + "\\windows\\kinto-new.ahk")
|
|
||||||
if(stvscode):
|
if(stvscode):
|
||||||
os.system('perl -pi -e "s/(; )(.*)(; ST2CODE)/$2$3/g" ./windows/kinto-new.ahk')
|
os.system('perl -pi -e "s/(; )(.*)(; ST2CODE)/$2$3/g" ./windows/kinto-new.ahk')
|
||||||
os.system("copy /Y " + path + "\\windows\\kinto-new.ahk \"C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\StartUp\\kinto.ahk\"")
|
os.system('copy /Y ' + path + '\\windows\\kinto-start.vbs "%userprofile%\\.kinto\\kinto-start.vbs"')
|
||||||
|
os.system('mklink "%userprofile%\\Start Menu\\Programs\\Startup\\kinto-start.vbs" "%userprofile%\\.kinto\\kinto-start.vbs"')
|
||||||
|
os.system('cp '+ path + '\\windows\\NoShell.vbs "%userprofile%\\.kinto\\NoShell.vbs"')
|
||||||
|
os.system('cp '+ path + '\\windows\\toggle_kb.bat "%userprofile%\\.kinto\\toggle_kb.bat"')
|
||||||
|
os.system('cp '+ path + '\\windows\\kinto-new.ahk "%userprofile%\\.kinto\\kinto.ahk"')
|
||||||
|
os.system('robocopy '+ path + '\\assets "%userprofile%\\.kinto\\assets" /E')
|
||||||
os.system("del /f .\\windows\\kinto-new.ahk")
|
os.system("del /f .\\windows\\kinto-new.ahk")
|
||||||
print("\nPlease log off and back on for changes to take full effect.")
|
os.system("del \"C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\StartUp\\kinto.ahk\"")
|
||||||
|
os.system("%userprofile%\\AppData\\Roaming\\Microsoft\\Windows\\STARTM~1\\Programs\\Startup\\kinto-start.vbs")
|
||||||
|
|
||||||
|
# # print("\nPlease log off and back on for changes to take full effect.")
|
||||||
print("If using WSL then please remember to right click on title bar -> Properties -> Edit Options -> Use Ctrl+Shift+C/V as Copy/Paste and enable it.")
|
print("If using WSL then please remember to right click on title bar -> Properties -> Edit Options -> Use Ctrl+Shift+C/V as Copy/Paste and enable it.")
|
||||||
else:
|
else:
|
||||||
os.system("del \"C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\StartUp\\kinto.ahk\"")
|
os.system("del \"C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\StartUp\\kinto.ahk\"")
|
||||||
|
14
windows/NoShell.vbs
Normal file
14
windows/NoShell.vbs
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
If WScript.Arguments.Count >= 1 Then
|
||||||
|
ReDim arr(WScript.Arguments.Count-1)
|
||||||
|
prog = WScript.Arguments(0)
|
||||||
|
For i = 1 To WScript.Arguments.Count-1
|
||||||
|
Arg = WScript.Arguments(i)
|
||||||
|
If InStr(Arg, " ") > 1 Then Arg = """" & Arg & """"
|
||||||
|
arr(i) = Arg
|
||||||
|
Next
|
||||||
|
|
||||||
|
RunCmd = Join(arr)
|
||||||
|
' CreateObject("Wscript.Shell").Run RunCmd, 0, True
|
||||||
|
Set oShell = CreateObject("Shell.Application")
|
||||||
|
oShell.ShellExecute prog, RunCmd, , "runas", 0
|
||||||
|
End If
|
7
windows/kinto-start.vbs
Normal file
7
windows/kinto-start.vbs
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
Set oShell = CreateObject("Shell.Application")
|
||||||
|
Set wShell = WScript.CreateObject("WScript.Shell")
|
||||||
|
Set fso = CreateObject("Scripting.FileSystemObject")
|
||||||
|
|
||||||
|
path = wShell.ExpandEnvironmentStrings("%userprofile%")
|
||||||
|
strFolder = fso.BuildPath(path, "\.kinto\kinto.ahk")
|
||||||
|
oShell.ShellExecute "C:\Program Files\AutoHotkey\AutoHotkey.exe", strFolder, , "runas", 0
|
@@ -1,42 +1,51 @@
|
|||||||
; Cmd Tab For App Switching
|
#SingleInstance force
|
||||||
; LWin & Tab::AltTab
|
#NoEnv
|
||||||
; RWin & Tab::AltTab
|
#Persistent
|
||||||
|
|
||||||
; New AltTab and CtrlTab fix
|
I_Icon = %A_ScriptDir%\assets\kinto-white.ico
|
||||||
*tab::
|
IfExist, %I_Icon%
|
||||||
{
|
Menu, Tray, Icon, %I_Icon%
|
||||||
if (GetKeyState("LCtrl", "P") AND GetKeyState("LShift", "P") = false) {
|
|
||||||
Send {LAlt up}{LCtrl down}{tab}
|
; Set Tray menu
|
||||||
KeyWait, tab
|
; Menu, Tray, Standard
|
||||||
} else if (GetKeyState("LCtrl", "P") AND GetKeyState("LShift", "P")) {
|
Menu, Tray, NoStandard ; to remove default menu
|
||||||
Send {LAlt up}{LShift down}{LCtrl down}{tab}
|
Menu, Tray, Add, Set Windows Keyboard, winkb
|
||||||
KeyWait, tab
|
Menu, Tray, Add, Set Apple Keyboard, mackb
|
||||||
} else if (GetKeyState("LWin", "P") AND GetKeyState("LShift", "P") = false) {
|
Menu, Tray, Add, Suspend Kinto, tray_suspend
|
||||||
Send {LAlt down}{tab}
|
Menu, Tray, Add, Returns to Desktop, min
|
||||||
KeyWait, tab
|
Menu, Tray, Add
|
||||||
} else if (GetKeyState("LWin", "P") AND GetKeyState("LShift", "P")) {
|
Menu, Tray, Add, Close, Exit
|
||||||
Send {LShift down}{LAlt down}{tab}
|
Menu, Tray, Click, 1
|
||||||
KeyWait, tab
|
Menu, Tray, Tip, Kinto
|
||||||
} else {
|
|
||||||
send {tab}
|
winkb(){
|
||||||
}
|
Run, %A_ScriptDir%\NoShell.vbs %A_ScriptDir%\toggle_kb.bat win, %A_ScriptDir%
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
|
||||||
; Basic Remap
|
mackb(){
|
||||||
;
|
Run, %A_ScriptDir%\NoShell.vbs %A_ScriptDir%\toggle_kb.bat mac, %A_ScriptDir%
|
||||||
; Primary::LCtrl
|
}
|
||||||
; Secondary::LAlt
|
|
||||||
; Tertiary::LWin
|
|
||||||
|
|
||||||
$LCtrl::LWin
|
min(){
|
||||||
$LWin::LCtrl
|
; Refocus last active Window
|
||||||
; Hack to disable start menu on winkey
|
Send {LAlt down}{tab}{LAlt up}
|
||||||
$LCtrl up::Send {Ctrl down}{LWin up}{Ctrl up}
|
}
|
||||||
|
|
||||||
; temporary hack to ensure keys don't get stuck
|
tray_suspend(){
|
||||||
; impacts Alt-Tab fix
|
suspend toggle
|
||||||
$LWin up::Send {LAlt up}{LCtrl up}
|
if (a_isSuspended = 1){
|
||||||
|
menu, tray, check , Suspend Kinto
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
menu, tray, unCheck, Suspend Kinto
|
||||||
|
}
|
||||||
|
; Refocus last active Window
|
||||||
|
Send {LAlt down}{tab}{LAlt up}
|
||||||
|
}
|
||||||
|
|
||||||
|
Exit() {
|
||||||
|
ExitApp
|
||||||
|
}
|
||||||
|
|
||||||
SetTitleMatchMode, 2
|
SetTitleMatchMode, 2
|
||||||
|
|
||||||
@@ -47,6 +56,7 @@ 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 Cmd.exe
|
GroupAdd, terminals, ahk_exe Cmd.exe
|
||||||
|
GroupAdd, terminals, ahk_exe Terminus.exe
|
||||||
GroupAdd, terminals, Fluent Terminal ahk_class ApplicationFrameWindow
|
GroupAdd, terminals, Fluent Terminal ahk_class ApplicationFrameWindow
|
||||||
|
|
||||||
GroupAdd, posix, ahk_exe ubuntu.exe
|
GroupAdd, posix, ahk_exe ubuntu.exe
|
||||||
@@ -54,6 +64,7 @@ GroupAdd, posix, ahk_exe ConEmu.exe
|
|||||||
GroupAdd, posix, ahk_exe ConEmu64.exe
|
GroupAdd, posix, ahk_exe ConEmu64.exe
|
||||||
GroupAdd, posix, ahk_exe Hyper.exe
|
GroupAdd, posix, ahk_exe Hyper.exe
|
||||||
GroupAdd, posix, ahk_exe mintty.exe
|
GroupAdd, posix, ahk_exe mintty.exe
|
||||||
|
GroupAdd, terminals, ahk_exe Terminus.exe
|
||||||
GroupAdd, posix, Fluent Terminal ahk_class ApplicationFrameWindow
|
GroupAdd, posix, Fluent Terminal ahk_class ApplicationFrameWindow
|
||||||
|
|
||||||
GroupAdd, ConEmu, ahk_exe ConEmu.exe
|
GroupAdd, ConEmu, ahk_exe ConEmu.exe
|
||||||
@@ -67,6 +78,78 @@ GroupAdd, editors, ahk_exe Code.exe
|
|||||||
GroupAdd, vscode, ahk_exe VSCodium.exe
|
GroupAdd, vscode, ahk_exe VSCodium.exe
|
||||||
GroupAdd, vscode, ahk_exe Code.exe
|
GroupAdd, vscode, ahk_exe Code.exe
|
||||||
|
|
||||||
|
GroupAdd, vstudio, ahk_exe devenv.exe
|
||||||
|
|
||||||
|
; New AltTab and CtrlTab fix
|
||||||
|
*tab::
|
||||||
|
{
|
||||||
|
; Tertiary
|
||||||
|
if (GetKeyState("LCtrl", "P") AND GetKeyState("LShift", "P") = false) {
|
||||||
|
; Secondary
|
||||||
|
; Send {LCtrl down}{Secondary up}{tab}
|
||||||
|
; Send {LCtrl down}{LWin up}{tab} ; WinModifiers
|
||||||
|
; Send {LCtrl down}{LAlt up}{tab} ; MacModifiers
|
||||||
|
KeyWait, tab
|
||||||
|
; Tertiary
|
||||||
|
} else if (GetKeyState("LCtrl", "P") AND GetKeyState("LShift", "P")) {
|
||||||
|
; Secondary
|
||||||
|
; Send {LCtrl down}{Secondary up}{LShift down}{tab}
|
||||||
|
; Send {LCtrl down}{LWin up}{LShift down}{tab} ; WinModifiers
|
||||||
|
; Send {LCtrl down}{LAlt up}{LShift down}{tab} ; MacModifiers
|
||||||
|
KeyWait, tab
|
||||||
|
; Primary
|
||||||
|
; } else if (GetKeyState("LAlt", "P") AND GetKeyState("LShift", "P") = false) { ; WinModifiers
|
||||||
|
; } else if (GetKeyState("LWin", "P") AND GetKeyState("LShift", "P") = false) { ; MacModifiers
|
||||||
|
Send {LAlt down}{tab}
|
||||||
|
KeyWait, tab
|
||||||
|
; Primary
|
||||||
|
; } else if (GetKeyState("LAlt", "P") AND GetKeyState("LShift", "P")) { ; WinModifiers
|
||||||
|
; } else if (GetKeyState("LWin", "P") AND GetKeyState("LShift", "P")) { ; MacModifiers
|
||||||
|
Send {LAlt down}{LShift down}{tab}
|
||||||
|
KeyWait, tab
|
||||||
|
; Secondary
|
||||||
|
; } else if (GetKeyState("LWin", "P") AND GetKeyState("LShift", "P")) = false { ; WinModifiers
|
||||||
|
; } else if (GetKeyState("LAlt", "P") AND GetKeyState("LShift", "P") = false) { ; MacModifiers
|
||||||
|
return
|
||||||
|
; Secondary
|
||||||
|
; } else if (GetKeyState("LWin", "P") AND GetKeyState("LShift", "P")) { ; WinModifiers
|
||||||
|
; } else if (GetKeyState("LAlt", "P") AND GetKeyState("LShift", "P")) { ; MacModifiers
|
||||||
|
return
|
||||||
|
} else {
|
||||||
|
send {Blind}{tab}
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
tab::Send {tab}
|
||||||
|
|
||||||
|
+tab::Send {Shift down}{tab}{Shift up}
|
||||||
|
|
||||||
|
; Basic Remap
|
||||||
|
;
|
||||||
|
; Primary::LCtrl
|
||||||
|
; Secondary::LAlt
|
||||||
|
; Tertiary::LWin
|
||||||
|
|
||||||
|
; $LAlt::LCtrl ; WinModifiers
|
||||||
|
; $RAlt::RCtrl ; WinModifiers
|
||||||
|
; $LWin::LAlt ; WinModifiers
|
||||||
|
; $LCtrl::LWin ; WinModifiers
|
||||||
|
|
||||||
|
; $LWin::LCtrl ; MacModifiers
|
||||||
|
; $RWin::RCtrl ; MacModifiers
|
||||||
|
; $LCtrl::LWin ; MacModifiers
|
||||||
|
|
||||||
|
; Hack to disable start menu on winkey
|
||||||
|
; Static
|
||||||
|
$LCtrl up::Send {Ctrl down}{LWin up}{Ctrl up}
|
||||||
|
|
||||||
|
; temporary hack to ensure keys don't get stuck
|
||||||
|
; impacts Alt-Tab fix
|
||||||
|
; Primary
|
||||||
|
; $LAlt up::Send {LWin up}{LAlt up}{LCtrl up} ; WinModifiers
|
||||||
|
; $LWin up::Send {LWin up}{LAlt up}{LCtrl up} ; MacModifiers
|
||||||
|
|
||||||
; Close Apps
|
; Close Apps
|
||||||
^q::Send !{F4}
|
^q::Send !{F4}
|
||||||
|
|
||||||
@@ -97,36 +180,16 @@ $^+Right::Send +{End}
|
|||||||
|
|
||||||
; Cmd+Space Alternative
|
; Cmd+Space Alternative
|
||||||
^Space::Send ^{Esc}
|
^Space::Send ^{Esc}
|
||||||
; ^Space::run AppName
|
|
||||||
|
|
||||||
; ; Ctrl Tab for In-App Tab Switching
|
|
||||||
; ; https://autohotkey.com/board/topic/72433-controltab/
|
|
||||||
; #if GetKeyState("LWin")
|
|
||||||
; *Tab::
|
|
||||||
; if(!GetKeyState("LControl"))
|
|
||||||
; Send {LControl Down}
|
|
||||||
; Send {Tab}
|
|
||||||
; SetTimer, WaitForWinUp, 10
|
|
||||||
; ToolTip trigger
|
|
||||||
; return
|
|
||||||
|
|
||||||
; WaitForWinUp:
|
|
||||||
; if(!GetKeyState("LWin", "P"))
|
|
||||||
; {
|
|
||||||
; Send {LControl Up}
|
|
||||||
; SetTimer, WaitForWinUp, Off
|
|
||||||
; }
|
|
||||||
; return
|
|
||||||
|
|
||||||
; ; Sublime Text Remaps for VS Code
|
; ; Sublime Text Remaps for VS Code
|
||||||
; #IfWinActive ahk_group vscode ; ST2CODE
|
#IfWinActive ahk_group vscode ; ST2CODE
|
||||||
; ; Remap Ctrl+Shift to behave like macOS Sublimetext
|
; Remap Ctrl+Shift to behave like macOS Sublimetext
|
||||||
; ; Will extend cursor to multiple lines
|
; Will extend cursor to multiple lines
|
||||||
; #+Up::send ^!{Up} ; ST2CODE
|
#+Up::send ^!{Up} ; ST2CODE
|
||||||
; #+Down::send ^!{Down} ; ST2CODE
|
#+Down::send ^!{Down} ; ST2CODE
|
||||||
; ; Remap Ctrl+Cmd+G to select all matches
|
; Remap Ctrl+Cmd+G to select all matches
|
||||||
; #^g::send ^+{L} ; ST2CODE
|
#^g::send ^+{L} ; ST2CODE
|
||||||
; #If ; ST2CODE
|
#If ; ST2CODE
|
||||||
|
|
||||||
#IfWinActive ahk_exe sublime_text.exe
|
#IfWinActive ahk_exe sublime_text.exe
|
||||||
; Remap Ctrl+Shift to behave like macOS Sublimetext
|
; Remap Ctrl+Shift to behave like macOS Sublimetext
|
||||||
@@ -138,93 +201,91 @@ $^+Right::Send +{End}
|
|||||||
#^g::send !{F3}
|
#^g::send !{F3}
|
||||||
#If
|
#If
|
||||||
|
|
||||||
; #IfWinActive ahk_group terminals
|
#IfWinActive ahk_group terminals
|
||||||
; ; Copy
|
; Copy
|
||||||
; ^c::Send {LCtrl down}{LShift down}c{LCtrl Up}{LShift Up}
|
^c::
|
||||||
; #c::Send {LCtrl down}c{LCtrl Up}
|
SetKeyDelay -1
|
||||||
; ; Paste
|
Send {Blind}{LShift down}{c DownTemp}
|
||||||
; $^v::
|
return
|
||||||
; If not WinActive("ahk_group ConEmu") && not WinActive("ahk_exe cmd.exe"){
|
|
||||||
; Send {LCtrl down}{LShift down}v{LCtrl Up}{LShift Up}
|
|
||||||
; }
|
|
||||||
; else{
|
|
||||||
; Send ^v
|
|
||||||
; }
|
|
||||||
; return
|
|
||||||
; #If
|
|
||||||
|
|
||||||
; #IfWinActive ahk_group posix
|
^c up::
|
||||||
; ; Open/Close Tab for those that support it
|
SetKeyDelay -1
|
||||||
; $^t::
|
Send {Blind}{c Up}{LShift Up}
|
||||||
; If not WinActive("ahk_group ConEmu"){
|
return
|
||||||
; Send {LCtrl down}{LShift down}t{LCtrl Up}{LShift Up}
|
|
||||||
; }
|
|
||||||
; else{
|
|
||||||
; Send ^t
|
|
||||||
; }
|
|
||||||
; return
|
|
||||||
|
|
||||||
; $^w::
|
; Sigints - interrupt
|
||||||
; If not WinActive("ahk_group ConEmu"){
|
$#c::Send {Ctrl down}c{Ctrl up}
|
||||||
; Send {LCtrl down}{LShift down}w{LCtrl Up}{LShift Up}
|
|
||||||
; }
|
|
||||||
; else{
|
|
||||||
; Send ^w
|
|
||||||
; }
|
|
||||||
; return
|
|
||||||
|
|
||||||
; ; End of Line
|
; Paste
|
||||||
; #e::Send {LCtrl down}e{LCtrl Up}
|
^v::
|
||||||
; ^e::return
|
If WinActive("ahk_group posix"){
|
||||||
; ; Beginning of Line
|
Send {Blind}{Shift down}v{Shift up}
|
||||||
; #a::Send {LCtrl down}a{LCtrl Up}
|
}
|
||||||
; ^a::return
|
else{
|
||||||
; ;^l::Send clear{Enter}
|
Send {Blind}v
|
||||||
; ;#l::return
|
}
|
||||||
; ; Clear Terminal and Scroll Buffer
|
return
|
||||||
; ^k::Send clear && printf '\e[3J'{Enter}
|
#If
|
||||||
; ; Nano editor shortcuts
|
|
||||||
; #k::Send {LCtrl down}k{LCtrl Up}
|
|
||||||
; #x::Send {LCtrl down}x{LCtrl Up}
|
|
||||||
; #o::Send {LCtrl down}o{LCtrl Up}
|
|
||||||
; #r::Send {LCtrl down}r{LCtrl Up}
|
|
||||||
; #w::Send {LCtrl down}w{LCtrl Up}
|
|
||||||
; #\::Send {LCtrl down}\{LCtrl Up}
|
|
||||||
; #u::Send {LCtrl down}u{LCtrl Up}
|
|
||||||
; #j::Send {LCtrl down}j{LCtrl Up}
|
|
||||||
; #t::Send {LCtrl down}t{LCtrl Up}
|
|
||||||
; #_::Send {LCtrl down}_{LCtrl Up}
|
|
||||||
; #z::Send {LCtrl down}z{LCtrl Up}
|
|
||||||
; #If
|
|
||||||
|
|
||||||
; ; #IfWinActive ahk_group ConEmu
|
#IfWinActive ahk_group posix
|
||||||
; ; ; Paste
|
; Open/Close Tab for those that support it
|
||||||
; ; $^v::Send {Shift down}{Insert}{Shift Up}
|
$^t::
|
||||||
; ; #v::Send {LCtrl down}v{LCtrl Up}
|
If not WinActive("ahk_group ConEmu"){
|
||||||
; ; #If
|
Send {LCtrl down}{LShift down}t{LCtrl Up}{LShift Up}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
Send ^t
|
||||||
|
}
|
||||||
|
return
|
||||||
|
|
||||||
; #IfWinActive ahk_exe mintty.exe
|
$^w::
|
||||||
; ; Copy
|
If not WinActive("ahk_group ConEmu"){
|
||||||
; $^c::Send {Control down}{Insert}{Control Up}
|
Send {LCtrl down}{LShift down}w{LCtrl Up}{LShift Up}
|
||||||
; #c::Send {LCtrl down}c{LCtrl Up}
|
}
|
||||||
; ; Paste
|
else{
|
||||||
; $^v::Send {Shift down}{Insert}{Shift Up}
|
Send ^w
|
||||||
; #v::Send {LCtrl down}v{LCtrl Up}
|
}
|
||||||
; #If
|
return
|
||||||
|
|
||||||
; ;Disable win + l key locking (This line must come before any hotkey assignments in the .ahk file)
|
; End of Line
|
||||||
|
^e::
|
||||||
|
SetKeyDelay -1
|
||||||
|
Send {Blind}{e DownTemp}
|
||||||
|
return
|
||||||
|
|
||||||
; ; Admin privileges required
|
^e up::
|
||||||
; ; Sets Workstation Lock to not occur on Win+L
|
SetKeyDelay -1
|
||||||
; ; RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Policies\System, DisableLockWorkstation, 1
|
Send {Blind}{e Up}
|
||||||
|
return
|
||||||
|
|
||||||
; ; Re-enables Workstation lock on Ctrl+Cmd+Q
|
; Beginning of Line
|
||||||
; ; Need to Remove Quick Assist and reboot
|
^a::
|
||||||
; ; Remove-WindowsCapability -online -name App.Support.QuickAssist~~~~0.0.1.0
|
SetKeyDelay -1
|
||||||
; #^q::
|
Send {Blind}{a DownTemp}
|
||||||
; ; re-enable locking workstation, then lock it
|
return
|
||||||
; ; RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Policies\System, DisableLockWorkstation, 0
|
|
||||||
; ; DllCall("LockWorkStation")
|
^a up::
|
||||||
; ; Reload script to relock Workstation Lock
|
SetKeyDelay -1
|
||||||
; ; Reload
|
Send {Blind}{a Up}
|
||||||
; ;return
|
return
|
||||||
|
|
||||||
|
^l::Send clear{Enter}
|
||||||
|
; #l::return
|
||||||
|
; Clear Terminal and Scroll Buffer
|
||||||
|
^k::Send clear && printf '\e[3J'{Enter}
|
||||||
|
; Nano editor shortcuts
|
||||||
|
#g::Send {LCtrl down}g{LCtrl Up}
|
||||||
|
#k::Send {LCtrl down}k{LCtrl Up}
|
||||||
|
#x::Send {LCtrl down}x{LCtrl Up}
|
||||||
|
#o::Send {LCtrl down}o{LCtrl Up}
|
||||||
|
#r::Send {LCtrl down}r{LCtrl Up}
|
||||||
|
#w::Send {LCtrl down}w{LCtrl Up}
|
||||||
|
#\::Send {LCtrl down}\{LCtrl Up}
|
||||||
|
#u::Send {LCtrl down}u{LCtrl Up}
|
||||||
|
#j::Send {LCtrl down}j{LCtrl Up}
|
||||||
|
#t::Send {LCtrl down}t{LCtrl Up}
|
||||||
|
#_::Send {LCtrl down}_{LCtrl Up}
|
||||||
|
#z::Send {LCtrl down}z{LCtrl Up}
|
||||||
|
#y::Send {LCtrl down}y{LCtrl Up}
|
||||||
|
#v::Send {LCtrl down}v{LCtrl Up}
|
||||||
|
#If
|
@@ -1,254 +0,0 @@
|
|||||||
SetTitleMatchMode, 2
|
|
||||||
|
|
||||||
GroupAdd, terminals, ahk_exe ubuntu.exe
|
|
||||||
GroupAdd, terminals, ahk_exe ConEmu.exe
|
|
||||||
GroupAdd, terminals, ahk_exe ConEmu64.exe
|
|
||||||
GroupAdd, terminals, ahk_exe powershell.exe
|
|
||||||
GroupAdd, terminals, ahk_exe WindowsTerminal.exe
|
|
||||||
GroupAdd, terminals, ahk_exe Hyper.exe
|
|
||||||
GroupAdd, terminals, ahk_exe Cmd.exe
|
|
||||||
GroupAdd, terminals, ahk_exe Terminus.exe
|
|
||||||
GroupAdd, terminals, Fluent Terminal ahk_class ApplicationFrameWindow
|
|
||||||
|
|
||||||
GroupAdd, posix, ahk_exe ubuntu.exe
|
|
||||||
GroupAdd, posix, ahk_exe ConEmu.exe
|
|
||||||
GroupAdd, posix, ahk_exe ConEmu64.exe
|
|
||||||
GroupAdd, posix, ahk_exe Hyper.exe
|
|
||||||
GroupAdd, posix, ahk_exe mintty.exe
|
|
||||||
GroupAdd, posix, ahk_exe Terminus.exe
|
|
||||||
GroupAdd, posix, Fluent Terminal ahk_class ApplicationFrameWindow
|
|
||||||
|
|
||||||
GroupAdd, ConEmu, ahk_exe ConEmu.exe
|
|
||||||
GroupAdd, ConEmu, ahk_exe ConEmu64.exe
|
|
||||||
GroupAdd, ConEmu, ahk_exe WindowsTerminal.exe
|
|
||||||
|
|
||||||
GroupAdd, editors, ahk_exe sublime_text.exe
|
|
||||||
GroupAdd, editors, ahk_exe VSCodium.exe
|
|
||||||
GroupAdd, editors, ahk_exe Code.exe
|
|
||||||
|
|
||||||
GroupAdd, vscode, ahk_exe VSCodium.exe
|
|
||||||
GroupAdd, vscode, ahk_exe Code.exe
|
|
||||||
|
|
||||||
; New AltTab and CtrlTab fix
|
|
||||||
*tab::
|
|
||||||
{
|
|
||||||
if (GetKeyState("LCtrl", "P") AND GetKeyState("LShift", "P") = false) {
|
|
||||||
Send {LCtrl down}{LAlt up}{tab}
|
|
||||||
KeyWait, tab
|
|
||||||
} else if (GetKeyState("LCtrl", "P") AND GetKeyState("LShift", "P")) {
|
|
||||||
Send {LCtrl down}{LAlt up}{LShift down}{tab}
|
|
||||||
KeyWait, tab
|
|
||||||
; } else if (GetKeyState("Primary", "P") AND GetKeyState("LShift", "P") = false) {
|
|
||||||
} else if (GetKeyState("LWin", "P") AND GetKeyState("LShift", "P") = false) {
|
|
||||||
Send {LAlt down}{tab}
|
|
||||||
KeyWait, tab
|
|
||||||
; } else if (GetKeyState("Primary", "P") AND GetKeyState("LShift", "P")) {
|
|
||||||
} else if (GetKeyState("LWin", "P") AND GetKeyState("LShift", "P")) {
|
|
||||||
Send {LAlt down}{LShift down}{tab}
|
|
||||||
KeyWait, tab
|
|
||||||
; } else if (GetKeyState("Secondary", "P") AND GetKeyState("LShift", "P") = false) {
|
|
||||||
} else if (GetKeyState("LAlt", "P") AND GetKeyState("LShift", "P") = false) {
|
|
||||||
return
|
|
||||||
; ; } else if (GetKeyState("Secondary", "P") AND GetKeyState("LShift", "P")) {
|
|
||||||
} else if (GetKeyState("LAlt", "P") AND GetKeyState("LShift", "P")) {
|
|
||||||
return
|
|
||||||
} else {
|
|
||||||
send {Blind}{tab}
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
tab::Send {tab}
|
|
||||||
|
|
||||||
+tab::Send {Shift down}{tab}{Shift up}
|
|
||||||
|
|
||||||
; Basic Remap
|
|
||||||
;
|
|
||||||
; Primary::LCtrl
|
|
||||||
; Secondary::LAlt
|
|
||||||
; Tertiary::LWin
|
|
||||||
|
|
||||||
$LCtrl::LWin
|
|
||||||
$LWin::LCtrl
|
|
||||||
|
|
||||||
; Hack to disable start menu on winkey
|
|
||||||
; $LCtrl up::Send {Ctrl down}{Primary up}{Ctrl up}
|
|
||||||
$LCtrl up::Send {Ctrl down}{LWin up}{Ctrl up}
|
|
||||||
|
|
||||||
; temporary hack to ensure keys don't get stuck
|
|
||||||
; impacts Alt-Tab fix
|
|
||||||
; Primary up::Send {LAlt up}{LCtrl up}
|
|
||||||
$LWin up::Send {LWin up}{LAlt up}{LCtrl up}
|
|
||||||
|
|
||||||
; Close Apps
|
|
||||||
^q::Send !{F4}
|
|
||||||
|
|
||||||
; Emoji Panel
|
|
||||||
#^Space::Send {LWin down};{LWin up}
|
|
||||||
|
|
||||||
; Full Screenshot
|
|
||||||
^+3::Send {PrintScreen}
|
|
||||||
|
|
||||||
; Region Screenshot
|
|
||||||
^+4::Send #+{S}
|
|
||||||
|
|
||||||
; wordwise support
|
|
||||||
$^Left::Send {Home}
|
|
||||||
$^+Left::Send +{Home}
|
|
||||||
$^Right::Send {End}
|
|
||||||
$^+Right::Send +{End}
|
|
||||||
^Up::Send ^{Home}
|
|
||||||
^+Up::Send ^+{Home}
|
|
||||||
^Down::Send ^{End}
|
|
||||||
^+Down::Send ^+{End}
|
|
||||||
^Backspace::Send +{Home}{Delete}
|
|
||||||
!Backspace::Send ^{Backspace}
|
|
||||||
!Left::Send ^{Left}
|
|
||||||
!+Left::Send ^+{Left}
|
|
||||||
!Right::Send ^{Right}
|
|
||||||
!+Right::Send ^+{Right}
|
|
||||||
|
|
||||||
; Cmd+Space Alternative
|
|
||||||
^Space::Send ^{Esc}
|
|
||||||
|
|
||||||
; ; Sublime Text Remaps for VS Code
|
|
||||||
#IfWinActive ahk_group vscode ; ST2CODE
|
|
||||||
; Remap Ctrl+Shift to behave like macOS Sublimetext
|
|
||||||
; Will extend cursor to multiple lines
|
|
||||||
#+Up::send ^!{Up} ; ST2CODE
|
|
||||||
#+Down::send ^!{Down} ; ST2CODE
|
|
||||||
; Remap Ctrl+Cmd+G to select all matches
|
|
||||||
#^g::send ^+{L} ; ST2CODE
|
|
||||||
#If ; ST2CODE
|
|
||||||
|
|
||||||
#IfWinActive ahk_exe sublime_text.exe
|
|
||||||
; Remap Ctrl+Shift to behave like macOS Sublimetext
|
|
||||||
; Will extend cursor to multiple lines
|
|
||||||
#+Up::send {shift up}^!{Up}
|
|
||||||
#+Down::send {shift up}^!{Down}
|
|
||||||
|
|
||||||
; Remap Ctrl+Cmd+G to select all matches
|
|
||||||
#^g::send !{F3}
|
|
||||||
#If
|
|
||||||
|
|
||||||
#IfWinActive ahk_group terminals
|
|
||||||
; Copy
|
|
||||||
^c::
|
|
||||||
SetKeyDelay -1
|
|
||||||
Send {Blind}{LShift down}{c DownTemp}
|
|
||||||
return
|
|
||||||
|
|
||||||
^c up::
|
|
||||||
SetKeyDelay -1
|
|
||||||
Send {Blind}{c Up}{LShift Up}
|
|
||||||
return
|
|
||||||
|
|
||||||
; Sigints - interrupt
|
|
||||||
$#c::Send {Ctrl down}c{Ctrl up}
|
|
||||||
|
|
||||||
; Paste
|
|
||||||
^v::
|
|
||||||
If WinActive("ahk_group posix"){
|
|
||||||
Send {Blind}{Shift down}v{Shift up}
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
Send {Blind}v
|
|
||||||
}
|
|
||||||
return
|
|
||||||
|
|
||||||
#If
|
|
||||||
|
|
||||||
#IfWinActive ahk_group posix
|
|
||||||
; Open/Close Tab for those that support it
|
|
||||||
$^t::
|
|
||||||
If not WinActive("ahk_group ConEmu"){
|
|
||||||
Send {LCtrl down}{LShift down}t{LCtrl Up}{LShift Up}
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
Send ^t
|
|
||||||
}
|
|
||||||
return
|
|
||||||
|
|
||||||
$^w::
|
|
||||||
If not WinActive("ahk_group ConEmu"){
|
|
||||||
Send {LCtrl down}{LShift down}w{LCtrl Up}{LShift Up}
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
Send ^w
|
|
||||||
}
|
|
||||||
return
|
|
||||||
|
|
||||||
; End of Line
|
|
||||||
^e::
|
|
||||||
SetKeyDelay -1
|
|
||||||
Send {Blind}{e DownTemp}
|
|
||||||
return
|
|
||||||
|
|
||||||
^e up::
|
|
||||||
SetKeyDelay -1
|
|
||||||
Send {Blind}{e Up}
|
|
||||||
return
|
|
||||||
|
|
||||||
; Beginning of Line
|
|
||||||
^a::
|
|
||||||
SetKeyDelay -1
|
|
||||||
Send {Blind}{a DownTemp}
|
|
||||||
return
|
|
||||||
|
|
||||||
^a up::
|
|
||||||
SetKeyDelay -1
|
|
||||||
Send {Blind}{a Up}
|
|
||||||
return
|
|
||||||
|
|
||||||
^l::Send clear{Enter}
|
|
||||||
; #l::return
|
|
||||||
; Clear Terminal and Scroll Buffer
|
|
||||||
^k::Send clear && printf '\e[3J'{Enter}
|
|
||||||
; Nano editor shortcuts
|
|
||||||
#g::Send {LCtrl down}g{LCtrl Up}
|
|
||||||
#k::Send {LCtrl down}k{LCtrl Up}
|
|
||||||
#x::Send {LCtrl down}x{LCtrl Up}
|
|
||||||
#o::Send {LCtrl down}o{LCtrl Up}
|
|
||||||
#r::Send {LCtrl down}r{LCtrl Up}
|
|
||||||
#w::Send {LCtrl down}w{LCtrl Up}
|
|
||||||
#\::Send {LCtrl down}\{LCtrl Up}
|
|
||||||
#u::Send {LCtrl down}u{LCtrl Up}
|
|
||||||
#j::Send {LCtrl down}j{LCtrl Up}
|
|
||||||
#t::Send {LCtrl down}t{LCtrl Up}
|
|
||||||
#_::Send {LCtrl down}_{LCtrl Up}
|
|
||||||
#z::Send {LCtrl down}z{LCtrl Up}
|
|
||||||
#y::Send {LCtrl down}y{LCtrl Up}
|
|
||||||
#v::Send {LCtrl down}v{LCtrl Up}
|
|
||||||
#If
|
|
||||||
|
|
||||||
; #IfWinActive ahk_group ConEmu
|
|
||||||
; ; Paste
|
|
||||||
; $^v::Send {Shift down}{Insert}{Shift Up}
|
|
||||||
; #v::Send {LCtrl down}v{LCtrl Up}
|
|
||||||
; #If
|
|
||||||
|
|
||||||
; #IfWinActive ahk_exe mintty.exe
|
|
||||||
; ; Copy
|
|
||||||
; $^c::Send {Control down}{Insert}{Control Up}
|
|
||||||
; #c::Send {LCtrl down}c{LCtrl Up}
|
|
||||||
; ; Paste
|
|
||||||
; $^v::Send {Shift down}{Insert}{Shift Up}
|
|
||||||
; #v::Send {LCtrl down}v{LCtrl Up}
|
|
||||||
; #If
|
|
||||||
|
|
||||||
;Disable win + l key locking (This line must come before any hotkey assignments in the .ahk file)
|
|
||||||
|
|
||||||
; Admin privileges required
|
|
||||||
; Sets Workstation Lock to not occur on Win+L
|
|
||||||
; RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Policies\System, DisableLockWorkstation, 1
|
|
||||||
|
|
||||||
; Re-enables Workstation lock on Ctrl+Cmd+Q
|
|
||||||
; Need to Remove Quick Assist and reboot
|
|
||||||
; Remove-WindowsCapability -online -name App.Support.QuickAssist~~~~0.0.1.0
|
|
||||||
; #^q::
|
|
||||||
; re-enable locking workstation, then lock it
|
|
||||||
; RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Policies\System, DisableLockWorkstation, 0
|
|
||||||
; DllCall("LockWorkStation")
|
|
||||||
; Reload script to relock Workstation Lock
|
|
||||||
; Reload
|
|
||||||
;return
|
|
22
windows/toggle_kb.bat
Normal file
22
windows/toggle_kb.bat
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
@echo off
|
||||||
|
|
||||||
|
IF "%1"=="mac" goto mac
|
||||||
|
IF "%1"=="win" goto win
|
||||||
|
|
||||||
|
echo Not found.
|
||||||
|
goto commonexit
|
||||||
|
|
||||||
|
:win
|
||||||
|
perl -pi -e "s/(; )(.*)(; WinModifiers)/$2$3/g" "%userprofile%\.kinto\kinto.ahk"
|
||||||
|
perl -pi -e "s/^(?!;)(.*)(; MacModifiers)/; $1$2/gm" "%userprofile%\.kinto\kinto.ahk"
|
||||||
|
"C:\Program Files\AutoHotkey\AutoHotkey.exe" "%userprofile%\.kinto\kinto.ahk"
|
||||||
|
goto commonexit
|
||||||
|
|
||||||
|
:mac
|
||||||
|
perl -pi -e "s/(; )(.*)(; MacModifiers)/$2$3/g" "%userprofile%\.kinto\kinto.ahk"
|
||||||
|
perl -pi -e "s/^(?!;)(.*)(; WinModifiers)/; $1$2/gm" "%userprofile%\.kinto\kinto.ahk"
|
||||||
|
"C:\Program Files\AutoHotkey\AutoHotkey.exe" "%userprofile%\.kinto\kinto.ahk"
|
||||||
|
goto commonexit
|
||||||
|
|
||||||
|
:commonexit
|
||||||
|
exit
|
@@ -1,258 +0,0 @@
|
|||||||
SetTitleMatchMode, 2
|
|
||||||
|
|
||||||
GroupAdd, terminals, ahk_exe ubuntu.exe
|
|
||||||
GroupAdd, terminals, ahk_exe ConEmu.exe
|
|
||||||
GroupAdd, terminals, ahk_exe ConEmu64.exe
|
|
||||||
GroupAdd, terminals, ahk_exe powershell.exe
|
|
||||||
GroupAdd, terminals, ahk_exe WindowsTerminal.exe
|
|
||||||
GroupAdd, terminals, ahk_exe Hyper.exe
|
|
||||||
GroupAdd, terminals, ahk_exe Cmd.exe
|
|
||||||
GroupAdd, terminals, Fluent Terminal ahk_class ApplicationFrameWindow
|
|
||||||
|
|
||||||
GroupAdd, posix, ahk_exe ubuntu.exe
|
|
||||||
GroupAdd, posix, ahk_exe ConEmu.exe
|
|
||||||
GroupAdd, posix, ahk_exe ConEmu64.exe
|
|
||||||
GroupAdd, posix, ahk_exe Hyper.exe
|
|
||||||
GroupAdd, posix, ahk_exe mintty.exe
|
|
||||||
GroupAdd, posix, Fluent Terminal ahk_class ApplicationFrameWindow
|
|
||||||
|
|
||||||
GroupAdd, ConEmu, ahk_exe ConEmu.exe
|
|
||||||
GroupAdd, ConEmu, ahk_exe ConEmu64.exe
|
|
||||||
GroupAdd, ConEmu, ahk_exe WindowsTerminal.exe
|
|
||||||
|
|
||||||
GroupAdd, editors, ahk_exe sublime_text.exe
|
|
||||||
GroupAdd, editors, ahk_exe VSCodium.exe
|
|
||||||
GroupAdd, editors, ahk_exe Code.exe
|
|
||||||
|
|
||||||
GroupAdd, vscode, ahk_exe VSCodium.exe
|
|
||||||
GroupAdd, vscode, ahk_exe Code.exe
|
|
||||||
|
|
||||||
; New AltTab and CtrlTab fix
|
|
||||||
*tab::
|
|
||||||
{
|
|
||||||
; if (GetKeyState("Tertiary", "P") AND GetKeyState("LShift", "P") = false) {
|
|
||||||
if (GetKeyState("LCtrl", "P") AND GetKeyState("LShift", "P") = false) {
|
|
||||||
; Send {LCtrl down}{Secondary up}{tab}
|
|
||||||
Send {LCtrl down}{LWin up}{tab}
|
|
||||||
KeyWait, tab
|
|
||||||
; } else if (GetKeyState("Tertiary", "P") AND GetKeyState("LShift", "P")) {
|
|
||||||
} else if (GetKeyState("LCtrl", "P") AND GetKeyState("LShift", "P")) {
|
|
||||||
; Send {LCtrl down}{Secondary up}{LShift down}{tab}
|
|
||||||
Send {LCtrl down}{LWin up}{LShift down}{tab}
|
|
||||||
KeyWait, tab
|
|
||||||
; return
|
|
||||||
; } else if (GetKeyState("Primary", "P") AND GetKeyState("LShift", "P") = false) {
|
|
||||||
} else if (GetKeyState("LAlt", "P") AND GetKeyState("LShift", "P") = false) {
|
|
||||||
Send {LAlt down}{tab}
|
|
||||||
KeyWait, tab
|
|
||||||
; ; } else if (GetKeyState("Primary", "P") AND GetKeyState("LShift", "P")) {
|
|
||||||
} else if (GetKeyState("LAlt", "P") AND GetKeyState("LShift", "P")) {
|
|
||||||
Send {LAlt down}{LShift down}{tab}
|
|
||||||
KeyWait, tab
|
|
||||||
; } else if (GetKeyState("Secondary", "P") AND GetKeyState("LShift", "P")) {
|
|
||||||
} else if (GetKeyState("LWin", "P") AND GetKeyState("LShift", "P")) = false {
|
|
||||||
return
|
|
||||||
; } else if (GetKeyState("Secondary", "P") AND GetKeyState("LShift", "P")) {
|
|
||||||
} else if (GetKeyState("LWin", "P") AND GetKeyState("LShift", "P")) {
|
|
||||||
return
|
|
||||||
} else {
|
|
||||||
send {Blind}{tab}
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
tab::Send {tab}
|
|
||||||
|
|
||||||
+tab::Send {Shift down}{tab}{Shift up}
|
|
||||||
|
|
||||||
; Basic Remap
|
|
||||||
;
|
|
||||||
; Primary::LCtrl
|
|
||||||
; Secondary::LAlt
|
|
||||||
; Tertiary::LWin
|
|
||||||
|
|
||||||
$LAlt::LCtrl
|
|
||||||
$LWin::LAlt
|
|
||||||
$LCtrl::LWin
|
|
||||||
|
|
||||||
; Hack to disable start menu on winkey
|
|
||||||
; $LCtrl up::Send {Ctrl down}{LWin up}{Ctrl up}
|
|
||||||
$LCtrl up::Send {Ctrl down}{LWin up}{Ctrl up}
|
|
||||||
|
|
||||||
; temporary hack to ensure keys don't get stuck
|
|
||||||
; impacts Alt-Tab fix
|
|
||||||
; Primary up::Send {LAlt up}{LCtrl up}
|
|
||||||
$LAlt up::Send {LWin up}{LAlt up}{LCtrl up}
|
|
||||||
; $LWin up::Send {LWin down}{LAlt up}{LCtrl up}{LWin up}
|
|
||||||
|
|
||||||
; Close Apps
|
|
||||||
^q::Send !{F4}
|
|
||||||
|
|
||||||
; Emoji Panel
|
|
||||||
#^Space::Send {LWin down};{LWin up}
|
|
||||||
|
|
||||||
; Full Screenshot
|
|
||||||
^+3::Send {PrintScreen}
|
|
||||||
|
|
||||||
; Region Screenshot
|
|
||||||
^+4::Send #+{S}
|
|
||||||
|
|
||||||
; wordwise support
|
|
||||||
$^Left::Send {Home}
|
|
||||||
$^+Left::Send +{Home}
|
|
||||||
$^Right::Send {End}
|
|
||||||
$^+Right::Send +{End}
|
|
||||||
^Up::Send ^{Home}
|
|
||||||
^+Up::Send ^+{Home}
|
|
||||||
^Down::Send ^{End}
|
|
||||||
^+Down::Send ^+{End}
|
|
||||||
^Backspace::Send +{Home}{Delete}
|
|
||||||
!Backspace::Send ^{Backspace}
|
|
||||||
!Left::Send ^{Left}
|
|
||||||
!+Left::Send ^+{Left}
|
|
||||||
!Right::Send ^{Right}
|
|
||||||
!+Right::Send ^+{Right}
|
|
||||||
|
|
||||||
; Cmd+Space Alternative
|
|
||||||
^Space::Send ^{Esc}
|
|
||||||
|
|
||||||
; ; Sublime Text Remaps for VS Code
|
|
||||||
#IfWinActive ahk_group vscode ; ST2CODE
|
|
||||||
; Remap Ctrl+Shift to behave like macOS Sublimetext
|
|
||||||
; Will extend cursor to multiple lines
|
|
||||||
#+Up::send ^!{Up} ; ST2CODE
|
|
||||||
#+Down::send ^!{Down} ; ST2CODE
|
|
||||||
; Remap Ctrl+Cmd+G to select all matches
|
|
||||||
#^g::send ^+{L} ; ST2CODE
|
|
||||||
#If ; ST2CODE
|
|
||||||
|
|
||||||
#IfWinActive ahk_exe sublime_text.exe
|
|
||||||
; Remap Ctrl+Shift to behave like macOS Sublimetext
|
|
||||||
; Will extend cursor to multiple lines
|
|
||||||
#+Up::send {shift up}^!{Up}
|
|
||||||
#+Down::send {shift up}^!{Down}
|
|
||||||
|
|
||||||
; Remap Ctrl+Cmd+G to select all matches
|
|
||||||
#^g::send !{F3}
|
|
||||||
#If
|
|
||||||
|
|
||||||
#IfWinActive ahk_group terminals
|
|
||||||
; Copy
|
|
||||||
^c::
|
|
||||||
SetKeyDelay -1
|
|
||||||
Send {Ctrl down}{Shift down}{c DownTemp}
|
|
||||||
return
|
|
||||||
|
|
||||||
^c up::
|
|
||||||
SetKeyDelay -1
|
|
||||||
Send {c Up}{Ctrl up}{Shift up}
|
|
||||||
return
|
|
||||||
|
|
||||||
; Sigints - interrupt
|
|
||||||
$#c::Send {Ctrl down}c{Ctrl up}
|
|
||||||
|
|
||||||
; Paste
|
|
||||||
^v::
|
|
||||||
If WinActive("ahk_group posix"){
|
|
||||||
Send {Blind}{Shift down}v{Shift up}
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
Send {Blind}v
|
|
||||||
}
|
|
||||||
return
|
|
||||||
#If
|
|
||||||
|
|
||||||
#IfWinActive ahk_group posix
|
|
||||||
; Open/Close Tab for those that support it
|
|
||||||
$^t::
|
|
||||||
If not WinActive("ahk_group ConEmu"){
|
|
||||||
Send {LCtrl down}{LShift down}t{LCtrl Up}{LShift Up}
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
Send ^t
|
|
||||||
}
|
|
||||||
return
|
|
||||||
|
|
||||||
$^w::
|
|
||||||
If not WinActive("ahk_group ConEmu"){
|
|
||||||
Send {LCtrl down}{LShift down}w{LCtrl Up}{LShift Up}
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
Send ^w
|
|
||||||
}
|
|
||||||
return
|
|
||||||
|
|
||||||
; End of Line
|
|
||||||
^e::
|
|
||||||
SetKeyDelay -1
|
|
||||||
Send {Blind}{e DownTemp}
|
|
||||||
return
|
|
||||||
|
|
||||||
^e up::
|
|
||||||
SetKeyDelay -1
|
|
||||||
Send {Blind}{e Up}
|
|
||||||
return
|
|
||||||
|
|
||||||
; Beginning of Line
|
|
||||||
^a::
|
|
||||||
SetKeyDelay -1
|
|
||||||
Send {Blind}{a DownTemp}
|
|
||||||
return
|
|
||||||
|
|
||||||
^a up::
|
|
||||||
SetKeyDelay -1
|
|
||||||
Send {Blind}{a Up}
|
|
||||||
return
|
|
||||||
|
|
||||||
^l::Send clear{Enter}
|
|
||||||
; #l::return
|
|
||||||
; Clear Terminal and Scroll Buffer
|
|
||||||
^k::Send clear && printf '\e[3J'{Enter}
|
|
||||||
; Nano editor shortcuts
|
|
||||||
#g::Send {LCtrl down}g{LCtrl Up}
|
|
||||||
#k::Send {LCtrl down}k{LCtrl Up}
|
|
||||||
#x::Send {LCtrl down}x{LCtrl Up}
|
|
||||||
#o::Send {LCtrl down}o{LCtrl Up}
|
|
||||||
#r::Send {LCtrl down}r{LCtrl Up}
|
|
||||||
#w::Send {LCtrl down}w{LCtrl Up}
|
|
||||||
#\::Send {LCtrl down}\{LCtrl Up}
|
|
||||||
#u::Send {LCtrl down}u{LCtrl Up}
|
|
||||||
#j::Send {LCtrl down}j{LCtrl Up}
|
|
||||||
#t::Send {LCtrl down}t{LCtrl Up}
|
|
||||||
#_::Send {LCtrl down}_{LCtrl Up}
|
|
||||||
#z::Send {LCtrl down}z{LCtrl Up}
|
|
||||||
#y::Send {LCtrl down}y{LCtrl Up}
|
|
||||||
#v::Send {LCtrl down}v{LCtrl Up}
|
|
||||||
#If
|
|
||||||
|
|
||||||
; #IfWinActive ahk_group ConEmu
|
|
||||||
; ; Paste
|
|
||||||
; $^v::Send {Shift down}{Insert}{Shift Up}
|
|
||||||
; #v::Send {LCtrl down}v{LCtrl Up}
|
|
||||||
; #If
|
|
||||||
|
|
||||||
; #IfWinActive ahk_exe mintty.exe
|
|
||||||
; ; Copy
|
|
||||||
; $^c::Send {Control down}{Insert}{Control Up}
|
|
||||||
; #c::Send {LCtrl down}c{LCtrl Up}
|
|
||||||
; ; Paste
|
|
||||||
; $^v::Send {Shift down}{Insert}{Shift Up}
|
|
||||||
; #v::Send {LCtrl down}v{LCtrl Up}
|
|
||||||
; #If
|
|
||||||
|
|
||||||
;Disable win + l key locking (This line must come before any hotkey assignments in the .ahk file)
|
|
||||||
|
|
||||||
; Admin privileges required
|
|
||||||
; Sets Workstation Lock to not occur on Win+L
|
|
||||||
; RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Policies\System, DisableLockWorkstation, 1
|
|
||||||
|
|
||||||
; Re-enables Workstation lock on Ctrl+Cmd+Q
|
|
||||||
; Need to Remove Quick Assist and reboot
|
|
||||||
; Remove-WindowsCapability -online -name App.Support.QuickAssist~~~~0.0.1.0
|
|
||||||
; #^q::
|
|
||||||
; re-enable locking workstation, then lock it
|
|
||||||
; RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Policies\System, DisableLockWorkstation, 0
|
|
||||||
; DllCall("LockWorkStation")
|
|
||||||
; Reload script to relock Workstation Lock
|
|
||||||
; Reload
|
|
||||||
;return
|
|
Reference in New Issue
Block a user