bugGNU Octave - Bugs: bug #44833, ginput doesn't correctly process...

 
 

bug #44833: ginput doesn't correctly process shift/ctlr/alt key combinations

Submitted by:  Philip Nienhuis <philipnienhuis>
Submitted on:  Tue 14 Apr 2015 12:31:51 PM UTC  
 
Category:  Plotting with OpenGL Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Regression
Status:  Fixed Assigned to:  Rik <rik5>
Originator Name:  Philip Nienhuis Open/Closed:  Closed
Release:  dev Operating System:  Any

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Sun 19 Apr 2015 03:41:06 AM UTC, comment #5:

After this cset the returned values are now the same as Matlab (http://hg.savannah.gnu.org/hgweb/octave/rev/0b83a442ff78). Fixed and closing report.

Rik <rik5>
Project AdministratorIn charge of this item.
Sat 18 Apr 2015 11:26:42 PM UTC, comment #4:

One difference (probably irrelevant here) is that in MATLAB, if you keep a key pressed, it will trigger the callback over and over for all keys (including Shift, Alt and Ctrl) while in Octave it will do so for alphanumeric keys but will only call the callback once with Shift/Alt/Ctrl.

Guillaume <gyom>
Sat 18 Apr 2015 11:21:31 PM UTC, comment #3:

Shift and Ctrl keys do trigger the keypressfcn callback in MATLAB.

Guillaume <gyom>
Sat 18 Apr 2015 10:33:36 PM UTC, comment #2:

I have a fix for this, but am waiting for a response from a question I asked on the Maintainer's list about how Matlab handles modifier keys.

Rik <rik5>
Project AdministratorIn charge of this item.
Tue 14 Apr 2015 07:44:45 PM UTC, comment #1:

I just tested on Linux -> same issue -> OS set to Any

Philip Nienhuis <philipnienhuis>
Project Member
Tue 14 Apr 2015 12:31:51 PM UTC, original submission:

>> [a, b, c] = ginput (1)
error: ginput_keypressfcn: mx_el_eq: nonconformant arguments (op1 is 1x7, op2
is 1x6)
error: called from
ginput>ginput_keypressfcn at line 130 column 3
ginput at line 81 column 7

fltk / qt makes no difference. Works fine on gnuplot, save Alt-<key>.

Matlab (I just checked on r2014a):
Plain "i" returns 105
Shift-i returns 73
Ctrl-i returns 9
Alt-i returns 105

Octave/gnuplot gives the same as Matlab except Alt-modifier => gnuplot doesn't react to that.

In 3.8.2 this used to work on fltk (hence the "regression"), be it that ginput() there couldn't differentiate e.g., shifted keys: Shift-i still returned 105 for button value, rather than 73
On 3.8.2 ginput() didn't work yet with Qt.

Philip Nienhuis <philipnienhuis>
Project Member

 

(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 gyom (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by philipnienhuis (Submitted the item)
  •  

    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 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-04-19 rik5 StatusIn Progress => Fixed
        Open/ClosedOpen => Closed
    2015-04-18 rik5 StatusNone => In Progress
        Assigned toNone => rik5
    2015-04-14 philipnienhuis Operating SystemMicrosoft Windows => Any

    Back to the top


    Powered by Savane 3.4