Concatenate Commands

  • Moderator

    Difficult to do perhaps, with the existing GUI, but in Opera 12.18 keyboard shortcuts and mouse gestures can be assigned to perform more than one command, or to perform conditional commands. For example:

    • GestureUp = Open link in new page | Stop | Go to start | Close page
    • GestureDown = Open link in background page | Go to end | New page

  • For those who ask what could be the benefit of this, here is an other example I also used on Opera 12:

    • Different commands depending on the context, as Pesala explained (using "|")
    • Multiple actions on a single gesture, using "&". Example:
      • ↓ → Close tab & Next Tab (by order) to close current tab AND display the one immediately on the right
      • ↓ ← Close tab & Previous Tab (by order) to close current tab AND display the one immediately on the left

  • Thinking of the mnemonic shortcuts suggestion, a more general solution is the ability to make many-to-many relationships between commands and actions, using combinations of OR, SEQUENTIAL AND, and SIMULTANEOUS AND operators. So for example, we could have:

    , (comma) = SEQUENTIAL AND
    Example: Press "g" twice to scroll to top of page:
    g,g = Scroll Page to Top

    Example: Press "t" and "p" together to paste and go in a new tab
    t+p = New Tab, Paste and Go

    | = OR
    Example: Press "t" or "CTRL+T" to open a new tab
    t | (CTRL+N) = New Tab

    Super Fancy Example, probably not useful but just to illustrate the power: Hold CTRL and make a down-left mouse gesture to close the current tab, open the previous tab by order, and paste and go
    CTRL + ( ,) = Close Tab + Previous Tab (by Order) , Paste and Go

  • I forgot to mention, the g,g example is from

  • Not to forget the toggle commands for stuff that allows multiple states ...

    VB-18247 btw.

  • Is this analagous to macros ?

  • Sort of. Opera 12.18 (and earlier) had a few ways of combining commands for use with custom buttons or shortcuts. You could use "&" to chain commands (to execute all of them in order) or "|" for alternatives (If the first command is not applicable, then do the second command.) No loops and no conditionals, so not much of a language.


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