I finally got sufficiently fed up to fix the PS/2 keyboard. The problem is that the generic code requests an ISA interrupt directly, instead of via isa_irq_to_vector().