Down and left/right arrows to switch desktops
-
- Posts: 2
- Joined: 28 Aug 2017, 20:01
Down and left/right arrows to switch desktops
Hello, I downloaded autohotkey specifically for this but found this was more complicated that I thought... Anyways could someone help me make a script that switches to the previous desktop by pressing down and left together as well as switching to the next desktop by pressing down and right together? Thanks
Re: Down and left/right arrows to switch desktops
Combination hotkeys would be your Down & Left:: and Down & Right::. I don't have Windows 10, so I don't know how to switch Desktops. But try the Send command. You may need to run your script as an administrator. It may also just be a protected function that AHK can't emulate the hotkeys for. However, there may be a DllCall() that AHK can use; this would take the approach that AHK should mimic the actions of the native hotkeys for switching Desktops instead of triggering the native hotkeys. What that DllCall is, I don't know, and you may have to do googling for it in non-AHK resources.
If you can get it working, the way to preserve your Down key's functionality is with the ~ modifier. ~Down & Left::.
If you can get it working, the way to preserve your Down key's functionality is with the ~ modifier. ~Down & Left::.
-
- Posts: 2
- Joined: 28 Aug 2017, 20:01
Re: Down and left/right arrows to switch desktops
Thanks for the reply, but I get an error saying that "Down & Left" is not a valid hotkey. I know now that I can remap the default desktop switch ("CTRL + WINDOW + RIGHT/LEFT) to other keys (right now it is "WINDOW + RIGHT/LEFT") but it would be better if I could switch desktops with one hand. Any other ideas?
Re: Down and left/right arrows to switch desktops
This code worked perfectly for me as a test: Down & Left::MsgBox Hi
-
- Posts: 302
- Joined: 05 Feb 2017, 00:03
Re: Down and left/right arrows to switch desktops
This works for me as well:
Code: Select all
Down::Down ; Otherwise down alone doesn't work (will be fired on key release)
Down & Left::Send ^#{Left}
Down & Right::Send ^#{Right}