bugGNU Octave - Bugs: bug #56598, ginput does not record key strokes...

 
 

bug #56598: ginput does not record key strokes in complex figure

Submitted by:  Marcel Geers <mpageers>
Submitted on:  Tue 09 Jul 2019 09:15:10 AM UTC  
 
Category:  Plotting with OpenGL Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  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.

 

Wed 10 Jul 2019 12:32:57 AM UTC, comment #5: 

Verified that fix works on the development branch.  As Pantxo noted, this will be a part of the 6.1 release of Octave.  You will need to build from development sources to see it earlier.

Rik <rik5>
Project Administrator
Tue 09 Jul 2019 09:24:39 PM UTC, comment #4: 

If you don't have a dev version of Octave you can't do anything more. I marked the bug "Ready for Test" so that someone with a dev version can confirm the bug is fixed. My test case was:

clf ();
axes ("parent", uipanel ())
plot (1:10)
[x y btn_or_charcode] = ginput ()
## Now check that btn_or_charcode is correct by clicking
## and typing characters while the figure has focus.
## Finish guinput using the "return" key

Pantxo Diribarne <pantxo>
Project Member
Tue 09 Jul 2019 09:14:37 PM UTC, comment #3: 

Thank you for the swift response Anonymous and Pantxo. I'm not in a position to beta test these changes, is there anything needed for me regarding this report?

Anonymous
Tue 09 Jul 2019 07:17:03 PM UTC, comment #2: 

I pushed the following cset to default, and the fix will be part of Octave 6.1:

http://hg.savannah.gnu.org/hgweb/octave/rev/9b8903d3e626

Marking ready for test.

Pantxo Diribarne <pantxo>
Project Member
Tue 09 Jul 2019 11:29:04 AM UTC, comment #1: 

I am not sure I understand correctly the issue you describe, but using the following simple example, I can confirm that the Return key won't stop the execution of ginput.

clf ();
axes ("parent", uipanel ())
plot (1:10)
x = ginput ()

Anonymous
Tue 09 Jul 2019 09:15:10 AM UTC, original submission:  

I have the following piece of code, which basically keeps gathering clicks until the enter button is clicked and ginput returns an empty array as output. The button check allows me to easily add additional functionality for specific keystrokes.

figure(1)
while ~isempty(button) && any(button == [1,2,3])
   [x,y,button] = ginput(1);
   if button == 1
    disp(do something)
   end
   %etc.
end

This code works perfectly stand-alone. However, I have a GUI where ginput seems to return the x,y coordinates perfectly for the options button = 1, 2 and 3 (the mouse buttons), however, it does not detect any keyboard input. The GUI consists of several panels with one of them holding an axes.

My guess is that the keystrokes ends up "on a different object" than the axes, thus preventing ginput from detecting it? I do not know much about graphics handling, forgive me if my interpretation is premature.

The code does work in Matlab 2019a.

Marcel Geers <mpageers>

 

(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 rik5 (Posted a comment)
  • -email is unavailable- added by pantxo (Posted a comment)
  • -email is unavailable- added by mpageers (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 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-07-10 rik5 StatusReady For Test => Fixed
        Open/ClosedOpen => Closed
        Release5.1.0 => dev
    2019-07-09 pantxo CategoryOctave Function => Plotting with OpenGL
        Item GroupUnexpected Error => Incorrect Result
        StatusNone => Ready For Test
        Operating SystemMicrosoft Windows => Any

    Back to the top


    Powered by Savane 3.5