Skip to content

Arrow keys stop working after Ctrl+Arrow in Bash integration #114

Description

@alir6za

Describe your issue

Environment:

  • OS: Ubuntu 26.04
  • Shell: Bash
  • Iris version: 0.4.21
  • Iris installed from binary: ~/.local/bin/iris

When using Iris Bash integration (iris init bash), normal arrow keys stop working after pressing Ctrl+Left or Ctrl+Right.

The issue only happens with Iris Bash integration enabled. It disappears when running:

bash --noprofile --norc

or when removing the iris init bash hook from .bashrc.

Debugging shows that Iris receives the arrow key input, but after processing Ctrl+Arrow, normal arrow sequences are no longer handled correctly.

Example:

Ctrl+Left:
\x1b[1;5D

Then Left Arrow:
\x1b[D

The key reaches Iris, but it is not forwarded/processed correctly, so the cursor does not move.

Debug log:

[wrapper.go:657] Stdin raw input: bytes="\x1b[1;5D"
[overlay.go:179] SetPromptLen: 19 -> 16

[wrapper.go:657] Stdin raw input: bytes="\x1b[D"

After this point, the input is received but no cursor/overlay update happens.

This looks like a state synchronization issue in Iris' input handling after processing Ctrl+Arrow.

Steps to reproduce

  1. Enable Iris Bash integration in ~/.bashrc:
eval "$("$HOME/.local/bin/iris" init bash)"
  1. Open a new Bash session.

  2. Type some text, for example:

hello world test example
  1. Press Ctrl+Left or Ctrl+Right to move between words.

  2. Press Left Arrow or Right Arrow.

Expected:

Arrow keys continue moving the cursor normally.

Actual:

Arrow keys stop moving the cursor after Ctrl+Arrow.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions