How to make a BGUI widget always focused/active?
I think I have managed to solve this by doing the following:

co = bge.logic.getCurrentController()

keyboard = co.sensors["textinputkeyboard"]

    for key,status in keyboard.events:
        if status == bge.logic.KX_INPUT_JUST_ACTIVATED:
            co.owner['sys'].layout.input._handle_key(key,False) #text will always be lower case
            if key == bge.events.ENTERKEY: #This is so the enter callback still works
                 co.owner['sys'].layout.on_input_enter(co.owner['sys'].layout.input)


The above will work so long as the mouse doesn't make the text input active, in which case every character will be typed twice. In order to avoid this I commented out line 472 of bgui/widget.py:

widget._handle_key(key, is_shifted)


I realized this is a bit messy, but it works! If anybody has a cleaner way of doing this (I'm certain there is!) hmu.

I found a clean solution to this: 
First, remove the if statement:

if self._hover:


from the _handle_key() method in bgui/widget.py.

Then include:

    co.owner['sys'].layout.input.system.focused_widget = co.owner['sys'].layout.input


So that the textinput widget is always focused