locked
Use MCE Remote Control Key

    Question

  • 1. I can use Mute and Volume up/Down buttons by a MCE Remote Control. However I failed to make Arrow Keys available by using VirtualKey::Up, Down, .etc in the KeyDown/Up function. Remote reacts to Forward and Backward that should be for Arrow Keys.

    How to make Remote work?

    2. Another problem is VirtualKey::Menu was supposed as Alt key but in my Windows 8.1 app it acts as Windows Key. That is confusion.

    3. I know how to use Ctrl+P in C++ but how about Ctrl+Shift+P virtual key?

    Monday, February 17, 2014 4:37 PM

Answers

  • The only way for your app to get input from the remote is through key events. You can listen to the events to see which ones are sent for different keys.

    It is possible that not all keys on the remote will come through to your app, but I'm pretty sure the Play/Pause button should come through as VK_MEDIA_PLAY_PAUSE (0xB3). If you aren't getting it on the Xaml key events try the CoreWindow key events.

    Media keys in particular may be captured by the media system and handled directly through that. See  How to use the system media transport controls

    I don't have an MCE Remote to play with so I cannot provide more details. Somebody else from the community may have one and be able to report on their experiences.

    --Rob

    • Marked as answer by Charlie C. Li Tuesday, February 18, 2014 9:13 PM
    Tuesday, February 18, 2014 3:58 PM
    Owner
  • Thanks Rob. By casting VK_MEDIA_PLAY_PAUSE I made play button work. Looks like the definition of VirtualKey is incomplete.
    • Marked as answer by Charlie C. Li Tuesday, February 18, 2014 9:13 PM
    Tuesday, February 18, 2014 9:13 PM

All replies

  • Test which keys the remote sends by handling KeyDown and KeyUp events and examining the VirtualKey. It is possible that not all of the remotes keys will come through to the app.

    --Rob

    Monday, February 17, 2014 4:41 PM
    Owner
  • Now I can use arrow buttons on MCE Remote Control. Don't know why? But the Play button is still no reaction.

    My remote control worked fine when I opened a video from Video category: when I pressed play button a volume and a play bar was displayed. However in my app there was no play bar. The question is what key can active the play bar? Are there any sample code clips to use MCE remote control?

    Tuesday, February 18, 2014 3:40 PM
  • The only way for your app to get input from the remote is through key events. You can listen to the events to see which ones are sent for different keys.

    It is possible that not all keys on the remote will come through to your app, but I'm pretty sure the Play/Pause button should come through as VK_MEDIA_PLAY_PAUSE (0xB3). If you aren't getting it on the Xaml key events try the CoreWindow key events.

    Media keys in particular may be captured by the media system and handled directly through that. See  How to use the system media transport controls

    I don't have an MCE Remote to play with so I cannot provide more details. Somebody else from the community may have one and be able to report on their experiences.

    --Rob

    • Marked as answer by Charlie C. Li Tuesday, February 18, 2014 9:13 PM
    Tuesday, February 18, 2014 3:58 PM
    Owner
  • Thanks Rob. By casting VK_MEDIA_PLAY_PAUSE I made play button work. Looks like the definition of VirtualKey is incomplete.
    • Marked as answer by Charlie C. Li Tuesday, February 18, 2014 9:13 PM
    Tuesday, February 18, 2014 9:13 PM