update key code