Multitap

Questions and comments specific to a particular plugin should go here.
User avatar
Pako
Plugin Developer
Posts: 2274
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Multitap

Post by Pako » Thu Oct 09, 2008 6:44 pm

Edit 15.10.2008:
The latest version of the plugin (as a Tarball) will always be downloadable here.
Edit 01.04.2009:
Instructions for use Multitap plugin you can read on the Wiki.
Edit 05.07.2009:
Download link changed to new SVN.
=================================================================================
This is the longest English text, which I have ever wrote. I have a fear that you will not well understood what I meant. Please write here if you do not well understand!

Here is the first version of the plugin Multitap.
Features:
a) The user can choose using wx.Choice of the three modes of work: "SMS like string", "Numpad" and "Single Key." Is it easier for both: for users and for the programmer.
b) Setting up the mode of work, the names of events, format of events and a timeout is taken at all times by the first event, which comes after a standstill. This setting will apply for all the other characters received up to generate the event and return to the idle state.
c) Actions "Enter" and "Cancel" works in all modes. "Enter" and "Cancel" terminating receive of the characters and after Enter is generated the required event.
d) In the SMS mode Enter is the mandatory action. I do not see here any other reasonable variant. Timeout here serves only to "confirm" (receiving) of individual characters.
The input of the entire string terminating Enter. If you set the timeout = 0, You can not generate the strings like "ABBA" or "hello" (that is, those where a row followed by two identical characters or two characters that belong to the same event).
e) In the "Numpad" mode serves timeout to something else - to confirm the end of the input digits. Exit entry can also make through the event "Enter". If the timeout is set to 0, it is "Enter" mandatory.
f) In mode "SingleKey" works timeout similar to SMS. Timeout stopped entering characters, and because it is a "SingleKey" mode, generates the event immediately. Action "Enter" can hasten the generation of events. You can also set timeout = 0. Then "Enter" is the mandatory action. Before the expiry timeout may be triggered only the same event, which launched a timeout. If is triggered another, it is deemed confusion and ends with action. This can be compared to the action "Cancel". No event is thus generate and again is the "idle state".
g) CapsLock behaves as a Caps Lock in your PC, but automatically switches off after generating events and going to idle state. Only works in the "SMS" mode.
h) When you choose "Generate event as suffix" Event name may be empty. In this case, the event looks like this: "Multitap.hello" (instead for example "Multitap.SMS.hello"). In the case "Generate as payload" is filling of name "mandatory". Otherwise, the event looks (instead 'Multitap.SMS u"abba"') like this: 'Multitap. u"abba"' (it works but also).

But still I have a feeling that this is not exactly it. It is quite misleading to users of the fact that certain parameters must be (particularly the name of the event) configured in several places and finally it will then apply only one (the first).

Pako
Attachments
Multitap_1.png
Multitap_2.png
Multitap_2.png (2.08 KiB) Viewed 16610 times
__init__.py
Plugin Multitap, versin 0.1.0
(13.3 KiB) Downloaded 504 times
Last edited by Pako on Sun Jul 05, 2009 9:52 am, edited 3 times in total.

User avatar
Bitmonster
Site Admin
Posts: 2239
Joined: Mon Feb 06, 2006 10:28 pm

Re: Multitap

Post by Bitmonster » Thu Oct 09, 2008 6:56 pm

I will try it later but just as an info:
You can put any new plugin into the SVN trunk and then post a link here to the SVN repo. So you only have to commit new versions and users here can always get the latest version through the same link. But to avoid the inclusion of the plugin in the current beta installers (as long as this is really experimental), add a file with the name "noinclude" (no extension) to the plugin folder. My installer-create-script will then ignore it.
Please post software-related questions in the forum - PMs will only be answered, if really private, thanks!

User avatar
Bitmonster
Site Admin
Posts: 2239
Joined: Mon Feb 06, 2006 10:28 pm

Re: Multitap

Post by Bitmonster » Thu Oct 09, 2008 7:27 pm

Well, for the first version it looks very good. Just some (not very deep) thoughts so far:

- I like the idea to predefine the settings through a choice.

- I'm not really sure, if the Caps Lock mode should actually be handled by the plugin, or if the user should better implement it through separate folders and states. But I have to test this a bit more.

- One problem with the current design is, that you can't use multi-characters, like switching between "TV", "Music" and "DVD" as the result of a single button.

- Handling the different setups through different event names can really get a bit annoying to the user (a simple typo in the event name and all is fucked up). I think there are two possibilities to make this easier:
1. Defining the main result events in the plugin configuration and only allow the actions to choose the event through a choice. This would also allow to make some settings more global for the setup, like changing the timeout for all SMS keys for a particular result event.
2. Use of a wx.ComboBox in the action configuration, so the user can choose already defined events and define new ones. But therefore one would need a callback that would be called for every action item in the configuration, so you could examine all used event names. And currently we have no such hook.
Please post software-related questions in the forum - PMs will only be answered, if really private, thanks!

jsonnabend
Experienced User
Posts: 127
Joined: Wed Apr 23, 2008 7:35 pm

Re: Multitap

Post by jsonnabend » Fri Oct 10, 2008 1:22 am

Very nice work, Pako. I had done a similar thing with Python scripts, etc., but the plugin approach is certainly preferable.

- Jeff

User avatar
Pako
Plugin Developer
Posts: 2274
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: Multitap

Post by Pako » Fri Oct 10, 2008 6:30 pm

Bitmonster wrote:- I'm not really sure, if the Caps Lock mode should actually be handled by the plugin, or if the user should better implement it through separate folders and states. But I have to test this a bit more.
Caps Lock after every generation of events automatically switch to off and does not affect the work of the plugin. I think it is not possible that the plugin was used at any one time more than once. Therefore it is in order.
Bitmonster wrote:- One problem with the current design is, that you can't use multi-characters, like switching between "TV", "Music" and "DVD" as the result of a single button.
Oh. This is due to the fact that I am not understand how you mean. I have previously thought to be working as a system of "Single Key". How would therefore be? Perhaps as follows:
User presses key once -> event = Multitap.OneKey.TV
User presses key twice -> event = Multitap.OneKey.Music
User presses key thrice -> event = Multitap.OneKey.DVD
I understand now right already? How many options should be maximum?
Bitmonster wrote:1. Defining the main result events in the plugin configuration and only allow the actions to choose the event through a choice. This would also allow to make some settings more global for the setup, like changing the timeout for all SMS keys for a particular result event.
It reminds me a little solution that I proposed in our discussion to plugin "Virtual Notepad". But I think it really do. :)
Bitmonster wrote:2. Use of a wx.ComboBox in the action configuration, so the user can choose already defined events and define new ones. But therefore one would need a callback that would be called for every action item in the configuration, so you could examine all used event names. And currently we have no such hook.
Could be solved by saving configuration to a text (or XML) file, but not to me better than the first idea.
Pako

User avatar
Bitmonster
Site Admin
Posts: 2239
Joined: Mon Feb 06, 2006 10:28 pm

Re: Multitap

Post by Bitmonster » Fri Oct 10, 2008 7:02 pm

Pako wrote:
Bitmonster wrote:- One problem with the current design is, that you can't use multi-characters, like switching between "TV", "Music" and "DVD" as the result of a single button.
Oh. This is due to the fact that I am not understand how you mean. I have previously thought to be working as a system of "Single Key". How would therefore be? Perhaps as follows:
User presses key once -> event = Multitap.OneKey.TV
User presses key twice -> event = Multitap.OneKey.Music
User presses key thrice -> event = Multitap.OneKey.DVD
I understand now right already? How many options should be maximum?
Yes, but actually there shouldn't be a limit of the options. Who knows, how many options the user actually wants?
Pako wrote:
Bitmonster wrote:1. Defining the main result events in the plugin configuration and only allow the actions to choose the event through a choice. This would also allow to make some settings more global for the setup, like changing the timeout for all SMS keys for a particular result event.
It reminds me a little solution that I proposed in our discussion to plugin "Virtual Notepad". But I think it really do. :)
Yes, but in the Numpad plugin everything was global. There is also an enhancement of this idea: Let the plugin only handle a single event and a single configuration set. Since plugins can be multiloaded, the user could add as many instances of the plugin as he needs different setups.
Pako wrote:
Bitmonster wrote:2. Use of a wx.ComboBox in the action configuration, so the user can choose already defined events and define new ones. But therefore one would need a callback that would be called for every action item in the configuration, so you could examine all used event names. And currently we have no such hook.
Could be solved by saving configuration to a text (or XML) file, but not to me better than the first idea.
Pako
Yes, I also prefer the first idea. Eventhough it came to my mind, that we already have such hook. The ActionClass.Compile(*args) method is called for every action on load. But you would also need a hook that is called on delete of the action instance to clean up the list. Much to complicated for this purpose.
Please post software-related questions in the forum - PMs will only be answered, if really private, thanks!

