summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2012-08-28 23:40:57 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2012-08-28 23:40:57 (GMT)
commit1d39cde50c9cd485de482ec2cce987482394bff5 (patch)
treef9226b5293d8f864bc4e8cea55e2d8c68fbb3713 /Doc
parent4e07a8c9aa5275c7a8161e02fba29e8170f0c212 (diff)
downloadcpython-1d39cde50c9cd485de482ec2cce987482394bff5.zip
cpython-1d39cde50c9cd485de482ec2cce987482394bff5.tar.gz
cpython-1d39cde50c9cd485de482ec2cce987482394bff5.tar.bz2
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')
-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 ff3a793..c424148 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()