Forums > Java

KeyListener without a Frame ?

August 15, 2006 | 11:04 am

>
>> 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



f.e
August 15, 2006 | 11:55 am

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|


August 15, 2006 | 5:33 pm

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
August 16, 2006 | 7:55 am

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
>


August 16, 2006 | 4:58 pm

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


Viewing 5 posts - 1 through 5 (of 5 total)