- Notifications
You must be signed in to change notification settings - Fork61
On-screen keyboard for wlroots
License
GPL-3.0, Unknown licenses found
Licenses found
jjsullivan5196/wvkbd
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This project aims to deliver a minimal but practically usable implementation of a wlroots on-screenkeyboard in legible C. This willonly be a keyboard, not a feedback buzzer,led blinker, or anything that requires more than what's needed to input textquickly. The end product should be a static codebase that can be patched to addnew 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, persian, greek, georgian)
- 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, SIGRTMIN = toggle)
- 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 textfields
You'll need the following developer packages
- cairo
- pango
- wayland-client
- xkbcommon
You also needscdoc to generate the documentation.
Make any customizations you would like inconfig.def.h
and runmake
The default set of layouts is calledmobintl
(mobile international), which groups various layouts aimed at mobile devicesand also attempts to accommodate various international users. The resulting binary is calledwvkbd-mobintl
.
You can, however, define your own layouts by copying and modifyinglayout.mobintl.h
andkeymap.mobintl.h
(replacemobintl
for something likeyourlayout
). Then make your layout set usingmake LAYOUT=yourlayout
, andthe resulting binary will bewvkbd-yourlayout
Runwvkbd-mobintl
(or the binary for your custom layout set).
You can switch between the layouts/layers of the keyboard by pressing the⌨ key (little keyboard) the bottom-left (press shift to iterate back instead offorward). If you only want a subset of the available layers, you can definewhich you want and in what order you want to cycle through them using the-l
parameter (or--landscape-layers
for landscape mode). This takes takes a ordered comma separated list of layout namesthat are defined in your layout set.
The keyboard can be hidden by sending it aSIGUSR1
signal, shown again by sending itSIGUSR2
or toggled by sending itSIGRTMIN
.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 wantaudio/haptic feedback, a feature explicitly out of scope for wvkbd. To achieve this, simply pipe wvkbd's output through the external toolclickclack:
$ 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 asswipeGuess to get swipe-typing support.
$ wvkbd-mobintl -O | swipeGuess.sh words.txt | completelyTypeWord.sh
The default mobile international layout features a Compose button (Cmp
)which, when combined with another key, opens up a layout that offers variantsfor that key. This is similar to functionality that other keyboards implementedusing along press (wvkbd has no such notion, holding a key will repeatit like on a physical keyboard).
For example, press Cmp + a to access variants with diacritics like á,à,â,ä, etc..
Most layouts also feature the following that are less obvious:
- Press Cmp +
.
to access more punctuation - Press Cmp +
-
or,
to access 'mathematical' symbols (+,-,=,etc) - Press Cmp +
'
or0
or9
to access more brackets and quotes - Press Cmp +
q
to access emojis
Last, but not least, pressing Cmp + space or Cmp + ⌨ or Cmp + Abc opens up an index that allows you to immediately jump to anylayout by name, even layouts not explicitly added to your layers on startup.
Any contributions are welcome, there are two ways to contribute, the first one ispreferred:
- Sourcehut - Submit your patches using
git mail
to~mil/sxmo-devel@lists.sr.ht, followthese contribution guidelines. Questions can also be asked on Sxmo'smailing lists. - Github - Submit a pull request or open an issue(legacy method)
This project was started byJohn Sullivan and iscurrently being maintained by theSxmo project, whosemaintainers will ensure both git remotes are kept in sync at all times.
For code contributions, please runmake format
(requiresclang-format
)before sending a patch (opening a PR) and include as much relevant detail aspossible.
- 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 (usedby Phosh)
About
On-screen keyboard for wlroots