xref: /freebsd/share/man/man4/hgame.4 (revision 8ccc0d235c226d84112561d453c49904398d085c)
1.\"
2.\" SPDX-License-Identifier: BSD-2-Clause
3.\"
4.\" Copyright (c) 2020 Vladimir Kondratyev <wulf@FreeBSD.org>
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright
10.\"    notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\"    notice, this list of conditions and the following disclaimer in the
13.\"    documentation and/or other materials provided with the distribution.
14.\"
15.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25.\" SUCH DAMAGE.
26.\"
27.Dd November 12, 2025
28.Dt HGAME 4
29.Os
30.Sh NAME
31.Nm hgame
32.Nd generic HID gamepad, joystick, and controller evdev driver
33.Sh SYNOPSIS
34.Cd device hgame
35.Cd device hid
36.Cd device hidbus
37.Cd device hidmap
38.Cd device evdev
39.Pp
40In
41.Xr sysctl.conf 5 :
42.Cd dev.hgame.X.debug
43.Pp
44In
45.Xr loader.conf 5 :
46.Cd hw.hid.hgame.debug
47.Cd hgame_load
48.Sh DESCRIPTION
49The
50.Nm
51driver supports generic game controllers
52that attach to the HID transport backend,
53and presents them to applications over the
54.Sy evdev
55interface.
56.Pp
57If the appropriate hardware is detected,
58the driver will be loaded automatically by
59.Xr devmatch 8 .
60To load the driver manually at boot time, set the
61.Va hgame_load
62variable to
63.Ar YES
64at the
65.Xr loader 8
66prompt, or add it to
67.Xr loader.conf 5 .
68.Pp
69To give user applications access to the game controllers,
70allow user access to the
71.Pa /dev/input/event*
72nodes with
73.Xr devfs.rules 5 .
74.Sh HARDWARE
75The
76.Nm
77driver supports HID gamepads, joysticks, and controllers such as:
78.Pp
79.Bl -bullet -compact
80.It
818bitdo USB Wireless Adapter 2
82.El
83.Sh SYSCTL VARIABLES
84The following variable is available as both
85.Xr sysctl 8
86variable and
87.Xr loader 8
88tunable:
89.Bl -tag -width indent
90.It Va dev.hgame.X.debug
91Debug output level,
92where 0 is debugging disabled and
93larger values increase debug message verbosity.
94Default is 0.
95.El
96.Pp
97Its default value is set with
98.Xr loader 8
99tunable:
100.Bl -tag -width indent
101.It Va hw.hid.hgame.debug
102.El
103.Sh FILES
104.Bl -tag -width "/dev/input/event*" -compact
105.It Pa /dev/input/event*
106input event device
107.Pq Sy evdev
108node
109.El
110.Sh SEE ALSO
111.Xr iichid 4 ,
112.Xr ps4dshock 4 ,
113.Xr usbhid 4 ,
114.Xr xb360gp 4 ,
115.Xr devfs.rules 5
116.Sh HISTORY
117The
118.Nm
119driver first appeared in
120.Fx 13.0 .
121.Sh AUTHORS
122.An -nosplit
123The
124.Nm
125driver was written by
126.An Val Packett Aq Mt val@packett.cool .
127.Pp
128This manual page was written by
129.An Vladimir Kondratyev Aq Mt wulf@FreeBSD.org .
130