I want to setup hotkeys in my Wpf application.Using KeyBindings works in the simple case, for example: +, +, etc<KeyBinding Gesture="Ctrl+B" Command="{Binding Source={StaticResource localCusomCommands}, Path=AddTTRowCommand}" ></KeyBinding><KeyBinding Modifiers="Control" Key="B" Command="{Binding Source={StaticResource localCusomCommands}, Path=AddTTRowCommand}" ></KeyBinding>但是如果我需要带有多个键的热键 + + ,则 + + ,等等But if I need hotkeys with multiple keys ++, ++, etc<KeyBinding Modifiers="Control" Key="P,B" Command="{Binding Source={StaticResource localCusomCommands}, Path=AddTTRowCommand}" ></KeyBinding>不工作.<KeyBinding Gesture="Ctrl+B+A" Command="{Binding Source={StaticResource localCusomCommands}, Path=AddTTRowCommand}" ></KeyBinding>不编译. Error 15 Unrecognized ModifierKeys 'B'. 如何实现?推荐答案正如我所讲的,有一个实现可以重写多个键的KeyBinding和Gestures.请参考下面的链接.他已覆盖InputGesture的实现以实现此多键绑定. http://kent-boogaart.com/blog/multikeygesture As i told, there is implementation for overriding the KeyBinding and Gestures for multiple keys. refer the below link. He has overriden the implemetation of InputGesture to achieve this multikeybinding. http://kent-boogaart.com/blog/multikeygesture 这篇关于KeyBinding中的倍数键?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 09-18 03:19