Меню Рубрики

Windows mce remote control

Using an MCE remote control in Windows

This page or section may require cleanup, updating, spellchecking, reformatting and/or updated images. Please improve this page if you can. The discussion page may contain suggestions.

Most IR Kodi remote controls fall into two classes, remotes compatible with the Microsoft remote (also known as RC6 or eHome remotes) and remotes that send Media Centre keyboard shortcuts. If you have a Microsoft remote (or a compatible such as the Asrock, HP or Mediagate)see the article Using a Microsoft remote control in Windows. This article discusses the remotes that send MCE keyboard shortcuts. If you haven’t already done so, you might want to look at the article Using an MCE remote for some general notes on remote controllers.

The good news is that from v10.0 Dharma onwards most MCE remotes will just work with Kodi without needing any tweaking. The only reason for continuing with this article is if you find that some of the buttons on your remote don’t work or don’t do what you want.

Contents

1 How MCE remotes work

The article Using an MCE remote describes the four ways that MCE remotes work in Windows. There are few standards in the world of MCE remotes, so your remote might work in any combination of three ways:

  1. The remote can send the Windows message WM_APPCOMMAND. This message is used to send a multimedia application messages like «Play», «Pause», «Stop» etc.
  2. The remote can simulate multimedia key presses when you press a button. Multimedia keys were introduced with the Microsoft multimedia keyboard, which has extra keys for multimedia functions like «Play» etc.
  3. Finally the remote can simulate the standard MS Media Center keyboard shortcuts. Many cheap MCE remotes simulate these keyboard shortcuts e.g. when you press the Play button they simulate the key press control-shift-P. To use this type of remote an application has to process the Media Center key presses.

Kodi handles all the common APPCOMMAND messages, and it handles all the Media Center keyboard shortcuts. Kodi handles some multimedia keyboard keypresses, but in any case Windows has a tendancy to convert multimedia keypresses into APPCOMMAND messages.

The only option available to you for configuring an MCE remote is to modify the Kodi key mapping to make the key do what you want. The remainder of this article describes how to work out what keypress your remote is sending and how to configure Kodi to respond to it.

2 Configuring your MCE remote

There are two steps required:

  1. Work out what keypress your remote sends when you press a button
  2. Configure the Kodi keymapping to respond to that keypress

Step 1 is easy because there is an applet available to display keypresses. Grab a copy of the Showkey applet from http://xbmcmce.sourceforge.net/. On Linux, you can skip the grab part and run showkey program as root. Use your favorite package manager to find the right package to install.

Run this application. You should find that ShowKey reports any key you press e.g. press the Q key on the keyboard and ShowKey will report:

Press control-Q and you’ll see:

The ShowKey applet also gives you the line of XML you need in your keyboard.xml file, and this brings us to Step 2.

3 Configuring your keyboard.xml

Editing the keyboard.xml is described in Modifying keyboard.xml. The remainder of this article specifically addresses creating entries for MCE remotes. The article describes using Notepad to modify keyboard.xml, but there is a keymap editor available from http://xbmcmce.sourceforge.net/ or it’s included in the MCERemote addon.

Kodi uses a key mapping file called keyboard.xml to determine how it should respond to key presses. There is a system keyboard.xml in C:\Program Files\Kodi\system\keymaps, and you should normally leave this alone. You need to create a personal keyboard.xml in your userdata folder and update this file with your customised key mappings.

The quickest way to edit your userdata keyboard.xml is to press Windows-R to open the Run dialog then type:

If you are prompted to create a new file answer «Yes».

If you don’t already have a keyboard.xml file copy and paste in this template:

As an example let’s take the control-Q keystroke I mentioned above. When you press control-Q ShowKey generates the XML:

Copy and paste this into your keyboard.xml, so it looks like:

Now start Kodi and press control-Q, and a little message should pop up saying you’ve pressed «q».

The key mappings are fairly obvious: in our example above the means the mapping is for the key «q». The mapping starts with and ends with . If you want to specify control, shift or alt you use mod=»ctrl,shift,alt» or any combination. For example:

means the key control-alt-Q.

