def _set_key(self, entry, icon_pos, event):
        """ Generate current permutation from the key entry box.

        Args:
            entry: the key entry widget that trigered the event
            icon_pos: position of the icon that trigered the event
            event: the event that trigered this handler
        """
        self.set_permutation(Permutation.from_key(entry.get_text()))