Bug 140251 - Unable to insert character using Unicode code with Ctrl-Shift-U (kf5)
Summary: Unable to insert character using Unicode code with Ctrl-Shift-U (kf5)
Status: RESOLVED WONTFIX
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
6.4.0.0.alpha0+
Hardware: x86-64 (AMD64) Linux (All)
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: KDE, KF5
  Show dependency treegraph
 
Reported: 2021-02-07 21:57 UTC by Petr Valach
Modified: 2021-02-21 11:24 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Valach 2021-02-07 21:57:25 UTC
Description:
Users of KDE with installed of kde-integration pack cannot insert characters via Unicode code.

Steps to Reproduce:
1. Install any version of LibreOffice with kde-integration pack and open for instance Writer.
2. Use Unicode shortcut - Ctrl + Shift + u.
3. Type any Unicode code (for instance 2026).

Actual Results:
Unicode shortcut is ignored. User types Unicode code directly (so there is "2026" on the page).

Expected Results:
Behaviour like without kde-integration pack - underline "u" shows and waits for Unicode code. After typing it, Unicode character appear ("…").


Reproducible: Always


User Profile Reset: Yes


OpenGL enabled: Yes

Additional Info:
Version: 7.1.0.3 / LibreOffice Community
Build ID: f6099ecf3d29644b5008cc8f48f42f4a40986e4c
CPU threads: 2; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: cs-CZ (cs_CZ.UTF-8); UI: en-US
Calc: threaded
Comment 1 Petr Valach 2021-02-08 11:42:32 UTC
This bug occurs in many versions of LibreOffice for few years. Bibisect needed.
Comment 2 Buovjaga 2021-02-20 20:03:13 UTC
Confirmed, already with 6.4

With the gen backend, I have to hold down all the keys while I type the code, otherwise it won't work.

Arch Linux 64-bit
Version: 7.2.0.0.alpha0+ / LibreOffice Community
Build ID: ad4d715ca69d6f09fb2d8a713c79edb999ad2316
CPU threads: 8; OS: Linux 5.10; UI render: default; VCL: kf5
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded
Built on 18 February 2021
Comment 3 Jan-Marek Glogowski 2021-02-20 21:46:43 UTC
I'm not sure this is a good idea to be implemented in the VCL / qt5 backend. You can install fcitx or ibus, which both support unicode input (fcitx via Ctrl+Alt+Shift+u / configurable shortcut). Then it will work with all Qt applications, not just LO.

The original bug for X11 was https://bz.apache.org/ooo/show_bug.cgi?id=48666. That also explains, why I couldn't find any code for it in the Gtk backend: it's handled toolkit internal. And it also explains, why that has presumably worked with kde4: kde4 was just theming for X11 / gen.

If someone wants to implement this: the X11 code is X11SalFrame::(begin|append|end)UnicodeSequence. The Qt5 key input code is Qt5Widget::handleKeyEvent.

It's probably not even hard to do, but the keyboard and IM handling overlaps in Qt, so it can become a bit tricky, especially with the existing shortcut handling event filtering. So I won't mark this as an interesting EasyHack, because there might be some unknown pitfalls.
Comment 4 Buovjaga 2021-02-21 06:24:46 UTC
(In reply to Jan-Marek Glogowski from comment #3)
> I'm not sure this is a good idea to be implemented in the VCL / qt5 backend.
> You can install fcitx or ibus, which both support unicode input (fcitx via
> Ctrl+Alt+Shift+u / configurable shortcut). Then it will work with all Qt
> applications, not just LO.

Petr: what do you think about this? Do you still want to keep this open?
Comment 5 Petr Valach 2021-02-21 11:08:31 UTC
(In reply to Buovjaga from comment #4)
> (In reply to Jan-Marek Glogowski from comment #3)
> > I'm not sure this is a good idea to be implemented in the VCL / qt5 backend.
> > You can install fcitx or ibus, which both support unicode input (fcitx via
> > Ctrl+Alt+Shift+u / configurable shortcut). Then it will work with all Qt
> > applications, not just LO.
> 
> Petr: what do you think about this? Do you still want to keep this open?

If there is workaround using fcitx then it's ok for me. Anyway, I spent many times yesterday and didn't understand how it works. But there is my problem (rather bad documentation), not LO.
Comment 6 Buovjaga 2021-02-21 11:16:36 UTC
(In reply to Petr Valach from comment #5)
> (In reply to Buovjaga from comment #4)
> > (In reply to Jan-Marek Glogowski from comment #3)
> > > I'm not sure this is a good idea to be implemented in the VCL / qt5 backend.
> > > You can install fcitx or ibus, which both support unicode input (fcitx via
> > > Ctrl+Alt+Shift+u / configurable shortcut). Then it will work with all Qt
> > > applications, not just LO.
> > 
> > Petr: what do you think about this? Do you still want to keep this open?
> 
> If there is workaround using fcitx then it's ok for me. Anyway, I spent many
> times yesterday and didn't understand how it works. But there is my problem
> (rather bad documentation), not LO.

Ok, let's close. Also, this works just fine with kf5:

1. Type the code
2. Press Alt-X

The name of the function is "Toggle Unicode Notation", .uno:UnicodeNotationToggle
Comment 7 Petr Valach 2021-02-21 11:24:00 UTC
(In reply to Buovjaga from comment #6)

> Ok, let's close. Also, this works just fine with kf5:
> 
> 1. Type the code
> 2. Press Alt-X
> 
> The name of the function is "Toggle Unicode Notation",
> .uno:UnicodeNotationToggle

Fantastic, it works! It's not so comfort as using standard input way (user must install fcitx) but it works. If there problem to support Unicode input in LO, I understand and close this bug.

Thank you very much.