<div id="toc-navigation">
<div id="profile">
- <p><img alt="Mobile Web" src="../../../images/mw_icon.png"/> <img alt="Wearable Web" src="../../../images/ww_icon.png"/></p>
+ <p><img alt="Mobile Web" src="../../../images/mw_icon.png"/><img alt="Wearable Web" src="../../../images/ww_icon.png"/></p>
</div>
<div id="toc_border"><div id="toc">
<div id="container"><div id="contents"><div class="content">
<h1>Input Device</h1>
-<!-- TODO changed this content for inputdevice plugin
- <p>Tizen enables you to operate on the zip archive files.</p>
-
- <table class="note">
- <tbody>
- <tr>
- <th class="note">Note</th>
- </tr>
- <tr>
- <td class="note">The Archive API is mandatory for both Tizen mobile and wearable profiles, which means that it is supported in all mobile and wearable devices.
-<p>The Archive API is supported on all Tizen Emulators.</p></td>
- </tr>
- </tbody>
- </table>
+ <p>Tizen enables you to manage input device keys.</p>
- <p>To use the Archive API, your application must have the following privileges:</p>
- <ul><li><a href="http://tizen.org/privilege/filesystem.read" target="blank">http://tizen.org/privilege/filesystem.read</a></li>
- <li><a href="http://tizen.org/privilege/filesystem.write" target="blank">http://tizen.org/privilege/filesystem.write</a></li></ul>
-
- <p>The main features of the Archive API include:</p>
+ <p>The main features of the InputDevice API include:</p>
<ul>
- <li>Accessing archive content <p>You can <a href="../../../../../org.tizen.tutorials/html/web/tizen/input_output/archive_tutorial_w.htm#read">read the content of an archive file</a> using the <span style="font-family: Courier New,Courier,monospace">ArchiveFile</span> interface (in <a href="../../../../../org.tizen.web.apireference/html/device_api/mobile/tizen/archive.html#ArchiveFile">mobile</a> and <a href="../../../../../org.tizen.web.apireference/html/device_api/wearable/tizen/archive.html#ArchiveFile">wearable</a> applications).</p> </li>
- <li>Creating new archives<p>You can <a href="../../../../../org.tizen.tutorials/html/web/tizen/input_output/archive_tutorial_w.htm#create">create archive files and add files into them</a> using the <span style="font-family: Courier New,Courier,monospace">ArchiveFile</span> interface.</p> </li>
- <li>Extracting archived files<p>You can <a href="../../../../../org.tizen.tutorials/html/web/tizen/input_output/archive_tutorial_w.htm#extract">extract a single file or all files from an archive file</a> using the <span style="font-family: Courier New,Courier,monospace">ArchiveFile</span> interface.</p> </li>
- <li>Aborting operations<p>You can abort an on-going archive operation using the operation ID and the <span style="font-family: Courier New,Courier,monospace">abort()</span> method of the <span style="font-family: Courier New,Courier,monospace">ArchiveManager </span> interface.</p>
- <p>You can abort the operations for the <span style="font-family: Courier New,Courier,monospace">open()</span>, <span style="font-family: Courier New,Courier,monospace">add()</span>, <span style="font-family: Courier New,Courier,monospace">extractAll()</span>, <span style="font-family: Courier New,Courier,monospace">getEntries()</span>, <span style="font-family: Courier New,Courier,monospace">getEntryByName()</span>, and <span style="font-family: Courier New,Courier,monospace">extract()</span> methods.</p></li>
+ <li>Gethering list of supported keys
+ <p>You can <a href="../../../../../org.tizen.tutorials/html/web/tizen/ui/inputdevice_tutorial_w.htm#getkeys">get list of all supported keys</a>
+ using the <span style="font-family: Courier New,Courier,monospace">InputDeviceManager</span> interface.</p> </li>
+ <li>Getting key information by its name
+ <p>You can <a href="../../../../../org.tizen.tutorials/html/web/tizen/ui/inputdevice_tutorial_w.htm#getkeyinfo">gather information about key by its name</a>
+ using the <span style="font-family: Courier New,Courier,monospace">InputDeviceManager</span> interface and <span style="font-family: Courier New,Courier,monospace">InputDeviceKey</span> object.</p> </li>
+ <li>Registering/Unregistering key events
+ <p>You can <a href="../../../../../org.tizen.tutorials/html/web/tizen/ui/inputdevice_tutorial_w.htm#reg_unreg">register/unregister key to handle DOM events for this key</a>
+ using the <span style="font-family: Courier New,Courier,monospace">InputDeviceManager</span> interface.</p> </li>
</ul>
+ <p>Key names are listed in the <a href="http://www.w3.org/TR/2014/WD-DOM-Level-3-Events-key-20140612">DOM Level 3 KeyboardEvent key Values</a> specification, the <em>name</em> attribute is equal to the <em>key value</em> specified there. (The <a href="http://www.w3.org/TR/2014/WD-DOM-Level-3-Events-key-20140612/#keys-media-controller">Media Controller Keys</a> section is the most relevant to the Input Device API)
+ If the "DOM Level 3 KeyboardEvent key Value" does not contain appropriate entry for the key, the Input Device provides a device specific <em>name</em>.
+ </p>
- <p>To start any kind of zip operation (packing or unpacking), you must first call the <span style="font-family: Courier New,Courier,monospace">open()</span> method of the <span style="font-family: Courier New,Courier,monospace">ArchiveManager</span> interface (in <a href="../../../../../org.tizen.web.apireference/html/device_api/mobile/tizen/archive.html#ArchiveManager">mobile</a> and <a href="../../../../../org.tizen.web.apireference/html/device_api/wearable/tizen/archive.html#ArchiveManager">wearable</a> applications). The first parameter of is a <span style="font-family: Courier New,Courier,monospace">FileReference</span> object (in <a href="../../../../../org.tizen.web.apireference/html/device_api/mobile/tizen/archive.html#FileReference">mobile</a> and <a href="../../../../../org.tizen.web.apireference/html/device_api/wearable/tizen/archive.html#FileReference">wearable</a> applications), which can be a <span style="font-family: Courier New,Courier,monospace">File</span> object (in <a href="../../../../../org.tizen.web.apireference/html/device_api/mobile/tizen/filesystem.html#File">mobile</a> and <a href="../../../../../org.tizen.web.apireference/html/device_api/wearable/tizen/filesystem.html#File">wearable</a> applications) or the virtual path. The second parameter is a <span style="font-family: Courier New,Courier,monospace">FileMode</span> enumerator (in <a href="../../../../../org.tizen.web.apireference/html/device_api/mobile/tizen/filesystem.html#FileMode">mobile</a> and <a href="../../../../../org.tizen.web.apireference/html/device_api/wearable/tizen/filesystem.html#FileMode">wearable</a> applications), whose values are described in the following table.</p>
-
-
- <table border="1" style="width: 100%">
- <caption>
- Table: File modes
- </caption>
- <tbody>
- <tr>
- <th>Mode</th>
- <th>Description</th>
- </tr>
- <tr>
- <td><span style="font-family: Courier New,Courier,monospace">r</span></td>
- <td>Use this mode to extract or get information about the archive file content.
- <p>The file must exist, or the <span style="font-family: Courier New,Courier,monospace">NotFoundError</span> exception occurs.</p>
- <p>When the archive file is opened in this mode, the <span style="font-family: Courier New,Courier,monospace">add()</span> method is not available.</p></td>
- </tr>
- <tr>
- <td><span style="font-family: Courier New,Courier,monospace">w</span></td>
- <td>Use this mode to create an archive file and add files to it.
- <p>If the file does not exist, it is created. If it exists and the <span style="font-family: Courier New,Courier,monospace">overwrite</span> option is <span style="font-family: Courier New,Courier,monospace">true</span>, the existing file is overwritten with an empty archive. If the file exists and the <span style="font-family: Courier New,Courier,monospace">overwrite</span> option is <span style="font-family: Courier New,Courier,monospace">false</span>, the error callback is invoked.</p>
- <p>When the archive file is opened in this mode, the <span style="font-family: Courier New,Courier,monospace">getEntries()</span>, <span style="font-family: Courier New,Courier,monospace">getEntryByName()</span>, and <span style="font-family: Courier New,Courier,monospace">extractAll()</span> methods are not available.</p></td>
- </tr>
- <tr>
- <td><span style="font-family: Courier New,Courier,monospace">rw</span></td>
- <td>Use this mode to zip or unzip an archive file.
- <p>If the file does not exist, it is created. If it exists and the <span style="font-family: Courier New,Courier,monospace">overwrite</span> option is <span style="font-family: Courier New,Courier,monospace">true</span>, the existing file is overwritten with an empty archive. If the file exists and the <span style="font-family: Courier New,Courier,monospace">overwrite</span> option is <span style="font-family: Courier New,Courier,monospace">false</span>, the existing content is preserved, and both adding and extracting are available.</p></td>
- </tr>
- <tr>
- <td><span style="font-family: Courier New,Courier,monospace">a</span></td>
- <td>Use this mode to add new files to an archive file.
- <p>If the file does not exist, it is created. If it exists, the previous content of the archive file is preserved and new files can be added.</p>
- <p>When the archive file is opened in this mode, the <span style="font-family: Courier New,Courier,monospace">getEntries()</span>, <span style="font-family: Courier New,Courier,monospace">getEntryByName()</span>, and <span style="font-family: Courier New,Courier,monospace">extractAll()</span> methods are not available.</p></td>
- </tr>
- </tbody>
- </table>
-
- -->
+ <p>
+ When an application wants to react to the Input Device keys being pressed, it should register this key.
+ An application can not register the mandatory keys (ArrowLeft, ArrowRight, ArrowUp, ArrowDown, Enter, Back).
+ After registration of input device key, application would receive DOM keyboard event when it is pressed or released.
+ </p>
<script type="text/javascript" src="../../../scripts/jquery.zclip.min.js"></script>
<script type="text/javascript" src="../../../scripts/showhide.js"></script>