Simulate Page Right and Page Left

keyboard

is there any way to simulate a "Page Left/Right" functionality?
With ⌃ Ctrl+ or ⌃ Ctrl+ (or fn+ or fn+ or any of the other various ways) I can scroll most Mac windows up or down "a page". However the behavior for left and right is very inconsistent or not present. I really would like to do the same for left and right directions.

Best Answer

In Safari and other web views option-left (⌥←) scrolls a page left and option-right (⌥→) scrolls a page right, but it doesn't work in Chrome.

You can use DefaultKeyBinding.dict or Karabiner to make some key combinations move in different directions multiple times:

{
  "~p" = (moveUp:, moveUp:, moveUp:, moveUp:, moveUp:, moveUp:, moveUp:, moveUp:);
  "~n" = (moveDown:, moveDown:, moveDown:, moveDown:, moveDown:, moveDown:, moveDown:, moveDown:);
  "~b" = (moveLeft:, moveLeft:, moveLeft:, moveLeft:, moveLeft:, moveLeft:, moveLeft:, moveLeft:);
  "~f" = (moveRight:, moveRight:, moveRight:, moveRight:, moveRight:, moveRight:, moveRight:, moveRight:);
}
<?xml version="1.0"?>
<root>
  <item>
    <name>custom</name>
    <identifier>custom</identifier>
    <autogen>__KeyToKey__ KeyCode::P, ModifierFlag::FN, KeyCode::CURSOR_UP, KeyCode::CURSOR_UP, KeyCode::CURSOR_UP, KeyCode::CURSOR_UP, KeyCode::CURSOR_UP, KeyCode::CURSOR_UP, KeyCode::CURSOR_UP, KeyCode::CURSOR_UP</autogen>
    <autogen>__KeyToKey__ KeyCode::N, ModifierFlag::FN, KeyCode::CURSOR_DOWN, KeyCode::CURSOR_DOWN, KeyCode::CURSOR_DOWN, KeyCode::CURSOR_DOWN, KeyCode::CURSOR_DOWN, KeyCode::CURSOR_DOWN, KeyCode::CURSOR_DOWN, KeyCode::CURSOR_DOWN</autogen>
    <autogen>__KeyToKey__ KeyCode::B, ModifierFlag::FN, KeyCode::CURSOR_LEFT, KeyCode::CURSOR_LEFT, KeyCode::CURSOR_LEFT, KeyCode::CURSOR_LEFT, KeyCode::CURSOR_LEFT, KeyCode::CURSOR_LEFT, KeyCode::CURSOR_LEFT, KeyCode::CURSOR_LEFT</autogen>
    <autogen>__KeyToKey__ KeyCode::F, ModifierFlag::FN, KeyCode::CURSOR_RIGHT, KeyCode::CURSOR_RIGHT, KeyCode::CURSOR_RIGHT, KeyCode::CURSOR_RIGHT, KeyCode::CURSOR_RIGHT, KeyCode::CURSOR_RIGHT, KeyCode::CURSOR_RIGHT, KeyCode::CURSOR_RIGHT</autogen>
  </item>
</root>

DefaultKeyBinding.dict doesn't work in some applications like Chrome or Xcode and Karabiner has a (barely) noticeable delay.