I need to use a XULRunner driven browser window, started from an Mac OSX cocoa application, which should be running inside the environment that was created by that OSX application. The reason I can't just create a pure XUL application is that this whole thing should be a kiosk browser used for online exams. So the OSX app turns on the systems kiosk mode disabling dock, menus, program switcher and some more things.

Basically I have everything up and running, but when I start xulrunner with the cocoa NSTask method [NSTask *task launch] all keyboard input in text fields displayed inside the browser window lands in my OSX task and not in the browser text field. The text form fields in the browser gets focus, because the blinking text cursor is appearing there, but it seams to be a problem of standard input landing in the OSX application which started xulrunner and not being forwarded to xulrunner, I verified this by starting the same XUL app with the command line

/Library/Frameworks/XUL.framework/xulrunner-bin [path to application.ini]

in the terminal.

When I install the XUL app with

/Library/Frameworks/XUL.framework/xulrunner-bin --install-app [path to XUL app directory]

so the XUL app is started by clicking the OSX application icon (and inside the app bundle the "stub executable" "xulrunner" is used instead of "xulrunner-bin"),

then the text input problem doesn't happen. But this is of no use for me, because if I try to start the installed XUL application from my OSX starter application, it's started as a independent OSX task, with its own icon in the dock and not inside the kiosk environment created by my OSX starter app.

Does someone have an idea how to make xulrunner-bin to accept keyboard inputs? Maybe I need to pipe the keyboard inputs to the xulrunner task's standard input (don't know if this would really work), but I hoped to find an easier solution.

Btw. using a Cocoa WebView (of WebKit) instead of a XULRunner browser window is no alternative at the moment because this Safe Exam Browser ( safeexambrowser.org ) is supposed to be platform independent and the rendered web pages should be identical on the Windows version (working with XULRunner) and the Mac version.