Bug 126888 - Ctrl+Shift+; shortcut to insert current time stopped working
Summary: Ctrl+Shift+; shortcut to insert current time stopped working
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.3.0.4 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisectRequest, regression
: 125306 (view as bug list)
Depends on:
Blocks: Shortcuts-Locale
  Show dependency treegraph
 
Reported: 2019-08-13 16:26 UTC by Martin
Modified: 2020-02-16 13:00 UTC (History)
6 users (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 Martin 2019-08-13 16:26:32 UTC
Description:
The shortcut for inserting current time stopped working. When selecting the option from the menu ( Insert / Time) it works fine.

Steps to Reproduce:
1.Create a new spreadsheet
2.when in cell press ctrl+shift+;


Actual Results:
semicolon character is inserted into the cell

Expected Results:
current time is inserted into the cell


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Version: 6.3.0.4
Build ID: 057fc023c990d676a43019934386b85b21a9ee99
CPU threads: 4; OS: Linux 5.2; UI render: GL; VCL: kde5; 
Locale: en-GB (en_GB.utf8); UI-Language: en-US
Calc: threaded
Comment 1 Jean-Baptiste Faure 2019-08-13 20:48:23 UTC
Reproducible on LibreOffice 6.3.1.0+ built at home under Ubuntu 18.04 x86-64.

In my case, the actual results is nothing, this key combination does nothing.

Best regards. JBF
Comment 2 Xisco Faulí 2019-08-14 09:18:53 UTC
I can't reproduce it in

Version: 6.4.0.0.alpha0+
Build ID: 744f70386727c78a19bd7c1de7425392b98783c7
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded

nor in

Version: 6.4.0.0.alpha0+
Build ID: 744f70386727c78a19bd7c1de7425392b98783c7
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: x11; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded

Does it happen if you launch LibreOffice from commandline using 'SAL_USE_VCLPLUGIN=gtk3 soffice' ?
Comment 3 Martin 2019-08-14 15:37:37 UTC
(In reply to Xisco Faulí from comment #2)
> 
> Does it happen if you launch LibreOffice from commandline using
> 'SAL_USE_VCLPLUGIN=gtk3 soffice' ?

The shortcut works fine when setting this env variable
Comment 4 Jean-Baptiste Faure 2019-08-14 17:14:17 UTC
(In reply to Xisco Faulí from comment #2)
> [...]
> Does it happen if you launch LibreOffice from commandline using
> 'SAL_USE_VCLPLUGIN=gtk3 soffice' ?

I already use the plugin GTK3 and it does not work with any version I can test : 6.1, 6.2, 6.3 and master.
Could it be possible that the problem is linked to the use of an AZERTY keyboard?

Best regards. JBF
Comment 5 Michael Weghorn 2019-08-14 20:15:49 UTC
I cannot reproduce on Debian testing with KDE Plasma, German keyboard layout:

Version: 6.4.0.0.alpha0+
Build ID: fa774e16b1dfe4844ec5eb3f9372d6468f6b8a56
CPU threads: 4; OS: Linux 4.19; UI render: default; VCL: kf5; 
Locale: en-GB (en_GB.UTF-8); UI-Language: en-US
Calc: threaded

neither with the package provided in Debian testing (libreoffice 1:6.3.0-2):

Version: 6.3.0.4
Build ID: 1:6.3.0-2
CPU threads: 4; OS: Linux 4.19; UI render: default; VCL: kde5; 
Locale: en-GB (en_GB.UTF-8); UI-Language: en-US
Calc: threaded


@Martin: What is your keyboard layout that works with SAL_USE_VCLPLUGIN=gtk3, but not with the "kde5" VCL plugin?

(In reply to Jean-Baptiste Faure from comment #4)
> I already use the plugin GTK3 and it does not work with any version I can
> test : 6.1, 6.2, 6.3 and master.
> Could it be possible that the problem is linked to the use of an AZERTY
> keyboard?

That's possible. Can you try whether it works as expected when you configure another keyboard layout?
Comment 6 Martin 2019-08-15 08:00:31 UTC
(In reply to Michael Weghorn from comment #5)
> 
> @Martin: What is your keyboard layout that works with
> SAL_USE_VCLPLUGIN=gtk3, but not with the "kde5" VCL plugin?
> 

Hi Michael,

I tested for polish ( pl ) and english ( us ). In both cases the issue goes away when I run libreoffice using the above mentioned env variable.

Cheers
Comment 7 Martin 2019-08-15 08:05:18 UTC
(In reply to Martin from comment #6)
> (In reply to Michael Weghorn from comment #5)
> > 
> > @Martin: What is your keyboard layout that works with
> > SAL_USE_VCLPLUGIN=gtk3, but not with the "kde5" VCL plugin?
> > 
> 
> Hi Michael,
> 
> I tested for polish ( pl ) and english ( us ). In both cases the issue goes
> away when I run libreoffice using the above mentioned env variable.
> 
> Cheers

Out of curiosity I tried german layout (swiss: ch). It behaves the same way as us and pl. That is, when I run libreoffice using SAL_USE_VCLPLUGIN=gtk3 the shortcut works as expected.
Comment 8 Jean-Baptiste Faure 2019-08-15 15:35:01 UTC
I tested the 4 following possibilities, none of them works :
1/ vclplugin=gtk3 (my default)
2/ vclplugin=gtk
3/ vlcplugin=gen
4/ English keybord layout (qwerty)

I can redefine the shortcut to "Ctrl+Shift+," or "Ctrl+shift+H" (or any other letter), but not to "Ctrl+Shift+'"
With the key ";" the only 3-keys shortcut that works is "Ctrl+Alt+;" 
"Shift+Alt+;" does not work too.

Best regards. JBF
Comment 9 Xisco Faulí 2019-08-15 18:35:47 UTC
*** Bug 125306 has been marked as a duplicate of this bug. ***
Comment 10 Michael Weghorn 2019-08-20 15:51:31 UTC
(In reply to Martin from comment #6)
> I tested for polish ( pl ) and english ( us ). In both cases the issue goes
> away when I run libreoffice using the above mentioned env variable.

Thanks. I can reproduce now if I switch keyboard layout to US.

What both US and PL keyboard layouts have in common is that the ";" character is typed by just pressing a single key, while DE layout requires typing Shift in addition to the key otherwise typing ",'.
For the US layout, pressing Shift in addition to the ";" key will result in ":".

This is what **might** be happening (didn't check yet): Instead of the three key codes for Ctrl + Shift + ';', only the key codes for Ctrl + ':' are sent,
(i.e. the conversion
    Shift+';' = ':'
takes place), and the shortcut then no longer matches.
Comment 11 Martin 2019-08-20 16:02:13 UTC
(In reply to Michael Weghorn from comment #10)
> (In reply to Martin from comment #6)
> 
> Thanks. I can reproduce now if I switch keyboard layout to US.
> 
> What both US and PL keyboard layouts have in common is that the ";" [...]

Actually, physically PL keyboard looks exactly like the US one. The way you get characters specific to Polish language is by key combination of right Alt key and a letter (eg. RightAlt+a).

I'm guessing that if it gets fixed for US layout, it'll also be fixed for other derived from it.
Comment 12 Michael Weghorn 2019-08-20 16:30:40 UTC
I quickly debugged into the code and at a quick glance at 'Qt5Widget::handleKeyEvent', it seems like this is passed in the QKeyEvent:

* for DE layout: key: Semicolon; modifiers: Shift + Ctrl
* for US layout: key: Colon; modifiers: Shift + Ctrl

(In reply to Martin from comment #0)
> Actual Results:
> semicolon character is inserted into the cell

@Martin: Does this actually insert a semicolon (";") character or a colon (":")? If it's actually a semicolon, that somewhat contradicts my expectations.

@JBF: What keyboard layout are you using? Does the behaviour change when you switch e.g. to US layout?
Comment 13 Martin 2019-08-20 16:33:39 UTC
(In reply to Michael Weghorn from comment #12)
> I quickly debugged into the code and at a quick glance at
> 'Qt5Widget::handleKeyEvent', it seems like this is passed in the QKeyEvent:
> 
> * for DE layout: key: Semicolon; modifiers: Shift + Ctrl
> * for US layout: key: Colon; modifiers: Shift + Ctrl
> 
> (In reply to Martin from comment #0)
> > Actual Results:
> > semicolon character is inserted into the cell
> 
> @Martin: Does this actually insert a semicolon (";") character or a colon
> (":")? If it's actually a semicolon, that somewhat contradicts my
> expectations.
> 
> @JBF: What keyboard layout are you using? Does the behaviour change when you
> switch e.g. to US layout?

You're right, it's a colon (:). Sorry abut the confusion.
Comment 14 Jean-Baptiste Faure 2019-08-20 16:44:01 UTC
(In reply to Michael Weghorn from comment #12)
> [...]
> @JBF: What keyboard layout are you using? Does the behaviour change when you
> switch e.g. to US layout?

Keyboard layout: Français(Variante)
No change if I use an English/US layout (see comment #8)

Best regards. JBF
Comment 15 Michael Weghorn 2019-08-20 17:14:06 UTC
Thanks for the clarifications.

I checked with a small sample Qt application that the values for the keys for QWidget::handleKeyEvent are submitted as described in comment 12 (i.e. Colon for US, Semicolon for DE layout).

I wouldn't say that this by itself is wrong, and it seems a bit unfortunate that the choice of allowed/used keyboard shortcuts including the Shift key allows for such ambiguous situations...

Right now, I don't really have a good idea on how to deal with this. It probably makes sense to take a closer look what e.g. gtk3 does (i.e. both the gtk framework and the LO gtk3 VCL plugin).
Comment 16 Martin 2019-08-20 17:18:16 UTC
(In reply to Michael Weghorn from comment #15)
> Thanks for the clarifications.
> 
> I checked with a small sample Qt application that the values for the keys
> for QWidget::handleKeyEvent are submitted as described in comment 12 (i.e.
> Colon for US, Semicolon for DE layout).
> 
> I wouldn't say that this by itself is wrong, and it seems a bit unfortunate
> that the choice of allowed/used keyboard shortcuts including the Shift key
> allows for such ambiguous situations...
> 
> Right now, I don't really have a good idea on how to deal with this. It
> probably makes sense to take a closer look what e.g. gtk3 does (i.e. both
> the gtk framework and the LO gtk3 VCL plugin).

I see.

Has something changed? This shortcut worked fine before I installed the latest version of Libre Office. I've been using this shortcut for close to two years now.
Comment 17 Michael Weghorn 2019-08-21 10:35:46 UTC
(In reply to Martin from comment #16)
> Has something changed? This shortcut worked fine before I installed the
> latest version of Libre Office. I've been using this shortcut for close to
> two years now.

The "kde5" (or "kf5") VCL plugin ("frontend") which is used on Plasma and LXQt by default, was only introduced with LibreOffice 6.2, so you were probably using "gtk3" or "gtk3_kde5" VCL plugin previously, which still works the same (as comment 3 says).

Another "interesting" case is that Ctrl+Shift+; inserts current time, while Ctrl+; inserts the date.
I see no way to actually insert the date like this when used e.g. with German keyboard layout , since typing ";" requires pressing Shift+, - so the time is inserted instead of the date. And I currently can't up with any "technical" solution to actually make both of them work at the same time, other than changing keyboard shortcuts (depending on layout??).