bug: added event var declaration to key-press function call