Simplified the keyboard implementation.

- Atomics were more complex than simple locking in this case.

- Made the interface a little more consistent.