Parses strings into key objects of the same format as the ones emitted by nodejs readline.