K-Meleon

K-Meleon's Configuration Files

Die Konfiguration von K-Meleon wird durch diese vier Dateien bestimmt:


The configuration of K-Meleon is controlled by these four files:

Jedes neu erstellte Profil kann diese Dateien in unterschiedlichen Varianten besitzen.

Hinweis: Für K-Meleon 1.1 sind einige Informationen auf dieser Seite nicht mehr aktuell oder unvollständig. Greife in diesem Fall auf kko's K-Meleon 1.x Reference zurück (extern).

Menüs (menus.cfg)

Die menus.cfg -Datei wird einmal von oben nach unten eingelesen. Das heißt, du musst Änderungen dort vornehmen, wo sie im Menü stehen sollen.

  • Kommentarzeilen beginnen mit einem # und werden ignoriert
  • Menüs starten mit einer { (öffnende geschweifte Klammer). Vor der geschweiften Klammer steht der Menü-Name.
  • Menüs enden mit } (schließende geschweifte Klammer). Text hinter der Klammer wird ignoriert.
  • Eine Zeile mit einem - (Bindestrich) fügt einen Trennstrich im Menü ein.
  • Eine mit einem : (Doppelpunkt) beginnende Zeile fügt ein Untermenü ein.
  • Das &-Zeichen (Ampersand) bewirkt die Untestreichung des folgenden Buchstabens, der als Shortcut (Tastenkürzel) benutzt wird.
  • Eine Zeile mit einem = (Gleichheitszeichen) ist ein Menü-Punkt. Alles was links vom Gleichheitszeichen steht, wird im Menü angezeigt. Mit \t kann ein Tabulator eingefügt werden, um den Menü-Eintrag von seinem Tastenkürzel zu trennen. Auf der rechten Seite des Gleichheitszeichen steht dann der zur Beschreibung gehörende Befehl.

Note: In regard to K-Meleon 1.1, this information is partly outdated and incomplete. Please refer to kko's K-Meleon 1.x Reference (external).

Example

# This will create the main menu bar with the File menu,
# that when opened has the command to open a new window.

&File {
&New Window\tCtrl+N = ID_NEW_BROWSER
}

Main {
:&File
}


Accelerators (accel.cfg)

Accelerators are keyboard shortcuts that can be linked to internal functions of K-Meleon. They are stored in accel.cfg file.

As usual all lines starting with # are comments (ignored). Each accelerator definition consists of 2 parts separated by an = sign:

<key1> [<key2> [<key3> [<key4>]]] = <command>

<keys> -> The declaration of the combination of the keyboard keys (See next list of predefined key names).
<command> -> The command itself, can be a command ID ("ID_..."), plugin command "<pluginName>(<pluginCommand>)" or macro function "macros(<macroName>)". Note that plugin and macro commands are ignored when the addressed plugin or macro is not present, i.e. not loaded or not exist.

The keys

You can use a combination of any number of control key (Alt/Ctrl/Shift) and one normal key.

Control keys are:

CTRL
SHIFT
ALT


