check if element is a focusable element to send keys instead of terminal

Currently term.js controls the keystrokes of the whole document.

Therefore input form elements, text areas etc... on the same document can not be typed.
By checking the type of element we can overcome this.