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

# Code with a coding window

> Add your own codes to a session in MatchCoder by pressing the buttons of a coding window, with the mouse or the keyboard.

A coding window is the panel of buttons beside the video in MatchCoder. Each press of a button adds a code at the moment the video is on. This page covers how to code with a window and which keys to use.

## Start coding

To code a session, open the timeline and then the coding window.

1. Open the session on its **Video** page.
2. Press **Timeline** on the playback bar, or the down arrow key.
3. Press **Show the coding window** at the top right of the video, or <kbd>Alt</kbd> + <kbd>C</kbd>.
4. Play the video and press a button each time something happens.

The coding window sits beside the video and makes the video narrower, so it never covers the picture. To hide it again, press **Hide the coding window** or <kbd>Alt</kbd> + <kbd>C</kbd>.

![MatchCoder with the coding window open beside the video and the timeline underneath.](https://mintcdn.com/framesports/cd41OeNgwVxZ5-D-/images/matchcoder/coding-window.png?fit=max\&auto=format\&n=cd41OeNgwVxZ5-D-\&q=85\&s=31adde5582b0c0425f53e6cbe9aa5efd)

The first window you see is **Framesports codes**, the codes Framesports uses for its own stats. To use a different window, see [Choose or build a coding window](https://docs.framesports.ai/matchcoder/coding-windows.md).

## What happens when I press a button?

A press adds one code at the playhead, on the button's row of the timeline. The new code shows on the timeline straight away and saves by itself.

A button can also make a code with a length, such as a phase of possession. When **Press again to end it** is ticked for that button in **Button settings**, the first press starts the code and the second press ends it.

To take back the last code, press <kbd>Ctrl</kbd> + <kbd>Z</kbd> (<kbd>Cmd</kbd> + <kbd>Z</kbd> on a Mac). To cancel every code you have started but not ended, press <kbd>Esc</kbd>.

## Change how a button codes

You can change how much video a button's code takes in, and whether it needs a second press. **Button settings** lists the buttons you have pressed at least once on this session, so press a button once before you change it. To change a button:

1. Open **⋯** at the end of the timeline's toolbar.
2. Choose **Coding window**, then **Button settings…**.
3. Find the button's row under **Code**.
4. Set **Before (s)** and **After (s)**: the seconds of video the code takes in before and after your press. Leave a box blank to keep the button's own timing.
5. To start the code on one press and end it on the next, press the arrow at the end of that row and tick **Press again to end it**.
6. Press **Done**.

## Code with the keyboard

Most coding windows give their buttons a key. Press the key instead of clicking. Each button shows its key at its right-hand end. A window's own keys come first: if a button uses a key that MatchCoder also uses, the button wins.

Coding keys work while the timeline is open. With the timeline folded away, they add nothing. They also do nothing while you are typing in a box, such as Find's search or a comment.

## Which keys control the video?

These keys control the video while you code.

| Key | What it does |
| - | - |
| <kbd>Space</kbd> | Play or pause |
| <kbd>←</kbd> / <kbd>→</kbd> | Back or forward one second |
| <kbd>Shift</kbd> + <kbd>←</kbd> / <kbd>→</kbd> | Back or forward five seconds |
| <kbd>,</kbd> / <kbd>.</kbd> | Back or forward one frame |
| <kbd>-</kbd> / <kbd>=</kbd> | Slower or faster |
| <kbd>M</kbd> | Mute or unmute, unless a button of your coding window uses <kbd>M</kbd> |
| <kbd>F</kbd> | Full screen |
| <kbd>↓</kbd> | Open or fold the timeline |

## See and change every key

MatchCoder's own keys are on the **Customise shortcuts** sheet. To open it, press <kbd>?</kbd>, or open **⋯** at the end of the timeline's toolbar and choose **Keyboard shortcuts**.

To change a key, click it on the sheet, then press the new keys. <kbd>Esc</kbd> cancels. **Restore defaults** puts every key back. Your keys are kept for you on that browser.

## Frequently Asked Questions

**I pressed a key and nothing happened. Why?**
Coding keys only work while the timeline is open. Press **Timeline** on the playback bar, or the down arrow key, then try again. Keys also do nothing while you are typing in a box, such as Find's search: press <kbd>Esc</kbd> to leave the box, or click the video. See [Code with the keyboard](#code-with-the-keyboard).

**How do I delete a code I made by mistake?**
Press <kbd>Ctrl</kbd> + <kbd>Z</kbd> (<kbd>Cmd</kbd> + <kbd>Z</kbd> on a Mac) straight away. To delete an older code, select it on the timeline and press <kbd>Delete</kbd>. See [Edit codes on the timeline](https://docs.framesports.ai/matchcoder/timeline.md).

**Can I change which key a button uses?**
A button's key is part of the coding window. To change it, change the window, for example with Ask Framesports. See [Choose or build a coding window](https://docs.framesports.ai/matchcoder/coding-windows.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.