Skip to content

After using ox in some terminal emulators, Ctrl+C/Ctrl+Q insert escape sequences in TUI apps (e.g. micro, fzf, nano) #211

Description

@Dolomirr

What is the bug?
When using ox editor inside certain terminal emulators (kitty, alacritty) closing ox disrupt terminal input handling in other interactive TUI applications like micro editor, fzf and even nano. Normal characters are inserted correctly, but special keypresses Ctrl+C, Ctrl+Q or arrow keys are not interpreted correctly. Instead, they insert odd escape sequences:

Ctrl+C -> 99;5u
Ctrl+Q -> 113;5u
Ctrl+X -> 120;5u
ArrowLeft -> 1:129D
ArrowUp -> 1:129A

Reopening terminal window fixes this behavior until ox is used again.

This issue does not occur in other terminal emulators I tested: gnome-terminal, kde konsole and wezTerm .

The issue was verified on:
Arch Linux installation (KDE Plasma - Kwin Wayland)
Linux Mint (Cinnamon - Muffin X11)

I also found a related Kitty issue showing similar behavior when using tmux, maybe it can help investigate what causing the issue:
kovidgoyal/kitty#3541

Ox version: 0.7.7
Kitty version: 0.42.2
Alacritty version: 0.15.1

What did you do to get the bug?

  1. Open ox in kitty or alacritty terminal.
  2. Close ox.
  3. Open other interactive tui aplication (micro, fzf).
  4. Press any special key (e.g., Ctrl+C, ArrowUp).

What behaviour were you expecting?
Special keys should work normally in other applications after ox exits.

Screenshots (if applicable)
(ignore flickering, its nvidia drivers)

simplescreenrecorder-2025-08-12_18.31.34.mp4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions