Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Input: Add and document BTN_GRIP*

Many controllers these days have started including grip buttons. As
there has been no particular assigned BTN_* constants for these, they've
been haphazardly assigned to BTN_TRIGGER_HAPPY*. Unfortunately, the
assignment of these has varied significantly between drivers.

Add and document new constants for these grip buttons.

Signed-off-by: Vicki Pfau <vi@endrift.com>
Link: https://lore.kernel.org/r/20250702040102.125432-2-vi@endrift.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

authored by

Vicki Pfau and committed by
Dmitry Torokhov
97c01e65 a43a503d

+20
+13
Documentation/input/gamepad.rst
··· 190 190 191 191 Rumble is advertised as FF_RUMBLE. 192 192 193 + - Grip buttons: 194 + 195 + Many pads include buttons on the rear, usually referred to as either grip or 196 + rear buttons, or paddles. These are often reprogrammable by the firmware to 197 + appear as "normal" buttons, but are sometimes exposed to software too. Some 198 + notable examples of this are the Steam Deck, which has R4, R5, L4, and L5 on 199 + the back; the Xbox Elite pads, which have P1-P4; and the Switch 2 Pro 200 + Controller, which has GL and GR. 201 + 202 + For these controllers, BTN_GRIPR and BTN_GRIPR2 should be used for the top 203 + and bottom (if present) right grip button(s), and BTN_GRIPL and BTN_GRIPL2 204 + should be used for the top and bottom (if present) left grip button(s). 205 + 193 206 - Profile: 194 207 195 208 Some pads provide a multi-value profile selection switch. Examples include
+2
drivers/hid/hid-debug.c
··· 3291 3291 [BTN_TR2] = "BtnTR2", [BTN_SELECT] = "BtnSelect", 3292 3292 [BTN_START] = "BtnStart", [BTN_MODE] = "BtnMode", 3293 3293 [BTN_THUMBL] = "BtnThumbL", [BTN_THUMBR] = "BtnThumbR", 3294 + [BTN_GRIPL] = "BtnGripL", [BTN_GRIPR] = "BtnGripR", 3295 + [BTN_GRIPL2] = "BtnGripL2", [BTN_GRIPR2] = "BtnGripR2", 3294 3296 [BTN_TOOL_PEN] = "ToolPen", [BTN_TOOL_RUBBER] = "ToolRubber", 3295 3297 [BTN_TOOL_BRUSH] = "ToolBrush", [BTN_TOOL_PENCIL] = "ToolPencil", 3296 3298 [BTN_TOOL_AIRBRUSH] = "ToolAirbrush", [BTN_TOOL_FINGER] = "ToolFinger",
+5
include/uapi/linux/input-event-codes.h
··· 601 601 #define BTN_DPAD_LEFT 0x222 602 602 #define BTN_DPAD_RIGHT 0x223 603 603 604 + #define BTN_GRIPL 0x224 605 + #define BTN_GRIPR 0x225 606 + #define BTN_GRIPL2 0x226 607 + #define BTN_GRIPR2 0x227 608 + 604 609 #define KEY_ALS_TOGGLE 0x230 /* Ambient light sensor */ 605 610 #define KEY_ROTATE_LOCK_TOGGLE 0x231 /* Display rotation lock */ 606 611 #define KEY_REFRESH_RATE_TOGGLE 0x232 /* Display refresh rate toggle */