我创建了一些在桌面之间切换的快捷方式。我想要一个3x3的桌面网格(实际上,或者只是在我的思维导图上-实际上它们是线性的)。我希望数字键盘的按键分别映射到每个桌面。
热键的工作方式是
- 假设总共有9个桌面
- 向左/向右滚动至少9,以确保我们位于已知桌面的线性边缘
- 向后滚动正确的数字即可到达我想要的位置。
由于没有简单的方法可以将窗口移至特定的桌面,因此我使用Win + Numpad0来调出该窗口的“移至桌面”菜单。这是一个折衷方案,我几乎没有希望很快解决(但我确实对此发表了自己的问题)。
这是我的快捷方式:
; Windows+Number pad keys = Windows 10 desktop switching.
; number pad to match a 3x3 desktop
#Numpad1::
#NumpadEnd::
Send, {LWin down}{Ctrl down}{Right 9}{Left 2}{Ctrl up}{LWin up}
return
#Numpad2::
#NumpadDown::
Send, {LWin down}{Ctrl down}{Right 9}{Left 1}{Ctrl up}{LWin up}
return
#Numpad3::
#NumpadPgDn::
Send, {LWin down}{Ctrl down}{Right 9}{Ctrl up}{LWin up}
return
#Numpad4::
#NumpadLeft::
Send, {LWin down}{Ctrl down}{Left 9}{Right 3}{Ctrl up}{LWin up}
return
#Numpad5::
#NumpadClear::
Send, {LWin down}{Ctrl down}{Left 9}{Right 4}{Ctrl up}{LWin up}
return
#Numpad6::
#NumpadRight::
Send, {LWin down}{Ctrl down}{Right 9}{Left 3}{Ctrl up}{LWin up}
return
#Numpad7::
#NumpadHome::
Send, {LWin down}{Ctrl down}{Left 9}{Ctrl up}{LWin up}
return
#Numpad8::
#NumpadUp::
Send, {LWin down}{Ctrl down}{Left 9}{Right 1}{Ctrl up}{LWin up}
return
#Numpad9::
#NumpadPgUp::
Send, {LWin down}{Ctrl down}{Left 9}{Right 2}{Ctrl up}{LWin up}
return
; Send, {LWin down}{Tab}{LWin up}
; Sleep, 3000
; Send, {Tab 1}{Right 2}
; Sleep, 3000
; Send, {Enter}
; Sleep, 3000
; return
;
; Bring up the "move this window to desktop..." menu. Since the menu is always different, don't operate on it. Just leave it at that.
#!Numpad0::
#!NumpadIns::
#+Numpad0::
#+NumpadIns::
#Numpad0::
#NumpadIns::
Send, {LWin down}{Tab}{LWin up}
Sleep, 400
Send, {AppsKey}M
return