![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
mhx-vue-touch-keyboard
Advanced tools
Virtual keyboard component for Vue.js v2.x. Designed to Raspberry Pi Touch Display
If you like my work, please donate. Thank you!
You can install it via NPM.
$ npm install vue-touch-keyboard
Download zip package and unpack and add the vue-touch-keyboard.css
and vue-touch-keyboard.js
file to your project from dist folder.
https://github.com/icebob/vue-touch-keyboard/archive/master.zip
<template>
<div>
<input type="text" placeholder="Text input" @focus="show" data-layout="normal" />
<vue-touch-keyboard :options="options" v-if="visible" :layout="layout" :cancel="hide" :accept="accept" :input="input" />
</div>
</template>
<script>
import VueTouchKeyboard from "vue-touch-keyboard";
import style from "vue-touch-keyboard/dist/vue-touch-keyboard.css"; // load default style
Vue.use(VueTouchKeyboard);
export default {
data: {
visible: false,
layout: "normal",
input: null,
options: {
useKbEvents: false,
preventClickEvent: false
}
},
methods: {
accept(text) {
alert("Input text: " + text);
this.hide();
},
show(e) {
this.input = e.target;
this.layout = e.target.dataset.layout;
if (!this.visible)
this.visible = true
},
hide() {
this.visible = false;
}
}
}
</script>
Property | Default | Accepted values | Description |
---|---|---|---|
input | required | HTMLInputElement | The target input HTML element |
layout | required | String or Object | Layout of keys. If you are using the built-in layouts, you can set as the name of the layout. If you want to use custom layout, you need to set a layout Object . |
accept | null | Function | Event handler. Fired when the "Accept/Close" button pressed. |
cancel | null | Function | Event handler. Fired when the "Cancel" button pressed. |
change | null | Function | Event handler. Fired when the input value changed. |
next | null | Function | Event handler. Fired when the "Next" button pressed or the length of the value of the input reached the maxLength of the input |
options | {} | Object | Functional options. |
defaultKeySet | default | String | Default key set. You can choose a desired key set of your layout to be used when a keyboard is initialized. |
Option | Default | Accepted values | Description |
---|---|---|---|
useKbEvents | false | boolean | If true, the component will generate a keydown event and trigger it. If it returns with false , it won't insert the new character. |
preventClickEvent | false | boolean | If true, the component will preventDefault the click event. |
normal
- Normal full layout. Similar as real keyboard layoutsnumeric
- Only for numberscompact
- Compact layout. Similar as mobile phone keyboard layoutsThis command will start a webpack-dev-server
with content of dev
folder.
npm run dev
This command will build a distributable version in the dist
directory.
npm run build
npm test
Please send pull requests improving the usage and fixing bugs, improving documentation and providing better examples, or providing some testing, because these things are important.
vue-touch-keyboard is available under the MIT license.
Copyright (C) 2016 Icebob
FAQs
Virtual keyboard component for Vue.js
The npm package mhx-vue-touch-keyboard receives a total of 1 weekly downloads. As such, mhx-vue-touch-keyboard popularity was classified as not popular.
We found that mhx-vue-touch-keyboard demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.