Focus Out behavior

Could I clarify the intended behavior of Focus Out?

I am on Bike 2.0 Preview 301, and when engaging Focus Out (shortcut, command, or menu item) it gets me all the way back to home. Is this intended?

Focus In functions as expected.

P.S. Amazing software, thank you for optimizing for quality in these slopware times.

Generally it should be opposite of focus in. There is a focus stack, and focus in pushes to that stack and focus out pops from that stack.

So it should be that if you focus in twice. And then focus out once. You will get back to your first focus in location. It shouldn’t be that focus out always takes you back to home.

If that’s happening (always back to home), please let me know exact steps to reproduce it.

Thanks!

Ah, yes, I can now see it depends on how you got to the current focus: it was jumping back to home because I navigated from home straight to N-th outline level.

I initially assumed Focus Out would just move me one level up. Is there a separate command for this, perhaps? As an alternative to clicking on the parent level in the breadcrumbs menu.

I understand that a coming build may include a command (to which you could attach a keystroke via Bike > Commands Explorer ) for gradual expansion of focus.

In the meanwhile, if you want to experiment with a JXA (JavaScript for Automation) script (perhaps binding a temporary keystroke to it) you could try something like:

Expand disclosure triangle to view JS source
(() => {
    "use strict";

    const script = (() => {
        const
            editor = bike.frontmostOutlineEditor,
            focus = editor.focus;

        return (
            editor.focus = (focus.parent || focus),
            editor.focus.text.string || "Home"
        );
    })
        .toString();

    return Application("Bike").evaluate({ script });
})();

(Choosing JavaScript from the language selector at top left of Script Editor, if you want to try it there)

2 Likes

I’ve added a command Go: Focus Out by Level for this. It has no keybinding by default, but you can set one via the commands explorer: Bike 2.0 (Preview 302)

2 Likes

This is awesome! The new command does exactly what I want: I’ve assigned option-cmd-left to it, and couldn’t be happier. Thank you @jessegrosjean for such a quick turnaround, I wish all software was supported like this. :slight_smile: And thank you @complexpoint for your workaround above!

3 Likes