How to cancel an OnAction trigger

Discussion in 'General Development (no feature request here!)' started by BartEv, January 19, 2014.

  1. BartEv

    BartEv Portal User

    Joined:
    July 9, 2008
    Messages:
    10
    Likes Received:
    3
    Gender:
    Male
    Ratings:
    +8 / 0
    Home Country:
    Netherlands Netherlands
    Is there a way to prevent a certain Action Event from being handled further?



    Like in this example, i would like certain keys preventing to be actually handled by MP.

    Code (Text):
    1.      
    2.   public override void OnAction(Action action) {
    3.     switch (action.wID) {
    4.       case Action.ActionType.ACTION_KEY_PRESSED:
    5.            if (action.m_key.KeyChar == '0') {
    6.             /* How to stop this action, so it is not handled by MP */
    7.           }
    8.         break;
    9.    }
    10. }    
    11.  
    Thx...
     
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. BartEv

    BartEv Portal User

    Joined:
    July 9, 2008
    Messages:
    10
    Likes Received:
    3
    Gender:
    Male
    Ratings:
    +8 / 0
    Home Country:
    Netherlands Netherlands
    Anyone i really need an answer...
     
  4. regeszter
    • Premium Supporter

    regeszter Retired Team Member

    Joined:
    October 29, 2005
    Messages:
    5,335
    Likes Received:
    2,863
    Ratings:
    +5,152 / 18
    Home Country:
    Hungary Hungary
    Hi,

    using the /* ... */ ? ;)
     
  5. mm1352000
    • Team MediaPortal

    mm1352000 Development Group

    Joined:
    September 1, 2008
    Messages:
    21,527
    Likes Received:
    4,738
    Ratings:
    +8,205 / 17
    Home Country:
    New Zealand New Zealand
    Yeah, I don't think you get to swallow/cancel/consume events.
     
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!