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 597295 - Alt-enter should work with numlock set.
Alt-enter should work with numlock set.
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: General
git master
Other Linux
: Normal enhancement
: ---
Assigned To: Jody Goldberg
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2009-10-04 13:00 UTC by Alister
Modified: 2009-10-19 22:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Reconstructed patch. (884 bytes, patch)
2009-10-19 15:11 UTC, Morten Welinder
none Details | Review

Description Alister 2009-10-04 13:00:41 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 :)
Comment 1 Morten Welinder 2009-10-04 13:05:00 UTC
Alt-Enter should work.  (There might be more than one Alt key and they
might not all have the same function.)
Comment 2 Alister 2009-10-04 13:12:24 UTC
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?
Comment 3 Morten Welinder 2009-10-04 15:36:54 UTC
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
Comment 4 Alister 2009-10-05 04:49:06 UTC
If I do exactly that it doesn't work.
Comment 5 Andreas J. Guelzow 2009-10-05 12:21:28 UTC
Alsiter, which alignment do you have set for your cells? (THe line break will not work if the horizontal alignment is set to "fill".)
Comment 6 Morten Welinder 2009-10-05 12:43:19 UTC
Alister: could you please show the xev messages for the key presses?
Comment 7 Alister 2009-10-05 20:44:14 UTC
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:
Comment 8 Alister 2009-10-05 20:47:22 UTC
Oh, I see.
It works if I click in the formula bar or double-click on the cell.
Comment 9 Morten Welinder 2009-10-06 23:58:50 UTC
Does that mean you're happy with this?
Comment 10 Andreas J. Guelzow 2009-10-07 00:56:13 UTC
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.
Comment 11 Alister 2009-10-07 05:04:00 UTC
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.
Comment 12 Andreas J. Guelzow 2009-10-07 05:35:03 UTC
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.
Comment 13 Alister 2009-10-16 04:40:55 UTC
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 :)
Comment 14 Andreas J. Guelzow 2009-10-16 22:14:06 UTC
I can replicate this. Retitling.
Comment 15 Andreas J. Guelzow 2009-10-19 06:19:59 UTC
Is this really "fixed"?
Comment 16 Alister 2009-10-19 11:03:27 UTC
Morten?
Comment 17 Morten Welinder 2009-10-19 12:32:07 UTC
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.
Comment 18 Morten Welinder 2009-10-19 15:11:26 UTC
Created attachment 145789 [details] [review]
Reconstructed patch.