[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-dev] Sc3 keydown functions proposal



On Monday, July 29, 2002, at 07:09 PM, heiko goelzer wrote:
if(pass && this.isKindOf(SCTopView).not, {
// call local keydown action of parent view
this.parent.handleKeyDownBubbling(view, key, modifiers);

you should just override handleKeyDownBubbling in SCTopView to pass it
then to the globalKeyDown action.

Well, I like the idea that the global action is seperate from the usual
passing and is always called. I'm not shure if this is what you're aiming
at?

so you would like the global always to fire ?
i guess i would put my top level stuff in the SCTopView responder anyway.
(for that window)

either way, my little suggestion was just to say you can avoid the

this.isKindOf(SCTopView).not

by having a different handleKeyDownBubbling method for SCTopView

what would be an example of something you want on the global action ?
real world example.  i'm just curious.


i guess these keyboards can detect up to 4 keys at once.  did you find
anything
about that ?

You are talking about usual keys not modifiers, are you?

yes.

I didn't know about
that. I didn't go into this, only know about what was there in the NS
framework: just one key + modifiers there.

i think max can detect multiples. you know those M1D1 things got like 127
of them and you can hold them ALL DOWN !!!


The keyUp is handed over the exact same way. There is a difference
though:
keyUp sets the variable keyTyped to the released key.
And as keyDowns keep repeating with the key repeat rate you set in
global os
preferences (you can even turn repetition off if you want) keyUp appears
only once.
hmm.  so you would have in your keydown action something that waits for
the keyUp
to appear ?

I don't get your point here. Maybe you have to run it first. Apart from
repetition its exactly the keydown thing.

i'll run it yes. i was just trying to figure out why you put the key into
a view instance variable.


my KeyDown uses a dictionary so it doesn't have to ask a lot of if
statements.

looks really promising to me. Nice code...

for the key codes its a dictionary. for matching the modifiers, it has a stack that it goes through. could use a dictionary there too, but its most likely
that you will have many keys, and few modifiers combinations per key.


if you are going to write handlers, then take a look at this KeyDown
code and steal.

yeah thanks, I will

    Heiko

_______________________________________________
sc-dev mailing list
sc-dev@xxxxxxxxxxxxxxx
http://www.create.ucsb.edu/mailman/listinfo/sc-dev



____________________
http://crucial-systems.com