Skip to content

ydotool input method fails: --key-delay receives float instead of integerΒ #128

@RasmusGodske

Description

@RasmusGodske

Description

When using ydotool as the input method on Wayland, transcription fails because the --key-delay argument receives a float value (e.g., 5.0) instead of an integer, which ydotool rejects.

Error Message

ydotool: type: error: the argument ('5.0') for option '--key-delay' is invalid

Root Cause

(Suggested by ClaudeCode and not manually verified or tested)

In src/input_simulation.py, line 95:

str(interval * 1000),

When writing_key_press_delay is 0.005, this produces "5.0" (a float string) instead of "5" (an integer string).

Suggested Fix

(Suggested by ClaudeCode and not manually verified or tested)

Change line 95 in src/input_simulation.py from:
str(interval * 1000),
to:
str(int(interval * 1000)),

Workaround

Set writing_key_press_delay to 0 in the config, which produces an integer.

Environment

  • OS: Ubuntu 24.04 (Wayland/GNOME)
  • Python: 3.11
  • ydotool version: (from apt)
  • WhisperWriter: latest from main branch

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