You are not logged in.
As the title stated, the question that I has is, how to remap the battery button to not to follow xfce power manager? As I want map it to standby or turn off the screen using script.
IF I put it into do nothing, the battery button literally done nothing even it's mapped using keyboard settings to some script. I have it not to be handled by the power manager.
Is that possible? Thank you
Last edited by BenyaminL (2022-10-21 00:16:33)
Offline
If you check your .xsession-errors (or journalctl --user), you'll notice a "Failed to map keycode 124" error message. If you are using a systemd-based distro, this is because systemd is grabbing it. Edit /etc/systemd/logind.conf, uncomment the "HandlePowerKey" line and set it to "ignore".
After reboot, xfsettingsd will be able to grab it and a keyboard shortcut against the Power Key will work.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
If you check your .xsession-errors (or journalctl --user), you'll notice a "Failed to map keycode 124" error message. If you are using a systemd-based distro, this is because systemd is grabbing it. Edit /etc/systemd/logind.conf, uncomment the "HandlePowerKey" line and set it to "ignore".
After reboot, xfsettingsd will be able to grab it and a keyboard shortcut against the Power Key will work.
Hello, there are no such error, but it doesn work for disabling only on POWER KEY make it done nothing, but not on BATTERY KEY, so I wonder, and I skim on the logind.conf, seems there are none on the list as BatteryKey, uhmm, and the battery key still inhibited by systemd.
I'm on Thinkpad X220 7 row keyboard, if that matter. Is there anyway to focus on Battery key? Thanks
Offline
Sorry - not sure how or why I read that as power button.
Does the battery button work with xfce4-power-manager when you set it to, for example, ask? Does it bring up the ask dialog?
Does it elicit a code when pressed that is recognized by xev or xbindkeys?
xev | awk -F'[ )]+' '/^KeyPress/ { a[NR+2] } NR in a { printf "%-3s %s\n", $5, $8 }'
...or
xbindkeys -k
And instead of your script, try just setting the keyboard shortcut to start mousepad or xfce4-terminal. Check your ~/.xsession-errors file to see if anything is logged when you try. Maybe post your ~/.xsession-errors log file as well for review.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Sorry - not sure how or why I read that as power button.
Does the battery button work with xfce4-power-manager when you set it to, for example, ask? Does it bring up the ask dialog?
Does it elicit a code when pressed that is recognized by xev or xbindkeys?
xev | awk -F'[ )]+' '/^KeyPress/ { a[NR+2] } NR in a { printf "%-3s %s\n", $5, $8 }'
...or
xbindkeys -k
And instead of your script, try just setting the keyboard shortcut to start mousepad or xfce4-terminal. Check your ~/.xsession-errors file to see if anything is logged when you try. Maybe post your ~/.xsession-errors log file as well for review.
Nvm, seems there are glitch, so I need to disable it from power manager, and also logind and reboot twice, seems there are glitch on the system, now working as is after I reboot twice.
There are no errors on the xsession-errors, haha anyway thanks for helping!
Offline
[ Generated in 0.009 seconds, 8 queries executed - Memory usage: 534.35 KiB (Peak: 535.2 KiB) ]