Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

BSD Cafe Billboard

  1. Home
  2. BSD
  3. FreeBSD
  4. Enable media keys in Xorg on FreeBSD 15 (Solved!)

Enable media keys in Xorg on FreeBSD 15 (Solved!)

Scheduled Pinned Locked Moved FreeBSD
1 Posts 1 Posters 27 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • andersgoA Offline
    andersgoA Offline
    andersgo
    wrote last edited by andersgo
    #1

    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.

    After some poking around i confirmed that the usbhid driver was working - and also default enabled in FreeBSD15 kernel. Xev tool printed the correct keycode events

    keycode 122 = XF86AudioLowerVolume 
    keycode 123 = XF86AudioRaiseVolume 
    keycode 172 = XF86AudioPlay
    

    The problem narrowed down to how to map these event to something useful

    I found a working solution in this discussion thread, by using the x11/sxhkd daemon to pass the events to mixer(8)

    https://forums.freebsd.org/threads/howto-enabling-multimedia-keys-gamepads-joysticks-for-desktop-usbhid.84464/

    I had to tweak the sxhkd config a bit to work properly with mixer

    ~/.config/sxhkd/sxhkdrc

    XF86Audio{Play,LowerVolume,RaiseVolume}         
             mixer {vol.mute="toggle",vol="-3%", vol="+3%"}
    

    Then I invoke the sxhkd daemon from my ~/.xsession file

    sxhkd &
    exec /usr/local/bin/fvwm3
    

    Viola!

    #FreeBSD #Solved #X11 #FVWM3 #Xorg #AskFedi

    1 Reply Last reply
    3
    2
    • andersgo@infosec.exchangeA andersgo@infosec.exchange shared this topic
      ronnie_bonkers@mastodon.socialR ronnie_bonkers@mastodon.social shared this topic
      ottobackwards@hachyderm.ioO ottobackwards@hachyderm.io shared this topic

    Hello! It looks like you're interested in this conversation, but you don't have an account yet.

    Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

    With your input, this post could be even better 💗

    Register Login
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    Powered by NodeBB Contributors
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups