After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 743130 - Can't enter newline/line break into cell text
Can't enter newline/line break into cell text
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: Main System
1.12.x
Other Linux
: Normal normal
: ---
Assigned To: Jody Goldberg
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2015-01-18 16:09 UTC by Tomas Pospisek
Modified: 2015-01-20 19:04 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Tomas Pospisek 2015-01-18 16:09:13 UTC
The Gnumeric documentation says in the chapter "The Types of Cell Elements":

  "The newline character cannot be entered directly but
   must be entered as Alt+Enter."

However, when I do that, then the cell selection jumps to the next cell below the one I'm currently editing and that's it. It's the same behavior no matter if I do my editing in the cell in the spreadsheet or in the "current line field" (I don't know how it's called - it's the one on the top, above the spreadsheet).

Besides Alt-Enter I've also tried Shift-Enter, Alt-Gr Enter, CTRL-Enter and all of those combinations also together with Shift.

Each of those has some effect, but none seems to insert a newline into the cell's text.

My system is XFCE4 under Debian jessie.

The cell has format "Text".

Thanks,
*t
Comment 1 Tomas Pospisek 2015-01-18 17:18:09 UTC
I forgot to note, the Gnumeric version is 1.12.18-1
Comment 2 Andreas J. Guelzow 2015-01-18 21:31:37 UTC
Chances are that you desktop environment is stealing the 'alt' key press.
Which distribution and desktop are you using?
Without starting to edit a cell, when you type 'alt-d', does this trigger the Data menu to pop open?
Did you check the keyboard shortcuts to see whether you are using the alt key to do something special?
Are you using a special input method?
Comment 3 Andreas J. Guelzow 2015-01-18 21:33:18 UTC
Sorry, I missed 'My system is XFCE4 under Debian jessie.' But the other questions are still interesting.

I seem to recall a different user having a similar issue a while back but I am forgetting the details.
Comment 4 Andreas J. Guelzow 2015-01-18 21:37:52 UTC
We used to have a bug where this did not work with num-lock on but htat was fixed years ago.
Comment 5 Andreas J. Guelzow 2015-01-18 21:46:14 UTC
Please also look at https://bugzilla.gnome.org/show_bug.cgi?id=597295
If you run xev and try out alt-enter, do you see the events shown in that bug report by Morten?
Comment 6 Tomas Pospisek 2015-01-19 17:03:12 UTC
If merged all your (Andreas') comments and am replying to each of your questions:

On Sun, 18 Jan 2015, Gnumeric wrote:

> --- Comment #2 from Andreas J. Guelzow <aguelzow@pyrshep.ca> 2015-01-18 21:31:37 UTC ---
> Chances are that you desktop environment is stealing the 'alt' key press.
> Which distribution and desktop are you using?

Debian jessie, XFCE4, v4.10.1

> Without starting to edit a cell, when you type 'alt-d', does this trigger the
> Data menu to pop open?

Here it opens the File Menu (because File is "/D/atei" in german) - but I
think this answers what you aim to.

> Did you check the keyboard shortcuts to see whether you are using the alt key
> to do something special?

In XFCE's shortcuts settings (under the keyboard settings) I didn't
find either 'Alt' or 'Alt-Enter' assigned to anything.

> Are you using a special input method?

It's a "plain" Swiss keyboard setting. I have the following special
settings:

* Caps-Lock is configured to switch the keyboard to Czech keyboard to
  allow me to enter characters like 'š', 'č' and so forth.
* Alt-Gr-F12 is set to open Gnote
* I have the following setting in xorg:
  # let CTRL-left, right etc. on the numpad behave as expected
  #
  # see https://forums.freebsd.org/threads/numpad-keys-as-the-same-non-numpad-keys.27389/
  #
  # part of this file generated with Xorg -configure
  Section "InputDevice"
     Identifier     "Keyboard0"
     Driver      "kbd"
     Option         "XkbOptions" "numpad:microsoft"
  EndSection

  The idea here is to make the Numpad allway behave like the cursors...

> We used to have a bug where this did not work with num-lock on but htat
> was fixed years ago.

Mhh - maybe reappearing?

> Please also look at https://bugzilla.gnome.org/show_bug.cgi?id=597295
> If you run xev and try out alt-enter, do you see the events shown in
> that bug report by Morten?

This is what xev gives me:

KeyPress event, serial 37, synthetic NO, window 0x3600001,
    root 0x95, subw 0x0, time 44542173, (-270,173), root:(441,538),
    state 0x2000, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyPress event, serial 37, synthetic NO, window 0x3600001,
    root 0x95, subw 0x0, time 44542704, (-270,173), root:(441,538),
    state 0x2008, keycode 36 (keysym 0xff0d, Return), same_screen YES,
"   XLookupString gives 1 bytes: (0d) "
"   XmbLookupString gives 1 bytes: (0d) "
    XFilterEvent returns: False

KeyRelease event, serial 37, synthetic NO, window 0x3600001,
    root 0x95, subw 0x0, time 44542810, (-270,173), root:(441,538),
    state 0x2008, keycode 36 (keysym 0xff0d, Return), same_screen YES,
"   XLookupString gives 1 bytes: (0d) "
    XFilterEvent returns: False

KeyRelease event, serial 37, synthetic NO, window 0x3600001,
    root 0x95, subw 0x0, time 44543012, (-270,173), root:(441,538),
    state 0x2008, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyPress event, serial 37, synthetic NO, window 0x3600001,
    root 0x95, subw 0x0, time 44546734, (-270,173), root:(441,538),  
    state 0x2000, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes:  
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

I think the last Alt_L is me switching back into the terminal with Alt-Tab
in order to terminate xev.

Thanks Andreas - let me know if there's something else I can do.
*t

PS: I left the status of the bug report on "NEEDINFO". Please do change as appropriate.
Comment 7 Andreas J. Guelzow 2015-01-20 06:03:45 UTC
Hmm,

I tried the XFCE desktop under Linux mint 16 and everything seems to work fine. The only real difference I see is that the state for you is 0x2008 and for me is 0x18 (both in cinnamon and xfce).
Comment 8 Morten Welinder 2015-01-20 15:51:53 UTC
That 0x2000 bit will do it.  It's this one, if my count is right:

  GDK_MODIFIER_RESERVED_13_MASK  = 1 << 13,

We need to have a work with gnumeric_filter_modifiers.  It clears a set
of bits.  It probably needs to clear everything except a set of known
bits.
Comment 9 Morten Welinder 2015-01-20 16:00:19 UTC
This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report.
Comment 10 Tomas Pospisek 2015-01-20 19:04:41 UTC
Wow Morten!

I have applied just this commit of yours [1] to Debian's sources of Gnumeric and installed and tested the resulting Debian package and indeed your patch fixes the problem. The bugreport and request for inclusion are here [2].

A biiig thank you to you Morten and Andreas for taking the time and fixing this!

Thanks,
*t

[1] https://git.gnome.org/browse/gnumeric/commit/?id=c6429a6231c701cf7a1c62675546e8b5142b367b
[2] http://bugs.debian.org/775858