Odds are it's either a PCB antenna, or if you're lucky a ceramic chip antenna (which work a bit better), in both the dongle and the keyboard.
All RF is line of sight. If your wireless dongle is on the back of a metal chassis computer, the "direct path" to the front of the computer is going to be blocked/attenuated by the PC chassis, so your bluetooth signal is gonna have to bounce off whatever's behind your computer to make it to the front.
If it's bluetooth, grab something like this. I'm using a cheap MiniPCI->PCIe adapter I bought off aliexpress and a wireless/bluetooth card scavenged from a broken laptop, which will break bluetooth out onto "real" antennas and hopefully give you a bit more antenna gain:
Amazon product ASIN B07232S62J
Alternatively, just buy a cheap USB extension cable and use it to place the dongle somewhere better.