(layout)
return full_layout
Generates an usable layout from a layout module containing key mapping
    and aliases.

    :param module layout: The layour (e.g.
                          ``rivalcfg.handler.buttons.layout_qwerty``)
    :rtype dict:
Generates an usable layout from a layout module containing key mapping
    and aliases.
Generates an usable layout from a layout module containing key mapping and aliases .
def build_layout(layout):
    """Generates an usable layout from a layout module containing key mapping
    and aliases.

    :param module layout: The layour (e.g.
                          ``rivalcfg.handler.buttons.layout_qwerty``)
    :rtype dict:
    """
    full_layout = {k.lower(): v for k, v in layout.layout.items()}

    for alias, ref in layout.aliases.items():
        if ref not in layout.layout:
            raise ValueError(
                "Wrong alias: '%s' aliases '%s' but '%s' is not in the layout"
                % (alias, ref, ref)
            )
        full_layout[alias.lower()] = layout.layout[ref]

    return full_layout
def build_layout ( layout ) : full_layout = { k . lower ( ) : v for k , v in layout . layout . items ( ) } for alias , ref in layout . aliases . items ( ) : if ref not in layout . layout : raise ValueError ( "Wrong alias: '%s' aliases '%s' but '%s' is not in the layout" % ( alias , ref , ref ) ) full_layout [ alias . lower ( ) ] = layout . layout [ ref ] return full_layout