encapsulating the keyboard functions within a Keyboard object