[solved] Remote Control Multiple Keypress Problem Solved with EventGhost (1 Viewer)

benicehavefun

Portal Member
September 12, 2014
42
10
Home Country
United States of America United States of America
Here are a few details regarding my recent success with using EventGhost to handle the IR input from my remote and eliminate unwanted key repeats. Hopefully this will prove useful to others with a similar issue:

I recently upgraded my HTPC to an i5 after an number of years using MePo v1 on a Core Duo. Although this was a fantastic change overall, my previously flawless IR receiver (via a Hauppauge HVR-2250 tuner card) started generating lots of unwanted multiple keypresses. I adjusted the "RepeatDelay=" setting in Hauppauge's irremote.ini to the maximum (10), I adjusted the setting (under device troubleshooting) in my Logitech Harmony One remote to the minimum (0) and I relocated and partially covered the Hauppauge IR receiver to reduce its sensitivity. Each of these helped somewhat, but the occasional (and most annoying) double keypresses persisted!

I originally turned to EventGhost in the hopes that it would do the same job as the Hauppauge "ir.exe/irremote.ini" program and settings file, with the possibility of adding some sort of keyfilter to eliminate my problem. Amazingly, not only is EventGhost doing the exact same job as the Hauppauge IR program -- my multiple keypresses have disappeared! No keyfilter needed. I'm using the same sort of approach that Hauppauge uses, which is that each keypress generates a specific keyboard shortcut based on the currently active program. So far I've created remote control commands for MediaPortal and for Kodi, with EventGhost generating the correct keyboard shortcut depending on which is active.

Here are the steps in Windows 7:

1. Download EventGhost from eventghost.org
2. Right click on the Hauppauge IR program in your system tray and click "Exit"
3. Remove the Hauppauge IR program from your "Startup" directory (right click and delete)
4. Save the attached XML file as "Hauppauge Infrared.xml" in the "C:\Program Files (x86)\EventGhost" folder
5. Install EventGhost and launch it
6. In the the EventGhost window, use the File - Open dropdown and select "Hauppauge Infrared.xml" from the default folder
7. Launch MediaPortal v1 and test with your Hauppauge remote. A universal remote previously programmed to run your home theater should work too.

