Use same gesture for multiple commands, depending on where on the screen you used it

  • So the idea is that you could use 1 gesture, to trigger multiple different kind of commands based on where you use the gesture over the window. There could be presets for different regions:

    Default= Full Window
    Halves = Top Half, Bottom Half, Left Half, Right Half
    3x3 = Top Left, Top Middle, Top Right, Middle Left, Middle Middle, Middle Right, Bottom Left, Bottom Middle, Bottom Right

    0_1536934955709_Left and Right Side.png


    Right now you can't use 2 of the same gesture at all, so It just need to be updated to check that you don't have 2 of the same gesture with overlapping regions or the same region.

    I could use the 1 Left as well as the 1 Right gestures at the Top Left region to jump back and forward in history, as if I was clicking on the navigation buttons right above.

    Then I could use the same 2 gestures at: Top Middle to cycle left and right between tabs.

    Using the 1 Up Gesture at Top Left, Top Middle and Top Right I could add a tab before all tabs, after active and after the last tab.

    That way I can use 2 simple gestures, instead of needing 7, which could be a bit difficult to remember all of them, compared to remembering a screen region and a simple gesture.

  • Ambassador

    @randomlyfish Opera 12.18 has something called "Input Context," for both mouse gestures and keyboard shortcuts.

    0_1536927460226_Input Context.png

  • @pesala Sorry, I don't quite understand how Opera is relevant to a suggested Vivaldi feature.

    Are you saying 1. that it will get supported because opera have it or 2. that because opera have it, there's no point in adding it or 3. that I should switch to opera instead?

  • Ambassador

    @randomlyfish I am just saying that the way that Opera does it is not based on position on the page, but on the UI Elements. This is why the way that Opera 12.18 does it is relevant to the development of Vivaldi.

    TechCrunch: (January 27th 2015):
    “The former CEO of Opera, Jon von Tetzchner, has released the Vivaldi Browser for fans of the old Opera.

    The way that it might work is:

    • GestureLeft over the page = History Back
    • GestureLeft over the Tabs = Switch to previous tab
    • GestureLeft over the Panels = Close Panel
    • GestureLeft over bookmark or notes tree = Collapse tree, etc.

  • @pesala Ah, I couldn't really tell that it worked like that from the screenshot alone. But doesn't that mean that that depending on the visible UI elements and based on how you have scrolled on the page, you'll have to move your mouse to different locations for different pages? Or if Opera's feature was implemented, would it only be based on Vivaldi's UI, which would at least make it consistent for all pages?

    Edit: I saw you added the examples. So doesn't that mean that you need the panel open for the gesture to work over the panel?

  • Ambassador

    @randomlyfish I don't know enough about how the Vivaldi interface is coded to tell you what is feasible. I suspect that basing actions on cursor position would be unpredictable in practice even if it were practical to code.

  • @pesala As someone with 10+ experience in programming, using various different languages from JavaScript, jsfl, actionscript 3.0, Csharp. I can tell you with 100% that it couldn't be more accurate. Heck, the mouse gesture system wouldn't even work without the ability for the code to read mouse positions while holding down right click. Because the way the code recognizes the gesture is based on the delta position between the previous mouse position and the current mouse position and it's calculated by taking the current x and y and subtract the previous x and y positions. So if previous position was 50 50, and next is 60 55, then the delta values are 10, 5, and that way it can check how far the mouse moves every time the event is triggered.

    If you would have googled "JavaScript get window click position" and just in case "PHP get window click position" and you would have found a few different solutions depending on how they need to read the mouse position.

    And we know that only Javascript and PHP is relevant because:
    "The only languages that are specifically “web-based” are HTML, CSS, JavaScript and PHP"

    (HTML and CSS are not traditional programming languages, and are instead more like text files that contain instructions for how the page is supposed to look like)

    These are the 3 first google results for both JavaScript and PHP.

    // Javascript solutions (Local):

    // PHP solutions (Server Side):

  • Ambassador

    @randomlyfish The program may know exactly where the cursor is, but the user does not. What I meant was that it would be unpredictable whether the gestures would cycle back and forth in the browser history or switch tabs.

    Where there is a clear visible barrier between the Toolbars or the Panels and the webpage the likelihood of error is much less.

  • @pesala

    This would be Left Half, Right Half (960x1080 per area)
    0_1536933979538_Left and Right Side.png

    And this would be 3x3 (640x360 per area)

    I'd be surprised if the user does not know where the cursor are considering the areas are so large. And as long as the user stars the gesture in one area, it shouldn't matter if the user moves the cursor on to a different area, because you just have to base the selected area, based on the users initial right click press, not based on it's continuous mouse position.

Log in to reply

Looks like your connection to Vivaldi Forum was lost, please wait while we try to reconnect.