Mouse Rocker Navigation

Talk about add-ons and extension development.
lynchknot
Posts: 6253
Joined: November 4th, 2002, 7:36 pm

Post by lynchknot »

LOL! Flii, I have a little computer buddy too. He will snooze on my shoulder for hrs. Then he'll fly home to go eat or take a bath and fly right back on my shoulder. He snuggles up to my neck and keeps me warm.

http://lynchknot.lazydesert.net/buddy.jpg
User avatar
JC
Posts: 206
Joined: November 4th, 2002, 7:39 pm
Location: California

Post by JC »

Great idea but it has some bugs. I've noticed that after going back a page it seems to always believe that the right mouse and left mouse buttons are still pressed. So when you press the right one it goes forward again and when you press the left one it goes back. Once this is fixed it should work great. :)
User avatar
RAF
Moderator
Posts: 12609
Joined: November 5th, 2002, 2:19 pm
Location: .nl

Post by RAF »

Can't you teach Sam to hold your Control-key? :wink:
User avatar
flii
Posts: 2208
Joined: November 6th, 2002, 11:29 pm
Location: hickville, south dakota
Contact:

Post by flii »

RAF wrote:Can't you teach Sam to hold your Control-key? :wink:

i could try, but i think he's male...

lol ok sorry about that. that was for stephan, not you. ;) the problem with sam is that he likes to totally lay over <b>all</b> of the keyboard, and he keeps pressing all the keys down, which can really mess you up when you have to type around him and he's hitting all the keys he's laying on anyway. when he was little, he could run across it and jump right down to the floor, where he would promptly try to run away... ok i'm getting ot. anyway, i don't think he wants to give up the whole keyboard for just one key, otherwise i might try it. :-P
User avatar
thenightfly42
Posts: 983
Joined: November 5th, 2002, 8:03 am

Post by thenightfly42 »

I suggest we rename "Phoenix" to "Sam the Bearded Dragon".
(D'oh!, wrong forum again. Perhaps I'll make a poll... ;))
Ted Mielczarek
Posts: 1269
Joined: November 5th, 2002, 7:32 am
Location: PA
Contact:

nothing to do with bearded dragons

Post by Ted Mielczarek »

The problem with my mouse rocker navigation extension is that it is missing mouseup events when the new page is loaded. If I can't get all these events, I can't track the state of the mouse buttons. Mouseup and mousedown events only give the button that was pressed, not the state of all buttons. Does anyone know of a way to query the state of all mouse buttons from javascript in Mozilla? Without this, this extension is not going to work.

Any info is appreciated.
clav
Posts: 1974
Joined: November 5th, 2002, 3:25 am
Location: Lancaster, UK
Contact:

Post by clav »

could you not use some global variables, one for each mouse button. set them true when the relevant button is pressed down, false when it is released, and then look at the state of these variables to know which buttons are currently pressed.

that's approximately what i did when writing Minesweeper in javascript for Moz, because i needed to test for both buttons being clicked together.
Ted Mielczarek
Posts: 1269
Joined: November 5th, 2002, 7:32 am
Location: PA
Contact:

Post by Ted Mielczarek »

clav wrote:could you not use some global variables, one for each mouse button. set them true when the relevant button is pressed down, false when it is released, and then look at the state of these variables to know which buttons are currently pressed.

that's approximately what i did when writing Minesweeper in javascript for Moz, because i needed to test for both buttons being clicked together.


That's exactly what I'm doing, but unfortunately it misses the mouseup event if you release while the page is loading during the forward/back. It kinda screws everything up.
mboullet
Posts: 337
Joined: November 5th, 2002, 2:34 am
Location: France
Contact:

Post by mboullet »

Ted,

I have "slightly" modified your source and it works great. I'll send the new source to your private email.
Marc
mboullet
Posts: 337
Joined: November 5th, 2002, 2:34 am
Location: France
Contact:

Post by mboullet »

That you hide !!!!!
Marc
Ted Mielczarek
Posts: 1269
Joined: November 5th, 2002, 7:32 am
Location: PA
Contact:

haha

Post by Ted Mielczarek »

cool, you can send it to luser_mozilla@perilith.com

looking forward to seeing what you did.
Ted Mielczarek
Posts: 1269
Joined: November 5th, 2002, 7:32 am
Location: PA
Contact:

Post by Ted Mielczarek »

mboullet wrote:Ted,

I have "slightly" modified your source and it works great. I'll send the new source to your private email.


Hmm, it feels a bit slower than the original, but it works fine. I'll stick the new xpi up and let people play with it.

http://ted.mielczarek.org/code/mozilla/rocker.xpi

Try it out and see what you think.
User avatar
mesostinky
Posts: 215
Joined: November 4th, 2002, 10:44 pm
Location: NJ

Post by mesostinky »

It seems to work fairly well so far. Good job.

" This will probably all be obsolete for those of you with new intellimice once that back/forward buttons patch gets checked in, but it's neat anyway. "

Actually that only applies to MS Windows, this will still be very useful for Linux users because that fix doesn't apply to them yet.

BTW I assume this doesn't work on Mozilla? Do you think you could get this working on Mozilla?
Tresni
Posts: 15
Joined: December 7th, 2002, 10:20 am
Location: Boise, Idaho
Contact:

Post by Tresni »

It does feel a bit slower, but it also seems to be working better. The buttons states don't get locked (and I've tried to lock them :) This is a really neat extension!
"Encouraging innovation through laziness for a better tomarrow."
shimage
Posts: 129
Joined: November 5th, 2002, 3:39 am

Post by shimage »

Tresni wrote:It does feel a bit slower, but it also seems to be working better. The buttons states don't get locked (and I've tried to lock them :) This is a really neat extension!

hrm. they still get locked on my computer. and i've been trying not to lock them...
edit: hmm. nevermind. it seems to be conflicting with one of my other extensions. i'm not sure which one it is, though.
Post Reply