## 事象
[[Zellij]]のセッション内で[[Yazi]]を起動し、画像にフォーカスをあてる(プレビューする)と以下のように勝手にキー入力されて変な風になる。
![[2026-02-20-06-55-19.avif]]
### 環境
| 対象 | バージョン |
| ----------- | ---------- |
| [[macOS]] | 15.7.3 |
| [[Ghostty]] | 1.2.3 |
| [[Zellij]] | 0.43.1 |
| [[Yazi]] | 26.1.22 |
| [[chafa]] | 1.18.1 |
## 原因
[[chafa]] 1.18.1の対応によるもの。
<div class="link-card-v2">
<div class="link-card-v2-site">
<img class="link-card-v2-site-icon" src="https://github.githubassets.com/favicons/favicon.svg" />
<span class="link-card-v2-site-name">GitHub</span>
</div>
<div class="link-card-v2-title">
chafa: Optionally probe the ctty. Add --probe-mode to control this · hpjansson/chafa@eef0955
</div>
<div class="link-card-v2-content">
Fixes #325 (GitHub).
</div>
<img class="link-card-v2-image" src="https://opengraph.githubassets.com/cbc01906705920b3dc7532894090d9b1b6d26be517756d234481e1b51e291ae5/hpjansson/chafa/commit/eef0955d526fe425e56a167da1960f47e7ef3a68" />
<a href="https://github.com/hpjansson/chafa/commit/eef0955d526fe425e56a167da1960f47e7ef3a68"></a>
</div>
[[Yazi]]でのissueと[[chafa]]メンテナーからのコメント。
<div class="link-card-v2">
<div class="link-card-v2-site">
<img class="link-card-v2-site-icon" src="https://github.githubassets.com/favicons/favicon.svg" />
<span class="link-card-v2-site-name">GitHub</span>
</div>
<div class="link-card-v2-title">
Chafa v1.18.1 causes random ghost keypresses when previewing images · Issue #3671 · sxyazi/yazi
</div>
<div class="link-card-v2-content">
What system are you running Yazi on? Linux X11 What terminal are you running Yazi in? Ptyxis (VTE 0.80.3) Alacri ...
</div>
<img class="link-card-v2-image" src="https://opengraph.githubassets.com/d2fe983d9172cc07d580580c922c16eb73865aa7579f086ca32cb035bf78dce1/sxyazi/yazi/issues/3671" />
<a href="https://github.com/sxyazi/yazi/issues/3671"></a>
</div>
> `--polite` governs the escape codes that change terminal state (echo and canonical mode, cursor visibility, sixel scrolling, sixel cursor advancement). `--probe` governs whether we can ask the terminal for things (without changing its state).
>
> I need to update the documentation for `--polite`. It was written before probing was implemented, and now it's unclear.
>
> You should probably have been setting `--probe off` all along. In auto mode, it was detecting yazi on stdio and not a terminal device, so there was no probing. But the new probe mode can address `/dev/tty` directly (nice when you're using it with e.g. `less` and other pipeline-based programs), so it's doing that now.
>
> Note that the `--probe` option was added in version 1.16.0. Earlier versions won't recognize it.
>
> *[Chafa v1.18.1 causes random ghost keypresses when previewing images · Issue #3671 · sxyazi/yazi](https://github.com/sxyazi/yazi/issues/3671#issuecomment-3885367836)*
## 解決方法
[[chafa]]を1.18.1より前のバージョンに戻すか、以下の対応が入った[[Yazi]]をインストールする。
<div class="link-card-v2">
<div class="link-card-v2-site">
<img class="link-card-v2-site-icon" src="https://github.githubassets.com/favicons/favicon.svg" />
<span class="link-card-v2-site-name">GitHub</span>
</div>
<div class="link-card-v2-title">
fix: Chafa v1.18.1 causes random ghost keypresses when previewing images by sxyazi · Pull Request #3678 · sxyazi/yazi
</div>
<div class="link-card-v2-content">
Fixes #3671
</div>
<img class="link-card-v2-image" src="https://opengraph.githubassets.com/a64fe59db3a334591c6524c8efba0d4cad36022df7af645c2416c42faafa3ba7/sxyazi/yazi/pull/3678" />
<a href="https://github.com/sxyazi/yazi/pull/3678"></a>
</div>
#2026/02/19 時点の[[Yazi]]の[[Nightly Buildをインストール (Yazi)|Nightly Buildをインストール]]したらなおった。
```console
$ yazi --version
Yazi 26.2.2 (e49cdfe 2026-02-19)
```