-
Notifications
You must be signed in to change notification settings - Fork 395
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Issue Title
Bug: useKeyboard hook not responding and createSignal updates not reflecting on Windows (MINGW64/Git Bash)
Issue Body
Description
I copied a simple counter example from the official OpenTUI Solid documentation. The example uses useKeyboard to handle key presses (Up/Down arrows for counting, ESC to exit) and createSignal for state management. However, neither the keyboard events nor the signal updates are working on Windows when running with Bun in a Git Bash (MINGW64) terminal.
Reproduction Steps
- Create a new project using
bun create tui - Copy the following code into
src/index.tsx(exactly as shown in the docs):
import { render, useKeyboard } from "@opentui/solid"
import { createSignal } from "solid-js"
const App = () => {
const [count, setCount] = createSignal(0)
useKeyboard((key) => {
if (key.name === "up") setCount((c) => c + 1)
if (key.name === "down") setCount((c) => c - 1)
if (key.name === "escape") process.exit(0)
})
return (
<box border padding={2}>
<text>Count: {count()}</text>
<text fg="#888">Up/Down to change, ESC to exit</text>
</box>
)
}
render(App)- Run with
bun run dev - Try pressing Up/Down arrow keys or ESC
Expected Behavior
- Pressing Up arrow should increment the counter (display updates)
- Pressing Down arrow should decrement the counter (display updates)
- Pressing ESC should exit the application
Actual Behavior
- The counter remains at 0 and does not update
- The keyboard event handler inside
useKeyboardcallback is never called (verified by adding console.log) - ESC does not exit the application
- The UI renders correctly but is completely unresponsive to keyboard input
Environment
OS and Terminal:
- OS: Windows 10 (Build 19045)
- Shell: MINGW64_NT-10.0-19045 (Git Bash for Windows)
- Terminal: Git Bash terminal
Runtime and Package Versions:
- Node.js: v22.19.0
- Bun: 1.3.6
- TypeScript: ^5
@opentui/core: 0.1.81@opentui/solid: 0.1.81solid-js: 1.9.9
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working