how to write code for keyboard inputs

조회 수: 1 (최근 30일)
sameera dissanayake
sameera dissanayake 2015년 6월 27일
댓글: Walter Roberson 2015년 6월 27일
I want write matlab code for some keyboard input.
I have assigned a variable called "P" and want to write codes inside P when P=1 and P=2 and P=3 and P=4.
when P=1 (should be written code for automatically pressing "shift+f5")
when P=2 (should be written code for automatically pressing "esc")
when P=3 (should be written code for automatically pressing "right arrow key")
I have written code for automatically mouse left click event when p=4
if(P==7) % mouse click event
mouse.mousePress(InputEvent.BUTTON1_MASK);
mouse.mouseRelease(InputEvent.BUTTON1_MASK);
end
could you please give me the solution for this
thanks...
  댓글 수: 1
Walter Roberson
Walter Roberson 2015년 6월 27일
Does this have to do with the Java Robot class, or does it have to do with keyboard shortcuts?

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Desktop에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by