MOUSEINPUT_TIMEOUT

版本 1.2.0.1 (2.4 KB) 作者: Gautam Vallabha
Captures continuous mouse movements with timeout
3.5K 次下载
更新时间 2016/9/1

查看许可证

MOUSEINPUT_TIMEOUT returns continuous mouse locations with timeout
OUT = MOUSEINPUT_TIMEOUT returns the sequence of mouse locations between a button press and a button release in the current axes. It does not timeout. OUT is an Nx2 matrix, where OUT(1,:) is the location at button press and OUT(END,:) is the location at button release.

OUT = MOUSEINPUT_TIMEOUT(T) times out after a period of T seconds. T can be a fractional value (T=inf indicates no timeout). If the mouse-button has not been pressed during that time, OUT is []. If the timeout occurs during a mouse movement, OUT contains the mouse locations before the timeout.

OUT = MOUSEINPUT_TIMEOUT(T,AH) records the mouse movement from the axes specified by axes handle AH.

Note: MOUSEINPUT_TIMEOUT differs from GINPUT in two ways.
(1) It does not return information about which mouse button was pressed,
(2) It ignores key presses.

-- Example:
% record movements from current axes
% (with timeout after 4.5 sec), and
% plot the final movement.
out = mouseinput_timeout(4.5, gca);
hold on;
plot(out(:,1),out(:,2),'r');
out(1,:) % location at button-press
out(end,:) % location at button-release

引用格式

Gautam Vallabha (2024). MOUSEINPUT_TIMEOUT (https://www.mathworks.com/matlabcentral/fileexchange/16539-mouseinput_timeout), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2006a
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Visual Exploration 的更多信息

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
1.2.0.1

Updated license

1.2.0.0

* Minor change to description

1.1.0.0

Updated a minor typo that caused an error in R2009b. The function should now work from R2006a through R2009b.

1.0.0.0

Updated summary & keywords.