XML:
<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="1722" Guid="{A5F76EC3-85AE-4CDA-94B6-05C56F6BD6C7}" Time="1467485951.9">
    <Autostart Name="Autostart">
        <Plugin Identifier="HauppaugeIR" Guid="{B54E7F32-E117-4C24-A892-9D69BC290568}" File="HauppaugeIR">
            gAIoTSwBS1qIiUvIdHEALg==
        </Plugin>
        <Plugin Identifier="Task" Guid="{D1748551-C605-4423-B392-FB77E6842437}" File="Task">
            gAIpLg==
        </Plugin>
    </Autostart>
    <Macro Name="Enable exclusive: MediaPortal">
        <Event Name="Task.Activated.MediaPortal" />
        <Action>
            EventGhost.EnableExclusive(XmlIdLink(12))
        </Action>
    </Macro>
    <Macro Name="Enable exclusive: Kodi">
        <Event Name="Task.Activated.Kodi" />
        <Action>
            EventGhost.EnableExclusive(XmlIdLink(118))
        </Action>
    </Macro>
    <Folder Name="Applications">
        <Folder Name="MediaPortal" id="12">
            <Macro Name="Emulate Keystrokes: 0">
                <Event Name="HauppaugeIR.0" />
                <Action>
                    Window.SendKeys(u'0', False, 2)
                </Action>
            </Macro>
            <Macro Name="Emulate Keystrokes: 1">
                <Event Name="HauppaugeIR.1" />
                <Action>
                    Window.SendKeys(u'1', False, 2)
                </Action>
            </Macro>
            <Macro Name="Emulate Keystrokes: 2">
                <Event Name="HauppaugeIR.2" />
                <Action>
                    Window.SendKeys(u'2', False, 2)
                </Action>
            </Macro>
            <Macro Name="Emulate Keystrokes: 3">
                <Event Name="HauppaugeIR.3" />
                <Action>
                    Window.SendKeys(u'3', False, 2)
                </Action>
            </Macro>
            <Macro Name="Emulate Keystrokes: 4">
                <Event Name="HauppaugeIR.4" />
                <Action>
                    Window.SendKeys(u'4', False, 2)
                </Action>
            </Macro>
            <Macro Name="Emulate Keystrokes: 5">
                <Event Name="HauppaugeIR.5" />
                <Action>
                    Window.SendKeys(u'5', False, 2)
                </Action>
            </Macro>
            <Macro Name="Emulate Keystrokes: 6">
                <Event Name="HauppaugeIR.6" />
                <Action>
                    Window.SendKeys(u'6', False, 2)
                </Action>
            </Macro>
            <Macro Name="Emulate Keystrokes: 7">
                <Event Name="HauppaugeIR.7" />
                <Action>
                    Window.SendKeys(u'7', False, 2)
                </Action>
            </Macro>
            <Macro Name="Emulate Keystrokes: 8">
                <Event Name="HauppaugeIR.8" />
                <Action>
                    Window.SendKeys(u'8', False, 2)
                </Action>
            </Macro>
            <Macro Name="Emulate Keystrokes: 9">
                <Event Name="HauppaugeIR.9" />
                <Action>
                    Window.SendKeys(u'9', False, 2)
                </Action>
            </Macro>
            <Macro Name="Emulate Keystrokes: Exit">
                <Event Name="HauppaugeIR.35" />
                <Action>
                    Window.SendKeys(u'{Escape}', False, 2)
                </Action>
            </Macro>
            <Macro Name="Emulate Keystrokes: Window Mode (Blue -Touchscreen)">
                <Event Name="HauppaugeIR.94" />
                <Action>
                    Window.SendKeys(u'{Alt+Return}', False, 2)
                </Action>
            </Macro>
            <Macro Name="Emulate Keystrokes: Channel Down">
                <Event Name="HauppaugeIR.18" />
                <Action>
                    Window.SendKeys(u'{F8}', False, 2)
                </Action>
            </Macro>
            <Macro Name="Emulate Keystrokes: Channel Up">
                <Event Name="HauppaugeIR.19" />
                <Action>
                    Window.SendKeys(u'{F7}', False, 2)
                </Action>
            </Macro>
            <Macro Name="Emulate Keystrokes: Last Channel (Clear)">
                <Event Name="HauppaugeIR.10" />
                <Action>
                    Window.SendKeys(u'0', False, 2)
                </Action>
            </Macro>
            <Macro Name="Emulate Keystrokes: Fast Forward">
                <Event Name="HauppaugeIR.20" />
                <Action>
                    Window.SendKeys(u'{F6}', False, 2)
                </Action>
            </Macro>
            <Macro Name="Emulate Keystrokes: Page Up (Green)">
                <Event Name="HauppaugeIR.92" />
                <Action>
                    Window.SendKeys(u'{PageUp}', False, 2)
                </Action>
            </Macro>
            <Macro Name="Emulate Keystrokes: Guide">
                <Event Name="HauppaugeIR.38" />
                <Action>
                    Window.SendKeys(u'e', False, 2)
                </Action>
            </Macro>
            <Macro Name="Emulate Keystrokes: Live TV (Touchscreen)">
                <Event Name="HauppaugeIR.37" />
                <Action>
                    Window.SendKeys(u'x', False, 2)
                </Action>
            </Macro>
            <Macro Name="Emulate Keystrokes: Info">
                <Event Name="HauppaugeIR.15" />
                <Action>
                    Window.SendKeys(u'y', False, 2)
                </Action>
            </Macro>
            <Macro Name="Emulate Keystrokes: Menu (Green Jewel)">
                <Event Name="HauppaugeIR.13" />
                <Action>
                    Window.SendKeys(u'h', False, 2)
                </Action>
            </Macro>
            <Macro Name="Emulate Keystrokes: +">
                <Event Name="HauppaugeIR.29" />
                <Action>
                    Window.SendKeys(u'*', False, 2)
                </Action>
            </Macro>
            <Macro Name="Emulate Keystrokes: {Down}">
                <Event Name="HauppaugeIR.31" />
                <Action>
                    Window.SendKeys(u'{Down}', False, 2)
                </Action>
            </Macro>
            <Macro Name="Emulate Keystrokes: {Left}">
                <Event Name="HauppaugeIR.32" />
                <Action>
                    Window.SendKeys(u'{Left}', False, 2)
                </Action>
            </Macro>
            <Macro Name="Emulate Keystrokes: {Right}">
                <Event Name="HauppaugeIR.33" />
                <Action>
                    Window.SendKeys(u'{Right}', False, 2)
                </Action>
            </Macro>
            <Macro Name="Emulate Keystrokes: {Up}">
                <Event Name="HauppaugeIR.30" />
                <Action>
                    Window.SendKeys(u'{Up}', False, 2)
                </Action>
            </Macro>
            <Macro Name="Emulate Keystrokes: OK">
                <Event Name="HauppaugeIR.34" />
                <Action>
                    Window.SendKeys(u'{Return}', False, 2)
                </Action>
            </Macro>
            <Macro Name="Emulate Keystrokes: Pause">
                <Event Name="HauppaugeIR.24" />
                <Action>
                    Window.SendKeys(u'{Space}', False, 2)
                </Action>
            </Macro>
            <Macro Name="Emulate Keystrokes: Play">
                <Event Name="HauppaugeIR.22" />
                <Action>
                    Window.SendKeys(u'p', False, 2)
                </Action>
            </Macro>
            <Macro Name="Emulate Keystrokes: Record">
                <Event Name="HauppaugeIR.23" />
                <Action>
                    Window.SendKeys(u'r', False, 2)
                </Action>
            </Macro>
            <Macro Name="Emulate Keystrokes: Recorded TV (Touchscreen)">
                <Event Name="HauppaugeIR.72" />
                <Action>
                    Window.SendKeys(u'z', False, 2)
                </Action>
            </Macro>
            <Macro Name="Emulate Keystrokes: Page Down (Red)">
                <Event Name="HauppaugeIR.91" />
                <Action>
                    Window.SendKeys(u'{PageDown}', False, 2)
                </Action>
            </Macro>
            <Macro Name="Emulate Keystrokes: Rewind">
                <Event Name="HauppaugeIR.21" />
                <Action>
                    Window.SendKeys(u'{F5}', False, 2)
                </Action>
            </Macro>
            <Macro Name="Emulate Keystrokes: Skip Forward">
                <Event Name="HauppaugeIR.26" />
                <Action>
                    Window.SendKeys(u'{Right}', False, 2)
                </Action>
            </Macro>
            <Macro Name="Emulate Keystrokes: Skip Back">
                <Event Name="HauppaugeIR.27" />
                <Action>
                    Window.SendKeys(u'{Left}', False, 2)
                </Action>
            </Macro>
            <Macro Name="Emulate Keystrokes: Stop">
                <Event Name="HauppaugeIR.25" />
                <Action>
                    Window.SendKeys(u'b', False, 2)
                </Action>
            </Macro>
            <Macro Name="Emulate Keystrokes: Subtitles">
                <Event Name="HauppaugeIR.90" />
                <Action>
                    Window.SendKeys(u'l', False, 2)
                </Action>
            </Macro>
            <Macro Name="Emulate Keystrokes: Contextual (Yellow - Touchscreen)">
                <Event Name="HauppaugeIR.93" />
                <Action>
                    Window.SendKeys(u'{F9}', False, 2)
                </Action>
            </Macro>
        </Folder>
        <Folder Name="Kodi" id="118" Enabled="False">
            <Macro Name="Emulate Keystrokes: 0">
                <Event Name="HauppaugeIR.0" />
                <Action>
                    Window.SendKeys(u'0', False, 2)
                </Action>
            </Macro>
            <Macro Name="Emulate Keystrokes: 1">
                <Event Name="HauppaugeIR.1" />
                <Action>
                    Window.SendKeys(u'1', False, 2)
                </Action>
            </Macro>
            <Macro Name="Emulate Keystrokes: 2">
                <Event Name="HauppaugeIR.2" />
                <Action>
                    Window.SendKeys(u'2', False, 2)
                </Action>
            </Macro>
            <Macro Name="Emulate Keystrokes: 3">
                <Event Name="HauppaugeIR.3" />
                <Action>
                    Window.SendKeys(u'3', False, 2)
                </Action>
            </Macro>
            <Macro Name="Emulate Keystrokes: 4">
                <Event Name="HauppaugeIR.4" />
                <Action>
                    Window.SendKeys(u'4', False, 2)
                </Action>
            </Macro>
            <Macro Name="Emulate Keystrokes: 5">
                <Event Name="HauppaugeIR.5" />
                <Action>
                    Window.SendKeys(u'5', False, 2)
                </Action>
            </Macro>
            <Macro Name="Emulate Keystrokes: 6">
                <Event Name="HauppaugeIR.6" />
                <Action>
                    Window.SendKeys(u'6', False, 2)
                </Action>
            </Macro>
            <Macro Name="Emulate Keystrokes: 7">
                <Event Name="HauppaugeIR.7" />
                <Action>
                    Window.SendKeys(u'7', False, 2)
                </Action>
            </Macro>
            <Macro Name="Emulate Keystrokes: 8">
                <Event Name="HauppaugeIR.8" />
                <Action>
                    Window.SendKeys(u'8', False, 2)
                </Action>
            </Macro>
            <Macro Name="Emulate Keystrokes: 9">
                <Event Name="HauppaugeIR.9" />
                <Action>
                    Window.SendKeys(u'9', False, 2)
                </Action>
            </Macro>
            <Macro Name="Emulate Keystrokes: Exit">
                <Event Name="HauppaugeIR.35" />
                <Action>
                    Window.SendKeys(u'{Escape}', False, 2)
                </Action>
            </Macro>
            <Macro Name="Emulate Keystrokes: Window Mode (Blue -Touchscreen)">
                <Event Name="HauppaugeIR.94" />
                <Action>
                    Window.SendKeys(u'\\', False, 2)
                </Action>
            </Macro>
            <Macro Name="Emulate Keystrokes: Channel Down">
                <Event Name="HauppaugeIR.18" />
                <Action>
                    Window.SendKeys(u'{PageDown}', False, 2)
                </Action>
            </Macro>
            <Macro Name="Emulate Keystrokes: Channel Up">
                <Event Name="HauppaugeIR.19" />
                <Action>
                    Window.SendKeys(u'{PageUp}', False, 2)
                </Action>
            </Macro>
            <Macro Name="Emulate Keystrokes: Last Channel (Clear)">
                <Event Name="HauppaugeIR.10" />
                <Action>
                    Window.SendKeys(u'0', False, 2)
                </Action>
            </Macro>
            <Macro Name="Emulate Keystrokes: Fast Forward">
                <Event Name="HauppaugeIR.20" />
                <Action>
                    Window.SendKeys(u'f', False, 2)
                </Action>
            </Macro>
            <Macro Name="Emulate Keystrokes: Page Up (Green)">
                <Event Name="HauppaugeIR.92" />
                <Action>
                    Window.SendKeys(u'{PageUp}', False, 2)
                </Action>
            </Macro>
            <Macro Name="Emulate Keystrokes: Guide">
                <Event Name="HauppaugeIR.38" />
                <Action>
                    Window.SendKeys(u'e', False, 2)
                </Action>
            </Macro>
            <Macro Name="Emulate Keystrokes: Info">
                <Event Name="HauppaugeIR.15" />
                <Action>
                    Window.SendKeys(u'm', False, 2)
                </Action>
            </Macro>
            <Macro Name="Emulate Keystrokes: Menu (Green Jewel)">
                <Event Name="HauppaugeIR.13" />
                <Action>
                    Window.SendKeys(u's', False, 2)
                </Action>
            </Macro>
            <Macro Name="Emulate Keystrokes: {Down}">
                <Event Name="HauppaugeIR.31" />
                <Action>
                    Window.SendKeys(u'{Down}', False, 2)
                </Action>
            </Macro>
            <Macro Name="Emulate Keystrokes: {Left}">
                <Event Name="HauppaugeIR.32" />
                <Action>
                    Window.SendKeys(u'{Left}', False, 2)
                </Action>
            </Macro>
            <Macro Name="Emulate Keystrokes: {Right}">
                <Event Name="HauppaugeIR.33" />
                <Action>
                    Window.SendKeys(u'{Right}', False, 2)
                </Action>
            </Macro>
            <Macro Name="Emulate Keystrokes: {Up}">
                <Event Name="HauppaugeIR.30" />
                <Action>
                    Window.SendKeys(u'{Up}', False, 2)
                </Action>
            </Macro>
            <Macro Name="Emulate Keystrokes: OK">
                <Event Name="HauppaugeIR.34" />
                <Action>
                    Window.SendKeys(u'{Return}', False, 2)
                </Action>
            </Macro>
            <Macro Name="Emulate Keystrokes: Pause">
                <Event Name="HauppaugeIR.24" />
                <Action>
                    Window.SendKeys(u'{Space}', False, 2)
                </Action>
            </Macro>
            <Macro Name="Emulate Keystrokes: Play">
                <Event Name="HauppaugeIR.22" />
                <Action>
                    Window.SendKeys(u'p', False, 2)
                </Action>
            </Macro>
            <Macro Name="Emulate Keystrokes: Page Down (Red)">
                <Event Name="HauppaugeIR.91" />
                <Action>
                    Window.SendKeys(u'{PageDown}', False, 2)
                </Action>
            </Macro>
            <Macro Name="Emulate Keystrokes: Rewind">
                <Event Name="HauppaugeIR.21" />
                <Action>
                    Window.SendKeys(u'r', False, 2)
                </Action>
            </Macro>
            <Macro Name="Emulate Keystrokes: Skip Forward">
                <Event Name="HauppaugeIR.26" />
                <Action>
                    Window.SendKeys(u'{Right}', False, 2)
                </Action>
            </Macro>
            <Macro Name="Emulate Keystrokes: Skip Back">
                <Event Name="HauppaugeIR.27" />
                <Action>
                    Window.SendKeys(u'{Left}', False, 2)
                </Action>
            </Macro>
            <Macro Name="Emulate Keystrokes: Stop">
                <Event Name="HauppaugeIR.25" />
                <Action>
                    Window.SendKeys(u'x', False, 2)
                </Action>
            </Macro>
            <Macro Name="Emulate Keystrokes: Contextual (Yellow - Touchscreen)">
                <Event Name="HauppaugeIR.93" />
                <Action>
                    Window.SendKeys(u'c', False, 2)
                </Action>
            </Macro>
        </Folder>
    </Folder>
</EventGhost>


EventGhost has fixed my problem with unwanted key repeats and has given me a platform for adding whatever hotkeys, macros or home automation functions I may want to add to my HTPC in the future...

Scott
 

Attachments

  • Hauppauge Infrared.xml
    17.4 KB

Users who are viewing this thread

Top Bottom