SGkeyboardgetkey
by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - User interface
Introduced first in SolidGeometry 4.5, Creation date: 2019-02-07, Last change: 2025-09-14
returns the last key pressed
Description
This function automatically installs call back function "SGkeyboardCallback"
See Also: SGkeyboardCallback
Example Illustration
Syntax
[key,lastkey]=SGkeyboardgetkey([hf])
Input Parameter
hf: | | optional window handle; default is gcf |
Output Parameter
key: | | key pressed |
lastkey: | | last key pressed |
Examples
close all; for i=1:100; a=SGkeyboardgetkey; if~isempty(a); fprintf(2,'%s ',a.key); end; pause(.1); end; commandwindow;
SGfigure; for i=1:100; a=SGkeyboardgetkey; if~isempty(a); fprintf(2,'%s ',a.key); end; pause(.1); end;commandwindow;
Copyright 2019-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