Mat*_*ley 76 windows scroll-wheel
在 OS X 中,我可以按住 Shift 键同时使用鼠标上的滚轮水平滚动而不是垂直滚动。有没有办法在 Windows 中做类似的事情?
Sam*_*Sam 26
这是一个 AutoHotKey 脚本,可以使用 shift 和(大概)本机鼠标滚轮滚动命令来执行此操作:
; Shift + Wheel for horizontal scrolling
+WheelDown::WheelRight
+WheelUp::WheelLeft
Run Code Online (Sandbox Code Playgroud)
这直接取自https://gist.github.com/cheeun/160999。
请记住,许多应用程序(包括 Microsoft 应用程序)不支持水平鼠标滚轮滚动。(我相信该功能仅在 Windows Vista 中引入。)
Ivo*_*pse 18
你可以用AutoHotKey模拟它
如果我找到脚本,我会告诉您:从这些帖子中:
你应该找到一些脚本
#Persistent mhook := > DllCall("SetWindowsHookEx", "int", 14 > ; WH_MOUSE_LL
, "uint", RegisterCallback("WheelHorzHook"), > "uint", 0, "uint", 0) return
WheelLeft:
MsgBox WheelLeft return
WheelRight:
MsgBox WheelRight return
WheelHorzHook(nCode, wParam, lParam) {
global mhook
Critical
if (wParam = 0x020E) ; WM_MOUSEHWHEEL (Vista-only)
{
if (delta := NumGet(lParam+0,10,"Short"))
{
if (delta<0) {
SetTimer, WheelLeft, -1
return true
} else {
SetTimer, WheelRight, -1
return true
}
}
}
return DllCall("CallNextHookEx", "uint", mhook, "int", nCode, "uint",
wParam, "uint", lParam) }
Run Code Online (Sandbox Code Playgroud)
来自http://www.autohotkey.com/docs/Hotkeys.htm
一些最有用的鼠标滚轮热键涉及滚动窗口文本的替代模式。例如,当您在按住左 Control 键的同时转动滚轮时,以下一对热键会水平滚动而不是垂直滚动:
~LControl & WheelUp:: ; Scroll left.
ControlGetFocus, fcontrol, A
Loop 2 ; <-- Increase this value to scroll faster.
SendMessage, 0x114, 0, 0, %fcontrol%, A ; 0x114 is WM_HSCROLL and the 0 after it is SB_LINELEFT.
return
~LControl & WheelDown:: ; Scroll right.
ControlGetFocus, fcontrol, A
Loop 2 ; <-- Increase this value to scroll faster.
SendMessage, 0x114, 1, 0, %fcontrol%, A ; 0x114 is WM_HSCROLL and the 1 after it is SB_LINERIGHT.
return
Run Code Online (Sandbox Code Playgroud)
有一种方法可以在 Windows 中使用鼠标右键执行此操作。我有一个带滚轮的鼠标,它的右侧集成了一个向左/向左轻推按钮。只需向左或向右推动滚轮即可将内容向所需方向移动。我有罗技 VX,我对它非常满意。
如果您愿意,VX 还允许您为每个应用程序配置不同的按钮。这种级别的定制非常好!
在某些 Windows 程序中,shift 会水平滚动(例如 Windows 资源管理器)。
在 Internet Explorer、Firefox 和 Excel 等其他程序中,按住滚轮按钮并从左向右移动将水平滚动。
经过一番环顾,最终找到了一种在 Excel 和其他任何地方都可以使用的方法(使用AutoHotKey),而不会明显破坏任何东西(改编自 AutoHotKey 论坛上的几个不同解决方案,尽管我没有记录来源所以不能给出适当的信用对不起)。
MS Excel 似乎有一些奇怪的方式来处理它的用户界面(尽管不知何故,经过多年看到 MS Office 开发人员给我们的东西,我并不感到惊讶)。除了 MS Word 之外,这个脚本似乎几乎适用于所有地方——如果有人能解决这个问题,请告诉我!这可能类似于找出 Word 的窗口类并专门为它编码,就像使用 Excel 完成的一样(只是使用一组不同的键绑定)。
#Singleinstance Force
#IfWinActive ahk_class XLMAIN
+WheelUp::
SetScrollLockState, On
SendInput {Left}
SetScrollLockState, Off
Return
+WheelDown::
SetScrollLockState, On
SendInput {Right}
SetScrollLockState, Off
Return
; Everything except Excel.
#IfWinNotActive ahk_class XLMAIN
+WheelUp:: ; Scroll left.
ControlGetFocus, fcontrol, A
Loop 4 ; <-- Increase this value to scroll faster.
SendMessage, 0x114, 0, 0, %fcontrol%, A ; 0x114 is WM_HSCROLL and the 0 after it is SB_LINELEFT.
return
+WheelDown:: ; Scroll right.
ControlGetFocus, fcontrol, A
Loop 4 ; <-- Increase this value to scroll faster.
SendMessage, 0x114, 1, 0, %fcontrol%, A ; 0x114 is WM_HSCROLL and the 1 after it is SB_LINERIGHT.
return
#IfWinActive
Run Code Online (Sandbox Code Playgroud)