I recently saw that matworks implement KeyPressfcn in the app designer. I was trying to explore a bit and do a keystroke recognition program but unfortunately I tried something that I could not solve. First I just added a callback to KeyPressFcn. The idea is to hit any button and assign it to the base workspace.
function UIFigureKeyPress(app, event)
app.key = event.Key;
Extending the program, I tried to put this recognition inside the loop, so the recognition only occurs when the button is pushed.
function StartStopButtonValueChanged(app, event)
app.button = app.StartStopButton.Value;
while app.button == 1
since the program gets stuck in the loop, I can not use the other function. Question is: how can I open the other function in parallel or call the other function inside the loop?
I've tried a lot of thins and even lost the north and the creativity trying to make it work. Could someone help me by giving me the light on how should I call the loop or how can I make the recognition work only when the button pushed?
I'm already grateful,