mirror of https://github.com/nirenjan/libx52.git
feat: Improve virtual mouse speed calculations
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: #44profile-support
parent
991a307191
commit
03d58c62e8
|
|
@ -9,6 +9,7 @@ The format is based upon [Keep a Changelog].
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
- Migrated CI builds to run in multiple distro containers.
|
- Migrated CI builds to run in multiple distro containers.
|
||||||
|
- Improved virtual mouse motion to use a smoother approach, as well as allow an isometric speed calculation. This change deprecates the old `Mouse.Speed` configuration option and replaces it with a Sensitivity percentage option.
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- Addressed meson build bugs found in v0.3.3
|
- Addressed meson build bugs found in v0.3.3
|
||||||
|
|
|
||||||
|
|
@ -32,9 +32,10 @@ x52d_sources = [
|
||||||
]
|
]
|
||||||
|
|
||||||
dep_threads = dependency('threads')
|
dep_threads = dependency('threads')
|
||||||
|
|
||||||
# Comm sources are compiled into x52d (same as Autotools); libx52dcomm is only for x52ctl.
|
# Comm sources are compiled into x52d (same as Autotools); libx52dcomm is only for x52ctl.
|
||||||
x52d_linkwith = [lib_libx52, lib_vkm, lib_libx52io]
|
x52d_linkwith = [lib_libx52, lib_vkm, lib_libx52io]
|
||||||
x52d_deps = [dep_pinelog, dep_inih, dep_threads, dep_intl]
|
x52d_deps = [dep_pinelog, dep_inih, dep_threads, dep_math, dep_intl]
|
||||||
x52d_cflags = []
|
x52d_cflags = []
|
||||||
|
|
||||||
exe_x52d = executable('x52d', x52d_sources + libx52dcomm_sources,
|
exe_x52d = executable('x52d', x52d_sources + libx52dcomm_sources,
|
||||||
|
|
@ -59,7 +60,7 @@ test('daemon-communication', files('test_daemon_comm.py')[0],
|
||||||
x52d_mouse_test_sources = ['x52d_mouse_test.c', 'x52d_mouse.c']
|
x52d_mouse_test_sources = ['x52d_mouse_test.c', 'x52d_mouse.c']
|
||||||
x52d_mouse_test = executable('x52d-mouse-test', x52d_mouse_test_sources,
|
x52d_mouse_test = executable('x52d-mouse-test', x52d_mouse_test_sources,
|
||||||
include_directories: includes,
|
include_directories: includes,
|
||||||
dependencies: [dep_pinelog, dep_cmocka, dep_intl])
|
dependencies: [dep_pinelog, dep_cmocka, dep_intl, dep_math])
|
||||||
|
|
||||||
test('x52d-mouse-test', x52d_mouse_test, protocol: 'tap')
|
test('x52d-mouse-test', x52d_mouse_test, protocol: 'tap')
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -82,12 +82,44 @@ LED=128
|
||||||
# Enabled controls whether the virtual mouse is enabled or not.
|
# Enabled controls whether the virtual mouse is enabled or not.
|
||||||
Enabled=yes
|
Enabled=yes
|
||||||
|
|
||||||
# Speed is proportional to the speed of updates to the virtual mouse
|
# Sensitivity is the sensitivity percentage of the virtual mouse. This
|
||||||
|
# replaces the old Speed option, and is a percentage value by which to
|
||||||
|
# scale the input. The sensitivity can vary from 10% to 500%.
|
||||||
|
Sensitivity=100
|
||||||
|
|
||||||
|
# DEPRECATED: Speed is proportional to the speed of updates to the virtual mouse
|
||||||
|
# This used a calculation with delays and multiplication factors to simulate
|
||||||
|
# the mouse moves, but it felt choppy at lower speeds.
|
||||||
Speed=0
|
Speed=0
|
||||||
|
|
||||||
# ReverseScroll reverses the direction of the virtual scroll wheel
|
# ReverseScroll reverses the direction of the virtual scroll wheel
|
||||||
ReverseScroll=no
|
ReverseScroll=no
|
||||||
|
|
||||||
|
# Isometric mode controls if the mouse movement is computed based on
|
||||||
|
# both X and Y movements. If enabled, the behavior is similar to the
|
||||||
|
# mouse nubs found on some laptops. Otherwise, the X and Y movements
|
||||||
|
# are independent of each other.
|
||||||
|
IsometricMode=no
|
||||||
|
|
||||||
|
# Curve factor controls the speed curve in an exponential manner, so
|
||||||
|
# that the user can get finer control at the lower end of motion, while
|
||||||
|
# increasing speeds at the upper end. Values range from 1-5, with the
|
||||||
|
# following descriptions. Values are clamped in this range.
|
||||||
|
# 1: Linear motion - no curve
|
||||||
|
# 2: Soft curve: slight dampening in the lower ranges
|
||||||
|
# 3: Standard: Feels like a Thinkpad
|
||||||
|
# 4: Precision: heavy dampening in lower ranges, high speed elsewhere
|
||||||
|
# 5: Aggressive: "sniper" mode in the lower rnages, "flick" elsewhere
|
||||||
|
CurveFactor=3
|
||||||
|
|
||||||
|
# Deadzone is a configurable value from 0-11, with 0 being no deadzone
|
||||||
|
# and the deadzone size increasing with increasing values. This is useful
|
||||||
|
# when there is a loose thumbstick and you want to restrict the motion
|
||||||
|
# when there's no user input. A deadzone of 0 is perfectly fine for a
|
||||||
|
# new joystick, but keep in mind that the higher values will require
|
||||||
|
# you to push more to get any motion out of the virtual mouse.
|
||||||
|
Deadzone=0
|
||||||
|
|
||||||
######################################################################
|
######################################################################
|
||||||
# Profiles - only valid on Linux
|
# Profiles - only valid on Linux
|
||||||
######################################################################
|
######################################################################
|
||||||
|
|
@ -109,6 +141,6 @@ ClutchLatched=no
|
||||||
|
|
||||||
##################
|
##################
|
||||||
#X52 Input Servic#
|
#X52 Input Servic#
|
||||||
#Version 0.2.2 #
|
#Version 0.3.3 #
|
||||||
#OS: Linux #
|
#OS: Linux #
|
||||||
##################
|
##################
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ static int _setup_sockaddr(struct sockaddr_un *remote, const char *sock_path)
|
||||||
remote->sun_family = AF_UNIX;
|
remote->sun_family = AF_UNIX;
|
||||||
/* We've already verified that sock_path will fit, so we don't need strncpy */
|
/* We've already verified that sock_path will fit, so we don't need strncpy */
|
||||||
strcpy(remote->sun_path, sock_path);
|
strcpy(remote->sun_path, sock_path);
|
||||||
len += sizeof(remote->sun_family);
|
len += sizeof(*remote) - sizeof(remote->sun_path);
|
||||||
|
|
||||||
return len;
|
return len;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -71,13 +71,26 @@ CFG(Brightness, LED, brightness[1], int, 128)
|
||||||
// Enabled controls whether the virtual mouse is enabled or not.
|
// Enabled controls whether the virtual mouse is enabled or not.
|
||||||
CFG(Mouse, Enabled, mouse_enabled, bool, true)
|
CFG(Mouse, Enabled, mouse_enabled, bool, true)
|
||||||
|
|
||||||
// Speed is a value that is proportional to the speed of updates to the
|
// DEPRECATED: Speed is a value that is proportional to the speed of updates to
|
||||||
// virtual mouse
|
// the virtual mouse
|
||||||
CFG(Mouse, Speed, mouse_speed, int, 0)
|
CFG(Mouse, Speed, mouse_speed, int, 0)
|
||||||
|
|
||||||
|
// Sensitivity is a percentage that is used to scale the speed of the virtual
|
||||||
|
// mouse. This replaces the old speed value.
|
||||||
|
CFG(Mouse, Sensitivity, mouse_sensitivity, int, 0)
|
||||||
|
|
||||||
// ReverseScroll controls the scrolling direction
|
// ReverseScroll controls the scrolling direction
|
||||||
CFG(Mouse, ReverseScroll, mouse_reverse_scroll, bool, false)
|
CFG(Mouse, ReverseScroll, mouse_reverse_scroll, bool, false)
|
||||||
|
|
||||||
|
// IsometricMode controls whether to use linear or isometric speed calculations
|
||||||
|
CFG(Mouse, IsometricMode, mouse_isometric_mode, bool, false)
|
||||||
|
|
||||||
|
// CurveFactor controls the speed curve
|
||||||
|
CFG(Mouse, CurveFactor, mouse_curve_factor, int, 3)
|
||||||
|
|
||||||
|
// Deadzone controls the deadzone range for the thumbstick
|
||||||
|
CFG(Mouse, Deadzone, mouse_deadzone_factor, int, 0)
|
||||||
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
* Profiles - only valid on Linux
|
* Profiles - only valid on Linux
|
||||||
*********************************************************************/
|
*********************************************************************/
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,11 @@ struct x52d_config {
|
||||||
|
|
||||||
bool mouse_enabled;
|
bool mouse_enabled;
|
||||||
int mouse_speed;
|
int mouse_speed;
|
||||||
|
int mouse_sensitivity;
|
||||||
bool mouse_reverse_scroll;
|
bool mouse_reverse_scroll;
|
||||||
|
bool mouse_isometric_mode;
|
||||||
|
int mouse_curve_factor;
|
||||||
|
int mouse_deadzone_factor;
|
||||||
|
|
||||||
bool clutch_enabled;
|
bool clutch_enabled;
|
||||||
bool clutch_latched;
|
bool clutch_latched;
|
||||||
|
|
@ -72,7 +76,11 @@ void x52d_cfg_set_Brightness_MFD(uint16_t param);
|
||||||
void x52d_cfg_set_Brightness_LED(uint16_t param);
|
void x52d_cfg_set_Brightness_LED(uint16_t param);
|
||||||
void x52d_cfg_set_Mouse_Enabled(bool param);
|
void x52d_cfg_set_Mouse_Enabled(bool param);
|
||||||
void x52d_cfg_set_Mouse_Speed(int param);
|
void x52d_cfg_set_Mouse_Speed(int param);
|
||||||
|
void x52d_cfg_set_Mouse_Sensitivity(int param);
|
||||||
void x52d_cfg_set_Mouse_ReverseScroll(bool param);
|
void x52d_cfg_set_Mouse_ReverseScroll(bool param);
|
||||||
|
void x52d_cfg_set_Mouse_IsometricMode(bool param);
|
||||||
|
void x52d_cfg_set_Mouse_CurveFactor(int param);
|
||||||
|
void x52d_cfg_set_Mouse_Deadzone(int param);
|
||||||
void x52d_cfg_set_Profiles_Directory(char* param);
|
void x52d_cfg_set_Profiles_Directory(char* param);
|
||||||
void x52d_cfg_set_Profiles_ClutchEnabled(bool param);
|
void x52d_cfg_set_Profiles_ClutchEnabled(bool param);
|
||||||
void x52d_cfg_set_Profiles_ClutchLatched(bool param);
|
void x52d_cfg_set_Profiles_ClutchLatched(bool param);
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
#define PINELOG_MODULE X52D_MOD_MOUSE
|
#define PINELOG_MODULE X52D_MOD_MOUSE
|
||||||
#include "pinelog.h"
|
#include "pinelog.h"
|
||||||
|
|
@ -20,11 +21,33 @@
|
||||||
#define DEFAULT_MOUSE_DELAY 70000
|
#define DEFAULT_MOUSE_DELAY 70000
|
||||||
#define MOUSE_DELAY_DELTA 5000
|
#define MOUSE_DELAY_DELTA 5000
|
||||||
#define MOUSE_DELAY_MIN 10000
|
#define MOUSE_DELAY_MIN 10000
|
||||||
|
#define MOUSE_MULT_FACTOR 4
|
||||||
#define MAX_MOUSE_MULT 5
|
#define MAX_MOUSE_MULT 5
|
||||||
|
#define MIN_SENSITIVITY 10
|
||||||
|
#define MAX_SENSITIVITY 500
|
||||||
|
|
||||||
volatile int mouse_delay = DEFAULT_MOUSE_DELAY;
|
|
||||||
volatile int mouse_mult = MOUSE_MULT_FACTOR;
|
|
||||||
volatile int mouse_scroll_dir = 1;
|
volatile int mouse_scroll_dir = 1;
|
||||||
|
volatile bool mouse_isometric_mode = false;
|
||||||
|
volatile int mouse_curve_factor = 3;
|
||||||
|
volatile int mouse_deadzone_factor = 0;
|
||||||
|
volatile int mouse_sensitivity = 0;
|
||||||
|
|
||||||
|
static int clamp_int(const char *description, int value, int min, int max)
|
||||||
|
{
|
||||||
|
if (value < min) {
|
||||||
|
PINELOG_DEBUG(_("Clamping %s value %d to range [%d..%d]"),
|
||||||
|
description, value, min, max);
|
||||||
|
return min;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (value > max) {
|
||||||
|
PINELOG_DEBUG(_("Clamping %s value %d to range [%d..%d]"),
|
||||||
|
description, value, min, max);
|
||||||
|
return max;
|
||||||
|
}
|
||||||
|
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
void x52d_cfg_set_Mouse_Enabled(bool enabled)
|
void x52d_cfg_set_Mouse_Enabled(bool enabled)
|
||||||
{
|
{
|
||||||
|
|
@ -35,17 +58,21 @@ void x52d_cfg_set_Mouse_Enabled(bool enabled)
|
||||||
|
|
||||||
void x52d_cfg_set_Mouse_Speed(int speed)
|
void x52d_cfg_set_Mouse_Speed(int speed)
|
||||||
{
|
{
|
||||||
|
// DEPRECATED, calculate the sensitivity instead
|
||||||
int new_delay;
|
int new_delay;
|
||||||
int new_mult;
|
int new_mult;
|
||||||
|
|
||||||
int max_base_speed = (DEFAULT_MOUSE_DELAY - MOUSE_DELAY_MIN) / MOUSE_DELAY_DELTA;
|
int max_base_speed = (DEFAULT_MOUSE_DELAY - MOUSE_DELAY_MIN) / MOUSE_DELAY_DELTA;
|
||||||
int max_speed = max_base_speed + MAX_MOUSE_MULT * MOUSE_MULT_FACTOR;
|
int max_speed = max_base_speed + MAX_MOUSE_MULT * MOUSE_MULT_FACTOR;
|
||||||
|
|
||||||
if (speed < 0 || speed > max_speed) {
|
double sensitivity;
|
||||||
PINELOG_INFO(_("Ignoring mouse speed %d outside supported range (0-%d)"),
|
|
||||||
speed, max_speed);
|
if (mouse_sensitivity == 0) {
|
||||||
return;
|
PINELOG_WARN(_("Config option 'mouse.speed' is DEPRECATED. Please use 'mouse.sensitivity' instead"));
|
||||||
} else if (speed <= max_base_speed) {
|
}
|
||||||
|
|
||||||
|
speed = clamp_int("mouse speed", speed, 0, max_speed);
|
||||||
|
if (speed <= max_base_speed) {
|
||||||
new_delay = DEFAULT_MOUSE_DELAY - speed * MOUSE_DELAY_DELTA;
|
new_delay = DEFAULT_MOUSE_DELAY - speed * MOUSE_DELAY_DELTA;
|
||||||
new_mult = MOUSE_MULT_FACTOR;
|
new_mult = MOUSE_MULT_FACTOR;
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -54,10 +81,12 @@ void x52d_cfg_set_Mouse_Speed(int speed)
|
||||||
new_mult = MOUSE_MULT_FACTOR + (speed - max_base_speed);
|
new_mult = MOUSE_MULT_FACTOR + (speed - max_base_speed);
|
||||||
}
|
}
|
||||||
|
|
||||||
PINELOG_DEBUG(_("Setting mouse speed to %d (delay %d ms, multiplier %f)"),
|
sensitivity = round(1e6 / new_delay * new_mult / (double)MOUSE_MULT_FACTOR);
|
||||||
speed, new_delay / 1000, new_mult / (double)MOUSE_MULT_FACTOR);
|
|
||||||
mouse_delay = new_delay;
|
PINELOG_INFO(_("Migrating legacy mouse speed '%d' to sensitivity '%d' (percentage)"),
|
||||||
mouse_mult = new_mult;
|
speed, (int)sensitivity);
|
||||||
|
mouse_sensitivity = clamp_int(_("speed -> sensitivity"), (int)sensitivity,
|
||||||
|
MIN_SENSITIVITY, MAX_SENSITIVITY);
|
||||||
}
|
}
|
||||||
|
|
||||||
void x52d_cfg_set_Mouse_ReverseScroll(bool enabled)
|
void x52d_cfg_set_Mouse_ReverseScroll(bool enabled)
|
||||||
|
|
@ -71,3 +100,33 @@ void x52d_cfg_set_Mouse_ReverseScroll(bool enabled)
|
||||||
mouse_scroll_dir = 1;
|
mouse_scroll_dir = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void x52d_cfg_set_Mouse_IsometricMode(bool enabled)
|
||||||
|
{
|
||||||
|
PINELOG_DEBUG(_("Setting mouse isometric mode to %s"),
|
||||||
|
enabled ? _("on") : _("off"));
|
||||||
|
mouse_isometric_mode = enabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
void x52d_cfg_set_Mouse_Sensitivity(int factor)
|
||||||
|
{
|
||||||
|
mouse_sensitivity = clamp_int(_("sensitivity"), factor,
|
||||||
|
MIN_SENSITIVITY, MAX_SENSITIVITY);
|
||||||
|
|
||||||
|
PINELOG_DEBUG(_("Setting mouse sensitivity to %d%%"), mouse_sensitivity);
|
||||||
|
}
|
||||||
|
|
||||||
|
void x52d_cfg_set_Mouse_CurveFactor(int factor)
|
||||||
|
{
|
||||||
|
// Factor ranges from 1-5, clamp it in this range
|
||||||
|
// Shift by 1 so it uses the correct index
|
||||||
|
mouse_curve_factor = clamp_int(_("curve factor"), factor, 1, 5) - 1;
|
||||||
|
PINELOG_DEBUG(_("Setting mouse curve factor to %d"), mouse_curve_factor);
|
||||||
|
}
|
||||||
|
|
||||||
|
void x52d_cfg_set_Mouse_Deadzone(int factor)
|
||||||
|
{
|
||||||
|
// Factor ranges from 0-12, clamp it in this range
|
||||||
|
mouse_deadzone_factor = clamp_int(_("deadzone factor"), factor, 0, 11);
|
||||||
|
PINELOG_DEBUG(_("Setting mouse deadzone to %d"), mouse_deadzone_factor);
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,11 +12,11 @@
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include "libx52io.h"
|
#include "libx52io.h"
|
||||||
|
|
||||||
extern volatile int mouse_delay;
|
extern volatile bool mouse_isometric_mode;
|
||||||
extern volatile int mouse_mult;
|
|
||||||
extern volatile int mouse_scroll_dir;
|
extern volatile int mouse_scroll_dir;
|
||||||
|
extern volatile int mouse_curve_factor;
|
||||||
#define MOUSE_MULT_FACTOR 4
|
extern volatile int mouse_deadzone_factor;
|
||||||
|
extern volatile int mouse_sensitivity;
|
||||||
|
|
||||||
void x52d_mouse_thread_control(bool enabled);
|
void x52d_mouse_thread_control(bool enabled);
|
||||||
void x52d_mouse_handler_init(void);
|
void x52d_mouse_handler_init(void);
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
#include "libx52io.h"
|
#include "libx52io.h"
|
||||||
#include "vkm.h"
|
#include "vkm.h"
|
||||||
|
|
@ -85,40 +86,104 @@ static int report_wheel(void)
|
||||||
return (rc == VKM_SUCCESS);
|
return (rc == VKM_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int get_axis_val(int index)
|
static inline int fsgn(double f)
|
||||||
{
|
{
|
||||||
int axis_val = new_report.axis[index];
|
return (f >= 0 ? 1 : -1);
|
||||||
|
|
||||||
/*
|
|
||||||
* Axis value ranges from 0 to 15, with the default midpoint at 8.
|
|
||||||
* We need to translate this to a range of -7 to +7. Since the midpoint
|
|
||||||
* is slightly off-center, we will shift the values left, and subtract
|
|
||||||
* 15, effectively, giving us a range of -15 to +15. Shifting right again
|
|
||||||
* will reduce the range to -7 to +7, and effectively ignore the reported
|
|
||||||
* values of 7 and 8.
|
|
||||||
*/
|
|
||||||
axis_val = ((axis_val << 1) - 15) >> 1;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Factor in the multiplicative factor for the axis. This deliberately
|
|
||||||
* uses integer division, since the uinput event only accepts integers.
|
|
||||||
* For the speed purposes, this should be good enough.
|
|
||||||
*/
|
|
||||||
axis_val = (axis_val * mouse_mult) / MOUSE_MULT_FACTOR;
|
|
||||||
|
|
||||||
return axis_val;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static const double MOUSE_CURVE_FACTORS[5] = {
|
||||||
|
1.0, 1.2, 1.5, 1.8, 2.0
|
||||||
|
};
|
||||||
|
|
||||||
|
static const double MOUSE_DEADZONES[12] = {
|
||||||
|
0.0, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.1, 1.2, 1.3, 1.4, 1.5
|
||||||
|
};
|
||||||
|
|
||||||
static int report_axis(void)
|
static int report_axis(void)
|
||||||
{
|
{
|
||||||
vkm_result rc;
|
#define MAX_TICK_SPEED 250.0
|
||||||
int dx = get_axis_val(LIBX52IO_AXIS_THUMBX);
|
|
||||||
int dy = get_axis_val(LIBX52IO_AXIS_THUMBY);
|
|
||||||
|
|
||||||
rc = vkm_mouse_move(mouse_context, dx, dy);
|
static double accum_x = 0.0;
|
||||||
|
static double accum_y = 0.0;
|
||||||
|
|
||||||
|
/* Center raw HID values (0,15) => (-8, 7) */
|
||||||
|
int dx = new_report.axis[LIBX52IO_AXIS_THUMBX] - 8;
|
||||||
|
int dy = new_report.axis[LIBX52IO_AXIS_THUMBY] - 8;
|
||||||
|
|
||||||
|
/* Calculate radial magnitude */
|
||||||
|
double mag = sqrt((double)(dx * dx + dy * dy));
|
||||||
|
double cfg_deadzone = MOUSE_DEADZONES[mouse_deadzone_factor];
|
||||||
|
|
||||||
|
/* Radial deadzone check */
|
||||||
|
if (mag <= cfg_deadzone) {
|
||||||
|
accum_x = 0.0;
|
||||||
|
accum_y = 0.0;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Calculate gain */
|
||||||
|
double gain = (double)mouse_sensitivity / 100.0;
|
||||||
|
double exponent = MOUSE_CURVE_FACTORS[mouse_curve_factor];
|
||||||
|
|
||||||
|
/* Normalize magnitude */
|
||||||
|
double adj_mag = mag - cfg_deadzone;
|
||||||
|
double out_x = 0.0;
|
||||||
|
double out_y = 0.0;
|
||||||
|
|
||||||
|
if (mouse_isometric_mode) {
|
||||||
|
/* Isometric mode: speed is a function of total distance */
|
||||||
|
double speed = gain * pow(adj_mag, exponent);
|
||||||
|
|
||||||
|
/* Clamp total speed before breaking into components */
|
||||||
|
if (speed > MAX_TICK_SPEED) {
|
||||||
|
speed = MAX_TICK_SPEED;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Unit vector * speed */
|
||||||
|
out_x = (dx / mag) * speed;
|
||||||
|
out_y = (dy / mag) * speed;
|
||||||
|
} else {
|
||||||
|
/* Linear mode: speed is independently calculated for X & Y axes */
|
||||||
|
double ratio = adj_mag / mag;
|
||||||
|
double cur_x = dx * ratio;
|
||||||
|
double cur_y = dy * ratio;
|
||||||
|
|
||||||
|
out_x = fsgn(cur_x) * gain * pow(fabs(cur_x), exponent);
|
||||||
|
out_y = fsgn(cur_y) * gain * pow(fabs(cur_y), exponent);
|
||||||
|
|
||||||
|
/* Clamp individual axis speeds */
|
||||||
|
if (fabs(out_x) > MAX_TICK_SPEED) {
|
||||||
|
out_x = fsgn(out_x) * MAX_TICK_SPEED;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (fabs(out_y) > MAX_TICK_SPEED) {
|
||||||
|
out_y = fsgn(out_y) * MAX_TICK_SPEED;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Accumulate movement and independent resets */
|
||||||
|
accum_x += out_x;
|
||||||
|
accum_y += out_y;
|
||||||
|
|
||||||
|
if (dx == 0) {
|
||||||
|
accum_x = 0.0;
|
||||||
|
}
|
||||||
|
if (dy == 0) {
|
||||||
|
accum_y = 0.0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Extract integer values for VKM injection */
|
||||||
|
int move_x = (int)accum_x;
|
||||||
|
int move_y = (int)accum_y;
|
||||||
|
|
||||||
|
accum_x -= move_x;
|
||||||
|
accum_y -= move_y;
|
||||||
|
|
||||||
|
vkm_result rc;
|
||||||
|
rc = vkm_mouse_move(mouse_context, move_x, move_y);
|
||||||
if (rc != VKM_SUCCESS && rc != VKM_ERROR_NO_CHANGE) {
|
if (rc != VKM_SUCCESS && rc != VKM_ERROR_NO_CHANGE) {
|
||||||
PINELOG_ERROR(_("Error %d writing mouse axis event (dx %d, dy %d)"),
|
PINELOG_ERROR(_("Error %d writing mouse axis event (dx %d, dy %d)"),
|
||||||
rc, dx, dy);
|
rc, move_x, move_y);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (rc == VKM_SUCCESS);
|
return (rc == VKM_SUCCESS);
|
||||||
|
|
@ -154,7 +219,7 @@ static void * x52_mouse_thr(void *param)
|
||||||
report_sync();
|
report_sync();
|
||||||
}
|
}
|
||||||
|
|
||||||
usleep(mouse_delay);
|
usleep(10000);
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
|
||||||
|
|
@ -44,75 +44,61 @@ static void test_mouse_thread_disabled(void **state)
|
||||||
x52d_cfg_set_Mouse_Enabled(false);
|
x52d_cfg_set_Mouse_Enabled(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* The following tests are dependent on the values in x52d_mouse.c */
|
||||||
static void test_mouse_speed_negative(void **state)
|
static void test_mouse_speed_negative(void **state)
|
||||||
{
|
{
|
||||||
(void)state;
|
(void)state;
|
||||||
int orig_mouse_delay = mouse_delay;
|
|
||||||
int orig_mouse_mult = mouse_mult;
|
|
||||||
|
|
||||||
x52d_cfg_set_Mouse_Speed(-1);
|
x52d_cfg_set_Mouse_Speed(-1);
|
||||||
assert_int_equal(mouse_delay, orig_mouse_delay);
|
assert_int_equal(mouse_sensitivity, 14);
|
||||||
assert_int_equal(mouse_mult, orig_mouse_mult);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The following tests are dependent on the values in x52d_mouse.c */
|
|
||||||
static void test_mouse_speed_0(void **state)
|
static void test_mouse_speed_0(void **state)
|
||||||
{
|
{
|
||||||
(void)state;
|
(void)state;
|
||||||
x52d_cfg_set_Mouse_Speed(0);
|
x52d_cfg_set_Mouse_Speed(0);
|
||||||
assert_int_equal(mouse_delay, 70000);
|
assert_int_equal(mouse_sensitivity, 14);
|
||||||
assert_int_equal(mouse_mult, 4);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void test_mouse_speed_mid_base(void **state)
|
static void test_mouse_speed_mid_base(void **state)
|
||||||
{
|
{
|
||||||
(void)state;
|
(void)state;
|
||||||
x52d_cfg_set_Mouse_Speed(6);
|
x52d_cfg_set_Mouse_Speed(6);
|
||||||
assert_int_equal(mouse_delay, 40000);
|
assert_int_equal(mouse_sensitivity, 25);
|
||||||
assert_int_equal(mouse_mult, 4);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void test_mouse_speed_max_base(void **state)
|
static void test_mouse_speed_max_base(void **state)
|
||||||
{
|
{
|
||||||
(void)state;
|
(void)state;
|
||||||
x52d_cfg_set_Mouse_Speed(12);
|
x52d_cfg_set_Mouse_Speed(12);
|
||||||
assert_int_equal(mouse_delay, 10000);
|
assert_int_equal(mouse_sensitivity, 100);
|
||||||
assert_int_equal(mouse_mult, 4);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void test_mouse_speed_min_hyper(void **state)
|
static void test_mouse_speed_min_hyper(void **state)
|
||||||
{
|
{
|
||||||
(void)state;
|
(void)state;
|
||||||
x52d_cfg_set_Mouse_Speed(13);
|
x52d_cfg_set_Mouse_Speed(13);
|
||||||
assert_int_equal(mouse_delay, 10000);
|
assert_int_equal(mouse_sensitivity, 125);
|
||||||
assert_int_equal(mouse_mult, 5);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void test_mouse_speed_mid_hyper(void **state)
|
static void test_mouse_speed_mid_hyper(void **state)
|
||||||
{
|
{
|
||||||
(void)state;
|
(void)state;
|
||||||
x52d_cfg_set_Mouse_Speed(22);
|
x52d_cfg_set_Mouse_Speed(22);
|
||||||
assert_int_equal(mouse_delay, 10000);
|
assert_int_equal(mouse_sensitivity, 350);
|
||||||
assert_int_equal(mouse_mult, 14);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void test_mouse_speed_max_hyper(void **state)
|
static void test_mouse_speed_max_hyper(void **state)
|
||||||
{
|
{
|
||||||
(void)state;
|
(void)state;
|
||||||
x52d_cfg_set_Mouse_Speed(32);
|
x52d_cfg_set_Mouse_Speed(32);
|
||||||
assert_int_equal(mouse_delay, 10000);
|
assert_int_equal(mouse_sensitivity, 500);
|
||||||
assert_int_equal(mouse_mult, 24);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void test_mouse_speed_above_max(void **state)
|
static void test_mouse_speed_above_max(void **state)
|
||||||
{
|
{
|
||||||
int orig_mouse_delay = mouse_delay;
|
|
||||||
int orig_mouse_mult = mouse_mult;
|
|
||||||
(void)state;
|
(void)state;
|
||||||
|
|
||||||
x52d_cfg_set_Mouse_Speed(33);
|
x52d_cfg_set_Mouse_Speed(33);
|
||||||
assert_int_equal(mouse_delay, orig_mouse_delay);
|
assert_int_equal(mouse_sensitivity, 500);
|
||||||
assert_int_equal(mouse_mult, orig_mouse_mult);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void test_mouse_reverse_scroll_enabled(void **state)
|
static void test_mouse_reverse_scroll_enabled(void **state)
|
||||||
|
|
|
||||||
|
|
@ -93,6 +93,9 @@ endif
|
||||||
|
|
||||||
add_project_arguments('-isystem', meson.current_source_dir() / 'sys', language: 'C')
|
add_project_arguments('-isystem', meson.current_source_dir() / 'sys', language: 'C')
|
||||||
|
|
||||||
|
# Sometimes libm is in standard library
|
||||||
|
dep_math = compiler.find_library('m', required: false)
|
||||||
|
|
||||||
#######################################################################
|
#######################################################################
|
||||||
# Internal dependencies
|
# Internal dependencies
|
||||||
#######################################################################
|
#######################################################################
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: libx52 0.3.3\n"
|
"Project-Id-Version: libx52 0.3.3\n"
|
||||||
"Report-Msgid-Bugs-To: https://github.com/nirenjan/libx52/issues\n"
|
"Report-Msgid-Bugs-To: https://github.com/nirenjan/libx52/issues\n"
|
||||||
"POT-Creation-Date: 2026-03-27 20:52-0700\n"
|
"POT-Creation-Date: 2026-04-01 20:47-0700\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
|
|
@ -142,13 +142,13 @@ msgstr ""
|
||||||
msgid "Unknown LED state %d"
|
msgid "Unknown LED state %d"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: libx52/x52_stringify.c:47 daemon/x52d_clock.c:29 daemon/x52d_mouse.c:32
|
#: libx52/x52_stringify.c:47 daemon/x52d_clock.c:29 daemon/x52d_mouse.c:55
|
||||||
#: daemon/x52d_mouse.c:66
|
#: daemon/x52d_mouse.c:95 daemon/x52d_mouse.c:107
|
||||||
msgid "off"
|
msgid "off"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: libx52/x52_stringify.c:48 daemon/x52d_clock.c:29 daemon/x52d_mouse.c:32
|
#: libx52/x52_stringify.c:48 daemon/x52d_clock.c:29 daemon/x52d_mouse.c:55
|
||||||
#: daemon/x52d_mouse.c:66
|
#: daemon/x52d_mouse.c:95 daemon/x52d_mouse.c:107
|
||||||
msgid "on"
|
msgid "on"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
|
@ -864,63 +864,105 @@ msgstr ""
|
||||||
msgid "Shutting down X52 I/O driver thread"
|
msgid "Shutting down X52 I/O driver thread"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: daemon/x52d_mouse.c:31
|
#: daemon/x52d_mouse.c:38 daemon/x52d_mouse.c:44
|
||||||
|
#, c-format
|
||||||
|
msgid "Clamping %s value %d to range [%d..%d]"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: daemon/x52d_mouse.c:54
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Setting mouse enable to %s"
|
msgid "Setting mouse enable to %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: daemon/x52d_mouse.c:45
|
#: daemon/x52d_mouse.c:71
|
||||||
#, c-format
|
msgid ""
|
||||||
msgid "Ignoring mouse speed %d outside supported range (0-%d)"
|
"Config option 'mouse.speed' is DEPRECATED. Please use 'mouse.sensitivity' "
|
||||||
|
"instead"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: daemon/x52d_mouse.c:57
|
#: daemon/x52d_mouse.c:86
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Setting mouse speed to %d (delay %d ms, multiplier %f)"
|
msgid "Migrating legacy mouse speed '%d' to sensitivity '%d' (percentage)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: daemon/x52d_mouse.c:65
|
#: daemon/x52d_mouse.c:88
|
||||||
|
msgid "speed -> sensitivity"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: daemon/x52d_mouse.c:94
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Setting mouse reverse scroll to %s"
|
msgid "Setting mouse reverse scroll to %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: daemon/x52d_mouse_handler.c:43
|
#: daemon/x52d_mouse.c:106
|
||||||
|
#, c-format
|
||||||
|
msgid "Setting mouse isometric mode to %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: daemon/x52d_mouse.c:113
|
||||||
|
msgid "sensitivity"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: daemon/x52d_mouse.c:116
|
||||||
|
#, c-format
|
||||||
|
msgid "Setting mouse sensitivity to %d%%"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: daemon/x52d_mouse.c:123
|
||||||
|
msgid "curve factor"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: daemon/x52d_mouse.c:124
|
||||||
|
#, c-format
|
||||||
|
msgid "Setting mouse curve factor to %d"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: daemon/x52d_mouse.c:130
|
||||||
|
msgid "deadzone factor"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: daemon/x52d_mouse.c:131
|
||||||
|
#, c-format
|
||||||
|
msgid "Setting mouse deadzone to %d"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: daemon/x52d_mouse_handler.c:44
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Error %d writing mouse button event (button %d, state %d)"
|
msgid "Error %d writing mouse button event (button %d, state %d)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: daemon/x52d_mouse_handler.c:81
|
#: daemon/x52d_mouse_handler.c:82
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Error writing mouse wheel event %d"
|
msgid "Error writing mouse wheel event %d"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: daemon/x52d_mouse_handler.c:120
|
#: daemon/x52d_mouse_handler.c:185
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Error %d writing mouse axis event (dx %d, dy %d)"
|
msgid "Error %d writing mouse axis event (dx %d, dy %d)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: daemon/x52d_mouse_handler.c:132
|
#: daemon/x52d_mouse_handler.c:197
|
||||||
msgid "Error writing mouse sync event"
|
msgid "Error writing mouse sync event"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: daemon/x52d_mouse_handler.c:151
|
#: daemon/x52d_mouse_handler.c:216
|
||||||
msgid "Starting X52 virtual mouse driver thread"
|
msgid "Starting X52 virtual mouse driver thread"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: daemon/x52d_mouse_handler.c:170
|
#: daemon/x52d_mouse_handler.c:235
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Error %d initializing mouse thread: %s"
|
msgid "Error %d initializing mouse thread: %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: daemon/x52d_mouse_handler.c:177
|
#: daemon/x52d_mouse_handler.c:242
|
||||||
msgid "Shutting down X52 virtual mouse driver thread"
|
msgid "Shutting down X52 virtual mouse driver thread"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: daemon/x52d_mouse_handler.c:184
|
#: daemon/x52d_mouse_handler.c:249
|
||||||
msgid "Virtual mouse not created. Ignoring thread state change"
|
msgid "Virtual mouse not created. Ignoring thread state change"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: daemon/x52d_mouse_handler.c:236 daemon/x52d_mouse_handler.c:244
|
#: daemon/x52d_mouse_handler.c:301 daemon/x52d_mouse_handler.c:309
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Error %d creating X52 virtual mouse"
|
msgid "Error %d creating X52 virtual mouse"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
|
||||||
118
po/xx_PL.po
118
po/xx_PL.po
|
|
@ -7,8 +7,8 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: libx52 0.2.3\n"
|
"Project-Id-Version: libx52 0.2.3\n"
|
||||||
"Report-Msgid-Bugs-To: https://github.com/nirenjan/libx52/issues\n"
|
"Report-Msgid-Bugs-To: https://github.com/nirenjan/libx52/issues\n"
|
||||||
"POT-Creation-Date: 2026-03-27 20:52-0700\n"
|
"POT-Creation-Date: 2026-04-01 20:47-0700\n"
|
||||||
"PO-Revision-Date: 2026-03-27 08:33-0700\n"
|
"PO-Revision-Date: 2026-04-01 20:50-0700\n"
|
||||||
"Last-Translator: Nirenjan Krishnan <nirenjan@gmail.com>\n"
|
"Last-Translator: Nirenjan Krishnan <nirenjan@gmail.com>\n"
|
||||||
"Language-Team: Dummy Language for testing i18n\n"
|
"Language-Team: Dummy Language for testing i18n\n"
|
||||||
"Language: xx_PL\n"
|
"Language: xx_PL\n"
|
||||||
|
|
@ -142,13 +142,13 @@ msgstr "YYay-MMay-DDay"
|
||||||
msgid "Unknown LED state %d"
|
msgid "Unknown LED state %d"
|
||||||
msgstr "Unknownay EDLay atestay %d"
|
msgstr "Unknownay EDLay atestay %d"
|
||||||
|
|
||||||
#: libx52/x52_stringify.c:47 daemon/x52d_clock.c:29 daemon/x52d_mouse.c:32
|
#: libx52/x52_stringify.c:47 daemon/x52d_clock.c:29 daemon/x52d_mouse.c:55
|
||||||
#: daemon/x52d_mouse.c:66
|
#: daemon/x52d_mouse.c:95 daemon/x52d_mouse.c:107
|
||||||
msgid "off"
|
msgid "off"
|
||||||
msgstr "offay"
|
msgstr "offay"
|
||||||
|
|
||||||
#: libx52/x52_stringify.c:48 daemon/x52d_clock.c:29 daemon/x52d_mouse.c:32
|
#: libx52/x52_stringify.c:48 daemon/x52d_clock.c:29 daemon/x52d_mouse.c:55
|
||||||
#: daemon/x52d_mouse.c:66
|
#: daemon/x52d_mouse.c:95 daemon/x52d_mouse.c:107
|
||||||
msgid "on"
|
msgid "on"
|
||||||
msgstr "onay"
|
msgstr "onay"
|
||||||
|
|
||||||
|
|
@ -234,34 +234,32 @@ msgid "Read timeout"
|
||||||
msgstr "Eadray imeouttay"
|
msgstr "Eadray imeouttay"
|
||||||
|
|
||||||
#: vkm/vkm_common.c:26
|
#: vkm/vkm_common.c:26
|
||||||
#, fuzzy
|
|
||||||
msgid "Unknown error"
|
msgid "Unknown error"
|
||||||
msgstr "Unknownay erroray %d"
|
msgstr "Unknownay erroray"
|
||||||
|
|
||||||
#: vkm/vkm_common.c:27
|
#: vkm/vkm_common.c:27
|
||||||
msgid "Not ready"
|
msgid "Not ready"
|
||||||
msgstr ""
|
msgstr "Otnay eadyray"
|
||||||
|
|
||||||
#: vkm/vkm_common.c:28
|
#: vkm/vkm_common.c:28
|
||||||
msgid "Out of memory"
|
msgid "Out of memory"
|
||||||
msgstr ""
|
msgstr "Outay ofay emorymay"
|
||||||
|
|
||||||
#: vkm/vkm_common.c:30
|
#: vkm/vkm_common.c:30
|
||||||
#, fuzzy
|
|
||||||
msgid "Not supported"
|
msgid "Not supported"
|
||||||
msgstr "Operationay otnay upportedsay"
|
msgstr "Otnay upportedsay"
|
||||||
|
|
||||||
#: vkm/vkm_common.c:31
|
#: vkm/vkm_common.c:31
|
||||||
msgid "Virtual device failure"
|
msgid "Virtual device failure"
|
||||||
msgstr ""
|
msgstr "Irtualvay eviceday ailurefay"
|
||||||
|
|
||||||
#: vkm/vkm_common.c:32
|
#: vkm/vkm_common.c:32
|
||||||
msgid "Unable to write event"
|
msgid "Unable to write event"
|
||||||
msgstr ""
|
msgstr "Unableay otay itewray eventay"
|
||||||
|
|
||||||
#: vkm/vkm_common.c:33
|
#: vkm/vkm_common.c:33
|
||||||
msgid "No state change"
|
msgid "No state change"
|
||||||
msgstr ""
|
msgstr "Onay atestay angechay"
|
||||||
|
|
||||||
#: evtest/ev_test.c:110
|
#: evtest/ev_test.c:110
|
||||||
#, c-format
|
#, c-format
|
||||||
|
|
@ -919,64 +917,110 @@ msgstr "Erroray %d initializingay I/O iverdray eadthray: %s"
|
||||||
msgid "Shutting down X52 I/O driver thread"
|
msgid "Shutting down X52 I/O driver thread"
|
||||||
msgstr "Uttingshay ownday X52 I/O iverdray eadthray"
|
msgstr "Uttingshay ownday X52 I/O iverdray eadthray"
|
||||||
|
|
||||||
#: daemon/x52d_mouse.c:31
|
#: daemon/x52d_mouse.c:38 daemon/x52d_mouse.c:44
|
||||||
|
#, c-format
|
||||||
|
msgid "Clamping %s value %d to range [%d..%d]"
|
||||||
|
msgstr "Ampingclay %s aluevay %d otay angeray [%d..%d]"
|
||||||
|
|
||||||
|
#: daemon/x52d_mouse.c:54
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Setting mouse enable to %s"
|
msgid "Setting mouse enable to %s"
|
||||||
msgstr "Ettingsay ousemay enableay otay %s"
|
msgstr "Ettingsay ousemay enableay otay %s"
|
||||||
|
|
||||||
#: daemon/x52d_mouse.c:45
|
#: daemon/x52d_mouse.c:71
|
||||||
#, c-format
|
msgid ""
|
||||||
msgid "Ignoring mouse speed %d outside supported range (0-%d)"
|
"Config option 'mouse.speed' is DEPRECATED. Please use 'mouse.sensitivity' "
|
||||||
msgstr "Ignoringay ousemay eedspay %d outsideay upportedsay angeray (0-%d)"
|
"instead"
|
||||||
|
msgstr ""
|
||||||
|
"Onfigcay optionay 'mouse.speed' isay EPRECATEDDAY. Easeplay useay 'mouse."
|
||||||
|
"sensitivity' insteaday"
|
||||||
|
|
||||||
#: daemon/x52d_mouse.c:57
|
#: daemon/x52d_mouse.c:86
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Setting mouse speed to %d (delay %d ms, multiplier %f)"
|
msgid "Migrating legacy mouse speed '%d' to sensitivity '%d' (percentage)"
|
||||||
msgstr "Ettingsay ousemay eedspay otay %d (elayday %d ms, ultipliermay %f)"
|
msgstr ""
|
||||||
|
"Igratingmay egacylay ousemay eedspay '%d' otay ensitivitysay "
|
||||||
|
"'%d' (ercentagepay)"
|
||||||
|
|
||||||
#: daemon/x52d_mouse.c:65
|
#: daemon/x52d_mouse.c:88
|
||||||
|
msgid "speed -> sensitivity"
|
||||||
|
msgstr "eedspay -> ensitivitysay"
|
||||||
|
|
||||||
|
#: daemon/x52d_mouse.c:94
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Setting mouse reverse scroll to %s"
|
msgid "Setting mouse reverse scroll to %s"
|
||||||
msgstr "Ettingsay ousemay everseray ollscray otay %s"
|
msgstr "Ettingsay ousemay everseray ollscray otay %s"
|
||||||
|
|
||||||
#: daemon/x52d_mouse_handler.c:43
|
#: daemon/x52d_mouse.c:106
|
||||||
|
#, c-format
|
||||||
|
msgid "Setting mouse isometric mode to %s"
|
||||||
|
msgstr "Ettingsay ousemay isometricay odemay otay %s"
|
||||||
|
|
||||||
|
#: daemon/x52d_mouse.c:113
|
||||||
|
msgid "sensitivity"
|
||||||
|
msgstr "ensitivitysay"
|
||||||
|
|
||||||
|
#: daemon/x52d_mouse.c:116
|
||||||
|
#, c-format
|
||||||
|
msgid "Setting mouse sensitivity to %d%%"
|
||||||
|
msgstr "Ettingsay ousemay ensitivitysay otay %d"
|
||||||
|
|
||||||
|
#: daemon/x52d_mouse.c:123
|
||||||
|
msgid "curve factor"
|
||||||
|
msgstr "urvecay actorfay"
|
||||||
|
|
||||||
|
#: daemon/x52d_mouse.c:124
|
||||||
|
#, c-format
|
||||||
|
msgid "Setting mouse curve factor to %d"
|
||||||
|
msgstr "Ettingsay ousemay urvecay actorfay otay %d"
|
||||||
|
|
||||||
|
#: daemon/x52d_mouse.c:130
|
||||||
|
msgid "deadzone factor"
|
||||||
|
msgstr "eadzoneday actorfay"
|
||||||
|
|
||||||
|
#: daemon/x52d_mouse.c:131
|
||||||
|
#, c-format
|
||||||
|
msgid "Setting mouse deadzone to %d"
|
||||||
|
msgstr "Ettingsay ousemay eadzoneday otay %d"
|
||||||
|
|
||||||
|
#: daemon/x52d_mouse_handler.c:44
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Error %d writing mouse button event (button %d, state %d)"
|
msgid "Error %d writing mouse button event (button %d, state %d)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Erroray %d itingwray ousemay uttonbay eventay (uttonbay %d, atestay %d)"
|
"Erroray %d itingwray ousemay uttonbay eventay (uttonbay %d, atestay %d)"
|
||||||
|
|
||||||
#: daemon/x52d_mouse_handler.c:81
|
#: daemon/x52d_mouse_handler.c:82
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Error writing mouse wheel event %d"
|
msgid "Error writing mouse wheel event %d"
|
||||||
msgstr "Erroray itingwray ousemay eelwhay eventay %d"
|
msgstr "Erroray itingwray ousemay eelwhay eventay %d"
|
||||||
|
|
||||||
#: daemon/x52d_mouse_handler.c:120
|
#: daemon/x52d_mouse_handler.c:185
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Error %d writing mouse axis event (dx %d, dy %d)"
|
msgid "Error %d writing mouse axis event (dx %d, dy %d)"
|
||||||
msgstr "Erroray %d itingwray ousemay axisay eventay (xday %d, yday %d)"
|
msgstr "Erroray %d itingwray ousemay axisay eventay (xday %d, yday %d)"
|
||||||
|
|
||||||
#: daemon/x52d_mouse_handler.c:132
|
#: daemon/x52d_mouse_handler.c:197
|
||||||
msgid "Error writing mouse sync event"
|
msgid "Error writing mouse sync event"
|
||||||
msgstr "Erroray itingwray ousemay yncsay eventay"
|
msgstr "Erroray itingwray ousemay yncsay eventay"
|
||||||
|
|
||||||
#: daemon/x52d_mouse_handler.c:151
|
#: daemon/x52d_mouse_handler.c:216
|
||||||
msgid "Starting X52 virtual mouse driver thread"
|
msgid "Starting X52 virtual mouse driver thread"
|
||||||
msgstr "Artingstay X52 irtualvay ousemay iverdray eadthray"
|
msgstr "Artingstay X52 irtualvay ousemay iverdray eadthray"
|
||||||
|
|
||||||
#: daemon/x52d_mouse_handler.c:170
|
#: daemon/x52d_mouse_handler.c:235
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Error %d initializing mouse thread: %s"
|
msgid "Error %d initializing mouse thread: %s"
|
||||||
msgstr "Erroray %d initializingay ousemay eadthray: %s"
|
msgstr "Erroray %d initializingay ousemay eadthray: %s"
|
||||||
|
|
||||||
#: daemon/x52d_mouse_handler.c:177
|
#: daemon/x52d_mouse_handler.c:242
|
||||||
msgid "Shutting down X52 virtual mouse driver thread"
|
msgid "Shutting down X52 virtual mouse driver thread"
|
||||||
msgstr "Uttingshay ownday X52 irtualvay ousemay iverdray eadthray"
|
msgstr "Uttingshay ownday X52 irtualvay ousemay iverdray eadthray"
|
||||||
|
|
||||||
#: daemon/x52d_mouse_handler.c:184
|
#: daemon/x52d_mouse_handler.c:249
|
||||||
msgid "Virtual mouse not created. Ignoring thread state change"
|
msgid "Virtual mouse not created. Ignoring thread state change"
|
||||||
msgstr "Irtualvay ousemay otnay eatedcray. Ignoringa eadthray atestay angechay"
|
msgstr "Irtualvay ousemay otnay eatedcray. Ignoringa eadthray atestay angechay"
|
||||||
|
|
||||||
#: daemon/x52d_mouse_handler.c:236 daemon/x52d_mouse_handler.c:244
|
#: daemon/x52d_mouse_handler.c:301 daemon/x52d_mouse_handler.c:309
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Error %d creating X52 virtual mouse"
|
msgid "Error %d creating X52 virtual mouse"
|
||||||
msgstr "Erroray %d eatingcray X52 irtualvay ousemay"
|
msgstr "Erroray %d eatingcray X52 irtualvay ousemay"
|
||||||
|
|
@ -1039,3 +1083,11 @@ msgstr "Argumentay engthlay ootay onglay\n"
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Running in interactive mode, ignoring extra arguments\n"
|
msgid "Running in interactive mode, ignoring extra arguments\n"
|
||||||
msgstr "Unningray inay interactiveay odemay, ignoringay extraay argumentsay\n"
|
msgstr "Unningray inay interactiveay odemay, ignoringay extraay argumentsay\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
#~ msgid "Ignoring mouse speed %d outside supported range (0-%d)"
|
||||||
|
#~ msgstr "Ignoringay ousemay eedspay %d outsideay upportedsay angeray (0-%d)"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
#~ msgid "Setting mouse speed to %d (delay %d ms, multiplier %f)"
|
||||||
|
#~ msgstr "Ettingsay ousemay eedspay otay %d (elayday %d ms, ultipliermay %f)"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue