Mouse Rocker and Mouse Gestures

Talk about add-ons and extension development.
Post Reply
maubp
Posts: 281
Joined: December 5th, 2002, 12:36 pm
Location: UK

Mouse Rocker and Mouse Gestures

Post by maubp »

Just noticed this,

Ted Mielczarek's Mouse Rocker extension offers back and forwards navigation using the left and right mouse buttons (hold one, press the other). Like Opera.

Now, the latest version of Optimoz's Mouse Gestures includes this as well, they call it Rocker Gestures.

http://optimoz.mozdev.org/gestures/installation.html

Last night I installed Mouse Gestures Version 0.3.5 Release Candidate on Mozilla 1.2.1 to test the "Rocker Gestures" and it seems to work fine (I turned off the mouse gestures). I have not tried in on Phoenix yet.

Personally, I don't like gestures, so I use just Ted's extension on Phoenix.

P.S. Does anyone know if Ted Mielczarek's Mouse Rocker extension works on Mozilla?
Peter
User avatar
ehume
Posts: 6743
Joined: November 17th, 2002, 12:33 pm
Location: Princeton, NJ, USA

Post by ehume »

WFM. Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3a) Gecko/20021228 Phoenix/0.5.

Thanks for the heads-up. This works instantly. Ted's rocker gestures pause before they go.
TD
Posts: 79
Joined: December 3rd, 2002, 7:47 pm
Location: New Zealand

Post by TD »

Could someone make an improved standalone mouse rocker plugin? I don't want to have to install the whole optimoz plugin just for that one little part.

---
Beware of Expensive ToiletDuck.
User avatar
ehume
Posts: 6743
Joined: November 17th, 2002, 12:33 pm
Location: Princeton, NJ, USA

Post by ehume »

A few hours ago I installed mozgest_0_3_5.xpi over my previous mozgest.xpi and immediately began enjoying the mouse rocker function.

A few minutes ago I wiped out my Px installation and reinstalled build 2002-11-28. I then tried to reinstall mozgest_0_3_5.xpi. It wouldn't install. Then I reinstalled mozgest.xpi. Mouse gestures but no mouse rocker. Now I tried reinstalling mozgest_0_3_5.xpi on yop of mozgest.xpi again. Mouse rockers are back.

So: first install Mouse gestures from the old Px extension installation page at http://www.mozilla.org/projects/phoenix/extensions/ (if you view the page source you can get at the file without the installtrigger function; copy the url from the html file, paste ito into an addressbar and download; then you can install it from your hard drive any time you like).

Then: install Mouse Gestures 0.3.5 from the Mouse Gestures project page at http://optimoz.mozdev.org/gestures/installation.html . You get all the features that way.
Last edited by ehume on January 8th, 2003, 9:59 pm, edited 1 time in total.
maubp
Posts: 281
Joined: December 5th, 2002, 12:36 pm
Location: UK

Post by maubp »

TD wrote:Could someone make an improved standalone mouse rocker plugin? I don't want to have to install the whole optimoz plugin just for that one little part.

I emailed Ted at the weekend to let him know that Mouse Gestures now did rocking. I also asked him to keep supporting "Mouse Rocker" for people like you and me who don't like Mouse Gestures.

Fingers crossed.
Peter
maubp
Posts: 281
Joined: December 5th, 2002, 12:36 pm
Location: UK

Post by maubp »

Thanks for your post ehume - have you told the Optimoz people about this problem?
Peter
User avatar
JC
Posts: 206
Joined: November 4th, 2002, 7:39 pm
Location: California

Post by JC »

Thanks for your post! This works awesome.
User avatar
ehume
Posts: 6743
Joined: November 17th, 2002, 12:33 pm
Location: Princeton, NJ, USA

Post by ehume »

maubp wrote:Thanks for your post ehume - have you told the Optimoz people about this problem?
I left a comment on their website. I don't know what else to do. I like having the rockers and the gestures, though.
Ted Mielczarek
Posts: 1269
Joined: November 5th, 2002, 7:32 am
Location: PA
Contact:

Rocker

Post by Ted Mielczarek »

I really haven't done much with the Mouse Rocker extension, since I don't actually use it. :) If I get free time I'll have a look at it. I know that it has a pause before acting, and it kinda sucks, but it was needed to make it work right. I originally based my implementation on the mozgest code, but it's been modified since. I may have another look at how they do it, and see if I can't make mine better. Glad to see some people using it.
maubp
Posts: 281
Joined: December 5th, 2002, 12:36 pm
Location: UK

Post by maubp »

Thanks Ted, we can't really ask for more than that.

By the way, with your "Mouse Rocker", if you want to go back twice (or N times) then all you need to do is:

1. Right Mouse Down
2. Left Mouse Down, Left Mouse Up (i.e. click left mouse)
3. Repeat step 2 to go back again
4. Right Mouse Up

Does anyone know if Opera supports this handy "short cut" for mutliple backs or forwards?

I think I read that this doesn't work in "Mouse Gestures", you have to do this:

1. Right Mouse Down
2. Left Mouse Down, Left Mouse Up (i.e. click left mouse)
3. Right Mouse Up
4. Repeat steps 1, 2 and 3 to go back again
Peter
rafique
Posts: 30
Joined: January 19th, 2003, 2:45 am
Location: Middle Of Nowhere, the center of Everywhere

Post by rafique »

> <i>Does anyone know if Opera supports this handy "short cut" for mutliple backs or forwards?</i>

It does.

Frankly im a bit surprised that the mozgest version doesnt work this way. The way i see it (from a recreational programmers viewpoint :), the only sensible way of coding this "rocker" functionality would automagically provide this "handy short cut". Very simply, for going backwards the program should, upon the user pressing the left mouse button, check to see if the right button is also being pressed and if so go back, vice versa.

