Check for modifiers when WindowScrollWheelFcn is called

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

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeDesktop についてさらに検索

質問済み:

2018 年 8 月 27 日

編集済み:

2018 年 8 月 27 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by