Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ SRC := main.c
VERSION := 1.4.0

PATH_AUDIO ?= "./wav"
PATH_CHERRY_MX_BLUE_AUDIO ?= "./cherrymxbluesounds"

CFLAGS ?= -O3 -g
LDFLAGS ?= -g
CFLAGS += -Wall -Werror
CFLAGS += -DVERSION=\"$(VERSION)\"
CFLAGS += -DPATH_AUDIO=\"$(PATH_AUDIO)\"
CFLAGS += -DPATH_CHERRY_MX_BLUE_AUDIO=\"$(PATH_CHERRY_MX_BLUE_AUDIO)\"

ifdef mingw
BIN := $(NAME).exe
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ ScrollLock twice (but be aware that those ScrollLock events _are_ delivered to
the application); same to unmute. The keycode for muting can be changed with
the `-m` option. Use keycode 0 to disable the mute function.

You can also use cherry mx blue sounds, pulled from the
keyclacker project https://github.com/spajus/keyclacker

Installation
------------

Expand Down Expand Up @@ -161,3 +164,4 @@ properly tuning OpenAL for bucklespring.
````
allow-moves = true
````

Binary file added cherrymxbluesounds/1c-0.wav
Binary file not shown.
Binary file added cherrymxbluesounds/1c-1.wav
Binary file not shown.
Binary file added cherrymxbluesounds/31-0.wav
Binary file not shown.
Binary file added cherrymxbluesounds/31-1.wav
Binary file not shown.
Binary file added cherrymxbluesounds/36-0.wav
Binary file not shown.
Binary file added cherrymxbluesounds/36-1.wav
Binary file not shown.
Binary file added cherrymxbluesounds/39-0.wav
Binary file not shown.
Binary file added cherrymxbluesounds/39-1.wav
Binary file not shown.
Binary file added cherrymxbluesounds/key_0_down.wav
Binary file not shown.
Binary file added cherrymxbluesounds/key_0_up.wav
Binary file not shown.
Binary file added cherrymxbluesounds/key_1_down.wav
Binary file not shown.
Binary file added cherrymxbluesounds/key_1_up.wav
Binary file not shown.
Binary file added cherrymxbluesounds/key_2_down.wav
Binary file not shown.
Binary file added cherrymxbluesounds/key_2_up.wav
Binary file not shown.
Binary file added cherrymxbluesounds/key_3_down.wav
Binary file not shown.
Binary file added cherrymxbluesounds/key_3_up.wav
Binary file not shown.
9 changes: 8 additions & 1 deletion main.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,11 @@ static const char *opt_path_audio = PATH_AUDIO;
static int muted = 0;


static const char short_opts[] = "d:fg:hlm:Mp:s:v";
static const char short_opts[] = "cd:fg:hlm:Mp:s:v";


static const struct option long_opts[] = {
{ "cherrymxblue", no_argument, NULL, 'c' },
{ "device", required_argument, NULL, 'd' },
{ "fallback-sound", no_argument, NULL, 'f' },
{ "gain", required_argument, NULL, 'g' },
Expand All @@ -103,6 +105,10 @@ int main(int argc, char **argv)
while( (c = getopt_long(argc, argv,
short_opts, long_opts, &idx)) != -1) {
switch(c) {

case 'c':
opt_fallback_sound = 1;
opt_path_audio = PATH_CHERRY_MX_BLUE_AUDIO;
case 'd':
opt_device = optarg;
break;
Expand Down Expand Up @@ -205,6 +211,7 @@ static void usage(char *exe)
"\n"
"options:\n"
"\n"
" -c, --cherrymxblue use cherry mx blue sounds instead\n"
" -d, --device=DEVICE use OpenAL audio device DEVICE\n"
" -f, --fallback-sound use a fallback sound for unknown keys\n"
" -g, --gain=GAIN set playback gain [0..100]\n"
Expand Down