pmb6tz / windows-desktop-switcher

An AutoHotKey script for Windows that lets a user change virtual desktops by pressing CapsLock + <num>.
MIT License
1.23k stars 230 forks source link

Added functions to cycle through all desktops. #14

Closed GioBonvi closed 5 years ago

GioBonvi commented 7 years ago

Switching right on the last desktop will take you to the first one, switching left on the first desktop will take you to the last one.

This will cause all the desktop the application to scroll through all the visible desktops: it can be quite disturbing depending on personal taste, number of desktops and SetKeyDelay value.

I work with 4 desktops and personally like a 200 ms interval, so that it all happens in less than a second, but it is not so fast that it looks like a glitch.

Perlence commented 7 years ago

@GioBonvi Did you try to set SendMode Input? It's more reliable and faster than default SendEvent mode, as it isn't a delay based method. I'd like to know your experience with it.

GioBonvi commented 7 years ago

@Perlence Thank you for the input: I hadn't tried it, but now I have adn the results are quite similar to normal "Send" with a very low SetKeyDelay value. You can see all the desktops rapidly flashing.

The only solution I can see to prevent this is finding a way to directly jump to a certain desktop instead of using "Windows key + arrow". For example some pojects I've seen use DLLs to accomplish this.

mzomparelli commented 7 years ago

This does what you want

https://github.com/mzomparelli/zVirtualDesktop

Perlence commented 7 years ago

@GioBonvi Please check #8, I implemented a way to switch to desired desktop without scrolling through desktops, might be worth a try.

@mzomparelli Interesting, I'll give it a shot soon!

GioBonvi commented 7 years ago

@Perlence I've already tried it and it does not make a big difference: instead of seeing a short flash of all desktops you see a flash of the "Multitasking view". It's probably better if you have a large number of dekstops, but I guess this kind of problem is not avoidable as long as we use shortcuts which cause graphical animations.

@mzomparelli Thank you! It looks really promising! I'm going to try it.

mzomparelli commented 7 years ago

I've added a new feature recently that gives you a desktop view. You can drag and drop between desktops. Right click on a thumbnail and it will take you to that window even if it means moving you to the desktop where the window is.

image

Currently, some anti-virus think it's a virus and I'm working on getting it whitelisted. If you choose to use it, you have my word that it's safe. It's on my Github account with my real name afterall. Also, Windows will show you smartscreen filter the first time you run it from downloading from the internet. I'm working on these issues.

Elijas commented 5 years ago

This pull request has a bug, because it doesn't call mapDesktopsFromRegistry before retrieving CurrentDesktop and DesktopCount values

I've fixed this and remade a clean implementation of this request in https://github.com/pmb6tz/windows-desktop-switcher/issues/22

Can we close this PR?