A modern Vietnamese Input Method Engine (IME) for Linux with direct Unicode input—no pre-edit buffer, no underlines.
  • Rust 72.4%
  • TypeScript 12.8%
  • Shell 12.5%
  • Python 1.3%
  • Makefile 0.5%
  • Other 0.4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Khoavo 6571acccfc
Some checks failed
Arch Linux Pacman Repository / Build Pacman + APT Repository & Deploy GitHub Pages (push) Has been cancelled
Build & Release / Build & test (push) Has been cancelled
Build & Release / Build .deb (push) Has been cancelled
feat: switch mode-cycle shortcut from Ctrl+Shift to Ctrl+Space
- ibus_engine.rs: replace Ctrl+Shift detection with Ctrl+Space (keyval 32)
  for 3-way cycle ENG -> VNI -> TELEX -> ENG; rename state fields to
  ctrl_space_latched / last_ctrl_space
- evdev_loop.rs: Ctrl+Space now calls toggle_method(); remove separate
  Ctrl+Shift block and unused is_method_toggle imports
- x11_capture.rs: Ctrl+Space (keycode 57) calls toggle_method(); remove
  Ctrl+Shift fallback block
- event.rs: remove is_method_toggle_key() and is_method_toggle_state()
  functions and associated tests (Ctrl+Shift logic gone)
- config.rs: default_toggle_method_key changed from 'shift' to 'space'
- daemon.rs: update log message from Ctrl+Shift to Ctrl+Space
- vietc.toml: toggle_method_key = 'space'
- install.sh: update user-facing shortcut instructions
- docs/wayland-rootless.md, web/src/components/SetupGuide.tsx: update docs
2026-09-08 10:42:33 +07:00
.github/workflows fix(ci): add contents:write permission to Release workflow 2026-08-30 21:26:14 +07:00
cli release: v0.1.7 — password detection, Telex enabled, GNOME Wayland support 2026-07-01 11:00:11 +07:00
daemon feat: switch mode-cycle shortcut from Ctrl+Shift to Ctrl+Space 2026-09-08 10:42:33 +07:00
docs feat: switch mode-cycle shortcut from Ctrl+Shift to Ctrl+Space 2026-09-08 10:42:33 +07:00
engine fix: password field English fallback and English duplicate word, enable dedup by default 120ms 2026-09-05 12:14:24 +07:00
packaging chore: automate PPA orig reuse and bump to 0.1.22 2026-08-30 20:35:42 +07:00
protocol chore: final polish for v0.1.23 production 2026-09-05 12:00:53 +07:00
scripts feat: add test VM setup script for Linux Mint/Ubuntu 2026-07-02 11:56:01 +07:00
ui feat: set Ctrl+Space as global mode rotation shortcut (ENG -> VNI -> TELEX -> ENG) 2026-09-05 08:48:20 +07:00
uinputd release: v0.1.7 — password detection, Telex enabled, GNOME Wayland support 2026-07-01 11:00:11 +07:00
vietcctl feat(ime): add wtype Wayland injection, device filtering, 3-mode tray cycle, and intelligent auto-restore 2026-08-30 12:37:24 +07:00
vk feat: add vietc-vk standalone virtual-keyboard test tool 2026-07-12 12:14:45 +07:00
web feat: switch mode-cycle shortcut from Ctrl+Shift to Ctrl+Space 2026-09-08 10:42:33 +07:00
.gitignore feat(packaging): add complete distribution system for Arch Linux and Ubuntu 2026-08-30 19:25:01 +07:00
Cargo.lock chore: final production polish for v0.1.24 - Omawrite uinput backspace fix 2026-09-05 12:31:29 +07:00
Cargo.toml feat: Bamboo aux-controller mode, vietcctl universal typing switch, install/uninstall finetune 2026-07-13 21:14:17 +07:00
CHANGELOG.md fix: password field English fallback and English duplicate word, enable dedup by default 120ms 2026-09-05 12:14:24 +07:00
CHANGELOG.vi.md fix: password field English fallback and English duplicate word, enable dedup by default 120ms 2026-09-05 12:14:24 +07:00
install.sh feat: switch mode-cycle shortcut from Ctrl+Shift to Ctrl+Space 2026-09-08 10:42:33 +07:00
LICENSE Viet+ v0.1.0 - Vietnamese Input Method for Linux 2026-06-24 10:13:10 +07:00
Makefile chore: automate PPA orig reuse and bump to 0.1.22 2026-08-30 20:35:42 +07:00
README.en.md fix: password field English fallback and English duplicate word, enable dedup by default 120ms 2026-09-05 12:14:24 +07:00
README.md fix: password field English fallback and English duplicate word, enable dedup by default 120ms 2026-09-05 12:14:24 +07:00
uninstall.sh feat: enhance uninstall.sh to stop user services, clean all binaries, and auto-elevate 2026-08-30 12:56:07 +07:00
vietc.service fix: smooth Vietnamese input on Ubuntu 24.04+ Wayland via auto IBus engine 2026-08-29 19:56:46 +07:00
vietc.toml feat: switch mode-cycle shortcut from Ctrl+Shift to Ctrl+Space 2026-09-08 10:42:33 +07:00

