4

This is related to https://orionfeedback.org/d/501-allow-users-to-configure-keyboard-shortcuts but I thought I should create a new thread because it doesn't solve fully use case.

I want to be able to set custom shortcuts to menu items using the macOs system shortcuts, but the existing shortcuts on Orion still take priority if there's a conflict. Basically I want my system shortcuts to override any Orion shortcut.

For example, if I set Cmd+S to "Hide Sidebar" on the system shortcuts, it won't work because Cmd+S is set to "Save Page..." as a default shortcut by Orion - instead I have to find another shortcut that isn't already taken by Orion (just using Ctrl+Cmd+S instead)

Option 1 - Detect system shortcuts and let those override the locally set shortcuts (Don't know if possible)

Option 2 - Create UI in the Orion settings with a list of all the shortcuts and an action to remove them (sounds like a lot of effort and probably not worth it)

    6 days later
    3 months later

    joaosardinha
    I occur the same situation here, here Is my tricky solution, a bit dirty but works well:
    Since Orion use apple native menu command shortcuts, its very easily to override and replace with function key in range f13-f35(in macOS map is \\Uf710 to \\Uf726which are unsupported in most keyboard and usually used by some nerd fonts and special char iirc, so here is a simple script I use:

    #!/bin/zsh
    
    # Declare an associative array for commands and their corresponding F-key unicodes
    typeset -A cmd_mappings
    cmd_mappings=(
        "Enable Focus Mode" "\\Uf710"
        "Enter Responsive Design Mode" "\\Uf711"
        "Hide Orion" "\\Uf712"
        "Hide Others" "\\Uf713"
        "Hide Sidebar" "\\Uf714"
        "Home" "\\Uf715"
        "Open Console" "\\Uf716"
        "Page Setup..." "\\Uf717"
        "Print..." "\\Uf718"
        "Reload All Tabs in Window" "\\Uf719"
        "Reload Page Without Cache" "\\Uf71a"
        "Reopen Last Closed Tab" "\\Uf71b"
        "Reset Orion..." "\\Uf71c"
        "Save Page..." "\\Uf71d"
        "Show Bookmarks..." "\\Uf71e"
        "Show Downloads" "\\Uf71f"
        "Show Reading List.." "\\Uf720"
        "Show Tab Overview" "\\Uf721"
    )
    
    # Base command pattern
    base_command="defaults write com.kagi.kagimacOS NSUserKeyEquivalents -dict-add"
    
    # Loop through the commands associative array
    for cmd key in ${(kv)cmd_mappings}; do
      # Construct the full command with prefixes and suffixes for the keys
      full_key="@~^\$${key}"
    
      # Execute the command
      ${=base_command} "${cmd}" "${full_key}"
    done

    Inside cmd_mapping is your command don't wanna use and associate function code, which I generate by chatgpt.

    While after that goto setting->keyboard shortcuts to ensure everything works, and now these command should not execute by shortcuts anymore.

    No one is typing