Skip to content

Non-printable leader key is swallowed in insert mode #42

Description

@oribarilan

When the leader key is non-printable (e.g. ctrl+x), pressing it in insert mode does nothing — the key is consumed and discarded. Printable leaders (like space) correctly insert the character, but non-printable ones just vanish.

This means leader sequences like ctrl+x m (model picker) only work in normal/visual mode. In insert mode, the first keypress disappears and the follow-up key gets typed into the buffer.

In vim, non-printable leader keys don't trigger leader mappings in insert mode either — ctrl+x runs its own insert-mode behavior (completion submenu). So the current behavior is vim-faithful in spirit, but since vimcode doesn't implement i_CTRL-X and likely won't, the key is wasted.

Options:

  1. Pass through — let non-printable leaders fall through to OpenCode's leader system in insert mode, so app-level shortcuts work regardless of mode
  2. Keep swallowing — stay vim-faithful; users switch to normal mode for leader commands

Ref: #22 (comment) discussion

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