The bit in between and is the action Kodi should take. In this example the «Notification» action pops up a message, which is useful only for debugging.

A quick way to check what keys and actions are available is to open (but don’t modify!) C:\Program Files\Kodi\system\keymaps\keyboard.xml as this has lots of useful examples.

There is a list of all the Kodi key names that you can use in keyboard.xml in List_of_keynames.

There is a list of all the actions that you can use in keyboard.xml in the articles Action IDs and List of Built In Functions.

4 Troubleshooting

About the only thing that can go wrong is if you make a mistake in your keyboard.xml. The easy way to check this is to turn on debug logging and check your log file. To turn on debug logging go to the settings and select System, then Debugging, then enable Enable debug logging. When you turn on debug logging you’ll see some text at the top of the screen showing various info such as CPU usage. This is a quick way to tell if debug logging is on.

As an example suppose I make a deliberate mistake in my keyboard.xml:

in the line i’ve omitted the «/» in the closing . Now start Kodi and close it again, and examine the Kodi.log by pressing Windows-R and typing:

and search for the text «ERROR:». A few dozen lines down I find:

which tells me what my mistake is.

You can also the debug log to tell you how Kodi is processing keypresses. Sticking with my example above of mapping control-Q, start Kodi, turn on debugging and press control-Q a few times. Close Kodi and open the debug log and search for the text SDLKeyboard. You should see:

The SDLKeyboard line reports the keypress while the CApplication::OnKey line tells you what action Kodi took.

Источник

Windows mce remote control

Обновляю руководство по использованию связки Windows+XBMC+IRSS+MCERemote и привязки зеленой кнопки на запуск XBMC.
Расширенная версия с картинками прикреплена внизу сообщения.
Учебник: Как использовать MCE Remote с XBMC
Это руководство по установке Windows MCE Remote под Windows

ЧАСТЬ 1
Подключите устройство к компьютеру используя разъем USB на задней панели.
Убедитесь в том, что все драйвера установились правильно.
Если операционная система не подвергалась никаким обрезаниям, то драйвера уже включены в нее и устанавливаются автоматически. Если все правильно пройдет, то в устройствах должно появиться «eHome Infrared Receiver».
Проверьте работу пульта, если ничего еще не установлено то проверить можно по 2 признакам
1: Изменяется громкость
2: Работает Mute

Если это не работает то драйвера не установились правильно.

ЧАСТЬ 2
Установите Microsoft .NET Framework 3.5 (ссылка)

ЧАСТЬ 3
Установите IR Server Suite — Test Build 1.4.2.3664.exe (Ссылка) (можно и любую другую сборку, в них в разной степени чтото добавляется новое, а чтото нужное ломается).
При установке выберите IR Server, в разделе Tools как минимум надо выбрать Translator он понадобится для запуска медиа оболочки с зеленой кнопки, IR Blast нужен для использования бластеров, которыми можно управлять другой аппаратурой.

ЧАСТЬ 4
В системном трее, справа внизу, жмем правой кнопкой мыши на значке IR Server и выбираем пункт Setup.

В меню Input Service Configuration:
настройка для Microsoft MCE
галочки Receive and Transmit обе отмечены
Жмем кнопку Configure:

Basic
Learn IR timeout : 10.000
Disalbe Windows Media Center services (установить)
Все остальные снять (только для XP Sp3)

Remote
Enable remote control input (установить)
Disable automatic buttons (установить) (дает возможность работать кнопкам mute и volume)
use system keyboard rate settings (снять)

Keyboard
Enable keyboard input (установить)
Handle keyboard locally (установить)
Use system keyboard rate settings (установить)
Use Qwertz Layout (снять)

Mouse
Enable mouse input (установить)
Handel mouse locally (установить)

ЧАСТЬ 5
Если вы собираетесь использовать на компьютере еще какое нибуть программное обеспечение понимающее пульт Microsoft то в меню Advanced необходимо снять галку с пункта Use the Abstract Remote Model. В этом случае при нажатии на кнопки пульта программам будут передаваться сканкоды кнопок вида 31728 например вместо info.

