make keyboardIsOpen a function