Skip to content
mooz edited this page Sep 13, 2010 · 4 revisions

PRESERVE Area

The area that is enclosed by //{{%PRESERVE% and //}}%PRESERVE% is called the PRESERVE Area.

In the PRESERVE area, you can describe about configurations for KeySnail, however you do not have to
include these things:

  • Special keys
  • Hooks
  • Keybind-definitions

You should write these settings outside of the PRESERVE Area.

Prompt

You can customize behaviours of interfaces like prompt.read() and/or prompt.selector()
in the PRESERVE Area

See the following example.

prompt.rows                = 15;
prompt.useMigemo           = true;
prompt.migemoMinWordLength = 3;
prompt.displayDelayTime    = 200;

prompt.rows indicates the number of rows in a prompt. Change this value when you want to increase or decrease TLs in the Twitter client.

When prompt.useMigemo is true, matching will be done by XUL/Migemo. You can set the minimum characters of alphabets required to start a Migemo search
by prompt.migemoMinWordLength.

prompt.displayDelayTime indicates the delay (milliseconds) to search after inputting characters.
Smaller values gives you better responses, however in low-performance computers worsens because of increased loads. Take care the balance.

Keybindings for prompts can be changed by settings in the PRESERVE Area like the following (default settings):

prompt.setActionKey("read", "ESC"    , "prompt-cancel");
prompt.setActionKey("read", "RET"    , "prompt-decide");
prompt.setActionKey("read", "<down>" , "prompt-next-line");
prompt.setActionKey("read", "<up>"   , "prompt-previous-line");
prompt.setActionKey("read", "<tab>"  , "prompt-next-completion");
prompt.setActionKey("read", "S-<tab>", "prompt-previous-completion");

prompt.setActionKey("selector", "ESC"    , "prompt-cancel");
prompt.setActionKey("selector", "RET"    , "prompt-decide");
prompt.setActionKey("selector", "C-RET"  , "prompt-continuous-decide");
prompt.setActionKey("selector", "M-RET"  , "prompt-continuous-decide-and-next");
prompt.setActionKey("selector", "<down>" , "prompt-next-line");
prompt.setActionKey("selector", "<tab>"  , "prompt-next-line");
prompt.setActionKey("selector", "<up>"   , "prompt-previous-line");
prompt.setActionKey("selector", "S-<tab>", "prompt-previous-line");
prompt.setActionKey("selector", "<next>" , "prompt-next-page");
prompt.setActionKey("selector", "<prior>", "prompt-previous-page");
prompt.setActionKey("selector", "<home>" , "prompt-beginning-of-candidates");
prompt.setActionKey("selector", "<end>"  , "prompt-end-of-candidates");
prompt.setActionKey("selector", "C-i"    , "prompt-select-action");

Note: prompt-continuous-decide indicates doing actions continuously
without closing the prompt
. Ctrl + Enter in default.

Kill Ring

You can customize kill ring by settings like the following:

command.kill.killRingMax   = 15;
command.kill.textLengthMax = -1;

command.kill.killRingMax indicates the size of a kill ring. In this
setting, it is 15, then you can store maximum 15 texts.

command.kill.textLengthMax indicates the maximum size of a text to
store in a kill ring. When it is -1, which means infinite, you can save
any texts regardless of its size.

Keyboard Macros

You can customize the interval between each key inserted in executing
a keyboard macro.

macro.sleepTime = 50;

In this case, it is 50 ms, for example, a keyboard macro of j, j, j
will be executed as: j, (waits 50 ms), j, (waits 50 ms), j.