GithubHelp home page GithubHelp logo

Comments (10)

xiaoxiaoflood avatar xiaoxiaoflood commented on May 21, 2024

Hi,

Maybe you're using an outdated code? Mouse Gestures uses cmd_moveBottom and cmd_moveTop.

Do you have any reference how to find these codes?

https://searchfox.org/mozilla-central/source/testing/mochitest/tests/SimpleTest/NativeKeyCodes.js

from firefox-scripts.

zakius avatar zakius commented on May 21, 2024

Thanks for the quick reply

These commands don't work for me for some reason, maybe there's some version mismatch or other issue, I'll look into it one more time. And thank you for that list

from firefox-scripts.

ganego avatar ganego commented on May 21, 2024

I use a different script that calls one of these function: https://developer.mozilla.org/en-US/docs/Archive/Mozilla/XUL/List_of_commands

Specifically cmd_scrollTop. Don't know if this is possible here.

from firefox-scripts.

zakius avatar zakius commented on May 21, 2024

Just letting you know I figured it out

first of all this command works but has to be called in the right context, directly in the mousedown handler

secondly I had some issues with making rocker left work properly which may have caused false negatives, in particular deselect command was messing with it, for my usecase it doesn't really matter so I just commented it out and now it does what I expect

thanks again

from firefox-scripts.

xiaoxiaoflood avatar xiaoxiaoflood commented on May 21, 2024

first of all this command works but has to be called in the right context, directly in the mousedown handler

Which command? I use cmd_moveBottom and cmd_moveTop in mouseup handler, like all mouse gestures. Rocker gestures are handled by mousedown and scroll gestures by wheel.

I use a different script that calls one of these function (...) Specifically cmd_scrollTop

Do you have an example where scrollTop/scrollBottom work and moveBottom/moveTop don't?
I think they and cmd_[begin|end]Line are essentially the same.

Windows and Linux uses cmd_[begin|end]Line for Home/End keys in browser context, while Mac uses cmd_scroll[Top|Bottom].

from firefox-scripts.

zakius avatar zakius commented on May 21, 2024

I'm not sure if I use move or scroll, will check tomorrow, but what I meant it doesn't work in chromeListener at all, so I gave up on sending message from mousedown handler and executed these commands directly there

from firefox-scripts.

xiaoxiaoflood avatar xiaoxiaoflood commented on May 21, 2024

So I got two examples where gesture to scrollup/down doesn't work:

I already fixed that and will push the update soon.

from firefox-scripts.

zakius avatar zakius commented on May 21, 2024

Do you mind if I submit PR with improved configurability? I'd build array of available actions and map gestures to them somewhere at the top of the script to make it clearer and easier to update for people who customized their bindings

EDIT: as I'm digging deeper into it it seems it may be quite challenging to do it properly due to some gestures requiring context and some performing different tasks depending on context, I'll play around a bit more but may give up on that

EDIT 2: okay, I'm giving up on this, I only end up breaking stuff all the time

from firefox-scripts.

xiaoxiaoflood avatar xiaoxiaoflood commented on May 21, 2024

Go ahead! But yes, I think it's not so easy at it may seen. I didn't actually write the script to make it easily configurable.

from firefox-scripts.

xiaoxiaoflood avatar xiaoxiaoflood commented on May 21, 2024

Closing this one because it's working for me, I can't reproduce any issue.

from firefox-scripts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.