fix variable names of key press and insert_mode