AutoHotkey: ScrollLock functionality
Jump to navigation
Jump to search
; Total Commander: ; Scroll without moving the cursor if ScrollLock is turned on. $Down:: TCScroll( 1 ) $Up:: TCScroll( 0 ) TCScroll( xnDirecton ) { GetKeyState, sScrollLockState, ScrollLock, T if (not WinActive( "ahk_class TTOTAL_CMD" )) or (sScrollLockState != "D") { if (xnDirecton = 1) Send {Down} else Send {Up} Return } ControlGetFocus sActivePanel, A PostMessage 0x115, xnDirecton, 0, %sActivePanel%, A Return } ; Scroll, keeping the cursor in place ^+Down:: TCScrollKeep( 1 ) ^+Up:: TCScrollKeep( 0 ) TCScrollKeep( xnDirecton ) { if WinActive( "ahk_class TTOTAL_CMD" ) { if xnDirecton = 1 Send {Down} else Send {Up} ControlGetFocus sActivePanel, A PostMessage 0x115, xnDirecton, 0, %sActivePanel%, A } Return }
Back to AutoHotkey