[Bug 1547864] Re: libinput doesn't handle EV_KEY event with a value of 255 (BUTTON_CANCLED), to support Android home buttons

2016-03-14 Thread Launchpad Bug Tracker
Status changed to 'Confirmed' because the bug affects multiple users.

** Changed in: libinput (Ubuntu)
   Status: New => Confirmed

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1547864

Title:
  libinput doesn't handle EV_KEY event with a value of 255
  (BUTTON_CANCLED), to support Android home buttons

To manage notifications about this bug go to:
https://bugs.launchpad.net/mir/+bug/1547864/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1547864] Re: libinput doesn't handle EV_KEY event with a value of 255 (BUTTON_CANCLED), to support Android home buttons

2016-02-28 Thread Chris Halse Rogers
I guess what I'm arguing for is adding a key-is-cancellable quirk to
libinput and only emitting a KEY_DOWN/KEY_UP pair once the device has
emitted KEY_UP :)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1547864

Title:
  libinput doesn't handle EV_KEY event with a value of 255
  (BUTTON_CANCLED), to support Android home buttons

To manage notifications about this bug go to:
https://bugs.launchpad.net/mir/+bug/1547864/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1547864] Re: libinput doesn't handle EV_KEY event with a value of 255 (BUTTON_CANCLED), to support Android home buttons

2016-02-28 Thread Chris Halse Rogers
>> My concern with adding cancellation behaviour is that there'll be no
existing client or toolkit that expects it, and we can't make it opt-in
(like the opt-in touch cancellation support).

>That's a good point but extra events are kind of opt-in already with
zero code change for most clients. If clients see an event they don't
understand they should ignore it and not treat it as an error.

Yeah, they (probably) won't crash; they'll just have broken behaviour.
Failure to act on a BUTTON_CANCEL means that the client is erroneously
treating that button as pressed, with whatever behaviour that entails.
Which is exactly this bug; adding BUTTON_CANCELLED support won't
actually fix this bug without also fixing clients :)

As you note in your subsequent responses, the click-move-release case is
handled explicitly, either in the application or sometimes in the
toolkit (for the “clicked” event). If we add a KEY_CANCELLED state to
the existing KEY_DOWN/KEY_UP states, we'll likewise need to fix the rest
of the universe, starting with the toolkits and moving up :)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1547864

Title:
  libinput doesn't handle EV_KEY event with a value of 255
  (BUTTON_CANCLED), to support Android home buttons

To manage notifications about this bug go to:
https://bugs.launchpad.net/mir/+bug/1547864/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1547864] Re: libinput doesn't handle EV_KEY event with a value of 255 (BUTTON_CANCLED), to support Android home buttons

2016-02-24 Thread Daniel van Vugt
Another handy trick used in GUI toolkits is to introduce a "clicked"
event created by the toolkit. So simple apps don't need to track button
states, only listen for the 'clicked' event and ignore all other events.
So a button might receive any of these sequences of events:

  press -> appearance changes to depressed
  press, release, clicked -> appearance resets and action triggered
  press, cancelled -> appearance resets
  release -> nothing happens

but typically an app only really needs to act on 'clicked'.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1547864

Title:
  libinput doesn't handle EV_KEY event with a value of 255
  (BUTTON_CANCLED), to support Android home buttons

To manage notifications about this bug go to:
https://bugs.launchpad.net/mir/+bug/1547864/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1547864] Re: libinput doesn't handle EV_KEY event with a value of 255 (BUTTON_CANCLED), to support Android home buttons

2016-02-24 Thread Daniel van Vugt
Analogously in the case of GUI toolkits, one would usually act on a
button release, but only if it was preceded by a button press. The app
however could encounter a press without a release (mouse dragged off the
button) or a release without a press (mouse dragged onto the button). In
the former case the button is informed that the press has been cancelled
(by the pointer leaving) before it was released. And in the latter case
the button simply ignores a 'release' that had no press before it. So
there's another precedent for button cancellation of sorts...

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1547864

Title:
  libinput doesn't handle EV_KEY event with a value of 255
  (BUTTON_CANCLED), to support Android home buttons

To manage notifications about this bug go to:
https://bugs.launchpad.net/mir/+bug/1547864/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1547864] Re: libinput doesn't handle EV_KEY event with a value of 255 (BUTTON_CANCLED), to support Android home buttons

2016-02-24 Thread Andreas Pokorny
We might not need to emit 'cancel' for keys being pressed while
switching away - it might be enough to treat vt switching as focus
gaining state change.. during which we have to inform the client about
all currently pressed keys and buttons..

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1547864

Title:
  libinput doesn't handle EV_KEY event with a value of 255
  (BUTTON_CANCLED), to support Android home buttons

To manage notifications about this bug go to:
https://bugs.launchpad.net/mir/+bug/1547864/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1547864] Re: libinput doesn't handle EV_KEY event with a value of 255 (BUTTON_CANCLED), to support Android home buttons

2016-02-24 Thread Daniel van Vugt
> My concern with adding cancellation behaviour is that there'll be no
existing client or toolkit that expects it, and we can't make it opt-in
(like the opt-in touch cancellation support).

That's a good point but extra events are kind of opt-in already with
zero code change for most clients. If clients see an event they don't
understand they should ignore it and not treat it as an error.

On the other hand, cancellation support would help the VT switching
problem with modifier press/release. And on the third hand ;) I continue
to believe we should just be writing more robust code that can survive
seeing a press without a release and a release without a press. Because
clearly we have two real-world use cases (on phone and desktop!) where
that can happen.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1547864

Title:
  libinput doesn't handle EV_KEY event with a value of 255
  (BUTTON_CANCLED), to support Android home buttons

To manage notifications about this bug go to:
https://bugs.launchpad.net/mir/+bug/1547864/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1547864] Re: libinput doesn't handle EV_KEY event with a value of 255 (BUTTON_CANCLED), to support Android home buttons

2016-02-24 Thread Chris Halse Rogers
Either way, should probably be raised with upstream libinput.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1547864

Title:
  libinput doesn't handle EV_KEY event with a value of 255
  (BUTTON_CANCLED), to support Android home buttons

To manage notifications about this bug go to:
https://bugs.launchpad.net/mir/+bug/1547864/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1547864] Re: libinput doesn't handle EV_KEY event with a value of 255 (BUTTON_CANCLED), to support Android home buttons

2016-02-24 Thread Chris Halse Rogers
Urgh. My immediate reaction is “that touchscreen shouldn't be emulating
a keyboard, damnit”.

My concern with adding cancellation behaviour is that there'll be no
existing client or toolkit that expects it, and we can't make it opt-in
(like the opt-in touch cancellation support).

Could we quirk this in either libinput or Mir to not send key-down until
we've got a confirmed key-up?

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1547864

Title:
  libinput doesn't handle EV_KEY event with a value of 255
  (BUTTON_CANCLED), to support Android home buttons

To manage notifications about this bug go to:
https://bugs.launchpad.net/mir/+bug/1547864/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1547864] Re: libinput doesn't handle EV_KEY event with a value of 255 (BUTTON_CANCLED), to support Android home buttons

2016-02-23 Thread Alan Griffiths
"Cancelled" would appear to be a behaviour that is "out there" - so
adding it to libinput & Mir is a natural solution.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1547864

Title:
  libinput doesn't handle EV_KEY event with a value of 255
  (BUTTON_CANCLED), to support Android home buttons

To manage notifications about this bug go to:
https://bugs.launchpad.net/mir/+bug/1547864/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs