如何使用热键检测在C#中按破折号键
我想检测用户何时键入破折号,而不考虑其键盘布局。如何使用热键检测在C#中按破折号键,c#,keyboard,hotkeys,C#,Keyboard,Hotkeys,我想检测用户何时键入破折号,而不考虑其键盘布局。 我在用密码 非常感谢您的帮助。您的问题可能是您使用的是“减法”而不是“破折号”,我相信它们是两个独立的按键。尝试使用代码为189的键代替Keys.PrintScreen:ghk=newkeyHandler(Keys.PrintScreen,this);你的意思是做这个ghk=新的钥匙处理程序((钥匙)189,这个)? ghk = new KeyHandler(Keys.PrintScreen, this); // I want to detect
我在用密码
非常感谢您的帮助。您的问题可能是您使用的是“减法”而不是“破折号”,我相信它们是两个独立的按键。尝试使用代码为189的键代替Keys.PrintScreen:ghk=newkeyHandler(Keys.PrintScreen,this);你的意思是做这个ghk=新的钥匙处理程序((钥匙)189,这个)?
ghk = new KeyHandler(Keys.PrintScreen, this); // I want to detect the dash press event
// instead of the PrintScreen keypress
ghk.Register();