Disabling Cntrl+Left Click = Right Click
조회 수: 3 (최근 30일)
이전 댓글 표시
Apparently Matlab evaluates the following events as identical (within a callback function designed to handle mouse buttondown events):
Control + Left click => 'alt'
Right click => 'alt'
They are indistinguishable. Is there any way to have the following operation instead:
Control + Left click = 'normal', just with a control modifier on the figure
Right click = 'alt'?
Thank you!
댓글 수: 0
답변 (1개)
Robert Cumming
2014년 7월 28일
You can use the keypressfcn to register if ctrl is pressed and modify your call back in. I'd mouse button
댓글 수: 2
Robert Cumming
2014년 7월 28일
I'm not near a copy of Matlab just now, but you should be able to use the keypressfcn to register if a key is pressed. Link that with your mouse call back to distinguish the difference between the two modes.
참고 항목
카테고리
Help Center 및 File Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!