Thread: Link keystroke with a sound
i have sound linked caps lock key operation. have visual indication.
looking through past posts seems not possible.
have tried windows programs under wine, these don't work.
surely must possible make link somehow?
ideas?
randj
firstly when running compiz.
edit: though set in unity using compiz, found carries on other sessions different window managers...eg gnome , gnome classic(no effects).
uses ffplay needs ffmpeg installed.
there other ways of playing sound find ffplay more reliable different formats.
test in terminal...
if works open compizconfig-settings-manager (ccsm)code:ffplay -nodisp -autoexit /usr/share/sounds/gnome/default/alerts/glass.ogg
, goto commands plugin.
in command line 0 box, paste in...
goto key bindings tab , click on disabled button run command 0code:ffplay -nodisp -autoexit /usr/share/sounds/gnome/default/alerts/glass.ogg
mark enabled , hit grab key combination button.
press capslock key close little ccsm window , click ok.
should have sound when capslock pressed.
use path script in command line 0 box.
plays sound , sends notification on status of capslock.
sound plays when capslock enabled.
code:#!/bin/bash value=$(xset q | grep "caps lock:" | awk '{print $4}' | grep -c on) if [ "$value" -eq "1" ]; notify-send -i "/usr/share/icons/gnome/48x48/devices/keyboard.png" " caps lock on" & ffplay -nodisp -autoexit /usr/share/sounds/gnome/default/alerts/glass.ogg else notify-send -i "/usr/share/icons/gnome/48x48/devices/keyboard.png" " caps lock off" fi
Forum The Ubuntu Forum Community Ubuntu Official Flavours Support General Help [ubuntu] Link keystroke with a sound
Ubuntu
Comments
Post a Comment