Normals keys are standard alphanumeric symbols (A-Z, 0-9, rest of symbols) and the following constants for special keys:

  VK_ESCAPE
  VK_F1
  VK_F2
  VK_F3
  VK_F4
  VK_F5
  VK_F6
  VK_F7
  VK_F8
  VK_F9
  VK_F10
  VK_F11
  VK_F12

  VK_TAB
  VK_CAPITAL   (Shift Lock)
  VK_BACK
  VK_RETURN
  VK_SPACE
  VK_MENU   (Alt Gr)

  VK_PLUS   (normal +, not numpad)
    Note: VK_PLUS is the code of the key, not the code of the symbol!
          If, for example, the + is accessed by pressing Shift and the key, then
          VK_PLUS corresponds to pressing the key only (without the Shift key).
  VK_MINUS   (normal -, not numpad) (same remark as for VK_PLUS)

  VK_LWIN   (left Windows key)
  VK_RWIN   (right Windows key)
  VK_APPS   (menu key)

  VK_PRINT  or  VK_SNAPSHOT   (this key not work for K-Meleon accelerators)
  VK_SCROLL
  VK_PAUSE

  VK_INSERT
  VK_DELETE
  VK_HOME
  VK_END
  VK_PRIOR  or  VK_PAGE_UP
  VK_NEXT  or  VK_PAGE_DOWN

  VK_LEFT
  VK_UP
  VK_DOWN
  VK_RIGHT

  VK_NUMLOCK
  VK_DIVIDE   (/ on numpad)
  VK_MULTIPLY   (* on numpad)
  VK_SUBTRACT   (- on numpad)
  VK_NUMPAD0
  VK_NUMPAD1
  VK_NUMPAD2
  VK_NUMPAD3
  VK_NUMPAD4
  VK_NUMPAD5
  VK_NUMPAD6
  VK_NUMPAD7
  VK_NUMPAD8
  VK_NUMPAD9
  VK_ADD   (+ on numpad)
  VK_DECIMAL   (. on numpad)

And for the mouse buttons:

  LButton
  MButton
  RButton

The commands

An accelerator can be linked to 3 types of elements:

Conditional accelerator definition

You can define accelerators dependent on the absence/presence of a plugin:

%ifplugin <pluginName>
        ...
%else
        ...
%endif

The %else part can be omitted (it's optional).

Examples

CTRL O = ID_FILE_OPEN
CTRL ALT VK_F4   = ID_APP_EXIT
VK_ESCAPE = ID_NAV_STOP
SHIFT VK_LEFT = ID_NAV_BACK
CTRL ALT SHIFT P = ID_LINK_ABOUT_PLUGINS

# plugin function
%ifplugin bookmarks
CTRL D = bookmarks(add)
%endif

# macro function
CTRL VK_RETURN = macros(ctrl_enter)

You can found more examples in accel.cfg file in your \K-Meleon\defaults\settings subfolder.


Macros (macros.cfg)

Macros are stored in macros.cfg.
The macro language is explained in the Macro Language section. New macros are given in the Macro Library.

Note: In regard to K-Meleon 1.1, this information is partly outdated and incomplete. Please refer to kko's K-Meleon Macro Language reference (external).


Toolbars (toolbars.cfg)

Toolbars are stored in a file named toolbars.cfg. Each skin as its own file, and you can override the default file, by placing your own copy in your profile directory.
The file is constituted of a set of toolbars, which in turn are made of buttons.

The format is as follows:

ToolBar Name(16,16) {     # (width,height) is optional, defaults to (16,16)
  Button Name(16,16) {     # (width,height) is optional, defaults to toolbar dimensions
    Command | Menu Name     # command (required): ID command, plugin command, or macro
                       # | Menu name is optional (as defined in menus.cfg) and is showed with right click
    Tooltip text         # Tooltip text
    c:\toolhot.bmp[2]    # hot image (optional)
                            #   [2] (optional) is the zero based index of the image within the file, defaults to 0
    c:\toolcold.bmp[2]   # cold image (optional)
    c:\tooldead.bmp[2]   # disabled image (optional)
  }     # End of Button
  -                     # display a vertical separator
  Button 2 {
    Command 2
    Tooltip 2
  }
}     # End of Toolbar

# Note: No toolbar images = Text based toolbar with button names for images

Toolbar 2 {
  Button 1
  ...
  Button 2
  ...
}

The command is either a command ID, a plugin command or a macro.
If you don't specify any images in the toolbar, it will become a text toolbar showing the button names in place of images.

Examples

K-Meleon default toolbar:

internal://abdae542f2a2961e09f7201149d6d620.gif

IE-like toolbar:

internal://9e19f3ee71cabf901c1ac58d74f4d6e4.gif

K-Meleon

(c) 2000-2010 kmeleonbrowser.org. All rights reserved.
design by splif.