Menu

How to define keyboard shortcut for lister plugin form?

2018-03-08
2018-03-12
  • WANG Aiyong

    WANG Aiyong - 2018-03-08

    I wrote a lister plugin using C#, implemented some keydown event for the UserControl, or other controls inside the UserControl. How can I make the lister window reponse to these shortcuts?

    With the following code snippet in UserControl, I created a standalone WinForm, contained the UserControl, and it works. But not inside the lister.

    protected override bool ProcessCmdKey(ref Message msg, Keys keyData) 
    { 
        if (keyData == Keys.I) 
        { 
                // do something here
         } 
        return base.ProcessCmdKey(ref msg, keyData); 
    } 
    

    Thanks.

     
  • WANG Aiyong

    WANG Aiyong - 2018-03-08

    Maybe I missed something. I have set "FocusedControl = myControl".

    But sometimes, the KeyDown event of a subcontrol of "myControl" doesn't reponse, but “ESC” works.

    Sometimes, KeyDown event responses, but ESC doesn't work.

    And it's not like I can choose to work one aspect or another, it's more like one aspect accidently works, and I cannot figure out why.

    Would you please help me out?

    Thanks.

     

    Last edit: WANG Aiyong 2018-03-08
  • WANG Aiyong

    WANG Aiyong - 2018-03-12

    This can be closed. Sorry for interruption. Wonderful library, thanks.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.