ЧАСТЬ 6
Запуск программ «Зеленой» кнопкой с пульта.
Идем «Пуск» — «Программы» — «IR Server Suite» — «Translator»
Нажимаем правой кнопкой мыши в трее на значке транслятора и выбираем пункт Setup.

Так как нам необходимо, чтобы зеленая кнопка работала на всю систему, то выбираем пункт System Wide и внизу жмем кнопку New.

Вам будет выдано окно с запросом нажать кнопку на пульте, которую вы хотите замапить.
Соответственно жмете «Зеленую кнопку»
Откроется окно Button Mapping, переходим на закладку запуска приложений Run.
В поле Application указываем полный путь к исполняемому файлу.
В поле Start Folder папка запуска приложения, обычно та же где оно расположено.

Далее внизу окна жмем кнопку Set для создания скрипта
Все, жмем ОК

Потом в окне Translator внизу ставим галочку на автозапуск его при старте системы (Start Translator with Windows) жмем ОК и можем пробовать работу Зеленой кнопки.

Источник

Using a Microsoft remote control in Windows

This article applies to remote controls that use the Microsoft eHome device driver. If you are unsure whether your remote is an eHome remote look in the Device Manager under Human Interface Devices and see if there is a device called «Microsoft eHome Infrared Transceiver» or something similar.

The above example is from Windows 7. If the eHome device does not appear you aren’t using the eHome driver and you should read no further. For MCE remotes see Using an MCE remote control in Windows and for general notes on remote controllers see Remote_controls.

Contents

1 Introduction

The simplest way to use an eHome remote with Kodi is to configure it to emulate a keyboard. The eHome driver can be configured by modifying the registry (details below). The details are rather involved, but there are various resources you can use that make it all very simple.

EliteGamer360 has written a registry config file and associated keyboard.xml and these are available from http://xbmccustomregis.sourceforge.net/.

jhsrennie has written an add-on to configure MS remotes. To install it run XBMC and go to Settings, Add-ons, Get Add-ons, XBMC.org Add-ons, Program Add-ons and select MCERemote. Once installed, you can open the add-on by selecting Programs from the home page then MCERemote. The addon includes an option to display the instructions.

2 Default eHome configuration

Any version of Windows from Windows XP onwards will automatically detect and install a Microsoft remote as soon as you connect it. With versions of Kodi from v10.0 Dharma onwards most of the buttons on the Microsoft remote will work immediately. The exceptions I know about are:

  • The Info button; sometimes labelled More or just i.
  • The volume buttons will control the Windows volume setting not the Kodi volume
  • The four coloured buttons (not all MS remotes have these) won’t do anything
  • With Vista/Windows 7 the Live TV, Recorded TV and Guide buttons will start Windows Media Center. With Windows XP (non-Media Center Edition) these buttons won’t do anything
  • The Green/Windows button will start Windows Media Center

For most people this will be fine, and in that case you don’t need to do anything further. The only reason for continuing with this article is if you want to customise the Microsoft remote to change the actions of any of the buttons or to make the Info and coloured buttons work.

3 Useful resources

http://xbmcmce.sourceforge.net/ has various utilities to help with tweaking the button mapping. ShowKey will show you what keypresses or AppCommand messages are being sent, and KeyMapEdit is a utility for editing the keyboard.xml file.

The remainder of this article describes the gory details of configuring the Microsoft remote. This probably looks frighteningly complicated to most of us, but very few people need to read further as EliteGamer360’s scripts and/or the MCERemote add-on should do everything you need. Only the curious and determined need read further.

4 How the MS remote works

The Microsoft remote, or more accurately the eHome device driver, keeps the button configuration in the registry value ReportMappingTable in the key:

This is a binary array consisting of rows of 7 bytes. Each row defines one button. The seven bytes in the row are:

Byte Action
0 button number (see below)
1 always 0
2 always 0
3 always 0
4 04 sends a keystroke; 01 results in a multimedia keypress or WM_APPCOMMAND message; 03 generates a Raw Input message
5 Key modifier or low byte of multimedia command (see below)
6 Key modifier or high byte of multimedia command (see below)

