But that is another story. However, is there a way, to restart the keyboard,
without leaving plasma? When the keyboard crashes, I can still open a console,
start an onscreen keyboard (ie. kvkbd) and could use the mouse for input.
I'm not sure what module is driving your keyboard, but "lsmod" should list the loaded modules, and you can probably guess/tinker to find the module, like maybe "uinput" or "hid" or "hid_generic" or "usb_hid" or "usbcore" or ....
However, I'd recommend you do the command in a single line, like above, rather than separate lines, in case you kill your mouse in the process and lose the ability to mouse-type.