简体   繁体   English

如何使用组合键(AltGr + V)插入@符号?

[英]How to insert @ sign with key combination (AltGr+V)?

i am working set of queries in Winforms-Grid application.One of that is need to insert the '@' sign with key combination(AltGr+V).please anyone suggest me , is it possible or how can i achieve this? 我正在使用Winforms-Grid应用程序中的查询集。其中之一是需要插入带有组合键(AltGr + V)的'@'符号。请有人建议我,这是可能的或如何实现?

Thanks. 谢谢。

Override ProcessCmdKey to capture whenever the user presses that combination of keys. 覆盖ProcessCmdKey以便在用户按下该键组合时捕获。

protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
  if (keyData == Keys.V && Control.ModifierKeys == Keys.RMenu)
  {
    //insert @ whereever you want it
    return true;
  }
  return base.ProcessCmdKey(ref msg, keyData);
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM