.net 键盘

private void txtGoodsGroup_KeyPress(object sender, KeyPressEventArgs e)
{
base.OnKeyPress(e);
if ((int)e.KeyChar >= 65296 && (int)e.KeyChar <= 65305)
{
e.KeyChar = (char)((int)e.KeyChar - 65248);
}
}

 

回车

e.KeyChar == 13

你可能感兴趣的:(.net)