Skip to content

Instantly share code, notes, and snippets.

@yiboyang
Created July 19, 2016 01:57
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save yiboyang/1d5cc711b7567ed1e8e8c65bd73b4f90 to your computer and use it in GitHub Desktop.
Save yiboyang/1d5cc711b7567ed1e8e8c65bd73b4f90 to your computer and use it in GitHub Desktop.
Remap Windows10's virtual desktop switcher key combo to Unity's "Ctrl + Alt + Left/Right"
;
; AutoHotkey Version: 1.1
; Language: English
; Platform: Win9x/NT
; Author: Yibo Yang
;
; Script Function:
; Remap Windows10's virtual desktop switcher keyboard shortcut from the default "Ctrl + Win + Left/Right" to Unity's "Ctrl + Alt + Left/Right"
; Put into the startup folder so that it will run every time your computer starts (http://superuser.com/questions/948616/windows-10-change-shortcut-keys-to-switch-between-desktops)
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#NoTrayIcon
!^Left:: send {LWin down}{LCtrl down}{Left}{LWin up}{LCtrl up}
!^Right:: send {LWin down}{LCtrl down}{Right}{LWin up}{LCtrl up}
@xxKeith20xx
Copy link

xxKeith20xx commented Jan 16, 2018

Excellent, thank you! I've created the following for alt mouse wheel up/down (something I'm used to in openbox):

!WheelUp:: send {LWin down}{LCtrl down}{Left}{LWin up}{LCtrl up}
!WheelDown:: send {LWin down}{LCtrl down}{Right}{LWin up}{LCtrl up}

Also, see https://github.com/Eun/MoveToDesktop

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment