Attachment "tip158.patch" to
ticket [797404ff]
added by
kennykb
2004-05-01 03:31:47.
? doc/man.macros
? win/config.status.lineno
? win/tk.res
? win/tk85g.dll
? win/tk85g.exp
? win/tk85g.lib
? win/tk85g.pdb
? win/tkConfig.sh
? win/tkWinDialogNew.c
? win/tkstub85g.lib
? win/vc60.pch
? win/wish.res
? win/wish85g.ilk
? win/wish85g.pdb
Index: doc/bind.n
===================================================================
RCS file: /cvsroot/tktoolkit/tk/doc/bind.n,v
retrieving revision 1.11
diff -b -u -r1.11 bind.n
--- doc/bind.n 23 Apr 2004 13:47:46 -0000 1.11
+++ doc/bind.n 30 Apr 2004 20:30:33 -0000
@@ -125,6 +125,7 @@
\fBButton4, B4\fR \fBDouble\fR
\fBButton5, B5\fR \fBTriple\fR
\fBMod1, M1\fR \fBQuadruple\fR
+\fBExtended\fR
.DE
Where more than one value is listed, separated by commas, the values
are equivalent.
@@ -159,7 +160,14 @@
substantial mouse motion in between. For example, \fB<Double-Button-1>\fR
is equivalent to \fB<Button-1><Button-1>\fR with the extra time and space
requirement.
-
+.PP
+The \fBExtended\fR modifier is, at present, specific to Windows.
+It appears on events that are associated with the keys on the
+"extended keyboard." On a US keyboard, the extended keys include
+the \fBAlt\fR and \fBControl\fR keys at the right of the keyboard, the
+cursor keys in the cluster to the left of the numeric pad, the
+\fBNumLock\fR key, the \fBBreak\fR key, the \fBPrintScreen\fR key, and
+the \fB/\fR and \fBEnter\fR keys in the numeric keypad.
.SS "EVENT TYPES"
.PP
The \fItype\fR field may be any of the standard X event types, with a
Index: generic/tkBind.c
===================================================================
RCS file: /cvsroot/tktoolkit/tk/generic/tkBind.c,v
retrieving revision 1.32
diff -b -u -r1.32 tkBind.c
--- generic/tkBind.c 17 Mar 2004 18:15:42 -0000 1.32
+++ generic/tkBind.c 30 Apr 2004 20:30:34 -0000
@@ -425,6 +425,7 @@
{"Meta", META_MASK, 0},
{"M", META_MASK, 0},
{"Alt", ALT_MASK, 0},
+ {"Extended", EXTENDED_MASK, 0},
{"B1", Button1Mask, 0},
{"Button1", Button1Mask, 0},
{"B2", Button2Mask, 0},
Index: generic/tkInt.h
===================================================================
RCS file: /cvsroot/tktoolkit/tk/generic/tkInt.h,v
retrieving revision 1.61
diff -b -u -r1.61 tkInt.h
--- generic/tkInt.h 21 Dec 2003 23:50:13 -0000 1.61
+++ generic/tkInt.h 30 Apr 2004 20:30:34 -0000
@@ -898,6 +898,7 @@
#define META_MASK (AnyModifier<<1)
#define ALT_MASK (AnyModifier<<2)
+#define EXTENDED_MASK (AnyModifier<<3)
/*
* Object types not declared in tkObj.c need to be mentioned here so
Index: win/tkWinX.c
===================================================================
RCS file: /cvsroot/tktoolkit/tk/win/tkWinX.c,v
retrieving revision 1.28
diff -b -u -r1.28 tkWinX.c
--- win/tkWinX.c 13 Jan 2004 02:06:02 -0000 1.28
+++ win/tkWinX.c 30 Apr 2004 20:30:34 -0000
@@ -1139,6 +1139,13 @@
} else {
state &= ~mask;
}
+ if ( HIWORD(lParam) & KF_EXTENDED ) {
+ if ( message == WM_SYSKEYDOWN || message == WM_KEYDOWN ) {
+ state |= EXTENDED_MASK;
+ } else {
+ state &= ~EXTENDED_MASK;
+ }
+ }
}
return state;
}