You can play Age of Empires IV with a keyboard or mouse on an Xbox Series X, Xbox Series S, Xbox One X, Xbox One S or Xbox One. To see how you can properly set up this control scheme, you can take a look at this tutorial from Seeking Tech.
1. For the first step, make sure you connect a mouse and keyboard to your Xbox console.
Keep in mind that these gaming systems do not support Bluetooth. So, if you want to use a Bluetooth (or wireless) mouse and keyboard, you have to use an USB Bluetooth/wireless dongle.
2. Next, you need to use your controller to open Age of Empires IV if you haven’t done so already.
3. If you are currently playing a match, then you can either finish the match or quit it to return to the main menu.
4. From the main menu, switch over to the Options tab by using the LB and RB buttons.
5. In the Options tab, select Controls from the left column.
6. On the right side of the same screen, select the Input Preset drop-down menu.
7. Finally, select Keyboard & Mouse from the drop-down menu.
8. You should now be able to use the connected keyboard and mouse to play the Xbox version of Age of Empires IV.