KubuntuLaptopButtons

Revision 8 as of 2006-06-20 09:49:36

Clear message

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 hotket-setup plugin will run xmodmap on startup to map the xevents from hotkey-setup to X keys. We will setup global bindings in KMix, Amarok and KubuntuPowerManagement to handle volume up/down, play/pause, suspend/hibernate and screen brightness. 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.

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.

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

XF86AudioPlay

Amarok

XF86AudioPause

Amarok

XF86AudioStop

Amarok

XF86AudioPrev

Amarok

XF86AudioNext

Amarok

XF86AudioLowerVolume

KMix to change, KMilo for on screen display

XF86AudioRaiseVolume

KMix to change, KMilo for on screen display

XF86Favorites

Konqueror

XF86Reload

Konqueror

XF86Stop

Konqueror

XF86Forward

Konqueror

XF86Back

Konqueror

XF86Stop

Konqueror

XF86Forward

Konqueror

XF86Back

Konqueror

XF86Go

Konqueror

XF86PowerOff

KubuntuPowerManagement

XF86Standby

KubuntuPowerManagement

XF86ContrastAdjust

KubuntuPowerManagement

XF86BrightnessAdjust

KubuntuPowerManagement

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