1. AA or AAA, and which one
The compartment says which. Most wireless mice take one AA or two AAs, and small travel keyboards often take two AAAs. The size is usually moulded into the holder.
2. Switch the mouse off
Most wireless mice have an on-off switch underneath. Leaving it on while the mouse sits unused drains the cells over weeks for no reason at all.
3. Some mice get more out of lithium
A lithium AA gives more power for longer and copes better with cold, and it weighs less, which matters for a mouse you move all day. It also costs more than alkaline.
4. Look for the low-battery warning
Most mice flash a light or show a message when the cell is nearly flat. A mouse that only works when you wiggle it usually means a tired battery making poor contact.
5. Keep a spare pair in the drawer
An AA or an AAA costs very little, and the fix takes a minute. Keep one set with the keyboard and one with the mouse, and write the type on the bag.