Disabling Cntrl+Left Click = Right Click
1 次查看(过去 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!