.TP 8
.B \-\-set\-tap\-map=[lrm|lmr]
Set button mapping for tapping
+.TP 8
+.B \-\-set\-rotation\-angle=<degrees>
+Set the rotation angle in degrees (0 to 360).
.SH NOTES
.PP
Events shown by this tool may not correspond to the events seen by a
return 1;
}
break;
+ case OPT_ROTATION_ANGLE:
+ if (!optarg)
+ return 1;
+
+ if (!safe_atou(optarg, &options->angle)) {
+ fprintf(stderr, "Invalid --set-rotation-angle value\n");
+ return 1;
+ }
}
return 0;
}
libinput_device_config_accel_apply(device, config);
libinput_config_accel_destroy(config);
}
+
+ if (options->angle != 0)
+ libinput_device_config_rotation_set_angle(device, options->angle % 360);
}
static char*
OPT_CUSTOM_POINTS,
OPT_CUSTOM_STEP,
OPT_CUSTOM_TYPE,
+ OPT_ROTATION_ANGLE,
};
#define CONFIGURATION_OPTIONS \
{ "apply-to", required_argument, 0, OPT_APPLY_TO },\
{ "set-custom-points", required_argument, 0, OPT_CUSTOM_POINTS },\
{ "set-custom-step", required_argument, 0, OPT_CUSTOM_STEP },\
- { "set-custom-type", required_argument, 0, OPT_CUSTOM_TYPE }
+ { "set-custom-type", required_argument, 0, OPT_CUSTOM_TYPE },\
+ { "set-rotation-angle", required_argument, 0, OPT_ROTATION_ANGLE }
enum tools_backend {
BACKEND_NONE,
double custom_step;
size_t custom_npoints;
double *custom_points;
+ unsigned int angle;
};
void tools_init_options(struct tools_options *options);
# options with a range (and increment)
"ranges": {
"set-speed": (-1.0, +1.0, 0.1),
+ "set-rotation": (0, 360, 10),
},
}