Hello,<div><br></div><div>As pointed out by Kevin, I ask for further information on this mailing list.</div><div><br></div><div>I was wanting to add better support for Jog/Shuttle devices (input devices like <a href="http://retail.contourdesign.com/?/products/23">this one</a> that I own) and was considering adding this as a new type of device to KDE's Solid library, to increase support across many programs that may use them. Here is my proposal:</div>
<div><br></div><div>1. Add a new device type and Interface to the Solid frontend. This would let Solid notify about such a device being plugged in, and give some information about it (#buttons, jog resolution, shuttle min/max values, product name and device name).</div>
<div>2. Add a new udevdevice so that the USB device can be detected at least on Linux. I know too little about other OSs that Solid runs on.</div><div><br></div><div>As pointed out by Kevin, actually listening to events and dealing with input from the device's interaction would be done externally to Solid.</div>
<div><br></div><div>Is such a proposal something you would consider at all ? Also, I have no creds in submitting code to KDE, I have submitted improvements on the support of such devices to Kdenlive.</div><div><br></div><div>
In case you think it's worth it, how/where would information be stored about the devices themselves? As it turns out, one can only know that it is a JogShuttle device from the USB VendorID and ProductID, and I guess there is no means to get the device to tell us about its capabilities, so that it would have to be stored in some kind of profile database that would have the info about #buttons, ranges of jog and shuttle etc.</div>
<div><br></div><div>Thanks for your time,</div><div>--Pascal<br><br><div class="gmail_quote">On Thu, May 31, 2012 at 10:18 AM, Kevin Ottens <span dir="ltr"><<a href="mailto:ervin@kde.org" target="_blank">ervin@kde.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<div class="im"><br>
On Wednesday 30 May 2012 02:05:27 you wrote:<br>
> I was trying to figure out how solid actually works, and I must say I was<br>
> in for a ride.. I think I got it more or less, but have some general<br>
> questions, if you don't mind. If you have some overview (I've seen the dot<br>
> article and the XMI file in the source tree) I-d love to know about it.<br>
<br>
</div>Apart from what you've already seen, there's:<br>
<a href="http://techbase.kde.org/Development/Tutorials/Solid/Introduction" target="_blank">http://techbase.kde.org/Development/Tutorials/Solid/Introduction</a><br>
<br>
But for the internals the XMI file and the code are pretty much it.<br>
<div class="im"><br>
> I was looking if there would be a way to ad a new device type, namely<br>
> JogShuttle devices (the things used to jog around video content, useful for<br>
> video editing). I thought that the Solid library would actually be able to<br>
> detect that such a device has been plugged into the computer (typically<br>
> USB), then give some info about it (model name, number of buttons, shuttle<br>
> max values) and finally provide an interface that would let me listen to<br>
> events from that device concerning the jog/shuttle/buttons.<br>
<br>
</div>Note that the last part which requires talking to the device is generally not<br>
covered by libsolid. It's about detecting devices but not about accessing<br>
them. At most libsolid gives you the necessary bits of information to pass to<br>
a library talking to the actual device.<br>
<div class="im"><br>
> It looks however that detecting a new device would be Solid's job.<br>
<br>
</div>Yes.<br>
<div class="im"><br>
> My<br>
> question here is how it would detect that it's actually a HogShuttle, as<br>
> the only way I know to do that would be a list of known VendorID/ProductID.<br>
> Giving some data from the device would also depend on that same set of IDs.<br>
> It is likely that thenumber of buttons on the device does not change during<br>
> operation...<br>
<br>
</div>With the partial info I have here I'd say you're after two things:<br>
 * extending the frontend API for your new device type;<br>
 * extending the UDev backend so that it reports those.<br>
<div class="im"><br>
> For the last one, an API giving events for operations on the device seems<br>
> to be outside of the scope of Solid (which looks unfortunate to me).<br>
><br>
> Is actually Solid the right place to add support for detecting and<br>
> listening to such devices ?<br>
<br>
</div>Detecting yes, listening no.<br>
<div class="im"><br>
> Ialso noticed there was no mouse device listen,<br>
> nor joysticks. Is it because their support is already ubiquitous there is<br>
> no need for another API for them ?<br>
<br>
</div>That, and it's a conscious decision to leave the "talking to the devices" part<br>
out of the API.<br>
<br>
BTW, I stepped down as maintainer for libsolid, it's now Alex Fiestas duty.<br>
Also you probably want to email <a href="mailto:kde-hardware-devel@kde.org">kde-hardware-devel@kde.org</a> that's where the<br>
decision taking for libsolid happens nowadays.<br>
<br>
Regards.<br>
<span class="HOEnZb"><font color="#888888">--<br>
Kévin Ottens, <a href="http://ervin.ipsquad.net" target="_blank">http://ervin.ipsquad.net</a><br>
<br>
KDAB - proud patron of KDE, <a href="http://www.kdab.com" target="_blank">http://www.kdab.com</a><br>
</font></span></blockquote></div><br></div>