Score:0

Don't let background applications capture keyboard events in xorg

ky flag

I have noticed that some applications are able to capture keyboard events while in the background and prevent the foreground application from receiving the event.

Some context:

I use ctrl+r to search bash's history and the application simplescreenrecorder uses ctrl+r to toggle recording. If I go to the terminal emulator and press ctrl+r while simplescreenrecorder is on, it starts recording (and I cannot search bash's history). Another example - when I press alt+tab to see a window list (holding down alt) and then press escape (because I don't want to switch the active window), the browser would catch the escape key event and sometimes this messes up the web application I'm using.

I see the same behavior with both Mate and Xfce so I'm assuming it has something to do with xorg (I think it's less likely that gtk+ is doing something funny).

How do I ensure that a background application cannot capture an event intended for the foreground one? Or is it possible to set this up for specific applications?

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.