fix for issue #318 (Function and Numpad keys caused crashes on cpp target)