Refactored key codes