Can the new midi mapping be used with exported Applications?

moss's icon

I noticed that if I mapped some controls with the new Max 8 midi mapping feature, they will be kept when I export the patch as a Standalone application (exe on Windows 10). But is there a way to use the mapping feature (change it) in the application?

Jeremy's icon

There's an undocumented object called 'mappings' which you can use to enable midi and keyboard mapping or open a standalone Mappings window in your application.

'midi 0/1'
'key 0/1'
'open'
'read <mappingsfile>'
'write >mappingsfile>'

It will be documented at some point, but might not get much better for a while... :-)

moss's icon

Thanks, exactly what I was looking for!

liubomir borissov's icon

does the key mapper work with modifier keys, e.g. opt-5 or ctrl-u?

Jeremy's icon

Sure, although I see that we could improve the way those are displayed in the mappings window. Honestly, it's a little tricky -- if you map alt-5, are you mapping '[' on a German keyboard or alt-5 as a keystroke. There may be an argument for both.

liubomir borissov's icon

thanks, i was able to get some working by trial and error but was not seeing some the results because of the display. also not all modifiers seem to work: e.g. opt-shift-2 appears as the euro € on a us kbd but opt-e is invisible. adding control or cmd seems to throw things off further. ideally one would see all the actual keys pressed in the [source] tab

Roman Thilenius's icon

mind the difference between mac and windows here.

Jeremy's icon

That, of course, would never have occurred to us. Thanks!