how to get keyboard in matlab

26 views (last 30 days)
bo peng
bo peng on 12 Oct 2020
Answered: Walter Roberson on 14 May 2021
I donot want to use UIFigure to get keyboard input. I need a function that looks like key = getKeyPress(),key = z when I press "z" on the keyboard.Do you know?
  3 Comments
Adam Danz
Adam Danz on 13 May 2021
Would you want to use a regular figure instead of a uifigure or are you trying to avoid using any figure at all?
bo peng
bo peng on 14 May 2021
i want not to use any figure.

Sign in to comment.

Answers (2)

Fangjun Jiang
Fangjun Jiang on 14 Oct 2020
use function input()?
  2 Comments
bo peng
bo peng on 13 May 2021
input function can only monitor limit input, java robot class is a good choice
bo peng
bo peng on 13 May 2021
please use java.awt.robot to monitor event

Sign in to comment.


Walter Roberson
Walter Roberson on 14 May 2021
psychtoolbox http://psychtoolbox.org/ has several input methods that do not require use of figures to receive typing.

Categories

Find more on Interactive Control and Callbacks in Help Center and File Exchange

Products


Release

R2020b

Community Treasure Hunt

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

Start Hunting!