jscal(1)

πŸ“¦
version 1.8.1 Β· 2 versions
  • 1.8.1 Β· alpine 3.24, arch rolling, debian bookworm, debian trixie, epel 10, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 1.7.1 Β· centos-stream 9, ubuntu jammy
, in alpine 3.24, arch rolling, debian bookworm, debian trixie, epel 10, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ jscal(1) ✨

okay so bestie, welcome to the joystick glow-up manual πŸ’– This one lives in the General Commands Manual section (section 1, the "just type it in your shell" section, iykyk).


🌸 NAME 🌸

jscal β€” the joystick calibration and remapping program, aka your controller's personal stylist πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

jscal [options] <device‐name>

✨ DESCRIPTION ✨

So jscal calibrates joysticks and maps joystick axes and buttons. Two whole jobs, and it ate both πŸ“

Calibrating a joystick makes sure the positions on the various axes are correctly interpreted β€” like, the kernel finally gets what your thumbstick is trying to say. Mapping axes and buttons lets the meanings of the joystick's axes and buttons be redefined, which is giving full main character energy for customization.

on Debian systems the calibration settings can be stored and later applied automatically using the jscal-store command. no cap, that's the convenient route πŸ’œ

πŸŽ€ OPTIONS πŸŽ€

  • -c, --calibrate β€” calibrate the joystick. the whole point of the girlboss era 🫢
  • -h, --help β€” prints out a summary of available options. when in doubt, ask for help, it's iconic ✨
  • -b <button> β€” specify a button to use to continue. by default, when calibrating axes, any button will cause the position to be read and used for calibration; this option lets you pick one specific button instead. super useful with devices where a single input is used for both an axis and a button β€” messy behaviour, honestly πŸ’€
  • -s, --set-correction <nb_axes,type,precision,coefficients,...> β€” sets correction to specified values. for each axis, specify the correction type (0 for none, 1 for "broken line"), the precision, and if necessary the correction coefficients ("broken line" corrections take four coefficients). yes bestie, four, count them 🧚
  • -u, --set-mappings <nb_axes,axmap1,axmap2,...,nb_buttons,btnmap1,btnmap2,...> β€” sets axis and button mappings. n_of_buttons can be set to 0 to remap axes only β€” axes-only remapping, she's low maintenance πŸ’…
  • -t, --test-center β€” tests if the joystick is correctly calibrated. returns 2 if the axes are not calibrated, 3 if buttons were pressed, 1 if there was any other error, and 0 on success. exit codes with lore fr fr πŸ”₯
  • -V, --version β€” prints the version numbers of the running joystick driver and that which jscal was compiled for. two versions, one command πŸ‘‘
  • -p, --print-correction β€” prints the current correction settings. the format of the output is a jscal command line. copy-paste core 🌈
  • -q, --print-mappings β€” prints the current axis and button mappings. the format of the output is a jscal command line. again: copy-paste core ⭐

🌈 CALIBRATION 🌈

the vibe check on axes

Using the Linux input system, joysticks are expected to produce values between -32767 and 32767 for axes, with 0 meaning the joystick is centred. So, full‐left should produce -32767 on the X axis, full‐right 32767 on the X axis, full‐forward -32767 on the Y axis, and so on. the way that these numbers are so specific 😭

Many joysticks and gamepads (especially older ones) are slightly mis‐aligned; as a result they may not use the full range of values (for the extremes of the axes), or β€” more annoyingly β€” they may not give 0 when centred. rude. Calibrating a joystick provides the kernel with information on a joystick's real behaviour, which lets the kernel correct various joysticks' deficiencies and produce consistent output as far as joystick‐using software is concerned. so it's basically therapy for your controller 🫢

how to know if it worked

jstest(1) is useful to determine whether a joystick is calibrated: when run, it should produce all 0s when the joystick is at rest, and each axis should be able to produce the values -32767 and 32767. Analog joysticks should produce values in between 0 and the extremes, but this is not necessary; digital directional pads work fine with only the three values. d-pads said "three values is plenty" and honestly? valid πŸ’€


πŸ’– SEE ALSO πŸ’–

ffset(1), jstest(1), jscal-store(1).


πŸ‘‘ AUTHORS πŸ‘‘

jscal was written by Vojtech Pavlik and improved by many others; see the linuxconsole tools documentation for details. group project, and it slayed ✨

This manual page was written by Stephen Kitt <steve@sk2.org>, for the Debian GNU/Linux system (but may be used by others). shoutout to the manpage author fr fr πŸ’œ


and that's the whole page bestie, go forth and calibrate πŸŽ€

this lil beauty is from jscal, dated May 21, 2022, and yeah the footer says jscal(1) again because the girl loves a signature πŸ’