首页  编辑  

判断Ctrl是否按下

Tags: /C#/界面处理/   Date Created:

private void button1_Click( object sender , EventArgs e)

{

    bool control = ( Control . ModifierKeys & Keys . Control) == Keys . Control;

    if (control)

   {

        Console . WriteLine( "Ctr l );

   }

    else

   {

        Console . WriteLine( "Ctrl );

   };

}