Thanks to PhiLho who pointed out the problem below, my question should really be: how to get the processing program/canvas to be active without having the user to mouseover and click on it first? My program takes user inputs in the form of key presses, so the user would not naturally consider clicking on the canvas/browser first.
Is there any way of doing this within the Processing environment, i.e. without including a JS script? Thanks for any help you could offer.