Thanks to visit codestin.com
Credit goes to github.com

Skip to content

A standalone, floating on-screen keyboard for Wayland compositors built with Quickshell and QtQuick. Features a resizable window with aspect ratio locking, smooth animations, and ydotool input injection.

Notifications You must be signed in to change notification settings

Ronin-CK/On-Screen-Keyboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 

Repository files navigation

Quickshell OSK

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.

✨ Features

  • Wayland Native: Runs as a WlrLayer.Overlay window 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.

πŸ› οΈ Requirements

  1. Quickshell: The shell environment.
  2. ydotool: Required for injecting keystrokes.
    • Note: The ydotoold daemon must be running for input to work.

πŸ“‚ Installation

  1. Clone this repository into your Quickshell config folder (e.g., ~/.config/quickshell/osk):

    ~/.config/quickshell/osk/
    β”œβ”€β”€ OnScreenKeyboard.qml
    β”œβ”€β”€ OskContent.qml
    β”œβ”€β”€ OskKey.qml
    └── layouts.js
    
  2. Start the Daemon: Ensure the backend service is active.

    systemctl --user enable --now ydotool
  3. 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 
        }
    }

βš™οΈ Configuration

Layouts

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.

Customization

  • Dimensions: Default start size is set in OnScreenKeyboard.qml (currentW, currentH).
  • Colors: Appearance is defined in OskKey.qml (Backgrounds, Borders, Text).

🧩 Modifiers Guide

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.

About

A standalone, floating on-screen keyboard for Wayland compositors built with Quickshell and QtQuick. Features a resizable window with aspect ratio locking, smooth animations, and ydotool input injection.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published