Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] - No work onchange event input #102

Open
TalhaAksoy opened this issue Nov 8, 2024 · 0 comments
Open

[BUG] - No work onchange event input #102

TalhaAksoy opened this issue Nov 8, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@TalhaAksoy
Copy link

OS : Macos
Broswer : Google Chrome
Version : 130.0.6


when i try write something with keyboard input onChange event not working.

Code Example

import KioskBoard from "kioskboard";
import { useEffect, useRef } from "react";
import { Input } from "@nextui-org/react";

export default function App() {
    const inputRef = useRef<HTMLInputElement>(null);
    const handleInputChange = (e) => {
        console.log(e.target.value);
    }

    useEffect(() => {
        if (inputRef.current) {
            KioskBoard.run(inputRef.current, {
                language: "tr",
                theme: "dark",
                keysArrayOfObjects: [
                    {
                        "0": "Q",
                        "1": "W",
                        "2": "E",
                        "3": "R",
                        "4": "T",
                        "5": "Y",
                        "6": "U",
                        "7": "I",
                        "8": "O",
                        "9": "P"
                    },
                    {
                        "0": "A",
                        "1": "S",
                        "2": "D",
                        "3": "F",
                        "4": "G",
                        "5": "H",
                        "6": "J",
                        "7": "K",
                        "8": "L"
                    },
                    {
                        "0": "Z",
                        "1": "X",
                        "2": "C",
                        "3": "V",
                        "4": "B",
                        "5": "N",
                        "6": "M"
                    }
                ],
            });
        }
    }, [inputRef]);

    return (
        <div className="App">
            <Input
                ref={inputRef}
                type="text"
                data-kioskboard-type="keyboard"
                placeholder="normal keyboard"
                onChange={handleInputChange}
            />
        </div>
    );
}
@TalhaAksoy TalhaAksoy added the bug Something isn't working label Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants