DesktopTextField and TAB keypresses on Windows

I just noticed something today I don’t think I have ever noticed before. It seems that, on Windows only, when the AllowTabs property of a DesktopTextField is enabled, and the TAB key is pressed, the TAB is not entered into the TextField. That doesn’t seem to be the case on macOS or Linux.
Is this a bug, or just a “Windows thing” we have to deal with? I can’t find any comments about this in the forum or feedback on GitLab.

Luckily, the KeyDown event does fire when TAB is pressed, so I’ve been able to work around this issue with this:

Function KeyDown(key As String) Handles KeyDown as Boolean
  #if TargetWindows
    // make sure a TAB keypress is entered
    if asc(key) = &h09 then
      // insert a TAB at the insertion point
      me.SelectedText = string.ChrByte(&h09)
      return true
    end if
  #else
    #Pragma Unused key
  #EndIf
  
End Function

But should that really be necessary?

I was hoping that this one would have some takers after a few days :slight_smile: