Mioplanet Documentation Center
Resources and Help
HomeProductsMioScriptJavaScriptTechNotesPHP
   Home | Media center remote control SEARCH    

MioFactory

  TechNotes
Adding a Login feature
Get the real size of a web page
How to create a Business Card
How to create a Desktop Alert
How to create a Desktop Ticker
How to create a Scrolling Alert Software
How to create a Scrolling Ticker
How to create a simple RSS Reader
How to debug
LCD Monitor Chart: Screen Resolution, Size, Pitch, Display Area
Managing read marks
Measuring Elements in JavaScript
Media center remote control
Statistics: How to track users and actions
XML Configuration File Format

  Help
01. Introduction
02. Creating an application
03. Application Settings
04. Manipulating Files
05. Editing Code
06. MioFactory Installer
07. Publishing Applications

  Products
All Products
MioDB
MioFactory
Mioplanet Admin Panel

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.


Programming Media Center Remote Control
 

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


 
From MioScript, you can use the events event.keybard:global:up and event.keybard:global:down to react when a key is pressed or released on the remote control.

event.keyboard:global:down
    alert(keyboard.global.code())
event.end



More info: keyboard....