bugGNU Octave - Bugs: bug #53744, Ctrl keys are not handled in...

 
 

bug #53744: Ctrl keys are not handled in command window with Qt 5.2

Submitted by:  None
Submitted on:  Tue 24 Apr 2018 08:14:12 PM UTC  
 
Category:  GUI Severity:  3 - Normal
Priority:  3 - Low Item Group:  Incorrect Result
Status:  Invalid Assigned to:  None
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  Closed Release:  4.2.2
Operating System:  GNU/Linux

Add a New Comment (Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

( Jump to the original submission)

Mon 30 Apr 2018 06:26:31 PM UTC, comment #19: 

If someone feels that this bug still affects Octave's current stable or default branches, this bug can be reopened. If someone has the time or interest to go to an Ubuntu 14.04 system and build a current version of Octave and is able to reproduce this, and maybe even provide a fix, then the bug can always be reopened.

Mike Miller <mtmiller>
Project Administrator
Mon 30 Apr 2018 06:22:49 PM UTC, comment #18: 

I don't think we can say 100% that the problem doesn't originate with Octave.  Yes, changing the Qt version may have caused the failure, but the place in which the failure is occurring is third-party QTerminal (or whatever the linux version of the terminal emulation is).  In this case, that QTerminal code is not an import of a secondary source-control repository, such as with gnulib; it's a copy of some code at a certain time stamp.  The possibility exists that the third party software in question may have had an update to fix this Qt4/5 issue but Octave hasn't synched with that code for a while.  It would involve cloning the third party software and diffing against what is in Octave.

Dan Sebald <sebald>
Mon 30 Apr 2018 06:11:02 PM UTC, comment #17: 

This is an upstream bug in Qt.  Closing report.

Rik <rik5>
Project Administrator
Mon 30 Apr 2018 12:19:46 PM UTC, comment #16: 

Mike,

Thank you for confirming this, and the explanation.
I will begin the update process.

Anonymous
Fri 27 Apr 2018 11:48:18 PM UTC, comment #15: 

Ok, I can confirm this with Octave 4.2.2 built with Qt 5.2.1 on Ubuntu 14.04. It looks to me like the qterminal widget does not correctly handle any Ctrl or Meta characters. The arrow keys also do not work correctly. This is on a fresh Ubuntu install with no custom configuration.

From the OP's perspective, this worked correctly in 4.2.1 because 4.2.1 was built with Qt 4, 4.2.2 is built with Qt 5. The change in the Qt version is probably responsible, not any change in Octave between 4.2.1 and 4.2.2.

OP - your best bet to fix this is to upgrade your operating system to a more recent release.

If someone wants to investigate this further, it would be worth seeing if the current stable or development branches built on Ubuntu 14.04 or Mint 17 with Qt 5 behave the same. Then maybe something can be done to make the qterminal compatible with Qt 5.2, if that's the issue.

Mike Miller <mtmiller>
Project Administrator
Fri 27 Apr 2018 08:37:10 PM UTC, comment #14: 

I like the line of investigation that the windowing system as a whole may be ignoring the Ctrl key.

Is the original reporter working in a different locale besides 'en_US' or 'C'?

Is there an alternative input module like skim installed?

What windowing system are you using (GNOME, KDE, etc.).

Rik <rik5>
Project Administrator
Fri 27 Apr 2018 07:52:51 PM UTC, comment #13: 

Ok, so you are running Trisquel 7, and you are installing the Octave binary packages from the PPA for Ubuntu 14.04 LTS (which I maintain and build). That all seems fine. This version of Octave 4.2.2 is compiled with Qt 5, not Qt 4. Doesn't matter what your version of qmake is.

Someone might want to see if they can reproduce this in Ubuntu 14.04 or Mint 17 or Trisquel 7, with the ppa:octave/stable added and Octave 4.2.2-1~octave~trusty4 installed.

If any Ctrl+letter only prints a letter to the command window, that seems like something globally ignoring the Ctrl key, not a readline problem.

Mike Miller <mtmiller>
Project Administrator
Fri 27 Apr 2018 07:43:06 PM UTC, comment #12: 

Thanks everyone for your responses.

Mike

>> version
ans = 4.2.2
>> __have_feature__ QT
ans = 1
>> __have_feature__ QT4
ans = 0
>> __have_feature__ QT5
ans = 1

How do I get the exact octave version?
OS

 3.13.0-141-lowlatency #190+7.0trisquel2

It appears I can upgrade the OS to 8.0 should I do this and see if it fixes the issue?

Ctrl+a gives just an a.
None of those control sequences work they just give the letter.
Ctrl+v does paste and Ctrl+c does exit the command.

~/Desktop$ qmake --version
QMake version 2.01a
Using Qt version 4.8.6 in /usr/lib/x86_64-linux-gnu

Dan,

When I do

apt-get changelog octave | less
Err Changelog for octave (http://packages.trisquel.info/changelogs/pool/main/o/octave/octave_4.2.2-1~octave~trusty4/changelog)
  Temporary failure resolving 'packages.trisquel.info'
Err Changelog for octave (http://ppa.launchpad.net/octave/stable/ubuntu/pool/main/o/octave/octave_4.2.2-1~octave~trusty4.changelog)
  Temporary failure resolving 'ppa.launchpad.net'
E: changelog for this version is not (yet) available; try https://launchpad.net/ubuntu/+source/octave/+changelog

There is no difference if I use sudo.

Anonymous
Thu 26 Apr 2018 07:12:24 PM UTC, comment #11: 

I think a lot more information is needed here if someone wants to see whether this is a bug or a local configuration issue.

OP - you said you updated Octave with apt. What is the exact package version of octave now installed on your system? What is your OS distribution and version?

What do the following return at the Octave prompt:

__have_feature__ QT
__have_feature__ QT4
__have_feature__ QT5

You said in the original post that "Instead the letter is just typed". What do you mean by that? When you type Ctrl+A, do you get "a"? Do you get "A"? Do you get "^A"? When you type Ctrl+Q Ctrl+A, do you get "^A"?

Do other Ctrl key sequences work? Does Ctrl+D delete the following character? Does Ctrl+W erase the previous word? Do Ctrl+B and Ctrl+F move the cursor backwards and forwards one character?

Mike Miller <mtmiller>
Project Administrator
Thu 26 Apr 2018 06:40:10 PM UTC, comment #10: 

Maybe this is something specific to Qt4?  Most developers and distributions are building with Qt5 now.

Changing the priority to low since there is a workaround.

Rik <rik5>
Project Administrator
Thu 26 Apr 2018 05:42:41 PM UTC, comment #9: 

I meant:

Maybe try something like

apt-get changelog octave | less

and copy, say, the most recent two pages worth of history.  Place a

+ verbatim +
<copy a screen or two of most recent activity from "less">
- verbatim -

where there should be no space betwen the + or - and "verbatim".  Use the "Preview" button to verify what you copied appears in a yellow box, formatting intact.

Dan Sebald <sebald>
Thu 26 Apr 2018 03:30:38 PM UTC, comment #8: 

OK, so it sounds like a Qt key-bindings issue then and not some lost QTerminal functionality.  I'd say don't necessarily close this.  Clearly it is something that should be functioning.

Could you give more specific detail about the platform and build?  We might find someone who is using the same bundle as you and can somehow get the version you have.  Maybe try something like

apt-get changelog octave | less

Dan Sebald <sebald>
Thu 26 Apr 2018 09:09:13 AM UTC, comment #7: 

Rik,

There was no change when I added the ~/.inputrc file

Dan,

Yes, the home and end function keys do work (did not think of this). So this is a work around.

Where does the config.log file reside?
++
/usr/share/octave$ find . -name 'config*'
./4.2.2/m/pkg/private/configure_make.m
--

I know I have
Using Qt version 4.8.6 in /usr/lib/x86_64-linux-gnu

Since there is a work around I think this can be closed.

Thanks again for all your help

Anonymous
Wed 25 Apr 2018 12:40:17 AM UTC, comment #6: 

As another test, add a file to your home directory ~/.inputrc.  In that file, put this line

set editing-mode emacs

This will force emacs bindings for Readline.

Rik <rik5>
Project Administrator
Wed 25 Apr 2018 12:25:45 AM UTC, comment #5: 

What version of Qt is your system building with?  E.g., use grep on the config.log file:

build1 # grep "Qt GUI" config.log
  Build Octave Qt GUI:                  yes (version: 5)

Also, do the "Home" and "End" keys still function similar to what the Ctrl+A and Ctrl+E keys are expected to do?

Dan Sebald <sebald>
Tue 24 Apr 2018 11:49:49 PM UTC, comment #4: 

Thanks everyone for looking into this:

Dan,

This is the GUI the Command Window part.
octave-cli works.

Rik,
Yes the box is checked see attached. Tried un-ckecking box,closing then reopening, checking the box. Same issue

Mike,
All I did was an apt-get update, and I noticed this. Note for regular terminal (not Octave) the bindings work as expected.
So I do not know where this could be.


Anonymous
Tue 24 Apr 2018 09:08:02 PM UTC, comment #3: 

Also, Look at Edit->Preferences->Shortcuts Tab.  Is the box checked next to "Disable global shortcuts when terminal window has focus"?

If it isn't, try checking it.

Rik <rik5>
Project Administrator
Tue 24 Apr 2018 08:43:12 PM UTC, comment #2: 

Ctrl+A and Ctrl+E also work for me with Octave 4.2.2.

These keybindings are configured through the readline library, it's possible something has changed in your system or user readline configuration to disable these bindings.

Mike Miller <mtmiller>
Project Administrator
Tue 24 Apr 2018 08:40:45 PM UTC, comment #1: 

Ctrl+A and Ctrl+E appear to work for linux development version, both octave-cli and octave GUI.  Are you referring to the GUI or command-line-interface?  The screenshot is of the GUI or CLI?

Dan Sebald <sebald>
Tue 24 Apr 2018 08:14:12 PM UTC, original submission:  

After upgrading
The Ctrl+A and Ctrl+E in the command window no longer go to the front or end. Instead the letter is just typed.

Note this worked in version 4.2.1

Also there is a white | which is two spaces after my cursor.
See attached.

Anonymous

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #44014:  Checked.png added by None (37KiB - image/png)
file #44012:  Octave_cursor.png added by None (1KiB - image/png)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by sebald (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

     

     

    Follow 11 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-04-30 rik5 StatusConfirmed => Invalid
        Open/ClosedOpen => Closed
    2018-04-27 mtmiller CategoryInterpreter => GUI
        StatusWorks For Me => Confirmed
        SummaryCtrl A and Ctrl E do not work => Ctrl keys are not handled in command window with Qt 5.2
    2018-04-26 rik5 Priority5 - Normal => 3 - Low
        Item GroupNone => Incorrect Result
    2018-04-24 None Attached File- => Added Checked.png, #44014
    2018-04-24 mtmiller CategoryNone => Interpreter
        StatusNone => Works For Me
    2018-04-24 None Attached File- => Added Octave_cursor.png, #44012

    Back to the top


    Powered by Savane 3.5