UP, CTRL-P                        cursor up
DOWN, CTRL-N                      cursor down
LEFT, CTRL-B                      cursor left
RIGHT, CTRL-F                     cursor right
CTRL-A                            cursor top
CTRL-E                            cursor bottom
PAGEUP, CTRL-U, Meta-v            cursor up a lots
PAGEDOWN, CTRL-D, CTRL-V          cursor down a lots
BACKSPACE, CTRL-H                 move to parent direcotry
\\                                move to root directory
~                                 move to home directory
ENTER                             run cursor file(insert directory)
q, CTRL_C                         quit
CTRL+L                            reread diskt and redraw the screen
SPACE                             mark file
[                                 mark range begin
]                                 mark range end
HOME                              mark all files without directory
END                               mark all files
*                                 glob mark
+                                 regex mark
.                                 toggle dot file mask
c                                 copy mark files to other directory
C                                 cp
m                                 move mark files to other directory
M                                 mv
d                                 move mark files to $TRASHBOX_DIR
D                                 delete mark files
e                                 edit file(vim)
v                                 view file(less)
r                                 rename
mark & r                          regex rename (for example, regex_rename '(.+)\.c$' '$1.h')
a                                 open attribute menu
n                                 make new file
k                                 make new direcotry
b                                 make backup of file under cursor
g                                 mgrep(grep and edit file)
G                                 vgrep(virtual directory with grep)
f,/                               incremental search
F                                 virtual directory with find
s                                 open sort and mask menu
V                                 open view menu
o,O                               copy direcotry path
w                                 exchange two directories
j                                 jump menu
J                                 cmdline jump
h                                 switch to command line mode
x                                 excute under file
l                                 make symbolic links with mark files to a other directory


Usage of saphire
    
    When switching cmdline, run shelp

mfiler3 inner command

quit [return code]
    exit mfiler3

keycommand [meta key stat, 0 or 1] [keycode] [file kind] [command]
    
    define keybind

    file kind is

    "*" --> all file
    "makefile" --> when cursor is under makefile
    ".cpp" --> when cursor is under file which has cpp extension.
    ".execute" --> excutable file
    ".directory" --> directory
    ".link" --> link
    ".mark" --> when marking
    ".mark-cpp" --> when marking even file which has cpp extension.

    the above file name is ignore case.

keycommand2 [-m|-f file_type] keycode { block }
    
    define keybind

    file type is

    "*" --> all file
    "makefile" --> when cursor is under makefile
    ".cpp" --> when cursor is under file which has cpp extension.
    ".execute" --> excutable file
    ".directory" --> directory
    ".link" --> link
    ".mark" --> when marking
    ".mark-cpp" --> when marking even file which has cpp extension.

    the above file name is ignore case.

    -M [mode name] assign keybind to the filer mode. Default filer mode is filer.

change_fmode [mode]
    Change the filer mode. Default filer mode is filer.

keymap keycode key1 key2 ... key3
    define keycode

cursor_move n|+n|-n|/[file name]

    -d [all|adir|sdir|n] specifies directory

    n move cursor to the cursor number
    +n only n moves below
    -n only n moves above
    /[file name] move to the file

mcd dir|+|-

    -d [all|adir|sdir|n] specifiles directory

    change path of the directory

    dir move to dir
    + forward directory history
    - backward directory history

cmdline -q|-c [string] [cursor position]

    switch cmdline mode

    string is initial string of the cmdline.

    cursor position is initial cursor position. head is 0. tail is -1.

    -q quick. don't wait after runned command.
    -c continue. continue to cmdline mode after runned command.

file_num

    return file number. 

    -d [all|adir|sdir|n] specifies directory
    -l add linefield to the output of tail

dir_num

    return director number
    -l add linefield to the output of tail

cursor_num

    return cursor position

    -d [all|adir|sdir|n] specifies directory
    -l add linefield to the output of tail

file_name [file number]

    return file name of the file.

    -d [all|adir|sdir|n] specifies directory
    -l add linefield to the output of tail

file_ext [file number]

    return file extesion

    -d [all|adir|sdir|n] specifies directory
    -l add linefield to the output of tail


file_perm [file number]

    return file permission

    -d [all|adir|sdir|n] specifies directory
    -l add linefield to the output of tail

file_group [file number]

    return file group

    -d [all|adir|sdir|n] specifies directory
    -l add linefield to the output of tail

file_user [file number]

    return file owner

    -d [all|adir|sdir|n] specifies directory
    -l add linefield to the output of tail

file_index [file name]

    return file number of the file

    -d [all|adir|sdir|n] specifies directory
    -l add linefield to the output of tail

path

    return directory path

    -d [all|adir|sdir|n] specifies directory
    -l add linefield to the output of tail