But the mozgest mouse rocker is stranger than that. Sometimes clicking the two mouse buttons independently of each other, that is for ex left-mouse-down, left-mouse-up, right-mouse-down, right-mouse-up, will make the browser go back/forward. Ive noticed other oddities as well.

Now, i know that whining about stuff like this in here probably wont help alot, and that i should take my complaints to the mozgest developers directly, but to tell you the truth i dont have much trust in people who cant code something as simple as this :P

Admittedly, i know exactly nothing (zarro?) about how these extensions are created and how they interface with the rest of phoenix, and perhaps things arent as simple as i assume. Ive tried to gather info but without any luck, so if anyone can explain or point me to an explanation of the nature of extensions, id be a very happy, whining-poster.

If i find any documentation i will probably try making my own "mouse rocker", cos after using opera for a couple months im absolutely addicted. Actually i was addicted virtually from day one, and quickly found myself getting frustrated trying to "rock" my way through phoenix, acrobat, windows explorer and goD knows what else :D.

Hope this opera sales talk didnt scare you off -- oh well im done anyway =)

(phew)
mboullet
Posts: 337
Joined: November 5th, 2002, 2:34 am
Location: France
Contact:

Post by mboullet »

rafique wrote:> <i>Does anyone know if Opera supports this handy "short cut" for mutliple backs or forwards?</i>

It does.

Frankly im a bit surprised that the mozgest version doesnt work this way. The way i see it (from a recreational programmers viewpoint :), the only sensible way of coding this "rocker" functionality would automagically provide this "handy short cut". Very simply, for going backwards the program should, upon the user pressing the left mouse button, check to see if the right button is also being pressed and if so go back, vice versa.


As a co-author of the "Rocker Extension", I can explain a little bit about that.
There is no way to know the status of a mouse button through the DOM. The only things
an extension can receive are events. Obviously, if you receive all events, the status can be
derived quite easily. Unfortunately, when a page is loading, Gecko flushes out its pending
events (bug or feature: Who knows?".

Now examine the following scenario:
Right button down, left button down, left button up, right button up.

In the mouse rocker extension, when the left button up event is fired, the previous page is loaded. If the "right button up" occurs while the page is loading, this event is lost.

We are now in the situation where the right button is up but we still believe it's down.
If the user makes another left click (for example to follow a link), we will we go
backwards another time because we still think the right button is down.

You can get rid partly of this synchronization problem by assuming that a mouse up
has been missed when a mouse down is received and our software status of the button is still down.
But this doesn't solve the problem above.

On the other hand, Optimoz rocker gestures does not care about mouse up events.
The algorithm is quite simple:
If a mouse down event has been received and an opposite button mouse down event is received within a delay of 500ms, perform the gesture. The delay is used to prevent
recognizing rocker gestures when a mouse up has occured (e.g left button down,
left button up, right button down can only be interpreted as a gesture when you
perform all that in less than 500ms).

For me, it's very hard to use the optimoz rocker gesture. I push the right button when
I'm willing to start a gesture, then my brain orders "no regret" and my eyes scan the page another time, then I click the opposite button. Too late: no gesture !!!

So the deal is:
- Rocker gesture can get out of sync (a simple right click put it back in sync) but it behaves more like the user is expecting.
- Optimoz mouse rocking is simpler but a lot of rocking gestures are missed (at least by me) due to the delay problem.

In my all-in-one extension, I privileged the "do not go out of synch." and implemented an
optimoz like rocker gestures.
Maybe I will reverse that.
Marc
rafique
Posts: 30
Joined: January 19th, 2003, 2:45 am
Location: Middle Of Nowhere, the center of Everywhere

Post by rafique »

Ok Marc

While reading your informative reply to my rather smart-ass post, i felt a bit ashamed :oops: , so ill try and mobilize some manners this time...

First of all I totally see the problem as you describe it, and it leads me to a few questions:

1. Is it the same event queue that 'feeds' events to the web content that also 'feeds' the app code (XUL i presume) or are they seperate beings?

I can understand why it makes sense to flush the event queue for web content until page has loaded so as to start with a clean slate, but if these events are at the same time lost to the app code that is crazy.

2. Does anybody know if this is considered proper behavior or a bug?

3. Assuming the latter, has a bug thread been created? I would do a search except I have no clue what to search for.

Hmm... this has pretty much crushed my mouse rocker project before it even got started :| I dont see a way of coding this reliably with Gecko flushing mouse events down the toilet now and then, even if there was a way im sure you guys would have found it.

And im sad to say that neither the "rocker extension" nor the mozgest version satisfy my needs :| if you've ever tried operas version you'll know why.



...eh?
uhhuh?
...hmm

WAIT! goD has spoken to me -- "The Key of ALT and the Wheel that Scrolleth shall light your Path..."

Ahh
User avatar
andyed
Posts: 78
Joined: November 5th, 2002, 6:31 am
Location: Clemson, SC
Contact:

Bug Fixes in Optimoz Rocker Recognizer

Post by andyed »

There's a new RC2 3.5 optimoz XPI that fixes our Phoenix preferences issues and has some rocker fixes as well (http://mozdev.org/bugs/show_bug.cgi?id=2911, thanks Jens Bannmann).

Note, if you only want the rocker gestures, you can use preferences to set gestures to some obscure trigger like CONTROL-OPTION-RIGHT MOUSE.

We still don't support more than one back or forward operation, but patches are welcome (http://mozdev.org/bugs/show_bug.cgi?id=2973).
Post Reply