Buttonize a keyboard shortcut?

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

Log in to reply
 

Looks like your connection to Opera forums was lost, please wait while we try to reconnect.