Home
last modified time | relevance | path

Searched refs:buttons (Results 1 – 25 of 266) sorted by relevance

1234567891011

/linux/tools/testing/selftests/hid/tests/
A Dtest_gamepad.py37 buttons = {}
40 buttons[button] = True
41 r = uhdev.event(buttons=buttons)
48 buttons[button] = False
49 r = uhdev.event(buttons=buttons)
70 b1 = uhdev.buttons[0]
72 b2 = uhdev.buttons[1]
76 r = uhdev.event(buttons=buttons)
88 r = uhdev.event(buttons=buttons)
97 r = uhdev.event(buttons=buttons)
[all …]
A Dbase_gamepad.py62 self.buttons = (1, 2, 3)
86 buttons=None, argument
105 if buttons is not None:
106 for i, b in buttons.items():
107 if i not in self.buttons:
150 self, *, left=(None, None), right=(None, None), hat_switch=None, buttons=None argument
165 left=left, right=right, hat_switch=hat_switch, buttons=buttons
208 buttons=None, argument
232 buttons=buttons,
A Dtest_wacom_generic.py169 self.buttons = Buttons.clear()
207 if buttons is not None:
208 self.buttons = buttons
209 buttons = self.buttons
226 buttons.fill(report)
264 def event(self, x, y, pressure, buttons=None, toolid=None, proximity=None): argument
276 r = self.create_report(x, y, pressure, buttons, toolid, proximity)
642 buttons=Buttons.clear(),
699 buttons=Buttons.clear(),
712 uhdev.event(100, 200, pressure=0, buttons=Buttons(primary=True)),
[all …]
/linux/drivers/input/joystick/
A Dmaplecontrol.c29 unsigned short buttons; in dc_pad_callback() local
35 buttons = ~le16_to_cpup((__le16 *)(res + 8)); in dc_pad_callback()
38 (buttons & 0x0010 ? -1 : 0) + (buttons & 0x0020 ? 1 : 0)); in dc_pad_callback()
40 (buttons & 0x0040 ? -1 : 0) + (buttons & 0x0080 ? 1 : 0)); in dc_pad_callback()
42 (buttons & 0x1000 ? -1 : 0) + (buttons & 0x2000 ? 1 : 0)); in dc_pad_callback()
44 (buttons & 0x4000 ? -1 : 0) + (buttons & 0x8000 ? 1 : 0)); in dc_pad_callback()
46 input_report_key(dev, BTN_C, buttons & 0x0001); in dc_pad_callback()
47 input_report_key(dev, BTN_B, buttons & 0x0002); in dc_pad_callback()
48 input_report_key(dev, BTN_A, buttons & 0x0004); in dc_pad_callback()
49 input_report_key(dev, BTN_START, buttons & 0x0008); in dc_pad_callback()
[all …]
A Danalog.c94 short *buttons; member
110 int buttons; member
127 buttons |= 1 << (i + 14); in analog_decode()
133 input_report_key(dev, analog->buttons[j++], (buttons >> i) & 1); in analog_decode()
137 input_report_key(dev, analog->buttons[j++], (buttons >> (i + 10)) & 1); in analog_decode()
155 ((buttons >> ((i << 2) + 7)) & 1) - ((buttons >> ((i << 2) + 9)) & 1)); in analog_decode()
157 ((buttons >> ((i << 2) + 8)) & 1) - ((buttons >> ((i << 2) + 6)) & 1)); in analog_decode()
226 port->buttons = (~u >> 4) & 0xf; in analog_button_read()
230 port->buttons = 0; in analog_button_read()
233 port->buttons |= 1 << analog_chf[(~u >> 4) & 0xf]; in analog_button_read()
[all …]
A Djoydump.c34 int axes[4], buttons; in joydump_connect() local
54 gameport_cooked_read(gameport, axes, &buttons); in joydump_connect()
58 printk(KERN_INFO "joydump: | Buttons %02x. |\n", buttons); in joydump_connect()
A Dadi.c95 char buttons; member
213 for (i = 0; i < adi->buttons && i < 63; i++) { in adi_decode()
228 for (i = 63; i < adi->buttons; i++) in adi_decode()
336 adi->buttons = adi_get_bits(adi, 6); in adi_id_decode()
344 adi->buttons += adi_get_bits(adi, 6); in adi_id_decode()
360 t = 8 + adi->buttons + adi->axes10 * 10 + adi->axes8 * 8 + adi->hats * 4; in adi_id_decode()
370 adi->buttons -= 4; in adi_id_decode()
374 adi->buttons -= 4; in adi_id_decode()
419 for (i = 0; i < adi->buttons; i++) in adi_init_input()
/linux/drivers/mfd/
A Ducb1x00-assabet.c42 static struct gpio_keys_button buttons[6]; in ucb1x00_assabet_add() local
45 memset(buttons, 0, sizeof(buttons)); in ucb1x00_assabet_add()
48 for (i = 0; i < ARRAY_SIZE(buttons); i++) { in ucb1x00_assabet_add()
49 buttons[i].code = BTN_0 + i; in ucb1x00_assabet_add()
50 buttons[i].gpio = ucb->gpio.base + i; in ucb1x00_assabet_add()
51 buttons[i].type = EV_KEY; in ucb1x00_assabet_add()
52 buttons[i].can_disable = true; in ucb1x00_assabet_add()
55 keys.buttons = buttons; in ucb1x00_assabet_add()
56 keys.nbuttons = ARRAY_SIZE(buttons); in ucb1x00_assabet_add()
/linux/Documentation/input/
A Dgamepad.rst44 4 buttons in diamonds-shape (on the right side). The buttons are
48 4 buttons (on the left side) that point up, down, left and right.
50 Different constellations, but most-times 2 buttons: SELECT - START
61 Left- and Right-Triggers, the lower buttons Z-Left and Z-Right.
86 analog stick and two trigger buttons on the right side.
103 of the labels on the buttons, the codes are sent according to the
104 physical position of the buttons.
133 Some of these are available as digital buttons, some as analog buttons. Some
138 - Digital buttons are reported as:
142 - Analog buttons are reported as:
[all …]
/linux/drivers/input/mouse/
A Datarimouse.c65 int buttons, dx, dy; in atamouse_interrupt() local
67 buttons = (buf[0] & 1) | ((buf[0] & 2) << 1); in atamouse_interrupt()
69 buttons |= atari_mouse_buttons & 2; in atamouse_interrupt()
70 atari_mouse_buttons = buttons; in atamouse_interrupt()
80 input_report_key(atamouse_dev, BTN_LEFT, buttons & 0x4); in atamouse_interrupt()
81 input_report_key(atamouse_dev, BTN_MIDDLE, buttons & 0x2); in atamouse_interrupt()
82 input_report_key(atamouse_dev, BTN_RIGHT, buttons & 0x1); in atamouse_interrupt()
A Dlogibm.c61 unsigned char buttons; in logibm_interrupt() local
70 buttons = inb(LOGIBM_DATA_PORT); in logibm_interrupt()
71 dy |= (buttons & 0xf) << 4; in logibm_interrupt()
72 buttons = ~buttons >> 5; in logibm_interrupt()
76 input_report_key(logibm_dev, BTN_RIGHT, buttons & 1); in logibm_interrupt()
77 input_report_key(logibm_dev, BTN_MIDDLE, buttons & 2); in logibm_interrupt()
78 input_report_key(logibm_dev, BTN_LEFT, buttons & 4); in logibm_interrupt()
A Dinport.c69 unsigned char buttons; in inport_interrupt() local
81 buttons = inb(INPORT_DATA_PORT); in inport_interrupt()
83 input_report_key(inport_dev, BTN_MIDDLE, buttons & 1); in inport_interrupt()
84 input_report_key(inport_dev, BTN_LEFT, buttons & 2); in inport_interrupt()
85 input_report_key(inport_dev, BTN_RIGHT, buttons & 4); in inport_interrupt()
A Dmaplemouse.c29 int buttons, relx, rely, relz; in dc_mouse_callback() local
35 buttons = ~res[8]; in dc_mouse_callback()
40 input_report_key(dev, BTN_LEFT, buttons & 4); in dc_mouse_callback()
41 input_report_key(dev, BTN_MIDDLE, buttons & 9); in dc_mouse_callback()
42 input_report_key(dev, BTN_RIGHT, buttons & 2); in dc_mouse_callback()
/linux/drivers/input/
A Dmousedev.c55 unsigned long buttons; member
90 unsigned long buttons; member
276 if (client->ready && p->buttons != mousedev->packet.buttons) { in mousedev_notify_readers()
300 p->buttons = mousedev->packet.buttons; in mousedev_notify_readers()
303 p->buttons != client->last_buttons) in mousedev_notify_readers()
330 set_bit(0, &mousedev->packet.buttons); in mousedev_touchpad_touch()
335 clear_bit(0, &mousedev->packet.buttons); in mousedev_touchpad_touch()
584 ps2_data[0] |= p->buttons & 0x07; in mousedev_packet()
602 ((p->buttons & 0x08) >> 1); in mousedev_packet()
613 ((p->buttons & 0x08) >> 1); in mousedev_packet()
[all …]
/linux/drivers/input/keyboard/
A Dtca6416-keypad.c45 struct tca6416_button buttons[]; member
100 struct tca6416_button *button = &chip->buttons[pin_index]; in tca6416_keys_scan()
199 struct_size(chip, buttons, pdata->nbuttons), in tca6416_keypad_probe()
232 chip->buttons[i] = pdata->buttons[i]; in tca6416_keypad_probe()
233 type = (pdata->buttons[i].type) ?: EV_KEY; in tca6416_keypad_probe()
234 input_set_capability(input, type, pdata->buttons[i].code); in tca6416_keypad_probe()
A Dgpio_keys_polled.c101 gpio_keys_button_event(input, &pdata->buttons[i], in gpio_keys_polled_poll()
104 gpio_keys_polled_check_state(input, &pdata->buttons[i], in gpio_keys_polled_poll()
160 pdata->buttons = button; in gpio_keys_polled_get_devtree_pdata()
206 const struct gpio_keys_button *button = &pdata->buttons[i]; in gpio_keys_polled_set_abs_params()
278 const struct gpio_keys_button *button = &pdata->buttons[i]; in gpio_keys_polled_probe()
363 gpio_keys_polled_check_state(input, &pdata->buttons[i], in gpio_keys_polled_probe()
/linux/drivers/misc/ibmasm/
A Dremote.c125 unsigned char buttons = input->mouse_buttons; in print_input() local
128 (buttons) ? " -- buttons:" : "", in print_input()
129 (buttons & REMOTE_BUTTON_LEFT) ? "left " : "", in print_input()
130 (buttons & REMOTE_BUTTON_MIDDLE) ? "middle " : "", in print_input()
131 (buttons & REMOTE_BUTTON_RIGHT) ? "right" : "" in print_input()
146 unsigned char buttons = input->mouse_buttons; in send_mouse_event() local
150 input_report_key(dev, BTN_LEFT, buttons & REMOTE_BUTTON_LEFT); in send_mouse_event()
151 input_report_key(dev, BTN_MIDDLE, buttons & REMOTE_BUTTON_MIDDLE); in send_mouse_event()
152 input_report_key(dev, BTN_RIGHT, buttons & REMOTE_BUTTON_RIGHT); in send_mouse_event()
/linux/Documentation/input/devices/
A Dxpad.rst10 Due to backwards compatibility all buttons are reported as digital.
12 have only digital face buttons.
23 The number of buttons/axes reported varies based on 3 things:
28 module configuration for "Map D-PAD to buttons rather than axes for unknown
33 If you said Y it will map the d-pad to buttons, which is needed for dance
47 axes and 10 buttons.
54 All of the 10 buttons work (in digital mode). The six buttons on the
66 When using a known dance pad, jstest will report 6 axes and 14 buttons.
73 Known dance pads automatically map the d-pad to buttons and will work
77 of buttons, see section 0.3 - Unknown Controllers
[all …]
/linux/drivers/platform/x86/x86-android-tablets/
A Dcore.c153 static struct gpio_keys_button *buttons; variable
290 kfree(buttons); in x86_android_tablet_remove()
418 buttons = kcalloc(dev_info->gpio_button_count, sizeof(*buttons), GFP_KERNEL); in x86_android_tablet_probe()
419 if (!buttons) { in x86_android_tablet_probe()
434 buttons[i] = dev_info->gpio_button[i].button; in x86_android_tablet_probe()
435 buttons[i].gpio = desc_to_gpio(gpiod); in x86_android_tablet_probe()
440 pdata.buttons = buttons; in x86_android_tablet_probe()
/linux/drivers/input/gameport/
A Dfm801-gp.c29 static int fm801_gp_cooked_read(struct gameport *gameport, int *axes, int *buttons) in fm801_gp_cooked_read() argument
34 *buttons = (~w >> 14) & 0x03; in fm801_gp_cooked_read()
39 *buttons |= ((~w >> 14) & 0x03) << 2; in fm801_gp_cooked_read()
/linux/arch/mips/sgi-ip22/
A Dip22-reset.c142 unsigned int buttons; in panel_int() local
144 buttons = sgioc->panel; in panel_int()
160 if (!(buttons & SGIOC_PANEL_POWERINTR)) in panel_int()
/linux/drivers/input/misc/
A Dims-pcu.c109 struct ims_pcu_buttons buttons; member
185 struct ims_pcu_buttons *buttons = &pcu->buttons; in ims_pcu_buttons_report() local
203 struct ims_pcu_buttons *buttons = &pcu->buttons; in ims_pcu_setup_buttons() local
214 snprintf(buttons->name, sizeof(buttons->name), in ims_pcu_setup_buttons()
217 usb_make_path(pcu->udev, buttons->phys, sizeof(buttons->phys)); in ims_pcu_setup_buttons()
218 strlcat(buttons->phys, "/input0", sizeof(buttons->phys)); in ims_pcu_setup_buttons()
222 input->name = buttons->name; in ims_pcu_setup_buttons()
223 input->phys = buttons->phys; in ims_pcu_setup_buttons()
227 input->keycode = buttons->keymap; in ims_pcu_setup_buttons()
245 buttons->input = input; in ims_pcu_setup_buttons()
[all …]
/linux/Documentation/devicetree/bindings/input/
A Dgoogle,cros-ec-keyb.yaml19 switches/buttons like power and volume buttons.
24 - description: ChromeOS EC with only buttons/switches
26 - description: ChromeOS EC with keyboard and possibly buttons/switches
136 /* No matrix keyboard, just buttons/switches */
A Dadc-keys.yaml7 title: ADC attached resistor ladder buttons
23 const: buttons
82 io-channel-names = "buttons";
/linux/drivers/hid/
A Dhid-playstation.c212 uint8_t buttons[4]; member
428 uint8_t buttons[3]; member
1359 value = ds_report->buttons[0] & DS_BUTTONS0_HAT_SWITCH; in dualsense_parse_report()
1369 input_report_key(ds->gamepad, BTN_TL, ds_report->buttons[1] & DS_BUTTONS1_L1); in dualsense_parse_report()
1370 input_report_key(ds->gamepad, BTN_TR, ds_report->buttons[1] & DS_BUTTONS1_R1); in dualsense_parse_report()
1371 input_report_key(ds->gamepad, BTN_TL2, ds_report->buttons[1] & DS_BUTTONS1_L2); in dualsense_parse_report()
1372 input_report_key(ds->gamepad, BTN_TR2, ds_report->buttons[1] & DS_BUTTONS1_R2); in dualsense_parse_report()
1375 input_report_key(ds->gamepad, BTN_THUMBL, ds_report->buttons[1] & DS_BUTTONS1_L3); in dualsense_parse_report()
1376 input_report_key(ds->gamepad, BTN_THUMBR, ds_report->buttons[1] & DS_BUTTONS1_R3); in dualsense_parse_report()
1385 btn_mic_state = !!(ds_report->buttons[2] & DS_BUTTONS2_MIC_MUTE); in dualsense_parse_report()
[all …]

Completed in 55 milliseconds

1234567891011