是否可以在所有边缘连接两个显示器。我的意思是,当您点击屏幕顶部时,鼠标应该进入第二个屏幕的底部。如果您点击底部,它应该进入第二个屏幕的顶部,左右也是如此。
答案1
考虑到显示子系统通常实现的 xy 坐标,这种做法毫无意义。从技术上讲,这是可行的,但必须使用视频卡的自定义驱动程序才能做到这一点,鉴于这毫无意义,而且微软不太可能签署这样的协议,我非常怀疑您是否能找到这样的协议。
答案2
有相当多的程序可以让你做到这一点,我发现最简单和最好的是这个 AutoHotKey 脚本。我复制了下面的脚本以防将来出现链接断开的情况: https://autohotkey.com/board/topic/34427-yet-another-mouse-wrapper-this-one-supports-multi-heads/
安装自动热键并运行脚本,或者您可以将其编译为 .exe 在任何计算机上运行。(即使没有安装 AutoHotKey)
转发:
/*
* MouseWrapper v1.2
*
* Description:
* Allows full mouse-wrapping in virtually any single or multi-monitor environment.
* Double-clicking the Tray icon shows a floating tooltip that gives you boundry information
* You can toggle the Tooptip, Vertical and Horizontal wrapping and can pause the wrapper.
* Basic configuration options are stored in a file that you can edit.
* The mouse position and display configuration polling times can only be set via the file.
*
* Changelog:
* v1.2
* Screen configuration is checked periodically for alterations.
* Added Tooltip info and tray menu toggles
* Added option for vertical wrapping
* v1.1
* No longer relies on Hard offsets.
* v1.0
* Initial Release
*
* Known Issues/Todo:
* Cannot wrap on edge of a smaller monitor if that edge is inline with a larger monitor's.
* Example: if you have 1280x1024 and 1024x768 in Right & Left position, you cannot wrap
* vertically on the 1024x768 screen since the top or bottom boundry is within 1280x1024
* Solution: actively track which monitor i'm in, how big it is and whether or not there is
* anything beyond it.
* If the tray menu is active the position polling etc halts.
*
* Contact/Etc:
* Author: Paegus ([email protected])
* Program: AutoHotKey (https://ahknet.autohotkey.com)
* Released under GNU General Public Licence
*/
应用程序
; ------------------ Details ------------------ ;
AppName = MouseWrapper
AppVer = 1.2
; ------------------ Default Settings ------------------ ;
Default_bHWrap = true
Default_bVWrap = false
bShowTip = false
Default_PollTimeMouse = 50
Default_PollTimeDisplay = 2000
; ------------------ Read existing settings if any ------------------ ;
SettingsFile = %AppName%.ini
IfExist %SettingsFile%
{
; Read Settings
FileReadLine bHWrap, %SettingsFile%, 1
FileReadLine bVWrap, %SettingsFile%, 2
FileReadLine PollTimeMouse, %SettingsFile%, 3
FileReadLine PollTimeDisplay, %SettingsFile%, 4
;MsgBox bHWrap : %bHWrap%`nbVWrap : %bVWrap%`nPollTimeMouse : %PollTimeMouse%`nPollTimeDisplay : %PollTimeDisplay%
if bHWrap <> true
{
if bHWrap <> false
{
Error = Invalid value on line 1: %bHWrap%
bHWrap := Default_bHWrap
}
}
if bVWrap <> true
{
if bVWrap <> false
{
Error = %Error%`nInvalid value on line 2: %bVWrap%
bVWrap := Default_bVWrap
}
}
if PollTimeMouse is not integer
{
Error = %Error%`nInvalid value on line 3: %PollTimeMouse%
PollTimeMouse := Default_PollTimeMouse
}
else if PollTimeMouse < 10
{
Error = %Error%`nInvalid value on line 3: %PollTimeMouse%
PollTimeMouse := Default_PollTimeMouse
}
if PollTimeDisplay is not integer
{
Error = %Error%`nInvalid value on line 4: %PollTimeDisplay%.
PollTimeDisplay := Default_PollTimeDisplay
}
else if PollTimeDisplay < 100
{
Error = %Error%`nInvalid value on line 4: %PollTimeDisplay%.
PollTimeDisplay := Default_PollTimeDisplay
}
;MsgBox bHWrap : %bHWrap%`nbVWrap : %bVWrap%`nPollTimeMouse : %PollTimeMouse%`nPollTimeDisplay : %PollTimeDisplay%
if Error
{
MsgBox 262192, %AppName%: Error, %Error%
}
}
else
{
; Set Defaults
bHWrap := Default_bHWrap
bVWrap := Default_bVWrap
PollTimeMouse := Default_PollTimeMouse
PollTimeDisplay := Default_PollTimeDisplay
; Write Defaults
FileAppend %bHWrap%`n, %SettingsFile%
FileAppend %bVWrap%`n, %SettingsFile%
FileAppend %PollTimeMouse%`n, %SettingsFile%
FileAppend %PollTimeDisplay%`n, %SettingsFile%
FileAppend `nLine 1: Horizontal Wrapping <true|false>`nLine 2: Vertical Wrapping <true|false>`nLine 3: Mouse Poll-time <milliseconds>`nLine 4: Display configuration Poll-time <milliseconds>, %SettingsFile%
MsgBox 262208,%AppName%: Launch,This is the first time you've launched %AppName%.`nDefault settings loaded. The settings file is located at:`n`n%A_WorkingDir%\%SettingsFile%
}
; ------------------ Tray Icon & Tooltip ------------------ ;
Menu TRAY, Icon, %A_WinDir%\system32\main.cpl,,1
Menu TRAY, Tip, %AppName% v%AppVer%
Menu TRAY, NoStandard
Menu TRAY, Add, &About, MenuINFO
Menu TRAY, Add
Menu TRAY, Add, Mouse: %PollTimeMouse%ms, MenuNULL
Menu TRAY, Disable, Mouse: %PollTimeMouse%ms
Menu TRAY, Add, Disp: %PollTimeDisplay%ms, MenuNULL
Menu TRAY, Disable, Disp: %PollTimeDisplay%ms
Menu TRAY, Add
Menu TRAY, Add, &Tooltip, MenuTTT
Menu TRAY, Add, &X-Wrap, MenuTHW
Menu TRAY, Add, &Y-Wrap, MenuTVW
Menu TRAY, Add, &Pause, MenuPAUSE
Menu TRAY, Add, &Edit, MenuEDIT
Menu TRAY, Add, &Reload, MenuRELOAD
Menu TRAY, Add
Menu TRAY, Add, &Quit, MenuQUIT
Menu TRAY, Default, &About
if bShowTip = true
{
Menu TRAY, Check, &Tooltip
}
if bHWrap = true
{
Menu TRAY, Check, &X-Wrap
}
if bVWrap = true
{
Menu TRAY, Check, &Y-Wrap
}
; ------------------ Inner Workings ------------------ ;
CoordMode Mouse, Screen
#SingleInstance force
#Persistent
SetTimer ScreenUpdate, %PollTimeDisplay%
SetTimer ScreenWrap, %PollTimeMouse%
return
; ------------------ Tray Menus ------------------ ;
MenuNULL:
return
MenuTTT:
if bShowTip = true
{
bShowTip = false
Menu TRAY, UnCheck, &Tooltip
Tooltip
}
else
{
bShowTip = true
Menu TRAY, Check, &Tooltip
}
return
MenuTHW:
if bHWrap = true
{
bHWrap = false
Menu TRAY, UnCheck, &X-Wrap
}
else
{
bHWrap = true
Menu TRAY, Check, &X-Wrap
}
; Update File
FileDelete %SettingsFile%
FileAppend %bHWrap%`n, %SettingsFile%
FileAppend %bVWrap%`n, %SettingsFile%
FileAppend %PollTimeMouse%`n, %SettingsFile%
FileAppend %PollTimeDisplay%`n, %SettingsFile%
FileAppend `nLine 1: Horizontal Wrapping <true|false>`nLine 2: Vertical Wrapping <true|false>`nLine 3: Mouse Poll-time <milliseconds>`nLine 4: Display configuration Poll-time <milliseconds>, %SettingsFile%
return
MenuTVW:
if bVWrap = true
{
bVWrap = false
Menu TRAY, UnCheck, &Y-Wrap
}
else
{
bVWrap = true
Menu TRAY, Check, &Y-Wrap
}
; Update File
FileDelete %SettingsFile%
FileAppend %bHWrap%`n, %SettingsFile%
FileAppend %bVWrap%`n, %SettingsFile%
FileAppend %PollTimeMouse%`n, %SettingsFile%
FileAppend %PollTimeDisplay%`n, %SettingsFile%
FileAppend `nLine 1: Horizontal Wrapping <true|false>`nLine 2: Vertical Wrapping <true|false>`nLine 3: Mouse Poll-time <milliseconds>`nLine 4: Display configuration Poll-time <milliseconds>, %SettingsFile%
return
MenuINFO:
MsgBox 262208,%AppName%: Info,%AppName% v%AppVer%`n`nCreated by Paegus ([email protected])`n`nUsing AutoHotKey v%A_AhkVersion%`n`nhttp://www.autohotkey.com
return
MenuPAUSE:
if A_IconTip = %AppName% v%AppVer%
{
Menu TRAY, Icon, %A_WinDir%\system32\SHELL32.dll,110,1
Menu TRAY, Tip, %AppName% v%AppVer%`n - PAUSED -
Menu TRAY, Check, &Pause
Pause
}
else
{
Menu TRAY, Icon, %A_WinDir%\system32\main.cpl,,1
Menu TRAY, Tip, %AppName% v%AppVer%
Menu TRAY, UnCheck, &Pause
Pause
}
return
MenuEDIT:
run notepad %A_WorkingDir%\%SettingsFile%
return
MenuReload:
Reload
return
MenuQUIT:
ExitApp 0
return
; ------------------ Core Functions ------------------ ;
ScreenUpdate:
SysGet Monitors, MonitorCount
iBorderLeft = 0
iBorderRight = 0
iBorderTop = 0
iBorderBottom = 0
TipString = Monitors...
Loop, %Monitors%
{
SysGet Monitor, Monitor, %A_Index%
if MonitorLeft < %iBorderLeft%
{
;MsgBox %A_Index%'s Left %MonitorLeft% < %iBorderLeft%
iBorderLeft := MonitorLeft
}
if MonitorRight > %iBorderRight%
{
;MsgBox %A_Index%'s Right %MonitorRight% > %iBorderRight%
iBorderRight := MonitorRight - 1
}
if MonitorTop < %iBorderTop%
{
;MsgBox %A_Index%'s Top %MonitorTop% < %iBorderTop%
iBorderTop := MonitorTop
}
if MonitorBottom > %iBorderBottom%
{
;MsgBox %A_Index%'s Bottom %MonitorBottom% > %iBorderBottom%
iBorderBottom := MonitorBottom - 1
}
if bShowTip = true
{
TipString = %TipString%`n%A_Index%: %MonitorLeft%`,%MonitorTop% x %MonitorRight%`,%MonitorBottom%
}
}
return
ScreenWrap:
MouseGetPos PosX, PosY
if bHWrap = true
{
if PosX <= %iBorderLeft%
{
NPosX := iBorderRight - 1
MouseMove %NPosX%, %PosY%, 0
}
else if PosX >= %iBorderRight%
{
NPosX := iBorderLeft + 1
MouseMove %NPosX%, %PosY%, 0
}
}
if bVWrap = true
{
if PosY <= %iBorderTop%
{
NPosY := iBorderBottom - 1
MouseMove %PosX%, %NPosY%, 0
}
else if PosY >= %iBorderBottom%
{
NPosY := iBorderTop + 1
MouseMove %PosX%, %NPosY%, 0
}
}
if bShowTip = true
{
ToolTip Boundries...`nX: %iBorderLeft% < %PosX% > %iBorderRight%`nY: %iBorderTop% < %PosY% > %iBorderBottom%`n%TipString%
}
return
; ------------------ End ------------------ ;
答案3
是的:雅典大学(希腊) IT 部门提供了一个免费软件(非开源)应用程序的链接,无边2,如果安装它,它将满足您的愿望。