Web Analytics Made Easy - Statcounter
Skip to content

Navigating Focus Using Arrow Keys

This example shows how you can navigate through your windows's elements by using the left and right arrow keys. The down arrow key is set to exit the program.

The code that sets up the use of arrow keys are these 3 bind statements. They cause events to be generated when those keys are pressed on the keyboard:

window.bind('<Right>', '-NEXT-')
window.bind('<Left>', '-PREV-')
window.bind('<Down>', 'Exit')