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

[Feature] ALT+TAB to cycle through (pinned) tabs #60

Open
schlagmichdoch opened this issue Nov 2, 2022 · 3 comments
Open

[Feature] ALT+TAB to cycle through (pinned) tabs #60

schlagmichdoch opened this issue Nov 2, 2022 · 3 comments

Comments

@schlagmichdoch
Copy link

Basic feature

Similar to the behavior of web browser I would love to cycle through tabs via the shortcut ALT+TAB.

Optional feature

The current tab should be pinned automatically if it is temporay so we can cycle back with ALT+TAB again

@fedorch
Copy link

fedorch commented Feb 12, 2024

I detailed a possible solution in another issue.

@schlagmichdoch
Copy link
Author

Awesome, thanks a lot @fedorch!

Shortcuts

Looking back at this issue, I probably meant CTRL+TAB and not ALT+TAB, as this is the default behavior in Firefox.

My keymap-desktop.json now looks like this:

  {
    "command": "tabsSwitchLastActive",
    "accelerator": "Ctrl+Tab"
  },
  {
    "command": "tabsSwitchLeft",
    "accelerator": "Ctrl+Left"
  },
  {
    "command": "tabsSwitchRight",
    "accelerator": "Ctrl+Right"
  },
  {
    "command": "tabsUnpinNote",
    "accelerator": "Ctrl+W"
  },
  {
    "command": "newTodo",
    "accelerator": null
  },
  {
    "command": "tabsPinNote",
    "accelerator": "Ctrl+T"
  }

As the temporary tab stays open we can even cycle back to it via Ctrl+Tab.

Adding Ctrl+W to unpin a note together with the option Unpin tab behavior: Select left tab enables closing the current tab via Ctrl+W like in browsers while Ctrl+T pins the current tab which leads to a new tab when selecting another note.

The shortcut part of this issue would be resolved by adding the accelerators to the plugin menu items as you have described in the other issue. Let's continue the discussion about shortcuts over there.

Pin on tab switch

Currently, when I open another (pinned) tab and then open a new note, the temporary tab will be overwritten, which is most of the times not what I want.

I will leave this issue open though, as I would like to see a toggle with the following behavior:

  • Pin a tab when switching to another tab

or alternatively

  • Do not overwrite the temporary tab when not selected

Last active tab history / order

Also, I would appreciate it, if there was not only one "last active tab" but rather an order in which the tabs where last visited. This order should also be persistent through Joplin restarts. Pressing Tab multiple times while holding Ctrl would then cycle through multiple tabs. In Firefox the order is only updated when the Ctrl is released which I like. Not sure if this is possible with Joplin though. Any thoughts @fedorch ?

@schlagmichdoch
Copy link
Author

I have only now seen, that this workaround is also mentioned in the README 🙈

https://github.com/benji300/joplin-note-tabs/blob/ea73f68815265a31caa9d3117daa228c1a7e5cc2/README.md#keyboard-shortcuts

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

No branches or pull requests

2 participants