JOY2KEY(1)

πŸ“¦
version 1.6.3 Β· 2 versions
  • 1.6.3 Β· debian bookworm, debian trixie, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 1.6.3 Β· ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ‘‘ 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 is optional πŸ’…
  • () 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 of joy2key, 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 of joy2key.
  • -terminal β€” send ascii characters. may be compiled out of your copy of joy2key.
  • -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 the jstest program 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 the jstest program 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 for joy2key to work. joy2key only supports versions 1.0+ of the joystick driver. older versions of joy2key use the 0.8.0 joystick driver. if for some reason a 1.0+ joystick driver does not work for you, use joy2key 1.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 πŸ’…βœ¨