Slashdot Log In
Mouse Gestures in Javascript
Posted by
michael
on Fri Nov 21, 2003 09:23 AM
from the twitchy-finger dept.
from the twitchy-finger dept.
christodd writes "I have become big fan of mouse gestures, a feature included in Opera, Mozilla, and MyIE2. There's even a plugin for IE. Other programs like StrokeIt and Cocoa Gestures are also based around the concept. I can't believe nobody else has thought of this before, but what about mouse gestures in javascript? Turns out that it is incredibly simple to implement, and really handy for those 'feature incomplete' web browsers. Unfortunately, for the total user experience, we'd have to upgrade the whole internet..."
This discussion has been archived.
No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
Full
Abbreviated
Hidden
Loading... please wait.
FVWM (Score:4, Informative)
KICKS ASS. [fvwm.org]
Browser Level == Better (Score:5, Interesting)
(mo: Don't invent the wheel: we have it already)
The problem I forsee with the jscript use, is a misuse of the mouse gesture jscripts by unethical sites. Because it's the planet Earth, and The Internet, half of the sites will impliment this correctly, the other half will use it as a joke, or for annoying adverts (browser interstitials) and thus cause the whole thing to be crap.
If it's at a browser level, websites can't fuck with it. So ideally, browsers will want to add the ability to block javascript mouse control, and promptly add this cool feature at a browswer level. I'm all for the idea of mousegestures, but I'm against the ability to tell a website to fuck off using them. (mo: KISS).
Re:Browser Level == Better (Score:3, Funny)
var calls=new Array();
calls['left']='launchAd()';
calls['lef t ->up']='launchAd()';
calls['right']='launchAd()';
calls['up->down']='launchAd()';
calls['up']='la unchAd()';
calls['up->left']='launchAd()';
calls ['up->right']='launchAd()';
calls['down']='launch Ad()';
calls['down->up']='launchAd()';
calls['do wn->right']='launchAd()';
calls['down->left']='la unchAd()';
function launchAd() {
newWin=window.open("http://www.adserver.com/ad. html", "Buy my
Re:Browser Level == Better (Score:5, Interesting)
I think that is the problem with Jscript full stop. why netscape thought it a good idea to allow any site an almost arbitrary level of control over my browser is beyond me.
The idea of doing mouse guestures or any other browser extension in JScript, except as a demo is idiotic. The whole value of these systems comes from consistency. Apple do know some things about UIs, the value in the Apple UI is that every program work the same way and you don't have to spend lots of time relearning.
If I go to one site that has mouse guestures and then another that does not or worse implements them a different way ... yuk!
But back to the original issue, Jscript sucks. The command set should be partitioned according to the security considerations. Popping up a window has a significant security impact, it can be used to launch a trojan. The toolbars on the browser window are my toolbars, no web site should be able to disable them.
I use the feature of IE that allows Jscript to be turned off by default and enabled selectively site by site. But this is not as effective as it could be because you often come across idiotic sites using jscript for everything - including navigation. The idea being to force the site designers idea of a user interface down the user's throat.
Parent
Why'd they do it? Money. (Score:3)
It's 1994. The top of the line computers are 66Mhz. You want to market a server product that allows people to serve thousands of computers, without requiring super big iron support. You have a client program (Netscape Navigator) to go with your server product (Netscape webserver). Suddenly, it becomes clear to you -- distributed computing. Have the client side do some of the heavy
Reread what I wrote. (Score:3, Informative)
"(such as making web forms "smarter" about doing a first check before submitting it [since it costs more CPU/transfer time for the server to do it, this saves modem users the pain of a typo returning an error page],"
I did not say "Don't ever check on the server side." I said, "additional checking which allows users on slow links to not be punshed for typos that can be corrected by a little client-side scripting."
More checks are bet
Re:Smart forms... not for doing input checks (Score:3, Insightful)
This could all have been handled much better with a declarative constraint based forms validation extension. Then the features you describe above could be built into the browser where they belong rather than being invented differently on every damn web site.
In other words == mo (Score:3, Funny)
Rather than say ie, which is a sick twisted way for Microsoft boobs to get in my head, I replace it with mo, for Mozilla. It doubles for the term modus operandi, but in a kind of twisted way to mean "in other words", or the "specific meaning".
Okay you can all laugh at me now.
Re:In other words == mo (Score:5, Informative)
The two aren't particularly equivalent - i.e. is short for id est - meaning "that is", or "that is to say".
Modus operandi, on the other hand, means "the way of working", not really applicable in your message.
Don't let Microsoft make you misuse your Latin abbreviations.
</pedant>
Parent
Re:In other words == mo (Score:4, Funny)
What the hell kind of pedant uses HTML 4 syntax? Quote all of your attribute elements! And don't forget your doctype either
Parent
Insert code with proxy... (Score:5, Interesting)
Oh yay! (Score:3, Insightful)
Re:Oh yay! (Score:5, Interesting)
Really annoying.
Parent
Re:Oh yay! (Score:2)
I'm not sure if you meant that as a joke or not, but I always have Javascript enabled. Lots of very useful things can be done with it. I've never had a problem with annoying features being used. I'd be interested to know why you see it as a bad thing.
Re:Oh yay! (Score:5, Insightful)
And worst of all, blocking the right mouse button (or as I like to call it, "the button i use to navigate the fucking internet") in the name of "copyright protection." Every time I see this monstrosity, I download all of the images from the site, stick them in a zip file, and email it to the webmaster. "Your copyright protection didn't work. Neither did the mouse button I use to open links in a new window. One of these things can be easily fixed."
Parent
Re:Oh yay! (Score:3, Interesting)
First off, see the comments above regarding accessibility and the hurdles it causes for accessibility.
Second, don't tell me (or xSquaredAdmin) how my browser should or should not be configured. That's one of my biggest pet peeves; seeing sites that say, for example, "Best viewed at 800x600 resolution on Internet Explorer." As if I'm going to tailor my sys
Re:Oh yay! (Score:4, Insightful)
-- Hiding the real URL of a link as the mouse hovers over it. Real useful. Thanks.
-- Drop down menus. There are plenty of ways that do this without hiding the submenues from browsers used by the handicapped. Check into CSS (or even plain HTML!) for alternatives.
-- Opening/resizing/closing browser windows. I've got the capability of doing that myself, thanks. If I want to open it within a new tab, this "feature" prevents me from doing that.
-- Playing MIDI files while I view photos of your pet dog. AAaaaaiiieeeeeeee! (that's me screaming as I hit Alt-F4.)
Now that we have those out of the way, I admit that there are some useful features. However, for each feature, there are alternatives that, in my mind, provide just as good or better ways to do it. The potential for abuse is too great, and some browsers provide too few abilities to limit abuse while retaining the usefulness. Mozilla and Privoxy in combination are doing a decent job for me for now.
In effect, your second statement is what I'm saying by simply "Voting with my Back Button." If your web site annoys me, sometimes I'll give you the courtesy of emailing to tell you why I moved on. More often, I'll just silently move on.. and my $$$ goes somewhere else than feeding your progeny.
Its hard to make something foolproof; fools are so ingenious! The advertisers/spammers will always figureout someway to screw it up..
Parent
Re:Oh yay! (Score:5, Insightful)
Six months ago, I thought JavaScript was a joke, a toy scripting language that just pretended to have real capbilities. I am now FIRMLY convinced that JavaScript may well be the MOST important asset that we have in opposing anyone's efforts to take over, control, or "proprietize" the web, as Microsoft and Macromedia are rolling ahead to do, with
Several reasons why I think JavaScript is the best choice for much app development today:
If you still think JavaScript is a steaming pile, commit to spending a few dozen hours cheking out what it can *really* do before giving up on what may well be the best hope for the open, interoperable future that is of the greatest benefit to us all.
Parent
Re:Oh yay! (Score:3, Insightful)
No, actually what you can count on, is that a helluva lot of us have it disabled. Why? Because:
(1) it is used for pop-unders, on-close pop-ups, taking control of the browser, changing my home-page, adding crap to my links, and other annoyances.
(2) because in reality it's not needed. I know that to every clueless manager and newbie web designer, it may look like "hey, cool, we can make our site an exciting experience." In practice, most of us _don't_ want an exciting experience, we just want a comfortabl
Gestures == Handy (Score:2, Interesting)
In the world of a clumsy third button on the mouse, it's a little stickier. Handy goodies, is about time someone cooked up the same ideas in a more 'portable' form.
Accessability (Score:5, Insightful)
It would be nice if, for once, web technology was developed that made content more accessable to people with disabilities instead of less.
Re:Accessability (Score:3, Informative)
RSI (Score:4, Insightful)
In general I don't have much sympathy for RSI sufferers. (I was going to put sufferers in quotes, but thought better of it
I use a keyboard something like 8 hours a day, and have done for the last 15 years, programming computers. If anyone is a prime candidate, it's me, and no RSI as yet. On the other hand, I'm reasonably careful - I don't hammer the keyboard, and I try to rest all my forearms on the desk in front of the keyboard. Sensible things to minimise the effect... unlike "gestures", which are just a disaster waiting to happen, IMHO.
Simon
Re:RSI (Score:3, Interesting)
Granted, Maya can be an incredibly complex interface, with common tools appea
You're right, but you're self-righteous (Score:4, Informative)
You're right that these "gestures" we're talking about do sound like exactly what the medical literature says causes RSI problems. Wrist-turning moves, over and over, are the basic cause of computer-related RSIs.
But your sample of one is a crock when it comes to dismissing everyone who has pain from this. Extremely useful "knowledge," that -- except all it does is arm you to dismiss other people and feel smug about not having been unlucky yourself. I used to work in bookstores in college, and some of the older clerks had RSI pain from shelving. Not something they were privileged to avoid in their jobs.
To think people are submitting articles to JAMA (003 Jun 11;289(22):2963-9 -- "Computer use and carpal tunnel syndrome: a 1-year follow-up study") trying to figure out whether carpal tunnel is associated with keyboards or mice or a combination. All we had to do was ask you and you could tell us it was a matter of being "reasonably careful." (Note -- those are quotes.)
Hey, guess what that study (and others) have indicated? It's mouse use, not the keyboard, that seems to be a main culprit. RSIs from computer use are almost always related to wrist movement. Trackballs (with a wrist rest especially) seem to be less problematic. Hmm, maybe we could use this information to prevent other people from undergoing a lot of pain, encourage trackballs instead... Oh, sorry, we don't have any sympathy for those people, 'cause they injure themselves out of a lack of common sense. No need to publish medical recommendations to guide businesses in their purchasing, for example. Morons. Let 'em "suffer."
Parent
Re:RSI (Score:2)
I'm not generally callous. I just think most of it is self-inflicted. I don't have much sympathy for people who stab themselves, either... "Soft git" would be a typical response...
Simon.
Is that site supposed to be a demo? (Score:3, Flamebait)
Re:Is that site supposed to be a demo? (Score:2)
Pie menus (Score:5, Interesting)
-russ
Re:Pie menus (Score:4, Informative)
Browsing just doesnt feel right without it
Parent
KDE 3.2 (Score:3, Informative)
Why this is stupid. (Score:5, Interesting)
If you depend on every web page to implement mouse gestures, then you'll get this effect from page to page while you're browsing! It would be annoying to no end. And it's not an easily visible thing you can check for, unless each web page also uses some kind of cheesy "Gestures Enabled" logo. And each site might implement it differently, so that strokes mean different things from page to page. I repeat: stupid idea.
A user interface tool should be just that: part of the user interface. Just like a keyboard or mouse, gestures take time to become accustomed to. A user interface feature needs to act the same way no matter what you're doing.
Re:Why this is stupid. (Score:3, Insightful)
It will be the final straw that kills Javascript (if this becomes slightly popular), as people will turn off Javascript in order to take back control of their user interfa
Re:Why this is stupid. (Score:4, Insightful)
Parent
My first ooops... (Score:4, Informative)
My first ooops with javascript gestures: I tried to select/copy the text to send it to a few pals so that in case (more like when) it get's slashdotted they can read it. I selected the text at the top, pulled down and to the right, and the window closed (as it should).
It only took a few seconds to notice the status bar at the bottom which indicates if a gesture will be activated when you release the click... keep an eye on that when using using these. You can see if the gesture is 'blank' = it's not going to run an action. Quite handy, pretty cool. I've already grabbed the
Actually... (Score:5, Informative)
Eh... So *web developers* decide the gestures? (Score:2)
How would we know what they think is a useful mouse gesture? I'd hate to accidentally move the mouse up, and then down in a "gesture" to suddenly have the product pages of some company open.
If we don't decide what gestures are available and can apply them to all sites like a standard, then what's the point with them?
That's about as stupid to me as letting web developers decide which kind of keyboard shortcuts to use to browse web pages.
Just another bad idea, every way you look at it. (Score:2)
- It wastes bandwidth, every page using it would need a copy of this Javascript snippet (or linked to a
There are good uses for javascript (example [rahga.com]), where bandwidth can be saved and the user experience gains a net improvement. This, however, is just another bad use.
I personally find it aggravating... (Score:2)
Second, the whole idea behind shortcuts and such is that every user has their own familiar shortcuts. If you just launch a site, you can't assume they've defined the mouse gestures/shortcuts that you use... so why would you use them anyways?
Also, I'm just wondering ab
Re:I personally find it aggravating... (Score:3, Insightful)
And as I've asked before, is a virus written in C++ a reason why C++ should be retired?
It's been done! (Score:3, Funny)
A quick search through the USPTO database shows that in fact Amazon has already claimed the mouse-gestures patent, specifically referencing Javascript. Not only that, but they've also patented the one-gesture purchase, apparently to be implemented on their site at some point in the future.
It doesn't stop there, however. IBM claims that they patented this back in the 1980s, but didn't specifically mention a mouse but rather a generic input device. And SCO, in one of their counterclaims, says that gestures are part of the original UNIX and that in fact there are over a million instances of copyright infringement in both IBM and Amazon's patent filings.
And, if only that were the end of it. Disney has jumped into the fray with claims that Steamboat Willie has mouse gestures in it, reducing this to a boiling cauldron of copyright, patents, and trademark issues.
Perhaps the author of the Javascript code should look more carefully into possible IP infringement issues before posting what amounts to a boast on Slashdot about how novel and clever they've been.
Hope this helps.
No, no, no, no, no. STANDARDS. (Score:5, Insightful)
Repeat after me:
"Web Standards."
It belabors the obvious to point out that this will never be implemented my more than a tiny fraction of sites, that it actively interferes with normal point/click/drag behaviors (like highlighting text? click, drag left->right?) and that learning PER-SITE navigation is simply ridiculous.
It's not that no-one's thought of it before, it's that it's a bad idea on the face of it.
Gestures... I don't get it (Score:4, Insightful)
View Source - Left-Down-Right-Down-Left (draw a squarish S)
Is right-clicking and choosing "view source" such a chore that you'd rather draw "S" shapes instead?
Reload (bypass cache) - Up-Down-Up
I dunno, pressing "F5" always seemed to work for me.
Personally I think the obsession with mouse gestures boils down to the typical geek fascination with things that, impractical and useless they may be, are just "exciting" for some reason.
Hey look, Slashdot implemented gestures.
Submit post - Left-Right-Up-Down-Down-Down-Up-Left-Down-Right-U
You're right, you don't get it. (Score:3, Informative)
I can't speak for Moz, as I haven't used it with gestures much, so this is Opera-related:
I'll tell you why mouse gestures rule. Page navigation. I tend to flip back and forth between pages a LOT, especially on sites like Slashdot. Click into a story, check out some comments, read a sub-comment, go back to the main story comments, go forward to see if
Stupid. (Score:3, Interesting)
- Rockers: Hold one button, press other to perform action
- Wheel rockers: Hold a button and rotate wheel to perform action
- Custom gestures: You don't like some? Remove it! You'd prefer it done otherwise? Modify assignment. You have a new amazing idea? Write it, bookmarklet style in "custom gesture" field. Pissed off with LMB disturbing with selection? Switch to RMB!
Plus for those who protest against "flick of wrist" - I think moving your hand 2mm left to launch "back" is less stressing than moving it 5cm, to reach the "back" button.
Problem: Performance. With multiple heavy pages opening, on average hardware, it slows down seriously and sometimes gestures don't get recognised.
"next page" tag in HTML? (Score:3, Interesting)
HTML and all its extensions should focus on providing the document's contents and structure. The method of navigation is entirely up to the browser application, and should not be decided by the web designer.
Re:"next page" tag in HTML? (Score:4, Interesting)
Parent
Re:... uses? ... (Score:2, Funny)
Re:... uses? ... (Score:2)
I use them in Opera...
Actually I only really use the ones for 'refresh page', 'duplicate page', 'back' and 'forward'... these being things that you frequenly want to do while browsing, and mouse gestures are noticably quicker than reaching for the keyboard or manipulating a menu...
Re:how do i use the gesture (Score:2)