ShortCut'er Plugin V2 (1 Viewer)

nicsergio

MP Donator
  • Premium Supporter
  • April 27, 2010
    165
    159
    Home Country
    Italy Italy
    @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:
    public bool PreFilterMessage(ref Message m)
    {
        if (m.Msg == WM_INPUT)
        {
            if (m.WParam == (IntPtr)0 || _backgroundInput)
            {
                if (KeyDown != null)
                {
                    ProcessRawInput(m.LParam);
                    return true;
                }
            }
        }
        return false;
    }

    What do you think?
    I could always return false so as to allow the continuation of the message to the next filters
     

    Attachments

    • RawInputHook.zip
      2.6 KB

    Stéphane Lenclud

    Retired Team Member
  • Premium Supporter
  • April 29, 2013
    2,576
    1,294
    Home Country
    Germany Germany
    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.
     

    nicsergio

    MP Donator
  • Premium Supporter
  • April 27, 2010
    165
    159
    Home Country
    Italy Italy
    there were two errors regarding this function, now I have solved :p

    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.
    It is possible: I tried now..
    I thought of putting a check in settings, which restores the previous state..
     

    nicsergio

    MP Donator
  • Premium Supporter
  • April 27, 2010
    165
    159
    Home Country
    Italy Italy
    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 :)
     

    Thecork

    Portal Member
    May 6, 2012
    15
    2
    41
    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.
     

    Users who are viewing this thread

    Top Bottom