Multitap

From EventGhost
Jump to: navigation, search

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 T9). Inserting characters can be terminated by one of the following ways:

  1. Enter action
  2. Cancel action (in this case not triggering an event)

Numpad mode

In this mode, you can use Multitap to create multi-digit numbers. Inserting digits can be terminated in three ways:

  1. When the time-out is reached
  2. Enter action
  3. Cancel action (in this case not triggering an event)

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:

  1. When the time-out is reached
  2. Enter action
  3. Another action of the same type
  4. Cancel action (in this case is not triggering an event)

How to use the Multitap

The Lexibook ST600 universal remote, as a demonstration remote for this article

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 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.

Multitap plugin dialog

Step two - macros

In the configuration tree put the required number of Multitap macros and set it according to the following pictures.

Example of configuration tree: Configuration dialog for key "Num2":
EN MultitapTree1.png 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.

Example of configuration tree with events

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.

Macro Emulate Keystrokes in configuration tree: Configuration dialog Emulate Keystrokes:
EN Multitap-Tree EmulateKeystrokes.png 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:

OSD when typing a text: Contents logger after the completion of typing:
MultitapOSD-SMS.png MultitapLoggerSMS.png