Free Hero Mesh

keybindings
Login
This is a mirror of the main repository for Free Hero Mesh. New tickets and changes will not be accepted at this mirror.

This document describes the format for defining key bindings and mouse bindings.

The resource name for a binding consists of:

You are not allowed to use ? modifiers for the key name or mouse button or modifier keys, although you can use * anywhere, and ? can be used in place of the first and/or second components.

If you define a binding without num lock but do not define the corresponding binding with num lock, then that key combination (or mouse button) will do the same thing when num lock is on than when num lock is not on.

The definition of a binding can be:

Built-in miscellaneous

Consists of ^ followed by one more character.

(TODO: Mention what commands are available.)

Rewind/advance/reset

Consists of - to rewind, + to advance, or = to reset, followed by a nonnegative integer in decimal notation.

This will rewind or advance the move list, or reset the move list to the beginning. In the case of rewind or advance it tells how many moves to rewind or advance by. In case of reset, it specifies how many moves to advance after it is reset (normally you should specify zero).

These commands are not valid in the level editor.

Input a move

Consists of ' followed by a Hero Mesh key name.

This will begin a new game turn, and then record the move just made (unless the move is ignored with the IgnoreKey instruction, in which case the state of the game remains unchanged).

These commands are not valid in the level editor.

External command

Consists of ! followed by a shell command.

Executes the given command and waits for it to return.

SQL statement

Consists of a single SQL statement (which must not begin with a comment). Only one SQL statement is allowed; you are not allowed more than one. The statement is prepared when Free Hero Mesh starts. The statement should be ANALYZE, DELETE, INSERT, SELECT, UPDATE, or VACUUM; use the sqlInit resource if you need to execute other statements.

The SQL statement will be executed when the key/mouse is pushed. If there are any result rows, they are interpreted as follows: The first column is a string consisting of exactly two characters, telling what operation should be performed; the rest of the columns are the arguments. Any extra arguments are ignored, although since later versions of Free Hero Mesh might use them for something, it is recommended to use null values in the extra columns for compatibility with future.

If there any host parameters, they are interpreted as follows (all case case-insensitive):

Note that $LEVEL and $LEVEL_ID keep the same values for the entire statement, even though LEVEL() and LEVEL_ID() may give a different value if a different level is selected half way in between.

See also SQL tables and SQL functions. Extensions may define additional tables/functions that can be used.