Sign up ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I'm developing an app under C++ and SDL running in Ubuntu. I'm using the SDL events to handle the keypad buttons. My problem is that my app launch other programs and it should close they with a key combination, but I can't detect the user presing buttons outside of my app.

¿How could I do this?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

XGrabKey if you're using an x environment (you probably are, unless you know otherwise)

share|improve this answer
Thank you. that's exactly what I was looking for. – amusero Dec 1 '12 at 18:35

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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