basic implementation of mouse and keyboard