Check for input devices - #53
Conversation
| } | ||
|
|
||
| if (!(POINTER in capabilities) && !(TABLET_STYLUS in capabilities)) { | ||
| find_pairing_mice (); |
There was a problem hiding this comment.
Do we fire a notification here to let folks know we're looking for a device? Maybe after a timeout? If there's a device already trying to pair its really fast
There was a problem hiding this comment.
I think this would probably be better as a panel icon state update. "3 dots laid out horizontally" could potentially convey this meaning. A little animation where the dots bounce a little to show that something is happening/working in the background would work nicely.
There was a problem hiding this comment.
I was thinking more that we need to provide instructions. If we're waiting here it's because there are no available devices in pairing mode. Once a device becomes available the pairing is so fast you would never see an intermediate icon. What is needed is more to instruct a person to put the device into pairing mode that they want to connect to
| }); | ||
| } | ||
|
|
||
| private async bool connect_mouse (Device device) { |
There was a problem hiding this comment.
This probably needs a cancellable?
| } | ||
| } | ||
|
|
||
| private async void find_pairing_mice () { |
There was a problem hiding this comment.
Actually this probably needs to be cancellable too
| return false; | ||
| } | ||
|
|
||
| if (device.icon == "input-mouse") { |
There was a problem hiding this comment.
Not sure if there's a better way to detect device type. We also need to probably pair touchpads?
|
Actually wonder if we should add a check and bail out of this if we're not in the installer or initial setup sessions? |
|
Perhaps we should also bail out if we have any paired keyboards or mice? To make sure we're really only running if we must to make the computer usable |
|
It seems like on modern macOS plugging in a peripheral with the usbc charging cable also automatically pairs it. Might be a nice approach as well? |
|
Is this not a private protocol they use with their own devices ? (I’m guessing that when a mouse/KB is plugged, it sends its Bluetooth ID to the computer that saves it as a known Bluetooth device, but I am just speculating) |
Fixes #36
Depends on #37. Without this authentication simply fails
This does not work at all if a logitech dongle is plugged in. As in, we can't even know that we don't have a pointer. The dongle claims to be a pointer. No idea what to do about that tbh