JSPM

  • Created
  • Published
  • Downloads 9
  • Score
    100M100P100Q79140F
  • License MIT

Tamil keyboard React components

Package Exports

  • cosmic-tamil-keyboard
  • cosmic-tamil-keyboard/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (cosmic-tamil-keyboard) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Installation

npm install cosmic-tamil-keyboard

##Example

    import { useRef, useState } from 'react';
    import { Input } from 'antd';
    import TamilKeybord  from "cosmic-tamil-keyboard";

 const  App =() =>{
    
  const [data, setdata] = useState({
    visible: true,
    inputs: ""
  });
  const inputRef = useRef();
  const keyboardRef = useRef();

  const handlervalueget = (data) => {
    setdata((inputData) => ({ ...inputData, inputs: data, }))
  };
  return (
    <>
      <Input type="text" id="virtualkeyID"
        onChange={(val)=>onchange(val)}   
        onPaste={(e) => keyboardRef.current.handlePaste(e)}
        onKeyPress={(e) => keyboardRef.current.keypress(e)}
        onKeyDown={(e) => keyboardRef.current.keyup(e)}
        onCut={e => keyboardRef.current.handleCut(e)}
        value={data.inputs}
        ref={inputRef} /> 

      <TamilKeybord  keysound={true}
        visible={data.visible}
        keydatavalue={handlervalueget}
        ref={keyboardRef}
        inputid={"virtualkeyID"}
        inputref={inputRef} /> 
    </>

  );
}

Features

  • Sound effects
  • System keyboard control
  • Draggable
  • Customized color change

###Images

Image: