Slashdot Mirror


Mouse Gestures in Javascript

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

14 of 377 comments (clear)

  1. Browser Level == Better by dolo666 · · Score: 5, Interesting

    I'm all for the idea of faster, better, stronger ways of browsing. I happen to think that mouse gestures and browser level code should be based in the browser, and controlled by the browser. Like look at all the gestures you get with Mozilla.

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

    1. Re:Browser Level == Better by Zeinfeld · · Score: 5, Interesting
      The problem I forsee with the jscript use, is a misuse of the mouse gesture jscripts by unethical sites.

      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.

      --
      Looking for an Information Security student project suggestion?
      Try http://dotcrimeManifesto.com/
  2. Insert code with proxy... by KrispyKringle · · Score: 5, Interesting

    Or you could have your filtering proxy (like Proxomitron or Privoxy) insert the JavaScript code on every page. Though personally, I'd just use a browser that suppots it.

  3. Gestures == Handy by deadmonk · · Score: 2, Interesting

    I did something like this a dozen years ago for a CAD program - was seriously happy stuff. In that environment, it was excellent to have the common operations mapped to simple gestures that could be done anywhere on the screen.

    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.

  4. Re:Oh yay! by DeadSea · · Score: 5, Interesting
    I tried some of the mouse gestures on that page and they conflict with other things for which I use the mouse. For example, try selecting a paragraph of text on the page. It activates one of the mouse gestures causing the page to scoll.

    Really annoying.

  5. Pie menus by Russ+Nelson · · Score: 4, Interesting

    Actually ... mouse gestures are better implemented as Pie Menus.
    -russ

    --
    Don't piss off The Angry Economist
  6. Why this is stupid. by cybermace5 · · Score: 4, Interesting

    Honestly, it's a pretty stupid idea. Let me illustrate why: scroller mice. Once you get used to a scroll mouse, then you have to use a computer that just has a normal mouse, it's a major pain.

    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.

    --
    ...
  7. Re:... uses? ... by etully · · Score: 2, Interesting

    I'm a HUGE fan of mouse gestures. I used them for 3 years with a program called Pointix on Windows - which I dearly miss now that I'm on Linux.

    It worked at the OS level so the gestures worked in EVERY program.

    Circle left was the back button in ANY web browser. Circle right was the forward button.
    Right Click + Drag scrolled ANY window in the direction of the drag.

    Text editors, email clients, spreadsheets, Photoshop. It worked everywhere because all the programs used a function in the OS for the scroll bars.

    I could use my computer 10% faster - it made my life easier. How's that for a use? (I never use things just because "they're cool". That's not enough reason for me.)

  8. Re:RSI by rotomonkey · · Score: 3, Interesting

    Actually, my personal experience with mouse gestures has been the opposite. I have been using them fairly extensively in Maya for about six years now without problems. Because the gestures need only be approximate, I can execute them with a much more ergonomic arm movement than I can when I need to get the cursor to a specific pixmap to open a menu. In addition, the mouse actually travels considerably less distance when gesturing.

    Granted, Maya can be an incredibly complex interface, with common tools appearing on a sub-menu of a sub-menu of a menu. You could make a strong case that a browser is a much simpler interface that doesn't need it, but I've found that I do start to develop wrist problems when I'm repeatedly using that nested menu item I'm too lazy to make a gesture for. When I'm gesturing, everything is fine.

    For a pure coder, who spends a majority of their time pounding keys, gestures might seem frivolous, but if you mainly mouse, as is the case in graphics work, gestures can actually help reduce RSI.

  9. Re:Oh yay! by PetiePooo · · Score: 2, Interesting

    ... users like you who view the world in only black and white are going to slow down its adoption and dampen the usefulness of javascript webpages.

    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 system for your stinking little spot on the web.. Hah!

    I suppose you're also the type that develops Flash intro screens with no way to bypass without loading Flash. I don't even have Flash installed. I refuse! I've seen too many annoying flash-based ads..

    You've got to keep in mind the target audience of your website. The more technologically advanced they are, the more likely they are to fiddle with browser settings. I personally set my browser security settings pretty darn high and run things through Privoxy. If that messes up your website, so be it. That's a viewer that YOU lost through your attempt to introduce too much eye candy or dependancy on cookies/tags. My intent in doing this is specifically to, as you say, "slow down its adoption and dampen the usefulness of javascript webpages."

    CN: lets do a poll. Lets see what percentage of our /. readers simply move on to another site when they hit a flash splash screen..

  10. Really..? (was:RSI is not caused by keyboarding) by Half-pint+HAL · · Score: 2, Interesting
    Perhaps you don't know what really causes RSI. Keyboarding doesn't, or we would have seen RSI cases decades ago, long before computers existed.

    Actually, current thinking disputes this. The reason RSI didn't affect typists (on mechanical typewriters) is due to the extra weight of the keys. The key return supplied enough movement that you wouldn't have to use any effort to lift your fingers the keys did it, whereas now you raise and lower the fingers in quick succession with a serious of poorly-coordinated muscle movements, causing pulling and straining. (This is also why most concert pianists find it impossible to play on a cheap Casio keyboard -- the poor return action means extra work leading to an inability to play fast.)

    As an RSI sufferer (albeit mostly recovered) I find that I can't use a laptop keyboard for more than 15 minutes.

    That said, I find the keyboard vastly preferential to the mouse. (I use the keyboard to navigate Windows menus -- there's a tip for the guy and his Maya gestures.) Also, one of the worst things I found was click-and-drag. The short travel buttons on a mouse need a not-inconsiderable amount of pressure to hold down....

    --
    Got them moderator blues I blieve I walk out the do', With these mod-points I been gettin', I 'most never post no mo'
  11. Stupid. by SharpFang · · Score: 2, Interesting

    Note MozGest adds much more functionality besides "moving the mouse".
    - 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.

    --
    45 5F E1 04 22 CA 29 C4 93 3F 95 05 2B 79 2A B2
  12. "next page" tag in HTML? by kavau · · Score: 2, Interesting
    What I'd much rather see is a "next page in a series" tag in HTML. Imagine reading a multipage article. At the end of the page, instead of finding that stupid link (which often seems to be where you least expect it), you could just press ALT-RIGHT (or right-click/next, or mouse:right-down, or whatever) to go to the next page. Maybe I could even configure my browser to automatically preload that next page.

    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.

    1. Re:"next page" tag in HTML? by Idarubicin · · Score: 3, Interesting

      Opera has already implemented this functionality in its newer versions. There's now a Fast Forward button on the toolbar. It's pretty good at figuring out what the next page should be. In Slashdot's site, it pulls up the comments for the next story; on Google it returns the next page of results. I don't know anything about the algorithm behind it, however.

      --
      ~Idarubicin