Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I change the keys to change desktop in windows 10 with autohotkey?

Windows 10 has finally multi desktops, you can switch desktops with ctrl+win+right (or left) keys. It's a nice feature, but you have two use two hands to switch desktops. I'm trying to map the keys like this with autohotkey so I can use just one hand and keep the other one in the mouse..

ctrl + mouse wheel up   --> ctrl + win + right
ctrl + mouse wheel down --> ctrl + win + left

the message box comes up so the ctrl + wheel up is working, but it doesn't switches desktops.

~LControl & WheelUp::
MsgBox, Go to desktop right.
Send, {ctrl up}{lwin ctrl righ}
return

~LControl & WheelDown::
MsgBox, Go to desktop left.
Send, {ctrl up}{lwin ctrl left}
return

Any idea why is this not working?.

like image 778
Fabman Avatar asked Sep 20 '15 23:09

Fabman


People also ask

What is the hotkey to change desktops?

You can also quickly switch desktops without going into the Task View pane by using the keyboard shortcuts Windows Key + Ctrl + Left Arrow and Windows Key + Ctrl + Right Arrow.


1 Answers

You can easily switch between two virtual desktops in Windows 10 by using Ctrl+Win+ or Ctrl+Win+ shortcuts.

But to make this even simpler and easy to use I’ve made this Autohotkey script to toggle betweeen two virtual desktops by just using the (`) key which is the least used key in keyboard.

`::
if (Toggle := !Toggle)
    Send #^{right}
else
    Send #^{left}
return

Note:- This script works for switching between two desktops only. For creating another virtual desktop you can use the shortcut Ctrl+Win+D.

like image 125
insearchofcode Avatar answered Sep 21 '22 16:09

insearchofcode