adding support for keyboard and mouse scripting callbacks