octave-maintainers
[Top][All Lists]
Advanced

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

Matlab compatibility for keypressfcn


From: Rik
Subject: Matlab compatibility for keypressfcn
Date: Sat, 18 Apr 2015 15:30:55 -0700

4/18/15

Does anyone know if the callback for keypressfcn is executed when a
modifier key is pressed alone?  I'm debugging problems with ginput() and
have found that Octave will execute the callback for any actual key pressed
including the modifiers like SHIFT and CTRL.  This is rather awkward
because generally the modifiers are part of a key sequence like <CTRL+C>
and the there is no key in the data structure for the first part of the
sequence when CTRL is pressed by itself.

Sample code, if necessary, for testing

In file mycb.m:

function mycb ()
  disp ('mycb called');
end

Then,
figure
set (gcf, 'keypressfcn', @mycb)
%% Now try typing just SHIFT or just CTRL in figure window and see if 'mycb
called' is displayed.

Thanks,
Rik




reply via email to

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