help regarding keyboard event

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

help regarding keyboard event

priti verma
hi,
I want to know how to invoke key press event in squeak speacly tab key pressed??if any one have any study material or any thing please help
Thanks
Priti

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: help regarding keyboard event

K. K. Subramaniam
On Thursday 11 March 2010 04:16:52 am priti verma wrote:
> hi,
> I want to know how to invoke key press event in squeak speacly tab key
> pressed??if any one have any study material or any thing please help

In Squeak, keystrokes are converted into events (KeyboardEvent) by the main
loop and passed onto the active Hand (a HandMorph). The hand then picks the
morph which has the current keyboard focus and can handle keystrokes to pass
on the key pressed.

In Etoys, the last key pressed is available in World's lastKeyStroke property
of input category.

To receive keystrokes, add a method handlesKeyboard: to return true and put
the keystroke handling logic in keyStroke: method. You may also want to handle
focus change notifications in a keyboardFocusChange: method.

See these methods in PluggableListMorph, TextMorph for examples.

HTH .. Subbu
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: help regarding keyboard event

priti verma
Hi
Thanks, but this is the way how system handle keyboard event, my question is if i want to generate some keyboard event like how we generate mouse click events manualy in other language.If this is possible pleaser help me i have a funtion which work on clicking tab key.I want to call that function,so what will be the event that i have to pass.
Thanks
Priti

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners