Thread (4 messages) 4 messages, 3 authors, 2002-12-03

Re: [patch] ignore trackpad/mouse while typing

From: Till Straumann <hidden>
Date: 2002-12-03 05:03:44

Michel Dänzer wrote:
On Fre, 2002-11-29 at 02:34, Till Straumann wrote:

quoted
+ 		if ( jiffies - mouse_holdoff_last_jiffie < mouse_holdoff_jiffies )
+ 			return;
+ 		/* Note: we could lose mouse events when the jiffie counter rolls over... */

I think the difference is always correct.
No: if no key is pressed for (any integer multiple of) 2^32 jiffies then
mouse events are ignored during a short period of time following the
rollover ;-)
[ i.e. the rollover of the difference, not the jiffies; the true
   relation being
    (jiffies - mouse_holdoff_last_jiffie) % 2^32 < mouse_holdoff_jiffies
]

Anyways: the patch has another problem: the trivial version cannot deal
with

  - emulated mouse buttons (ignored because input_event() first receives
    a key event which is sent to the keyboard handler who remaps it to a
    mouse/button event to be ignored since it happens shortly after the
    key event triggering it)
  - 'modifiers' (Shift, Ctrl & friends). All keys seem to be
    'auto-repeated' by the input driver resulting in repeated
    key events while a modifier is pressed, hence causing the trivial
    patch to ignore mouse events while a modifier key is held down.

I'm working on an improved version supporting a (configurable but
reasonably defaulted) list of keys who are to be considered 'modifiers'.

-- Till


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help