Added required code to implement LDKey, which waits for a key press and records it in a V register