curses-menu icon indicating copy to clipboard operation
curses-menu copied to clipboard

use within curses.wrapper() breaks input?

Open snail-coupe opened this issue 2 years ago • 2 comments

Version

Other (include below)

Operating System

Other (include below)

Environment

WSL Debian 11 bash within Microsoft Windows Terminal

What happened?

$ pip list | grep curses-menu
curses-menu       0.6.7
$ python -V
Python 3.9.2
$ uname -a
Linux Potoroo 5.15.68.1-microsoft-standard-WSL2 #1 SMP Mon Sep 19 19:14:52 UTC 2022 x86_64 GNU/Linux
$ head -1 /etc/os-release
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"

I'm trying to use curses-menu to add a menu to an existing curses based app, however after doing so I find my calls to window.getch() break.

In the attached example I get and echo out a key press, then call CursesMenu.get_selection, then attempt to get and echo a key press again. This second time though my keypresses are just echoed to the console rather than caught by the getch()

test_curses_menu.py.txt

https://user-images.githubusercontent.com/53581981/202873070-ddf6cdc5-c0f6-4cc5-94ec-41d7c60af42c.mp4

For completeness the issue was also reproducible on my Raspberry Pi, connected via Putty to remove Windows Terminal from the mix.

$ pip list | grep curses-menu
curses-menu 0.6.7
$ python -V
Python 3.10.7
$ uname -a
Linux possum 5.15.61-v7l+ #1579 SMP Fri Aug 26 11:13:03 BST 2022 armv7l GNU/Linux
$ cat /etc/debian_version
11.5

snail-coupe avatar Nov 19 '22 22:11 snail-coupe