The annoying popup menu can be disabled by using TitaniumBackup to freeze the AirCommand app.
Alas, Magic Dosbox does not seems to handle stylus button presses on my Note5 anymore. I’m not sure when they stopped working. Maybe an OS update caused the problem?
The stylus button still works in other apps (eg. Dosbox Turbo), so at least Marshmallow has not broken it entirely.