Thumbs up ring mode switch when screen off

Hi folks

I have an idea about ring modes and volume keys.
Is it possible to patch volume keys in cyanogenmod to switch ring mode without screen wake? Like it works to next/prev track with headset.
So, idea is to toggle mute/vibro and back to normal with long down/up volume w/out headset in sleep.