Added buffered keyboard with 4 states and configurable buffer size.
Added console in debug mode.