I've been seeing this keyboard problem for the past few weeks: after running some command from a bash prompt (haven't tried zsh yet) the keyboard stops working. Almost like somebody unplugged the keyboard from its usb port (except that the LED on the keyboard stays lit so I know the power is still on).
There are no error messages in journalctl or in /var/log/Xorg.0.log I don't know how to change to a console without using a ctrl-alt-Fn keystroke from the keyboard (anyone know if it's possible?). When I unplug the keyboard from the usb port I can see the kernel recognize the unplug event, which makes me think that it's not a kernel/usb bug or a broken wire in the keyboard cable. When I re-plug the keyboard into a usb port the keyboard immediately starts working normally again until the next time I happen to trigger the problem by running some black-magical command from a command prompt. There is no particular command that causes it--it can be any arbitrary command AFAICT. Just one weird example: I can be typing a URL in a web browser window when a bash command finishes running in a terminal window and the keyboard stops working in the middle of my typing :( Any debugging suggestions would be most welcome.