Deliver button release events for the Smatek S9E function keys

オープン
#204 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
android, kotlin

調査の方向性

Start by tracing the S9E accessibility onKeyEvent path and EvdevStreamSession, which the issue identifies as dropping release events. Check how the button event entity defines its fixed event-type list and how per-panel hardware profiles scope button handling. Done means F1–F4 release events reach Home Assistant for the S9E without duplicate reports, while existing press events remain compatible; the event naming and scoping decisions are open.

索引モデルが issue の本文から書いたものです。

説明

enhancement in progress
What problem would this solve?

On the Smatek S9E, the four function keys (F1–F4) currently report to Home Assistant only on press - event.<panel>_button fires keycode_fN on the down edge, and the release is dropped. I'd like release reported too, so automations can do press-and-hold / momentary actions with these keys.

Confirmed feasible on hardware: the S9E's adc-keys device emits both edges - getevent -l /dev/input/event3 shows a DOWN then UP for each of F1–F4. The release just isn't surfaced: EvdevStreamSession emits only value==1 for keys, and the accessibility onKeyEvent path forwards only DOWN.

Proposed solution

I drafted the code changes locally but decided against a PR since there are two decisions which i would like leave to you:

  1. Event shape - the button channel is an HA event entity with a fixed, descriptor-driven event-type list (flat string, no attributes), so a distinct type per edge seems to fit: keep keycode_f1 on press (backward-compatible) and add e.g. keycode_f1_released. Your call on the convention.

  2. Scope - I only want this for the S9E's F1–F4, not fleet-wide. The S9E currently surfaces these via the generic accessibility path (evdev_buttons: []), which has no per-panel scoping; declaring them as evdev_buttons would scope it per-profile but may double-report against the a11y path. I'd rather you pick the cleanest approach.

Panel hardware (if hardware-specific)

Smatek S9E

Hardware control path (for hardware features)
EV_KEY       KEY_F1               DOWN
EV_SYN       SYN_REPORT           00000000
EV_KEY       KEY_F1               UP
EV_SYN       SYN_REPORT           00000000
EV_KEY       KEY_F2               DOWN
EV_SYN       SYN_REPORT           00000000
EV_KEY       KEY_F2               UP
EV_SYN       SYN_REPORT           00000000
EV_KEY       KEY_F3               DOWN
EV_SYN       SYN_REPORT           00000000
EV_KEY       KEY_F3               UP
EV_SYN       SYN_REPORT           00000000
EV_KEY       KEY_F4               DOWN
EV_SYN       SYN_REPORT           00000000
EV_KEY       KEY_F4               UP
EV_SYN       SYN_REPORT           00000000
主要言語
Kotlin
スター
63
フォーク
5
平均マージ
1日 5時間
マージ済み PR(30日)
11

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

panel-assistant/android のほかの issue

panel-assistant/android の issue をすべて見る

似ている issue

Kotlin の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。