KubuntuLaptopButtons

Differences between revisions 10 and 11
Revision 10 as of 2006-06-22 17:33:28
Size: 4835
Editor: allee
Comment: comment: bind special keys not just to one app, but all apps when it makes sense
Revision 11 as of 2006-07-05 20:59:23
Size: 5296
Editor: clj46-234
Comment: added keycodes, formatting/cleanup of tables
Deletions are marked like this. Additions are marked like this.
Line 6: Line 6:
 * '''Packages affected''': kmilo  * '''Packages affected''': kmilo, amarok, konqueror
Line 42: Line 42:
|| Keys || Handler ||
|| XF86Mail || KMilo, run default e-mail application ||
|| XF86Calculator || KMilo, run speedcrunch if installed else KCalc ||
|| XF86MyComputer || KMilo run kfmexec $HOME ||
|| XF86AudioMedia || KMilo run Amarok ||
|| XF86WWW || KMilo run default web browser ||
|| XF86Terminal || KMilo run Konsole ||
|| XF86Search || KMilo run kfmexec for KDE's default search page ||
|| '''Keycode''' || '''Keysym''' || '''Handler''' ||
|| 229 || XF``86Search || KMilo run kfmexec for KDE's default search page ||
|| 235 || XF``86MyComputer || KMilo run kfmexec $HOME ||
|| 236 || XF``86Mail || KMilo, run default e-mail application ||
|| 237 || XF``86AudioMedia || KMilo run Amarok ||
|| 178 || XF``86WWW || KMilo run default web browser ||
|| || XF``86Calculator || KMilo, run speedcrunch if installed else KCalc ||
|| || XF``86Terminal || KMilo run Konsole ||
Line 51: Line 51:
|| Keys || Handler ||
|| XF
86AudioPlay || Amarok ||
|| XF86AudioPause || Amarok ||
|| XF86AudioStop || Amarok ||
|| XF86AudioPrev || Amarok ||
|| XF86AudioNext || Amarok ||
|| '''Keycode''' || '''Keysym''' || '''Handler''' ||
|| 162 || XF``
86AudioPlay || Amarok ||
|| || XF``86AudioPause || Amarok ||
|| 164 || XF``86AudioStop || Amarok ||
|| 144 || XF``86AudioPrev || Amarok ||
|| 153 || XF``86AudioNext || Amarok ||
Line 58: Line 58:
|| Keys || Handler ||
|| XF86AudioLowerVolume || KMix to change, KMilo for on screen display ||
|| XF86AudioRaiseVolume || KMix to change, KMilo for on screen display ||
|| '''Keycode''' || '''Keysym''' || '''Handler''' ||
|| 160 || XF``86AudioMute || KMix to change, KMilo for on screen display ||
|| 174 || XF``86AudioLowerVolume || KMix to change, KMilo for on screen display ||
|| 176 || XF``86Audio
RaiseVolume || KMix to change, KMilo for on screen display ||
Line 62: Line 63:
|| Keys || Handler ||
|| XF
86Favorites || Konqueror ||
|| XF86Reload || Konqueror ||
|| XF
86Stop || Konqueror ||
|| XF86Forward || Konqueror ||
|| XF86Back || Konqueror ||
|| XF86Stop || Konqueror ||
|| XF86Forward || Konqueror ||
|| XF86Back || Konqueror ||
|| XF
86Go || Konqueror ||
|| '''Keycode''' || '''Keysym''' || '''Handler''' ||
|| 230 || XF``
86Favorites || Konqueror ||
|| 231 || XF``86Refresh || Konqueror ||
|| 232 || XF``
86Stop || Konqueror ||
|| 233 || XF``86Forward || Konqueror ||
|| 234 || XF``86Back || Konqueror ||
|| || XF``86Go || Konqueror ||
Line 73: Line 71:
|| Keys || Handler ||
|| XF
86PowerOff || KubuntuPowerManagement ||
|| XF86Standby || KubuntuPowerManagement ||
|| XF86ContrastAdjust || KubuntuPowerManagement ||
|| XF86BrightnessAdjust || KubuntuPowerManagement ||
|| '''Keycode''' || '''Keysym''' || '''Handler''' ||
|| || XF``
86PowerOff || KubuntuPowerManagement ||
|| || XF``86Standby || KubuntuPowerManagement ||
|| 223 || XF``86Sleep || KubuntuPowerManagement ||
|| || XF``
86ContrastAdjust || KubuntuPowerManagement ||
|| || XF``86BrightnessAdjust || KubuntuPowerManagement ||
Line 79: Line 78:
|| Keys || Handler ||
|| XF
86Eject || run ''eject'' ||
|| XF86LaunchA || none, user can set with KHotKeys ||
|| XF86LaunchB || none, user can set with KHotKeys ||
|| XF86LaunchC || none, user can set with KHotKeys ||
|| XF86LightBulb || KMilo on screen display ||
|| '''Keycode''' || '''Keysym''' || '''Handler''' ||
|| 204 || XF``
86Eject || run ''eject'' ||
|| || XF``86LaunchA || none, user can set with K``HotKeys ||
|| || XF``86LaunchB || none, user can set with K``HotKeys ||
|| || XF``86LaunchC || none, user can set with K``HotKeys ||
|| || XF``86LightBulb || KMilo on screen display ||
Line 90: Line 89:

* Lots of applications have Favorites, Stop, Forward, Back etc functionality. The special keys should not be globally assigned to just one app. Instead we should modifiy the keybindings of the apps where assignment of XF86<action> makes sense. I assume, that at least some of the XF86<*> keysyms can be assgined as a second Keybinding to a KDE STDAccel and are then automaticly available in all
apps that make use of them.
 * Lots of applications have Favorites, Stop, Forward, Back etc functionality. The special keys should not be globally assigned to just one app. Instead we should modify the keybindings of the apps where assignment of XF86<action> makes sense. I assume, that at least some of the XF86<*> keysyms can be assgined as a second Keybinding to a KDE STDAccel and are then automaticaly available in all apps that make use of them.

Summary

Use the Ubuntu laptop buttons infrastructure in KDE.

Rationale

Many laptops and also desktops have extra feature buttons which handle power management, display controls and other features. These should work as well in Kubuntu as they do in Ubuntu.

Use cases

Masie has a laptop with suspend and brightness buttons, when pressing these buttons nothing happens and she doesn't know how to make them work.

Bob notices that all his laptop buttons work in Ubuntu but none of them work in Kubuntu which would otherwise be his preferred environment.

Daniel follows the complex kmilo thinkpad instructions to get his thinkpad buttons working, he has to enable nvram writing to get this to work but wonders if it is a security risk.

Scope

Specific laptops are the problem of acpi-support and hotkey-setup, this spec is for making sure KDE does the right thing with the output of hotkey-setup.

Design

KDE has KMilo, a kde daemon module for handling laptop keys. KMilo has plugins for different types of laptop and each plugin for KMilo works in different ways and has different abilities. With the abstraction provided by hotkey-setup we no longer need different parts of KMilo for each laptop. We will create a new KMilo plugin for hotkey-support.

Implementation

Our KMilo hotkey-setup plugin will run xmodmap on startup to map the xevents from hotkey-setup to X keys. We will setup global bindings in KMix, Konqueror, Amarok and KubuntuPowerManagement to handle volume up/down, play/pause, suspend/hibernate, screen brightness and web browser control. The KMilo plugin will also have global bindings for volume and screen brightness and will show its on screen display to give feedback to the user, it will get its values by querying KMix and KubuntuPowerManagement with DCOP.

The KMilo plugin will also have global keybindings to listen for the e-mail and web browser buttons, these will run the default application which the user can set in the normal KDE way. Other application buttons will run the default Kubuntu application.

The existing KMilo plugins will be moved to a new unsupported package.

Unspecified buttons such as the "IBM Thinkpad" button will be mapped to X keys which can be set to almost any action using khotkeys, a standard part of KDE.

Keycode

Keysym

Handler

229

XF86Search

KMilo run kfmexec for KDE's default search page

235

XF86MyComputer

KMilo run kfmexec $HOME

236

XF86Mail

KMilo, run default e-mail application

237

XF86AudioMedia

KMilo run Amarok

178

XF86WWW

KMilo run default web browser

XF86Calculator

KMilo, run speedcrunch if installed else KCalc

XF86Terminal

KMilo run Konsole

Keycode

Keysym

Handler

162

XF86AudioPlay

Amarok

XF86AudioPause

Amarok

164

XF86AudioStop

Amarok

144

XF86AudioPrev

Amarok

153

XF86AudioNext

Amarok

Keycode

Keysym

Handler

160

XF86AudioMute

KMix to change, KMilo for on screen display

174

XF86AudioLowerVolume

KMix to change, KMilo for on screen display

176

XF86AudioRaiseVolume

KMix to change, KMilo for on screen display

Keycode

Keysym

Handler

230

XF86Favorites

Konqueror

231

XF86Refresh

Konqueror

232

XF86Stop

Konqueror

233

XF86Forward

Konqueror

234

XF86Back

Konqueror

XF86Go

Konqueror

Keycode

Keysym

Handler

XF86PowerOff

KubuntuPowerManagement

XF86Standby

KubuntuPowerManagement

223

XF86Sleep

KubuntuPowerManagement

XF86ContrastAdjust

KubuntuPowerManagement

XF86BrightnessAdjust

KubuntuPowerManagement

Keycode

Keysym

Handler

204

XF86Eject

run eject

XF86LaunchA

none, user can set with KHotKeys

XF86LaunchB

none, user can set with KHotKeys

XF86LaunchC

none, user can set with KHotKeys

XF86LightBulb

KMilo on screen display

Comments

AchimBohnet

  • Lots of applications have Favorites, Stop, Forward, Back etc functionality. The special keys should not be globally assigned to just one app. Instead we should modify the keybindings of the apps where assignment of XF86<action> makes sense. I assume, that at least some of the XF86<*> keysyms can be assgined as a second Keybinding to a KDE STDAccel and are then automaticaly available in all apps that make use of them.

  • Full screen mode: check that globally bound keys work also in full screen mode. I once used a tool (not kmilo) where e.g. Mute, etc. didn't work in full screen mode.

KubuntuLaptopButtons (last edited 2008-08-06 16:27:41 by localhost)