[New-bugs-announce] [issue44956] curses getch returns wrong value
Robert T McQuaid
report at bugs.python.org
Thu Aug 19 09:30:19 EDT 2021
New submission from Robert T McQuaid <rtmq at fixcas.com>:
This applies to Python 3.8 under Debian-11 Bullseye.
Under curses getch should return the value of curses.KEY_B2
(350 decimal) when pressing the keypad 5. Instead it
returns 574.
The simple program following the signature block
illustrates the problem.
Robert T McQuaid
558 McMartin Road
Mattawa Ontario P0H 1V0
phone: 705-744-6274
email: rtmq at fixcas.com
# Put the following lines in a file bug.py
# Run from a terminal with: python3 bug.py
import curses as cs
def report(stdscr):
print('press the keypad 5')
global result
result=stdscr.getch()
cs.initscr()
cs.wrapper(report)
print('KEY_B2 (decimal): '+str(cs.KEY_B2))
print('input decimal value: '+str(result))
----------
components: Library (Lib)
messages: 399917
nosy: arbor
priority: normal
severity: normal
status: open
title: curses getch returns wrong value
versions: Python 3.8
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44956>
_______________________________________
More information about the New-bugs-announce
mailing list