Touchpad scroll events
Touchpad scroll events
Hi, I have a question about laptop touchpads.
Do you know how for example linux extracts multitouch events from touchpads?
As far as I can see they're displayed as generic PS/2 mice, but my OS doesn't get scroll events when moving both fingers, while linux does.
What's the secret here? How do I make it generate scroll events? Do i need to read certain proprietary registers?
Thanks.
Do you know how for example linux extracts multitouch events from touchpads?
As far as I can see they're displayed as generic PS/2 mice, but my OS doesn't get scroll events when moving both fingers, while linux does.
What's the secret here? How do I make it generate scroll events? Do i need to read certain proprietary registers?
Thanks.
Re: Touchpad scroll events
In default, PS/2 mouse device is sending only three data bytes without scrolling. You have to enable fourth byte by magic sequence https://wiki.osdev.org/Mouse_Input#Init ... _Sequences
Re: Touchpad scroll events
I know, I do in fact enable those. Still no scroll events with 2 fingers.Klakap wrote:In default, PS/2 mouse device is sending only three data bytes without scrolling. You have to enable fourth byte by magic sequence https://wiki.osdev.org/Mouse_Input#Init ... _Sequences
-
- Member
- Posts: 5567
- Joined: Mon Mar 25, 2013 7:01 pm
Re: Touchpad scroll events
Your touchpad is probably emulating a very basic two-button mouse. You'll have to send vendor-specific commands to switch it to its native mode, and then interpret the user's gestures in your driver.
Fortunately, most touchpads are made by one vendor, and they're very nice about documentation. Look for the Synaptics PS/2 TouchPad Interfacing Guide.
Also, since it's a PS/2 device, you have to deal with all the quirks of different PS/2 controllers. You might want to look at the Linux code to see what kind of weird behavior they work around. (And don't forget to disable USB emulation.)
Fortunately, most touchpads are made by one vendor, and they're very nice about documentation. Look for the Synaptics PS/2 TouchPad Interfacing Guide.
Also, since it's a PS/2 device, you have to deal with all the quirks of different PS/2 controllers. You might want to look at the Linux code to see what kind of weird behavior they work around. (And don't forget to disable USB emulation.)
Re: Touchpad scroll events
Thank you, i will look into it.Octocontrabass wrote:Your touchpad is probably emulating a very basic two-button mouse. You'll have to send vendor-specific commands to switch it to its native mode, and then interpret the user's gestures in your driver.
Fortunately, most touchpads are made by one vendor, and they're very nice about documentation. Look for the Synaptics PS/2 TouchPad Interfacing Guide.
Also, since it's a PS/2 device, you have to deal with all the quirks of different PS/2 controllers. You might want to look at the Linux code to see what kind of weird behavior they work around. (And don't forget to disable USB emulation.)
Re: Touchpad scroll events
It worked, thank you! 2 laptops report the correct 0x47 constant, but for some reason the other one reports 0x46, do u know what could be the reason for that?Octocontrabass wrote:Your touchpad is probably emulating a very basic two-button mouse. You'll have to send vendor-specific commands to switch it to its native mode, and then interpret the user's gestures in your driver.
Fortunately, most touchpads are made by one vendor, and they're very nice about documentation. Look for the Synaptics PS/2 TouchPad Interfacing Guide.
Also, since it's a PS/2 device, you have to deal with all the quirks of different PS/2 controllers. You might want to look at the Linux code to see what kind of weird behavior they work around. (And don't forget to disable USB emulation.)
-
- Member
- Posts: 5567
- Joined: Mon Mar 25, 2013 7:01 pm
Re: Touchpad scroll events
It sounds like the PS/2 controller might be mangling the data. You're sure it's a Synaptics touchpad, right?
Re: Touchpad scroll events
Hmm, I don't have anything that proves that it is, but it does react to 4 set_resolution(0) calls in a different way, it's just that the constant is a bit off... Laptop model is an HP Elitebook 8440p if that helps.Octocontrabass wrote:It sounds like the PS/2 controller might be mangling the data. You're sure it's a Synaptics touchpad, right?
-
- Member
- Posts: 5567
- Joined: Mon Mar 25, 2013 7:01 pm
Re: Touchpad scroll events
HP offers Synaptics drivers for that model, so I'm going to say it's a Synaptics touchpad and the PS/2 controller is mangling the data.
Check if the PS/2 controller supports Active PS/2 Multiplexing (also published by Synaptics). If it does, you'll need to switch it to multiplexed mode before you can initialize the touchpad.
Check if the PS/2 controller supports Active PS/2 Multiplexing (also published by Synaptics). If it does, you'll need to switch it to multiplexed mode before you can initialize the touchpad.
Re: Touchpad scroll events
Wow! Incredible. You were 100% right. I didn't even know things like that existed. After a few hours of implementing (a hacked together version of) that spec, i get this.Octocontrabass wrote:HP offers Synaptics drivers for that model, so I'm going to say it's a Synaptics touchpad and the PS/2 controller is mangling the data.
Check if the PS/2 controller supports Active PS/2 Multiplexing (also published by Synaptics). If it does, you'll need to switch it to multiplexed mode before you can initialize the touchpad.
Turns out the 0x46 was the small track ball talking, and the actual touchpad is on AUX 3 and reports 0x47 as expected!