Socket
Socket
Sign inDemoInstall

cosmic-tamil-keyboard

Package Overview
Dependencies
9
Maintainers
1
Versions
70
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    cosmic-tamil-keyboard

React.js Tamil Virtual Keyboard


Version published
Weekly downloads
28
increased by3.7%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

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 handleKeyboardChange = (data) => {
    setdata((inputData) => ({ ...inputData, inputs: data, }))
  };
  return (
    <>
	{/* Pass all the input field properties same as example to get expected output. This keyboard only applicable for antd input.*/}
      <Input 
	 	    type="text"
	  	  id="virtualkeyID"
        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}
		// To 'set' keyboard input values to above input field
        keydatavalue={handleKeyboardChange}
        ref={keyboardRef}
		// 'inputid' same as above input field 'id'
        inputid={"virtualkeyID"}
		// 'inputref' same as above input field 'ref'
        inputref={inputRef} /> 
    </>

  );
}

Features

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

API

Properties (All are mandatory)DescriptionTypeDefault
visibleshow & hidebooleantrue
keydatavalueset user keyboard input values to targeted input fieldInput change function()empty
keysoundsound enable/disablebooleantrue
inputidset inputid value same as text field idstringany string
inputrefset inputref value same as text field refanycreateRef()/useRef()

Images

Keywords

FAQs

Last updated on 03 Oct 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc