You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a bit of an edge case, but I was attempting to add hotkeys for Alt+Up and Alt+Down to my application which uses Fluent Ribbon, but I was getting extra characters entered and I managed to isolate the fact that this only happened when the window included Fluent Ribbon and I've been able to replicate this in the showcase application
(These characters are the same you would get from typing Alt+8 and Alt+2 and on English keyboards at least Num8 is the same as the Up key and Num2 is the same as the Down key if numlock is off)
I've been able to narrow the issue down to this one call, if I temporarily stub out this line I do not get the extra character
Looking at the docs for the ToUnicode function it says "If bit 0 is set, a menu is active." I tried setting this to 1 and it does fix this issue but there is no further explanation of what this means so I was not confident to just submit a pull request without raising this as an issue first.
I've manually tested this and the KeyTip navigation still works as do other accelerator keys (such as using alt-A to navigate to the other text box on the Test tab) so I think this is a safe change, but I wanted to open a discussion around this first to see if you had any feedback.
It's strange that if there is not an active input binding these extra characters are not generated
I've attached a copy of TestWindow.xaml.cs which includes some code to add some input bindings which reproduce this issue you just need put this in the Fluent.Ribbon.Showcase folder TestWindow.xaml.cs.zip
If you then edit line 21 of Fluent.Ribbon/Internal/KeyEventUtility.cs to pass a 1 instead of a 0 for the last parameter of ToUnicode( ) it "fixes" this issue.
Environment
Fluent.Ribbon v8.0.0.0
Windows 10
.NET Framework 4.8
The text was updated successfully, but these errors were encountered:
This is a bit of an edge case, but I was attempting to add hotkeys for Alt+Up and Alt+Down to my application which uses Fluent Ribbon, but I was getting extra characters entered and I managed to isolate the fact that this only happened when the window included Fluent Ribbon and I've been able to replicate this in the showcase application
(These characters are the same you would get from typing Alt+8 and Alt+2 and on English keyboards at least Num8 is the same as the Up key and Num2 is the same as the Down key if numlock is off)
I've been able to narrow the issue down to this one call, if I temporarily stub out this line I do not get the extra character
Fluent.Ribbon/Fluent.Ribbon/Internal/KeyEventUtility.cs
Line 21 in 797ced0
Looking at the docs for the ToUnicode function it says "If bit 0 is set, a menu is active." I tried setting this to 1 and it does fix this issue but there is no further explanation of what this means so I was not confident to just submit a pull request without raising this as an issue first.
I've manually tested this and the KeyTip navigation still works as do other accelerator keys (such as using alt-A to navigate to the other text box on the Test tab) so I think this is a safe change, but I wanted to open a discussion around this first to see if you had any feedback.
It's strange that if there is not an active input binding these extra characters are not generated
I've attached a copy of TestWindow.xaml.cs which includes some code to add some input bindings which reproduce this issue you just need put this in the Fluent.Ribbon.Showcase folder
TestWindow.xaml.cs.zip
If you then edit line 21 of Fluent.Ribbon/Internal/KeyEventUtility.cs to pass a 1 instead of a 0 for the last parameter of ToUnicode( ) it "fixes" this issue.
Environment
The text was updated successfully, but these errors were encountered: