Make scroll wheel send Page Up/Down when it makes sense
@shaunm
Submitted by Shaun McCance Link to original bug (#424184)
Description
I'm attaching a patch that makes vte send Page Up/Down when it gets a scroll event and it's currently using alternate_screen. As far as I can tell, alternate_screen is used for terminal apps like emacs, vi, and less, which write to the entire screen. When alternate_screen is being used, the scrollbar is basically useless.
The idea is that the terminal can't scroll for these applications, but many such applications can scroll internally with Page Up/Down. So instead of trying (and failing) to scroll the scrollbar, we just simulate a Page Up/Down key press.
It was mentioned on IRC that perhaps we should send Up/Down instead of Page Up/Down. I think Up/Down actually feels nicer when using a pager, but it's kind of weird when using an editor. Page Up/Down do scroll pretty fast though, so maybe it should be changed to Up/Down.
I don't know if the patch is completely right. I don't really know how the keymap stuff works, and I just copied some code from vte_terminal_keypress. For all I know, my patch could be horribly broken on every machine but mine. Somebody who understands terminal emulation better should carefully check what I'm doing.
That said, this patch does work for me.
Resolution: RESOLVED FIXED