Max users: Always on top / keyboard hook ?

Discuss music production with Ableton Live.
Post Reply
Coupe70
Posts: 1099
Joined: Fri Jul 23, 2004 7:25 am
Location: Mainz / Germany
Contact:

Max users: Always on top / keyboard hook ?

Post by Coupe70 » Tue Aug 18, 2009 6:35 am

Hi,

I'm taking a look at MAX at the moment.
Is it possible to read out keyboard input with MAX
even if MAX window is not on top / does not have focus ?
Phongemeinschaft (Live-ElectroJazz / NuJazz)
Homepage - youtube - Like! :-)
Live 9 (32Bit), HP DV7, i5 2,53GHz, 8 GB RAM, Win7 (64Bit)

Michael Hatsis
Posts: 1807
Joined: Tue Nov 16, 2004 6:27 pm
Location: Here and There
Contact:

Re: Max users: Always on top / keyboard hook ?

Post by Michael Hatsis » Tue Aug 18, 2009 9:01 am

yeah, its possible, yer gonna want to go ahead and take a good ol' look at the hi object. that there object will go ahead and give you mouse info no matter which gosh darn windah is up front.

monohusche
Posts: 190
Joined: Thu Jan 22, 2009 4:28 pm
Location: Hongkong

Re: Max users: Always on top / keyboard hook ?

Post by monohusche » Tue Aug 18, 2009 10:12 am

"key" is your key

disco judas
Posts: 324
Joined: Tue Jan 27, 2009 11:24 am

Re: Max users: Always on top / keyboard hook ?

Post by disco judas » Tue Aug 18, 2009 10:17 am

If you make a nice midi computer key, like PropsRecord, please share !

Coupe70
Posts: 1099
Joined: Fri Jul 23, 2004 7:25 am
Location: Mainz / Germany
Contact:

Re: Max users: Always on top / keyboard hook ?

Post by Coupe70 » Tue Aug 18, 2009 10:36 am

@monohusche:
As far as I understand "key" only works when teh MAX window has focus,
so it does not work in background. Correct me if I'm wrong...

@mike:
hi-menu command returns "0 devices".
so my internal notebook keyboard is not recognised (because it is
PS/2 internal I guess), but my "HID-conform mouse" (device manager)
does not show up either. what's wrong ?
will an external USB keyboard work ?
Phongemeinschaft (Live-ElectroJazz / NuJazz)
Homepage - youtube - Like! :-)
Live 9 (32Bit), HP DV7, i5 2,53GHz, 8 GB RAM, Win7 (64Bit)

monohusche
Posts: 190
Joined: Thu Jan 22, 2009 4:28 pm
Location: Hongkong

Re: Max users: Always on top / keyboard hook ?

Post by monohusche » Tue Aug 18, 2009 11:25 am

I tried it with two identical max patches, both just containing "key" and "print" but using different print prefixes. No matter which window has the focus there are always two printouts.

Haven't checked whether it still works if NONE of the max windows has the focus. will check it out...

actually, you are right, max has to have the focus to get keyboard events delivered

Post Reply