When you are using a LUKS encrypted root volume with a passphrase there will be a moment when the the boot process stops until you have entered this passphrase to unlock the volume. If you do not have all the required modules compiled statically into your kernel, when using a stock kernel for example, you may be unable to enter the passphrase to unlock the volume.
By adding the modules you need to use your keyboard to your initrd you can prevent this problem from happening.
I’m running Slackware so I can use /usr/share/mkinitrd/mkinitrd_command_generator.sh to generate an example mkinitrd command and tailor that to my needs.
In my case I end up with:
mkinitrd -c -k 3.2.7 -f ext4 -r /dev/vgl01/lvroot -m usb-storage:ehci-hcd:usbhid:jbd2:mbcache:ext4 -C /dev/sda2 -L -u -o /boot/initrd.gz
The modules ehci-hdc and usbhid are the ones needed for my usb keyboard.
Another way to solve this is by adding all the required parameters and modules to /etc/mkinitrd.conf.