Files
MiniGUI/doc/man3/miniguiAsyncKey.3
2017-05-29 12:20:05 +08:00

87 lines
3.2 KiB
Plaintext

.\" This manpage is Copyright (C) 2000 Wei Yongming
.\" 2000 BluePoint Software
.\"
.\" Permission is granted to make and distribute verbatim copies of this
.\" manual provided the copyright notice and this permission notice are
.\" preserved on all copies.
.\"
.\" Permission is granted to copy and distribute modified versions of this
.\" manual under the conditions for verbatim copying, provided that the
.\" entire resulting derived work is distributed under the terms of a
.\" permission notice identical to this one.
.\"
.\" Since MiniGUI is constantly changing, this
.\" manual page may be incorrect or out-of-date. The author(s) assume no
.\" responsibility for errors or omissions, or for damages resulting from
.\" the use of the information contained herein. The author(s) may not
.\" have taken the same level of care in the production of this manual,
.\" which is licensed free of charge, as they might when working
.\" professionally.
.\"
.\" Formatted or processed versions of this manual, if unaccompanied by
.\" the source, must acknowledge the copyright and authors of this work.
.TH "AsyncKey" "3" "July 2000" "MiniGUI"
.SH "NAME"
AsyncKey \- Gets asynchronize key status in MiniGUI.
.SH "SYNOPSIS"
.B #include <minigui/minigui.h>
.PP
.BI "BOOL GUIAPI GetKeyStatus" "(UINT uKey);"
.br
.BI "DWORD GUIAPI GetShiftKeyStatus" "(void);"
.SH "DESCRIPTION"
.PP
\fBGetKeyStatus\fP gets a key or a mouse button status, return TRUE when pressed, or FALSE when released. \fBuKey\fP indicates the key or mouse button. For keys on keyboard, \fBuKey\fP should be the scancode of the key, for mouse button, \fBuKey\fP should be one value of the following:
.PP
.IP \fBSCANCODE_LEFTBUTTON\fP
Left mouse button.
.IP \fBSCANCODE_MIDDLBUTTON\fP
Middle mouse button.
.IP \fBSCANCODE_RIGHTBUTTON\fP
Right mouse button.
.PP
The above constants and the scancodes of keys are defined in \fB<minigui/common.h>\fP.
.PP
\fBGetShiftKeyStatus\fP gets status of shift keys, the returned value indicates the status of shift keys -- \fBCapsLock, ScrollLock, NumLock, Left Shift, Right Shift, Left Ctrl, Right Ctrl, Left Alt, and Right Alt\fP. You can use KS_* with OR operation to determine one shift key's status:
.PP
.IP \fBKS_CAPSLOCK\fP
Indicates that CapsLock is locked.
.IP \fBKS_NUMLOCK\fP
Indicates that NumLock is locked.
.IP \fBKS_SCROLLLOCK\fP
Indicates that ScrollLock is locked.
.IP \fBKS_LEFTCTRL\fP
Indicates that left Ctrl is pressed.
.IP \fBKS_RIGHTCTRL\fP
Indicates that right Ctrl is pressed.
.IP \fBKS_CTRL\fP
Indicates that one Ctrl is pressed.
.IP \fBKS_LEFTALT\fP
Indicates that left Alt is pressed.
.IP \fBKS_RIGHTALT\fP
Indicates that right Alt is pressed.
.IP \fBKS_ALT\fP
Indicates that one Alt is pressed.
.IP \fBKS_LEFTSHIFT\fP
Indicates that left Shift is pressed.
.IP \fBKS_RIGHTSHIFT\fP
Indicates that right Shift is pressed.
.IP \fBKS_SHIFT\fP
Indicates that one Shift is pressed.
.PP
The above constants are defined in \fB<minigui/common.h>\fP.
.SH "SEE ALSO"
.BR MSG_KEYDOWN (3),
.BR MSG_KEYUP (3),
.BR MSG_CHAR (3)
.SH "AUTHOR"
.PP
This manual page was edited by WEI Yongming <ymwei@minigui.org>.
If you have any problems, comments or found some bugs, please send messages to me.