]> git.alsa-project.org Git - alsa-utils.git/commit
alsamixer: Replaced hardcoded keys by binding arrays
authorbraph <braph93@gmx.de>
Thu, 26 Sep 2019 20:27:25 +0000 (22:27 +0200)
committerJaroslav Kysela <perex@perex.cz>
Wed, 1 Jul 2020 14:10:35 +0000 (16:10 +0200)
commit6e9e84ba609c8e86a15c0eb17aa89df11de14cdf
treef06ec5ab7faf7af1a6313dc3d254459c2a639df2
parent706a64c7a0f16f24bb845278086569d6cbe4ee6f
alsamixer: Replaced hardcoded keys by binding arrays

This commit is a preparation for making keybindings configurable.

The hardcoded keys in the switch statements of mixer_widget.c,
textbox.c, proc_files.c and card_select.c have been replaced by
command enums. The command that shall be executed is looked up in
the arrays `mixer_bindings` and `textbox_bindings`.

The channel_mask enum has been made public, since LEFT and RIGHT are
used as command arguments in bindings.c.

Signed-off-by: Benjamin Abendroth <braph93@gmx.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
alsamixer/Makefile.am
alsamixer/bindings.c [new file with mode: 0644]
alsamixer/bindings.h [new file with mode: 0644]
alsamixer/card_select.c
alsamixer/mixer_widget.c
alsamixer/mixer_widget.h
alsamixer/proc_files.c
alsamixer/textbox.c