timower / rM2-stuff

Collection of reMarkable related apps, utilities and libraries.
GNU General Public License v3.0
125 stars 10 forks source link

Keyboard input #9

Closed GiorgioAntani closed 8 months ago

GiorgioAntani commented 2 years ago

it seems like the keyboard is accepting input only from stylus and not touch. Anyway to fix it? Sorry it is my first time reporting a bug I may have done it badly.

timower commented 2 years ago

I assume this is about yaft. Can you share which device and firmware version you're using? I know the inputs paths changed, but I use uinput so most stuff should keep working.

GiorgioAntani commented 2 years ago

I am running 2.10.2.356 rm1 Yes it is abouy yaft.

Eeems commented 2 years ago

@timower newer versions of the rM OS change input paths. You'll likely want to dynamically listen to input events for both pen and touch enabled devices to survive OS upgrades better. Oxide's apps use the following to determine pen/touch/button inputs: https://github.com/Eeems/oxide/blob/master/shared/devicesettings.cpp#L18-L64

timower commented 2 years ago

Yeah, I use udev to discover devices, that's how keyboard input works. But to get the correct scaling and rotation of the events I still have some hard coded paths: https://github.com/timower/rM2-stuff/blob/8dc94a360358bf74da244beda74739663dd44741/libs/rMlib/Device.cpp#L18-L49

@Eeems Is there a generic way to get the scaling and rotation from an input device?

Eeems commented 2 years ago

I currently hardcode it per device. There might be a way but I haven't had the need to determine it dynamically yet.

timower commented 9 months ago

9b1a967d7a728d786c5cd28a1e38c8327b3b045f uses the device name instead of path, so it should be more stable. I haven't verified the rM1 names of course.