System.Windows.Input.Key:xaml中的方括号?

| 使用XAML,我想使用Modifiers = \“ Control \”和Key =“ \” [\“声明一个KeyBinding。 \'[\'字符不是System.Windows.Input.Key枚举的一部分。如何在XAML中声明此KeyBinding?     
已邀请:
Key.OemOpenBrackets
Key.OemCloseBrackets
刚刚用这个测试:
<Window.CommandBindings>
    <CommandBinding Command=\"Help\" Executed=\"Help_Executed\" CanExecute=\"Help_CanExecute\"/>
</Window.CommandBindings>
<Window.InputBindings>
    <KeyBinding Key=\"OemOpenBrackets\" Command=\"Help\" Modifiers=\"Control\"/>
</Window.InputBindings>
private void Help_Executed(object sender, ExecutedRoutedEventArgs e)
{
    MessageBox.Show(\"!\");
}

private void Help_CanExecute(object sender, CanExecuteRoutedEventArgs e)
{
    e.CanExecute = true;
}
无论是否带有修饰符,对我都有效,可能您声明绑定的控件不在焦点上。另一个原因可能是键盘布局,但是我不确定按键是如何解决的。     

要回复问题请先登录注册