#!/usr/bin/perl use warnings; use strict; use Tk; my $mw = MainWindow->new; my $c = $mw->Scrolled( qw/Canvas -width 400 -height 400 -relief sunken -bg white -borderwidth 1 -scrollbars se -scrollregion/ => [qw/0 0 1000 1000/])->pack; $mw->bind($mw, '', [sub { my $unit = $_[1] > 0 ? -1 : 1; $c->yviewScroll($unit => 'units'); }, Ev('D')] ); MainLoop;