Description: On Windows, the default shortcut for ZWNJ is ctrl+shift+2. To use that, one should activate Persian keyboard layout, and then press this key combination. Zero-width non-joiner https://en.wikipedia.org/wiki/ZWNJ At the same time, typing ZWNJ using this key combination is possible in Notepad. Steps to Reproduce: 1. Open LibreOffice Writer 2. Activate Persian keyboard layout 3. Press ctrl+shift+2 Actual Results: Nothing happens. Please note that ZWNJ is not visible on the screen, but one can understand its presence by its effect on separating parts of the word. Expected Results: ZWNJ should be inserted in the document. For example, if you type می then ZWNJ and then شود you should get میشود, but you will get میشود that means ZWNJ is not there. Reproducible: Always User Profile Reset: No Additional Info: Version: 7.5.0.0.alpha0+ (x64) / LibreOffice Community Build ID: f505d8fee149f089090b208db99a7b4107af76e9 CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win Locale: fa-IR (fa_IR); UI: en-US Calc: threaded
Hossein, it seems, that nobody could confirm your report for half a year. I don't use Persian keyboard layout, but I also couldn't find any information, that LO has a shortcurt for ZWNJ. I couldn't find any information in oline help and also in guide for keyboard shortcuts [1]. So I would like to ask design-team, if this feature is available and how. cc: Design-Team [1] https://wiki.documentfoundation.org/images/e/e4/GS7414-KeyboardShortcuts.odt
(In reply to Dieter from comment #1) > Hossein, it seems, that nobody could confirm your report for half a year. I > don't use Persian keyboard layout, but I also couldn't find any information, > that LO has a shortcurt for ZWNJ. > > I couldn't find any information in oline help and also in guide for keyboard > shortcuts [1]. So I would like to ask design-team, if this feature is > available and how. > > cc: Design-Team > > [1] > https://wiki.documentfoundation.org/images/e/e4/GS7414-KeyboardShortcuts.odt Thank you Dieter, for your response. Actually, there are other methods available to insert ZWNJ other than pressing ctrl+shift+2, like assigning a shortcut to insert this specific character. The same method can also be used in MS Word. But, I expect that pressing ctrl+shift+2 also works. But, anyway, installing Persian keyboard in Windows is not that hard. It only takes a few clicks, and you may remove it later. For example, see: How To Type in Farsi (Persian) On Windows 10 https://www.lingalot.com/install-farsi-keyboard-windows-10/
What command should be assigned to the shortcut? We have these special break/character in the main menu <menu:menu menu:id=".uno:FormattingMarkMenu"> <menu:menupopup> <menu:menuitem menu:id=".uno:InsertNonBreakingSpace"/> <menu:menuitem menu:id=".uno:InsertHardHyphen"/> <menu:menuitem menu:id=".uno:InsertSoftHyphen"/> <menu:menuitem menu:id=".uno:InsertNarrowNobreakSpace"/> (done for bug 121596) <menu:menuitem menu:id=".uno:InsertZWSP"/> <menu:menuitem menu:id=".uno:InsertWJ"/> <menu:menuitem menu:id=".uno:InsertLRM"/> <menu:menuitem menu:id=".uno:InsertRLM"/> </menu:menupopup> </menu:menu> In any case I disagree with a shortcut for these rarely used commands. At least not for English. You can do easily define localized shortcuts similar to this <node oor:name="S_MOD1" oor:op="replace"> <prop oor:name="Command"> <value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value> <value xml:lang="en-US">.uno:Save</value> <value xml:lang="es">.uno:Underline</value> </prop> </node>
The ctrl+shift+2 actually generates ZWNJ in Persian keyboard, so there should not be any command or shortcut needed. I compare it to having ß or § on a German keyboard. I assume that LibreOffice ignores this character on Windows for some reason. I have seen this behavior elsewhere, for example in Qt, and KDE. So, the request is not to ignore the ZWNJ character input from the keyboard.
Ctrl+Shift+<1..6> control the number format but customization is disabled for some reason. It's defined in officecfg/registry/data/org/openoffice/Office/Accelerators.xcu <node oor:name="2_SHIFT_MOD1" oor:op="replace"> <prop oor:name="Command"> <value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value> <value xml:lang="en-US" install:module="unxwnt">.uno:NumberFormatScientific</value> </prop> </node> Doubt we can just set it an empty value to clear the shortcut for some language like <value xml:lang="per-FA"></value> MSO uses Ctrl+Shift+Caret [1], which is not possible cross-platform with our way to handle shortcuts. Could imagine a toggle function similar to upper/lower case instead of individual commands. [1] https://support.microsoft.com/en-us/office/keyboard-shortcuts-in-excel-1798d9d5-842a-42b8-9c99-9b7213f0040f
(In reply to Heiko Tietze from comment #5) > Ctrl+Shift+<1..6> control the number format Only for Calc, while this bug is reported against Writer. Which suggests that the problem is somewhere else. > but customization is disabled for some reason. These keys are listed as reserved in https://opengrok.libreoffice.org/xref/core/vcl/source/app/svapp.cxx?r=5c73c3aa#107. But I have no idea why and how they are actually used. > Doubt we can just set it an empty value to clear the shortcut for some > language like > > <value xml:lang="per-FA"></value> > > > MSO uses Ctrl+Shift+Caret [1], which is not possible cross-platform with our > way to handle shortcuts. > > Could imagine a toggle function similar to upper/lower case instead of > individual commands. > > [1] > https://support.microsoft.com/en-us/office/keyboard-shortcuts-in-excel- > 1798d9d5-842a-42b8-9c99-9b7213f0040f
(In reply to Heiko Tietze from comment #5) > Ctrl+Shift+<1..6> control the number format Only for Calc, while this bug is reported against Writer. Which suggests that the problem is somewhere else. > but customization is disabled for some reason. These keys are listed as reserved in https://opengrok.libreoffice.org/xref/core/vcl/source/app/svapp.cxx?r=5c73c3aa#107. But I have no idea why and how they are actually used. > Doubt we can just set it an empty value to clear the shortcut for some > language like > > <value xml:lang="per-FA"></value> This actually might work. Looking at the code in XCUBasedAcceleratorConfiguration::impl_ts_load we seem to leave the shortcut as undefined in case of an empty command, and not falling back to en-US.
(In reply to Maxim Monastirsky from comment #7) > These keys are listed as reserved in... IIRC, Miklos told me that reserved keys are used for some development testing. > > ...we can just set it an empty value to clear the shortcut... > This actually might work. Looking at the code in > XCUBasedAcceleratorConfiguration::impl_ts_load we seem to leave the shortcut > as undefined in case of an empty command, and not falling back to en-US. Hossein, mind to test this? Would be the safest solution.
(In reply to Heiko Tietze from comment #8) > IIRC, Miklos told me that reserved keys are used for some development > testing. Hm, I can't recall that. I'm afraid I don't know much about those reserved keys, either. Platform-specific reserved keys are ugly.
(In reply to Heiko Tietze from comment #8) > (In reply to Maxim Monastirsky from comment #7) > > These keys are listed as reserved in... > IIRC, Miklos told me that reserved keys are used for some development > testing. > > > > ...we can just set it an empty value to clear the shortcut... > > This actually might work. Looking at the code in > > XCUBasedAcceleratorConfiguration::impl_ts_load we seem to leave the shortcut > > as undefined in case of an empty command, and not falling back to en-US. > > Hossein, mind to test this? Would be the safest solution. Unfortunately this change didn't help. Even removing the whole node didn't change anything, and the shortcut wasn't usable.
My patch https://gerrit.libreoffice.org/c/core/+/152279 got no reply and since I cannot test myself I'm going to abandon it. For dev advice see ESC minutes in https://listarchives.libreoffice.org/global/projects/msg02950.html
A code pointer to start debugging: ImplHandleKeyMsg in vcl/win/window/salframe.cxx