Horizontal scroll?

im strugging to find how to scroll horizotnally. ive tried the default "hold shift + scroll" but it is not working. i also could not find how to setup a hotkey for that?

1 Like

How to scroll what specifically?

how to use horizontal scoll? in most apps you hold shift then use the mouse scroll button. this does not work in DOpus.

That's not a standard thing I'm aware of. File Explorer doesn't do that, for example. Maybe your mouse drivers are doing it?

We're still not sure what you're aiming to scroll horizontally. There are lots of things you can scroll in Opus. I'm guessing you mean the folder tree or the file display?

see the red square. i want keybind/shortcut that allows me to move the bar inside.

The right and left arrow keys would be the normal one. Hold Shift at the same time to make it scroll farther/faster, or Ctrl to jump to either extreme.

Many mice/drivers also offer various ways to scroll horizontally which can be bound to buttons or a button + wheel, depending on the drivers.

1 Like

Hi Leo,

In order for the arrow keys to scroll, I have to first click on the horizontal scroll bar with my mouse.

Most programs I am accustomed to use shift+wheel to scroll horizontally through a view/window. I wouldn't know how Explorer behaves because I never use it.

It would be really fantastic if we could get this implemented in DOPUS!

1 Like

You don't have to click the scrollbars. The file display (i.e. the thing you want to scroll using the cursor keys) just needs to have input focus for the keypresses to go to it. Same with almost anything in Windows.

True for keys, but not for a mouse — there is a dedicated option in Settings→Mouse that allows your mouse scroll to be passed to inactive windows under the mouse cursor, so that's another advantage of being able to use mouse to scroll both vertically and horizontally — you don't need focus!

Also, a very frequently used app — Web Browser — supports horizontal scrolling on Shift+Wheel, so it's really the most convenient way to scroll once you touch a mouse, and would be great if this were natively supported in Opus

I've remapped those to go to the parent folder/enter a folder or (for Ctrl) to switch between tabs (both operations are way more frequently used than scrolling)

I mean, the way I solve this issue currently is I just remap Shift+WheelUp/WheelDown to Shift+/, but it requires focus and in general a bit hacky

We send horizontal wheel messages to the window under the cursor, the same as vertical ones. But there is some variation in how mouse drivers handle them, or was last time I looked, which may complicate things.

Which mouse and drivers are you using?

Yeah, but I as you said ShiftWheel ins't really that universal :slight_smile: , so you don't get those horizontal scroll messages by default from ShiftWheel (hence the feature request for Opus to handle vertical messages with Shift as horizontal ones just like many other apps do, and then you can also set decent scrolling speed with acceleration etc. (see below)

I've also tested passing horizontal messages on ShiftWheel with Autohotkey via SendMessage(0x114, 0, 0, FocusedControl, "A") (where FocusedControl := ControlGetFocus("A")), but then it's atrociously slow, had to add a Loop to make it faster (the horizontal scroll isn't even wide enough to scroll past 1 (one!!!) character, that's smaller than the minimum vertical scroll of 1 line), but then loops aren't as responsive, e.g., I can't change directions on a whim, there is some delay before the loop is done, so the best solution was to send Shift+/ keybinds instead — this is fast enough, but then scroll "on hover" doesn't work

At the moment I have the default Microsoft HID ones 10.0.19041.1 from 21.06.2006 and a generic bluetooh Logitech mouse (without SetPoint running)

@Guutman FYI you can still scroll horizontally with ShiftWheel in Opus, though you'd need to remap these in AutoHotkey v2 like so:

#HotIf WinActive("ahk_class dopus.lister")                  ; only in Opus Directory
  +WheelUp::{   SendInput '{Shift Down}{Left}{Shift Up}'  } ; Scroll Left
  +WheelDown::{ SendInput '{Shift Down}{Right}{Shift Up}' } ; Scroll Right

Or you could use this more universal script that also sends horizontal scroll events to other inactive apps (though not all, some apps don't handle Shift+Wheel at all, while others handle it ok, but still not accept events from this script) on cursor hover (don't forget to disable MouseMouse Wheel + Shift ... settings in Opus for this to work)

A_HotkeyInterval       	:= 1000	; [2000]
A_MaxHotkeysPerInterval	:= 800 	; [70]
CoordMode "Mouse","Screen"

global wmWheelH	:= 0x20E	; WM_MOUSEHWHEEL, docs.microsoft.com/en-us/windows/win32/inputdev/wm-mousehwheel
  , WheelDelta 	:= 120  	; WHEEL_DELTA threshold for action to be taken, and one such action (for example, scrolling one increment) should occur for each delta

#HotIf WinActive("ahk_class dopus.lister")	; only in Opus Directory
  global wmWheelH, WheelDelta
  MouseGetPos &mX, &mY, &mWinID, &mControl
  wParam	:= (WheelDelta << 16)|0x0000
  lParam	:= (mY         << 16)|mX
  PostMessage(wmWheelH, -wParam, lParam, , "ahk_id " mWinID)
  global wmWheelH, WheelDelta
  MouseGetPos &mX, &mY, &mWinID, &mControl
  wParam	:= (WheelDelta << 16)|0x0000
  lParam	:= (mY         << 16)|mX
  PostMessage(wmWheelH, +wParam, lParam, , "ahk_id " mWinID)

There's a WM_MOUSEHWHEEL message for scrolling horizontally, although if you're sending it yourself via AHK then you may as well send it (or another scroll message) direct to the (child) window under the mouse so the routing doesn't matter.

Thanks, PostMessage(0x20E, -120<<16, 0, , "A") does indeed work in Opus and is responsive enough (and customizable!), so better than the version I had (upd: found the shift error)
(upd2: works in Chrome, breaks in Audacity while regular Shift+Wheel works there, hopefully there aren't that many other apps that fail)

I don't really know how to do that :slight_smile: and these Win APIs are so badly designed and unfriendly that I usually don't go past "good enough" (and passing keys was good enough as I rarely needed to scroll horizonally without focus), so didn't investigate (but this part is easy to find), so if WM_MOUSEHWHEEL is working fine, might as well also fix that

I don't know about about AHK to know if this is a viable suggestion, but Windows has a couple of simple APIs for getting the window under the mouse pointer:

Thanks, it is since AHK can basically just do DllCalls() directly to these WinAPIs, though in this case AHK has a helpful shortcut function MouseGetPos to get both the position and the window ID

(udp: found one issue: just needed to do the obvious :slight_smile: and disable a Mouse wheel + Shift Opus setting), but still, there is something weird with Shift. The best (so far) universal option of sending horizontal scroll on hover is to just send wheel←→ events directly SendInput '{Blind}{WheelRight}'
And in Opus this works fine with:
but fails (it affects regular vertical scroll, e.g. I can reverse it) with:
Shift (most important mod)

So it seems Shift+WheelDown/Up isn't translated to horizontal scroll, but Shift+WheelLeft/Rigth is translated to a vertical one :face_with_monocle: ?

There is a fix to send Alt on Shift keybinds (+WheelUp::SendInput '{Blind}!{WheelLeft}'), and this works both in Chrome and Opus, but it still isn't perfect as it introduces some tiny vertical scroll events :face_with_head_bandage: