Bug 145138 - Non breaking space not inserted from keyboard shortcut
Summary: Non breaking space not inserted from keyboard shortcut
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.2.7.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-14 16:35 UTC by Russell Almond
Modified: 2023-07-05 15:11 UTC (History)
3 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 Russell Almond 2021-10-14 16:35:30 UTC
Description:
I'm trying to insert a non-breaking space in my document.  I can do this using the menu selection Insert > Formatting Mark > Insert Non-breaking Space

But, when I try the advertised keyboard shortcut CTRL+SHIFT+Space, it has no apparent effect.  I also tried mapping CTRL+Space to insert non-breaking space in case some other program was stealing the CTRL+SHIFT+Space event, but no luck.


Steps to Reproduce:
1.Open a document and start typing.
2.Press any printable character, followed by CTRL+SHIFT+SPACE, followed by another printable character


Actual Results:
ab

Expected Results:
a b


Reproducible: Always


User Profile Reset: Yes


OpenGL enabled: Yes

Additional Info:
Version: 7.1.6.2 / LibreOffice Community
Build ID: 10(Build:2)
CPU threads: 12; OS: Linux 5.13; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Ubuntu package version: 1:7.1.6-0ubuntu0.21.04.1
Calc: threaded
OS is Pop_OS 21.10 (Ubuntu variant)
Comment 1 V Stuart Foote 2021-10-14 18:09:11 UTC
Can not confirm on Windows builds 7.2.2 or recent trunk/7.3.0

The <Ctrl>+<Shfit>+<Space> inserts the U+00a0 NO-BREAK SPACE [NBSP] glyph.

The .uno:InsertNonBreakingSpace control is mapped to shortcut and functions.
Comment 2 bitasta.b 2021-11-11 15:40:11 UTC
Not an issue for Version: 6.4.7.2 Build ID: 1:6.4.7-0ubuntu0.20.04.1
Comment 3 Dieter 2022-12-25 03:57:26 UTC
Rüssel, can you still reproduce the problem in an actual version of LO?
=> NEEDINFO
Comment 4 QA Administrators 2023-06-24 03:14:36 UTC Comment hidden (obsolete)
Comment 5 Russell Almond 2023-06-26 15:39:49 UTC
The problem still occurs for me.  I'm running under Pop_OS 22.04.  I'm using the version of Libre Office from the Debian -> Ubuntu -> Pop_OS chain.

Here is my current version.

Version: 7.3.7.2 / LibreOffice Community
Build ID: 30(Build:2)
CPU threads: 12; OS: Linux 6.2; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Ubuntu package version: 1:7.3.7-0ubuntu0.22.04.3
Calc: threaded

In the customize dialog, I see that Shift+Ctrl+Space is bound to "Insert non-breaking space" as expected.


I do not have any settings in my gnome keybindings which should interfere.
```
base) [ralmond@cherry: bin]$ gsettings list-recursively org.gnome.desktop.wm.keybindings
org.gnome.desktop.wm.keybindings activate-window-menu ['<Alt>space']
org.gnome.desktop.wm.keybindings always-on-top @as []
org.gnome.desktop.wm.keybindings begin-move ['<Alt>F7']
org.gnome.desktop.wm.keybindings begin-resize ['<Alt>F8']
org.gnome.desktop.wm.keybindings close ['<Alt>F4', '<Super>q']
org.gnome.desktop.wm.keybindings cycle-group ['<Alt>F6']
org.gnome.desktop.wm.keybindings cycle-group-backward ['<Shift><Alt>F6']
org.gnome.desktop.wm.keybindings cycle-panels ['<Control><Alt>Escape']
org.gnome.desktop.wm.keybindings cycle-panels-backward ['<Shift><Control><Alt>Escape']
org.gnome.desktop.wm.keybindings cycle-windows ['<Alt>Escape']
org.gnome.desktop.wm.keybindings cycle-windows-backward ['<Shift><Alt>Escape']
org.gnome.desktop.wm.keybindings lower @as []
org.gnome.desktop.wm.keybindings maximize @as []
org.gnome.desktop.wm.keybindings maximize-horizontally @as []
org.gnome.desktop.wm.keybindings maximize-vertically @as []
org.gnome.desktop.wm.keybindings minimize @as []
org.gnome.desktop.wm.keybindings move-to-center @as []
org.gnome.desktop.wm.keybindings move-to-corner-ne @as []
org.gnome.desktop.wm.keybindings move-to-corner-nw @as []
org.gnome.desktop.wm.keybindings move-to-corner-se @as []
org.gnome.desktop.wm.keybindings move-to-corner-sw @as []
org.gnome.desktop.wm.keybindings move-to-monitor-down @as []
org.gnome.desktop.wm.keybindings move-to-monitor-left @as []
org.gnome.desktop.wm.keybindings move-to-monitor-right @as []
org.gnome.desktop.wm.keybindings move-to-monitor-up @as []
org.gnome.desktop.wm.keybindings move-to-side-e @as []
org.gnome.desktop.wm.keybindings move-to-side-n @as []
org.gnome.desktop.wm.keybindings move-to-side-s @as []
org.gnome.desktop.wm.keybindings move-to-side-w @as []
org.gnome.desktop.wm.keybindings move-to-workspace-1 ['<Super><Shift>Home']
org.gnome.desktop.wm.keybindings move-to-workspace-10 @as []
org.gnome.desktop.wm.keybindings move-to-workspace-11 @as []
org.gnome.desktop.wm.keybindings move-to-workspace-12 @as []
org.gnome.desktop.wm.keybindings move-to-workspace-2 @as []
org.gnome.desktop.wm.keybindings move-to-workspace-3 @as []
org.gnome.desktop.wm.keybindings move-to-workspace-4 @as []
org.gnome.desktop.wm.keybindings move-to-workspace-5 @as []
org.gnome.desktop.wm.keybindings move-to-workspace-6 @as []
org.gnome.desktop.wm.keybindings move-to-workspace-7 @as []
org.gnome.desktop.wm.keybindings move-to-workspace-8 @as []
org.gnome.desktop.wm.keybindings move-to-workspace-9 @as []
org.gnome.desktop.wm.keybindings move-to-workspace-down @as []
org.gnome.desktop.wm.keybindings move-to-workspace-last ['<Super><Shift>End']
org.gnome.desktop.wm.keybindings move-to-workspace-left @as []
org.gnome.desktop.wm.keybindings move-to-workspace-right @as []
org.gnome.desktop.wm.keybindings move-to-workspace-up @as []
org.gnome.desktop.wm.keybindings panel-main-menu @as []
org.gnome.desktop.wm.keybindings panel-run-dialog ['<Alt>F2']
org.gnome.desktop.wm.keybindings raise @as []
org.gnome.desktop.wm.keybindings raise-or-lower @as []
org.gnome.desktop.wm.keybindings set-spew-mark @as []
org.gnome.desktop.wm.keybindings show-desktop @as []
org.gnome.desktop.wm.keybindings switch-applications ['<Super>Tab', '<Alt>Tab']
org.gnome.desktop.wm.keybindings switch-applications-backward ['<Shift><Super>Tab', '<Shift><Alt>Tab']
org.gnome.desktop.wm.keybindings switch-group ['<Super>Above_Tab', '<Alt>Above_Tab']
org.gnome.desktop.wm.keybindings switch-group-backward ['<Shift><Super>Above_Tab', '<Shift><Alt>Above_Tab']
org.gnome.desktop.wm.keybindings switch-input-source ['<Super>space', 'XF86Keyboard']
org.gnome.desktop.wm.keybindings switch-input-source-backward ['<Shift><Super>space', '<Shift>XF86Keyboard']
org.gnome.desktop.wm.keybindings switch-panels ['<Control><Alt>Tab']
org.gnome.desktop.wm.keybindings switch-panels-backward ['<Shift><Control><Alt>Tab']
org.gnome.desktop.wm.keybindings switch-to-workspace-1 ['<Super>Home']
org.gnome.desktop.wm.keybindings switch-to-workspace-10 @as []
org.gnome.desktop.wm.keybindings switch-to-workspace-11 @as []
org.gnome.desktop.wm.keybindings switch-to-workspace-12 @as []
org.gnome.desktop.wm.keybindings switch-to-workspace-2 @as []
org.gnome.desktop.wm.keybindings switch-to-workspace-3 @as []
org.gnome.desktop.wm.keybindings switch-to-workspace-4 @as []
org.gnome.desktop.wm.keybindings switch-to-workspace-5 @as []
org.gnome.desktop.wm.keybindings switch-to-workspace-6 @as []
org.gnome.desktop.wm.keybindings switch-to-workspace-7 @as []
org.gnome.desktop.wm.keybindings switch-to-workspace-8 @as []
org.gnome.desktop.wm.keybindings switch-to-workspace-9 @as []
org.gnome.desktop.wm.keybindings switch-to-workspace-down ['<Primary><Super>Down', '<Primary><Super>KP_Down', '<Primary><Super>j']
org.gnome.desktop.wm.keybindings switch-to-workspace-last ['<Super>End']
org.gnome.desktop.wm.keybindings switch-to-workspace-left @as []
org.gnome.desktop.wm.keybindings switch-to-workspace-right @as []
org.gnome.desktop.wm.keybindings switch-to-workspace-up ['<Primary><Super>Up', '<Primary><Super>KP_Up', '<Primary><Super>k']
org.gnome.desktop.wm.keybindings switch-windows @as []
org.gnome.desktop.wm.keybindings switch-windows-backward @as []
org.gnome.desktop.wm.keybindings toggle-above @as []
org.gnome.desktop.wm.keybindings toggle-fullscreen @as []
org.gnome.desktop.wm.keybindings toggle-maximized ['<Super>m']
org.gnome.desktop.wm.keybindings toggle-on-all-workspaces @as []
org.gnome.desktop.wm.keybindings toggle-shaded @as []
org.gnome.desktop.wm.keybindings unmaximize @as []
```

