Skip to content
This repository has been archived by the owner on Jul 21, 2024. It is now read-only.

Setting props #11

Open
alex-eri opened this issue Mar 10, 2019 · 9 comments
Open

Setting props #11

alex-eri opened this issue Mar 10, 2019 · 9 comments

Comments

@alex-eri
Copy link

alex-eri commented Mar 10, 2019

Setting props like xinput will be great.

For example. Dont know how to set Coordinate Transformation Matrix without xinput and udev.

@whot
Copy link

whot commented Mar 10, 2019

the matrix is implemented by the server and is independent of libinput. the only way to set it is via xinput.

@alex-eri
Copy link
Author

the matrix is implemented by the server and is independent of libinput. the only way to set it is via xinput.

There is 2 another matrixes.

	libinput Calibration Matrix (259):	1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
	libinput Calibration Matrix Default (260):	1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000

"libinput Calibration Matrix" set by udev via rule

ENV{ID_VENDOR_ID}=="2149",ENV{ID_MODEL_ID}=="2703",ENV{WL_OUTPUT}="DVI1",ENV{LIBINPUT_CALIBRATION_MATRIX}="1 0 0  0 1 0"

@whot
Copy link

whot commented Mar 11, 2019

that ... Default matrix is just the default value for the other property because that was the only way to do it with device properties, so you can basically ignore that one.

The other one, yes, it exists, and it is available as the calibration property in the DeviceConfig class. note that you'll never get access to the libinput context in the compositor anyway, that's a side-effect of how libinput slots into the stack. so python-libinput can't expose this either, only for the context it creates.

@alex-eri
Copy link
Author

I want to run Qt (Pyside2) over EGL without X. Cheap touch screens need calibration and sometimes re-calibration.

One way is to set udev hint, then reset usb port. btw thank you

@whot
Copy link

whot commented Mar 12, 2019

your best approach is a custom-written shell script then that figures out that calibration. this is IMO out of scope for a python library wrapper. You wouldn't directly interact with libinput after all, you'll be writing out a udev property that libinput understands.

@alex-eri
Copy link
Author

so only udev.

What about other properties? Mouse acceleration for example

@whot
Copy link

whot commented Mar 17, 2019

see #11 (comment), the DeviceConfig is exposed but you cannot control the libinput context from another process.

@alex-eri
Copy link
Author

I dont need to control another process. no X11. only one process running from init =)

@whot
Copy link

whot commented Mar 19, 2019

then tbh I don't quite know what the question is. DeviceConfig.accel for example returns the wrapper for the acceleration config.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants