[Aptitude-devel] Bug#824141: Bug#824141: Pressing 'q' to quit shouldn't require hitting [enter] afterward

Manuel A. Fernandez Montecelo manuel.montezelo at gmail.com
Sat May 14 10:28:55 UTC 2016


Control: tag -1 + moreinfo

2016-05-12 21:01 Axel Beckert:
>Control: tag -1 + confirmed
>
>Hi Josh,
>
>Josh Triplett wrote:
>> I like the new option to quit after installation, rather than returning
>> to the UI.  However, I don't think doing so should require hitting q
>> followed by [enter]; just hitting q should suffice.
>
>Sure, that's what we want, too. But it's far less trivial than it
>sounds. The current solution is more or less a compromise.
>
>Manuel knows more details about this issue.

I think that Axel is talking about the other bug here (#822560).


In any case, about the 'q + Enter' instead of just 'q'... the normal
functions for getting input in libc and C++ expect to get an end of
line.  If one wants to act upon single key presses, one has to change
this with ioctl and do some minor esoteric stuff, or use other things
(e.g. functions from ncurses).

Which is not very bad, and I tried it (it was my first idea as well).
But then again all confirmations from aptitude or actions in the
resolver when in command-line mode, confirmation after running
apt-listchanges (which is very similar to this case), or any
interactions with any command in traditional Unix (e.g. confirmations of
"rm") always require Key+Enter (or just Enter, if there's a default
key).

So this is like "Do you want to return to aptitude? [Y/q]".

When trying to use only the 'q', it felt a bit eerie, after being used
for many years to do Key+Enter in any other command.  So I decided to do
the normal thing instead of my first idea / what you request here.


So in summary: it's possible, but I am not sure that it's a good idea.


Cheers.
-- 
Manuel A. Fernandez Montecelo <manuel.montezelo at gmail.com>



More information about the Aptitude-devel mailing list