From kde-core-devel Wed Mar 17 21:03:58 2010 From: todd rme Date: Wed, 17 Mar 2010 21:03:58 +0000 To: kde-core-devel Subject: Re: KRemoteControl moved to kdereview Message-Id: <6524e4801003171403m358be608le0a57e1535f34c10 () mail ! gmail ! com> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=126885990503692 On Wed, Mar 17, 2010 at 12:47 PM, Michael Zanetti wrote: >> Sorry for my ignorance, but what is the purpose of this?  Does it just >> handle identifying devices or is mapping button presses to commands >> also handled by this? >> > > You can query the RemoteControlManager for available remotes on the system. > Additionally you get signals when a remote control has been connected or > removed (e.g. lircd has been started or a bluetooth remote connected). > > After browsing the available remotes you can query each remote for its > available buttons. Each RemoteControl provides a signal named > buttonPressed(RemoteControlButton). > > RemoteControlButtons handle the transition between the backend representation > of buttons and the KDE representation consisting of a unique ID for the > button, its name and a translated human readable name for representing buttons > in UIs in a unified and translated manner. > > The purpose is to make using remote controls very simple and independent of > the underlaying technique and operating system. > > For example it would need just about 10 to 20 lines of code to make amarok > fully remote control aware using this Solid interface. > > Cheers, > Michael > What about just integrating it into the normal KDE shortcut system, so that remote control buttons could be used the same way keyboard shortcuts are now? A pluggable system where people could provide new backends for the normal KDE shortcut system would be very handy in my opinion. It wouldn't just be useful for remote controls. For instance I imagine the simon speech recognition software being discussed on the mailing list right now could probably use such a system to allow voice commands to be integrated into KDE's shortcut system. It could also be used, with the appropriate backends, for mice and joysticks, both of which KDE applications currently need to program their own shortcut system for (as plasma does now for mice and some games do for joysticks). It would mean people would only needs a single, consistent interface for assigned functions to all of their input devices. -Todd