From: Stefan on 8 Apr 2010 08:36 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
From: kinor on 8 Apr 2010 09:52 "Stefan" <s(a)m.de> wrote in message <hpkik9$5c3$1(a)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
|
Pages: 1 Prev: Setting output decimal precision Next: simulated annealing |