[Newbies] Capture keyboard focus for real and true.

Blake blake at kingdomrpg.com
Tue Jul 3 02:39:52 UTC 2007

On Mon, 02 Jul 2007 16:56:07 -0700, Bert Freudenberg
<bert at freudenbergs.de> wrote:

> Works for me (though you actually do not need the #keyboardFocus: send).

Without the #keyboardFocus: self, the focus never goes to the newly
created Morph.

So, you're saying that your Morph class gets all keyboard events
regardless of other windows having the focus?

> Note that in Morphic some parts only work with keyStroke events. And  
> keyDown/Up events are pretty much neglected, you find almost no examples  
> with them.  Besides, up/down codes are platform dependent (on my Mac  
> W,A,S,D gives keyValues 13, 0, 1, 2, but they will give these codes  
> independent of the keyboard setting so you can be sure it refers to the  
> same physical keys).

Well, I had suggested that we make a little class for translating
keystrokes across platforms but nobody seemed interested.

In any event, how the heck do I debug =this=

More information about the Beginners mailing list