Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Assigning action to keys

6 views
Skip to first unread message

Jean F. Martinelle

unread,
Nov 13, 2022, 7:42:26 PM11/13/22
to
I am running XFCE under Slackware 15.0. My keyboard has two keys
that are obviously meant to mute and unmute the sound in my system.
However, when I press them nothing happens.

While this is hardly unexpected, I am sure there must be a way to
redefine those keys from XFCE so that when they are pressed they will do
what they are supposed to do.

Can anybody supply pointers on how to pull this off?

John Forkosh

unread,
Nov 13, 2022, 10:44:27 PM11/13/22
to
Not sure, but maybe try xmodmap -pk | grep Mute to find the
appropriate keycode, which seems to be 121 for my keyboard
(but I'm not seeing anything that looks like "Unmute"; maybe
you're just supposed to press Mute a second time?). Anyway,
now use xev and press the key you think should be Mute,
and see if its displayed keycode actually is your Mute keycode.
Suppose it's not... suppose it's, say, 66, and from xmodmap
you know Mute should be 121. Then xmodmap -e "keycode 66 = Mute"
should re-assign the key you want to be Mute so that it actually is.
Same idea for Unmute, I suppose, but like I said, I'm not seeing
any Unmute key for my keyboard.
--
John Forkosh ( mailto: j...@f.com where j=john and f=forkosh )

Jean F. Martinelle

unread,
Nov 14, 2022, 12:12:50 PM11/14/22
to
Thanks. Actually, I was wrong: they are not mute and unmute keys,
but audio volume up and down keys:

$ xmodmap -pk | grep -i volume
122 0x1008ff11 (XF86AudioLowerVolume) 0x0000
(NoSymbol) 0x1008ff11 (XF86AudioLowerVolume)
123 0x1008ff13 (XF86AudioRaiseVolume) 0x0000
(NoSymbol) 0x1008ff13 (XF86AudioRaiseVolume)

And, in fact, they already do what they are supposed to do: I never
noticed this before because I keep my audio framework on mute by default.

Joseph Rosevear

unread,
Nov 20, 2022, 4:13:42 PM11/20/22
to
I have already encountered and solved a similar problem in Fvwm2, not
XFCE. Perhaps some of what I did will apply. Here is the code I put
into my ~/.fvwm2rc file--the Fvwm2 configuration file:

# Mute
# Key F8 A N Exec :
Key XF86AudioMute A N Exec :

# Volume down
Key F9 A N Exec /usr/local/bin/changevol down
Key XF86AudioLowerVolume A N Exec /usr/local/bin/
changevol down

# Volume up
Key F10 A N Exec /usr/local/bin/changevol up
Key XF86AudioRaiseVolume A N Exec /usr/local/bin/
changevol up

My purposes were different, as I turned off the mute capability. Volume
up and down I treated by use of my own script /usr/local/bin/changevol--
let me know if you need the script. I captured key presses of both the
built-in keys and F9 and F10, as some keyboards lack the built-in keys.

I hope this helps.

Joseph Rosevear

unread,
Nov 20, 2022, 4:17:55 PM11/20/22
to
On Mon, 14 Nov 2022 00:42:24 -0000 (UTC), Jean F. Martinelle wrote:

Hello, by mistake I replied to a reply instead of directly to your
post. You can find my reply below.

Joseph Rosevear

unread,
Nov 20, 2022, 4:22:21 PM11/20/22
to
Oops. It seems I did reply directly. Sorry--I'm new to Pan.
0 new messages