As a preliminary solution, I am currently using the Nuclex framework in an C#/XNA game project for buffered keyboard input. Sadly, nuclex relies on SlimDX.Directinput.dll and therefore to my knowledge can only be used under Windows OSs. However, I use MonoGame to target other platforms (Linux, OSX, etc.) and therfore I am looking for a portable way to integrate buffered keyboard input aross all platforms. Is there any?
SharpInputSystem was created for this exact purpose. It provides a portable way of access the Keyboard and Mouse on most platforms and GamePad/Joystick on a few others. In full disclosure, I am the author, but I needed a similar library for the samples I provide with Axiom.
It may need to be modified to load the MonoGame assemblies properly, I am currently loading the Xna libraries dynamically to avoid a dependency on a strong name. I can either look into making those changes if you want or if you feel up to it, submit a patch once you've got it working.
While not properly portable (it is only for Windows and Linux). MonoGame has an event for text input that uses properly buffered keyboard input.
/// Use this event to retrieve text for objects like textbox's. /// This event is not raised by noncharacter keys. /// This event also supports key repeat. /// For more information this event is based off: /// http://msdn.microsoft.com/en-AU/library/system.windows.forms.control.keypress.aspx /// </summary> /// <remarks> /// This event is only supported on the Windows DirectX, Windows OpenGL and Linux platforms. /// </remarks> public event EventHandler<TextInputEventArgs> TextInput;