How to make the "Page Down" key on the keyboard move only half the distance as usual

I'm a computer programmer and use Xcode so I am constantly scrolling up and down. Often times I would like to move the page down but not as much as the "Page Down" keyboard key moves it. I would like to move it half the distance as it usual moves. I feel like I have experimented with every combination of "Page Down" with shift, option, control, command, and fn. Also, I used all those controls with the down arrow keys with no success.

Maybe I missed something? Is this even possible?


As answered in the question linked to by klanomath's comment, ControllerMate can be used to set up keybindings that simulate scrolling an arbitrary amount.

However, this approach has limitations:

  • The ControllerMate approach does not take into account the height of the window being scrolled; it advances a fixed distance on its virtual scroll wheel. So this workaround only works well if all the windows you wish to scroll are always the same height.
  • The default behavior of Page Up & Page Down, as well as Home and End, cannot be overridden in Chrome, at least. It only works if you add a modifier key. Being able to override existing single-key behavior is very desirable, since the whole point of this is to optimize something that is done very frequently.

(Oops! I placed a bounty on this question worth 100 reputation points, not realizing that the points would be "escrowed" and that since I'm not a frequent user of apple.stackexchange.com, I would then not have enough reputation points to comment. Otherwise I might have just commented after klanomath. I'm not attempting to win my own bounty by answering... Hoping someone else can come up with an approach that overcomes the limitations mentioned above.)


You cannot change this in macOS

Page Up and Page Down are dynamic in that it automatically adjusts to the height of the window.

It will always scroll one page - if that page is 100 lines, it will scroll 100 lines, 10 lines, it will scroll 10 lines.