Snapshot
Overview
The buttons applet is designed to allow the user to create keyboard shortcuts for frequently used MID applications and settings controls. The user simply clicks the setting they wish to change and types in a new key combination or button.Files Needed
- /usr/lib/moblin-applets/libhcpcommon.so
- all control panel applets need this
- /usr/lib/hildon-control-panel/keybindings.so
- The applet library
- /usr/share/applications/hildon-control-panel/keybinding-properties.desktop
- The applet descriptor, tells mobile-basic-flash to create a shortcut in "Settings"
- /usr/share/moblin-applets/glade/keybinding-properties.glade
- Glade XML file describing the dialog
- /usr/lib/moblin-applets/libvolumecontrol.so
- Used by moblin-settings-daemon in response to the volume keybindings
- /usr/bin/moblin-settings-daemon
- The applet just sets the bindings, moblin-settings-daemon is what carries out all the actions associated with the bindings
- /usr/share/moblin-applets/glade/acme.glade
- Glade XML file which defines the little volume display that appears when using the volume keybindings
Applet Design
Shortcut Functions
The following are a list of functions that can currently be mapped to buttons or key combinations. They break down into two groups: applications to launch and controls. The applications all have gconf keys which determine the exact command to be executed to launch the app and their current values are shown in parentheses. The ones without parentheses currently have no application mapping and are there as placeholders for future use.
| Applications to Launch | Controls |
|---|---|
|
Home Folder Search Help Browser E-mail (claws-mail) Web Browser (midbrowser) Calculator (galculator) Terminal (uxterm) Chat (empathy) Memopad (mousepad) Dictionary (stardict) My Tasks (tasks) Media Player (moblin-media) Contacts (contacts) |
Increase Screen Brightness Decrease Screen Brightness Toggle Max/Min Brightness Volume Mute Volume Down Volume Up Play Pause Stop Skip to Previous Track Skip to Next Track |
Gconf Settings
Each keybinding has its value stored in a gconf key in the following gconf dir:
/apps/moblin_settings_daemon/keybindings/
| Control Shortcut | Keybinding GKey |
|---|---|
| Increase Screen Brightness | brightness_up |
| Decrease Screen Brightness | brightness_down |
| Toggle Max/Min Brightness | brightness_maxmin |
| Volume Mute | volume_mute |
| Volume Down | volume_down |
| Volume Up | volume_up |
| Play | play |
| Pause | pause |
| Stop | stop |
| Skip to Previous Track | previous |
| Skip to Next Track | next |
| Application Shortcut | Keybinding GKey | Command GKey |
|---|---|---|
| Home Folder | home | home_cmd |
| Search | search | search_cmd |
| Help Browser | help | help_cmd |
| email_cmd | ||
| Web Browser | www | www_cmd |
| Calculator | calc | calc_cmd |
| Terminal | term | term_cmd |
| Chat | chat | chat_cmd |
| Memopad | memo | memo_cmd |
| Dictionary | dict | dict_cmd |
| My Tasks | tasks | tasks_cmd |
| Media Player | media | media_cmd |
| Contacts | contacts | contacts_cmd |
The values for the command string keys as well as some of the default button mapping keys are set in the moblin-applets schema file: apps_moblin_settings_daemon_keybindings.schemas.
Code Reuse
This applet is based on gnome-control-center's keybindings applet.- Gnome Control Center 1:2.18.1-0ubuntu2
- Download at: http://packages.ubuntu.com/feisty/gnome-control-center
