1
0
mirror of synced 2026-05-05 23:54:46 +00:00

WHEELSCROLL: Separate delta for horizontal scrolling, refixed constants

This commit is contained in:
rmkaplan
2021-11-29 22:42:51 -08:00
parent 945df5fbe8
commit e3f043b40d
3 changed files with 26 additions and 15 deletions

View File

@@ -15,6 +15,9 @@ The scrolling speed is controlled by the variable
WHEELSCROLLDELTA (initially 20)
The number of points to scroll for each click of the wheel. Higher values give faster scrolling. A negative value reverses the scrolling direction.
HWHEELSCROLLDELTA (initial NIL)
If non-NIL, then this is the delta used for horizontal scrolling.
Implementation:
Lisp receives a key transition on PAD1 or PAD2 for vertical scrolling when the wheel rotates and no other keys are down. (ENABLEWHEELSCROLL T) modifies the keyaction table so that it maps these transitions to characters 156 and 157. Those characters are defined as interrupts that invoke the vertical scrolling action. For horizontal scrolling sideways pushes of a wheel (if it has that) produce transitions on PAD4 and PAD5, which map to interrupt-characters 158 and 159. (156-159 are the highest right-panel characters of character-set 0 that correspond to left-panel control characters, so typically have no other conflicting meaning.)