microsoft / XamlBehaviorsWpf

Home for WPF XAML Behaviors on GitHub.
MIT License
852 stars 140 forks source link

Improved KeyTrigger logic #167

Closed brianlagunas closed 6 months ago

brianlagunas commented 6 months ago

Fixed #162 by updating the KeyTrigger logic to look for exact key/modifier key matches.

Since you cannot modify the pressed modifiers in WPF, I was not able to add a unit test for the issues discovered in #162.

I did add an additional test for the scenario when there is a modifier defined on a KeyTrigger, but that modifier is not pressed when pressing a key. In this case, the action should not execute.

gianlucacuccostatsperform commented 6 months ago

@brianlagunas Thanks for your fix i can confirm it do perfectly works!

gianlucacuccostatsperform commented 6 months ago

@jstedfast can i do something to help to merge and promote to a build ? thanks!

jstedfast commented 6 months ago

Looks like the pipeline got disabled due to a service name change. I'll work on trying to figure out how to fix it and queue a build and merge when it goes green.

jstedfast commented 6 months ago

@gitbot rebase main