About this plugin
Allow you to use low level Mouse and Keyboard Windows Hooks on your publications. So you can know what key is pressed or what happend with the mouse not only on your publication, but on the entire system. All without external dependencies.
The mouse hook allow you to act when a mouse button is down, up and more, knowing the position of the cursor on the screen. The keyboard hook allow you to act when a press is down or up, knowing the system localized key name. Everything in an easy way, using the actions properties editors.
Thirparty
This plugin are imposible without the aid of this people:
Thanks a lot!
Start the low level mouse hook. The result variable store "True" if everything is OK, or "False" when not. In this last case the variable [LastError] contain information about the error. See also npOnMouseHook.
Stop the low level mouse hook. The result variable store "True" if everything is OK, or "False" when not. In this last case the variable [LastError] contain information about the error.
Find if the low level mouse hook is active or not. The result variable store "True" if the low level mouse hook is active, or "False" if not.
Set a subroutine to be executed when a new message is available from the low level mouse hook. The X Position variable store the horizontal position of the mouse cursor on the screen. The Y Position variable store the vertical position of the mouse cursor on the screen. The Event variable can contain one of the following values:
When the Event variable store the "WM_MOUSEWHEEL" value, then the Data variable can be store one of the following values: DELTA_UP or DELTA_DOWN, indicating the direction of the mouse wheel movement.
Start the low level keybaord hook. The result variable store "True" if everything is OK, or "False" when not. In this last case the variable [LastError] contain information about the error. See also npOnKeyboardHook.
Stop the low level keyboard hook. The result variable store "True" if everything is OK, or "False" when not. In this last case the variable [LastError] contain information about the error.
Find if the low level keyboard hook is active or not. The result variable store "True" if the low level keyboard hook is active, or "False" if not.
Set a subroutine to be executed when a new message is available from the low level keyboard hook. The event variable can store one of the following values:
The Key name variable store the system localized name for the key. Due to the Windowds SDK help:
The format of the key-name string depends on the current keyboard layout. The keyboard driver maintains a list of names in the form of character strings for keys with names longer than a single character. The key name is translated according to the layout of the currently installed keyboard, thus [the key variable store] different results for different input locales. The name of a character key is the character itself. The names of dead keys are spelled out in full.
The Key code variable store the virtual key code for the key. More information here.
All the NeoPlugins deal with errors in the same way that VisualNeo does: when the plugin found an action error the [LastError] variable store information about the error, so you can take care about this variable when execute an action.
But all the NeoPlugins also incorporate an advanced way to deal with possible action errors. You can define a subroutine named OnNeoPluginActionError in order to be executed when some action error are found and you can use this variables inside:
Note that this error handling subroutine are shared for all the NeoPlugins, so you no need to specify a subroutine for every plugin you use in your publication because the same subroutine are recognized and automagically used by every NeoPlugin. Below you can view a sample of this subroutine code:
:OnNeoPluginActionError AlertBox "NeoPlugin Error" "Error [LastError] in plugin: [PluginName]" Return
Also note that the use of this NeoPlugins error handling subroutine is completelly optional. You can continue using the [LastError] variable as usual and even use the both methods at the same time.