On 25/02/2026 14:37, Dr. Werner Fink wrote:
On 2026/02/25 14:25:03 +0000, Ian Abbott wrote:
On 25/02/2026 12:58, Dr. Werner Fink wrote:
Hi,

I've a bug report about dialog not supporting the Alt key. Means
e.g. that

     dialog --yesno Hallo 6 30

return for both Alt-y and Alt-n or Alt-Y and Alt-N the value 255.
This is nowadays somehow uncommon[1].  It would very helpful
to be able to navigate not only with cursor or tab keys but
also with the ALt and the coloured characters of the buttons.


Werner

[1] https://bugzilla.opensuse.org/show_bug.cgi?id=1257107

It is probably difficult to do anything different for those terminal
emulators that interpret the Alt/Meta modifier as "insert an ASCII ESC
character before the typed character".

On bash prompt I do a `cat -A` shows for Alt-x, Alt-y, and Alt-n

^[x^[y^[n

but bindkey only accepts single characters as it seems not to
identify events but characters only (curses_key).  Also the
resulting action can not bind to a defined button or its label
(dialog_key).

Perhaps one option is to implement an `--ignore-esc` option to ignore the ESC key. For portability in scripts, I thought that could be combined with the `--ignore` option to ignore unsupported options on older versions of dialog, but it seems that doesn't really work:

dialog --ignore --ignore-esc --yesno Hallo 6 30

Unknown option --ignore-esc.
Use --help to list options.

--
-=( Ian Abbott <[email protected]> || MEV Ltd. is a company  )=-
-=( registered in England & Wales.  Regd. number: 02862268.  )=-
-=( Regd. addr.: S11 & 12 Building 67, Europa Business Park, )=-
-=( Bird Hall Lane, STOCKPORT, SK3 0XA, UK. || www.mev.co.uk )=-

Reply via email to