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

Re: [sc-users] UnicodeResponder KeyCodeResponder keyDownBubbling with modifiers



Hi again,
i would have a fix now for this issue ... move it over to the dev list...
Jan

On Oct 19, 2007, at 10:07 PM, Jan Trutzschler wrote:

Hoi Felix,

here is a little issue i'm having with your (until now very useful) key-responders. The responders unfortunately cannot distinguish _fully_ between a normal and a modified keyDown. In the example below, i want that the key pressed with the ctrl- modifier down bubbles the action up to SCTopView, thus returning nil. What it does it returns a responder-stack and nothing happens. Would you have any elegant fix for this?

(
k = UnicodeResponder.new;
//  control ;
k.register(   59  ,   false, false, false, true, {
	"hi from TopView".postln;
});

l = UnicodeResponder.new;
//  ;
l.register(   59  ,   false, false, false, false, {
	"hi from Slider".postln;
});

w = SCWindow.new.front;
w.view.keyDownAction_(k);
v = SCSlider.new(w,Rect(10,10,100,100));
v.keyDownAction_(l);
v.focus;

)

Btw. ' tried the same with the KeyCodeResponder.

cheers,
Jan
_______________________________________________
sc-users mailing list
sc-users@xxxxxxxxxxxxxxx
http://www.create.ucsb.edu/mailman/listinfo/sc-users