chris-ali / j6dof-flight-sim

A high fidelity 6DOF flight simulation that the user can fly themselves or run to analyze an aircraft's flight dynamics
GNU General Public License v3.0
49 stars 13 forks source link

Joystick and Keyboard inputs not recognized in Linux #61

Closed chris-ali closed 4 years ago

chris-ali commented 4 years ago

Joystick names and axes are read differently in Linux vs Windows, so ControlsConfig.json and input classes need to reflect this.

Also, keyboards cannot be read by jinput in Linux w/o root privileges or device config settings because of security mitigations: https://stackoverflow.com/questions/4307143/using-keyboards-in-jinput-without-root-privileges

Likely need to pull out all inputs from simulation, handle them in JME and pass polled values and key events into simulation

chris-ali commented 4 years ago

Keyboard inputs in Linux Mint (and perhaps other distros) will not be read if the user is not part of the input group:

https://github.com/bulletmark/libinput-gestures/issues/7

Adding the user to the input group, logging out, and then back in fixed the issue. Will update documentation accordingly.

Joystick input devices have a different name in Linux vs Windows, so most likely this will need to be addressed in the future with a controls configuration GUI