############################################################################### # # nodoka file syntax # ############################################################################### # # NOTE: # * case insensitive # * <...> is a non-terminal symbol # * "..." is a terminal symbol # * /.../ is a terminal symbol (regular expression) # * namespace is # 1. KEY_NAME # 2. KEYSEQ_NAME # 3. KEYMAP_NAME # 4. ALIAS_NAME # 5. FUNCTION_NAME # 6. SYMBOL # * the default of <...MODIFIED_KEY_NAME>'s modifier-settings is: # 1. "IL-", "NL-", "CL-", "SL-", "KL-", # "MAX-", "MIN-", "MMAX-", "MMIN-", # "T-", "TS-", # "TL-", "TLS-", # "TR-", "TRS-", # /L[0-9]/, "U-" and "D-" # are specified with "*" # 2. all other modifiers are specified with "~" # 3. they can be changed by # "key" "=" # # # FILE STRUCTURE # : ( ? )* : | | | | | | | # each can be divided into some lines by \ : /#.*/ : "\r\n" # # BASIC TYPE # : /[-+]?[0-9]+/ # decimal | /[-+]?0[0-7]+/ # octal | /[-+]?0x[0-9a-f]+/ # hexadecimal : "false" # false | # true : /([/?_a-z]|\MBCS|\EC)([-+/?_a-z0-9]|\MBCS|\EC)*/ | /"([^"]|\MBCS|\EC)*"/ | /'([^']|\MBCS|\EC)*'/ # \MBCS : Multi Byte Character (such as Shift_JIS) # \EC : Escaped Characters # | "\a" # bell # | "\e" # escape # | "\f" # form feed # | "\n" # newline # | "\r" # carriage return # | "\t" # horizontal tab # | "\\" # \ # | /\\[0-7]+/ # character as octal # | /\\x[0-9a-f]+/ # character as hexadecimal : /\REGEXP/ | \m@\REGEXP@ # @ can be any character # \REGEXP : # | "|" # Alternation # | "*" # Match 0 or more times # | "+" # Match 1 or more times # | "?" # Match 1 or 0 times # | "." # Match any character # | "^" # Match the beginning of the string # | "$" # Match the end of the string # | "\b" # Match a word boundary # | "\B" # Match a non word boundary # | "\w" # Match a word character (alphanumeric, "_") # | "\W" # Match a non word character # | "\s" # Match a whitespace character # | "\S" # Match a non-whitespace character # | "\d" # Match a digit character # | "\D" # Match a non-digit character # | "(" ")" # Grouping # | "[" "]" # Character class # # COND SYMBOL # : | | | | : "define" : ( "if" | "and" ) : "(" "!"? ")" ( )? : "else" ( )? : ( "elseif" | "elsif" | "elif" ) : "endif" : # # INCLUDE # : "include" : # # KEYBOARD DEFINITION # : "def" | "def" | "def" | "def" | "def" | "def" | "def" : "key" "=" : "(" + ")" | + : : ? ? ? : * : "E0-" | "E1-" : "mod" "=" * : "shift" | "alt" | "meta" | "menu" | "control" | "ctrl" | "windows" | "win" : "num" | "caps" | "scroll" : "S-" | "A-" | "M-" | "C-" | "W-" | "*" # we don't care the next modifier | "~" # the next modifier must be released : "sync" "=" : "alias" "=" : : | : "subst" + "=" : "option" "KL-" "=" | "option" "delay-of" "!!!" "=" # # KEYMAP DEFINITION # : "keymap" ? ? | "keymap2" ? ? | "window" ? ? \ ? : : ":" : "=" : | "(" "&&" ")" | "(" "||" ")" : : # # KEY TO KEY SEQUENCE ASSIGNMENT # : "key" + "=" | "key" * "=" * : * : | "R-" # auto repeated key | "IL-" # if IME on | "IC-" | "I-" # if IME on and compositioning | "NL-" # if Num Lock on | "CL-" # if Caps Lock on | "SL-" # if Scroll Lock on | "KL-" # if Kana Lock on | "MAX-" # if Window maximized | "MIN-" # if Window minimized | "MMAX-" # if MDI child Window maximized | "MMIN-" # if MDI child Window minimized | "T-" # if finger on touchpad | "TS-" # same as "T-" except for sticky up to release all keys | "TL-" # if finger on touchpad Left Area | "TLS-" # same as "TL-" except for sticky up to release all keys | "TR-" # if finger on touchpad Right Area | "TRS-" # same as "TR-" except for sticky up to release all keys | /M[0-9]/ # user defined modifier | /L[0-9]/ # user defined lock # # EVENT TO KEY SEQUENCE ASSIGNMENT # : "event" "=" : "prefixed" | "before-key-down" | "after-key-up" # # MODIFIER ASSIGNMENT # : "mod" ( )* \ \ ( ? )+ : | /mod[0-9]/ : "=" | "-=" | "+=" : "!" # true modifier (doesn't generate scan code) | "!!" # one shot modifier | "!!!" # one shot repeatable modifier # # KEY SEQUENCE DEFINITION # : "keyseq" "$" "=" | "keyseq" "$" "=" : + : | "$" ( | ) | * "&" ? | "(" ")" : + : | "$" | * "&" ? | "(" ")" : "(" ( ( "," )* )? ")" : * : * : | "U-" # up | "D-" # down : : : : | "$" | "(" ")" | | | | | | | | * | : /lock\d/ # &Toggle() # &VK() : * : "E-" | "U-" | "D-" : # &ShellExecute() : "HIDE" | "MAXIMIZE" | "MINIMIZE" | "RESTORE" | "SHOW" | "SHOWDEFAULT" | "SHOWMAXIMIZED" | "SHOWMINIMIZED" | "SHOWMINNOACTIVE" | "SHOWNA" | "SHOWNOACTIVATE" | "SHOWNORMAL" # &PostMessage() : | "toOverlappedWindow" | "toMainWindow" | "toItself" | "toParentWindow" : "overlapped" | "mdi" # Local Variables: # mode: text # eval: (progn (font-lock-mode) (font-lock-add-keywords nil '(("#.*$" . font-lock-comment-face) ("\\\\$" (0 font-lock-warning-face)) ("/\\(\\[[^]\n]*\\]\\|[^/\n]\\)*/" (0 font-lock-string-face)) ("'[^'\n]*'" (0 font-lock-string-face)) ("\"[^\"\n]*\"" (0 font-lock-string-face)) ("<\\([A-Za-z_][A-Za-z_0-9]*\\)>" (1 font-lock-constant-face)) ("[*?+]" (0 font-lock-keyword-face)) )) (font-lock-fontify-buffer)) # End: