List of keyboard shortcuts?

On Linux / Firefox, two items show “Cmd” - whatever that means:
|Alt-Cmd-Up||Move the current cell up.|
|Alt-Cmd-Down||Move the current cell down.|

Also, the help box is not scrollable, hiding some of it on the shorter screens (or when zoomed in a bit)

1 Like

I can’t manage to move cells around. After a short investigation I noticed that it worked on Chrome but not on Firefox. I believe it is because Firefox has a special selection mode in textboxes relying on they alt key, cf screenshot below

image

Shows that the cursor is then modified in order to allow for geometrical (well at least a rectangle) selection of editable text.

1 Like

alt-super-up and alt-super-down worked to move cells.

Proof that I’ve not tried all key combinations (shame on me)
Thanks

This will probably need another revision, alas keybindings are a minefield.

The command key:

  • ‘Cmd’ on Windows is “the Windows logo key” or the “Windows key”, or the “Start key”, or the “Flag key” depending on who you ask. It’s the key to the left of Alt.
  • ‘Cmd’ on Linux is the “Super” key, which, physically, will have a Windows logo or a ⌘ printed on it, or something else if you have a fancy mechanical keyboard.

We’ll probably tweak the documentation to refer to these with their platform-specific names rather than just ‘Command’. As far as the choice: the Windows key is apparently a bit unusual, but on the other hand, many keybindings are already taken, so we’re just happy to find something that’s (mostly) not resulting in conflicts with other apps.

So far I’m not able to replicate any difference between Firefox & Chrome for the Alt-Cmd-↑ commands - works in both browsers, in Chrome 66 and Firefox 59 on macOS. I’ll test on a Windows box when I have access to one again.

‘Alt’-‘Super’-Up/Down is taken by KDE (on linux) to switch windows, by default. So any other way to rearrange cells would be great. (Perhaps there is one, I just got started).

The perhaps the most natural gesture would be just dragging cells up and down in the editor, perhaps by dragging the ‘#’ link symbol.

https://talk.observablehq.com/t/feature-request-drag-to-re-arrange

had suggested dragging earlier this year and there was an indication that work was started ?

How do I comment lines on LInux/Firefox w/ German keyboard?

1 Like

The keybinding for commenting lines, on Linux, is Ctrl-/. I don’t have a physical German keyboard with me, but judging by the T1 and T2 layouts I can find online, you’d hit Strg-Shift-7 (or Ctrl, instead of Strg, if that key is untranslated, like on a MacBook’s German layout).

Thx, Tom. Unfortunately this trick doesn’t work. It seems pressing ‘shift’ trips the key detector looking for ‘ctrl’ and NOT ‘shift’. Any chance to toggle keyboard somehow?

Could you try ctrl+ ß key, or perhaps some variant of that?

I don’t have a German keyboard (nor am I on linux), but if I change my keyboard layout to German on my macbook, +- seems to work (and it gives the same keyCodes as / of “191”). “-” is the key two to the left of “delete / backspace” on my US keyboard, thus ß is my guess after staring at this picture from wikipedia of the German keyboard layout.

1 Like

Strangely, ctrl+ß does same thing as shift+tab. I really wish I could console-hack the key map.

Here is the Big List of Keyboard Shortcuts:

I’ve probably missed a few things in different operating systems and locales—please let me know and I’ll make corrections.

We’ve just deployed some improvements to our keyboard shortcuts.

  1. On non-macOS platforms, the commands for moving a cell are now Control-Shift-Up and Control-Shift-Down. On mac, they are still Option-Command-Up ⌥⌘↑ and Option-Command-Down ⌥⌘↓, respectively.

  2. On macOS, we disabled several non-standard commands that were in CodeMirror’s defaults. Option-B ⌥B, Option-F ⌥F, Option-D ⌥D now insert a ∫, ƒ and ∂, respectively. Also disabled: Command-D ⌘D (used by some browsers to create a bookmark), Command-U ⌘U, and Shift-Command-U ⇧⌘U.

2 Likes

Apologies if this has already been discussed elsewhere (perhaps someone can point me to the right place :grimacing:) but one keyboard shortcut that I think would be really useful is to create a new cell. Is there a standard workflow that people follow? I love Observable so far but I find that I do have to switch to using the mouse to click on the + icons when I want to insert a new cell underneath the current one…
Thank you! :pray:

You can use the “split cell” keyboard shortcut (alt-enter) at either the top or the bottom of the cell to create a new cell above or below, respectively. Note that when you create a new cell above the current cell this way, you have to press the up arrow to move the cursor into it, but if you create it below, your cursor starts out in the new cell automatically.

This is in some sense inverse to the fact that the “merge cell” key can be used to delete cells.

You can use Option-Shift-Return (macOS) or Alt-Shift-Enter to split a cell and focus the one before it, per our keyboard shortcuts.

1 Like

Any keyboard shortcut to go fullscreen?

Sorry but I must have missed somme thing.

Under Windows 10, the Alt+Shift+P combinaison of keys is bound:

  • with Chrome to printer selection
  • with Firefox to new private windows

So, how can I Pin/Unpin the selected cells?

Or, is there a table to remap, the shortcuts?

1 Like

feature: duplicate cell

it would be great to have a shortcut for duplicating a cell cell
alternatively you could hold “alt” + drag the blue bar of the cell to the position you want to have that cell duplicated to