1

I use keys on my keyboard for mouse clicks. For this to work I need to invoke

xkbset m

This works for a few minutes, then for some reason this setting gets reverted! I have resorted to leaving a terminal open with

while true; do xkbset m; sleep 5; done

I'm wondering if there's a "correct" way to do this, such that this setting becomes permanent / persistent.

(Similar question but with no answer.)

muru
  • 197,895
  • 55
  • 485
  • 740
aioobe
  • 1,576
  • This may be unrelated, but https://bugzilla.mozilla.org/show_bug.cgi?id=1727469 is a weird way that Firefox can revert keyboard settings, so test that out if you're a Firefox user. – phils May 24 '22 at 08:22

1 Answers1

2

This was due to xkbset expiry option being set for mouse keys.

You can verify with q (query):

$ xkbset q exp
...
Upon Expiry Mouse-Keys will be: Off
...

Solution: Disable the expiry for mouse keys by doing

xkbset exp "=mousekeys"

Check new setting:

$ xkbset q exp
...
Upon Expiry Mouse-Keys will be: Unchanged
...

Then activate them again with

$ xkbset m

Now the setting should "persist".

(Found the answer here.)

aioobe
  • 1,576