• Login
    • Search
    • Categories
    • Recent
    • Tags
    • Users
    • Groups
    • Rules
    • Help

    Do more on the web, with a fast and secure browser!

    Download Opera browser with:

    • built-in ad blocker
    • battery saver
    • free VPN
    Download Opera

    Buttonize a keyboard shortcut?

    Future releases
    1
    1
    919
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • jcm101
      jcm101 last edited by

      Is it possible to assign a KB shortcut to a browser button? (I imagine this is a 'command')

      I just want to script a button that has a KB function e.g. ctrl+shift+(A-Z 0-9)
      The examples online suggest that this should be straightforward & I would like to try to write it myself.
      Error messages etc assume you know what the commands could/should be, & the examples show the syntax but no list of commands/functions appended?
      If I want to write a regex there are lists of commands I can work with easily available online......
      Surely there must be a resource with the necessary info for this, anyone know where?

      I do not know the codebase in question but using the snippets available I have added a custom button to the browser.
      I found this @ chrome -

      chrome.commands.onCommand.addListener(function(command) {
      console.log('Command:', command);
      });

      &

      "commands": {
      "toggle-feature-foo": {
      "suggested_key": {
      "default": "Ctrl+Shift+5"
      },
      "description": "Toggle feature foo",
      "global": true
      }
      },

      Cannot see how to hook my variation of it up to the button though...

      Ultimately it would be nice to create an extension for a button that an end-user could assign KB shortcuts to as req'd. Perhaps this already exists in some form?

      Also I want to say thanks to Opera for the sidebar & to the independent authors of the extensions which make the current Opera version 'as useful' as Opera 12.xx, which I have now been forced to retire. No adequate bookmark management, notes tools etc had made the new Opera a Flopera as far as I was concerned, but now I am starting to really enjoy using it.

      Reply Quote 0
        1 Reply Last reply
      • First post
        Last post

      Computer browsers

      • Opera for Windows
      • Opera for Mac
      • Opera for Linux
      • Opera beta version
      • Opera USB

      Mobile browsers

      • Opera for Android
      • Opera Mini
      • Opera Touch
      • Opera for basic phones

      • Add-ons
      • Opera account
      • Wallpapers
      • Opera Ads

      • Help & support
      • Opera blogs
      • Opera forums
      • Dev.Opera

      • Security
      • Privacy
      • Cookies Policy
      • EULA
      • Terms of Service

      • About Opera
      • Press info
      • Jobs
      • Investors
      • Become a partner
      • Contact us

      Follow Opera

      • Opera - Facebook
      • Opera - Twitter
      • Opera - YouTube
      • Opera - LinkedIn
      • Opera - Instagram

      © Opera Software 1995-