⌨️ Viet+ (VietC)

Modern Zero-Underline Vietnamese Input Method for Linux (Wayland & X11) · Built with Rust 🦀

Platform Rust License Version Tests

Overview • Quick Start • Features • Usage • Configuration • Architecture • Testing • 🇻🇳 Tiếng Việt


🌟 Overview

Viet+ (VietC) is a next-generation, high-performance Vietnamese input method engine for Linux. Written entirely in Rust, it eliminates the annoying pre-edit underlines and clipboard race conditions found in traditional IMEs, delivering native, zero-latency direct typing on both Wayland (Hyprland, Sway, GNOME, KDE Plasma) and X11.

Nguyeenx DDawng Khoa   ➔   Nguyễn Đăng Khoa
Khoong cos gif quis    ➔   Không có gì quí
search for the test    ➔   search for the test  (Intelligent Auto-Restore)

🚀 Quick Start (1-Command Install)

Install Viet+ with a single command on any supported Linux distribution:

curl -fsSL https://raw.githubusercontent.com/vndangkhoa/vietc/main/install.sh | bash

How to Switch Modes

  • Press Ctrl + Space (or Ctrl + Shift) to cycle: ⚪ EN (English) ➔ 🔴 VNI ➔ 🔵 TELEX ➔ ⚪ EN
  • Or click the dynamic system tray icon (EN / VN / TLX) anytime.
  • CLI controls: vietcctl status | vietcctl cycle | vietcctl method telex

🐧 Supported Distros & Environments

Viet+ is tested and optimized across modern hype, gaming, and mainstream Linux distributions:

Distro / Ecosystem Default Desktop / WM Display Server Input Mechanism Status
⚡ CachyOS KDE Plasma 6 / Hyprland Wayland wtype (Direct Virtual Keyboard) ✅ 100% Optimized
🏹 Arch Linux Hyprland / Sway / KDE / GNOME Wayland / X11 wtype / /dev/uinput ✅ 100% Tested
🚀 EndeavourOS / Omarchy / Garuda Hyprland / KDE Plasma / i3 Wayland / X11 wtype / /dev/uinput ✅ Fully Supported
🎩 Fedora 40/41 / Nobara GNOME 46/47 / KDE Plasma Wayland Hybrid IBus + wtype ✅ Fully Supported
🌿 Linux Mint Cinnamon / XFCE / MATE X11 /dev/uinput Direct ✅ Fully Supported
🪐 Pop!_OS COSMIC Desktop / GNOME Wayland / X11 wtype / /dev/uinput ✅ Fully Supported
🟠 Ubuntu 24.04+ / Debian 12 GNOME (Mutter) / X11 Wayland / X11 Hybrid IBus + AppIndicator ✅ Fully Supported
🦎 Manjaro / openSUSE KDE Plasma / XFCE / GNOME Wayland / X11 wtype / /dev/uinput ✅ Fully Supported

✨ Features

Feature Description
🚀 Zero Underline Types directly into the active application. No temporary pre-edit buffer, no distracting underline, no broken copy/paste.
⚡ Direct Wayland Virtual Keyboard Uses wtype (zwp_virtual_keyboard_v1) on Wayland / Hyprland. Injects UTF-8 Unicode directly with 0ms latency and zero clipboard conflicts.
🛡️ Hardware Device Filtering Automatically detects and binds strictly to /dev/input/by-path/*-event-kbd, completely preventing duplicate keystrokes from 2.4G wireless USB dongles and multi-interface hardware.
🧠 Intelligent English Auto-Restore Analyzes Vietnamese phonology and validates against a built-in English technical dictionary. Typing English words in Telex/VNI mode automatically restores clean English spelling on space/punctuation.
🔄 3-Way Instant Rotation Seamlessly cycles ⚪ EN ➔ 🔴 VNI ➔ 🔵 TELEX with Ctrl + Shift, tray icon click, or CLI. Displays synchronized desktop OSD notifications.
🎋 Bamboo Composition Core Full Vietnamese diacritics (â, ă, ê, ô, ơ, ư, đ), smart vowel clusters (uo ➔ ươ, ua ➔ ưa), and natural tone placement.
🔡 Casing Preservation Accurately preserves capitalization: Tieengs ➔ Tiếng, TIEENGS ➔ TIẾNG.
📝 Custom Macro Expansion Built-in and user-customizable macros (ko ➔ không, dc ➔ được, vs ➔ với, etc.).
📊 Dynamic Tray Indicator StatusNotifier/AppIndicator tray icon with clear color-coded badges (EN / VN / TLX).
🔒 Rootless & Secure Runs as a standard user systemd service. No root daemon required after initial uinput udev setup.

🎮 Usage

1. Typing Methods

Telex Mode (🔵)

Input Output Example
s Sắc (´) as ➔ á
f Huyền (`) af ➔ à
r Hỏi (̉ ) ar ➔ ả
x Ngã (~) ax ➔ ã
j Nặng (.) aj ➔ ạ
aa, ee, oo Â, Ê, Ô aa ➔ â, ee ➔ ê, oo ➔ ô
aw, ow, uw Ă, Ơ, Ư aw ➔ ă, ow ➔ ơ, uw ➔ ư
dd Đ dd ➔ đ, DD ➔ Đ
w Ươ chuongw ➔ chương

VNI Mode (🔴)

Input Output Example
1 Sắc (´) a1 ➔ á
2 Huyền (`) a2 ➔ à
3 Hỏi (̉ ) a3 ➔ ả
4 Ngã (~) a4 ➔ ã
5 Nặng (.) a5 ➔ ạ
6 Â, Ê, Ô a6 ➔ â, e6 ➔ ê, o6 ➔ ô
7 Ơ, Ư o7 ➔ ơ, u7 ➔ ư
8 Ă a8 ➔ ă
9 Đ d9 ➔ đ, D9 ➔ Đ

2. Shortcuts & Controls

Action Shortcut / Command
Cycle 3 Modes (EN ➔ VNI ➔ TELEX) Ctrl + Space / Ctrl + Shift (or left-click tray icon)
Check Current Status vietcctl status
Switch Method via CLI vietcctl method telex / vietcctl method vni
Restart Service systemctl --user restart vietc.service

⚙️ Configuration

Configuration file location: ~/.config/vietc/config.toml

input_method = "telex"          # "telex" or "vni"
toggle_key = "space"            # Ctrl+Space for VN/EN toggle
start_enabled = true            # Enable Vietnamese on startup
grab = true                     # Direct hardware evdev grab
deduplicate_keys = false        # Let engine handle consecutive letters (aa, ee, dd)

[auto_restore]
enabled = true                  # Automatically restore English words on space
trigger_keys = ["space", "escape"]

[app_state]
enabled = false                 # App-specific overrides (optional)

[macros]
"ko" = "không"
"dc" = "được"
"vs" = "với"
"ng" = "người"

🏗️ Architecture

vietc/
├── engine/                  # Bamboo-based composition core & spell checking
│   ├── bamboo.rs            # Diacritics, marks, backtracking & casing rules
│   ├── english.rs           # English vocabulary & auto-restore dictionary
│   ├── spelling.rs          # Vietnamese phonology & syllable validator
│   └── tests.rs             # Comprehensive unit benchmark suite
├── daemon/                  # Main background service daemon
│   ├── evdev_loop.rs        # Low-latency evdev poll loop
│   ├── device.rs            # by-path device discovery & hardware filtering
│   ├── daemon.rs            # Mode cycling, shortcuts & status synchronization
│   └── app_state.rs         # Application state management & overrides
├── protocol/                # Input injection & virtual keyboard protocols
│   ├── uinput_monitor.rs    # wtype (Wayland virtual keyboard) + /dev/uinput
│   └── wayland_im.rs        # Wayland input-method context
├── ui/                      # Dynamic system tray application (ksni)
│   └── tray.rs              # 3-state icon renderer (EN / VN / TLX)
├── vietcctl/                # Command-line control interface (IPC)
├── web/                     # Official interactive documentation website (React + Vite)
└── install.sh               # Universal 1-command installer script

🧪 Testing

The repository contains 151 automated tests covering standard Vietnamese orthography, complex vowel clusters, English auto-restore, and Wayland virtual keyboard protocols:

# Run all tests across the workspace
cargo test --workspace

📦 Repositories

Viet+ is mirrored across both Forgejo and GitHub:


🤝 Contributing

Contributions are welcome!

  1. Fork the repo
  2. Create a feature branch (git checkout -b feature/amazing)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push (git push origin feature/amazing)
  5. Open a Pull Request

📄 License

Distributed under the MIT License. See LICENSE for details.

If you find this project useful, please ⭐ star it on GitHub.
Built with ❤️ for the Vietnamese Linux community.