Git Product home page Git Product logo

qtfreevirtualkeyboard's Introduction

QtFreeVirtualKeyboard

A QML based on screen virtual keyboard for embedded QML applications.

Screenshot

As soon as you implement your first QML application for an embedded touchscreen device, you will notice, that the open source version of Qt lacks a virtual on screen keyboard. I'm an experienced Qt developer, but I'm a complete newbie when it comes to QML programming. I'm a great fan of the Beaglebone Black embedded Linux device and I just ordered a capacitive touchscreen device for my bone. I started learning QML to create an example application for my Beaglebone. I quickly realized that an important essential piece was missing for entering text and values: a virtual on screen keyboard for embedded QML applications - that means for applications without a window manager like X11 or Wayland.

There is a nice solution for Qt Enterprise version: Qt Virtual Keyboard. The documentation also comes with a nice technical guide that shows how they implemented the virtual keyboard. They implemented QPlatformInputContextPlugin and QPlatformInputContext interfaces. I googled a little bit to find a similar open source solution and found the fantastic blog post from Tomasz Olszak. He did a virtual keyboard mockup for Qt applications on systems with a window manager (Windows or Linux Desktop). Interesting for me was the fact, that he also implemented QPlatformInputContextPlugin and QPlatformInputContext to provide its on screen keyboard. So it seems to be the right way for implementing a virtual keyboard. The UI of Tomasz implementation was completely QML based - so it was perfectly suited for integration into QML applications.

Long story short, I simply copied his code and modified it, to enable integration into embedded QML applications without window manager. I added a little bit of functionality (i.e. character preview popup, or automatic scrolling of flickable elements if keyboard overlaps focused input element). So I have to say a big thank you to Tomasz Olszak for providing a nice virtual keyboard mockup. The example application in examples/qmlapp has been copied from the Qt Virtual Keyboard example. I only did some minor modifications to run the example with my Virtual Keyboard implementation instead of the Qt Enterprise Virtual Keyboard.

This implementation is far from feature complete. But I think it is a starting point for people that need to implement virtual keyboard support for QML applications. Keep in mind that I'm a QML newbie and that my QML is far from beeing perfect. So if you find something in my QML code that could be done better, then please tell me or send me a pull request.

qtfreevirtualkeyboard's People

Contributors

githubuser0xffff avatar vinifr avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.