1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<html> 3 4<head> 5<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 6<META name="GENERATOR" content="Microsoft FrontPage 5.0"> 7<META http-equiv="Content-Style-Type" content="text/css"> 8<LINK rel="stylesheet" type="text/css" href="../CSS/revolution.css"> 9<title>KBDGetLockProcessing</title> 10</head> 11 12<body> 13 14<h1>KBDGetLockProcessing</h1> 15 16 17<h2>C Specification</h2> 18 19<dl> 20<dd><pre><code>#include <revolution/kbd.h></code></pre> 21 </dd> 22<dd><pre><code>KBDEc KBDGetLockProcessing(KBDChannel ch, BOOL *enable);</code></pre> 23 </dd> 24</dl> 25 26<h2>Arguments</h2> 27 28<TABLE border="1" cellpadding="3" cellspacing="0.1"> 29 <tr> 30<TD width="120" bgcolor="#ffffe8"><code><em><strong>ch</strong></em></code></TD> 31<TD width="520">Keyboard channel to query.</TD> 32 </tr> 33 <tr> 34<TD width="120" bgcolor="#ffffe8"><code><em><strong>enable</strong></em></code></TD> 35<TD width="520">Pointer to a BOOL value to store the modifier processing state.</TD> 36 </tr> 37</TABLE> 38 39<h2>Return Values</h2> 40 41<TABLE border="1" cellpadding="3" cellspacing="0.1"> 42 <tr> 43<TD width="120" bgcolor="#ffffe8"><code><em><strong>KBDEc</strong></em></code></TD> 44<TD width="520">Keyboard error code.<br><code>KBD_SUCCESS</code> if the call was successful.<br><code>KBD_ERR_NOT_INITIALIZED</code> is returned if the library is not initialized. <br><code>KBD_ERR_BAD_VALUE</code> is returned if <code>ch</code> is out-of-range. <br><code>KBD_ERR_BAD_POINTER</code> is returned if <code>enable</code> is not a valid pointer.</TD> 45 </tr> 46</TABLE> 47 48<h2>Description</h2> 49 50<p>Returns the current lock modifier processing state of the USB keyboard on channel <code>ch</code>. The returned state is written to the area pointed to by <code>enable</code>.</p> 51<p>If the lock modifier processing state is TRUE, the KBD library processes all modifier keys as usual and sets the <code>KBDModState</code> accordingly. A lock modifier processing state of FALSE means that the KBD library will not process the locking modifier key presses, and the following <code>KBDModState</code> is left unchanged:</p> 52<ul> 53<li><code>KBD_MS_CAPS_LOCK</code></li> 54<li><code>KBD_MS_NUM_LOCK</code></li> 55<li><code>KBD_MS_SCROLL_LOCK</code></li> 56<li><code>KBD_MS_LANG1</code></li> 57<li><code>KBD_MS_LANG2</code></li> 58</ul> 59<p>The processing of other <code>KBDModState</code> is still handled as usual. That is, pressing the Shift key will still set the <code>KBD_MS_SHIFT</code> bit in <code>KBDModState</code> regardless of the lock modifier processing state. The <code>KBDModState</code> is still used to translate HID codes into Unicodes.</p> 60 61<h2>See Also</h2> 62 63<p><a href="list.html">Keyboard API Function List</a></p> 64 65<h2>Revision History</h2><p></p> 66 67<P>2007/03/27 Initial version.</p> 68 69</BODY> 70</HTML>