In Chrome or Firefox or Microsoft Edge, is there any way to map a keyboard button to "press the scroll bar"? In this way, I could just press a button and move the mouse to achieve the scroll function
2 Answers
To achieve the scroll function by moving the mouse I guess you're referring to the auto scroll feature. In this case just press the middle mouse button (which is the scroll wheel in most modern mice, it's clickable) and move the mouse
If you're talking about the thing that happens when you click the mouse in the trough of the scroll bar then it's the same thing you get when you press PageUp/PageDown or Space/Shift+Space
Edit:
To press some button then move the mouse to scroll without autoscrolling use ScrollAnywhere
Scroll page without touching scroll-bar!
Press Middle (Right / Left) mouse button anywhere on the page to scroll just like with scrollbar.
Features also:
- "grab and drag" scrolling
- customizable scrollbars!
- the Momentum auto-scroll
The same add-on is also available for Chrome and other Chromium-based browsers
See it in action: https://youtu.be/VLv_wAfVO9A
- 26,555
- 15
- 113
- 235
-
When pressing middle mouse, the speed of scroll varies when the mouse moves away. Also page up/page down is just like up/down. When I want to achieve, is exactly like pressing the scrollbar of the browser, that's all. – Luk Aron Feb 19 '21 at 04:09
-
@LukAron then there's something wrong with your environment, because PageUp/PageDown never behaves like Up/Down, one moves a page at once and the other moves one or a few lines – phuclv Feb 19 '21 at 04:18
-
thanks for the clarification, yes, you are correct, but it still doesn't simulate clicking the scrollbar itself. – Luk Aron Feb 19 '21 at 15:59
-
@LukAron please record a video or something to demo what you want. Because on all current platforms Clicking in the scroll bar will scroll one page, unless you're on some odd desktop environments like Gnome where clicking the scroll bar jumps directly to that point – phuclv Feb 19 '21 at 16:12
-
I don't think there is any need for a demo. The question is well-defined. I want to press a button, and the effect will be the same as press on the scrollbar of a browser. – Luk Aron Feb 20 '21 at 02:46
-
@LukAron I think I get what you expect: you want something similar to **click and drag** the thumb of the scroll bar but without clicking on the actual thumb, not *press on the scroll bar*. See my edit – phuclv Feb 20 '21 at 05:10
-
yeah, exactly, since I know how to move the mouse myself, if "press on the scroll bar" could be mapped by a keyboard button, then "click and drag the thumb of the scroll bar but without clicking on the actual thumb" could be achieved. – Luk Aron Feb 21 '21 at 18:33
-
ONE PROBLEM LEFT, the addon only supports left-click or right-click or middle-click on the mouse. I wonder if it could to set to any button on the keyboard. – Luk Aron Feb 21 '21 at 18:36
-
@LukAron that can be easily done with [AutoHotKey](https://autohotkey.com/board/topic/54412-assign-keyboard-key-to-middle-mousebutton/) by mapping any key sequence you want to middle click [Emulate middle mouse button with AutoHotKey](https://superuser.com/q/763283/241386), [Map key to middle click](https://superuser.com/q/143581/241386). But what's the point of pressing the keyboard then move hand to the mouse to scroll? Why don't do everything in the mouse instead? – phuclv Feb 22 '21 at 01:15
-
because my hand is tired of clicking 12 hours a day. – Luk Aron Feb 22 '21 at 02:04
No, there is no such keyboard shortcut to drag the scrollbar. You only could try to explore some other ways for scrolling.
E.g. see this question:
Scroll with mouse like smartphone
- 973
- 5
- 13
