Check your keyboard mapping.
The reason why keyboard/game controller mapping can change inadvertently can often be related to Windows remapping the USB ports. That can happen if you change the devices from one port to another, or if you have some device like a printer sometimes on and sometimes off along with your gaming gear. Or if your devices simply overload the USB power handling capacity. Or sun spots, northern lights, a spike in your electric network or in your power supply. No kidding, the USB can in theory run 255 USB devices but their combined power drainage is usually limited to 2 x 500 mA. A powered USB hub will help but even those have their limitations.