KeyListener without a Frame ?

f.e's icon

Is there a way to handle ActionListeners (like KeyListener) without
having to link it to a frame or something ? Clearly, just to handle
events in Max ? I got a good starting point but do not know how to say :
begin to listen. My KeyEvent implements KeyListener class is at the end
of my mxj class, fine, but how do i say, in my main mxj code, now launch
it to listen !

Thanks

f.e
--
f.e chanfrault | aka | personal computer music
> >>>>>> http://www.personal-computer-music.com
> >>>>>> |sublime music for a desperate people|

Joshua Kit Clayton's icon

>
>> Is there a way to handle ActionListeners (like KeyListener)
>> without having to link it to a frame or something ? Clearly, just
>> to handle events in Max ? I got a good starting point but do not
>> know how to say : begin to listen. My KeyEvent implements
>> KeyListener class is at the end of my mxj class, fine, but how do
>> i say, in my main mxj code, now launch it to listen !

connect key object to your mxj object.

-Joshua

topher lafata's icon

No. It needs to be attached to something capable of having focus in
the UI.

On Aug 15, 2006, at 04:55 AM, f.e wrote:

> Is there a way to handle ActionListeners (like KeyListener) without
> having to link it to a frame or something ? Clearly, just to handle
> events in Max ? I got a good starting point but do not know how to
> say : begin to listen. My KeyEvent implements KeyListener class is
> at the end of my mxj class, fine, but how do i say, in my main mxj
> code, now launch it to listen !
>
> Thanks
>
> f.e
> --
> f.e chanfrault | aka | personal computer music
>> >>>>>> http://www.personal-computer-music.com
>> >>>>>> |sublime music for a desperate people|

f.e's icon

Joshua Kit Clayton wrote:
>>
>>> Is there a way to handle ActionListeners (like KeyListener) without
>>> having to link it to a frame or something ? Clearly, just to handle
>>> events in Max ? I got a good starting point but do not know how to
>>> say : begin to listen. My KeyEvent implements KeyListener class is
>>> at the end of my mxj class, fine, but how do i say, in my main mxj
>>> code, now launch it to listen !
>
> connect key object to your mxj object.
No kidding ? I wanted to have more than key object which doesn't give
all keys of a win laptop...

>
> -Joshua
>

Joshua Kit Clayton's icon

On Aug 16, 2006, at 12:55 AM, f.e wrote:

>> connect key object to your mxj object.
> No kidding ? I wanted to have more than key object which doesn't
> give all keys of a win laptop...

If you can report the issue with more specifics, then perhaps we can
look into. It might not support special keys like "launch explorer"
buttons, but perhaps we can get other keys working. No promises,
however. Otherwise I'd recommend you approach this problem in C,
rather than Java.

-Joshua