Lines Matching +full:hid +full:- +full:mouse
1 .. zephyr:code-sample:: usb-hid-mouse
2 :name: USB HID mouse
3 :relevant-api: _usb_device_core_api usb_hid_device_api input_interface
5 Implement a basic HID mouse device.
10 This sample app demonstrates use of a USB Human Interface Device (HID) driver
12 into a mouse that has a left mouse button and optionally (depending on
13 the number of buttons on the board) a right mouse button, X-axis movement,
14 and Y-axis movement.
17 This sample can be found under :zephyr_file:`samples/subsys/usb/hid-mouse` in the
24 There must be a :dtcompatible:`gpio-keys` group of buttons or keys defined at
30 - ``INPUT_KEY_0``: left button
31 - ``INPUT_KEY_1``: right button
32 - ``INPUT_KEY_2``: move the mouse along the x-axis
33 - ``INPUT_KEY_3``: move the mouse along the y-axis
38 .. code-block:: none
48 .. zephyr-app-commands::
49 :zephyr-app: samples/subsys/usb/hid-mouse
58 .. code-block:: console
60 dmesg | tail -10
61 usb 2-2: new full-speed USB device number 2 using at91_ohci
62 usb 2-2: New USB device found, idVendor=2fe3, idProduct=0007, bcdDevice= 2.03
63 usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
64 usb 2-2: Product: Zephyr HID mouse sample
65 usb 2-2: Manufacturer: ZEPHYR
66 usb 2-2: SerialNumber: 86FE679A598AC47A
67 …input: ZEPHYR Zephyr HID mouse sample as /devices/soc0/ahb/600000.ohci/usb2/2-2/2-2:1.0/0003:2FE3:…
68 …hid-generic 0003:2FE3:0100.0001: input: USB HID v1.10 Mouse [ZEPHYR Zephyr HID mouse sample] on us…
70 You can also monitor mouse events by using the standard Linux ``evtest`` command
76 .. code-block:: console
81 Input device name: "ZEPHYR Zephyr HID mouse sample"
98 mouse button was pressed, and this information will be displayed
101 .. code-block:: console
105 Event: time 1167609663.618515, -------------- SYN_REPORT ------------
108 Event: time 1167609663.730510, -------------- SYN_REPORT ------------
110 If your board has more than one button, they will act as right mouse button,
111 X-axis movement, and Y-axis movement.