Clear Filters
Clear Filters

WindowKeyPressFcn removes focus from figure when multiple figures are open

1 view (last 30 days)
I wrote a function for stepping through individual plot lines within an axes using the arrow keys, which I then place in the figure's WindowKeyPressFcn (a bit similar to what was done here: It works as long as only one figure is open that uses this functionality. As soon as I open a second figure which has the same WindowKeyPressFcn, multiple key presses don't work because the focus seems to the lost after a key press. So I have to do the key press, click the figure to regain focus, key-press, click, ... which isn't really comfortable.
Does anyone know what's happening there and how I could prevent the focus-losing? Thanks in advance for any help!

Answers (0)


Find more on Graphics Performance in Help Center and File Exchange


Community Treasure Hunt

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

Start Hunting!