logo       

Re: perl/tk changes for sun keyboard 10-key pad: msg#00019

Subject: Re: perl/tk changes for sun keyboard 10-key pad
"Troy.A Johnson" <troy.johnson@xxxxxxxxxxxxxxxxxx> writes:

> Hello Perl/Tk People!
> 
> I asked some questions about this some months ago and I received
> many helpful responses. Thank you very much!
> 
> We finally got our problems squared away (got the applications 
> working the way they used to), but the solution is probably not 
> a good, acceptable to all Tk-ers kind of solution. Regardless, 
> I wanted to share what we did in case it is of interest to others
> (Sun users or not). Also, to put it out there in case some of the 
> modifications are "bad" and could cause us problems (though 
> I do know we will probably have to patch next time we update 
> Tk, we usually stay at given rev for years). 
> 
> The changes are here:
> 
> http://troy.jdmz.net/perltk/
> 

It seems that Sun is quite different than "normal" Unix PCs (or is it
XFree86 that makes the difference?). On my machine (FreeBSD 4.x, i386,
old XFree86 3.x.x, Tk 804.027) the numeric keypad works as expected if
Num_Lock is on. Cursor keys (if Num_Lock is off) do not work in Tk's
entry, but they send the special key events KP_Left, KP_Right etc. The
following simple lines:

use Tk;
$top = new MainWindow;
for my $key (qw(Left Right Home End Delete Insert)) {
    $top->bind("Tk::Entry", "<KP_$key>" => sub {
$_[0]->eventGenerate("<$key>") });
}
$top->Entry->pack;
MainLoop;
__END__

make the cursor keys work, but unfortunately the 1, 4, 7 keys do not
work anymore?! Seems like a Tk bug to me...

Regards,
        Slaven

-- 
Slaven Rezic - slaven <at> rezic <dot> de

    tkrevdiff - graphical display of diffs between revisions (RCS, CVS or SVN)
    http://ptktools.sourceforge.net/#tkrevdiff
-++**==--++**==--++**==--++**==--++**==--++**==--++**==
This message was posted through the Stanford campus mailing list
server.  If you wish to unsubscribe from this mailing list, send the
message body of "unsubscribe ptk" to majordomo@xxxxxxxxxxxxxxxxxx



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
science.linguis...    culture.sf.lite...    video.mplayer.c...    yellowdog.gener...    ietf.rfc822/199...    emacs.help/2002...    redhat.release....    kernel.speakup/...    java.openejb.de...    debian.devel.gt...    xfree86.newbie/...    bug-tracking.ma...    pam/2003-05/msg...    games.devel.ope...    user-groups.lin...    music.pancham/2...    network.mq.deve...    web.html.genera...    arklinux.bugs/2...    linux.ecasound/...    qnx.openqnx.dev...    org.user-groups...    file-systems.sf...    trustix.contrib...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe