KeyboardAliasRegister
From TrillWiki
Keyboard aliases are key combinations that are caught inside the edit area of message windows. These can be used as a quick way to enter in a particular line of text (see Control-; in the Winamp 2.x plugin), launch a particular window of your plugin, etc.
Compatibility: 1.0 and higher
Contents |
Syntax
plugin_send(MYGUID, "keyboardAliasRegister", keyboard_alias_t *)
Note that all Trillian functions and notifications begin with a lower-case letter, despite the Wiki requirement that all pages start with a capital letter.
Parameters
KeyboardAliasRegister utilitizes the keyboard_alias_t structure.
struct keyboard_alias_t {
unsigned int struct_size;
int alias_id;
int alt;
int ctrl;
int shift;
char key;
ttkCallback callback;
void *data;
};
- alias_id
- This value is filled by the keyboardAliasRegister function and should be 0 when called.
- alt
- Should contain a 1 if the alt key must be pressed for alias to occur.
- ctrl
- Should contain a 1 if the ctrl key must be pressed for alias to occur.
- shift
- Should contain a 1 if the shift key must be pressed for alias to occur.
- key
- The character that must be pressed for the alias to occur.
- callback
- Callback for the generated notifications when an alias is used by a user.
- data
- Data passed to the callback in the user parameter.
Return Value
The alias ID for the alias just registered.
Remarks
All alias's registered must be removed properly by the plugin before it is unloaded. Not doing this may result in a crash.
