Error with Bgui and keyboard

I’m having this error using Bgui:

AttributeError: ‘MySys’ object has no attribute ‘keymap’

Any idea about how to solve it???

The full code is this:

key_events =
is_shifted = key_events[] == bge.logic.KX_INPUT_ACTIVE or key_events[] == bge.logic.KX_INPUT_ACTIVE

for key, state in
    if state == bge.logic.KX_INPUT_JUST_ACTIVATED:
        self.update_keyboard(self.keymap[key], is_shifted)

I don’t see a self.keymap defined in the example code (also, next time use the

 tags). I would recommend grabbing the development version of Bgui from here:

This version comes with a builtin System for the BGE, which makes setup a lot simpler:

I’m using that version, and I get my code from its “notification” example.