Open fujimura opened 9 years ago
I vote it should return all characters and not filter out non-printable characters.
I vote it should return all characters and not filter out non-printable characters.
+1
Here's another use case for allowing users of this library to respond to control characters: purescript/purescript#934.
I wonder if a better API would be to add a function which can transform InputT
actions to specify what should happen when a control character is entered. Something like this, perhaps:
type ControlHandler m = Char -> (String, String) -> InputT m (Maybe String)
handleControlChars :: (MonadException m) =>
ControlHandler m -> InputT m (Maybe String) -> InputT m (Maybe String)
The arguments to a ControlHandler
should be:
^C
should give 'c'@judah if I were to put together a PR for this, would you take it?
Hello,
I'd like to do something with \BS, but
getInputChar
ignores non-printable characters. How can I do it? Should I build a custom function which acts likegetInputChar
returns non-printable ones?