What is the name of the "Fn" key for Awesome wm?

For instance:

awful.key({"Shift", }, "Left", volwidget.down)

How to find out what to write instead of “Shift” to use the “Fn” key?

+6
source share
2 answers

I found a solution: xev program.
If it works, it does not show the Fn code. Actually, this is not necessary: ​​X cannot see this key.

In any case, it shows codes for hot keys, for example Fn + LeftArrow (to decrease the volume). In my case, this is the name XF86AudioLowerVolume , and I can use it as such in configuration files.

+7
source

you can use xmodmap -pke to display the key code, then you will get something like this:

...
keycode 121 = XF86AudioMute NoSymbol XF86AudioMute
keycode 122 = XF86AudioLowerVolume NoSymbol XF86AudioLowerVolume
keycode 123 = XF86AudioRaiseVolume NoSymbol XF86AudioRaiseVolume
keycode 124 = XF86PowerOff NoSymbol XF86PowerOff
keycode 125 = KP_Equal NoSymbol KP_Equal
keycode 126 = plusminus NoSymbol plusminus
keycode 127 = Pause pause pause pause
keycode 128 = XF86LaunchA NoSymbol XF86LaunchA
keycode 129 = KP_Decimal KP_Decimal KP_Decimal KP_Decimal
...

You can see that the key code for XF86AudioLowerVolume is 122 , so you can write your code as follows:

awful.key ({}, "# 122", volwidget.down)

+7
source

Source: https://habr.com/ru/post/916788/


All Articles