Ubuntu QA:
BlogBrainstorm
Log in
Ubuntu QA
The Ubuntu community has contributed 8347 ideas, 36569 comments, 875408 votes

Idea #5783: Pause keyboard input if window appears while typing



up
70
down
Written by Vertelemming the 26 Mar 08 at 17:14. Category: Look and Feel. Status: New
Description
One thing that's always bothered me, no matter which OS I've been on, is the way I can be typing in one window when another program tosses up a notification or error which immediately gets closed because I just pressed space or enter. I propose a mechanism be developed by which keyboard input is temporarily paused or halted if a window appears when more than X number of keys is being pressed per ten seconds.

I realise the difficulties inherent in this; a daemon or service would eat up unnecessary CPU cycles, it's impractical to patch every program in existence to follow this behaviour, and most other ways of doing this have one argument against them or another. However, if this were presented as an opt-in behaviour, I believe it would benefit a fair percentage of people for a relatively small amount of coder output.


Attachments
No attachments.


Duplicates


Comments
Mondane wrote on the 26 Mar 08 at 17:23
Better is not to let any window take the focus. Your idea is just a solution to work around that.

Vertelemming wrote on the 26 Mar 08 at 17:30
I thought about that, but fact is, I like most windows to take the focus. It's expected behaviour, especially on program execution. Not to mention that if you have multi-window programs, preventing new windows from taking the focus would require an extra click or two to get to the new window, a pain for keyboard users. Allowing them to take the focus, but preventing them from being accidentally closed if they're some sort of confirmation dialogue, resolves the problem without changing expected behaviour.

akashcj_7 wrote on the 26 Mar 08 at 20:31
How about not letting Popup windows take focus...but then, I'm not sure if we can differentiate between normal and popup windows.

kelvan wrote on the 26 Mar 08 at 22:09
I have the problem that firefoc or thunderbird need my password and if I type it in and press enter it is possible that a pidgin message poped up and i send my password or pices of it to a friend, not really good.
no focus change on password typing would be nice.

holizz wrote on the 26 Mar 08 at 23:50
It should be possible to test whether a key has been pressed in the last 1 second, and if it has been, any windows that appear do not steal focus.

Possibly, after a 3 second typing break, the new window could steal focus, maybe. But these things would have to be experimented with.

Sukarn wrote on the 27 Mar 08 at 11:47
I like holizz's idea

fwolfste wrote on the 28 Mar 08 at 10:05
I like holizz idea as well.
I use "focus follows mouse" but not bringing up the window under the mouse pointer. For me this is very handy, especially when i work on big (or two) screens.
I think because most people go with the standard behaviour, for them there is no difference between "focus" for input and "focus" as "being the top-most window".
Raising a pop-up window on top but not getting the focus would work nicely in that scenario. Then, it should be the first on to get the focus on a alt+tab press, though.
Btw, I have a case where kind of the oppositie behavoir is wished: http://brainstorm.ubuntu.com/idea/5867/

csulok wrote on the 30 Mar 08 at 15:41
how about watching the monitor when typing instead of watch the keyboard? :D

josh.smith wrote on the 30 Mar 08 at 20:00
you can just enable focus stealing prevention in compiz

Vertelemming wrote on the 2 Apr 08 at 11:35
csulok: I do watch the monitor. With fast typists, windows can appear and be dismissed before you even realise it.

josh.smith: Not everyone is able to or wants to use Compiz.

mmcmonster wrote on the 10 May 08 at 14:45
No window should steal focus unless it's a new application being launched by the user.

The issue with an application being launched and the user typing in another application is more of an edge case that is better dealt with by adjusting applications to start up instantly. (ie: why should we wait 5+ seconds for a word processor to start up?)

Making applications start up instantly can be handled 2 ways.
1. Application developers should work towards fast startup.
2. OS Vendors should do smart prefetching based on user patterns, with an eye to not degrade performance of other running processes.


Post your comment