Centralize key responses

Adds a method to the core library for getting a keyboard response, which simplifies the process of writing plugin code that needs keyboard responses. Other benefits are improved error checking, the ability to use the high-performance rt library, and enabling keys to be specified with their character representation, i.e. 'p' instead of 80.