in reply to Tk focus

The snippet that you've provided isn't workable. That said, you want to see the man page for Tk::focus. It's a built-in for Tk, so just enter
man focus
It should answer your question.