f



Distinguish Shift - click left and Shift - click right

Is there a way to distinguish the SelectionType property in a figure for a Shift - click left and Shift - click right?
Both result in the SelectionType 'Extend'...

Thx
0
Stefan
4/8/2010 12:36:26 PM
comp.soft-sys.matlab 211265 articles. 25 followers. lunamoonmoon (257) is leader. Post Follow

1 Replies
844 Views

Similar Articles

[PageSpeed] 4

"Stefan" <s@m.de> wrote in message <hpkik9$5c3$1@fred.mathworks.com>...
> Is there a way to distinguish the SelectionType property in a figure for a Shift - click left and Shift - click right?
> Both result in the SelectionType 'Extend'...
> 
> Thx

Hi Stefan,

if you are in a callback function you can use this example with small changes, taken from the figure properties

function key_releaseFcn
   figure('KeyReleaseFcn',@cb)
      function cb(src,evnt)
      if ~isempty(evnt.Modifier)
         for ii = 1:length(evnt.Modifier)
            out = sprintf('Character: %c\nModifier: %s\nKey: %s\n',...
					evnt.Character,evnt.Modifier{ii},evnt.Key);
            disp(out)
         end
      else
         out = sprintf('Character: %c\nModifier: %s\nKey: %s\n',...
				evnt.Character,'No modifier key',evnt.Key);
         disp(out)
      end
   end   
end

hth
kinor
0
kinor
4/8/2010 1:52:05 PM
Reply: