[GH-ISSUE #481] onKeyPress type exists but is not implemented in Solid #893

Open
opened 2026-03-14 08:58:05 +03:00 by kerem · 2 comments
Owner

Originally created by @GreyElaina on GitHub (Jan 7, 2026).
Original GitHub issue: https://github.com/anomalyco/opentui/issues/481

Originally assigned to: @Adictya on GitHub.

Hey! I noticed that onKeyPress is defined in the Solid types but doesn't actually do anything.

Where it's defined:

  • packages/solid/src/types/elements.ts line 130 - TextareaProps has onKeyPress?: (event: KeyEvent) => void

What's missing:

  • packages/solid/src/reconciler.ts has no handling for onKeyPress
  • Core's Renderable only has onKeyDown, there's no onKeyPress equivalent

So if someone tries to use onKeyPress on a textarea, TypeScript will be happy but the handler will never fire.

Options:

  1. Remove the type definition (breaking change, but honest)
  2. Implement it in the reconciler (would need core support first)
  3. Add a deprecation note
Originally created by @GreyElaina on GitHub (Jan 7, 2026). Original GitHub issue: https://github.com/anomalyco/opentui/issues/481 Originally assigned to: @Adictya on GitHub. Hey! I noticed that `onKeyPress` is defined in the Solid types but doesn't actually do anything. **Where it's defined:** - `packages/solid/src/types/elements.ts` line 130 - `TextareaProps` has `onKeyPress?: (event: KeyEvent) => void` **What's missing:** - `packages/solid/src/reconciler.ts` has no handling for `onKeyPress` - Core's `Renderable` only has `onKeyDown`, there's no `onKeyPress` equivalent So if someone tries to use `onKeyPress` on a textarea, TypeScript will be happy but the handler will never fire. Options: 1. Remove the type definition (breaking change, but honest) 2. Implement it in the reconciler (would need core support first) 3. Add a deprecation note
Author
Owner

@kommander commented on GitHub (Jan 26, 2026):

cc @Adictya thoughts?

<!-- gh-comment-id:3800803854 --> @kommander commented on GitHub (Jan 26, 2026): cc @Adictya thoughts?
Author
Owner

@Adictya commented on GitHub (Jan 27, 2026):

Yeah looks like its outdated, looking into it more.

Ill try to propose a longterm solution here and maybe try catching stuff like this in ci. Also i think its time to pull the types to a shared lib ( @msmps lmk if you have any thoughts on this ) will try and put a pr up so we can get started on that too

<!-- gh-comment-id:3805361259 --> @Adictya commented on GitHub (Jan 27, 2026): Yeah looks like its outdated, looking into it more. Ill try to propose a longterm solution here and maybe try catching stuff like this in ci. Also i think its time to pull the types to a shared lib ( @msmps lmk if you have any thoughts on this ) will try and put a pr up so we can get started on that too
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/opentui#893
No description provided.