Unbind Space-Bar from repeating last command in Appdesigner

1 view (last 30 days)
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.

Answers (0)

Categories

Find more on Introduction to Installation and Licensing in Help Center and File Exchange

Products


Release

R2018b

Community Treasure Hunt

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

Start Hunting!