Check for modifiers when WindowScrollWheelFcn is called
Mostrar comentarios más antiguos
Hi all,
I was wondering if it possible to check if a user has a modifier key (i.e. ctrl or alt) pressed when the WindowScrollWheelFcn is called on a figure?
I want to assign two different behaviours to the WindowScrollWheelFcn depending on whether or not a specific key is pressed.
Here's some pseudo code, to give the general idea what I want.
function fWindowScrollWheelFcn(hObject, eventdata)
modifiers = get(gcf,'currentModifier');
ctrlIsPressed = ismember('control',modifiers);
if ctrIsPressed
% Behaviour #1
else
% Behaviour #2
end
end
When I try this, the get function returns an empty cell array.
Thanks!
Ricardo
Respuestas (0)
Categorías
Más información sobre Desktop en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!