[vtkusers] KeyPressEvent Tcl
H.Huisman at rad.umcn.nl
H.Huisman at rad.umcn.nl
Wed Nov 15 11:04:51 EST 2006
I'll send you some snippets from our tcl code:
[winGetRenderWindowInteractor $viewer] AddObserver KeyPressEvent \
"cbKeyPressEvent $viewer"
proc cbKeyPressEvent {v} {
....
set key [[winGetRenderWindowInteractor $viewer] GetKeySym]
...
}
Good luck!
-----Oorspronkelijk bericht-----
Van: Robert V Canning [mailto:Robert.V.Canning at usa.dupont.com]
Verzonden: woensdag 15 november 2006 12:36
Aan: vtkusers at vtk.org
Onderwerp: [vtkusers] KeyPressEvent Tcl
Hi,
I am trying to capture when a user presses the arrow keys. I am
using the KeyPressEvent observer to trap for key strokes but I am unable
to
find out how to test for the arrow keys in Tcl. Is there anything like
a
constant I can use?
if {$keypressed == LeftArrow){
dosomething {}
}
I am using VTK 5.0.2 with Tcl 8.4.13 on a Windows XP system.
Thanks,
Bob
This communication is for use by the intended recipient and contains
information that may be Privileged, confidential or copyrighted under
applicable law. If you are not the intended recipient, you are hereby
formally notified that any use, copying or distribution of this e-mail,
in whole or in part, is strictly prohibited. Please notify the sender by
return e-mail and delete this e-mail from your system. Unless explicitly
and conspicuously designated as "E-Contract Intended", this e-mail does
not constitute a contract offer, a contract amendment, or an acceptance
of a contract offer. This e-mail does not constitute a consent to the
use of sender's contact information for direct marketing purposes or for
transfers of data to third parties.
Francais Deutsch Italiano Espanol Portugues Japanese Chinese Korean
http://www.DuPont.com/corp/email_disclaimer.html
More information about the vtkusers
mailing list