update key.cpp