keypress issue + jslint compliance