📄 group__key__defs.htm
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>MiniGUI V1.6.10 API Reference: Macros for key codes and shift status</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.4.2 --><div class="qindex"><a class="qindex" href="index.htm">Main Page</a> | <a class="qindex" href="modules.htm">Modules</a> | <a class="qindex" href="classes.htm">Alphabetical List</a> | <a class="qindex" href="annotated.htm">Data Structures</a> | <a class="qindex" href="dirs.htm">Directories</a> | <a class="qindex" href="files.htm">File List</a> | <a class="qindex" href="functions.htm">Data Fields</a> | <a class="qindex" href="globals.htm">Globals</a> | <a class="qindex" href="pages.htm">Related Pages</a></div><h1>Macros for key codes and shift status<br><small>[<a class="el" href="group__macros__types.htm">Macros and data types commonly used</a>]</small></h1><h2>Defines</h2><ul><li>#define <a class="el" href="group__key__defs.htm#ga0">MGUI_NR_KEYS</a> 255<dl class="el"><dd class="mdescRight">Number of MiniGUI keys. <a href="#ga0"></a><br></dl><li>#define <a class="el" href="group__key__defs.htm#ga1">NR_KEYS</a> 128<dl class="el"><dd class="mdescRight">The number of keys defined by Linux operating system. <a href="#ga1"></a><br></dl><li>#define <a class="el" href="group__key__defs.htm#ga2">SCANCODE_USER</a> (NR_KEYS + 1)<dl class="el"><dd class="mdescRight">The first key scan code different from OS defined ones. <a href="#ga2"></a><br></dl><li>#define <a class="el" href="group__key__defs.htm#ga125">KS_REPEATED</a> 0x00000800<dl class="el"><dd class="mdescRight">This status indicate that the key down message is an auto-repeated one. <a href="#ga125"></a><br></dl><li>#define <a class="el" href="group__key__defs.htm#ga126">KS_CAPTURED</a> 0x00000400<dl class="el"><dd class="mdescRight">This status indicate that the mouse is captured by a window when the mouse message posted. <a href="#ga126"></a><br></dl><li>#define <a class="el" href="group__key__defs.htm#ga127">KS_IMEPOST</a> 0x00000200<dl class="el"><dd class="mdescRight">This status indicate that the key message is posted by the IME window. <a href="#ga127"></a><br></dl><li>#define <a class="el" href="group__key__defs.htm#ga128">KS_CAPSLOCK</a> 0x00000100<dl class="el"><dd class="mdescRight">This status indicate that the CapsLock key was locked when the key or mouse message posted to the window. <a href="#ga128"></a><br></dl><li>#define <a class="el" href="group__key__defs.htm#ga129">KS_NUMLOCK</a> 0x00000080<dl class="el"><dd class="mdescRight">This status indicate that the NumLock key was locked when the key or mouse message posted to the window. <a href="#ga129"></a><br></dl><li>#define <a class="el" href="group__key__defs.htm#ga130">KS_SCROLLLOCK</a> 0x00000040<dl class="el"><dd class="mdescRight">This status indicate that the ScrollLock key was locked when the key or mouse message posted to the window. <a href="#ga130"></a><br></dl><li>#define <a class="el" href="group__key__defs.htm#ga131">KS_LEFTCTRL</a> 0x00000020<dl class="el"><dd class="mdescRight">This status indicate that the left-Ctrl key was pressed when the key or mouse message posted to the window. <a href="#ga131"></a><br></dl><li>#define <a class="el" href="group__key__defs.htm#ga132">KS_RIGHTCTRL</a> 0x00000010<dl class="el"><dd class="mdescRight">This status indicate that the right-Ctrl key was pressed when the key or mouse message posted to the window. <a href="#ga132"></a><br></dl><li>#define <a class="el" href="group__key__defs.htm#ga133">KS_CTRL</a> 0x00000030<dl class="el"><dd class="mdescRight">This status indicate that either the left-Ctrl key or the right-Ctrl key was pressed when the key or mouse message posted to the window. <a href="#ga133"></a><br></dl><li>#define <a class="el" href="group__key__defs.htm#ga134">KS_LEFTALT</a> 0x00000008<dl class="el"><dd class="mdescRight">This status indicate that left-Alt key was pressed when the key or mouse message posted to the window. <a href="#ga134"></a><br></dl><li>#define <a class="el" href="group__key__defs.htm#ga135">KS_RIGHTALT</a> 0x00000004<dl class="el"><dd class="mdescRight">This status indicate that right-Alt key was pressed when the key or mouse message posted to the window. <a href="#ga135"></a><br></dl><li>#define <a class="el" href="group__key__defs.htm#ga136">KS_ALT</a> 0x0000000C<dl class="el"><dd class="mdescRight">This status indicate that either the left-Alt key or the right-Alt key was pressed when the key or mouse message posted to the window. <a href="#ga136"></a><br></dl><li>#define <a class="el" href="group__key__defs.htm#ga137">KS_LEFTSHIFT</a> 0x00000002<dl class="el"><dd class="mdescRight">This status indicate that left-Shift key was pressed when the key or mouse message posted to the window. <a href="#ga137"></a><br></dl><li>#define <a class="el" href="group__key__defs.htm#ga138">KS_RIGHTSHIFT</a> 0x00000001<dl class="el"><dd class="mdescRight">This status indicate that right-Shift key was pressed when the key or mouse message posted to the window. <a href="#ga138"></a><br></dl><li>#define <a class="el" href="group__key__defs.htm#ga139">KS_SHIFT</a> 0x00000003<dl class="el"><dd class="mdescRight">This status indicate that either the left-Shift key or the right-Shift key was pressed when the key or mouse message posted to the window. <a href="#ga139"></a><br></dl><li>#define <a class="el" href="group__key__defs.htm#ga140">MASK_KS_SHIFTKEYS</a> 0x00000FFF<dl class="el"><dd class="mdescRight">The mask of key status. <a href="#ga140"></a><br></dl><li>#define <a class="el" href="group__key__defs.htm#ga141">KS_LEFTBUTTON</a> 0x00001000<dl class="el"><dd class="mdescRight">This status indicate that left button was pressed when the key or mouse message posted to the window. <a href="#ga141"></a><br></dl><li>#define <a class="el" href="group__key__defs.htm#ga142">KS_RIGHTBUTTON</a> 0x00002000<dl class="el"><dd class="mdescRight">This status indicate that right button was pressed when the key or mouse message posted to the window. <a href="#ga142"></a><br></dl><li>#define <a class="el" href="group__key__defs.htm#ga143">KS_MIDDLBUTTON</a> 0x00004000<dl class="el"><dd class="mdescRight">This status indicate that middle button was pressed when the key or mouse message posted to the window. <a href="#ga143"></a><br></dl><li>#define <a class="el" href="group__key__defs.htm#ga144">MASK_KS_BUTTONS</a> 0x0000F000<dl class="el"><dd class="mdescRight">The mask of mouse button status. <a href="#ga144"></a><br></dl></ul><hr><h2>Define Documentation</h2><a class="anchor" name="ga136" doxytag="common.h::KS_ALT"></a><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">#define KS_ALT 0x0000000C </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>This status indicate that either the left-Alt key or the right-Alt key was pressed when the key or mouse message posted to the window. <p><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__key__msgs.htm">Key event messages</a> </dd></dl><p>Definition at line <a class="el" href="common_8h-source.htm#l01123">1123</a> of file <a class="el" href="common_8h-source.htm">common.h</a>. </td> </tr></table><a class="anchor" name="ga128" doxytag="common.h::KS_CAPSLOCK"></a><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">#define KS_CAPSLOCK 0x00000100 </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>This status indicate that the CapsLock key was locked when the key or mouse message posted to the window. <p>You can test the status by AND'ed with lParam of the message, like below<p><div class="fragment"><pre class="fragment"> <span class="keywordflow">switch</span> (message) { <span class="keywordflow">case</span> <a class="code" href="group__key__msgs.htm#ga4">MSG_KEYDOWN</a>: <span class="keywordflow">if</span> (lParam & <a class="code" href="group__key__defs.htm#ga128">KS_CAPSLOCK</a>) { <span class="comment">// the CapsLock key is locked.</span> ... } <span class="keywordflow">break</span>; ...</pre></div><p><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__key__msgs.htm">Key event messages</a> </dd></dl><p>Definition at line <a class="el" href="common_8h-source.htm#l01051">1051</a> of file <a class="el" href="common_8h-source.htm">common.h</a>. </td> </tr></table><a class="anchor" name="ga126" doxytag="common.h::KS_CAPTURED"></a><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">#define KS_CAPTURED 0x00000400 </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>This status indicate that the mouse is captured by a window when the mouse message posted. <p>You can test the status by AND'ed with wParam of the message, like below:<p><div class="fragment"><pre class="fragment"> <span class="keywordflow">switch</span> (message) { <span class="keywordflow">case</span> <a class="code" href="group__mouse__msgs.htm#ga4">MSG_MOUSEMOVE</a>: <span class="keywordflow">if</span> (wParam & <a class="code" href="group__key__defs.htm#ga126">KS_CAPTURED</a>) { <span class="comment">// the mouse is captured by this window.</span> ... } <span class="keywordflow">break</span>; ...</pre></div><p><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__mouse__msgs.htm">Mouse event messages</a> </dd></dl><p>Definition at line <a class="el" href="common_8h-source.htm#l01021">1021</a> of file <a class="el" href="common_8h-source.htm">common.h</a>. </td> </tr></table><a class="anchor" name="ga133" doxytag="common.h::KS_CTRL"></a><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">#define KS_CTRL 0x00000030 </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>This status indicate that either the left-Ctrl key or the right-Ctrl key was pressed when the key or mouse message posted to the window. <p><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__key__msgs.htm">Key event messages</a> </dd></dl><p>Definition at line <a class="el" href="common_8h-source.htm#l01096">1096</a> of file <a class="el" href="common_8h-source.htm">common.h</a>. </td> </tr></table><a class="anchor" name="ga127" doxytag="common.h::KS_IMEPOST"></a><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">#define KS_IMEPOST 0x00000200 </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>This status indicate that the key message is posted by the IME window. <p><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__key__msgs.htm">Key event messages</a> </dd></dl><p>Definition at line <a class="el" href="common_8h-source.htm#l01029">1029</a> of file <a class="el" href="common_8h-source.htm">common.h</a>. </td> </tr></table><a class="anchor" name="ga134" doxytag="common.h::KS_LEFTALT"></a><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">#define KS_LEFTALT 0x00000008 </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>This status indicate that left-Alt key was pressed when the key or mouse message posted to the window. <p><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__key__msgs.htm">Key event messages</a> </dd></dl><p>Definition at line <a class="el" href="common_8h-source.htm#l01105">1105</a> of file <a class="el" href="common_8h-source.htm">common.h</a>. </td> </tr></table><a class="anchor" name="ga141" doxytag="common.h::KS_LEFTBUTTON"></a><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">#define KS_LEFTBUTTON 0x00001000 </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>This status indicate that left button was pressed when the key or mouse message posted to the window. <p><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__key__msgs.htm">Key event messages</a> </dd></dl><p>Definition at line <a class="el" href="common_8h-source.htm#l01165">1165</a> of file <a class="el" href="common_8h-source.htm">common.h</a>. </td> </tr></table><a class="anchor" name="ga131" doxytag="common.h::KS_LEFTCTRL"></a><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">#define KS_LEFTCTRL 0x00000020 </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>This status indicate that the left-Ctrl key was pressed when the key or mouse message posted to the window. <p><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__key__msgs.htm">Key event messages</a> </dd></dl><p>Definition at line <a class="el" href="common_8h-source.htm#l01078">1078</a> of file <a class="el" href="common_8h-source.htm">common.h</a>. </td> </tr></table><a class="anchor" name="ga137" doxytag="common.h::KS_LEFTSHIFT"></a><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">#define KS_LEFTSHIFT 0x00000002 </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>This status indicate that left-Shift key was pressed when the key or mouse message posted to the window. <p><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__key__msgs.htm">Key event messages</a> </dd></dl><p>Definition at line <a class="el" href="common_8h-source.htm#l01132">1132</a> of file <a class="el" href="common_8h-source.htm">common.h</a>. </td> </tr></table><a class="anchor" name="ga143" doxytag="common.h::KS_MIDDLBUTTON"></a><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">#define KS_MIDDLBUTTON 0x00004000 </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>This status indicate that middle button was pressed when the key or mouse message posted to the window. <p><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__key__msgs.htm">Key event messages</a> </dd></dl><p>Definition at line <a class="el" href="common_8h-source.htm#l01183">1183</a> of file <a class="el" href="common_8h-source.htm">common.h</a>. </td> </tr></table><a class="anchor" name="ga129" doxytag="common.h::KS_NUMLOCK"></a><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">#define KS_NUMLOCK 0x00000080 </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>This status indicate that the NumLock key was locked when the key or mouse message posted to the window. <p><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__key__msgs.htm">Key event messages</a> </dd></dl><p>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -