Enabling multimedia keys on an Apple keyboard ?

Im trying to get the multimedia keys (volume, brightness) working on Apple Keyboards
on a Macbook Air 2011 and Macbook Pro Retina 2015

The function keys work as function keys
but pressing the fn key and then the function keys doesnt trigger the multimedia keys

The keyboard layout is correctly set to mac,
i checked the keycodes using wev ( im using wayland )

Pressing fn and F12 still returns F12
and not XF86AudioRaiseVolume

I have googled for a solution and checked the forum
but couldnt find anything

is there a sysctl setting im missing that will enable the multimedia keys
when pressing the fn key with the functions keys

On Linux you can fix the issue temporarily using

Code:
# echo 2 >> /sys/module/hid_apple/parameters/fnmode

or permantly creating the config file in /etc/modprobe.d/hid_apple.conf
with the following content

Code:
options hid_apple fnmode=2


i dont have this issue on my Dell XPS 15
pressing fn and F12 returns XF86AudioRaiseVolume
 
In /boot/loader.conf add:

#ENABLE MULTIMEDIA_KEYS
hw.usb.usbhid.enable=1

That should solve it
HI Mate

i already have this is my /boot/loader.conf

Code:
usbhid_load="YES"

i also added

Code:
hw.usb.usbhid.enable=1

rebooted but no joy

pressing fn and F12 still outputs F12
instead of XF86AudioRaiseVolume

the issue is with the built in keyboard on the laptop
as opposed to a usb keyboard
 
What desktop, if any, are you using. On my Cinnamon desktop increase volume does not work, but shift + META + s and the arrow keys works. Of course this is just a workaround. But better than noting.
 
im using dwl on wayland


i wonder if i need to look at kbdcontrol

this is how the volume keys are set up

Code:
static const char *volumeup[]      = { "/usr/sbin/mixer",   "vol=+5%:+5%",  NULL };
static const char *volumedown[]    = { "/usr/sbin/mixer",   "vol=-5%:-5%",  NULL };
static const char *mutevolume[]    = { "/usr/sbin/mixer",   "vol.mute=^",        NULL };

static const Key keys[] = {
    /* Note that Shift changes certain key codes: c -> C, 2 -> at, etc. */
    /* modifier                  key                 function        argument */
    { 0,                         XKB_KEY_XF86AudioRaiseVolume, spawn, {.v = volumeup   } },
    { 0,                         XKB_KEY_XF86AudioLowerVolume, spawn, {.v = volumedown } },
    { 0,                         XKB_KEY_XF86AudioMute, spawn, {.v = mutevolume } },
 
Has this issue been solved?
I have the same problem on an 11 inch 2011 macbook, on sway. Along with touchpad gestures and the right click not working at all.
 
i havent looked at this since my last post

i just use mixertui to adjust the volume
and the backlight command to adjust the screen brightness

i dont have any issue with right click
not typing on the macbook at the moment, cant remember off hand if you need to use 2 fingers or something

the touchpad works fine with wayfire on an 11 inch 2011 macbook air
but i dont like wayfire so dont use it
 
Back
Top