octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #56598] ginput does not record key strokes in


From: Marcel Geers
Subject: [Octave-bug-tracker] [bug #56598] ginput does not record key strokes in complex figure
Date: Tue, 9 Jul 2019 05:15:12 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36

URL:
  <https://savannah.gnu.org/bugs/?56598>

                 Summary: ginput does not record key strokes in complex figure
                 Project: GNU Octave
            Submitted by: mpageers
            Submitted on: Tue 09 Jul 2019 09:15:10 AM UTC
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Unexpected Error
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 5.1.0
        Operating System: Microsoft Windows

    _______________________________________________________

Details:

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.







    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?56598>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]