dotnet / winforms

Windows Forms is a .NET UI framework for building Windows desktop applications.
MIT License
4.28k stars 954 forks source link

KeyUp fired many times when RDP session get focus #11581

Closed manuz90flw closed 1 day ago

manuz90flw commented 5 days ago

.NET version

.NET 8 C# and Vb.net .NET framework 4.8

Did it work in .NET Framework?

Yes

Did it work in any of the earlier releases of .NET Core or .NET 5+?

No response

Issue description

Hi,

When the old app remote desktop(blue icon) is activated or move the window, it fires many times the keyup event on winforms. This happens on .NET core and also on .NET framework I tried also these apps but they are not affected :

Steps to reproduce

Keyup

elachlan commented 4 days ago

@Olina-Zhang can your team please test this?

Zheng-Li01 commented 4 days ago

The issue can reproduce on both .NET Framework from 4.6 ~ 4.8.1 and .NET 6.0 ~ 9.0. GH11581

And noticed there always fired 4 Tab/2 ShiftKey/2 ControlKey/2 Menu as group every time. and not reproduce such as keydown/keypress events. image

elachlan commented 4 days ago

@kirsan31 You have done a bit of work in conjunction with RDP. Have you run into this at all?

kirsan31 commented 4 days ago

@kirsan31 You have done a bit of work in conjunction with RDP. Have you run into this at all?

Sorry, but - no. For 2 reasons:

manuz90flw commented 3 days ago

@kirsan31 This happends also in full screen.

These steps to reproduce:

  1. RDP session in fullscreen on first monitor
  2. click on second monitor without RDP session(black side)
  3. click on RDP session
  4. the keyup event fire many times

Keyup2

merriemcgaw commented 3 days ago

@manuz90flw This seems to be an issue with RDP. Did this work in a previous version of RDP for your product? My strong recommendation is that you check StackOverflow and answers.microsoft.com? This appears to happen for all versions of .NET Framework, so this is likely happening with the Common Controls as well. The question is whether we've always had this issue in all versions of RDP or if this is a new situation.

manuz90flw commented 3 days ago

Hi @merriemcgaw ,

I think it's a issue with RDP. I did some other tests:

  1. VM with Windows 7 connect to windows server 2022 and I can replicate the issue KeyupWin7
  2. VM with Windows 8.1 connect to windows server 2022 and I can replicate the issue KeyupWin8
  3. Windows 10 connect to VM Windows 8.1 and I can replicate the issue
  4. Windows 10 connect to Windows server 2022 and I can replicate the issue with javascript KeyupWin10javascript
merriemcgaw commented 1 day ago

@manuz90flw The best advice I can give you at this point is to use the Windows feedback tool to file the feedback against RDP. That will allow you to engage directly with that product team and to provide any diagnostic data they might need. Unfortunately there isn't much for WinForms to do at this point, so I'm going to close this issue.