I wrote two custom scripts to brighten/dim my screen and want to bind them to my F9 and F10 keys.I put them into /opt/bin and used sudo chown root:root script and sudo chmod 755 script on both and they work when called from the terminal.When I now try to run xbindkeys -v, with these lines added to ~/.xbindkeysrc/opt/bin/dim_screen.sh    Control + c:75/opt/bin/brighten_screen.sh    Control + c:76it gives me this error message:displayName = :0.0rc file = /home/pi/.xbindkeysrcrc guile file = /home/pi/.xbindkeysrc.scmgetting rc guile file /home/pi/.xbindkeysrc.scm.WARNING : /home/pi/.xbindkeysrc.scm not found or reading not allowed.2 keys in /home/pi/.xbindkeysrcmin_keycode=8     max_keycode=255 (ie: know keycodes)/opt/bin/dim_screen.sh    m:0x4 + c:75    Control + F9/opt/bin/brighten_screen.sh    m:0x4 + c:76X Error of failed request:  BadAccess (attempt to access private resource denied)  Major opcode of failed request:  33 (X_GrabKey)  Serial number of failed request:  17  Current serial number in output stream:  21At first I thought its about the file permissions of the scripts, thus I added    ALL ALL= NOPASSWD: /opt/bin/brighten_screen.sh    ALL ALL= NOPASSWD: /opt/bin/dim_screen.shto my /etc/sudoers. But the error persisted, so I read it again and now after reading about xgrabkeys I think the key signals are already in use by some other program when xbindkeys wants to read them, so that it can't access them. It also won't work when I don't use Function Keys.Because it may well be that F9 and F10 are reserved for internal purposes I changed the xmodmap mapping of F9 to F13 and of F10 to F14I could temporarily make it work, by following the instructions by Vincent Yu on the Question Using xbindkeys to bind the meta key (a.k.a. super key / Windows key) to left click and allow drag and drop (I noticed what he said about the changes not being persistent through sessions) but now after reboot it gives me the same error again (with F9substituted by F13), even though i ran xmodmap -e 'keycode 75 = F13' and xmodmap -e 'keycode 76 = F14' respectively and changed my ~/.XmodmapI don't know how to handle that or find out what blocks xbindkeys from using the keys. Google didn't give me helpful results and a glance over the posts on unix.SE (with exception of the aforementioned one) didn't help, either.I use the Raspbian Jesse core with lxde if thats relevant.
BadAccess on X_GrabKeys when using xbindkeys
keyboard shortcuts;xbindkeys
I had similar problem, google lead me to https://askubuntu.com/questions/499926/why-do-these-xte-commands-work-in-terminal-but-not-when-bound-with-xbindkeys, which basically says add the xbindkeys-specific modifier release to the key binding so that they script fires on keyup in javascript parlance. Doing that fixes the issue for me.So for your case the following should work:/opt/bin/dim_screen.sh    Control + c:75 + release/opt/bin/brighten_screen.sh    Control + c:76 + release