Skip to content

Bug: Left and Right arrow keys don't move the query cursor #25

Open

Description

@adamcbrewer

Summary

When typing a calculation in the launcher, the Left and Right arrow keys don't move the cursor through the expression. This makes it awkward to correct a character in the middle without deleting everything after it.

Steps to reproduce

  1. Open oma-cast.
  2. Type 12+34.
  3. Press Left twice to move back before the 3.
  4. Try typing 5 at that position.
  5. Try moving the cursor with Right as well.

Expected behaviour

Left and Right move the cursor one character at a time. Typing inserts text at the cursor position. In the example above, inserting 5 before 3 should give 12+534.

Actual behaviour

The cursor stays at the end of the expression. Left and Right don't reposition it, and further typing is appended at the end.

Environment

  • oma-cast: 90efedd1b7ff46c49bd8c4f4a248ea926e6a8835, unmodified plugin source
  • Omarchy: v4.0.6-1
  • Hyprland: v0.56.2
  • Quickshell: v0.3.2 (distributed by Omarchy)
  • Launcher opened with a custom Super+Space binding

Code notes

The symptoms appear to come from the launcher's shared query input, rather than the calculator evaluator:

  • handleKey has no Left/Right cursor handling and appends printable characters with window.setQuery(window.query + event.text).
  • The visible query is a Text element, and the caret is positioned at the end of its content. There is no query cursor position to update.

This is based on the observed desktop behaviour and source inspection; no automated input test was run for this report.

Related work

#23 adds input-method support, but its current diff still appends committed text to the query and keeps the displayed caret at the end. It appears related, but doesn't address Left/Right editing. I couldn't find an existing open issue or PR covering this behaviour.

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