Multitap - topic2k/EventGhost GitHub Wiki
Multitap is a plugin which is designed to generate different texts, numbers, or characters using a remote control. The obtained string is sent for further processing as part of the event.
== Modes of work == Multitap can operate in three different modes:
- SMS
- Numpad
- Single Key
The user can choose whether the obtained string is attached to the event as a suffix or as a payload.
=== SMS mode === In this mode the plugin works just as writing a SMS on a mobile phone (without [http://en.wikipedia.org/wiki/T9_(predictive_text) T9]). Inserting characters can be terminated by one of the following ways:
=== Numpad mode === In this mode, you can use Multitap to create multi-digit numbers. Inserting digits can be terminated in three ways:
=== Single Key mode === In this mode, the user selects from the list of strings. Sends the string, whose sequence number corresponds to the number of pressing the appropriate keys. Selection of the string may be terminated by one of the following ways:
== How to use the Multitap ==
File:LexiBook-ST600.png
There are a large number of different remote controls, which can be used in conjunction with Eventghost. Therefore, it is not possible to do quite universal guidance applicable to all. For the following examples the Lexibook ST600 infrared remote control will be used with [http://ruckl.wz.cz/egon/egon.html Egon USB receiver]. For the processing of events, generated by the receiver, the Serial port plugin is used. If all is set up correctly and pressing any buttons on the remote, the IR codes are displayed in the logger:
Egon.072207
Egon.072C07
Egon.071F07
Such events form is for further work very inconvenient. Help is easy, we can use of the option remap of events. This can be done as follows:
- In the Configuration Tree select the plugin, for which you want to remap the events (in this case Serial port plugin)
- Select the Configuration-->Add Action... menu item (or click on Add Action...) and select the action Python Script (EventGhost folder)
- In the open dialog type the following (of course you use the IR codes for your remote control): #For remote "LEXIBOOK ST600" (SAT023) #==================================== timeout = 0.15 eventRemap = eg.result.Map eventRemap("071E07", "Power", timeout) eventRemap("071807", "Mute", timeout) eventRemap("073507", "Num1", timeout) eventRemap("072D07", "Num2", timeout) eventRemap("072507", "Num3", timeout) eventRemap("071D07", "Num4", timeout) eventRemap("073407", "Num5", timeout) eventRemap("072C07", "Num6", timeout) eventRemap("072407", "Num7", timeout) eventRemap("071C07", "Num8", timeout) eventRemap("073307", "Num9", timeout) eventRemap("072B07", "Num0", timeout) eventRemap("072907", "OK", timeout) eventRemap("072607", "Input", timeout) eventRemap("071907", "<<", timeout) eventRemap("072207", "Play", timeout) eventRemap("073707", ">>", timeout) eventRemap("002314", "Record", timeout) eventRemap("073207", "Stop", timeout) eventRemap("071B07", "Pause", timeout) eventRemap("071F07", "Volume+", timeout) eventRemap("071A07", "Volume-", timeout) eventRemap("072807", "Channel+", timeout) eventRemap("072A07", "Channel-", timeout) eventRemap("072707", "Menu", timeout) eventRemap("073007", "GoBack", timeout)
- Click OK to complete editing and close the dialog. Check that the just created action Python Script is located directly under the plugin for which the remap should be.
- Restart EventGhost and check if the remap is working. If everything is OK events should now appear in the logger already in the new form: Egon.Play Egon.Num6 Egon.Volume+
== Example 1 - keystroke emulation in SMS mode == In this example we show how to configure EventGhost to emulate the writing of any strings through remote control (similar to writing an SMS on your mobile phone).
=== Step one - new profile of configuration === In the dialog Multitap plugin create a new profile and set the parameters. You can see it in the following picture. File:EN_MultitapPluginSMS.png
=== Step two - macros === In the configuration tree put the required number of Multitap macros and set it according to the following pictures. {|style="border-collapse: collapse; border-width: 1px; border-style: solid; border-color: #000" |style="border-style: solid; border-width: 1px"| Example of configuration tree: |style="border-style: solid; border-width: 1px"| Configuration dialog for key "Num2": |- |style="border-style: solid; border-width: 1px"| File:EN_MultitapTree1.png |style="border-style: solid; border-width: 1px"| File:EN_MultitapKeySMS.png |}
You obviously modify the configuration to your needs.
=== Step three - events === Assign an event to each of the newly created macros. - see the next picture. File:EN_MultitapTree2.png
=== Step four - a macro for events handling === We want the result of our effort to be keystroke emulation. Therefore you must create yet another macro. This macro will handle events generated by the Multitap plugin.
- Place the cursor on the place where the new macro to be.
- Select the Configuration-->Add Macro... menu item (or click on the icon Add Macro...), select action Emulate Keystrokes (Window folder) and in an open dialogue write {eg.event.payload} and close the dialog.
- Select the Configuration-->Add Event... menu item (or click on the icon Add Event...), in an open dialogue write Multitap.SMS and close the dialog.
- Often it may be necessary to macro supplement the action Find a window (ie window, to send Keystrokes to).
You can make settings according to the following pictures. {|style="border-collapse: collapse; border-width: 1px; border-style: solid; border-color: #000" |style="border-style: solid; border-width: 1px"| Macro Emulate Keystrokes in configuration tree: |style="border-style: solid; border-width: 1px"| Configuration dialog Emulate Keystrokes: |- |style="border-style: solid; border-width: 1px"| File:EN_Multitap-Tree_EmulateKeystrokes.png |style="border-style: solid; border-width: 1px"| File:EN_EmulateKeystrokesDialog.png |}
At this point everything is done and you have added a new ability to your EventGhost configuration!
And here is an example of the OSD and logger using the just completed configuration: {|style="border-collapse: collapse; border-width: 1px; border-style: solid; border-color: #000" |style="border-style: solid; border-width: 1px"| OSD when typing a text: |style="border-style: solid; border-width: 1px"| Contents logger after the completion of typing: |- |style="border-style: solid; border-width: 1px"| File:MultitapOSD-SMS.png |style="border-style: solid; border-width: 1px"| File:MultitapLoggerSMS.png |}