Add basic key recording functionality