I'm not seeing any other process grab the shortcut.

Here is an excerpt from the log after running:
```
xdotool keydown Ctrl+shift+space; xdotool key XF86LogGrabInfo; xdotool keyup ctrl+shift+space
```

```
un 26 11:22:15 cherry /usr/libexec/gdm-x-session[3240]:   grab 0x46c00015 (core), type 'KeyPress' on window 0x1e0
Jun 26 11:22:15 cherry /usr/libexec/gdm-x-session[3240]:     detail 39 (mask 0), modifiersDetail 155 (mask 0)
Jun 26 11:22:15 cherry /usr/libexec/gdm-x-session[3240]:     device 'Virtual core keyboard' (3), modifierDevice 'Virtual core keyboard' (3)
Jun 26 11:22:15 cherry /usr/libexec/gdm-x-session[3240]:     core event mask 0x3
Jun 26 11:22:15 cherry /usr/libexec/gdm-x-session[3240]:     owner-events false, kb 1 ptr 1, confine 0x0, cursor 0x0
```
Comment 6 Russell Almond 2023-07-05 15:11:42 UTC
I figured out what the problem was.  The problem was not occurring on my laptop (which essentially the same setup).  Apparently, something in my gnome configuration was grabbing the keystroke and not sending it to LibreOffice.

I went in with gnome-tweaks 
Under Keyboard & Mouse I selected Additional Layout Options
Under `Key ... 3rd level` I selected `Right Ctrl`
 (not sure if this one was necessary).
Under `Non-breaking space input`, I selected `Non-breaking space at the 4th level`.

Now the Ctrl+Shift+Space sequence seems to be generating a non-breaking space.

Hopefully this will be useful to somebody else experiencing this problem.