I would employ 89C52, 89C420, or similar microcontroller, and set its UART to 9-bit mode ( see: **broken link removed** ) .. The micro should use serial port interrupt and a small serial port receive buffer ..This will take care of receiving data ..
As far as transmitting data to the Keyboard Port (I suspected that earlier but wasn't sure) I would use two general I/Os from PORT1 (open drain), one as DATA the other as CLOCK, and TIMER2 to generate 16.7kHz clock as required, so it will be like creating another UART but in software, or take clock from an external source and just shift data out ..
Regards,
IanP
BTW, why do you have 8-bit+Parity? I don't see any reason for the parity bit, and then the UART can ge configured for standard 8-bit word+1Start+1Stop ..