Fail to set shortcut for key previously binded

… super weird. I want to define a custom shortcut alt-q and it doesn’t work. Although it works when directly calls the command via command palette and in the command palette it shows that Alt-q is successfully registered for this command, yet it doesn’t work with that shortcut defined.

It is like all other commands I defined except alt-q was having a default key as Widgets: Refresh All. All the commands defined in the similar manner also works. I also tried to lower the priority of this space-lua block to try not being override but seems still doesn’t make a difference (-- priority 0 at the start of the block).

I was using similar manner of shortcut in v1 and it was not working initially but works after I unbind the old Alt-q shortcut. But this time it seems everything is fine but simply doesn’t work. It is so weird that I suspect it is a bug not my fail to use api properly. The same command works instantly after I switch to alt-a instead of alt-q, so it is definitely the issue with some occupation of that specific key.

Below is my function definition and command declaration:

command.define {
  name = "Journal: Open Daily Note",
  key = "Alt-q",
  run = function()
    local dailyPageName = "Journal/Day/" .. os.date("%Y-%m-%d")
    editor.navigate(dailyPageName)
  end
}

I also unmapped the previous key in the config:

config.set {
  shortcuts = {
    { 
      command = "Widgets: Refresh All",
      key = ""
    },
  }
}

There was a post the other day about shortcut issues

Thanks, I didn’t see that one.