ShortCut'er Plugin V2 | Page 6

Discussion in 'MediaPortal 1 Plugins' started by nicsergio, September 24, 2013.

  1. nicsergio
    • Premium Supporter

    nicsergio MP Donator

    Joined:
    April 27, 2010
    Messages:
    161
    Likes Received:
    63
    Gender:
    Male
    Ratings:
    +113 / 0
    Home Country:
    Italy Italy
    Show System Specs
    @Stéphane Lenclud,
    I use the attached RawInputHook class to intercept keystrokes.

    I think the problem stems from my implementation of IMessageFilter: after ProcessRawInput the function returns true, then the message is stopped..

    Code (Text):
    1. public bool PreFilterMessage(ref Message m)
    2. {
    3.     if (m.Msg == WM_INPUT)
    4.     {
    5.         if (m.WParam == (IntPtr)0 || _backgroundInput)
    6.         {
    7.             if (KeyDown != null)
    8.             {
    9.                 ProcessRawInput(m.LParam);
    10.                 return true;
    11.             }
    12.         }
    13.     }
    14.     return false;
    15. }
    What do you think?
    I could always return false so as to allow the continuation of the message to the next filters


     

    Attached Files:

  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. Stéphane Lenclud
    • Team MediaPortal

    Stéphane Lenclud Development Group

    Joined:
    April 29, 2013
    Messages:
    2,562
    Likes Received:
    657
    Gender:
    Male
    Ratings:
    +1,270 / 8
    Home Country:
    Germany Germany
    Show System Specs
    Could be the problem though I'm not familiar with those APIs. I guess you should only return true if you actually perform an action so as to avoid duplicate actions.
     
    • Agree Agree x 1
  4. nicsergio
    • Premium Supporter

    nicsergio MP Donator

    Joined:
    April 27, 2010
    Messages:
    161
    Likes Received:
    63
    Gender:
    Male
    Ratings:
    +113 / 0
    Home Country:
    Italy Italy
    Show System Specs
    Should be quick: I do it in the next release :)
     
    • Like Like x 1
    • Thank You! Thank You! x 1
  5. nicsergio
    • Premium Supporter

    nicsergio MP Donator

    Joined:
    April 27, 2010
    Messages:
    161
    Likes Received:
    63
    Gender:
    Male
    Ratings:
    +113 / 0
    Home Country:
    Italy Italy
    Show System Specs
    Version 2.1.2 is available, I made a small change to stop the RawInput message only if the event is handled by ShortCut'er

    Download from repository :)

    @Stéphane Lenclud: could you test the compatibility with generic HID?


    thanks to all
     
    • Like Like x 1
    • Thank You! Thank You! x 1
  6. Stéphane Lenclud
    • Team MediaPortal

    Stéphane Lenclud Development Group

    Joined:
    April 29, 2013
    Messages:
    2,562
    Likes Received:
    657
    Gender:
    Male
    Ratings:
    +1,270 / 8
    Home Country:
    Germany Germany
    Show System Specs
    Looks like it's fixed, well done.
    However the force caps-lock feature does not seem to be working anymore.
    I set it to force caps-lock ON but it did not do it.
     
    • Thank You! Thank You! x 1
  7. nicsergio
    • Premium Supporter

    nicsergio MP Donator

    Joined:
    April 27, 2010
    Messages:
    161
    Likes Received:
    63
    Gender:
    Male
    Ratings:
    +113 / 0
    Home Country:
    Italy Italy
    Show System Specs
    it seems that I have reversed ON with OFF.. :confused:
     
  8. Stéphane Lenclud
    • Team MediaPortal

    Stéphane Lenclud Development Group

    Joined:
    April 29, 2013
    Messages:
    2,562
    Likes Received:
    657
    Gender:
    Male
    Ratings:
    +1,270 / 8
    Home Country:
    Germany Germany
    Show System Specs
    Oups :)
    By the way, would it possible to have the same kind of options when closing MP?
    Thus one could turn on caps when starting MP and turn it off when closing MP.
     
    • Great Idea! Great Idea! x 1
  9. nicsergio
    • Premium Supporter

    nicsergio MP Donator

    Joined:
    April 27, 2010
    Messages:
    161
    Likes Received:
    63
    Gender:
    Male
    Ratings:
    +113 / 0
    Home Country:
    Italy Italy
    Show System Specs
    there were two errors regarding this function, now I have solved :p

    It is possible: I tried now..
    I thought of putting a check in settings, which restores the previous state..
     
  10. nicsergio
    • Premium Supporter

    nicsergio MP Donator

    Joined:
    April 27, 2010
    Messages:
    161
    Likes Received:
    63
    Gender:
    Male
    Ratings:
    +113 / 0
    Home Country:
    Italy Italy
    Show System Specs
    Hallo all

    version 2.1.3 is available, changelog:
    • correct forcing Caps-Lock & Num-Lock at start-up
    • management restore forcing when MP closed (idea by Stéphane Lenclud)

    Immagine.png

    Download from repository :)
     
    • Like Like x 1
    • Thank You! Thank You! x 1
  11. Thecork

    Thecork Portal Member

    Joined:
    May 6, 2012
    Messages:
    15
    Likes Received:
    2
    Gender:
    Male
    Ratings:
    +2 / 0
    Home Country:
    Great Britain (UK) Great Britain (UK)
    Hi, ive been trying to download the latest version of this, but when clicking on the file in the repository it downloads a zip file with an xml file and a folder with related files, not the installer. Can you please help.
     
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!