Byte 4 determines what the eHome driver will do when the button is pressed. If byte 4 is set to 03 the eHome driver will generate a «Raw Input» message and if byte 4 is 04 this will cause the button to send a keypress i.e. Windows will react as if a key had been pressed on the keyboard. If byte 4 is 01 the eHome driver will either send either a multimedia keypress or an APPCOMMAND message.

5 Byte 4 = 03: Raw Input messages

If byte 4 is set to 03 the eHome driver will generate a «Raw Input» message, see http://msdn.microsoft.com/en-us/library/ms645536(v=vs.85).aspx. The only raw input messages likely to be useful are:

,00,00,00,03,81,00 System Power: will cause Windows to shut down
,00,00,00,03,82,00 System Sleep: will cause Windows to hibernate
,00,00,00,03,83,00 System Wake: will cause Windows to wake from hibernation

6 Byte 4 = 04: Normal keypresses

If byte 4 is set to 04 then byte 5 contains modifiers like control, shift, alt, etc and byte 6 contains the key code.

The value of byte 5, the key modifier, can be:

Byte Action
0 No modifier
1 Control
2 Shift
3 Control-Shift
4 Alt
5 Control-Alt
6 Shift-Alt
7 Control-Shift-Alt
8 Windows
9 Control-Windows
a Shift-Windows
b Control-Shift-Windows
c Alt-Windows
d Control-Alt-Windows
e Shift-Alt-Windows
f Control-Shift-Alt-Windows

If you’re happy with binary numbers you’ve probably spotted that bit 0 specifies Control, bit 1 specifies Shift, bit 2 specifies Alt and bit 3 specifies the Windows key.

The key code is not an ACSII code or a scan code. It’s an arbitrary code selected by MS. You can find a list of the codes in http://download.microsoft.com/download/1/6/1/161ba512-40e2-4cc9-843a-923143f3456c/translate.pdf. The button numbers obey no obvious logic.

To give a specific example, suppose you want to configure the Play button to send the Media Center keyboard shortcut for «Play», the 7 bytes would be:

Byte Value Notes
Byte 0 16 The number of the Play button is 0x16 (see table below)
Byte 1 00 Bytes 1 to 3 are always zero
Byte 2 00
Byte 3 00
Byte 4 04 The value 0x04 means send a normal keypress
Byte 5 03 Ctrl = 2 and Shift = 1 so 3 = 2 + 1 mean ctrl-shift
Byte 6 13 0x13 is the key code for «P»

7 Byte 4 = 01: Multimedia key or APPCOMMAND message

The Microsoft Multimedia Keyboard and various clones have keys for functions like «Play» and «Stop». If byte 4 is set to 01 the eHome driver may generate a multimedia keyboard keypress. Alternatively, and with no onbvious logic, it may generate the Windows message WM_APPCOMMAND instead. The WM_APPCOMMAND message is used to send commands like «Play», 2Pause», «Stop», etc. See http://msdn.microsoft.com/en-us/library/ms647591(v=vs.85).aspx for details.

The multimedia keys have key codes that can be greater than 255 (0xFF) so they need two bytes to represnt them. Byte 5 is used for the low byte and byte 6 is used for the high byte, though in most cases the high byte will be zero. This means that there is no byte available to specify the key modifiers, so you cannot combine a multimedia keypress with ctrl, shift, alt, etc.

Following on from the example above, suppose you want to configure the Play button to send the Multimedia Play/Pause keypress i.e. Play then Pause the media on alternate presses. The 7 bytes would be:

Byte Value Notes
Byte 0 16 The number of the Play button is 0x16 (see table below)
Byte 1 00 Bytes 1 to 3 are always zero
Byte 2 00
Byte 3 00
Byte 4 01 The value 0x01 means send a multimedia keypress
Byte 5 cd The code for the play/pause key is 0x00CD so put cd as the low byte
Byte 6 00 and 00 as the high byte

The key codes for the multimedia keys are also listed in http://download.microsoft.com/download/1/6/1/161ba512-40e2-4cc9-843a-923143f3456c/translate.pdf. They are the keys with the «HID usage page» set to 0C. The normal keys have the «HID usage page» set to 07.

8 Table of remote button codes

The following table lists all the known button numbers. Thanks to the many people who put effort into discovering these numbers.

