Adding key retrieval for buttons