Get Involved

SourceForge Logo
Spam Chongqed








Documentation - Reference - Menu Definition File


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 used. This will make sense to programmers Everyone else,don't worry about it.

Defining Menus

1. A line that starts with # is a comment and is ignored.

# this is a comment
this is not

2. A line with a { on it starts a menu. everything before the { is the menu name (white space ignored).
Example (creates a menu called "a menu"):

a menu {

3. A line that has a } on it ends a menu. Everything else on the line is ignored.

a menu {


4. A line with a - on it adds a separator to the menu.


5. A command that starts with an @ is a special command. K-Meleon will do something special There are currently 2 special commands, @ToolBars and @entrypoint. @ToolBars will cause K-meleon to insert the list of toolbars at that location with the checkmarks so you can hide/show the toolbar. @entrypoint is an experimental command that will position the context menu at the command when it's created. Just play around with it and you'll see what I mean.  It's kind wonky right now.

Toolbars {



6. A command that starts with a : adds a submenu to the menu. The submenu should have been defined in the file above the place it's used.

Main {




7. A command that starts with a % is a control structure. It's the beginnings of a pseudo-scripting language. Right now the only commands supported are %ifplugin, %else, %endif, %strict, and %verbose. You can use the %ifplugin and %endif commands to enable/disable certain portions of the menu depending on if a plugin is loaded or not. %strict will give you a message if there is an error in the script. %verbose gives you a lot of messages which are useful for debugging.


%ifplugin fullscreen

fullscreen(&Full Screen\tF11)


Fullscreen not enabled :( = 0


8. A line that has ( and ) on it loads a plugin. Everything before the ( is taken as the plugin name. .dll is automatically appended to the plugin name. But you can add it yourself if you want. Everything between the ( and the ) is passed to the plugin. What the plugin actually does with it is anyone's guess.


9. 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. The thing on the right side of the = is the command id that the menu item corresponds to. It can be a number or a pre-defined command.


Exit K-Meleon = ID_APP_EXIT

Do Nothing\tAlt+N = 0


List of K-Meleon Command IDs: The complete list of command IDs to use with menus.

Last updated: November 21, 2001
Created: October 2, 2001

(c) 2000-2001 kmeleon.org. All rights reserved.
design by splif.