Skip to content

[Feature] Audit and Improve Keyboard Interaction #955

Open

Description

@akramcodez

Description

Audit Nanocoder's keyboard interaction and ensure that important actions have predictable and consistent behavior.

Terminal applications should be fully usable from the keyboard without requiring mouse interaction.

This issue should first identify the actual keyboard interaction gaps before implementing changes.

Use Case

Users should be able to perform common Nanocoder interactions using predictable keyboard controls.

Important interactions include:

  • Enter.
  • Shift+Enter.
  • Escape.
  • Ctrl+C.
  • Ctrl+V.
  • Ctrl+Shift+V.
  • Arrow keys.
  • Home.
  • End.
  • History navigation.
  • Multiline editing.
  • Command selection.
  • Contextual suggestion navigation.

Proposed Solution

First perform a keyboard interaction audit.

Document:

  1. Current behavior.
  2. Expected behavior.
  3. Missing/inconsistent behavior.
  4. Platform/terminal-specific problems.
  5. Proposed fixes.

The audit should cover:

Composer

  • Single-line input.
  • Multiline input.
  • Cursor movement.
  • Home/End.
  • Arrow navigation.
  • History navigation.

Submission

  • Enter behavior.
  • Shift+Enter behavior.
  • Multiline submission.

Cancellation

  • Escape.
  • Ctrl+C.
  • Processing-state cancellation where applicable.

Clipboard

  • Ctrl+V.
  • Ctrl+Shift+V.
  • Multiline paste.
  • Large paste.

Contextual UI

  • Navigating /, !, and @ suggestions.
  • Selecting suggestions.
  • Dismissing suggestions.

The implementation should follow the audit rather than assuming that every listed key currently needs a change.

Alternatives Considered

  • Implement behavior for every listed key without auditing the existing implementation.
  • Depend on mouse interaction.
  • Rely entirely on terminal-native behavior.
  • Document the existing behavior without making improvements.

The preferred approach is to first identify actual gaps and then fix the relevant ones.

Additional Context

Matt specifically requested clarification around what keyboard behavior is currently missing.

Therefore, this issue is intentionally open-ended during the investigation phase.

Contributors should report concrete problems rather than changing keyboard behavior unnecessarily.

Implementation Notes

This issue may overlap with the fullscreen TUI work because fullscreen terminal ownership can change how stdin and keyboard events are handled. #947

If fullscreen TUI work is not yet complete, the audit can still document current behavior and identify what will need to be revisited.

Contribution / PR Workflow

PRs should target: feature/new-ui

Do not merge directly into main.

Alternative keyboard interaction models and terminal-specific considerations are welcome.

Activity

  1. added
    enhancement
    high-priority
    on Aug 25, 2026
  2. tusharui commented on Aug 27, 2026

    @tusharui
    Contributor

    hey @akramcodez can you assign me this issue ?

  3. akramcodez commented on Aug 27, 2026

    @akramcodez
    MemberAuthor

    Sure @tusharui, but could you do some research on the codebase and let me know what you think? It would be great to have a proper implementation plan since this is a high-priority issue.

  4. added
    area:tui
    and removed
    high-priority
    on Oct 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:tuienhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions