Da gibts n praktisches Programm:
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();
Starten und lustiges TastendrĂĽcken :)
Die meisten PC Probleme befinden sich zwischen Bildschirm und Stuhl...