简体   繁体   中英

How to get Fn + Home/End bind work on i3-gaps?

I'm using i3-gaps WM on my Arch Linux. I wrote a simple Python script to change my brightness, but Fn + Home or Fn + End bindings aren't working. However, Fn button itself works just fine, I made a test bind just for the single Fn key and it worked. Also, the Python script works just fine when I bind it to something else (I tried F11 and F10 keys), so I literally have no idea what the problem is.

My i3 config:

bindsym XF86WakeUp+Home exec --no-startup-id python ~/scripts/brightness.py up #  Raise brightness
bindsym XF86WakeUp+End exec --no-startup-id python ~/scripts/brightness.py down # Lower brightness

As mentioned before, Fn key itself works fine, so this line works:

bindsym XF86WakeUp exec --no-startup-id python ~/scripts/brightness.py up

I guess that your problem is that the "Home" key is not named after "Home".

To quote i3's reference card :

Throughout this guide, the i3 logo will be used to refer to the configured modifier. This is the Alt key (Mod1) by default, with (Mod4) being a popular alternative.

Meaning that your "Home" key should be named after "Mod4". That's how I do it on my i3wm.

Alternatively, you can use the program xev from an X11-Bound Terminal. Type the key you are looking for and search for the KeyPress or KeyRelease event sections within the terminal output. You should see something like (keysym XYZ, ZYX) You can use the XYZ (just after keysym ) into your i3 configuration file.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM