The Keyboard Service allows keyboard input to be sent to other services. At the moment the keyboard events are retrieved from a gui element, so the keyboard control must have focus.
Important update:
From version 1.0.1802 the Keyboard service will listen to all keyboard events even if it doesn't have focus.
This small program shows how to get keyboard input into a Python service.
[[service/Keyboard.py]]
Wait for enter from a keyboard
Here is what I went with for
Here is what I went with for my servo calibration script.