The KeyboardArea and Buffer
Everytime a user presses a key, an IRQ1 is fired. The default handler for IRQ1 asks the keyboardcontroller what scancode was pressed or released. This event is recorded in the Key ScanCodeMap. Every key that is pressed has a value of 1, and a zero if released. The handler then translates this scancode to an ascii character where possible, and checks the status of the shift-keys to see if it needs to be uppercased. Then the ascii character is added to the keyboardbuffer.

From Size Description
0 255 Keyboard ScanCodeMap
256 255 KeyboardBuffer

The KeyboardBuffer:

From Size Description
0 1 Size of the KeyboardBuffer (255 characters is default)
1 1 Characters currently in the buffer
2 ... The characters.