|
|
|
|
MioFactory TechNotes
Help
Products
|
|
TechNote Media center remote control | Product: MioFactory |
| |
An application built with MioFactory can be controlled with a standard Windows Media Center remote control.
Both Windows XP Media Center and Windows Vista Media Center are supported.
With MioScript or JavaScript, you can be notified when the user presses a key on the Windows Media Center remote control.
Most of the keys on the remote control has a numeric key code associated. The key codes are the same for the remote control than for the keyboard, so your application will react for both the remote control and the keyboard.
The key codes are shown in the picture (right). Some keys has no code associated because no event is raised when they are pressed.
The key codes can be used with both MioScript and JavaScript.
| 37-40 | | Arrows keys. | | 48-57 | | Numeric keys, can also be used for text input with a "triple-tap" mechanism. | | 173-175 | | Volume control and mute. | | 166 | | Back button. | | 13 | | Ok or Enter. | | 27 | | Clear. |
|  | |
Reacting to the Media Center remote control in JavaScript
| |
In JavaScript, the event onKeyDown is raised when a key is pressed, and onkeyup when a key is released.
The two events can be used to react to the remote control.
<body onkeydown='onRemoteEvent(window.event.keyCode)'>
function onRemoteEvent(keyCode) {
alert(keyCode)
}
|
|
Reacting to the Media Center remote control in MioScript
|
|
|