User avatar
Pako
Plugin Developer
Posts: 2274
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: Multitap

Post by Pako » Fri Oct 10, 2008 7:54 pm

Bitmonster wrote:Yes, but actually there shouldn't be a limit of the options. Who knows, how many options the user actually wants?
Well. Originally I thought that it is useless to have more than four options (who will remember more?). In this case, I would probably just did four text fields. But if without limit, then I could do a similar way as in my plugin "OS Menu" (not yet in SVN).
OSMsample.png
OSMsample.png (5.89 KiB) Viewed 16517 times
Do you agree?
After all - a similar way could solve the multi-fold configuration plugin (the idea of many instances of the plugin in this case I do not see good). But I have to consider. In the meantime, to leave it.

Pako

User avatar
Pako
Plugin Developer
Posts: 2274
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: Multitap

Post by Pako » Sun Oct 12, 2008 8:46 pm

I have already decided. Doing so, the greater part of the work I have done. When it is not satisfactory, I will rework it again.
Dialogs now look as follows:
Multitap-plugin.png
Multitap-key.png
Pako

User avatar
GBWebmaster
Experienced User
Posts: 114
Joined: Wed Sep 24, 2008 5:34 am
Contact:

Re: Multitap

Post by GBWebmaster » Wed Oct 15, 2008 6:06 am

Hello Pako,
where do I get the new version of your PlugIn?

GBWebmaster
Für den, der nie das Rudel anführt,
wird sich die Aussicht nicht ändern.

User avatar
Pako
Plugin Developer
Posts: 2274
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: Multitap

Post by Pako » Wed Oct 15, 2008 1:57 pm

Hi GBWebmaster !
GBWebmaster wrote:Hello Pako, where do I get the new version of your PlugIn?
I just finished it. You can find it here. This version meantime has no OSD, but I assume that it will be implemented.
Pako

User avatar
GBWebmaster
Experienced User
Posts: 114
Joined: Wed Sep 24, 2008 5:34 am
Contact:

Re: Multitap

Post by GBWebmaster » Wed Oct 15, 2008 7:11 pm

Hello Pako,
I try to work with the Multitab, but it's not possible for me. The error log calls:

MceRemote.Num0
Multitap: Numpad.0
Multitap: Numpad.0
Fehler in Befehl: "Multitap: Numpad.0"
Traceback (most recent call last) (1480):
File "C:\Programme\EventGhost\eg\Classes\ActionClass.py", line 157, in CallWrapper
File "C:\Programme\EventGhost\plugins\Multitap\__init__.py", line 116, in __call__
File "C:\Programme\EventGhost\plugins\Multitap\__init__.py", line 549, in Multitapper
NameError: global name 'timeout' is not defined
Multitab config1.jpg
Multitab config2.jpg
What's wrong? I want to type the Number "222" for my event "222".

GBWebmaster
Für den, der nie das Rudel anführt,
wird sich die Aussicht nicht ändern.

User avatar
Pako
Plugin Developer
Posts: 2274
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: Multitap

Post by Pako » Wed Oct 15, 2008 8:55 pm

Thank you for reporting bug. Has been only in set the timeout = 0.
On the same site you can download a corrected version (0.1.2).
Pako

User avatar
GBWebmaster
Experienced User
Posts: 114
Joined: Wed Sep 24, 2008 5:34 am
Contact:

Re: Multitap

Post by GBWebmaster » Thu Oct 16, 2008 5:53 am

Hello Pako,
now it works. Very good job, really. Thank you.

GBWebmaster
Für den, der nie das Rudel anführt,
wird sich die Aussicht nicht ändern.

User avatar
Pako
Plugin Developer
Posts: 2274
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: Multitap

Post by Pako » Sun Oct 19, 2008 2:01 pm

I made OSD plugin for Multitap.
He looks like this:
Multitap-OSD.png
Multitap-OSD.png (9.12 KiB) Viewed 16339 times
Was also added action Back Space.
It is very difficult to do a complete test. It is therefore quite likely that there will be bugs. Please test it and bugs report here!
In the plug-in is added option "Use own OSD":
Multitap-dialog.png
Pako

User avatar
Pako
Plugin Developer
Posts: 2274
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: Multitap

Post by Pako » Mon Oct 20, 2008 5:54 pm

New version (0.1.4) available - fix bug (Action "Enter" with empty buffer).
Pako

Post Reply