'Set the next layout in the list of configured keyboard layouts as
new current layout in use
If the current keyboard layout is not in the list, it will set as new
layout the first one in the list.'

def next_keyboard(self):

    current_keyboard = self.keyboard
    if (current_keyboard in self.configured_keyboards):
        next_keyboard = self.configured_keyboards[((self.configured_keyboards.index(current_keyboard) + 1) % len(self.configured_keyboards))]
    else:
        next_keyboard = self.configured_keyboards[0]
    self.keyboard = next_keyboard
    self.tick()
