#979636 alsamixer: provide a better way to quit than Esc+q

Package:
alsa-utils
Source:
alsa-utils
Description:
Utilities for configuring and using ALSA
Submitter:
Thorsten Glaser
Date:
2021-01-10 15:21:02 UTC
Severity:
minor
Tags:
#979636#5
Date:
2021-01-09 15:45:07 UTC
From:
To:
alsamixer is terminated, according to its manual page, by
pressing Esc then pressing q (the manpage writes this as
Alt-q but there is no such thing as an Alt key on Unix).

alsamixer will also terminate on double Esc but not “eat”
the second Esc, leaving it for the shell, which is very
annoying (especially as Esc+Esc or Esc+wait 2 seconds is
the way to terminate similar applications, and they *do*
eat it).

‘q’ does things to the controls, so it is out.

I would like to ask for another way to exit alsamixer to
be added, one that is actually sensible for a TUI program.
It’s too bad that both q and x are already used. That new
sensible way should also replace the “Esc: Exit” in the
upper-right corner *ESPECIALLY* as that’s not correct any
more anyway. It should *NOT* be an F-key as those are also
not very portable among Unicēs.

Additionally I ask that Esc+Esc is fully eaten.

#979636#10
Date:
2021-01-09 17:14:52 UTC
From:
To:
Hi Thorsten,

* Thorsten Glaser <tg@mirbsd.de> [2021-01-09 16:45 +0100]:

I can quit alsamixer on two different ways:

Hitting <ESC> once or
hitting <ALT> q simultaneously

I don't understand what you really want?

BTW, the termination is given by design. Changes should be discussed
with upstream.

Elimar

#979636#17
Date:
2021-01-09 18:14:02 UTC
From:
To:
tags 979636 - unreproducible
thanks

Elimar Riesebieter dixit:

Hitting Esc once does not do anything.

Oh wait, after… *retries and counts* hm no.

This is fun. I run alsamixer under GNU screen, and
it is gone if I press Esc then switch to another tab
and back, even with virtually no delay.

Lemme retry this in plain xterm… where indeed just
Esc exits this.

I can only assume that this is because GNU screen sees
the Esc and knows it is the first byte of a VT100-style
control message and therefore has to buffer it because
it needs to intercept these messages. When switching the
tab it “knows” the Esc is not and sends it to alsamixer.

This is the very reason using Esc under Unix to do
anything is *extremely* bad design, because it is also
the first character of an extended key sequence; for
example the F3 key is Esc + O + R really.

There is no Alt key on Unix. Pressing Alt-q gives me ñ
(mostly because this is how my keyboard layout produces
umlauts).

From having used irssi a bit I know that when people
write Alt-{X} for TUI applications they really mean
Esc+{X} because this is *one* of the ways terminal
emulators (especially these intended to be used with
Emacs) can handle an “Alt” key; in xterm this is even
configurable (“Meta Sends Escape” in the menu that
pops up when you press and hold Ctrl and the left mouse
button). This is, however, directly contrary to how I
type necessary charactes like äöüß for my language I
cannot use this, so Esc+q it is / would be, which is
why I’m asking for a more Unix-native way to exit this
program… especially considering that it is specific to
ALSA which is specific to Linux, so we should be using
Linux-native UI concepts not those from an MS-DOS® world.

Which is why I tagged this bug upstream and gave it a
low severity… you as maintainer have a _much_ better
relationship with upstream than I do and can forward
this more easily and with larger chance of success.

bye,
//mirabilos

#979636#24
Date:
2021-01-10 15:07:47 UTC
From:
To:
* Thorsten Glaser <tg@mirbsd.de> [2021-01-09 18:14 +0000]:

I can confirm this behavior on GNU screen. Running
alsamixer in my favorite multiplexer tmux works as
expected.
[...]

https://github.com/alsa-project/alsa-utils/issues
should be the right place to bring in your arguments. I am
not really familiar with your knowledge. So it should be
your turn ;-)

Elimar