Setting Keyboard Focus
To assign
the keyboard focus to an item, use the focus
method:
$canvas->focus(tag/id
);
If the item doesn’t know what to do with the keyboard focus, nothing will happen. You’ll use this to change the focus to a widget within the Canvas.
Get Mastering Perl/Tk now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.