Fork me on GitHub
#portal
<
2021-03-27
>
claudiu18:03:49

Hello, Are there any keyboard shortcuts implemented in portal (ex: to change selected to portal.viewer/tree) ?

djblue19:03:39

Hi @claudiu, if you open the command palette by hitting the bottom right button, it will provide keyboard shortcuts next to the command.

claudiu19:03:25

ohh totally missed it. Awesome, thank you 🙂

💯 1
djblue19:03:56

https://github.com/djblue/portal/blob/master/src/portal/ui/commands.cljs#L173-L221 is the complete list. Looking at making them customizable in the future.

claudiu19:03:51

Thank you 🙂

plexus07:03:54

This is cool! note that at least on Linux in Firefox, Ctrl-Shift-p will open a private browsing window, seems it won't let you override that.

djblue14:03:58

Thanks! I think two ways to fix the problem are having browser specific shortcuts or making it customizable, one of those is easier than the other. What keyboard shortcut would you prefer instead of ctrl + shift + p?

Ryan Zwiefelhofer16:03:05

I would have almost recommended ctrl + shift + a since many things are using that for palettes, but unfortunately chrome just decided to steal it as well for the search open tabs feature. Next in my mind would be maybe trying to model after linux generated signals (eg, ctrl + z , ctrl + c) etc but then that would interfere with any future possibilities of having shells within portal. Maybe instead after something like tmux with trigger/prefix combo first ? (eg: ctrl + b -> p - but not using tmux's b for the above mentioned reason so swap it out with another char). Anyways just some food for thought 😄 stealing improving on existing systems always seems to offer good basis for things Edit: One existing one i forgot that many people are becoming accustomed to is meta + k (slack!)

1
plexus07:03:03

Nextjournal (and others as well I believe) use Ctrl/Cmd-J https://nextjournal.com/help/shortcuts

plexus07:03:03

it's pretty hard to find keyboard shortcuts that don't clash with either some browser's built-ins, or with some OS/window manager shortcuts...

👌 1