문제

There is an excellent jQuery on-screen keyboard plugin by Mottie: https://github.com/Mottie/Keyboard

By default text from the keyboard goes into additional input and then can be accepted or cancelled. If text is accepted it goes into the source textarea/input.

But is there a way to input directly from the keyboard to the source textarea/input without the need to accept it (like with mobile keyboards on android/ios)?

도움이 되었습니까?

해결책

The documentation for the plugin is contained in GitHub wiki pages.

The option needed not include a preview is called usePreview (ref); set it to false (demo):

To autoaccept the contents, set the autoAccept option to true

$('#keyboard').keyboard({
    layout: 'qwerty',

    // true: preview added above keyboard;
    // false: original input/textarea used
    usePreview: false

    // Auto-accept content when clicking outside the
    // keyboard (popup will close)
    autoAccept: true

});
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top