GNOME Bugzilla – Bug 597295
Alt-enter should work with numlock set.
Last modified: 2009-10-19 22:45:33 UTC
In MS Excel you can enter a manual line break inside a cell by pressing Alt-Enter. In OOo you can do it with Ctrl-Enter. In gnumeric you can get a multi-line cell by pasting from another application, but it would be good if Gnumeric could support one or both of these keyboard shortcuts - or is it more of a GTK issue? Perhaps there could even be some sort of entry in the Insert menu as well, as 95% of spreadsheet users don't even know they can have a manual line break inside a cell :)
Alt-Enter should work. (There might be more than one Alt key and they might not all have the same function.)
It doesn't work for me in Gnumeric 1.8.2 on Puppy Linux 4.1.1, with an en-US keyboard in Xorg. If I run xev my alt keys show up as Alt_L and Alt_R, and the enter key shows up as Return. I would have thought this was a fairly standard setup?
This is what works for me: 1. Start gnumeric 2. Press "a", "b", "c". 3. Hold down left Alt key and press Enter. 4. Press "d", "e", "f". 5. Press Enter. What, precisely, are you doing? The relevant events in xev are: KeyPress event, serial 33, synthetic NO, window 0x3800001, root 0x7d, subw 0x3800002, time 145166745, (56,33), root:(59,57), state 0x0, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES, XLookupString gives 0 bytes: XmbLookupString gives 0 bytes: XFilterEvent returns: False KeyPress event, serial 33, synthetic NO, window 0x3800001, root 0x7d, subw 0x3800002, time 145166901, (56,33), root:(59,57), state 0x8, keycode 36 (keysym 0xff0d, Return), same_screen YES, " XLookupString gives 1 bytes: (0d) " " XmbLookupString gives 1 bytes: (0d) " XFilterEvent returns: False
If I do exactly that it doesn't work.
Alsiter, which alignment do you have set for your cells? (THe line break will not work if the horizontal alignment is set to "fill".)
Alister: could you please show the xev messages for the key presses?
KeyPress event, serial 29, synthetic NO, window 0x1c00001, root 0xa0, subw 0x0, time 648596499, (221,65), root:(276,135), state 0x10, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES, XLookupString gives 0 bytes: XmbLookupString gives 0 bytes: XFilterEvent returns: False KeyPress event, serial 29, synthetic NO, window 0x1c00001, root 0xa0, subw 0x0, time 648597461, (221,65), root:(276,135), state 0x18, keycode 36 (keysym 0xff0d, Return), same_screen YES, " XLookupString gives 1 bytes: (0d) " " XmbLookupString gives 1 bytes: (0d) " XFilterEvent returns: False KeyRelease event, serial 29, synthetic NO, window 0x1c00001, root 0xa0, subw 0x0, time 648597614, (221,65), root:(276,135), state 0x18, keycode 36 (keysym 0xff0d, Return), same_screen YES, " XLookupString gives 1 bytes: (0d) " KeyRelease event, serial 29, synthetic NO, window 0x1c00001, root 0xa0, subw 0x0, time 648597769, (221,65), root:(276,135), state 0x18, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES, XLookupString gives 0 bytes:
Oh, I see. It works if I click in the formula bar or double-click on the cell.
Does that mean you're happy with this?
Morten: why would it require him to double click on the cell? If I start typing it inserts the text (and the newlines)... without the need for a double click.
No, it doesn't mean I'm happy with it, but it seems to be related to this bug, which apparently should have been worked on for early 1.9.x versions https://bugzilla.gnome.org/show_bug.cgi?id=337521 The status of that bug is still "New", so I assume it isn't fixed. Maybe I need to try the latest version to check if my bug is still present.
Bug #337521 has nothing to do with functionality: the selection simply does not show inside the cell just in the formula bar. I don't see how that would have anything to do with thisbug.
Oh, I see. It works with Number Lock off, but not with it on. That's pretty bad, because Gnumeric is one of those programs where one tends to use the Number Lock :)
I can replicate this. Retitling.
Is this really "fixed"?
Morten?
Looks like I failed to commit right, but yes, I did fix it. This fix is on another machine, so it will have to wait until tonight.
Created attachment 145789 [details] [review] Reconstructed patch.