2

I set my displays to sleep with xset dpms force off after locking the screen with kscreenlock. This is great, the displays wake up when the mouse is moved (by me, air, the cat). I'd like to set it in a way that only the keyboards can wake up the screens again.

Is there some way to do this for the KDE screen locker or in general?

  • Does this help? https://superuser.com/questions/301742/dont-let-the-mouse-wake-up-displays-from-standby – Sparhawk Aug 31 '14 at 03:14
  • It is not a duplicate - the answers overlap, but the other question is not about putting the display to sleep. – Metamorphic Sep 25 '18 at 16:50

1 Answers1

0

First use xinput list to get the device ID for your mouse, and then use

xinput --set-prop [ID#] "Device Enabled" "0"

and

xinput --set-prop [ID#] "Device Enabled" "1"

to disable and enable the mouse.

Source

Jan
  • 7,772
  • 2
  • 35
  • 41
  • I wrote a short script using this advice and the OP's xset xdpms force off, bound it to a key using xbindkeys. I just wanted to note something that took me a while to realize: xbindkeys lets you bind a command to keyrelease, via a virtual "release" modifier: (xbindkey '(release Scroll_Lock) "my-x11-sleep-script"). With an ordinary binding the keyrelease would wake up the display again. – Metamorphic Sep 25 '18 at 18:42