mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Issue #15785: Modify window.get_wch() API of the curses module: return a
character for most keys, and an integer for special keys, instead of always returning an integer. So it is now possible to distinguish special keys like keypad keys.
This commit is contained in:
parent
4e07a8c9aa
commit
1d39cde50c
4 changed files with 20 additions and 13 deletions
|
@ -869,8 +869,8 @@ the following methods and attributes:
|
|||
|
||||
.. method:: window.get_wch([y, x])
|
||||
|
||||
Get a wide character. Like :meth:`getch`, but the integer returned is the
|
||||
Unicode code point for the key pressed, so it can be passed to :func:`chr`.
|
||||
Get a wide character. Return a character for most keys, or an integer for
|
||||
function keys, keypad keys, and other special keys.
|
||||
|
||||
.. versionadded:: 3.3
|
||||
|
||||
|
@ -878,8 +878,9 @@ the following methods and attributes:
|
|||
.. method:: window.getkey([y, x])
|
||||
|
||||
Get a character, returning a string instead of an integer, as :meth:`getch`
|
||||
does. Function keys, keypad keys and so on return a multibyte string containing
|
||||
the key name. In no-delay mode, an exception is raised if there is no input.
|
||||
does. Function keys, keypad keys and other special keys return a multibyte
|
||||
string containing the key name. In no-delay mode, an exception is raised if
|
||||
there is no input.
|
||||
|
||||
|
||||
.. method:: window.getmaxyx()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue