AutoHotkey: Keyboard navigation for Background Transfer Manager
Jump to navigation
Jump to search
; ////////////////////////////////////////////////////////////////////////////
; // TC_BTM_keyboard-navigation.ahk (W) StatusQuo 2008 for TC 7.03
; //
; // adds keyboard navigation to background transfer manager:
; // (Shift+)TAB, Del
; ////////////////////////////////////////////////////////////////////////////
#SingleInstance, Force
asControlNames := "ListBox1,Button1,Button2,Button3,Button4,Edit1,ListBox1"
Return
#IfWinActive, ahk_class DOWNDLGLIST2
Del:: ; === Remove selected download job(s)
Send, {NumpadSub}
Return
Tab:: ; === Focus next control in %asControlNames%
ControlGetFocus, sFocus
sLastControl := ""
Loop, Parse, asControlNames, `,
{
if (sFocus = "") ; no focus at all
{
ControlFocus, ListBox1
Break
}
if (sLastControl = sFocus)
{
ControlFocus, %A_LoopField%
Break
}
sLastControl := A_LoopField
}
Return
+Tab:: ; === Focus previous control in %asControlNames%
ControlGetFocus, sFocus
sLastControl := ""
Loop, Parse, asControlNames, `,
{
if (sFocus = "") ; no focus at all
{
ControlFocus, ListBox1
Break
}
if (A_LoopField = sFocus)
and (sLastControl != "")
{
ControlFocus, %sLastControl%
Break
}
sLastControl := A_LoopField
}
Return
#IfWinActive
;
Back to AutoHotkey