You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@lslan/screen-keyboard

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lslan/screen-keyboard

A virtual keyboard for screen input

1.0.1
latest
Source
npmnpm
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

screen-keyboard

Downloads Version

English | 简体中文

Getting started

Install

pnpm i @lslan/screen-keyboard
# or
npm install @lslan/screen-keyboard
# or
yarn add @lslan/screen-keyboard

How to use?

Global

import { createApp } from 'vue'
import App from './App.vue'
import ScreenKeyboard from '@lslan/screen-keyboard'
import '@lslan/screen-keyboard/dist/screen-keyboard.css'

const app = createApp(App).mount('#app')
app.use(ScreenKeyboard)

Local

<script setup lang="ts">
import { ref } from 'vue'
import { Keyboard, KeyboardInput } from '@lslan/screen-keyboard'
import '@lslan/screen-keyboard/dist/screen-keyboard.css'

const inputValue = ref('')

function handleInput(key: string) {
  console.log("key:", key)
}

</script>

<template>
  <div>
    <Keyboard @input="handleInput" />
    <KeyboardInput v-model:value="inputValue" />
  </div>
</template>

Components

Component nameDescriptions
KeyboardProvides a numeric and alphabetic keyboard, and its position can be dragged
KeyboardInputAn input component with the virtual keyboard

Keyboard

PropertyDescriptionTypeDefault
defaultTypeThe default keyboard typenumber | textnumber
positionThe initial position of the keyboard panel on the screen when it is displayedcenter |topCenter | bottomCenter | leftTop | leftBottom | rightTop | rightBottom | [number,number]leftBottom
allowToggleAllow keyboard type switchingbooleanfalse
canMoveCan keyboard panel be moved by draggingbooleantrue
onCloseCallback when click the Close button() => void-
onInputCallback when input(key:string, isDelete:boolean, isDeleteAll:boolean) => void-
onConfirmCallback when click the Confirm button() => void-
onDeleteCallback when click the Backspace button() => void-
onDeleteAllCallback when click the Clear button() => void-

KeyboardInput

PropertyDescriptionTypeDefault
value(v-model)The input content valuestring-
showWhether to show the keyboard panelbooleanfalse
sizeThe size of the input boxsmall | middle | largemiddle
isFocusShowAuto show the keyboard panel when focusbooleanfalse
disabledWhether the input is disabledbooleanfalse
defaultTypeThe default keyboard typenumber | textnumber
positionThe initial position of the keyboard panel on the screen when it is displayedcenter | leftTop | leftBottom | rightTop | rightBottom | [number,number]leftBottom
allowToggleAllow keyboard type switchingbooleanfalse
canMoveCan the keyboard panel be moved by draggingbooleantrue
onInputCallback when input(key:string, isDelete:boolean, isDeleteAll:boolean) => void-
onChangeCallback when value change(value:string) => void-
onConfirmCallback when click the Confirm button(value:string) => void-
onCloseCallback when keyboard panel display() => void-
onOpenCallback when keyboard panel show() => void-

Keywords

virtual-keyboard

FAQs

Package last updated on 24 Mar 2025

Did you know?

Socket

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