As for your query, Wired USB mice will work only in select games and apps that have enabled mouse navigation.
To configure your mouse:
Press the Xbox button on your controller to open the guide.
Select Profiles & system > Settings > Devices & connections.
Select Mouse. You’ll see options for pointer speed and for swapping primary and secondary mouse buttons.
Note: You can’t use a mouse on Home or within the Xbox user interface while navigating the dashboard, only on enabled games, mouse wont work on Microsoft edge as well.
As for keyboard, only USB or wired keyboard can be used.
Plug a USB keyboard into your Xbox for getting around the console and easy text entry.
Function Keyboard key
Move to next element
Tab
Move to previous element
Shift + Tab
Open the guide
Windows button
Select
Space, Enter
Back
Win + Backspace, Escape
Open search
Y
Open menu
Win + M
Change view
Win + V
Up
Up arrow
Down
Down arrow
Left
Left arrow
Right
Right arrow