Git Product home page Git Product logo

wvkbd's Introduction

wvkbd - On-screen keyboard for wlroots that sucks less

This project aims to deliver a minimal but practically usable implementation of a wlroots on-screen keyboard in legible C. This will only be a keyboard, not a feedback buzzer, led blinker, or anything that requires more than what's needed to input text quickly. The end product should be a static codebase that can be patched to add new features.

Features

  • Typing, modifier locking, layout switching
  • Positive visual feedback on key presses
  • Custom layouts and underlying keymaps
  • On-the-fly layout and keymap switching
  • Custom color schemes
  • Proper font drawing
  • Intuitive layouts
  • International layouts (cyrillic, arabic)
  • Support for 'Copy' keys which are not on the keymap
  • Emoji support
  • Compose key for character variants (e.g. diacritics)
  • Show/hide keyboard on signals (SIGUSR1 = hide, SIGUSR2 = show)
  • Automatic portrait/landscape detection and subsequent layout switching

There are some areas that still need work:

  • Make sure the virtual input method in wayland is working as best as it can
  • Support for input method protocol in wayland, ability to respond to text fields

Install

You'll need the following developer packages

  • pangocairo
  • wayland-client
  • xkbcommon

Make any customizations you would like in config.def.h and run make

The default set of layouts is called mobintl (mobile international), which groups various layouts aimed at mobile devices and also attempts to accommodate various international users. The resulting binary is called wvkbd-mobintl.

You can, however, define your own layouts by copying and and modifying layout.mobintl.h and keymap.mobintl.h (replace mobintl for something like yourlayout). Then make your layout set using make LAYOUT=yourlayout, and the resulting binary will be wvkbd-yourlayout

Usage

Run wvkbd-mobintl (or the binary for your custom layout set).

You can switch between the layouts/layers of the keyboard by pressing the Abc/Sym key in the bottom-left. If you only want a subset of the available layers, you can define which wants you want and in what order you want to cycle through them using the -l parameter. This takes takes a ordered comma separated list of layout names that are defined in your layout set.

The keyboard can be hidden by sending it a SIGUSR1 signal and shown again by sending it SIGUSR2. This saves some start up time and may be appropriate in some low-resource environments.

Wvkbd has an output mode -o that will echo its output to standard output. This facility can be used if users want audio/haptic feedback, a feature explicitly out of scope for wvkbd. To achieve this, simply pipe wvkbd's output through the external tool clickclack:

$ wvkbd-mobintl -l simple,special,emoji -o | clickclack -V -f keypress.wav

Another output mode, -O will let the keyboard output keys which are swiped over. It can be used by an external program, such as swipeGuess to get swipe-typing support.

$ wvkbd-mobintl -O | swipeGuess.sh words.txt | completelyTypeWord.sh

Contribute

Any contributions are welcome, please tell me what I did wrong in issues or PRs. I could also use some nice branding if that tickles your fancy.

For code contributions, all I ask for now is you run make format (requires clang-format) before opening a PR and include as much relevant detail as possible.

Related projects

  • clickclack - Audio/haptic feedback (standalone)
  • swipeGuess - Word-completion for swipe-typing
  • Sxmo - A hackable mobile interface environment for Linux phones that adopted wvkbd as its keyboard
  • svkbd - A similar project as wvkbd but for X11 rather than Wayland
  • squeekboard - The virtual keyboard developed for the Librem5 (used by Phosh)

wvkbd's People

Contributors

proycon avatar jjsullivan5196 avatar earboxer avatar derlaft avatar alpabrz avatar wart-github avatar bolbishvili 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.