Interpretation of Key field in keypress callback event data
Mostrar comentarios más antiguos
In my code I'm using the KeyPressFcn callback of a figure to react to user input. However, I'm not sure how to interpret the Key field of the event data correctly in some cases.
For example, if I hit the # key (qwertz keyboard), I get a Key value of '0' in older versions of MATLAB. In R2025a I get '3'. This however seems to correspond to the key on a US qwerty keyboard.
Is there any information on how to interpret the Key field correctly? And have there been changes in R2025a I'm not aware of?
3 comentarios
Rik
el 11 de Jul. de 2025
The documentation is very sparse, but it doesn't look to me like this is intended. Since R2025a introduces may interface changes, perhaps this is a bug where Mathworks didn't include a test to check for a regression. It is not uncommon for companies to only think of checking a single keyboard setting for each script and only think of a single paper dimension set (either the inconsistent mess that is US paper sizes, or only A-sizes).
Michael Liedlgruber
el 11 de Jul. de 2025
Michael Liedlgruber
el 11 de Jul. de 2025
Respuestas (0)
Categorías
Más información sobre Desktop en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!