Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[V5] [Bug] Cannot bind combination of {Alt,Ctrl} + Shift + number keys ([0..9]) inside Sidebery's Keybindings settings despite those combinations being valid by Firefox #1173

Closed
drkhn1234 opened this issue Aug 14, 2023 · 8 comments

Comments

@drkhn1234
Copy link

Description

Sidebery doesn't allow setting shortcuts involving Shift and numbers in its own keybindings settings despite this being valid by Firefox and is boundable in Firefox's own Extension Shortcuts setting page.

Steps to reproduce

  • Open Sidebery Settings > Keybindings
  • Try binding "Shift + Alt + [0..9]" or "Ctrl + Shift + [0..9]

Expected behavior

  • Keybind is successfuly bound the the shortcut action

Actual behavior

Sidebery displays "Invalid shortcut" error.

Debug info

Addon data
{
  "addonVersion": "5.0.0rc4",
  "firefoxVersion": "116.0.2",
  "settings": {
    "nativeScrollbars": true,
    "nativeScrollbarsThin": true,
    "nativeScrollbarsLeft": false,
    "selWinScreenshots": true,
    "updateSidebarTitle": true,
    "markWindow": true,
    "markWindowPreface": "* ",
    "ctxMenuNative": false,
    "ctxMenuRenderInact": false,
    "ctxMenuRenderIcons": true,
    "ctxMenuIgnoreContainers": "",
    "navBarLayout": "vertical",
    "navBarInline": true,
    "navBarSide": "left",
    "hideAddBtn": false,
    "hideSettingsBtn": false,
    "navBtnCount": true,
    "hideEmptyPanels": true,
    "hideDiscardedTabPanels": false,
    "navActTabsPanelLeftClickAction": "scroll",
    "navActBookmarksPanelLeftClickAction": "scroll",
    "navTabsPanelMidClickAction": "discard",
    "navBookmarksPanelMidClickAction": "none",
    "navSwitchPanelsWheel": true,
    "subPanelRecentlyClosedBar": true,
    "subPanelBookmarks": false,
    "subPanelHistory": true,
    "groupLayout": "list",
    "skipEmptyPanels": false,
    "dndTabAct": false,
    "dndTabActDelay": 500,
    "dndTabActMod": "none",
    "dndExp": "hover",
    "dndExpDelay": 500,
    "dndExpMod": "none",
    "dndOutside": "win",
    "dndActTabFromLink": false,
    "dndActSearchTab": true,
    "dndMoveTabs": false,
    "dndMoveBookmarks": false,
    "searchBarMode": "dynamic",
    "searchBookmarksShortcut": "*",
    "searchHistoryShortcut": "!",
    "warnOnMultiTabClose": "none",
    "activateLastTabOnPanelSwitching": true,
    "activateLastTabOnPanelSwitchingLoadedOnly": true,
    "switchPanelAfterSwitchingTab": "always",
    "tabRmBtn": "hover",
    "activateAfterClosing": "next",
    "activateAfterClosingStayInPanel": true,
    "activateAfterClosingGlobal": false,
    "activateAfterClosingNoFolded": false,
    "activateAfterClosingNoDiscarded": true,
    "askNewBookmarkPlace": true,
    "tabsRmUndoNote": false,
    "tabsUnreadMark": true,
    "tabsUpdateMark": "all",
    "tabsUpdateMarkFirst": true,
    "tabsReloadLimit": 5,
    "tabsReloadLimitNotif": true,
    "showNewTabBtns": true,
    "newTabBarPosition": "bottom",
    "tabsPanelSwitchActMove": false,
    "tabsPanelSwitchActMoveAuto": true,
    "tabsUrlInTooltip": "full",
    "newTabCtxReopen": false,
    "moveNewTabPin": "end",
    "moveNewTabParent": "last_child",
    "moveNewTabParentActPanel": true,
    "moveNewTab": "before",
    "moveNewTabActivePin": "start",
    "pinnedTabsPosition": "left",
    "pinnedTabsList": true,
    "pinnedAutoGroup": true,
    "pinnedNoUnload": true,
    "tabsTree": true,
    "groupOnOpen": true,
    "tabsTreeLimit": 3,
    "autoFoldTabs": true,
    "autoFoldTabsExcept": 1,
    "autoExpandTabs": true,
    "autoExpandTabsOnNew": true,
    "rmChildTabs": "folded",
    "tabsChildCount": true,
    "tabsLvlDots": true,
    "discardFolded": true,
    "discardFoldedDelay": 3,
    "discardFoldedDelayUnit": "min",
    "tabsTreeBookmarks": true,
    "treeRmOutdent": "branch",
    "ignoreFoldedParent": true,
    "colorizeTabs": false,
    "colorizeTabsSrc": "domain",
    "colorizeTabsBranches": true,
    "colorizeTabsBranchesSrc": "url",
    "inheritCustomColor": false,
    "hideInact": false,
    "hideFoldedTabs": true,
    "hideFoldedParent": "any",
    "nativeHighlight": true,
    "warnOnMultiBookmarkDelete": "any",
    "autoCloseBookmarks": true,
    "autoRemoveOther": false,
    "highlightOpenBookmarks": true,
    "activateOpenBookmarkTab": true,
    "showBookmarkLen": true,
    "bookmarksRmUndoNote": true,
    "loadBookmarksOnDemand": true,
    "pinOpenedBookmarksFolder": true,
    "oldBookmarksAfterSave": "ask",
    "loadHistoryOnDemand": true,
    "fontSize": "m",
    "animations": true,
    "animationSpeed": "norm",
    "theme": "proton",
    "density": "compact",
    "colorScheme": "ff",
    "sidebarCSS": false,
    "groupCSS": false,
    "snapNotify": true,
    "snapExcludePrivate": false,
    "snapInterval": 0,
    "snapIntervalUnit": "min",
    "snapLimit": 0,
    "snapLimitUnit": "snap",
    "snapAutoExport": false,
    "snapAutoExportType": "json",
    "snapAutoExportPath": "Sidebery/snapshot-%Y.%M.%D-%h.%m.%s",
    "snapMdFullTree": true,
    "hScrollAction": "none",
    "navSwitchPanelsDelay": 122,
    "scrollThroughTabs": "none",
    "scrollThroughVisibleTabs": true,
    "scrollThroughTabsSkipDiscarded": true,
    "scrollThroughTabsExceptOverflow": true,
    "scrollThroughTabsCyclic": true,
    "scrollThroughTabsScrollArea": 0,
    "autoMenuMultiSel": true,
    "multipleMiddleClose": true,
    "longClickDelay": 500,
    "wheelThreshold": false,
    "wheelThresholdX": 10,
    "wheelThresholdY": 60,
    "tabDoubleClick": "none",
    "tabsSecondClickActPrev": true,
    "tabsSecondClickActPrevPanelOnly": false,
    "shiftSelAct": true,
    "activateOnMouseUp": true,
    "tabLongLeftClick": "none",
    "tabLongRightClick": "none",
    "tabCloseMiddleClick": "close",
    "tabsPanelLeftClickAction": "expand",
    "tabsPanelDoubleClickAction": "tab",
    "tabsPanelRightClickAction": "menu",
    "tabsPanelMiddleClickAction": "tab",
    "newTabMiddleClickAction": "new_child",
    "bookmarksLeftClickAction": "open_in_new",
    "bookmarksLeftClickActivate": false,
    "bookmarksLeftClickPos": "default",
    "bookmarksMidClickAction": "open_in_new",
    "bookmarksMidClickActivate": false,
    "bookmarksMidClickRemove": false,
    "bookmarksMidClickPos": "default",
    "syncName": "",
    "syncSaveSettings": true,
    "syncSaveCtxMenu": true,
    "syncSaveStyles": false,
    "syncSaveKeybindings": true,
    "selectActiveTabFirst": false
  },
  "permissions": {
    "allUrls": true,
    "webRequest": true,
    "webRequestBlocking": true,
    "proxy": true,
    "tabHide": true,
    "clipboardWrite": true,
    "history": true,
    "bookmarks": true,
    "downloads": true
  },
  "storage": {
    "size": "230 kb",
    "props": {
      "bookmarksRecentFolders": "31 b",
      "containers": "1.35 kb",
      "contextMenu": "1.17 kb",
      "expandedBookmarkFolders": "76 b",
      "favDomains": "20.2 kb",
      "favHashes": "1.68 kb",
      "favicons": "192 kb",
      "lastSnapTime": "13 b",
      "profileID": "14 b",
      "settings": "4.39 kb",
      "sidebar": "2.94 kb",
      "snapshots": "4.27 kb",
      "tabsDataCache": "1.64 kb",
      "ver": "10 b"
    }
  },
  "sidebar": {
    "panels": {
      "VghWnYI3IcdZ": {
        "type": 1,
        "id": "VghWnYI3IcdZ",
        "name": "len: 14",
        "iconSVG": "icon_bookmarks",
        "iconIMGSrc": "",
        "iconIMG": "",
        "color": "toolbar",
        "lockedPanel": false,
        "tempMode": false,
        "skipOnSwitching": false,
        "rootId": "menu________",
        "viewMode": "tree",
        "autoConvert": false,
        "srcPanelConfig": null
      },
      "XvDVswFOngKV": {
        "type": 1,
        "id": "XvDVswFOngKV",
        "name": "len: 9",
        "iconSVG": "icon_bookmarks",
        "iconIMGSrc": "",
        "iconIMG": "",
        "color": "toolbar",
        "lockedPanel": false,
        "tempMode": false,
        "skipOnSwitching": false,
        "rootId": "root________",
        "viewMode": "tree",
        "autoConvert": false,
        "srcPanelConfig": null
      },
      "rpG2kpSHVfHu": {
        "type": 2,
        "id": "rpG2kpSHVfHu",
        "name": "len: 4",
        "color": "purple",
        "iconSVG": "icon_tabs",
        "iconIMGSrc": "len: 11",
        "iconIMG": "len: 766",
        "lockedPanel": false,
        "skipOnSwitching": false,
        "noEmpty": false,
        "newTabCtx": "none",
        "dropTabCtx": "none",
        "moveRules": [],
        "moveExcludedTo": -1,
        "bookmarksFolderId": "3tq4mRJo1L7z",
        "newTabBtns": [],
        "srcPanelConfig": {
          "id": "h1uM-yvcxCVv",
          "autoConvert": true,
          "tempMode": false,
          "viewMode": "tree"
        }
      },
      "KvQWXJczvH1P": {
        "type": 2,
        "id": "KvQWXJczvH1P",
        "name": "len: 4",
        "color": "toolbar",
        "iconSVG": "icon_tabs",
        "iconIMGSrc": "",
        "iconIMG": "",
        "lockedPanel": false,
        "skipOnSwitching": false,
        "noEmpty": false,
        "newTabCtx": "none",
        "dropTabCtx": "none",
        "moveRules": [],
        "moveExcludedTo": -1,
        "bookmarksFolderId": -1,
        "newTabBtns": [],
        "srcPanelConfig": null
      },
      "Q6htrSevEsJu": {
        "type": 2,
        "id": "Q6htrSevEsJu",
        "name": "len: 4",
        "color": "turquoise",
        "iconSVG": "icon_tabs",
        "iconIMGSrc": "",
        "iconIMG": "",
        "lockedPanel": false,
        "skipOnSwitching": false,
        "noEmpty": false,
        "newTabCtx": "none",
        "dropTabCtx": "none",
        "moveRules": [],
        "moveExcludedTo": -1,
        "bookmarksFolderId": -1,
        "newTabBtns": [],
        "srcPanelConfig": null
      },
      "HW53-JvVMmdZ": {
        "type": 2,
        "id": "HW53-JvVMmdZ",
        "name": "len: 18",
        "color": "toolbar",
        "iconSVG": "icon_tabs",
        "iconIMGSrc": "",
        "iconIMG": "",
        "lockedPanel": false,
        "skipOnSwitching": false,
        "noEmpty": false,
        "newTabCtx": "none",
        "dropTabCtx": "none",
        "moveRules": [],
        "moveExcludedTo": -1,
        "bookmarksFolderId": "OrEIMwiARNdN",
        "newTabBtns": [],
        "srcPanelConfig": null
      }
    },
    "nav": [
      "sd-m3CUBD36ZAJV",
      "VghWnYI3IcdZ",
      "XvDVswFOngKV",
      "sd-lovv_41QB30V",
      "rpG2kpSHVfHu",
      "KvQWXJczvH1P",
      "Q6htrSevEsJu",
      "HW53-JvVMmdZ",
      "hdn",
      "sd-5Vb7dNYzahKV",
      "sp-CtcijeKZwpJV",
      "remute_audio_tabs",
      "sd-ILT5Ci70maKV",
      "create_snapshot",
      "settings"
    ]
  },
  "containers": [
    {
      "id": "firefox-container-1",
      "cookieStoreId": "firefox-container-1",
      "name": "8",
      "icon": "...",
      "color": "blue",
      "colorCode": "#37adff",
      "proxified": false,
      "proxy": null,
      "reopenRulesActive": false,
      "reopenRules": [],
      "userAgentActive": false,
      "userAgent": ""
    },
    {
      "id": "firefox-container-2",
      "cookieStoreId": "firefox-container-2",
      "name": "4",
      "icon": "...",
      "color": "orange",
      "colorCode": "#37adff",
      "proxified": false,
      "proxy": null,
      "reopenRulesActive": false,
      "reopenRules": [],
      "userAgentActive": false,
      "userAgent": ""
    },
    {
      "id": "firefox-container-3",
      "cookieStoreId": "firefox-container-3",
      "name": "7",
      "icon": "...",
      "color": "green",
      "colorCode": "#37adff",
      "proxified": false,
      "proxy": null,
      "reopenRulesActive": false,
      "reopenRules": [],
      "userAgentActive": false,
      "userAgent": ""
    },
    {
      "id": "firefox-container-4",
      "cookieStoreId": "firefox-container-4",
      "name": "8",
      "icon": "...",
      "color": "pink",
      "colorCode": "#37adff",
      "proxified": false,
      "proxy": null,
      "reopenRulesActive": false,
      "reopenRules": [],
      "userAgentActive": false,
      "userAgent": ""
    },
    {
      "id": "firefox-container-6",
      "cookieStoreId": "firefox-container-6",
      "name": "15",
      "icon": "...",
      "color": "blue",
      "colorCode": "#37adff",
      "proxified": false,
      "proxy": null,
      "reopenRulesActive": false,
      "reopenRules": [],
      "userAgentActive": false,
      "userAgent": ""
    }
  ],
  "windows": [
    {
      "state": "maximized",
      "incognito": false,
      "tabsCount": 17
    }
  ],
  "bookmarks": {
    "bookmarksCount": 1970,
    "foldersCount": 107,
    "separatorsCount": 0,
    "maxDepth": 4
  }
}
Logs
No logs appear.
@therealpxc
Copy link

