GNOME Bugzilla – Bug 743130
Can't enter newline/line break into cell text
Last modified: 2015-01-20 19:04:41 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
I forgot to note, the Gnumeric version is 1.12.18-1
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?
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.
We used to have a bug where this did not work with num-lock on but htat was fixed years ago.
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?
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.
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).
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.
This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report.
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