Unbind Space-Bar from repeating last command in Appdesigner

1 回表示 (過去 30 日間)
Jannik Mötsch
Jannik Mötsch 2019 年 9 月 24 日
In Appdesigner, when you press the space bar, it automatically repeats the last Button you clicked before.
Example: You click on a 'Toggle' button with your mouse -> executes callback. You press Space-Bar -> executes 'Toggle' Button callback again. This is default Apdesigner behaviour.
The problem is that I want to use Space-Bar for something else. I have a callback-function (UIFigureKeyRelease) that executes when you release the key. So if you clicked a button before, it will execute the callback of the Button, not the UIFigureKeyRelease function.
Is there a way to disable this standard behaviour of Space-Bar in Appdesigner? The same actually goes for the Enter key.
The UIFigureKeyRelease callback:
function UIFigureKeyRelease(app, event)
key = event.Key;
switch key
case 'space'
%% code
end
end
Right now, this code only executes after clicking somewhere on the UIFigure that is not a Button.

回答 (0 件)

カテゴリ

Help Center および File ExchangeIntroduction to Installation and Licensing についてさらに検索

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by