summaryrefslogtreecommitdiff
path: root/Doc/library/curses.rst
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2012-08-29 01:40:57 +0200
committerVictor Stinner <victor.stinner@gmail.com>2012-08-29 01:40:57 +0200
commit1d39cde50c9cd485de482ec2cce987482394bff5 (patch)
treef9226b5293d8f864bc4e8cea55e2d8c68fbb3713 /Doc/library/curses.rst
parent4e07a8c9aa5275c7a8161e02fba29e8170f0c212 (diff)
downloadcpython-git-1d39cde50c9cd485de482ec2cce987482394bff5.tar.gz
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.
Diffstat (limited to 'Doc/library/curses.rst')
-rw-r--r--Doc/library/curses.rst9
1 files changed, 5 insertions, 4 deletions
diff --git a/Doc/library/curses.rst b/Doc/library/curses.rst
index ff3a7938d6..c4241483b5 100644
--- a/Doc/library/curses.rst
+++ b/Doc/library/curses.rst
@@ -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()