A lightweight, floating on-screen keyboard widget built for Quickshell. It operates as a standalone overlay window and uses ydotool for broad input compatibility across Wayland compositors.
- Wayland Native: Runs as a
WlrLayer.Overlaywindow to float above applications. - Touch & Mouse Friendly:
- Draggable: Grab the background to move the keyboard anywhere on screen.
- Resizable: Drag the bottom-right corner to resize. The layout scales dynamically.
- Advanced Modifiers:
- 3-State Logic: Supports Normal (Hold), One-Shot (Tap once), and Locked (Tap twice) states for Shift, Ctrl, and Alt.
- Visual Feedback: Keys change color to indicate active (Blue) or locked (Purple) states.
- Caps Lock Support: Internal emulation to ensure reliable capitalization.
- Auto-Repeat: Holding Backspace deletes text continuously.
- Quickshell: The shell environment.
- ydotool: Required for injecting keystrokes.
- Note: The
ydotoolddaemon must be running for input to work.
- Note: The
-
Clone this repository into your Quickshell config folder (e.g.,
~/.config/quickshell/osk):~/.config/quickshell/osk/ βββ OnScreenKeyboard.qml βββ OskContent.qml βββ OskKey.qml βββ layouts.js -
Start the Daemon: Ensure the backend service is active.
systemctl --user enable --now ydotool -
Usage: Import and instantiate the component in your main
shell.qml:import QtQuick import Quickshell import "./osk" ShellRoot { // The keyboard manages its own window and positioning OnScreenKeyboard { id: osk // Optional: Bind visibility to a variable to toggle it // visible: true } }
Key layouts are defined in layouts.js. The default layout is "English (US)". You can customize keys or add new language maps by editing the byName object.
- Dimensions: Default start size is set in
OnScreenKeyboard.qml(currentW,currentH). - Colors: Appearance is defined in
OskKey.qml(Backgrounds, Borders, Text).
| State | Action | Visual Color | Behavior |
|---|---|---|---|
| Off | - | Dark Gray | Normal typing. |
| One-Shot | Tap Modifier x1 | Blue | Modifier applies to the next key only, then turns off. |
| Locked | Tap Modifier x2 | Purple | Modifier stays active until clicked again. |