external -q [command]
    -q quick. don't wait after runned command.
    
    when assign extern command which is like vim or cp to keybind, you shoud write command which is "external vim" or "external cp". If you write external vim, before running vim mfiler3 initialize terminal.

ftp_start
    connect ftp server. hit q to quite.

isearch
    
    start incremental search

mchoise message item1 item2 ...

    make user choise the items

activate [directory number]

    activate diretory which has the number

defmenu [menu name] [title1] [keycode1] [command1] [title2] [keycode2] [command2] ...

    define menu

addmenu [menu name] title keycode command

    add item to the menu

menu [menu name]

    open menu

reread
    -d [all|adir|sdir|n] specifies directory

    reread disk

markfiles

    write mark files

    -d [all|adir|sdir|n] specifies directory

    -fullpath fullpath

    -q quote the writing files

allfiles

    write all files

    -d [all|adir|sdir|n] specifies directory

    -fullpath fullpath
    -q quote the writing files

mark
    
    mark [file name] [0 or 1] mark the file or dismark the file
    mark -t [file name] toggle mark the file
    mark -n [file number] [0 or 1] mark the file or dismark the file
    mark -n [file number] -t toggle mark the file

    -d [all|adir|sdir|n] specifies directory
    -f withou directories
    -a all files
    -l add linefield to the output of tail

marking

    when mark file exists, return 1.

    -d [all|adir|sdir|n] specifies directory
    -l add linefield to the output of tail

mclear_immediately

    clear screen immediately

vd

    -d [all|adir|sdir|n] specifies directory

    make virtual directory from STDIN

vd2

    -d [all|adir|sdir|n] specifies directory

    make virtual directory from STDIN which is linux ls -al format. The files can be nonexistent on the disk.

mcp [target directory]
    -p preserve time stamp

    copy mark files

mmv [target directory]
    -p preserve time stamp

    move mark files

    -f force overwrite

mrm 
    remove mark files

mtrashbox
    -p preserve time stamp

    move mark files to $TRASHBOX_DIR

mln [target directory]
    
    make mark file's absolute link

mrename [file name] [renamed file name]

    rename file name

    -r reread disk
    -c move cursor to renamed file

mask 
    
    mask -dotdir 0 or 1 visible dot file or hide dot file
    mask [regex] regex mask

    -d [all|adir|sdir|n] specifies directory
    -l add linefield to the output of tail

    -r reread disk

new_dir path
    make directory

    -m MASK 
        set initial mask

    -dotdir 0|1 
        set dot directory mask

del_dir
    remove directory

    -d [all|adir|sdir|n] specifies directory

mbackup [file name] [backup file name]

    -p preserve time stamp

    backup the file

row 
    return cursor row position
    -l add linefield to the output of tail

row_max

    return cursor row max
    -l add linefield to the output of tail

line

    retur curor line position
    -l add linefield to the output of tail

line_max

    return cursor line max
    -l add linefield to the output of tail

adir
    return active directory number
    -l add linefield to the output of tail

sdir
    return disactive directory number
    -l add linefield to the output of tail

kanjicode_file_name
    
    file system encode setting

    -m UTF8-MAC
    -w UTF8

keycode
    $(export key_up)
    $(export key_right)
    $(export key_down)
    $(export key_left)
    $(export key_insert)
    $(export key_delete)
    $(export key_home)
    $(export key_end)
    $(export key_pageup)
    $(export key_pagedown) 
    $(export key_meta_left) 
    $(export key_meta_right) 
    $(export key_meta_up) 
    $(export key_meta_down) 
    $(export key_enter) 
    $(export key_backspace) 
    $(export key_f1), key_f12
    $(export key_a),..., key_z
    $(export key_A), ..., key_Z
    $(export key_space) 
    $(export key_ctrl_space) 
    $(export key_ctrl_a), key_ctrl_z 
    $(export key_escape) 
    $(export key_tab) 
    $(export key_0),...,key_9
    $(export key_exclam) 
    $(export key_dquote) 
    $(export key_sharp) 
    $(export key_dollar) 
    $(export key_percent) 
    $(export key_and) 
    $(export key_squote) 
    $(export key_lparen) 
    $(export key_rparen) 
    $(export key_tilda) 
    $(export key_equal) 
    $(export key_minus) 
    $(export key_cup) 
    $(export key_vbar) 
    $(export key_backslash) 
    $(export key_atmark) 
    $(export key_bapostrophe) 
    $(export key_lcurly) 
    $(export key_lbrack) 
    $(export key_plus) 
    $(export key_semicolon) 
    $(export key_star) 
    $(export key_colon) 
    $(export key_rcurly) 
    $(export key_rbrack) 
    $(export key_lss) 
    $(export key_comma) 
    $(export key_gtr) 
    $(export key_dot) 
    $(export key_slash) 
    $(export key_qmark) 
    $(export key_underbar) 
