A couple of things to check and a manual workaround.
Luckily, from Ubuntu you can modify (GRUB I assume) the bootloader, install grub-customizer with:
sudo add-apt-repository ppa:danielrichter2007/grub-customizer sudo apt update sudo apt install grub-customiser
Run it, go to General Settings and change "Boot default entry after x Seconds" to 60 seconds. Save it and then cycle your computer off and on.
Check to see if the keyboard still boots the OS pressing the up or down keys (Note, the left and right keys can be set to boot GRUB, so don't test these). If it takes 60 seconds to boot, the keyboard doesn't work at all before the OS boots. If it does boot with any key, since the computer shouldn't have remapped the keyboard before the OS boots it's likely a hardware problem. Try using a different keyboard plugged into the motherboard, or usb 2 so that you know that the computer is getting the correct signals. Some poorly designed modern keyboards do poorly before the OS has booted and especially so if connected through monitors, hubs, or a more modern USB interface. You can also try enabling "Legacy USB Keyboard" support from your BIOS if it has the option to force USB to be enabled properly before boot.
Lastly, if you desperately need to get into Windows, you can set the "default entry" on the customizer to Windows, though this will leave you trapped in Windows if you cannot use the GRUB interface.