<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://mediacentersandbox.com/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Windows Media Center Managed Code Obect Model</title><link>http://mediacentersandbox.com/forums/6/ShowForum.aspx</link><description>Discuss the managed code object model available to Windows Media Center applications.</description><dc:language>en-US</dc:language><generator>CommunityServer 2.0 (Build: 60217.2664)</generator><item><title>Re: Capturing '#' and '*' from remote control input</title><link>http://mediacentersandbox.com/forums/thread/9591.aspx</link><pubDate>Thu, 04 Mar 2010 00:19:52 GMT</pubDate><guid isPermaLink="false">edf2c9e4-3a2f-48fb-a021-c4ce4a1a3ed1:9591</guid><dc:creator>eddyc</dc:creator><slash:comments>0</slash:comments><comments>http://mediacentersandbox.com/forums/thread/9591.aspx</comments><wfw:commentRss>http://mediacentersandbox.com/forums/commentrss.aspx?SectionID=6&amp;PostID=9591</wfw:commentRss><description>Okay, got to the bottom of why my original hook wasn't working.&lt;br /&gt;&lt;br /&gt;For reasons not relevant here, I was relying on WM_KEYUP rather than WM_KEYDOWN events to detect when a key had been pressed. Also, my actual keyboard hook was in a lower level library I wrote ages ago and had more or less forgotten about.&lt;br /&gt;&lt;br /&gt;That library takes in the discrete keypresses like SHIFT, 3, etc. and uses the modifier keys (Shift, Ctrl, Alt, Win) to set modifier flags for any subsequent normal keystrokes that arrive. It then passes composite key-down/key-up events to my application code which doesn't have to worry about SHIFT being handled as a separate key.&lt;br /&gt;&lt;br /&gt;So, # gets treated as a [SHIFT-Down] [3-Down] [3-Up] [SHIFT-UP] sequence which turns into a KeyDown(3+Shift) / KeyUp (3+Shift) event.&lt;br /&gt;&lt;br /&gt;That's what happens for keyboard input anyway. Remote button input is slightly different: the raw sequence is [SHIFT-Down] [3-Down] [SHIFT-Up] [3-Up], which turns into KeyDown(3+Shift) / KeyUp (3). This is why my #'s were coming out as 3's.&lt;br /&gt;&lt;br /&gt;Now fixed by making my low-level library a little smarter about how it deals with modifiers for key-up events.</description></item><item><title>Re: Capturing '#' and '*' from remote control input</title><link>http://mediacentersandbox.com/forums/thread/9587.aspx</link><pubDate>Wed, 03 Mar 2010 00:21:27 GMT</pubDate><guid isPermaLink="false">edf2c9e4-3a2f-48fb-a021-c4ce4a1a3ed1:9587</guid><dc:creator>eddyc</dc:creator><slash:comments>0</slash:comments><comments>http://mediacentersandbox.com/forums/thread/9587.aspx</comments><wfw:commentRss>http://mediacentersandbox.com/forums/commentrss.aspx?SectionID=6&amp;PostID=9587</wfw:commentRss><description>&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/default/images/icon-quote.gif"&gt; &lt;strong&gt;davidtjudd:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;Here is an implementation that will hook HID remote, keyboard and mouse events. http://code.google.com/p/open-media-library/source/browse/trunk/Library/Code/V3/Controls/MoreInfoHooker.cs&lt;/div&gt;&lt;/BLOCKQUOTE&gt;Very useful example - exactly what I need!&lt;br /&gt;&lt;br /&gt;Much obliged,&lt;br /&gt;&lt;br /&gt;Eddy</description></item><item><title>Re: Capturing '#' and '*' from remote control input</title><link>http://mediacentersandbox.com/forums/thread/9586.aspx</link><pubDate>Tue, 02 Mar 2010 23:37:39 GMT</pubDate><guid isPermaLink="false">edf2c9e4-3a2f-48fb-a021-c4ce4a1a3ed1:9586</guid><dc:creator>davidtjudd</dc:creator><slash:comments>0</slash:comments><comments>http://mediacentersandbox.com/forums/thread/9586.aspx</comments><wfw:commentRss>http://mediacentersandbox.com/forums/commentrss.aspx?SectionID=6&amp;PostID=9586</wfw:commentRss><description>My bad, I didn't pay attention to your whole post. Ya, you wil need to handle it as raw. Here is an implementation that will hook HID remote, keyboard and mouse events. http://code.google.com/p/open-media-library/source/browse/trunk/Library/Code/V3/Controls/MoreInfoHooker.cs</description></item><item><title>Re: Capturing '#' and '*' from remote control input</title><link>http://mediacentersandbox.com/forums/thread/9585.aspx</link><pubDate>Tue, 02 Mar 2010 22:52:05 GMT</pubDate><guid isPermaLink="false">edf2c9e4-3a2f-48fb-a021-c4ce4a1a3ed1:9585</guid><dc:creator>eddyc</dc:creator><slash:comments>0</slash:comments><comments>http://mediacentersandbox.com/forums/thread/9585.aspx</comments><wfw:commentRss>http://mediacentersandbox.com/forums/commentrss.aspx?SectionID=6&amp;PostID=9585</wfw:commentRss><description>Thanks for the comments, guys. As I mentioned, though, the modifier flags are not being set for the remote keypresses (even though you would expect them to be) -- pressing the same keys on the keyboard produces events with the Shift bit correctly set in the modifiers.&lt;br /&gt;&lt;br /&gt;(I checked all the fields in the event I receive, just in case there's some other way of identifying them, but no.)  It's as if whatever low-level input handler accepts the remote keystrokes and maps them to keyboard equivalents is just forgetting to set the shift flag for those two keys.&lt;br /&gt;&lt;br /&gt;Unfortunately, going the MCML route is not an option since this is for a background plug-in.&lt;br /&gt;&lt;br /&gt;I guess I'll have to switch to GetRawInputData, as described in http://discuss.mediacentersandbox.com/forums/thread/8732.aspx.&lt;br /&gt;</description></item><item><title>Re: Capturing '#' and '*' from remote control input</title><link>http://mediacentersandbox.com/forums/thread/9584.aspx</link><pubDate>Tue, 02 Mar 2010 21:13:49 GMT</pubDate><guid isPermaLink="false">edf2c9e4-3a2f-48fb-a021-c4ce4a1a3ed1:9584</guid><dc:creator>AndyC</dc:creator><slash:comments>0</slash:comments><comments>http://mediacentersandbox.com/forums/thread/9584.aspx</comments><wfw:commentRss>http://mediacentersandbox.com/forums/commentrss.aspx?SectionID=6&amp;PostID=9584</wfw:commentRss><description>If the modifiers aren't coming through for the remote in the global hook, you may have to capture them in MCML instead and create an event specifically for them to pass to your input handling routine.&lt;br /&gt;&lt;br /&gt;Cheers,&lt;br /&gt;Andrew</description></item><item><title>Re: Capturing '#' and '*' from remote control input</title><link>http://mediacentersandbox.com/forums/thread/9582.aspx</link><pubDate>Tue, 02 Mar 2010 20:14:21 GMT</pubDate><guid isPermaLink="false">edf2c9e4-3a2f-48fb-a021-c4ce4a1a3ed1:9582</guid><dc:creator>davidtjudd</dc:creator><slash:comments>0</slash:comments><comments>http://mediacentersandbox.com/forums/thread/9582.aspx</comments><wfw:commentRss>http://mediacentersandbox.com/forums/commentrss.aspx?SectionID=6&amp;PostID=9582</wfw:commentRss><description>Might want to check the modifier keys</description></item><item><title>Capturing '#' and '*' from remote control input</title><link>http://mediacentersandbox.com/forums/thread/9580.aspx</link><pubDate>Tue, 02 Mar 2010 10:08:39 GMT</pubDate><guid isPermaLink="false">edf2c9e4-3a2f-48fb-a021-c4ce4a1a3ed1:9580</guid><dc:creator>eddyc</dc:creator><slash:comments>0</slash:comments><comments>http://mediacentersandbox.com/forums/thread/9580.aspx</comments><wfw:commentRss>http://mediacentersandbox.com/forums/commentrss.aspx?SectionID=6&amp;PostID=9580</wfw:commentRss><description>I've installed a keyboard handler using WH_KEYBOARD_LL with SetWindowsHookEx(). This lets me monitor all keyboard input for shortcuts.&lt;br /&gt;&lt;br /&gt;I can also see the numbers coming from the remote control, but the '*' and '#' remote buttons are treated strangely -- they arrive in as digit '8' and '3' respectively, with no shift modifier set. This makes it impossible to distinguish them from the normal 8' and '3' keys on the remote.&lt;br /&gt;&lt;br /&gt;Typing the same characters on the keyboard works fine, and they have the Shift modifier flag set.&lt;br /&gt;&lt;br /&gt;Am I missing something obvious here? Do I need to switch to a different sort of keyboard capture to detect the punctuation keys?&lt;br /&gt;&lt;br /&gt;(This is a for a background plug-in, so normal MCML key capturing isn't an option.)</description></item></channel></rss>