Keyboard support added

Made it a class.