ScrollMessageWidget.addDefaultKeyboardListeners

Add default event listeners for keyboard and mouse wheel scrolling shortcuts.

More...
class ScrollMessageWidget
void
addDefaultKeyboardListeners

Parameters

horizontalArrowScrollAmount int
verticalArrowScrollAmount int
shiftMultiplier int

multiplies the scroll amount by this when shift is held

Detailed Description

The defaults for addDefaultWheelListeners are:

  • Mouse wheel scrolls vertically
  • Alt key + mouse wheel scrolls horiontally
  • Shift + mouse wheel scrolls faster.
  • Any mouse click or wheel event will focus the inner widget if it has tabStop = true

The defaults for addDefaultKeyboardListeners are:

  • Arrow keys scroll by the given amounts
  • Shift+arrow keys scroll by the given amounts times the given shiftMultiplier
  • Page up and down scroll by the vertical viewable area
  • Home and end scroll to the start and end of the verticle viewable area.
  • Alt + page up / page down / home / end will horizonally scroll instead of vertical.

My recommendation is to change the scroll amounts if you are scrolling by pixels, but otherwise keep them at one line.

Suggestion Box / Bug Report