【发布时间】:2016-07-31 06:44:57
【问题描述】:
在 Windows WPF XAML 中,我需要为我的键盘快捷键引用 = 键,但在 documentation 的任何地方都看不到它。
我要使用的组合键是 Control 和“加号/等于”键。 = 符号是单独按下键时的默认字符。如果我按住 shift 键,则输入 + 符号。我不会按下班次。我只需按住“CTRL”并按下= 键。
<Window.InputBindings>
<KeyBinding Command="{Binding FontSizeUp}" Gesture="CTRL+=" />
<KeyBinding Command="{Binding FontSizeDown}" Gesture="CTRL+-" />
</Window.InputBindings>
【问题讨论】:
-
看看this thread。
-
@Ruben 是的,就是这样。创建一个答案,我会使其正确。
标签: c# wpf xaml input keyboard