Why Tk treat F10, F11, F12 diferently from F1...F9?

G

Gabriel B.

This is completely odd to me...

# Bind F1...F12 to <<TabKeys>>
self.tk.event_add( '<<TabKeys>>', # keys used to switch between the tabs
'<KeyPress-F1>','<KeyPress-F2>','<KeyPress-F3>','<KeyPress-F4>','<KeyPress-F5>',
'<KeyPress-F6>','<KeyPress-F7>','<KeyPress-F8>','<KeyPress-F9>','<KeyPress-F10>',
'<KeyPress-F11>','<KeyPress-F12>'
)

self.master.bind_all('<<TabKeys>>', self.__functionKeysPressed )

def __functionKeysPressed(self, event):
print event.keysym


Now, i run the program and press from F1 to F12, and i get:
F1
F2
F3
F4
F5
F6
F7
F8
F9
L1
L2


F10 simply does nothing!
F11 prints L1
F12 prints L2

The only place google takes is not very elucidating :)
http://64.233.161.104/search?q=cach...l/linuxbin/dpwish+tk+bind+F12|F11+L1|L2&hl=fr

Anyone has any ideia why is that?
I surely didn't mind about this if it wasn't for F10 showing nothing.
I get the return code just to use the same function (and same biding)
for the 12 buttons since i can't pass arguments to the Command option
in tk. ...And i'm already considering adding a L1 and L2 check instead
of F11 and F12 and a 'empty' check for the F10... But that would be
plain ugly.

Thanks,
Gabriel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,023
Latest member
websitedesig25

Latest Threads

Top