I think you might find a little information about how the keyboard communication works to be helpful.

The keyboard sends a code when you press a key then sends another when you release the key. (How many of you just thought "So that's why the control or shift key got stuck! The computer missed the release code!"?) The computer really doesn't care how many keys are pressed at once. It just keeps track of press and release states. The keyboard, however, uses a switch matrix for the physical keyboard and this has limited combinations that can be active simultaneously.

So, if you send key press and release codes directly, you can do pretty much anything you want but if you use the keyboard matrix then there are a limited number of simultaneous combinations.

Pete