View Single Post
  #4   (View Single Post)  
Old 24th February 2015
Mike-Sanders Mike-Sanders is offline
Fdisk Soldier
 
Join Date: Dec 2012
Posts: 52
Default

Here's two ~/.tcshrc keybindings for commandline volume control...

Code:
bindkey -c '^[OP' 'mixer vol +10' # key F1 increase volume 10%
bindkey -c '^[OQ' 'mixer vol -10' # key F2 decrease volume 10%
Some background (regulars reading will know this already)...

These are embedded key sequences which would necessarily require an editor capable of inserting such (I used plain old vi). For instance, to insert the raw keycode for F1, you would type the escape sequence CTRL+V (that's two key strokes - the control key followed by the v key) then press the F1 key.

To create a list of raw keycodes...

. invoke: cat <<end > raw-keys.txt

. type CTRL+V then press a key

. repeat 2nd step to populate your list

. type 'end' to exit & save work to file

Note: The above works great from the physical console, but less so in some terminal emulators.
__________________
www.tacoshack.xyz
Reply With Quote