summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
Diffstat (limited to 'generic')
-rw-r--r--generic/tkBind.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/generic/tkBind.c b/generic/tkBind.c
index 6841f1e..10998fe 100644
--- a/generic/tkBind.c
+++ b/generic/tkBind.c
@@ -2028,7 +2028,7 @@ ExpandPercents(
string = numStorage;
goto doString;
case 'k':
- if (flags & KEY) {
+ if ((flags & KEY) && (eventPtr->type != MouseWheelEvent)) {
number = eventPtr->xkey.keycode;
goto doNumber;
}
@@ -2168,7 +2168,7 @@ ExpandPercents(
* This is used only by the MouseWheel event.
*/
- if (flags & KEY) {
+ if ((flags & KEY) && (eventPtr->type == MouseWheelEvent)) {
number = eventPtr->xkey.keycode;
goto doNumber;
}
@@ -2177,7 +2177,7 @@ ExpandPercents(
number = (int) eventPtr->xany.send_event;
goto doNumber;
case 'K':
- if (flags & KEY) {
+ if ((flags & KEY) && (eventPtr->type != MouseWheelEvent)) {
const char *name = TkKeysymToString(keySym);
if (name != NULL) {
@@ -2186,7 +2186,7 @@ ExpandPercents(
}
goto doString;
case 'N':
- if (flags & KEY) {
+ if ((flags & KEY) && (eventPtr->type != MouseWheelEvent)) {
number = (int) keySym;
goto doNumber;
}