This reverts commit b8f059a881.
The localipc library was accidentally merged on the master branch,
whereas it should have been only on a side branch. This was generated
with the help of Cursor, and was in the process of being tested, but I
don't think it follows the style of the rest of the project. In
addition, this seems to be needlessly complex, and needs to be greatly
simplified.
In order to make daemon communication more secure, we are introducing a
new library to handle the interprocess communication over the Unix
socket. The localipc library abstracts away a lot of the boilerplate
around the socket API and ensures that the packets are cleanly
transferred between the clients and server.
A future change will modify the daemon logic to leverage localipc
instead of x52dcomm, and eliminate the manual poll loop. The daemon can
then handle the business logic of commands/notifications.
Prior to this change, SonarQube complains about duplicated code in the
symlinked header files. This change reworks the layout so that the
installed headers all reside under the 'includes' directory, and the
meson.build files are updated to reflect the new paths.
This change is an initial step to adding support for profiles in x52d.
This will allow the user to create a keyboard layout in an easy to
read/write text based format, and have it compiled into a flat layout
that's easy for the daemon to parse and load into memory. This layout
can then be used to map a user's action key to the actual input usage
needed. This is necessary, because keyboards don't actually send the
character that is typed, but just the position on the keyboard. For
example, on a French AZERTY keyboard, the A key would actually send the
usage for `Keyboard_q_and_Q`. The OS would translate that into the
letter 'a' (or 'A' if Shift key is held) and pass that to the active
window.
This commit adds the full logic necessary for the layout loading,
validation and compiling, as well as tests for the compiler and loader.
Prior to this change, pinelog would always strip the directory prefix
from __FILE__, displaying only the basename.
This change adds the ability to check the full path passed to the
compiler, which may still be only a basename, but that's still fine.
As part of the refactor, have the sources include the public headers via
the libx52 prefix, instead of relying on the include directories
approach in meson.build
Prior to this change, the mouse speed was controlled by an opaque
numeric value, that controlled both the speed and the delay between
updates. This caused a lot of choppy behavior with lower speeds, and the
really low speeds had as little as 1% speed difference between them in
the practical pixels/second speed, while there was effectively a 50%
jump in the speed between speed settings 11 and 12, due to the
hyperbolic relationship between steps. Post that, it was an even 25%
increase in sensitivity for every step.
This change modifies it so that the old Speed option is deprecated, it
is now replaced by the Sensitivity option, which is a direct percentage
scale from 10% to 500%. In addition, there is a CurveFactor option to
let it have fine control when there is little deflection, and move
faster when further away from the center. This also adds an
IsometricMode option which computes the speed as a function of the
cartesian distance from the center (`sqrt(dx^2 + dy^2)`). The default
behavior uses the existing linear speed which controls the speed of the
X and Y axes independently, but now uses the sensitivity and curve
factors to get better behavior. Also, the mouse events are consistently
reported every 10ms. This should make it a lot smoother.
Finally, this change also adds a Deadzone factor, which allows the user
to ignore small changes near the center of the joystick that can cause
mouse drift. This deadzone uses the total distance, so if just the X or
Y axis has moved, it will still allow suppressing any play in the thumb
stick.
Issue: #44
Previously, x52d had conditional compilation flags linking to libevdev
on Linux. However, I wanted to change this so that we use an abstraction
layer that will link to the appropriate backend (evdev on Linux only for
now). The idea is that we get rid of all conditional compilation blocks
and deal with the backend through the vkm library.
This new library handles the mouse scrolling, clicking, as well as
adding the ability to include keyboard events so that we can support the
profiles feature in a future commit.
The change to build using Meson broke the install target, causing x52ctl
and x52d to fail with a missing libx52dcomm library. This was fixed by
setting `install: true` in the library call.
In addition, several features were used that were leftover from my
earlier attempts to migrate to Meson, but targeted older Meson versions.
Some of these features were deprecated in newer Meson versions, and
therefore, cause warnings to show up during meson setup.
GH-Issue: #63
GH-Issue-URL: https://github.com/nirenjan/libx52/issues/63
When enabling --warnlevel=3 during Meson setup, the build threw up
several warnings, mostly related to either unused parameters, or
sometimes an integer type mismatch. This commit addresses all of those
changes and ensures that the build does not contain any unnecessary
warnings.
Prior to this change, the check was for an explicit -Dnls=enabled,
however, if the option was never set, it defaulted to disabled. With
this change, unless explicitly disabled, the Meson build system will
automatically build with NLS support.
Meson is a far more robust build framework, compared to autotools. This
greatly simplifies adding new features, since it's far easier to
maintain a set of meson.build files vs the autotools mishmash.
DEPRECATION NOTICE: Autotools based build is deprecated and will be
removed in the future.