- Ensure Kinto is disabled on Windows during VirtualBox usage

This commit is contained in:
Ben Reaves
2020-08-04 20:17:27 -05:00
parent f37d7d09ec
commit 72f2f93657

View File

@@ -118,6 +118,11 @@ GroupAdd, editors, ahk_exe Code.exe
GroupAdd, browsers, ahk_exe chrome.exe GroupAdd, browsers, ahk_exe chrome.exe
GroupAdd, browsers, ahk_exe opera.exe GroupAdd, browsers, ahk_exe opera.exe
GroupAdd, browsers, ahk_exe firefox.exe GroupAdd, browsers, ahk_exe firefox.exe
; Disable Key Remapping for Virtual Machines
; Disable for Remote desktop solutions too
GroupAdd, virtm, ahk_exe VirtualBoxVM.exe
; Disabled Edge for now - no ability to close all instances ; Disabled Edge for now - no ability to close all instances
; GroupAdd, browsers, Microsoft Edge ahk_class ApplicationFrameWindow ; GroupAdd, browsers, Microsoft Edge ahk_class ApplicationFrameWindow
@@ -129,146 +134,148 @@ GroupAdd, vstudio, ahk_exe devenv.exe
GroupAdd, intellij, ahk_exe idea.exe GroupAdd, intellij, ahk_exe idea.exe
GroupAdd, intellij, ahk_exe idea64.exe GroupAdd, intellij, ahk_exe idea64.exe
; New AltTab and CtrlTab fix #IfWinNotActive ahk_group virtm
*tab::
{ ; New AltTab and CtrlTab fix
*tab::
{
; Tertiary ; Tertiary
if (GetKeyState("LCtrl", "P") AND GetKeyState("LShift", "P") = false) { if (GetKeyState("LCtrl", "P") AND GetKeyState("LShift", "P") = false) {
; Secondary ; Secondary
; Send {LCtrl down}{Secondary up}{tab} ; Send {LCtrl down}{Secondary up}{tab}
; Send {LCtrl down}{LWin up}{tab} ; WinModifiers ; Send {LCtrl down}{LWin up}{tab} ; WinModifiers
; Send {LCtrl down}{LAlt up}{tab} ; MacModifiers ; Send {LCtrl down}{LAlt up}{tab} ; MacModifiers
KeyWait, tab KeyWait, tab
; Tertiary ; Tertiary
} else if (GetKeyState("LCtrl", "P") AND GetKeyState("LShift", "P")) { } else if (GetKeyState("LCtrl", "P") AND GetKeyState("LShift", "P")) {
; Secondary ; Secondary
; Send {LCtrl down}{Secondary up}{LShift down}{tab} ; Send {LCtrl down}{Secondary up}{LShift down}{tab}
; Send {LCtrl down}{LWin up}{LShift down}{tab} ; WinModifiers ; Send {LCtrl down}{LWin up}{LShift down}{tab} ; WinModifiers
; Send {LCtrl down}{LAlt up}{LShift down}{tab} ; MacModifiers ; Send {LCtrl down}{LAlt up}{LShift down}{tab} ; MacModifiers
KeyWait, tab KeyWait, tab
; Primary ; Primary
; } else if (GetKeyState("LAlt", "P") AND GetKeyState("LShift", "P") = false) { ; WinModifiers ; } else if (GetKeyState("LAlt", "P") AND GetKeyState("LShift", "P") = false) { ; WinModifiers
; } else if (GetKeyState("LWin", "P") AND GetKeyState("LShift", "P") = false) { ; MacModifiers ; } else if (GetKeyState("LWin", "P") AND GetKeyState("LShift", "P") = false) { ; MacModifiers
Send {LAlt down}{tab} Send {LAlt down}{tab}
KeyWait, tab KeyWait, tab
; Primary ; Primary
; } else if (GetKeyState("LAlt", "P") AND GetKeyState("LShift", "P")) { ; WinModifiers ; } else if (GetKeyState("LAlt", "P") AND GetKeyState("LShift", "P")) { ; WinModifiers
; } else if (GetKeyState("LWin", "P") AND GetKeyState("LShift", "P")) { ; MacModifiers ; } else if (GetKeyState("LWin", "P") AND GetKeyState("LShift", "P")) { ; MacModifiers
Send {LAlt down}{LShift down}{tab} Send {LAlt down}{LShift down}{tab}
KeyWait, tab KeyWait, tab
; Secondary ; Secondary
; } else if (GetKeyState("LWin", "P") AND GetKeyState("LShift", "P")) = false { ; WinModifiers ; } else if (GetKeyState("LWin", "P") AND GetKeyState("LShift", "P")) = false { ; WinModifiers
; } else if (GetKeyState("LAlt", "P") AND GetKeyState("LShift", "P") = false) { ; MacModifiers ; } else if (GetKeyState("LAlt", "P") AND GetKeyState("LShift", "P") = false) { ; MacModifiers
return return
; Secondary ; Secondary
; } else if (GetKeyState("LWin", "P") AND GetKeyState("LShift", "P")) { ; WinModifiers ; } else if (GetKeyState("LWin", "P") AND GetKeyState("LShift", "P")) { ; WinModifiers
; } else if (GetKeyState("LAlt", "P") AND GetKeyState("LShift", "P")) { ; MacModifiers ; } else if (GetKeyState("LAlt", "P") AND GetKeyState("LShift", "P")) { ; MacModifiers
return return
} else { } else {
send {Blind}{tab} send {Blind}{tab}
} }
return return
} }
tab::Send {tab} tab::Send {tab}
+tab::Send {Shift down}{tab}{Shift up} +tab::Send {Shift down}{tab}{Shift up}
; Basic Remap ; Basic Remap
; ;
; Primary::LCtrl ; Primary::LCtrl
; Secondary::LAlt ; Secondary::LAlt
; Tertiary::LWin ; Tertiary::LWin
; $LAlt::LCtrl ; WinModifiers ; $LAlt::LCtrl ; WinModifiers
; $RAlt::RCtrl ; WinModifiers ; $RAlt::RCtrl ; WinModifiers
; $LWin::LAlt ; WinModifiers ; $LWin::LAlt ; WinModifiers
; $LCtrl::LWin ; WinModifiers ; $LCtrl::LWin ; WinModifiers
; $LWin::LCtrl ; MacModifiers ; $LWin::LCtrl ; MacModifiers
; $RWin::RCtrl ; MacModifiers ; $RWin::RCtrl ; MacModifiers
; $LCtrl::LWin ; MacModifiers ; $LCtrl::LWin ; MacModifiers
; Hack to disable start menu on winkey ; Hack to disable start menu on winkey
; Static ; Static
$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 ; temporary hack to ensure keys don't get stuck
; impacts Alt-Tab fix ; impacts Alt-Tab fix
; Primary ; Primary
; $LAlt up::Send {LWin up}{LAlt up}{LCtrl up} ; WinModifiers ; $LAlt up::Send {LWin up}{LAlt up}{LCtrl up} ; WinModifiers
; $LWin up::Send {LWin up}{LAlt up}{LCtrl up} ; MacModifiers ; $LWin up::Send {LWin up}{LAlt up}{LCtrl up} ; MacModifiers
; Close Apps ; Close Apps
^q::Send !{F4} ^q::Send !{F4}
; Minimize specific Window ; Minimize specific Window
^m::WinMinimize, A ^m::WinMinimize, A
; Minimize all but Active Window ; Minimize all but Active Window
!^m:: !^m::
WinGet, winid ,, A WinGet, winid ,, A
WinMinimizeAll WinMinimizeAll
WinActivate ahk_id %winid% WinActivate ahk_id %winid%
return return
; hide all instances of active Program ; hide all instances of active Program
^h:: ^h::
WinGetClass, class, A WinGetClass, class, A
WinGet, AllWindows, List WinGet, AllWindows, List
loop %AllWindows% { loop %AllWindows% {
WinGetClass, WinClass, % "ahk_id " AllWindows%A_Index% WinGetClass, WinClass, % "ahk_id " AllWindows%A_Index%
if(InStr(WinClass,class)){ if(InStr(WinClass,class)){
WinMinimize, % "ahk_id " AllWindows%A_Index% WinMinimize, % "ahk_id " AllWindows%A_Index%
} }
} }
return return
; hide all but active program ; hide all but active program
!^h:: !^h::
WinGetClass, class, A WinGetClass, class, A
WinMinimizeAll WinMinimizeAll
WinGet, AllWindows, List WinGet, AllWindows, List
loop %AllWindows% { loop %AllWindows% {
WinGetClass, WinClass, % "ahk_id " AllWindows%A_Index% WinGetClass, WinClass, % "ahk_id " AllWindows%A_Index%
if(InStr(WinClass,class)){ if(InStr(WinClass,class)){
WinRestore, % "ahk_id " AllWindows%A_Index% WinRestore, % "ahk_id " AllWindows%A_Index%
} }
} }
return return
; Show Desktop ; Show Desktop
^F3::Send #d ^F3::Send #d
; Emoji Panel ; Emoji Panel
#^Space::Send {LWin down};{LWin up} #^Space::Send {LWin down};{LWin up}
; Full Screenshot ; Full Screenshot
^+3::Send {PrintScreen} ^+3::Send {PrintScreen}
; Region Screenshot ; Region Screenshot
^+4::Send #+{S} ^+4::Send #+{S}
; wordwise support ; wordwise support
$^Left::Send {Home} $^Left::Send {Home}
$^+Left::Send +{Home} $^+Left::Send +{Home}
$^Right::Send {End} $^Right::Send {End}
$^+Right::Send +{End} $^+Right::Send +{End}
^Up::Send ^{Home} ^Up::Send ^{Home}
^+Up::Send ^+{Home} ^+Up::Send ^+{Home}
^Down::Send ^{End} ^Down::Send ^{End}
^+Down::Send ^+{End} ^+Down::Send ^+{End}
^Backspace::Send +{Home}{Delete} ^Backspace::Send +{Home}{Delete}
!Backspace::Send ^{Backspace} !Backspace::Send ^{Backspace}
!Left::Send ^{Left} !Left::Send ^{Left}
!+Left::Send ^+{Left} !+Left::Send ^+{Left}
!Right::Send ^{Right} !Right::Send ^{Right}
!+Right::Send ^+{Right} !+Right::Send ^+{Right}
; Cmd+Space Alternative ; Cmd+Space Alternative
^Space::Send ^{Esc} ^Space::Send ^{Esc}
#IfWinActive ahk_group intellij #IfWinActive ahk_group intellij
; General ; General
^0::Send !{0} ;Open corresponding tool window ^0::Send !{0} ;Open corresponding tool window
^1::Send !{1} ;Open corresponding tool window ^1::Send !{1} ;Open corresponding tool window
@@ -354,27 +361,27 @@ $^+Right::Send +{End}
#+d::Send ^+{F9} ;Debug context configuration from editor #+d::Send ^+{F9} ;Debug context configuration from editor
; VCS/Local History ; VCS/Local History
#v::Send !` ;VCS quick popup #v::Send !` ;VCS quick popup
#If #If
; Close all browsers ; Close all browsers
#IfWinActive ahk_group browsers #IfWinActive ahk_group browsers
^q::send {Alt Down}f{Alt Up}x ; exit all windows ^q::send {Alt Down}f{Alt Up}x ; exit all windows
#If #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
; 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
!+g::send ^+{G} ; View source control !+g::send ^+{G} ; View source control
; Sigints - interrupt ; Sigints - interrupt
$#c::Send {Ctrl down}c{Ctrl up} $#c::Send {Ctrl down}c{Ctrl up}
#If #If
#IfWinActive ahk_exe sublime_text.exe #IfWinActive ahk_exe sublime_text.exe
#^Up::send !{O} ; Switch file #^Up::send !{O} ; Switch file
#^f::send {F11} ; toggle_full_screen #^f::send {F11} ; toggle_full_screen
^!v::send {Ctrl Down}k{Ctrl Up}{Ctrl Down}v{Ctrl Up} ; paste_from_history ^!v::send {Ctrl Down}k{Ctrl Up}{Ctrl Down}v{Ctrl Up} ; paste_from_history
@@ -429,9 +436,9 @@ $^+Right::Send +{End}
^!8::send !+8 ; set_layout ^!8::send !+8 ; set_layout
!+9::Return ; cancel set_layout !+9::Return ; cancel set_layout
^!9::send !+9 ; set_layout ^!9::send !+9 ; set_layout
#If #If
#IfWinActive ahk_group terminals #IfWinActive ahk_group terminals
; End of Line ; End of Line
#e:: #e::
@@ -469,9 +476,9 @@ $^+Right::Send +{End}
Send {Blind}v Send {Blind}v
} }
return return
#If #If
#IfWinActive ahk_group posix #IfWinActive ahk_group posix
; Open/Close Tab for those that support it ; Open/Close Tab for those that support it
$^t:: $^t::
If not WinActive("ahk_group ConEmu"){ If not WinActive("ahk_group ConEmu"){
@@ -510,4 +517,5 @@ $^+Right::Send +{End}
#z::Send {LCtrl down}z{LCtrl Up} #z::Send {LCtrl down}z{LCtrl Up}
#y::Send {LCtrl down}y{LCtrl Up} #y::Send {LCtrl down}y{LCtrl Up}
#v::Send {LCtrl down}v{LCtrl Up} #v::Send {LCtrl down}v{LCtrl Up}
#If
#If #If