home *** CD-ROM | disk | FTP | other *** search
/ Netrunner 2004 October / NETRUNNER0410.ISO / regular / ActivePerl-5.8.4.810-MSWin32-x86.msi / _57b9686275b8fc3ff960b90b2314acce < prev    next >
Encoding:
Text File  |  2004-06-01  |  520 b   |  21 lines

  1. use strict;
  2.  
  3. sub keysyms {
  4.  
  5.     my( $demo ) = @_;
  6.  
  7.     my $mw = $MW->WidgetDemo(
  8.         -name             => $demo,
  9.         -text             => 'This demonstration displays the keysym for any keyboard character.',
  10.         -title            => 'Display Keysyms',
  11.         -iconname         => 'keysyms',
  12.     );
  13.  
  14.     $mw->Label( qw/ -relief solid -width 20 /, -textvariable => \my $k )->pack;
  15.  
  16.     $mw->bind( '<KeyPress>' => sub {
  17.         $k = sprintf( "%s", $Tk::event->K );
  18.     });
  19.  
  20. } # end keysyms
  21.