Button no. Button name Comments
00 0 Standard MS remote
01 1 Standard MS remote
02 2 Standard MS remote
03 3 Standard MS remote
04 4 Standard MS remote
05 5 Standard MS remote
06 6 Standard MS remote
07 7 Standard MS remote
08 8 Standard MS remote
09 9 Standard MS remote
0A Clear Standard MS remote
Logitech Harmony One
0B Enter Standard MS remote
0C Main Power Standard MS remote
Logitech Harmony One (PowerToggle)
0D Windows Standard MS remote
0E Mute Standard MS remote
This button does not work on the 360 universal remote
Logitech Harmony One
0F Info/More Standard MS remote
Logitech Harmony One (Info)
10 Volume Up Standard MS remote
This button does not work on the 360 universal remote
Logitech Harmony One
11 Volume Down Standard MS remote
This button does not work on the 360 universal remote
Logitech Harmony One
12 Channel Up Standard MS remote
13 Channel Down Standard MS remote
14 Fast Forward Standard MS remote
15 Rewind Standard MS remote
16 Play Standard MS remote
17 Record Standard MS remote
18 Pause Standard MS remote
19 Stop Standard MS remote
1A Next/Skip Standard MS remote
1B Previous/Replay Standard MS remote
1C #/Refresh Labelled with a curved arrow (meaning refresh) on the 360 universal remote.
1D */100 Labelled «100» on the 360 universal remote.
1E Up Standard MS remote
1F Down Standard MS remote
20 Left Standard MS remote
21 Right Standard MS remote
22 OK Standard MS remote
23 Back Standard MS remote
24 DVD Menu Standard MS remote
Logitech Harmony One
25 Live TV, Red (B) Red button labelled «B» on the 360 universal remote
Logitech Harmony One
26 TV Guide, Yellow (Y) Yellow button labelled «Y» on the 360 universal remote
Logitech Harmony One (Menu)
27 Zoom/Aspect Ratio Top left button on the Asrock and Mediagate remotes
28 Open/Close Only on XBox 360 universal remote
29 Discrete Power On Present on the Harmony universal remote
2A Discrete Power Off Present on the Harmony universal remote
32 Visualisation
33 Slideshow
34 Eject
3B Close App
46 My TV Logitech Harmony One
47 Music Library Present on the Asrock remote
Logitech Harmony One (MyMusic)
48 Recorded TV Standard MS remote
Logitech Harmony One
49 Picture Library Present on the Asrock remote
Logitech Harmony One (MyPictures)
4A Video Library Present on the Asrock remote
Logitech Harmony One (MyVideos)
4B DVD Angle Present on the Mediagate MG-IR02BK remote
4C DVD Audio Present on the Mediagate MG-IR02BK remote
4D Subtitles Present on the Mediagate MG-IR02BK remote
4E Print Labelled «Print» on the HP remote
4F Display Labelled «Display» on the 360 universal remote
50 Radio Present on the Asrock remote
Logitech Harmony One (MyRadio)
51 Title Labelled «Title» on the 360 universal remote
5A Teletext On some, but not all, models of the MS remote and many compatibles
5B Red teletext button On the v2 Microsoft remote
5C Green teletext button On the v2 Microsoft remote
5D Yellow teletext button On the v2 Microsoft remote
5E Blue teletext button On the v2 Microsoft remote
64 XBox button Large «X» button on the 360 universal remote
66 Green (A) Green button labelled «A» on the 360 universal remote
68 Blue (X) Blue button labelled «X» on the 360 universal remote
6C Channel Up Channel up button on the 360 universal remote. Note that the standard MS remote uses number 12 for this button.
6D Channel Down Channel down button on the 360 universal remote. Note that the standard MS remote uses number 13 for this button.
6E Play/Pause You can configure the button to send VK_MEDIA_PLAY_PAUSE using 6e,00,00,00,01,cd,00

9 Table of key codes

This data is taken from http://download.microsoft.com/download/1/6/1/161ba512-40e2-4cc9-843a-923143f3456c/translate.pdf. The data has been reproduced here just in case Microsoft ever remove the link to the tranlate.pdf file:

