Use Eva

Keys and bindings

How Eva spells a key chord, the six bindings the console ships, and how to add a chord for a command or replace a default binding in config.

A binding is a key chord written as words joined by +, in one canonical spelling. There is exactly one way to write any chord, so a config file cannot name a key two ways.

The spelling rules

RuleCorrectWrong
Modifier orderctrl+meta+shift+kshift+ctrl+k
The enter keyenterreturn
The plus keyplus+

The joiner cannot also be a key, which is why plus is spelled out.

A string Eva cannot parse names no key. The console says so — once — rather than storing it and failing later.

Default bindings

The keymap ships six rows, and these are the six commands the console acts on.

ChordRowCommandDoes
Entersubmitsession.submitsend the prompt
Shift+Enternewlineinput.newlineinsert a newline
Ctrl+Ccancelsession.cancelinterrupt the Run
Ctrl+Dquitapp.quitleave the console
Escbacksurface.backclose the open panel
Ctrl+Kpalettesurface.paletteopen the command palette

Tab completes the selected row inside the palette. It is the panel's own key, not a keymap row.

Add a chord for a command

The keymap is config: the top-level keymap mapping, one row per key. A row keyed by a command name, with a bare string as its binding, adds a second chord — the default stays.

keymap:
  input.newline: ctrl+j

Now Ctrl+J and Shift+Enter both insert a newline.

input.newline is bound to shift+enter by default, and most terminals cannot send that chord without the kitty keyboard protocol. If you want a multi-line prompt you can type rather than paste, add a chord your terminal sends, such as ctrl+j.

Replace a default binding

To change one of the six rows, restate it whole — the binding and the command:

keymap:
  palette:
    binding: ctrl+p
    command: surface.palette

Restate command whenever you rewrite a default row. A bare string sets the row's command to the row's own id — palette: ctrl+p would fire a command named palette, which nothing answers.

Conflicts

Two rows that bind the same chord collide, and they collide in the chord's one spelling — ctrl+c and C+ctrl are the same key bound twice. The console reports the collision and the last row wins, so a mistake costs a notice rather than a dead keyboard.