# Xiaomi Mi Bluetooth Gamepad
# https://xiaomi-mi.com/accessories-for-tv/xiaomi-mi-bluetooth-gamepad/

input_driver = "udev"
input_device = "Xiaomi Mi Bluetooth Gamepad"

# Hex vid:pid is found using "dmesg -w" or "tail -f /var/log/syslog" and converted to Decimal using http://www.binaryhexconverter.com/hex-to-decimal-converter
# Hex vid:pid = 2717:3144 -> Decimal vid:pid = 10007:12612

input_vendor_id = "10007"
input_product_id = "12612"

input_b_btn = "4"
input_y_btn = "7"
input_a_btn = "5"
input_x_btn = "8"
input_b_btn_label = "A"
input_y_btn_label = "X"
input_a_btn_label = "B"
input_x_btn_label = "Y"

input_select_btn = "14"
input_start_btn = "15"
input_select_btn_label = "Back"
input_start_btn_label = "Menu"

input_up_btn = "h0up"
input_down_btn = "h0down"
input_left_btn = "h0left"
input_right_btn = "h0right"
input_up_btn_label = "D-Pad Up"
input_down_btn_label = "D-Pad Down"
input_left_btn_label = "D-Pad Left"
input_right_btn_label = "D-Pad Right"

input_l_btn = "10"
input_r_btn = "11"
input_l2_axis = "+7"
input_r2_axis = "+6"
input_l3_btn = "17"
input_r3_btn = "18"
input_l_btn_label = "L1"
input_r_btn_label = "R1"
input_l2_btn_label = "L2"
input_r2_btn_label = "R2"
input_l3_btn_label = "L3"
input_r3_btn_label = "R3"

input_l_x_plus_axis = "+0"
input_l_x_minus_axis = "-0"
input_l_y_plus_axis = "+1"
input_l_y_minus_axis = "-1"
input_r_x_plus_axis = "+2"
input_r_x_minus_axis = "-2"
input_r_y_plus_axis = "+5"
input_r_y_minus_axis = "-5"
input_l_x_plus_axis_label = "Left Analog Right"
input_l_x_minus_axis_label = "Left Analog Left"
input_l_y_plus_axis_label = "Left Analog Down"
input_l_y_minus_axis_label = "Left Analog Up"
input_r_x_plus_axis_label = "Right Analog Right"
input_r_x_minus_axis_label = "Right Analog Left"
input_r_y_plus_axis_label = "Right Analog Down"
input_r_y_minus_axis_label = "Right Analog Up"
