qtubuntu sends wrong text as part of QKeyEvent

Bug #1664610 reported by Albert Astals Cid on 2017-02-14
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mir
Medium
Andreas Pokorny
mir (Ubuntu)
Undecided
Unassigned
qtubuntu (Ubuntu)
Medium
Andreas Pokorny

Bug Description

When using Unity7 or Plasma a key event created by Ctrl+C is
  QKeyEvent(KeyPress, Key_C, ControlModifier, text="\u0003")

But Unity8+ qtubuntu send to the application
  QKeyEvent(KeyPress, Key_C, ControlModifier, text="c")

This is most likely because QMirClientInput::dispatchKeyEvent is using xkb_keysym_to_utf8 to get the text of the event instead of using xkb_state_key_get_utf8

This breaks for example Konsole that expects the correct text to be sent.

Related branches

lp:~andreas-pokorny/mir/fix-1664610
mir-ci-bot: Approve (continuous-integration) on 2017-02-17
Daniel van Vugt: Approve on 2017-02-17
Brandon Schaefer: Approve on 2017-02-16
description: updated

Mir either has to expose the xkb_state (which we currently do not - and might be only on the server) or provide the keysym text directly with the event.

Changed in mir (Ubuntu):
assignee: nobody → Andreas Pokorny (andreas-pokorny)
assignee: Andreas Pokorny (andreas-pokorny) → nobody
status: New → Confirmed
assignee: nobody → Andreas Pokorny (andreas-pokorny)
tags: added: input
Changed in mir (Ubuntu):
assignee: Andreas Pokorny (andreas-pokorny) → nobody

Went for the second approach key entry text is attached to every press and repeat event.

Changed in mir (Ubuntu):
assignee: nobody → Andreas Pokorny (andreas-pokorny)
assignee: Andreas Pokorny (andreas-pokorny) → nobody
assignee: nobody → Andreas Pokorny (andreas-pokorny)
affects: mir (Ubuntu) → mir
Changed in mir:
milestone: none → 1.0.0
Changed in mir:
importance: Undecided → Medium
Changed in qtubuntu (Ubuntu):
importance: Undecided → Medium
assignee: nobody → Andreas Pokorny (andreas-pokorny)
Changed in mir:
status: Confirmed → In Progress
Changed in qtubuntu (Ubuntu):
status: New → In Progress
mir-ci-bot (mir-ci-bot) wrote :

Fix committed into lp:mir at revision None, scheduled for release in mir, milestone 1.0.0

Changed in mir:
status: In Progress → Fix Committed
Daniel d'Andrada (dandrader) wrote :

Alt+Up and Alt+Down to switch between tabs in Kate also doesn't work currently. Could it have the same cause as this Ctrl+C issue?

Albert Astals Cid (aacid) wrote :

Don't think so, Alt+Up/Alt+Down don't have text attached.

Also http://paste.ubuntu.com/24045824/ seems to report the same presses in both unity7 and unity8

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers