summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2020-07-05 17:05:22 (GMT)
committerfvogel <fvogelnew1@free.fr>2020-07-05 17:05:22 (GMT)
commit6302dcec5517fd93a4cda4df1025382b76b51347 (patch)
treeb593a3747bb48ef0a447826e183a0e6df3fbd720
parentc72826964e6f45d8d741cb09fc72dc94f97b7dc4 (diff)
parent55165a174e26d263f04f46f24e9b932df9ddc831 (diff)
downloadtk-6302dcec5517fd93a4cda4df1025382b76b51347.zip
tk-6302dcec5517fd93a4cda4df1025382b76b51347.tar.gz
tk-6302dcec5517fd93a4cda4df1025382b76b51347.tar.bz2
Fix [cd051b586a]: MouseWheel documentation in bind.n
-rw-r--r--doc/bind.n21
-rw-r--r--library/ttk/utils.tcl3
2 files changed, 17 insertions, 7 deletions
diff --git a/doc/bind.n b/doc/bind.n
index 4bd2be0..87940e8 100644
--- a/doc/bind.n
+++ b/doc/bind.n
@@ -201,14 +201,27 @@ substitutions you would make when binding to these events.
Many contemporary mice support a mouse wheel, which is used
for scrolling documents without using the scrollbars. By rolling the
wheel, the system will generate \fBMouseWheel\fR events that the
-application can use to scroll. Like \fBKey\fR events the event is
-always routed to the window that currently has focus. When the event
+application can use to scroll. The event is routed to the
+window currently under the mouse pointer. When the event
is received you can use the \fB%D\fR substitution to get the
-\fIdelta\fR field for the event, which is a integer value describing how
+\fIdelta\fR field for the event, which is an integer value describing how
the mouse wheel has moved. The smallest value for which the
-system will report is defined by the OS. The sign of the
+system will report is defined by the OS. The sign of the
value determines which direction your widget should scroll. Positive
values should scroll up and negative values should scroll down.
+.RS
+.PP
+Horizontal scrolling uses \fBShift-MouseWheel\fR events, with positive
+\fB%D\fR \fIdelta\fR substitution indicating left scrolling and negative
+right scrolling.
+Only Windows and macOS Aqua typically fire \fBMouseWheel\fR and
+\fBShift-MouseWheel\fR events. On
+X11 vertical scrolling is rather supported through \fBButton-4\fR and
+\fBButton-5\fR events, and horizontal scrolling through \fBShift-Button-4\fR
+and \fBShift-Button-5\fR events. Horizontal scrolling events may fire from
+many different hardware units such as tilt wheels or touchpads. Horizontal
+scrolling can also be emulated by holding Shift and scrolling vertically.
+.RE
.IP "\fBKeyPress\fR, \fBKeyRelease\fR" 5
The \fBKeyPress\fR and \fBKeyRelease\fR events are generated
whenever a key is pressed or released. \fBKeyPress\fR and \fBKeyRelease\fR
diff --git a/library/ttk/utils.tcl b/library/ttk/utils.tcl
index 857f4cd..101162f 100644
--- a/library/ttk/utils.tcl
+++ b/library/ttk/utils.tcl
@@ -278,9 +278,6 @@ proc ttk::copyBindings {from to} {
# On OSX, Tk generates sensible values for the %D field in <MouseWheel> events.
#
# On Windows, %D must be scaled by a factor of 120.
-# In addition, Tk redirects mousewheel events to the window with
-# keyboard focus instead of sending them to the window under the pointer.
-# We do not attempt to fix that here, see also TIP#171.
#
# OSX conventionally uses Shift+MouseWheel for horizontal scrolling,
# and Option+MouseWheel for accelerated scrolling.