From c074e5e93d653d1d1340975b43c0f59412c1bb8d Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Wed, 12 Jan 2005 11:02:27 +0000 Subject: [PATCH] Remove number key assignment Don't use number keys for alternatives to F1-F5. The Tab key can be used to toggle view modes, instead. --- alsamixer/alsamixer.1 | 7 ++++--- alsamixer/alsamixer.c | 26 +++++++++++++++----------- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/alsamixer/alsamixer.1 b/alsamixer/alsamixer.1 index 2e13fc5..06d327a 100644 --- a/alsamixer/alsamixer.1 +++ b/alsamixer/alsamixer.1 @@ -84,12 +84,13 @@ The default view mode is the playback view. You can change it via \fI-V\fP option. Each view mode can be switched via keys, \fIF3\fP, \fIF4\fP and \fIF5\fP keys -for playback, capture and all views, respectively. Instead of function keys, -the number keys \fI3\fP, \fI4\fP and \fI5\fP are accepted, too, for terminals -which can't handle function keys. +for playback, capture and all views, respectively. \fITAB\fP key toggles the +current view mode circularly. In addition to these view modes, you can switch to the help mode and the proc info mode via \fIF1\fP and \fIF2\fP keys, respectively. +On terminals that can't use funtion keys like gnome-terminal, \fI?\fP and +\fI/\fP keys can be used alternatively for help and proc modes. .SH KEYBOARD COMMANDS \fBalsamixer\fP recognizes the following keyboard commands to control the soundcard. diff --git a/alsamixer/alsamixer.c b/alsamixer/alsamixer.c index 369d2d3..9f741ac 100644 --- a/alsamixer/alsamixer.c +++ b/alsamixer/alsamixer.c @@ -257,14 +257,14 @@ static int mixer_help_yoffs = 0; static char *mixer_help_text = ( " Esc exit alsamixer\n" - " F1 / 1 show Help screen\n" - " F2 / 2 show /proc info screen\n" - " F3 / 3 show Playback controls only\n" - " F4 / 4 show Capture controls only\n" - " F5 / 5 show all controls\n" + " F1 ? show Help screen\n" + " F2 / show /proc info screen\n" + " F3 show Playback controls only\n" + " F4 show Capture controls only\n" + " F5 show all controls\n" + " Tab toggle view mode\n" " Return return to main screen\n" " Space toggle Capture facility\n" - " Tab toggle ExactMode\n" " m M toggle mute on both channels\n" " < > toggle mute on left/right channel\n" " Up increase left and right volume\n" @@ -1908,18 +1908,15 @@ mixer_iteration (void) case 'H': case '?': case KEY_F (1): - case '1': mixer_view = VIEW_HELP; key = 0; break; case '/': case KEY_F (2): - case '2': mixer_view = VIEW_PROCINFO; key = 0; break; case KEY_F (3): - case '3': if (mixer_view == VIEW_PLAYBACK) { mixer_clear (FALSE); } else { @@ -1935,7 +1932,6 @@ mixer_iteration (void) key = 0; break; case KEY_F (4): - case '4': if (mixer_view == VIEW_CAPTURE) { mixer_clear (FALSE); } else { @@ -1951,7 +1947,6 @@ mixer_iteration (void) key = 0; break; case KEY_F (5): - case '5': if (mixer_view == VIEW_CHANNELS) { mixer_clear (FALSE); } else { @@ -1961,6 +1956,15 @@ mixer_iteration (void) } key = 0; break; + case 9: /* Tab */ + if (mixer_view >= VIEW_CHANNELS && mixer_view <= VIEW_CAPTURE) { + mixer_view = (mixer_view + 1) % 3 + VIEW_CHANNELS; + mixer_view_saved = mixer_view; + mixer_changed_state = 1; + mixer_reinit (); + key = 0; + } + break; case '\014': case 'L': case 'l':