I am trying to use the CurrentCharacter property in matlab but I don't know how it works. Could somebody give me an example? I have tried to use get(gcf,'CurrentCharacter');
From MATLAB documentation:
CurrentCharacter
single character
Last key pressed. MATLAB sets this property to the last key pressed in the figure window. Use CurrentCharacter to obtain user input.
I'm not sure how you're intending to use it, but here's a simple way to demonstrate it;;
kkey = get(gcf,'CurrentCharacter')
in your command windowBy doing this you set kkey
to the first character you typed while your figure window was active.