You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 23, 2018. It is now read-only.
First of all, i'm very new to autohotkey code, its my first time to look at this kinda code. Thank you for that nice script, Its exact what i'm looking for. But you have a design error at hotkey and hotkeyhandlingi think. I'm not able to have a hotkey like Home or PgDn for switching directly to the desired screen. This is, i think so after looking to your code, because you get the number of the screen to switch to by looking at the hotkey name, for example 3 or Numpad3, so 3 is the screen to switch to. PgDn doesn't have a number attached with the desired screen, so i failed switching the screen by this or simular hotkeys.
BUT i managed to changed your code to work with hotkeys with no screen number attached in a very simple way. As i said, this is my first look at autohotkey code. So don't blame me for the way i did it. Maybe you find a better way or cleaner.
Hi. You're absolutely right, it makes no sense as it is... Your suggestion should work fine, yes, but I would like the solution to be a bit more generic. I'll mark it as a bug so it can be picked up later. Thanks.
First of all, i'm very new to autohotkey code, its my first time to look at this kinda code. Thank you for that nice script, Its exact what i'm looking for. But you have a design error at hotkey and hotkeyhandlingi think. I'm not able to have a hotkey like Home or PgDn for switching directly to the desired screen. This is, i think so after looking to your code, because you get the number of the screen to switch to by looking at the hotkey name, for example 3 or Numpad3, so 3 is the screen to switch to. PgDn doesn't have a number attached with the desired screen, so i failed switching the screen by this or simular hotkeys.
BUT i managed to changed your code to work with hotkeys with no screen number attached in a very simple way. As i said, this is my first look at autohotkey code. So don't blame me for the way i did it. Maybe you find a better way or cleaner.
Cut of the settings file:
Desktop1=Home
Desktop2=End
Desktop3=PgUp
Desktop4=PgDn
In the file virtual-desktop-enhancer.ahk i changed the lines (166 & 167)
setUpHotkeyWithOneSetOfModifiersAndIdentifier(hkModifiersSwitch, hkDesktopI, "OnShiftNumberedPress", "[KeyboardShortcutsModifiers] SwitchDesktop")
setUpHotkeyWithOneSetOfModifiersAndIdentifier(hkModifiersMove, hkDesktopI, "OnMoveNumberedPress", "[KeyboardShortcutsModifiers] MoveWindowToDesktop")
to
setUpHotkeyWithOneSetOfModifiersAndIdentifier(hkModifiersSwitch, hkDesktopI, "OnShiftNumberedPress"i, "[KeyboardShortcutsModifiers] SwitchDesktop")
setUpHotkeyWithOneSetOfModifiersAndIdentifier(hkModifiersMove, hkDesktopI, "OnMoveNumberedPress"i, "[KeyboardShortcutsModifiers] MoveWindowToDesktop")
and i added this (has to be extended to work with more than 4 screens) above line 211
OnShiftNumberedPress1() {
SwitchToDesktop(1)
}
OnShiftNumberedPress2() {
SwitchToDesktop(2)
}
OnShiftNumberedPress3() {
SwitchToDesktop(3)
}
OnShiftNumberedPress4() {
SwitchToDesktop(4)
}
And it worked. Maybe you recode it to a maybe better cleaner way and add it to the code.
Cheers
The text was updated successfully, but these errors were encountered: