Keyboard Not Working In Windows Setup Or After The First Reboot
If your keyboard works normally in BIOS/UEFI setup, but does not work during Windows installation or stops working after first reboot into Windows, then most probable reason is missing USB 3.0 drivers.
While you can resolve this problem by reverting to PS/2 keyboard or by toggling various options in BIOS/UEFI setup, much better approach is to integrate USB 3.0 drivers into Windows installation media.
Why I can't just plug keyboard and mouse to USB 2.0 port?
You can't just plug keyboard and mouse to USB 2.0 (black) port instead of USB 3.0 (blue) port, because on modern computer platforms (Intel Skylake, Intel Kaby Lake, Intel Cannon Lake and AMD Ryzen) all USB ports, including USB 2.0 ports, look like USB 3.0 ports from software point of view, so they all require USB 3.0 drivers.
Method #1: Temporarily reverting to keyboard and mouse with PS/2 interface
PS/2 port looks like this:
If your computer still has such port, and you still have a PS/2 keyboard and PS/2 mouse lying around, simplest way to solve this problem is reverting to human inteface devices with PS/2 interface for the time of Windows installation.
After Windows installation is finished, you may download USB 3.0 drivers from website of your motherboard vendor, install these drivers, and then finally plug your modern USB keyboard and USB mouse.
Method #2: Enabling BIOS/UEFI setup option to emulate PS/2 interface for USB HID
Usually there's an option in BIOS/UEFI setup to emulate PS/2 software interface for USB human interface devices (such as mice, keyboards and touchpads). Please note that on modern notebooks builtin keyboard and touchpad are often connected via internal USB interface, so they fall into this category.
PS/2 emulation means that keyboard and mouse are still connected to USB port, but from software point of view (including drivers) they look like connected to PS/2 port.
After Windows installation is finished, you may download USB 3.0 drivers from website of your motherboard vendor, install these drivers, and then finally disable PS/2 emulation for USB HID.
Please note: on some motherboards and notebooks PS/2 emulation for USB HID is automatically enabled when booting from removable media (such as USB thumbdrive or CD/DVD disc), but PS/2 emulation for USB HID is disabled when booting from fixed media (such as internal HDD or SSD). That's why you can observe your USB keyboard and mouse working normally during Windows installation, but they suddenly stop working after first reboot into installed Windows OS.
Method #3: Enabling BIOS/UEFI setup option to put USB 3.0 controller into USB 2.0 compatibility mode
Some motherboards and laptops have BIOS/UEFI option to put USB 3.0 host controller into USB 2.0 compatibility mode. Idea is the same as for PS/2 emulation: USB 3.0 controller looks like USB 2.0 controller from software point of view and so doesn't require any special drivers (albeit works slower).
Please note that this option is relatively rare. Sometimes in BIOS/UEFI setup USB 2.0 is called EHCI (Enhanced Host Controller Interface) and USB 3.0 is called XHCI (eXtensible Host Controller Interface). UHCI is USB 1.0/1.1. Also this option may be hidden under a very obscure name like "Windows OS version": "Windows 7" or "Windows 8+".
After Windows installation is finished, you may download USB 3.0 drivers from website of your motherboard vendor, install these drivers, and then finally put USB 3.0 controller into fast mode.
Also there's a thing called EHCI/XHCI hand-off: USB 3.0 controller is starting in the USB 2.0 compatibility mode after being powered up, but later it is switched to USB 3.0 mode, either by BIOS/UEFI firmware, or by OS during boot-up process (if USB 3.0 drivers are present in the OS). EHCI/XHCI hand-off sometimes leads to strange effects in dual-boot configurations involving Windows 10 and Windows 7: if Windows 7 is loaded after rebooting from Windows 10 (without full system power-down), then Windows 7 can't talk to USB hardware. This is because EHCI/XHCI hand-off persists across system reset (i.e. requires full power-down to clear). Similar effect is observed when installing Windows 7 via boot.wim borrowed from Windows 10 setup.
Method #4: Slipstreaming USB 3.0 drivers into Windows installation media
Aren't you tired of this rigmarole yet? We certainly are, that's why we have developed an excellent tool to slipstream USB 3.0 and other drivers into Windows 7 installation media: FlashBoot Pro.
Using FlashBoot, you can install Windows 7 to new PC or new laptop without any problems. Modern USB keyboard and mouse will work as expected. Touchpad on laptops will work too. FlashBoot will prepare Windows installation USB thumbdrive with slipstreamed USB 3.0 and other drivers, so you can quickly and easily install Windows 7 to any new computer, regardless of BIOS/UEFI setup options, EHCI/XHCI hand-off and all other stuff.
FlashBoot Pro includes drivers for all known USB 3.0 controllers (Intel, AMD, ASMedia, Renesas and VIA), so Windows 7 setup will work everywhere and will be great again!