summaryrefslogtreecommitdiff
path: root/volume.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'volume.cpp')
-rw-r--r--volume.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/volume.cpp b/volume.cpp
index c6c0e03..f05d709 100644
--- a/volume.cpp
+++ b/volume.cpp
@@ -11,8 +11,8 @@ int printusage(int,const char *const *argv,const char *message=NULL){
if(message)cout<<message<<endl;
cout<<"Usage: "<<argv[0]<<" [volume]"<<endl;
cout<<"If [volume] is given, changes volume to that value. (Integer in [0,100].)"<<endl;
- cout<<"Otherwise, it shows a graphical slider, adjustable with the arrow keys or h/l. If the"<<endl;
- cout<<"output is not a tty, the graphical slider is disabled."<<endl;
+ cout<<"Otherwise, it shows a graphical slider, adjustable with the arrow keys or h/j/k/l."<<endl;
+ cout<<"If the output is not a tty, the graphical slider is disabled."<<endl;
return 1;
}
@@ -75,6 +75,8 @@ int interact(bool &m,int &vol){
if(c=='q'||c=='Q'||c=='\n'||c=='\r')return 1;
if(c=='l')return incvol(vol,5);
if(c=='h')return incvol(vol,-5);
+ if(c=='k')return incvol(vol,100);
+ if(c=='j')return incvol(vol,-100);
if(c=='m'){
m=!m;
setmuted(m);
@@ -92,6 +94,8 @@ int interact(bool &m,int &vol){
c=cin.get();
if(c=='C')return incvol(vol,5);
if(c=='D')return incvol(vol,-5);
+ if(c=='A')return incvol(vol,100);
+ if(c=='B')return incvol(vol,-100);
cout<<7<<flush;
return 0;
}