I have this 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>
When i select a row and press a or s i bind the selected item to KeyPressed. My problem is how can i know which key i have pressed ? (I want to bind key pressed and selected item)
If you have 2 keybindings, it would be more clear to have 2 distinct commands :