]> git.ipfire.org Git - thirdparty/git.git/commit
gitk: update scrolling for TclTk 8.7+ / TIP 474
authorMark Levedahl <mlevedahl@gmail.com>
Fri, 6 Jun 2025 16:28:02 +0000 (12:28 -0400)
committerMark Levedahl <mlevedahl@gmail.com>
Thu, 17 Jul 2025 03:02:38 +0000 (23:02 -0400)
commit6ea3006f96f19787c949ef1e4723991756b5126b
tree7aaec71410dc35f605dacd0251353616cac7354c
parent3e4314387b0affaca5353bb3ada8e93f2722fab9
gitk: update scrolling for TclTk 8.7+ / TIP 474

TclTk 8.7 (still in alpha), and 9.0 (released), implement TIP 474 that
delivers uniform handling of mouse and touchpad scrolling events on all
platforms, and by default bound to most widgets. TIP 474 also implements
use of the Option- modifier key (Alt- key on PC, Option- key on Macs) to
indicate desire for more motion per scroll wheel event, the
amplification is not defined but seems to be 5x to 10x.

So, for TclTk >= 8.7 we can use identical MouseWheel bindings on all
platforms, and should enable use of the Option- modifier to enable
larger motion. Let's do all of this, and use a 5x multiplier for the
Option- modifier.

This largely follows the prior win32 model, except that Tk 8.6 does not
reliably use the Option- modifier because the Alt- key conflicts with
builtin behavior to activate the main menubar. Presumably this conflict
is addressed in the win32 Tcl9.x package.

Signed-off-by: Mark Levedahl <mlevedahl@gmail.com>
gitk