From: Tristan Lelong <tristan@lelong.xyz>
To: "Bruno Prémont" <bonbons@linux-vserver.org>
Cc: linux-input@vger.kernel.org, dmitry.torokhov@gmail.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] input: Add soft kill switch for input devices
Date: Tue, 6 Jan 2015 22:40:39 -0800 [thread overview]
Message-ID: <20150107064038.GB4681@lenderer> (raw)
In-Reply-To: <20150106221732.1cbbe3ae@neptune.home>
On Tue, Jan 06, 2015 at 10:17:32PM +0100, Bruno Prémont wrote:
>
> One big issue I see here is that you start dropping all events at a random
> point in time.
> You may end up within a gesture or just while a button is down and remain
> so until that same button gets pressed again on unmute.
>
> On your touchscreen, how do things behave if you trigger the muting while
> you are dragging or doing some gesture (and unmute when noone touches
> the touchscreen)?
That is right, I thought of it for pointing devices, and it seemed that it should not be
too much of a problem, even thought it would be better to handle it properly.
>
> If applied to a keyboard, what happens when you mute while keys are pressed
> and unmute when they have long been released?
This case is actually a bigger problem and I didn't think of it.
>
>
> If you could send a "reset" event to input listeners when muting you could
> work around most issues as any application making use of events would know
> that after this "reset" event things should not depend on any past state.
I could definitely do something like this and make sure all the events are handled properly.
>
>
> Possibly a better way to achieve your aim is to just unbind and re-bind
> the device from device driver, causing software hotplug.
> That way you are sure no application will perform incorrect guesses while
> device is "muted".
This is another good solution that would work in my case.
If somebody think this patch can be of any interest, I'll be happy to
submit a v2 with correct handling of current events at the time of mutting.
Best regards
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2015-01-07 6:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-04 6:24 [PATCH] input: Add soft kill switch for input devices Tristan Lelong
2015-01-06 21:17 ` Bruno Prémont
2015-01-07 6:40 ` Tristan Lelong [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150107064038.GB4681@lenderer \
--to=tristan@lelong.xyz \
--cc=bonbons@linux-vserver.org \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).