> ## Documentation Index
> Fetch the complete documentation index at: https://docs.oryx.mechatronstudio.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Digital editing

> Drawing pulses, selecting stretches and the ten toolbar operations.

In digital mode a channel is a row of cells, and every cell is **high** or
**low**.

## Drawing

| Gesture                            | What it does                                               |
| ---------------------------------- | ---------------------------------------------------------- |
| **Click** a cell                   | Toggles it between high and low                            |
| **Drag** with the left button      | Selects a stretch of cells                                 |
| `Shift` + click                    | Extends the selection up to there                          |
| **Double-click** a folded template | Unfolds it                                                 |
| **Drag** with the right button     | Moves the view; past the end, it creates the missing steps |
| `Esc`                              | Cancels the selection                                      |

<Note>
  The right-button drag that **creates pulses** past the end can be turned off in
  General Settings (*Right drag creates pulses*). With "No", that drag only moves
  the view and the step count is left alone. It is also disabled while the step
  count is locked.
</Note>

When you drag a selection near the edge of the screen, the view follows on its
own, faster the closer to the edge you are.

## Selecting with the keyboard

| Key             | What it does                                           |
| --------------- | ------------------------------------------------------ |
| `S`             | Selects the step at the center of the screen           |
| `← / →`         | Moves the step cursor                                  |
| `Shift + ← / →` | Extends the selection                                  |
| `Shift + ↑ / ↓` | Switches channel                                       |
| `1` – `4`       | Goes to the channel in that position, at the same step |
| `↑ / ↓`         | Sets the step high or low                              |
| `Space`         | Toggles high / low                                     |
| `Esc`           | Cancels the selection                                  |

## The ten toolbar operations

They all act on the selection.

<AccordionGroup>
  <Accordion title="Copy · C or Ctrl+C">
    Stores the selection pattern in the clipboard. If a folded template falls
    inside, it travels with its contents.
  </Accordion>

  <Accordion title="Cut · X or Ctrl+X">
    Copies and leaves the selection low.
  </Accordion>

  <Accordion title="Paste · V, P or Ctrl+V">
    Enters **paste mode**: the header asks you to pick the pulse where the paste
    starts, and `Esc` cancels. Before pasting it asks **how many times** to
    repeat the pattern, and whether to show the repetition count.
  </Accordion>

  <Accordion title="Label · L">
    Opens the label window: a name and a color for the selected stretch. The
    field suggests examples like `CLK`, `DATA`, `SYNC`.
  </Accordion>

  <Accordion title="Delete · Del">
    Removes the selected columns **on every channel**, and the rest of the
    timeline shifts to close the gap. It lowers the step count.

    Needs the step count unlocked.
  </Accordion>

  <Accordion title="Insert · Insert">
    Opens empty steps **before** the selected pulse. It is enabled with exactly
    one pulse chosen. The bar shows a submenu with how many steps to open
    —arrows to raise and lower— and `Enter` confirms.

    Needs the step count unlocked.
  </Accordion>

  <Accordion title="Toggle · A">
    Brings **the whole selection to the same value**: if it was all high, it
    sets it low; in any other case, it sets it high.
  </Accordion>

  <Accordion title="Invert · I">
    Flips **each step separately**: what was high goes low and the other way
    round, cell by cell. That is the difference from *Toggle*, which levels
    everything.
  </Accordion>

  <Accordion title="Division · D">
    Enters **division mode**. The chosen steps are split into *n* sub-steps;
    `← / →` or `+ / −` adjust *n* between 1 and 99, `Enter` confirms and `Esc`
    cancels.

    Only the chosen steps are split: the rest of the channel stays as it was. On
    confirming, the selection covers the new sub-steps, ready for you to draw.

    This is the tool you write a protocol frame with: every sub-step is one bit.
  </Accordion>

  <Accordion title="Offset · F">
    Enters **offset mode**. It moves the selected steps along the timeline, in
    whole steps, up to the length of the project. `← / →` or `+ / −` adjust,
    `Enter` confirms and `Esc` cancels.

    While it lasts, the editor draws the original position as a ghost reference,
    so you can see how far you moved.

    <Warning>
      Do not confuse it with the **channel offset** on the name card: that one
      shifts the whole drawing without touching the data; this one really moves
      the data.
    </Warning>
  </Accordion>
</AccordionGroup>

## Operations on the whole channel

From the gear in the actions column, or with `Shift`:

| Action                                  | Shortcut    |
| --------------------------------------- | ----------- |
| Repeat the channel signal N times       | `Shift + R` |
| Invert the whole channel (0→1, 1→0)     | `Shift + I` |
| Toggle the channel (all high / all low) | `Shift + A` |

Repeat asks how many times and whether to show the repetition count; the
repetitions are marked with **repetition dividers** and `R1`, `R2`… labels that
can be hidden per channel.

## While it works

Operations that touch a great many pulses —repeat, changing the step count,
toggle, invert, paste, insert— show a notice while they redraw: *"Repeating
signal…"*, *"Resizing the timeline…"*, *"Pasting…"*.
