Module fcitx
Fcitx module
Functions
call_by_name (function_name, ...) | Call a global function by its name. |
version () | Get the version of fcitx. |
lastCommit () | Get the last committed string. |
splitString (str, delim) | a helper function to split the string by delimiter. |
log (str) | a helper function to send Debug level log to fcitx. |
watchEvent (event, function) | Watch for a event from fcitx. |
unwatchEvent (id) | Unwatch a certain event. |
currentInputMethod () | Return the current input method. |
addConverter (function) | Add a string converter for commiting string. |
removeConverter (id) | Remove a converter. |
addQuickPhraseHandler (function) | Add a quick phrase handler. |
removeQuickPhraseHandler (id) | Remove a quickphrase handler. |
commitString (str) | Commit string to current input context. |
standardPathLocate (type, path, suffix) | Locate all files with given path and suffix. |
UTF16ToUTF8 (str) | Helper function to convert UTF16 string to UTF8. |
UTF8ToUTF16 (str) | Helper function to convert UTF8 string to UTF16. |
Tables
KeyState | The lua version of fcitx::KeyState. |
StandardPath | The lua version of fcitx::StandardPath::Type. |
QuickPhraseAction | The lua version of fcitx::QuickPhraseAction. |
Functions
- call_by_name (function_name, ...)
-
Call a global function by its name.
Parameters:
- function_name name of the function
- ... the arguments forwarded to the function.
Returns:
-
nil if function is not found, or the return value of the function.
- version ()
-
Get the version of fcitx.
Returns:
-
string
The version of fcitx.
- lastCommit ()
-
Get the last committed string.
Returns:
-
string
The last commit string from fcitx.
- splitString (str, delim)
-
a helper function to split the string by delimiter.
Parameters:
Returns:
-
table
An array of string split by delimiter, empty string will
be skipped.
- log (str)
-
a helper function to send Debug level log to fcitx.
Parameters:
- str string log string.
- watchEvent (event, function)
-
Watch for a event from fcitx.
Parameters:
Returns:
-
A unique integer identifier.
- unwatchEvent (id)
-
Unwatch a certain event.
Parameters:
- id int id of the watcher.
See also:
- currentInputMethod ()
-
Return the current input method.
Returns:
-
string
the unique string of current input method.
- addConverter (function)
-
Add a string converter for commiting string.
Parameters:
- function string the function name.
Returns:
-
int
A unique integer identifier.
- removeConverter (id)
-
Remove a converter.
Parameters:
- id int id of this converter.
See also:
- addQuickPhraseHandler (function)
-
Add a quick phrase handler.
Parameters:
- function string the function name.
Returns:
-
int
A unique integer identifier.
- removeQuickPhraseHandler (id)
-
Remove a quickphrase handler.
Parameters:
- id int id of this handler.
See also:
- commitString (str)
-
Commit string to current input context.
Parameters:
- str string string to be commit to input context.
- standardPathLocate (type, path, suffix)
-
Locate all files with given path and suffix.
Parameters:
Returns:
-
table
A table of full file name.
See also:
- UTF16ToUTF8 (str)
-
Helper function to convert UTF16 string to UTF8.
Parameters:
- str string UTF16 string.
Returns:
-
string
UTF8 string or empty string if it fails.
- UTF8ToUTF16 (str)
-
Helper function to convert UTF8 string to UTF16.
Parameters:
- str string UTF8 string.
Returns:
-
string
UTF16 string or empty string if it fails.
Tables
- KeyState
-
The lua version of fcitx::KeyState. It represent the value of modifier keys.
Fields:
- None
- Shift
- CapsLock
- Ctrl
- Alt
- NumLock
- Mod3
- Super
- Mod5
- MousePressed
- HandledMask
- IgnoredMask
- Super2
- Hyper
- Meta
- UsedMask
- StandardPath
-
The lua version of fcitx::StandardPath::Type. It represent the value of different
type of directory.
Fields:
- Config
- PkgConfig
- Data
- Cache
- Runtime
- Addon
- PkgData
- QuickPhraseAction
-
The lua version of fcitx::QuickPhraseAction. It represent the different value
that can be returned from quickphrase handler.
Fields:
- Break
- Commit
- TypeToBuffer
- DigitSelection
- AlphaSelection
- NoneSelection