ref: a786a79acfc5079761f8b3efe72142640c1e9d2c
parent: cc861074b49c3c5410f335c7e3668c542c2c46fb
author: Sigrid Solveig Haflínudóttir <[email protected]>
date: Wed Aug 24 09:55:44 EDT 2022
reform/shortcuts: negative step values
--- a/sys/man/1/reform
+++ b/sys/man/1/reform
@@ -135,7 +135,10 @@
.I -l
for LCD light level (default is 5) and
.I -v
-for volume (default is 3).
+for volume (default is 3). Values can be negative to essentially swap
+.I F1
+with
+.IR F2 .
.SH SOURCE
.B /sys/src/cmd/reform
.SH SEE ALSO
--- a/sys/src/cmd/reform/shortcuts.c
+++ b/sys/src/cmd/reform/shortcuts.c
@@ -37,13 +37,13 @@
}else if(mod && r >= (KF|1) && r <= (KF|4)){
if(*s == 'c'){
if(r == (KF|1))
- fprint(light, "lcd -%d", lightstep);
+ fprint(light, "lcd %+d", -lightstep);
else if(r == (KF|2))
- fprint(light, "lcd +%d", lightstep);
+ fprint(light, "lcd %+d", lightstep);
else if(r == (KF|3))
- fprint(vol, "master -%d", volstep);
+ fprint(vol, "master %+d", -volstep);
else if(r == (KF|4))
- fprint(vol, "master +%d", volstep);
+ fprint(vol, "master %+d", volstep);
}
continue;
}