Looks like Sidebery uses a regex to validate keybind strings. Why is that?

I also want to use an 'invalid' binding (CTRL+/, for search).

@mbnuqw
Copy link
Owner

mbnuqw commented Sep 3, 2023

@therealpxc, ctrl+/ is not possible: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/commands#key_combinations

@therealpxc
Copy link

That's a shame. But thank you for your patience and for the link to the docs!

@mbnuqw
Copy link
Owner

mbnuqw commented Sep 20, 2023

Resolved in v5.0.0

@mbnuqw mbnuqw closed this as completed Sep 20, 2023
@austeny
Copy link

austeny commented Jan 25, 2024

I'm running into a problem where I cannot bind, Alt+D in firefox on MacOS. I am running on v5.0.0. I continue to just get "Invalid Shortcut" error message. It looks like I cannot bind anything with Alt, however the updated regex should match on this keybinding.

@mbnuqw
Copy link
Owner

mbnuqw commented Jan 25, 2024

@austeny, it's a Firefox's shortcut (Focus Address Bar). Addons can't use/modify them.

@austeny
Copy link

austeny commented Jan 25, 2024

So firefox users are not able to bind Alt + ... to anything? The Focus Address Bar looks to reserve the command + K, and  command + alt + F keybinds and shouldn't conflict with Alt + D. The Sidebery Tab Reset is bound to Alt + R which works properly but unbinding and re-attempting to bind to the same keybind still throws the "Invalid Shortcut" message. It looks like Alt can be used in combination with binds but is just unable to in this scenario.

Side note, really love the plugin so far. Definitely the best tab management solution I've seen in Firefox.

@mbnuqw
Copy link
Owner

mbnuqw commented Jan 25, 2024

So firefox users are not able to bind Alt + ... to anything?

No, you can use any Alt + ... shortcut that is not used by Firefox (in theory). Check out this article to get the list of Firefox shortcuts: https://support.mozilla.org/en-US/kb/keyboard-shortcuts-perform-firefox-tasks-quickly

The Sidebery Tab Reset is bound to Alt + R which works properly but unbinding and re-attempting to bind to the same keybind still throws the "Invalid Shortcut" message.

That sounds like a bug. I can't reproduce it on linux, so maybe it's something macOS specific... Could you open a new issue for it?

As a workaround, you can try to use Shortcuts manager of Firefox: Open Addons page (about:addons), click on the top-right gear icon, click on the Manage Extention Shortcuts option

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants