def __map_button(self, button):
        """Get the linux xpad code from the Windows xinput code."""
        _, start_code, start_value = button
        value = start_value
        ev_type = "Key"
        code = self.manager.codes['xpad'][start_code]
        if 1 <= start_code <= 4:
            ev_type = "Absolute"
        if start_code == 1 and start_value == 1:
            value = -1
        elif start_code == 3 and start_value == 1:
            value = -1
        return code, value, ev_type
def __map_button ( self , button ) : _ , start_code , start_value = button value = start_value ev_type = "Key" code = self . manager . codes [ 'xpad' ] [ start_code ] if 1 <= start_code <= 4 : ev_type = "Absolute" if start_code == 1 and start_value == 1 : value = - 1 elif start_code == 3 and start_value == 1 : value = - 1 return code , value , ev_type
Get the linux xpad code from the Windows xinput code.