bugGNU Octave - Bugs: bug #46661, Disable Ctrl+D instantly closing...

 
 

bug #46661: Disable Ctrl+D instantly closing GUI

Submitter:  Rik <rik5>
Submitted:  Thu 10 Dec 2015 08:52:36 PM UTC
   
 
Category:  GUI Severity:  1 - Wish
Priority:  5 - Normal Item Group:  Feature Request
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Sat 26 Dec 2015 08:41:35 AM UTC, comment #8: 

Changeset
http://hg.savannah.gnu.org/hgweb/octave/rev/f99cbd86a0f9
adds an action with shortcut Ctrl-D to the terminal whenever Ctrl-D is not chosen as shortcut for a global (main window) action.

If Ctrl-D really should close Octave the shortcut has to be configured for the exit-action in the "shortcut" tab of the preferences. It then uses the normal exit path with checking for unsaved editor files.

Torsten Lilge <ttl>
Group Member
Fri 11 Dec 2015 11:11:20 PM UTC, comment #7: 

I disabled Ctrl+D in my .inputrc file (for Readline) with


"\C-d": ""


But this still doesn't work if Ctrl+D is the first character you type on a blank line.  As Mike says, this seems to be related to the Terminal itself.

Rik <rik5>
Group administrator
Fri 11 Dec 2015 10:47:38 PM UTC, comment #6: 

It's actually not even interpreted by readline, it's at the terminal driver level. The terminal settings interpret the Ctrl+D as an EOF character, and the interpreter parser handles the EOF.

You can verify this by running octave with --no-line-editing and Ctrl+D still works.

Also note that it's Ctrl+D only when the input line is empty. So we don't want Octave to exit if I've typed some text and then hit Ctrl+D, that means something else to readline (delete-char by default).

Now we could use some terminal control calls to disable EOF processing, but that might break other things, for example I wonder if digging into that would break how Octave works on file input.


Mike Miller <mtmiller>
Group Member
Fri 11 Dec 2015 10:39:59 PM UTC, comment #5: 

Would it be instead possible to just disable Ctrl-D in Octave's readline? Ctrl-D can then be configured as shortcut for the exit action, if desired.

Torsten Lilge <ttl>
Group Member
Fri 11 Dec 2015 09:08:12 PM UTC, comment #4: 

I think you're right that Ctrl+D should at least go through the ordinary shutdown procedures.  Is it possible for someone to then disable a key shortcut for quit entirely by clearing the key combo in the Shortcuts preference menu?

Rik <rik5>
Group administrator
Fri 11 Dec 2015 08:23:25 PM UTC, comment #3: 

Since Ctrl-D is interpreted as EOF by readline, closing the application is "almost" the expected behavior. This also happens with the cli version when started in a gnome-terminal.
BUT, closing the GUI via Ctrl-D bypasses the normal exit path without any checking of unsaved editor files. I suggest to not remove Ctrl-D but to bind it to the normal exit instead (in addition to the configured shortcut, by default Ctrl-Q).

Torsten Lilge <ttl>
Group Member
Fri 11 Dec 2015 08:14:31 PM UTC, comment #2: 

Wow, I had no idea anybody actually used it.  Maybe I'm the odd one, but I usually use Alt+F4 if I want to close a window immediately.

I'd be obliged if other people post their preferences.  I'm willing to do whatever the majority think is most useful.

Rik <rik5>
Group administrator
Fri 11 Dec 2015 07:54:10 PM UTC, comment #1: 

Just to state another opinion, I use Ctrl+D all the time, removing it will be annoying to my muscle memory, but I can live with it.

Mike Miller <mtmiller>
Group Member
Thu 10 Dec 2015 08:52:36 PM UTC, original submission:  

If you type, or more likely accidentally type, Ctrl+D in the GUI command window then the Octave application immediately shuts down.  I suppose that this is inherited from the Terminal that is embedded in the command window, but it is distinctly unfriendly.  At least in all my true terminal windows I disable this "feature" so that fat fingers don't cause me to lose work.

Rik <rik5>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by ttl (Posted a comment)
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by rik5 (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-12-26 ttl StatusConfirmed Fixed
        Open/ClosedOpen Closed
    2015-12-11 rik5 StatusNone Confirmed
    2015-12-10 rik5 Severity3 - Normal 1 - Wish

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code