Ctrl-key detection in curses

David M. Cooke cookedm+news at physics.mcmaster.ca
Tue Feb 24 17:40:25 EST 2004


At some point, "Melysa Handayani" <melys at telkom.net> wrote:

> Is there any other methods to retrieve inputs in curses than getch()
> or getkey(), specially ones that can detect ctrl-key?
> Thank you!

Do mean checking for a ctrl-key press by itself? Can't be done -- the
terminal doesn't report that. If you mean ctrl-key + character,
getch() and getkey() do that.

-- 
|>|\/|<
/--------------------------------------------------------------------------\
|David M. Cooke
|cookedm(at)physics(dot)mcmaster(dot)ca



More information about the Python-list mailing list