wvkbd

git clone https://git.tarina.org/wvkbd
Log | Files | Refs | README | LICENSE

commit 69616c14947eef5a76cfe1dd4f0852a7206e57df
parent faaf3f0498268883c780dafec9e3aea2adbe1eca
Author: Maarten van Gompel <proycon@anaproy.nl>
Date:   Fri, 27 Aug 2021 00:22:24 +0200

README update to reflect the latest changes, included screenshots

Diffstat:
MREADME.md | 74+++++++++++++++++++++++++++++++++++++++++++++++++-------------------------
Acontrib/wvkbd-mobintl-cyrillic.jpg | 0
Acontrib/wvkbd-mobintl-landscape.jpg | 0
Acontrib/wvkbd-mobintl.jpg | 0
4 files changed, 49 insertions(+), 25 deletions(-)

diff --git a/README.md b/README.md @@ -1,56 +1,72 @@ # wvkbd - On-screen keyboard for wlroots that sucks less -<img src="https://raw.githubusercontent.com/jjsullivan5196/wvkbd/master/contrib/grab.png" width=350 /> +<img src="https://raw.githubusercontent.com/proycon/wvkbd/master/contrib/wvkbd-mobintl.jpg" width=300 /> <img src="https://raw.githubusercontent.com/proycon/wvkbd/master/contrib/wvkbd-mobintl-cyrillic.jpg" width=300 /> -This project aims to deliver a minimum implementation of a wlroots on-screen +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. -At the moment work still needs to be done to make the keyboard fully functional -and determine a minimum feature set. As of now, the following works: - ## Features - Typing, modifier locking, layout switching - Positive visual feedback on key presses - - Custom layouts + - 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 relatively critical areas that still need work: - - Proper drawing of font glyphs/fontconfig alternatives (unknown glyphs for the - configured font are not drawn) - - Make sure the virtual input method in wayland is working as best as it can - - Customize keyboard window docking - - Nicer layout drawing/padding - - Determine if some dependencies are really needed (fontconfig is VERY - annoying, and wld may not be strictly necessary) +<img src="https://raw.githubusercontent.com/proycon/wvkbd/master/contrib/wvkbd-mobintl-landscape.jpg" width=640 /> -And some nice to haves: +There are some areas that still need work: - - Daemon mode (hide/show keyboard on signals) + - 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 - - Alt input modes for things like emojis - - Typical international layouts in the repository - -Of course there's probably some more I'm forgetting, everything here is very -much early WIP so things will change very quickly. ## Install You'll need the following developer packages - - fontconfig + - pangocairo - wayland-client - xkbcommon - - pixman -After cloning this repo, run `git submodule update --init --recursive` +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 -Make any customizations you would like in `config.h` and run `make`, then `./wvkbd` +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](https://git.sr.ht/~proycon/clickclack): + +`$ wvkbd-mobileintl -l simple,special,emoji -o | clickclack -V -f keypress.wav` ## Contribute @@ -60,3 +76,11 @@ 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](https://git.sr.ht/~proycon/clickclack) - Audio/haptic feedback (standalone) +* [Sxmo](https://sxmo.org) - A hackable mobile interface environment for Linux phones that adopted wvkbd as its keyboard +* [svkbd](https://tools.suckless.org/x/svkbd/) - A similar project as wvkbd but for X11 rather than Wayland +* [squeekboard](https://gitlab.gnome.org/World/Phosh/squeekboard) - The virtual keyboard developed for the Librem5 (used + by Phosh) diff --git a/contrib/wvkbd-mobintl-cyrillic.jpg b/contrib/wvkbd-mobintl-cyrillic.jpg Binary files differ. diff --git a/contrib/wvkbd-mobintl-landscape.jpg b/contrib/wvkbd-mobintl-landscape.jpg Binary files differ. diff --git a/contrib/wvkbd-mobintl.jpg b/contrib/wvkbd-mobintl.jpg Binary files differ.