How can I instruct readline
to convert keyboard intput to upper case, as it is typed, and have that be the echo to the terminal?
(Related, python: Convert input to upper case on screen as it is typed — which asks a different question trying to achieve a similar result. This is not a Python-specific question, so is not a duplicate of that one.)
The program I'm writing (which is Python 3 code, if that matters) uses the readline
library for command line input, so implementing conversion of each keystroke is not an option. I'm looking for a way to do this by requesting the readline
library do it for me.
The existing commands upcase-word
and downcase-word
are for the user to invoke, to deliberately change the case of text already typed. That isn't what I need; instead I want the text to be changed immediately as it's typed in.