control scroll position in script?

Post Reply
amertune
Posts: 5
Joined: Thu Aug 20, 2015 5:25 pm

control scroll position in script?

Post by amertune »

Primarily, what I'm interested in is a way to add custom keybindings for the scroll bar. When I scroll back in the buffer, or use the search I often have a long way to scroll to get back to the bottom. I can hold page down for several seconds, but I'd like to just hit ctrl+end and jump there, and ctrl+home to jump to the top.

Is there a way to control the scroll position in the main window and miniconsole? The only thing I can find on the wiki is how to style the scrollbar.

User avatar
SlySven
Posts: 1023
Joined: Mon Mar 04, 2013 3:40 pm
Location: Deepest Wiltshire, UK
Discord: SlySven#2703

Re: control scroll position in script?

Post by SlySven »

I know it isn't much help but a middle mouse button click will scroll the console down to the bottom to show the last lines received/sent/echoed. It ought to be possible to code <Ctrl>-Home <Ctrl>-End to Scroll to top/bottom on the main console window but I'm not sure if we can do that on mini-consoles...

amertune
Posts: 5
Joined: Thu Aug 20, 2015 5:25 pm

Re: control scroll position in script?

Post by amertune »

I can find ways to move the cursor, but that doesn't seem to affect the scroll position. Middle-clicking moves the display down to the bottom, but still leaves the scrollbar where it was. I can't find any API methods that actually change the viewport.

I have discovered that you can right-click on the scrollbar and get a menu with "scroll to top" and "scroll to bottom" options. Until/unless those get exposed in the API, I can live with right-clicking on the scrollbar.

Post Reply