Possible to supress key events like PLAY ?

Discussion in 'General Development (no feature request here!)' started by kroko, January 27, 2011.

  1. kroko

    kroko Portal Pro

    Joined:
    February 4, 2007
    Messages:
    428
    Likes Received:
    210
    Occupation:
    plc programmer
    Location:
    Itzehoe
    Ratings:
    +211 / 0
    Home Country:
    Germany Germany
    Hi there,

    is it posible to supress or override the key events ? I looked in the source but could not find a way to block "PLAY" or "STOP" to the g_Player inside my plugin. Has anybody a idea ? I would like to use the "Play" button from the remote different.

    kroko


     
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. SilentException
    • Premium Supporter

    SilentException Retired Team Member

    Joined:
    October 27, 2008
    Messages:
    2,617
    Likes Received:
    1,125
    Gender:
    Male
    Location:
    Rijeka, Croatia
    Ratings:
    +1,129 / 0
    Home Country:
    Croatia Croatia
    You should be able to catch those actions:

    override bool OnMessage()

    override void OnAction()

    Actions are sent to your window first (if it's active), if you choose not to transmit them forward (call base), they will not be handled.

    If you're using process plugin, then i think you cannot do that.
     
  4. kroko

    kroko Portal Pro

    Joined:
    February 4, 2007
    Messages:
    428
    Likes Received:
    210
    Occupation:
    plc programmer
    Location:
    Itzehoe
    Ratings:
    +211 / 0
    Home Country:
    Germany Germany
    AW: Possible to supress key events like PLAY ?

    Hi SilentException,

    nice to hear from you ;-)

    I already tried it in "Browse the web". Pushing a button on my remote will fire the action "PLAY"
    I dont call base in OnAction at all. OnMessage nothing happens. The problem is, there are not enough buttons on my remote, so I need these buttons. If I, for example, listen to radio then pressing "Stop" will stop the g_player while browsing the web.

    I think it is only possible to block OnMessage. And I think the remote is quite hard coded in some parts, when you look at the layouts.

    kroko
     
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!