Unbind Space-Bar from repeating last command in Appdesigner

1 visualización (últimos 30 días)
Jannik Mötsch
Jannik Mötsch el 24 de Sept. de 2019
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.

Respuestas (0)

Categorías

Más información sobre Introduction to Installation and Licensing en Help Center y File Exchange.

Productos


Versión

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by