![]() |
![]() |
7 Einträge, 1 Seite |
1
2
$TOP->bind('<Alt-+>' => sub {&zoom("+")}); # increment zoom
$TOP->bind('<Alt-minus>' => sub {&zoom("-")}); # dercrement zoom
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
use Tk;
$top = MainWindow->new();
$frame = $top->Frame( -height => '6c', -width => '6c',
-background => 'black', -cursor => 'gobbler' );
$frame->pack;
$top->bind( '<Any-KeyPress>' => sub
{
my($c) = @_;
my $e = $c->XEvent;
my( $x, $y, $W, $K, $A ) = ( $e->x, $e->y, $e->K, $e->W, $e->A );
print "A key was pressed:\n";
print " x = $x\n";
print " y = $y\n";
print " W = $K\n";
print " K = $W\n";
print " A = $A\n";
} );
MainLoop();
![]() |
![]() |
7 Einträge, 1 Seite |