Registered Member
|
[Global-Shortcu] Plugin-based shorcut system (keyboard, mouse, lirc, joysticks, etc.)
Fri Mar 20, 2009 8:55 pm
Currently the systemsettings "Keyboard Shortcuts" module only allows assigning shortcuts to combinations of keyboard button presses, as its name implies. This is pretty limited considering the wide and constantly increasing variety of input devices currently available. Currently we have keyboards, mice, lirc, bluetooth, joysticks and gamepads, and a variety of more specialized input devices. Compiz, for instance, allows shortcuts that involve the keyboard and a separate set of shortcuts that involve the mouse (and modifier keys). This is better than what KDE 4 supports, but is still not optimal in my opinion.
I think it would be great of the shortcut system used a extendable backend-based system. This would be similar to, say, solid or phonon where anyone can write their own backends for the shortcut system to extend the sort of hardware or software that can provide shortcuts. An example would be a mouse gesture backend. Instead of having to make their own interface to KDE they can make a backend that would allow the mouse gesture to be used directly in the shortcut system. The backend would interpet the mouse gesture and translated each mouse gesture into a unique signal or identifier of some sort that the shorcut system can interpret. There would still need to be a configuration dialog to learn mouse gesture and give each one a unique identifier, but the developer would not have to code their own interface for every KDE programs he or she wants to be able to interact with nor would he or she need to use any ugly hacks like converting the gesture to keyboard shortcuts and then assigning those keyboard shortcuts to the KDE shortcut system. The programmer would only need a way to translate each specific mouse gesture into something unique to that gesture that could be used to identify it in the shortcut system. Then the user could assign the gesture to any shortcut he or she might want. Similarly if someone made a voice-control system for kde it could be implemented as a backend, and the voice control system would convert each voice command into a unique identifier that could be used by the shortcut system. Once again the programmer would only need a way to uniquely identify each voice command, the shortcut system would do all the work of listening for the identifiers and acting on them when they are present. Other possible backends include remote control over a network, unusual devices like the wii remote or custom serial port controllers, and even interfaces that haven't been thought up yet. And it wouldn't have to be a hardware interface, programs could be used to provide the signals for the shortcut system. So, although this is often a roundabout way of doing it, you could have a timer backend that sends a particular identifier at a preset time. You could use this to stop a media player at a particular time of day, or to automatically lock your computer when the building closes. You could also have a powerdevil interface that triggers identifiers based on certain events like a laptop lid closing. Once again, this is probably not the most efficient way to go about this, that is really what dbus is for, but it is an example of the sorts of things you can do with this sort of system. This allows you to consolidate four or five different configuration programs (keyboard shortcuts, mouse gestures, lirc, joystick/gamepad, and one or two bluetooth) into a single, consistent interface that is present in every KDE program. The people making lirc configurations or configuration programs, for instance, don't need to keep track of how to interface with all the different KDE multimedia programs, that interface is built into KDE and the user can set it up however he or she wants. Users don't have to map gamepad or joystick buttons to keyboard commands, KDE games can use the gamepad or joystick directly. This would also require having multiple button combinations be able to be assigned to a single shortcut, since people may want to do the same command in different ways. For instance people might want to use the play/pause button on their keyboard, on their lirc remote, and on their mouse (there are a few mice that have this I think) and all use them for the same action. Even analog devices like joysticks (as opposed to digital joystick buttons) could be used if the system was set up to properly interpret and then pass along analog data.
Last edited by TheBlackCat on Thu May 07, 2009 4:42 pm, edited 1 time in total.
Man is the lowest-cost, 150-pound, nonlinear, all-purpose computer system which can be mass-produced by unskilled labor.
-NASA in 1965 |
Registered Member
|
RE: [Global-Shortcu] Plugin-based shorcut system (keyboard, mouse, lirc, joysticks, etc.)
Fri May 08, 2009 10:05 am
Great idea! Best solution i've ever read to this issue! Congratz
|
Registered Member
|
Man is the lowest-cost, 150-pound, nonlinear, all-purpose computer system which can be mass-produced by unskilled labor.
-NASA in 1965 |
Registered users: Bing [Bot], Evergrowing, Google [Bot]