diff options
author | Sigrid Solveig Haflínudóttir <sigrid@ftrv.se> | 2022-08-29 20:57:14 +0000 |
---|---|---|
committer | Sigrid Solveig Haflínudóttir <sigrid@ftrv.se> | 2022-08-29 20:57:14 +0000 |
commit | 96601790b2847b87bbab95382ed7010fa230cbbc (patch) | |
tree | 2d9ef954315656ea3ad59708602eb412d476b581 /sys/src/cmd/reform | |
parent | 11bc8cce33b3922e0fbc4f2d63a42426f6f5a4db (diff) |
reform/shortcuts: use Kmod4+esc to (un)mute the audio
Diffstat (limited to 'sys/src/cmd/reform')
-rw-r--r-- | sys/src/cmd/reform/shortcuts.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/src/cmd/reform/shortcuts.c b/sys/src/cmd/reform/shortcuts.c index 4facb593b..dc3fdc85f 100644 --- a/sys/src/cmd/reform/shortcuts.c +++ b/sys/src/cmd/reform/shortcuts.c @@ -3,7 +3,7 @@ #include <keyboard.h> static int lightstep = 5, volstep = 3; -static int light, vol, mod; +static int light, vol, actl, mod; static void process(char *s) @@ -34,7 +34,7 @@ process(char *s) continue; if(r == Kmod4) mod = 0; - }else if(mod && r >= (KF|1) && r <= (KF|4)){ + }else if(mod && ((r >= (KF|1) && r <= (KF|4) || r == Kesc))){ if(*s == 'c'){ if(r == (KF|1)) fprint(light, "lcd %+d", -lightstep); @@ -44,9 +44,11 @@ process(char *s) fprint(vol, "master %+d", -volstep); else if(r == (KF|4)) fprint(vol, "master %+d", volstep); + else if(r == Kesc) + fprint(actl, "master toggle"); } continue; - } + } memmove(b+o, p, n); o += n; @@ -87,6 +89,7 @@ main(int argc, char **argv) light = open("/dev/light", OWRITE); vol = open("/dev/volume", OWRITE); + actl = open("/dev/audioctl", OWRITE); for(i = 0;;){ if((n = read(0, b+i, sizeof(b)-i)) <= 0) break; |