<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Enable media keys in Xorg on FreeBSD 15 (Solved!)]]></title><description><![CDATA[<p dir="auto">One of my biggest "frustrations" when migrating from OpenBSD to FreeBSD as my daily driver, was the loss of of working media keys on my Das Keyboard - especially the very convenient volume jog wheel.</p>
<p dir="auto">After some poking around i confirmed that the usbhid driver was working - and also default enabled in FreeBSD15 kernel. <strong>Xev</strong> tool printed the correct keycode events</p>
<pre><code>keycode 122 = XF86AudioLowerVolume 
keycode 123 = XF86AudioRaiseVolume 
keycode 172 = XF86AudioPlay
</code></pre>
<p dir="auto">The problem narrowed down to how to map these event to something useful</p>
<p dir="auto">I found a working solution in this discussion thread, by using the <strong>x11/sxhkd</strong> daemon to pass the events to <strong>mixer(8)</strong></p>
<p dir="auto"><a href="https://forums.freebsd.org/threads/howto-enabling-multimedia-keys-gamepads-joysticks-for-desktop-usbhid.84464/" rel="nofollow ugc">https://forums.freebsd.org/threads/howto-enabling-multimedia-keys-gamepads-joysticks-for-desktop-usbhid.84464/</a></p>
<p dir="auto">I had to tweak the sxhkd config a bit to work properly with mixer</p>
<p dir="auto"><strong>~/.config/sxhkd/sxhkdrc</strong></p>
<pre><code>XF86Audio{Play,LowerVolume,RaiseVolume}         
         mixer {vol.mute="toggle",vol="-3%", vol="+3%"}
</code></pre>
<p dir="auto">Then I invoke the sxhkd daemon from my <strong>~/.xsession</strong> file</p>
<pre><code>sxhkd &amp;
exec /usr/local/bin/fvwm3
</code></pre>
<p dir="auto">Viola!</p>
<p dir="auto">#FreeBSD #Solved #X11 #FVWM3 #Xorg #AskFedi</p>
]]></description><link>https://billboard.bsd.cafe/topic/96/enable-media-keys-in-xorg-on-freebsd-15-solved</link><generator>RSS for Node</generator><lastBuildDate>Sun, 19 Apr 2026 23:58:13 GMT</lastBuildDate><atom:link href="https://billboard.bsd.cafe/topic/96.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 18 Apr 2026 19:31:43 GMT</pubDate><ttl>60</ttl></channel></rss>