How can I navigate, with keyboard, to the Right Sidebar's Cards?

I am sorry if I missed info about this. I want to jump to the top card in the right sidebar Content’s Tab. Is there a way to do it with keyboard? So far Tab isn’t helping to navigate through the UI elements to reach that spot but I would rather have an even more straight forward shortcut.

Here is a first custom.js step:

document.addEventListener("keydown", (e)=>{
    if (e.ctrlKey && e.altKey && e.key === "c") {
        const span = document.querySelector(".sidebar-item")?.querySelector("span.inline")
        if (!span) return

        span.dispatchEvent(new MouseEvent("mousedown", {
            bubbles: true,
            cancelable: true
        }))
    }
});

Yes this does what it;s supposed to do, jumps into Edit Mode on the first card in the right sidebar. Is it possible to not go into edit mode but just select the first bullet?

Just press Escape.

I can press escape manually, knew that. I was wondering if it can be simulated inside the dispatchevent function you provided…

I tried the following to get a mousedown event followed by an escape press at the same time with triggering the right sidebar with T R but it doesn’t work like this I suppose:

document.addEventListener("keydown", (e)=>{
    if (e.key === "t") {
		if (e.key === "r") {
			const span = document.querySelector(".sidebar-item")?.querySelector("span.inline")
			if (!span) return
	
			span.dispatchEvent(new MouseEvent("mousedown", {
				bubbles: true,
				cancelable: true
			}), new KeyboardEvent("keydown", {
				bubbles: true,
				cancelable: true,
				key: "Escape",
				keyCode: 27
			}));
		}
 }
});

I’d like to piggyback this sequence of mousedown+escape to the function triggered by pressing T R (Toggle Right) … would that be possible?

Try this:

document.addEventListener("keydown", (e)=>{
    if (e.ctrlKey && e.altKey && e.key === "c") {
        const div = document.querySelector(".sidebar-item")
        if (!div) return

        const span = div.querySelector("span.inline")
        if (!span) return

        span.dispatchEvent(new MouseEvent("mousedown", {
            bubbles: true,
            cancelable: true
        }))

        function escape(){
            const ta = div.querySelector(".block-editor")
            if (!ta) return

            ta.dispatchEvent(new KeyboardEvent("keydown", {
                bubbles: true,
                keyCode: 27
            }))
        }
        setTimeout(escape, 300)
    }
});