MediaCenter.onRemoteEvent Event
Raised when the user presses one of the remote control buttons listed in the following table.
Note This event has been deprecated.
Syntax
onRemoteEvent(
keyCode
)
Parameters
keyCode
A Number (int) specifying the standard numeric ANSI code for the equivalent key on the computer keyboard. Possible values are as follows:
Name | Button code | Button code (Hex) |
Up | 38 | 26 |
Down | 40 | 28 |
Left | 37 | 25 |
Right | 39 | 27 |
OK/Enter | 13 | 0D |
42 | 2A | |
Back | 166 | A6 |
Record | -103 | FF99 |
Play | 250 | FA |
Pause | 19 | 13 |
Skip | 176 | B0 |
Replay | 177 | B1 |
Chan/Page+ | 33 | 21 |
Chan/Page- | 34 | 22 |
More Info | -100 | 9C |
Clear | 27 | 1B |
0 | 48 | 30 |
1 | 49 | 31 |
2 | 50 | 32 |
3 | 51 | 33 |
4 | 52 | 34 |
5 | 53 | 35 |
6 | 54 | 36 |
7 | 55 | 37 |
8 | 56 | 38 |
9 | 57 | 39 |
Remarks
The onRemoteEvent event captures information from the remote control, including which button the user presses, and passes it along to your HTML application, allowing your code to respond appropriately.
Not all the buttons on the remote control are sent to HTML applications. The event depends on the presence of a VK (Virtual Key) code coming from the remote, and not all remote buttons send an associated VK code. These other buttons are used by Windows Media Center for specialized functions that do not pertain directly to extensibility.
When onRemoteEvent returns true, Windows Media Center does not handle the user input, although the input may still be handled by the HTML application. Returning false indicates that Windows Media Center should handle the user input wherever it has built-in functionality for it.
If a user presses the button for More Info, a remote event is not sent directly. Instead, a context menu appears with two items, Security Info and More Info. Selecting Security Info takes the user to a page with the name, URL, and security status of the page. Selecting More Info in the context menu sends the remote event to the HTML page.
Requirements
Platform: HTML application hosted within Windows XP Media Center Edition 2004 through Windows Vista
See Also