私はこのxamlを持っています:
<DataGrid.InputBindings>
<KeyBinding Key="a" Command="{Binding Path=Function}" CommandParameter="{Binding ElementName=dataGrid1,Path=SelectedItem}"></KeyBinding>
<KeyBinding Key="s" Command="{Binding Path=Function}" CommandParameter="{Binding ElementName=dataGrid1,Path=SelectedItem}"></KeyBinding>
</DataGrid.InputBindings>
行を選択して a または si を押すと、選択した項目が KeyPressed にバインドされます。私の問題は、どのキーを押したかをどのように知ることができるかです。(押されたキーと選択されたアイテムをバインドしたい)