(Windows 10家庭版和Windows 2012 Server)
我希望功能能够同时实现这两者,所以我为本地计算机编写了AutoHotKey脚本。
没问题,但是既然抓住了Left Mouse Button和Enter,那么可能首先要保存您的所有工作。
即使最大化RDC,我也给本地计算机完全访问Windows键盘命令的权限
然后编写一个捕获了WIN+ TAB(#Tab
)的AutoHotKey脚本(我不太熟悉),而RDC处于打开状态,然后使用该脚本和终端服务内置的ALT+ Page Down来激活服务器的ALT+ Tab。打开后,您可以使用箭头键导航并输入/单击以进行选择。
如果您可以对此进行改进,请分享。
#persistent
#Tab::WinTabbing()
return
WinTabbing() {
WinGetTitle, Title, A ; Get Title
StringRight, TitleEnd, Title, 25 ; RDC is 25 letters long
If (TitleEnd = "Remote Desktop Connection") ; Check that an RDC is active. This will probably have
; issues with the inital "connect to dialog of RDC
{
Send, {Alt down}{PgDn} ; Press and hold alt, and press pgdn
Hotkey, Enter, Entering, On ; Map Enter, Click, and their alt-counterparts to Entering()
Hotkey, !Enter, Entering, On
Hotkey, LButton, Entering, On
Hotkey, !LButton, Entering, On
return
}
}
; There is no return statement at the end of this function, because we want
; Control Tab to work when focused in any other window.
; I tried to map Tab/Alt Tab (because alt is still pressed) to Right arrow
; and Control Tab/Control Alt Tab to left arrow. I was unable to get it to work.
; I left the functions in comments if anyone want to try
; Righting()
; Send, Right
; return
; }
; Lefting() {
; Send, Right
; return
; }
Entering() {
Send, {Alt}{Enter} ; Releases Alt, and makes the selection
Hotkey, Enter, Entering, Off ; See WinTabbing()
Hotkey, !Enter, Entering, Off
Hotkey, LButton, Entering, Off
Hotkey, !LButton, Entering, Off
return
}