| include | ||
| src | ||
| wayland-protocols | ||
| .gitignore | ||
| build.rs | ||
| Cargo.lock | ||
| Cargo.toml | ||
| COPYING3 | ||
| README.md | ||
The Unfettered Keyboard is an on-screen keyboard for Linux mobile.
User Interfaces (UIs)
Phosh
Phosh has a D-Bus API for showing the keyboard without focusing on a text box. The keyboard can be shown by making a long press on the bottom of the screen. The API tells the keyboard to activate while making text-emitting keys fall back to emitting key presses.
Phoc, the compositor, does not implement all Wayland text input protocols. Most Qt applications require manually activating the keyboard and can only accept keys supported by xkbcommon (e.g. no "‹", "›", "₹", "₽", "₴", "₿", or "₱").
Build target
The ufkbd-gnome build target is for Phosh.
Switching keyboards
The keyboard program is specified in the Exec= line of
/usr/share/applications/sm.puri.OSK0.desktop. Change it to the absolute path
of your keyboard.
Plasma Mobile
Plasma Mobile has no mechanism to show or hide the keyboard without a text field.
Kwin does not implement the Wayland virtual keyboard protocol. Most applications can only accept text and do not handle the key events that an input method can emit (i.e. no Ctrl or Alt modifiers, no Enter key, no Escape key, Tab only works with Fn, no arrow keys).
Build target
The ufkbd-wl build target is for Plasma Mobile.
Switching keyboards
In your $PATH (usually includes /usr/local/bin), Plasma Mobile looks for
maliit-keyboard. You can symlink it to your desired keyboard.
Alternatively, you could edit the startplasmamobile script and replace
maliit-keyboard with your desired on-screen keyboard, but this may require
adding support for your keyboard to KDE.
SXMO (Wayland)
SXMO shows and hides the on-screen keyboard by running and terminating it. The on-screen keyboard does not handle visibility.
Build target
The ufkbd-sxmo build target is for SXMO.
Switching keyboards
Set the $KEYBOARD environment variable to your desired keyboard.
Other
Most Wayland compositors have no mechanism to show or hide the keyboard without a text field.
Build target
The ufkbd-wl build target is for most compatible Wayland compositors.
Switching keyboards
Configure your desired keyboard to run on startup. This may mean a desktop file
in ~/.config/autostart.
TTYescape
In the TTY, on-screen keyboards can emit key presses with uinput. A special Linux keymap API also allows arbitrary text to be emitted. Backspace might not work as expected when typing multi-byte UTF-8 characters.
Build target
The ufkbd-evfb build target is for the TTY.
Full-disk encryption on postmarketOS
For full-disk encryption, the password is expected on stdout. The keyboard needs to process individual key events by itself. It is similar to TTYescape where the keyboard is rendered to the framebuffer.
Build target
The ufkbd-evfbo build target is for password entry.
Switching keyboards
Set the KEYBOARD property in /etc/conf.d/ttyescape.conf to your desired
keyboard.
Installation
This program has the following build dependencies:
- libexpat (Alpine package:
expat-dev), the fast streaming XML parser written in C99 with >90% test coverage. - libclang (Alpine package:
clang-libclang), a compiler front-end for the C family of languages (C, C++, Objective-C, and Objective-C++). - fontconfig
(Alpine package:
fontconfig-dev), the font configuration and customization library. - wayland-scanner
(Alpine package:
wayland-dev), a code generator for extra XML protocols.
You can install it with:
$ cargo install --bin <target>
Layouts are essential and not installed by cargo. They are installed manually:
$ sudo mkdir -p /usr/share/unfettered-keyboard/layouts
$ curl -OL https://github.com/Julow/Unexpected-Keyboard/raw/1.29.1/srcs/layouts/latn_qwerty_us.xml
$ sudo mv latn_qwerty_us.xml /usr/share/unfettered-keyboard/layouts
$ curl -OL https://github.com/Julow/Unexpected-Keyboard/raw/1.29.1/res/xml/bottom_row.xml
$ sudo mv bottom_row.xml /usr/share/unfettered-keyboard/layouts
$ curl -OL https://github.com/Julow/Unexpected-Keyboard/raw/1.29.1/res/xml/numeric.xml
$ sudo mv numeric.xml /usr/share/unfettered-keyboard/layouts
$ curl -OL https://github.com/Julow/Unexpected-Keyboard/raw/1.29.1/res/xml/greekmath.xml
$ sudo mv greekmath.xml /usr/share/unfettered-keyboard/layouts
Configuration
This keyboard is configured with YAML.
Configuration example:
%YAML 1.2
---
layout: latn_qwerty_us.xml
longpress_ms: 600
repeat_ms: 25
wayland:
height: 185
input-method: true
colors:
background: [0, 0, 0]
keycap: [0, 0, 0]
keycap_pressed: [51,51,51]
label: [255, 255, 255]
label_locked: [25, 255, 0]
label_pressed: [255, 153, 0]
sublabel: [178, 178, 178]
License
Unfettered Keyboard is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 3 of the License.
Prior to version 2.0.0, Gitlab automatically displayed "3.0 or later", but that was not the intended license as seen in the source code files. Version 2.0.0 ensures that the wrong license would not be displayed on Gitlab.