Whenever you make a post you should provide as many details as possible. Without the details in the question, we don't have enough information to give you a detailed response.
I am assuming that you are using Tk? Keep in mind that there are other GUI toolkit's out there with their own canvas widgets.
If you want to give focus to a widget - use the grab method:
$canvas1->grab;
$canvas2->grab;