Also, what are you using to communicate with the KBD? I don't see any reference to a UART or USI in your code... (or maybe I'm just blind...), unless you are bit-banging it, which I don't see either...
Anyway, I'm trying to write a program to put on an MSP430 that will receive the codes from a KBD, translate them into ASCII, and present them on a parallel bus, for another micro to read and print on a 16x2 character display. Page 401 of this datasheet
describes the built-in shift register and control registers for the USI of an MSP.
If I've left anything out, please let me know, I have a habit of not finishing my thoughts.
Thanks ahead of time for any help rendered!