For the purposes of an app I'm developing, I need to temporarily disable autorepeat (with xset r off), and then restore it back to its original state. Can I easily (like with a terminal command) check if it is on or not? I wouldn't want to xset r on indiscriminately in case the user had disabled autorepeat on their own before.

if xset q | grep -q 'auto *repeat:  *on'; then ...
  • Guess I missed the q option in man xset, thank you. – shooqie Dec 6 '18 at 8:18

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.