ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> Tcl-core
Tcl-core
Re: [TCLCORE] Re: TIP #158: Distinguish the two 'Enter' keys on Windows
by Vince Darley other posts by this author
Sep 26 2003 9:18AM messages near this date
Re: [TCLCORE] Re: TIP #158: Distinguish the two 'Enter' keys on Windows | Re: [TCLCORE] Re: TIP #158: Distinguish the two 'Enter' keys on Windows
On Fri, 26 Sep 2003, [ISO-8859-1] Frédéric Bonnet wrote:
>  But the solution I had in mind was rather to implement Enter as KP_Enter
>  code then to generate Return events by default on Windows :
> 
>  	bind all <KP_Enter> {event generate %W <Return>}
> 
>  In this case, no need for Mod4. Moreover, KP_Enter would be available on
>  all platforms. Last, Return bindings would work as usual.
[snip]
>  But if we want to keep the Mod4 idea, I suggest we choose a more
>  explicit name (or give it an alias) such as <Num-Return> because this
>  would also allow distinct bindings to the other numpad keys (useful for
>  games).

How about making that 'explicit name/alias' *be* 'KP_'?  Then we would
have a situation where everything worked like the Mod4 proposal, except
pre-existing unix code also works just as desired on Windows.  (Of course
the binding code would now have a special case where it interprets KP_ as
a modifier even though there is no hyphen).

The only backwards incompatibility of this is for Unix applications which
bind only 'Return', but *not* KP_Enter (and same for other KP_* keys),
which would now find that hitting KP_XXX actually triggers the XXX key.
But this would (at least following the TIP authors argument) be viewed as
a benefit, it seems.

Vince.

NB: Not sure how to deal with the change in name from KP_Enter ->  Return
-- that would be 'Enter' would map to 'Return' here under the influence of
the KP_ modifier.





-------------------------------------------------------
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

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved