none
How to know if 'Enter' key is pressed from within another ribbon button click event ? RRS feed

  • Question

  • Hi All,

    I have a Ribbon button click event like this 

     private void Title_Click(object sender, RibbonControlEventArgs e)
            {

    //do something;

         }

    Here I want to know how I can call another function when enter button is pressed 

    like this :

     private void Title_Click(object sender, RibbonControlEventArgs e)
            {

    //do something;

    if(enter is pressed)

    {

    //call another function or unclick this button

    }

    }

    In a nutshell (am trying to implement a custom style similar to the MS Word heading styles)

    Have searched a lot of forums but only getting help for windows forms and not for word applications

    Any help would be much appreciated .Thanks in advance! 


    Wednesday, September 24, 2014 9:31 AM

Answers