Two things you can try:
(1) Power off the VM, and add the config option:
keyboard.allowBothIRQs = FALSE
This might cause your Linux VM's input to hang if the Guest tries to Sleep/Hibernate, but it may work-around the problem.
(2) Power off the VM and make sure the VM has a USB controller, and add this config option to switch to the virtual USB keyboard:
keyboard.vusb.enable = TRUE
That will switch from using the PS/2 keyboard to the USB keyboard, but may make your key-repeat get stuck more often.
I think that (1) is sufficient to solve your problem, but if not (2) might also work-around the problem.