MDL-39910 mod_scorm: add keydown event handlers, fix coding issues