K-Meleon

KMeleonWiki > Documentation > ConfigFiles


Menus?

Accelerators?

Macros?

Toolbars?


The configuration of K-Meleon is controlled by these four files. Each profile that you create can have a different configuration by editing these files.

Note: In regarde to K-Meleon 1.1, the informations given on this page are partly outdated and incomplete. Please refer to kko's K-Meleon 1.x Reference (external).


Menus

The menus.cfg file is parsed top to bottom. It's only read in once. That means you have to define things above where they are eused.

  • A line that starts with # is a comment and is ignored.
  • A line with a { on it starts a menu. Everything before the { is the menu name.
  • A line that has a } on it ends a menu. Everything else on the line is ignored.
  • A line with a - on it adds a separator to the menu.
  • A command that starts with a : adds a submenu to the menu.
  • The & character will underline the following letter for use of keyboard shortcuts.
  • A line that has an = on it is a menu item. Everything on the left of the = is displayed on the menu.
  • You can use \t to insert a tab such as to separate labels from the key.
  • On the right side of the = is the command id that the menu item corresponds to.

Note: In regarde to K-Meleon 1.1, these informations are 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

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

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

  • the declaration of the combination of the keyboard keys
  • the command itself

The keys

You can use a combination of any number of control key (shift/alt/ctrl) and one normal key.

Control keys are: CTRL SHIFT ALT
Normals keys are standard alphanumeric symbols (az,09, "'!$) and the following constants:

  VK_BACK
  VK_TAB
  VK_RETURN
  VK_PAUSE
  VK_CAPITAL (shift lock)
  VK_ESCAPE
  VK_SPACE
  VK_PRIOR (page up)
  VK_NEXT (page down)
  VK_END
  VK_HOME
  VK_LEFT
  VK_UP
  VK_RIGHT
  VK_DOWN
  VK_INSERT
  VK_DELETE

  VK_LWIN (left Windows key)

  VK_RWIN (right Windows key
  VK_APPS (menu key)
  VK_NUMPAD0
  VK_NUMPAD1
  VK_NUMPAD2
  VK_NUMPAD3
  VK_NUMPAD4
  VK_NUMPAD5
  VK_NUMPAD6
  VK_NUMPAD7
  VK_NUMPAD8
  VK_NUMPAD9
  VK_MULTIPLY (* on numpad)
  VK_ADD (+ on numpad)
  VK_PLUS (normal +, not numpad)
    note: is the code of the key, not the symbol
    example: if the '+' is accessed when pressing 'shift' and the key,
        VK_PLUS corresponds to pressing the key only (without any control key).
  VK_SUBTRACT (- on numpad)
  VK_MINUS (normal -, not numpad) (same remarks as for VK_PLUS)
  VK_DECIMAL (. on numpad)
  VK_DIVIDE (/ on numpad)
  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_NUMLOCK

  VK_SCROLL

And for the mouse:

  LButton
  RButton
  MButton

The commands

An accelerator can be linked to 3 types of elements:

  • an internal functions represented by command ID's
  • a plugin function. Currently available function are described here.
  • a macro function as defined in macros.cfg. The syntax is currently described here.

Example

CTRL O = ID_FILE_OPEN?
CTRL ALT VK_F4   = ID_APP_EXIT?
VK_ESCAPE = ID_NAV_STOP?

# plugin function
CTRL D = bookmarks(add)


# macro function
CTRL VK_RETURN = macros(ctrl_enter)


Macros

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 regarde to K-Meleon 1.1, these informations are partly outdated and incomplete. Please refer to kko's K-Meleon Macro Language reference (external).


Toolbars

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              # command (required)
    Tooltip text         # Tooltip text
    c:\toolhot.bmp2?    # hot image (optional)
                         #   2? (optional) is the zero based index of the
                         #    image within the file, defaults to 0
    c:\toolcold.bmp2?   # cold image (optional)
    c:\tooldead.bmp2?   # disabled image (optional)
  }
  -             # display a vertical line between 2 buttons
  Button 2 {
    Command 2
    Tooltip 2
  }
}
Toolbar 2 {
  Button 1
  ...
  Button 2
  ...
}

The command is either a Command ID, a plugin command or a macro? (which is a plugin).
If don't specify any images in the toolbar, it will become a "text" based toolbar, and use 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.