Re: [TCLCORE] Re: TIP #158: Distinguish the two 'Enter' keys on Windows
by George Howlett other posts by this author
Sep 29 2003 4:01PM messages near this date
[TCLCORE] Re: TIP #158: Distinguish the two 'Enter' keys on Windows
|
[TCLCORE] Re: TIP #158: Distinguish the two 'Enter' keys on Windows
In message <m3wubv8vgb.fsf@[...].net> , Benjamin Riefenstahl writes:
> To summarize my state of information: I think that the "ModX"
> modifiers are just stand-ins in X11, in case a keyboard has a modifier
> that is not in the regular list of "Shift", (Num)"Lock" and "Control".
> So the "ModX" keys are generic to cover "Alt", "Meta", "Hyper",
> "Windows", "Option", "Command", "AltGr", just to mention the ones of
> which I have heard.
There's nothing deeply wrong with the "Mod4" proposal. It simply
depends upon the problem that you are solving.
If you want to solve the problem of a porting a Tk program developed
under X11 to Windows --with numeric keypad bindings--, then adding a
new modifier still means you need to change lots of code. The "tk
keypadevents" command would not require any bindings to be changed.
If on the other hand, what want is to give access to the extended
status bit from the WM_CHAR and WM_KEY* messages (e.g. to indicate the
difference between "Return" and "KP_Enter") then adding a "Mod4"
modifier is one way of doing it.
The issue I have with "Mod4" is that it's "hacky". Tk (under Windows)
is in part an X11 emulation layer on top of Win32. But using "Mod4"
like this isn't consistent with either Win32 or X11. It looks like a
hack. I would prefer either Fredric's suggestion of using something
completely different like the "Num" modifier or simply making the bit
available in the state "%s" detail.
bind all <Return> {
if { %s & 0x0100 } {
# handle keypad enter
} else {
# handle regular return
}
}
It comes down to what problem you're solving. Just what's the purpose
of TIP 158?
--gah
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Tcl-Core mailing list
Tcl-Core@[...].net
https://lists.sourceforge.net/lists/listinfo/tcl-core
Thread:
Benjamin Riefenstahl
=?ISO-8859-1?Q?Fr=E9d=E9ric_Bonnet?=
Benjamin Riefenstahl
George Howlett
Benjamin Riefenstahl
George Howlett
Vince Darley
Joe English
Vince Darley
|