Hello Peter,
Welcome to Microsoft Community.
After noting that you tested the keyboard and Flex keyboard separately on the Surface Pro 8, I surmised that the problem may not be from the keyboard, but rather from the Surface Pro 8 not properly recognizing the keyboard when physically connected to it.
For Windows 11, the "Touch keyboard" pops up automatically while in tablet mode, an automated feature designed to make it easier for users to type text while in tablet mode (that is, when the keyboard is not physically connected).
I believe that you've manually installed the appropriate drivers and firmware packages:
Download Surface Pro 8 Drivers and Firmware from Official Microsoft Download Center
And you've done a lot of things right, so you've probably noticed that the right pins on the Surface Pro 8 don't connect properly to the Surface keyboard, even though they seem to fit, so I'm guessing that this problem is probably due to a hardware failure on the Surface Pro 8.
Please send the Surface to the Surface Technical support team as soon as possible for inspection or repair, and if you want to confirm whether the keyboard is faulty, please send it to the Surface Technical support team.
I can direct you to Surface Live support who can help you create a service order:
- Use your personal Microsoft account (not your organization account) to access the following links:
- Type Surface, press Enter, and click "Contact Support" at the bottom:
- Select Technical Support and select the device model you are currently using in Produce family, then click Confirm:
- You will see contact options for Chat support and Phone support, please contact them during business hours:
I wish you all the best.
Best Regards,
Mitchell | Microsoft Community Support Specialist