getkeyboardchartimer
by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - User interface
Introduced first in SolidGeometry 5.1, Creation date: 2021-04-02, Last change: 2025-09-15
fnct getkey for figures if rotate3d is on - and the callbacks are blocked
Description
Improved version of getkeyboardcharpause - Shows also some second waiting text
In Matlab there are different possibilities to get a char from the keyboard if a figure is open. The method depends on the rotate3d mode. If rotate3d is on, mouse buttons and keyboard are blocked for callbacks ==> The pause command must be used in combination with get(gcf,'CurrentCharacter'). If rotate3d is on, a callback function can be used to detect mouse buttons and keyboard chars. Also ginput(1) can be used
See Also: , getkeyboardcharpause
Example Illustration
Syntax
c=getkeyboardchartimer([chrset,maxtime])
Input Parameter
chrset: | | set of allowed character; default is 1:255 |
maxtime: | | maximum of waiting time; default is 3 seconds |
Output Parameter
c: | | uint8 of char pressed during pause command and rotate3d was on |
Examples
SGbox; getkeyboardchartimer('',4) % returns the pressed key or stops after 4 seconds
Copyright 2021-2025 Tim C. Lueth. All rights reserved. The code is the property of Tim C. Lueth and may not be redistributed or modified without explicit written permission. This software may be used free of charge for academic research and teaching purposes only. Commercial use, redistribution, modification, or reverse engineering is strictly prohibited. Access to source code is restricted and granted only under specific agreements. For licensing inquiries or commercial use, please contact: Tim C. Lueth
Last html export of this page out of FM database by TL: 2025-09-21