Skip to content

Bug: KeyCommand LEFT sends NUMPAD4 instead of Left Arrow (missing extended key) #422

@shalak

Description

@shalak

When using the Key command with keycode LEFT in HASS.Agent, the command is interpreted by some target applications as pressing the 4 key instead of the Left Arrow.

This appears to be because NUMPAD 4 is being sent. When NumLock is enabled, this results in the character 4 being produced instead of a left-arrow action.

Additional info / possible root cause

On Windows, Left Arrow and Numpad 4 share the same base scancode (0x4B)

  • Numpad 4 / non-extended Left: 0x004B
  • Keyboard Left Arrow (extended): 0xE04B

The extended E0 prefix distinguishes the arrow key. The current behavior suggests the extended flag is not being sent, causing Windows to interpret the input as Numpad 4.

Source documentation can be found on Keyboard Input Overview page.

Workaround

Use CustomExecutor command with AutoHotkey to send {Left} instead of Key Command.

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