[Newbies] Capture keyboard focus for real and true.

Bert Freudenberg bert at freudenbergs.de
Mon Jul 2 23:06:08 UTC 2007


On Jul 3, 2007, at 0:53 , Blake wrote:

> Hey, gang:
>
> 	So, I've made a morph that responds to keypresses and I've caused  
> it to grab the keyboard focus. But if I move the mouse of a  
> workspace, the workspace captures the keyboard focus, and from that  
> point forward, my morph is back to only responding to keypresses  
> when the mouse is over it. My basic question is how to change this.  
> (As long as this morph exists, I want it to respond to all  
> keypresses, let's say.)

Send #addKeyboardListener: with your morph as argument to the Hand.  
This way you get all keyboard events independent ot keyboard focus.

- Bert -




More information about the Beginners mailing list