Tab delimited columns so the results are readable.
import sys
for p in sys.path:
    if p[-12:].lower() == "python23.zip":
        sys.path.append(p + "\\lib-tk")
        break
from Tkinter import *
import tkMessageBox

def lister(event):
    text.insert(INSERT, '%s\t%s\t%s\t%s\n' %(event.keycode,event.keysym,event.state,event.char))
    text.see(END)
    return 'break'
    
root = Tk()
text = Text(root,width=40,height=20)
text.pack(side=LEFT)
scrollbar = Scrollbar(root)
scrollbar.pack(side=RIGHT,fill=Y)
text.configure(yscrollcommand=scrollbar.set)
scrollbar.config(command=text.yview)

text.bind('<Key>',lister)
text.focus()
text.insert(INSERT,'Keycode\tKeysym\tState\tChar\n')

root.mainloop()
_______________________________________________
PythonCE mailing list
PythonCE@python.org
http://mail.python.org/mailman/listinfo/pythonce

Reply via email to