Key Code
aA 04
bB 05
cC 06
dD 07
eE 08
fF 09
gG 0A
hH 0B
iI 0C
jJ 0D
kK 0E
lL 0F
mM 10
nN 11
oO 12
pP 13
qQ 14
rR 15
sS 16
tT 17
uU 18
vV 19
wW 1A
xX 1B
yY 1C
zZ 1D
1! 1E
[email protected] 1F
3# 20
4$ 21
5% 22
6^ 23
7& 24
8* 25
9( 26
0) 27
Return 28
Escape 29
Backspace 2A
Tab 2B
Space 2C
-_ 2D
=+ 2E
[ < 2F
]> 30
31
Europe 1 32
;: 33
‘» 34
`

35
, 37
/? 38
Caps Lock 39
F1 3A
F2 3B
F3 3C
F4 3D
F5 3E
F6 3F
F7 40
F8 41
F9 42
F10 43
F11 44
F12 45
Print Screen 46
Scroll Lock 47
Break (Ctrl-Pause) 48
Pause 48
Insert 49
Home 4A
Page Up 4B
Delete 4C
End 4D
Page Down 4E
Right Arrow 4F
Left Arrow 50
Down Arrow 51
Up Arrow 52
Num Lock 53
Keypad / 54
Keypad * 55
Keypad — 56
Keypad + 57
Keypad Enter 58
Keypad 1 End 59
Keypad 2 Down 5A
Keypad 3 PageDn 5B
Keypad 4 Left 5C
Keypad 5 5D
Keypad 6 Right 5E
Keypad 7 Home 5F
Keypad 8 Up 60
Keypad 9 PageUp 61
Keypad 0 Insert 62
Keypad . Delete 63
Europe 2 64
App 65
Keyboard Power 66
Keypad = 67
F13 68
F14 69
F15 6A
F16 6B
F17 6C
F18 6D
F19 6E
F20 6F
F21 70
F22 71
F23 72
F24 73
Keyboard Execute 74
Keyboard Help 75
Keyboard Menu 76
Keyboard Select 77
Keyboard Stop 78
Keyboard Again 79
Keyboard Undo 7A
Keyboard Cut 7B
Keyboard Copy 7C
Keyboard Paste 7D
Keyboard Find 7E
Keyboard Mute 7F
Keyboard Volume Up 80
Keyboard Volume Dn 81
Caps Lock 82
Num Lock 83
Scroll Lock 84
Keypad , Brazilian Keypad . 85
Keyboard Equal Sign 86
Keyboard Int’l 1 87
Keyboard Int’l 2 88
Keyboard Int’l 2 89
Keyboard Int’l 4 8A
Keyboard Int’l 5 8B
Keyboard Int’l 6 8C
Keyboard Int’l 7 8D
Keyboard Int’l 8 8E
Keyboard Int’l 9 8F
Keyboard Lang 1 90
Keyboard Lang 2 91
Keyboard Lang 3 92
Keyboard Lang 4 93
Keyboard Lang 5 94
Keyboard Lang 6 95
Keyboard Lang 7 96
Keyboard Lang 8 97
Keyboard Alternate 98
Erase 99
SysReq/Attention 9A
Keyboard Cancel 9B
Keyboard Clear 9C
Keyboard Prior 9D
Keyboard Return 9E
Keyboard Separator 9F
Keyboard Out A0
Keyboard Oper A1
Keyboard Clear/Again A2
Keyboard CrSel/Props A3
Keyboard ExSel A4
Left Control E0
Left Shift E1
Left Alt E2
Left GUI E3
Right Control E4
Right Shift E5
Right Alt E6
Right GUI E7

10 Multimedia keys

The following has been established by experiment. There is no guarantee that the behaviour will be the same on all platforms.

Windows normally responds to Multimedia keypresses by generating WM_APPCOMMAND messages, so for example the Stop command, 00B7, generates both a VK_MEDIA_STOP keypress and a WM_APPCOMMAND 13 — Stop message.

Источник

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *

  • Windows matros официальный сайт
  • Windows master control panel
  • Windows marketplace windows mobile
  • Windows market не работает
  • Windows market не запускается