It is one more attempt to get Fn keys to volume up/down, brightness, etc. working. Those controls are simply not working in my non-branded ultrabook.

In the configuration file:


We can find the following code:

<!-- Keybinding for Volume management -->
<keybind key="XF86AudioRaiseVolume">
    <action name="Execute">
        <command>amixer -q sset Master 3%+ unmute</command>

So I guess if we find the correct keybind key, it will work. Am I right? If so, how?

Note: I'm using the default keyboard, pc105

Note 2: in this answer, for the XF86 keyboard, the format of the keys seems something like 0x1008FF12 (code for mute in that keyboard). According with that answer, the keybind key is a shortcut to a file where that code is.

Note 3: in this forum, there is an attempt to do it with xbindkeys. Unfortunately, xbindkeys doesn't seem to capture the Fn key for me.

Note 4: after modifing the configuration file, we have to run openbox --reconfigure

  • Not the Fn key, you need to press Fn with something. – terdon May 16 '14 at 0:55
  • @terdon, if I push Fn+something, xbindkeys keep waiting to receive a key combination = xbindkeys doesn't semm to capture the Fn key – chelder May 17 '14 at 11:09
  • 2
    ah, sorry, I'd understood that you were hitting Fn alone. You are using xbindkeys -k right? Try xev as suggested below too. Note that each movement of the mouse is reported as an event by xev so it can be a pain to find the key you want in its output. – terdon May 17 '14 at 11:18
  • @terdon, I realized that it depends on the key pressed. Fn+F4 is not detected (painted as volume up in my keyboard), but Fn+u is working (painted as the number 4 in my keyboard). – chelder May 17 '14 at 11:18
  • @terdon, I'm using the GUI (xbindkeys-config). Anyway, I just tried xbindkeys -k with the same result: Fn+F4 is not detected either – chelder May 17 '14 at 11:23

I am not on a notebook right now and can't test if this works for Fn-combinations but I generally use xev for getting the appropriate keycodes:

xev | sed -ne '/^KeyPress/,/^$/p'

This should launch a window:

enter image description here

Keys pressed while the window is in focus will be printed to the command output. E.g. for left Win/Super:

KeyPress event, serial 42, synthetic NO, window 0x5000001,
    root 0x2d1, subw 0x0, time 42368858, (158,73), root:(934,383),
    state 0x0, keycode 133 (keysym 0xffeb, Super_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

If you wanted to assign this key to an openbox shortcut you would use Super_L (third line, second item in brackets).

xev is part of the x11-utils package and should be preinstalled on Ubuntu.

  • Very nice answer. Unfortunately, it doesn't detect all the combinations of my keyboard. For example, Fn+F4 is not detected (painted as volume up in my keyboard), but Fn+u is detected (painted as the number 4 in my keyboard). – chelder May 17 '14 at 11:19
  • I think this question is already solved. I have continued looking for a solution here: askubuntu.com/questions/468326/… – chelder May 17 '14 at 16:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.