[vtkusers] KeyDown vs KeyPress events
David Doria
daviddoria+vtk at gmail.com
Tue Jan 26 13:55:40 EST 2010
The other day we were discussing the difference between KeyPress and
KeyDown. I found this about Java key events - I'd imagine it's the
same for VTK?
"In order to understand the difference between keydown and keypress,
it is useful to understand the difference between a "character" and a
"key". A "key" is a physical button on the computer's keyboard while a
"character" is a symbol typed by pressing a button. In theory, the
keydown and keyup events represent keys being pressed or released,
while the keypress event represents a character being typed."
"The keydown event occurs when the key is pressed, followed
immediately by the keypress event. Then the keyup event is generated
when the key is released."
There is also an OnChar and an OnRelease though
(http://www.vtk.org/doc/nightly/html/classvtkInteractorStyle.html#a4c557c1b61499380973316ccc22efaae),
so I'm not sure where those fit in.
Can anyone confirm the above and clarify these additional functions?
Once we get them cleared up, I'll fix the documentation.
Thanks,
David
More information about the vtkusers
mailing list