Changed key codes to constants

Better compatibility, especially with number keys.