[vtkusers] Detect special keys
    Patrick Brockmann 
    Patrick.Brockmann at ipsl.jussieu.fr
       
    Thu May 15 12:35:52 EDT 2003
    
    
  
Hi all,
How to detect special keys (F1, ARROW_LEFT...) using Tk KeySyms ?
Thanks for any help.
Patrick
Here is the python code I use to handle shift, ctrl key and keys
#**************************************************
def Keypress(obj, event):
    if obj.GetControlKey() :
        print "Ctrl pressed"
    if obj.GetShiftKey() :
        print "Shift pressed"
    if obj.GetKeySym() == 'a'
        print "a pressed"
...
...
...
inter.AddObserver("KeyPressEvent", Keypress)
#**************************************************
-- 
mailto:Patrick.Brockmann at cea.fr
01.69.08.40.09 --> LSCE (Orme des merissiers 706, Bureau 3)
01.44.27.21.10 --> IPSL (Jussieu, Tour 26, 4eme)
http://www.ipsl.jussieu.fr/~brocksce/
    
    
More information about the vtkusers
mailing list