Skip to content

Feature request: plain-text insertion mode (keep destination formatting) + restore Shift+Insert #994

Description

@leonidrysev

Summary / 摘要

Please add an insertion mode that inserts plain text and adopts the formatting at the caret.

在中文场景之外(俄语 + 输入法切换工具),现有三种插入方式都有问题;希望增加"纯文本插入"模式。

Environment

  • OpenLess v1.3.18, Windows 11
  • Keyboard layout switcher running: Punto Switcher (auto-corrects wrong-layout typing; extremely common for Russian users)
  • ASR: Custom OpenAI-compatible channel; LLM polishing: OpenAI

Problem: all three existing modes have a drawback

WindowsInsertionMode = 'tsf' | 'sendInput' | 'paste'

Mode Behaviour observed
TSF IME (default) Reliable — full Cyrillic text is inserted correctly. But the inserted text does not inherit the formatting at the caret: in rich-text targets it appears in a different font than the surrounding text.
Clipboard paste Sends a paste shortcut. With Punto Switcher active the modifier is swallowed and only the literal letter v reaches the window. Reproducible with both Ctrl+V and Ctrl+Shift+V.
SendInput keystroke simulation Characters are typed through the current keyboard layout. With Punto Switcher active, part of the Cyrillic text comes out as Latin letters, although the source text is correct.

So on this setup there is no mode that both inserts reliably and keeps the destination formatting.

Request 1 — plain-text insertion mode

An insertion path that produces plain text taking the formatting of the insertion point. For example:

  • put only CF_UNICODETEXT on the clipboard (no HTML/RTF flavours) and paste it, or
  • a TSF path that commits the string as plain text without carrying its own text-service formatting.

Request 2 — restore Shift+Insert in the UI

The type already exists:

export type PasteShortcut = 'ctrlV' | 'ctrlShiftV' | 'shiftInsert';

but the settings UI (app/src/pages/settings/RecordingInputSection.tsx) offers only the two Ctrl
combos, and there is logic that resets shiftInsert back to ctrlV.

Shift+Insert contains no letter key, so a keyboard-layout switcher cannot degrade it into a
stray character — unlike Ctrl+V / Ctrl+Shift+V, which are built from Key::Unicode('v') in
app/src-tauri/src/insertion.rs. Re-exposing this option would fix the v problem for
clipboard-paste mode with no new code.

Why it matters

Dictation into e-mail and web forms is the main use case. Text arriving in a different font has to
be reformatted by hand after every insertion, which cancels most of the time saved by dictation.

Thanks for the app — it works well otherwise.

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