Update key.cpp