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>KBDSetLockProcessing</title> 10</head> 11 12<body> 13 14<h1>KBDSetLockProcessing</h1> 15 16<h2>Syntax</h2> 17<dl><dd><pre class="construction"> 18#include <revolution/kbd.h> 19 20KBDEc KBDSetLockProcessing(KBDChannel ch, BOOL enable); 21</pre></dd></dl> 22 23<h2>Arguments</h2> 24<TABLE class="arguments" border="1" > 25 <tr> 26<TH>ch</TH> 27<TD>Keyboard channel to set.</TD> 28 </tr> 29 <tr> 30<TH>enable</TH> 31<TD>A BOOL value to be used as the modifier processing state.</TD> 32 </tr> 33</TABLE> 34 35<h2>Return Values</h2> 36<TABLE class="arguments" border="1" > 37 <tr> 38<TH>KBDEc</TH> 39<TD>Keyboard error code. <code>KBD_SUCCESS</code> if the call was successful.<br><code>KBD_ERR_NOT_INITIALIZED</code> if the library was not initialized.<br><code>KBD_ERR_BAD_VALUE</code> if <SPAN class="argument">ch</SPAN> was out of range.<br> 40 </TD> 41 </tr> 42</TABLE> 43 44<h2>Description</h2> 45<p>Sets the current modifier processing state of the USB keyboard on channel <SPAN class="argument">ch</SPAN>.</p> 46<p>If the lock modifier processing state is <CODE>TRUE</CODE>, the KBD library processes all modifier keys routinely and sets the <code>KBDModState</code> accordingly. A lock modifier processing state of <CODE>FALSE</CODE> means that the KBD library will not process the locking modifier key presses, and the following <code>KBDModState</code> will be left unchanged:</p> 47<ul> 48<li><code>KBD_MS_CAPS_LOCK</code></li> 49<li><code>KBD_MS_NUM_LOCK</code></li> 50<li><code>KBD_MS_SCROLL_LOCK</code></li> 51<li><code>KBD_MS_LANG1</code></li> 52<li><code>KBD_MS_LANG2</code></li> 53</ul> 54<p>The processing of other <code>KBDModState</code> is still handled routinely. 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 used to convert HID code to Unicode.</p> 55<p>The default value for <SPAN class="argument">enable</SPAN> is <CODE>TRUE</CODE>.</p> 56 57<h2>See Also</h2> 58<P class="reference"> 59<a href="list.html">Keyboard API Function List</a> 60</p> 61 62<h2>Revision History</h2> 63<P> 642007/03/19 Initial version.<br> 65</p> 66 67<hr><p>CONFIDENTIAL</p></body> 68</HTML>