JOY2KEY(1)
π JOY2KEY β the joystick-to-keyboard bestie (section 1 of the manual, General Commands Manual) π
β¨ NAME β¨
joy2key β emulate keyboard events using a Joystick πΉοΈβ¨οΈ
πΈ SYNOPSIS πΈ
joy2key Usage: joy2key ["Window Name"]
[ -rawconsole ]
[ -terminal ]
[ -X ]
[ -axis [(axis0) low hi] [(axis1) low hi] ...]
[ -thresh [(axis0) low hi] [(axis1) low hi] ...]
[ -buttons [(button0)] [(button1)] [(button2)] ...]
[ -dev {/dev/input/js0} ]
[ -rcfile {.joy2keyrc} ]
[ -config {no default} ]
[ -autorepeat {(freq) 5} ]
[ -deadzone {(percent) 50} ]
okay so here's the legend, bestie, learn it and you're set:
[]means the option or argument isoptionalπ()is just a lil hint about the arguments that option wants{}means the default (compiled-in) parameters π
not me reminding you: defaults may have been changed by editing joy2key.c π so your build might lowkey have different vibes than this page says.
π DESCRIPTION π
joy2key is out here monitoring the joystick (normally /dev/input/js0, the main character) and sending keyboard events to an X window, a terminal, or a raw console. it's giving bridge between your gamepad and literally anything that takes keys.
in the case of X, xwininfo(1) is used to retrieve the window ID β and that should not be a problem at all because xwininfo is a standard utility in most X11 distributions, so slay, you probably already have it. to find the symbolic name of a particular key, see include/X11/keysymdef.h β¨
in terminal mode, joy2key sends the ascii character given on the command line. so like, "joy2key -buttons a" means send lowercase 'a' when the first joystick button is pushed. iconic. one character in, one press out π«Ά
in raw console mode, please consult the document "rawscancodes" included in this distribution for the proper scancodes β no guessing, the scancodes are the whole plot iykyk π
π Options π
-Xβ send X events. may be compiled out of your copy ofjoy2key, so if it ghosts you that's why π-rawconsoleβ for SVGALIB and similar programs that put the keyboard in raw mode. sends scancodes. may be compiled out of your copy ofjoy2key.-terminalβ send ascii characters. may be compiled out of your copy ofjoy2key.-axisβ specifies actions to send when passing low/high values for each axis. specified in pairs, from axis0 β¦ axisN. that is, the X axis is axis0, then the Y axis (axis1), then if you have a joystick hat that may be axis 2 and 3, etc. to figure out which axis is which, use thejstestprogram that comes with the joystick driver π₯-buttonsβ similar to-arrows, but for buttons. goes from button0 β¦ buttonN, specifying the key to send for each button on the joystick. use thejstestprogram to determine the numbering for each button.-threshβ specifies low/high thresholds to use (i.e. at what point moving the stick or pressing the gamepad triggers an event) in pairs, for each joystick axis. so like, the vibe check line where movement actually counts β¨-devβ specifies joystick device to use. defaults/dev/input/js0(first joystick) πΉοΈ-autorepeatβ turns on and optionally specifies autorepeat frequency, i.e. the number of times per second a button which is held down will be repeated. hold it and it goes brrr π-deadzoneβ controls sensitivity when manually calibrating.-rcfileβ sets the rc file to look in.-configβ reads in a config in an rc file.
π¦ FILES π¦
/dev/js[01]β the joystick driver. must be installed forjoy2keyto work.joy2keyonly supports versions 1.0+ of the joystick driver. older versions ofjoy2keyuse the 0.8.0 joystick driver. if for some reason a 1.0+ joystick driver does not work for you, usejoy2key1.2. periodt π
the Linux joystick driver is available at:
http://atrey.karlin.mff.cuni.cz/~vojtech/joystick/
~/.joy2keyrcβ rc file searched for commands in-config.
the joy2key homepage is located at:
http://interreality.org/~tetron/technology/joy2key/
π BUGS π
I don't like writing man pages, so this man page may be buggy :) β no cap, that's a direct confession from the author, and honestly? relatable π
π COPYING π
this is free software under the GNU General Public License. see COPYING in the archive for more information π
and that's the whole page, bestie β go forth and make your joystick type. sending you good vibes and clean scancodes π
this was JOY2KEY(1) from the General Commands Manual, dated 17 August 1998. yeah she's an elder but she still slays π
β¨
π¦ where this page comes from
- debian bookworm: joy2key 1.6.3-5 Β· GPL-2.0-or-later
- debian trixie: joy2key 1.6.3-5 Β· GPL-2.0-or-later
- ubuntu noble: joy2key 1.6.3-5 Β· GPL-2.0-or-later
- ubuntu questing: joy2key 1.6.3-5
- ubuntu resolute: joy2key 1.6.3-5build1 Β· GPL-2.0-or-later
- ubuntu stonking: joy2key 1.6.3-5build1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms