Last active
March 10, 2023 19:24
-
-
Save ncronquist/8de841dbefa9f21e1a50854d2f48d1c9 to your computer and use it in GitHub Desktop.
AutoHotKey Script to Support Em Dash and Moving Windows Across Virtual Desktops
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;#SETUP START | |
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. | |
#SingleInstance force | |
ListLines Off | |
SetBatchLines -1 | |
SendMode Input ; Recommended for new scripts due to its superior speed and reliability. | |
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. | |
#KeyHistory 0 | |
#WinActivateForce | |
Process, Priority,, H | |
SetWinDelay -1 | |
SetControlDelay -1 | |
;include the library | |
#Include VD.ahk | |
; VD.init() ;COMMENT OUT `static dummyStatic1 := VD.init()` if you don't want to init at start of script | |
;you should WinHide invisible programs that have a window. | |
WinHide, % "Malwarebytes Tray Application" | |
;#SETUP END | |
!-:: | |
Send, — | |
return | |
VD.createUntil(3) ;create until we have at least 3 VD | |
return | |
^#+Left:: | |
n := VD.getCurrentDesktopNum() | |
if n = 1 | |
{ | |
Return | |
} | |
n -= 1 | |
VD.MoveWindowToDesktopNum("A",n), VD.goToDesktopNum(n) | |
Return | |
^#+Right:: | |
n := VD.getCurrentDesktopNum() | |
if n = % VD.getCount() | |
{ | |
Return | |
} | |
n += 1 | |
VD.MoveWindowToDesktopNum("A",n), VD.goToDesktopNum(n) | |
Return |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Shortcuts from this Script
alt
+-
Win
+Ctrl
+Shift
+→
: Move current window to the next desktopWin
+Ctrl
+Shift
+←
: Move current window to the previous desktopSetup
Instructions pulled from https://superuser.com/a/1728476/706553