Skip to content

feat(terminal): general sticky Ctrl/Alt/Shift modifiers for mobile TUI control #431

Closed

Description

@nickadminroot

I'd like to control TUIs from a phone using held Ctrl, Alt and Shift keys. The current terminal key bar has one-shot Ctrl, but no Alt or Shift. The phone keyboard's uppercase toggle does not send a terminal Shift modifier.

The three buttons should toggle independently and stay pressed until tapped again. They should work with arrows, letters, punctuation and the terminal's special keys, including Ctrl+Alt, Ctrl+Shift, Alt+Shift and Ctrl+Alt+Shift. For example, I should be able to hold Ctrl+Shift and press several arrows without rearming the modifiers after each key.

The goal is general keyboard control across TUIs. Please encode the combinations using the keyboard protocol supported by the target terminal, rather than adding shortcuts for specific agents. Where a legacy protocol cannot distinguish two combinations, document that limitation.

The buttons should show which modifiers are held and keep the phone keyboard open. Paste, IME composition and submitted message drafts should keep their normal behavior. Held state should clear when leaving the pane or terminal view, or on disconnect.

I checked the open and closed issues and PRs and did not find this feature in progress. #339 fixes hardware Shift+Enter, but does not add mobile modifier controls.

A fork branch is available for local testing before a PR. Chrome tests in mobile/touch mode cover all seven modifier combinations, repeated keys, received bytes in legacy and Kitty PTYs, paste/IME, focus and state reset. The installed fork also passed all seven arrow combinations in Neovim. Testing on a physical phone is still pending. If there's related work or a preferred input path, please point me to it.

Activity

  1. changed the title [-]feat(terminal): sticky Alt and Shift keys for the mobile terminal[/-] [+]feat(terminal): general sticky Ctrl/Alt/Shift modifiers for mobile TUI control[/+] on Oct 4, 2026
  2. devswha commented on Oct 7, 2026

    @devswha
    Owner

    Thanks for the detailed request and the fork branch. Held Ctrl, Alt and Shift buttons shipped in v0.4.0 through #508 (#508), which carried the sticky modifiers forward from your #433 and added a customizable key bar. Ordinary keys inherit the held modifiers, and the held state clears on pane or lens change and on disconnect. If a combination still encodes wrongly in a TUI, please open a new issue with the key and the terminal protocol.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions