Bug 146883 - Control-Shift keyboard shortcut defaults to setting text left-to-right and can't be changed
Summary: Control-Shift keyboard shortcut defaults to setting text left-to-right and ca...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.2.4.1 release
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Shortcuts-Accelerators
  Show dependency treegraph
 
Reported: 2022-01-20 17:24 UTC by William Friedman
Modified: 2024-04-01 12:20 UTC (History)
4 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 William Friedman 2022-01-20 17:24:21 UTC
Description:
Pressing Control-Shift insists on setting the text direction to left-to-right no matter what I set it to do (or not do) in Tools | Customize | Keyboard. In addition, pressing Control-Shift in Tools | Customize | Keyboard when the focus is on Shortcut Keys -- which the tooltip text says "to quickly find a shortcut in this list, simply press the key combination" -- pressing Control-Shift does not highlight that shortcut. (Please note that I have *disabled* Control-Shift as the Windows 7 shortcut key for changing input languages for the sake of testing this. The issue arose when I tried to stop Control-Shift in LO from taking any action so that I could use Control-Shift to change system input languages without affecting or effecting anything in LO.)

Steps to Reproduce:
1. Type some text in whatever language and set it to right-to-left.
2. Go to Tools | Customize | Keyboard. Press the Writer radio button.
3. With the focus set to Shortcut Keys, press Control-Shift. Note that nothing happens.
4. Scroll down to Ctrl+Shift in the Shortcut Keys box and highlight it. Press Delete.
5. Press the LibreOffice radio button. With the focus set to Shortcut keys, press Control-Shift. Note that nothing happens.
6. Scroll down to Ctrl+Shift. Press Delete.
7. Press OK.
8. Place the cursor somewhere in the RTL text you wrote. Press Control-Shift. Note that it makes the text LTR. (Change the style to whatever you want. It keeps the style the same but changes the text direction.)
9. Go back to Tools | Customize | Keyboard. Set Ctrl+Shift to do something innocuous like changing the zoom level. Set it to do the same thing for both LibreOffice and Writer. Press OK.
10. Set the text you wrote to RTL. Change the zoom level to something different than what you set Ctrl+Shift to do. Press Ctrl+Shift. Note that it does not change the zoom level, but does set the text to LTR.

Actual Results:
Changes the text from RTL to LTR.

Expected Results:
Do whatever CTRL+SHIFT is set to (nothing or change the zoom level) and leave the text alone.


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.2.4.1 (x64) / LibreOffice Community
Build ID: 27d75539669ac387bb498e35313b970b7fe9c4f9
CPU threads: 4; OS: Windows 6.1 Service Pack 1 Build 7601; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL
Comment 1 V Stuart Foote 2022-01-20 19:03:03 UTC
Confirmed. Even though <Ctrl>+<Shift> is listed as an available keyboard shortcut, an UNO command assigned is not actually triggered.  Meaning instead that OPs issue with left-to-right, and right-to-left are likely passthrough from the os/DE.

To test, pick any UNO command and assign to the <Ctrl>+<Shift> keyboard shortcut for Writer. If assigned, it should show in the Customize table-- I used the "Small capitals" .uno:SmallCaps (available by default at Ctrl+Shift+K). 

Shortcut shows assigned in the Customize dialog, but the shortcut is not triggered (at least on Windows builds) by the shortcut.

Note: the LibreOffice UNO control .uno:RightToLeft is assigned <CTRL>+<Shift>+A; and .unoLLeftToRight is assigned <CTRL>+<SHIFT>+D as default keyboard shortcuts for Writer.

Version: 7.4.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 7e5af164b7d293dd410710bed411e1ca64bbecf7
CPU threads: 8; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL
Comment 2 William Friedman 2022-01-20 19:17:22 UTC
Thank you for the quick confirmation. 

What is causing Ctrl-Shift to trigger setting text to LTR is very mysterious. I knew about the Ctrl-Shift-A/D shortcuts, and for the sake of testing deleted the command for Ctrl-Shift-A, but Ctrl-Shift by itself still triggers LTR. And as mentioned I had also disabled Ctrl-Shift from triggering input language changes in the OS (Windows 7), so it's very unclear to me what could be passing through to cause it.

Were you also able to confirm that pressing Control+Shift in the "Shortcut Keys" box (at Tools | Customize | Keyboard) does not immediately highlight that key combination? I don't understand how that could be related to the failure to assign an UNO command to that key combo, but it seems like it could be related. Otherwise there are three separate bugs here for control+shift -- not taking assigned UNO commands, not being recognized by the Shortcut Keys box, and causing RTL text to be set to LTR!
Comment 3 Jan-Marek Glogowski 2022-01-20 22:39:08 UTC
AFAIK this is a system setting on Windows, but it's also handled directly in the LO code and also used on other platforms. And the direction toggling is just triggered on release. See bug 103158 or bug 144412.

I'm not sure this normal assignment should really be a assignable shortcut; maybe it should be removed from the shortcut list?
Comment 4 William Friedman 2022-01-21 17:14:36 UTC
Thank you, Jan-Marek. You're right about Ctrl-shift being a Windows system setting, and that's what LO is responding to.

I concur that Ctrl-Shift should be removed from the shortcut list and not assignable, particularly in light of the fact that Ctrl-Shift is the default method of switching input languages in Windows (and there are very few other options).

(Thank you for linking to those other bugs -- now I finally understand why sometimes trying to switch input languages would cause my text to change direction!)
Comment 5 QA Administrators 2024-03-30 03:14:23 UTC Comment hidden (obsolete)
Comment 6 William Friedman 2024-04-01 02:58:58 UTC
As of 7.6.5.2 on Windows, Ctrl-Shift still appears on the list of assignable keys, and still does nothing even when assigned a command. Such unassignable keystrokes should be removed from the list.

Version: 7.6.5.2 (X86_64) / LibreOffice Community
Build ID: 38d5f62f85355c192ef5f1dd47c5c0c0c6d6598b
CPU threads: 4; OS: Windows 6.1 Service Pack 1 Build 7601; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded
Comment 7 V Stuart Foote 2024-04-01 10:49:39 UTC
Yes, still an issue at least on Windows builds, as in comment 1

Also seems shortcuts assigned to the <Ctrl><Shift><Tab> can be assigned but its assigned sequence is non-functional

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: c9d4f99b2bb54ac7735b3e0d0cadbafbd0279518
CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded

@Mike, any perspective on what to do? Could we list but suppress the <Ctrl><Shift> and <Ctrl><Shift><Tab> "shortcut keys" in the customize dialog like is done for <F6> and <F10>?
Comment 8 Mike Kaganski 2024-04-01 12:20:25 UTC
Sole <Ctrl><Shift> as a shortcut by itself? Likely should just be dropped from the dialog altogether.