9.1 KiB
9.1 KiB
Changelog
v0.1.7 (2026-07-01)
Password Auto-Detection
- AT-SPI2 D-Bus integration: Queries
org.a11y.atspi.Registry.GetFocus+GetRoleto detect password fields (role 62 =PASSWORD_TEXT). Automatically disables Vietnamese input when typing into a password field, re-enables when focus moves away. - Window-class fallback: Password dialogs (pinentry, polkit, kwallet, ssh-askpass) are detected via
password_appsconfig list. - Window-title fallback: Window titles containing "password", "passphrase", "sudo", "mật khẩu" trigger automatic English mode.
Telex Input Method
- Telex now fully enabled: Both VNI and Telex are supported. Switch via Ctrl+Shift hotkey or tray menu "Input Method > Telex / VNI".
- Method status file (
~/.config/vietc/method): Daemon writes the current method so the tray can display it. - Tray indicator: Red "VN" for VNI, Blue "TLX" for Telex, Gray "EN" for English mode.
- Config option:
toggle_method_key = "shift"configures the Ctrl+Shift method toggle combo.
GNOME/Wayland Support
- Native GNOME Shell D-Bus integration: Queries
org.gnome.Shell.Evalfor focused window class, ID, and title — works on Wayland GNOME where xdotool/xprop are unavailable. - Window detection chain: GNOME Shell D-Bus → wlrctl → xdotool → /proc — ensures window tracking works across all environments.
- Compositor detection: Added GNOME/Mutter detection via
pgrep gnome-shellandXDG_CURRENT_DESKTOP. - Dependencies:
dbuscrate (0.9) added for both AT-SPI2 and GNOME Shell D-Bus queries.
CLI Enhancements
- Pass-through characters: All characters now appear in output (not just those that emit engine events).
- Screen display: Backspace characters are properly applied to show what would appear on screen.
- State reset: Each input line starts with a clean engine state.
- New commands:
:help,:status,:vi,:en,:ar on|off,:macros,:macro add/rm/clear,:events,:events clear.
Bug Fixes
- Engine state correctly reset between input lines in CLI test harness.
- Flush characters forwarded after macro expansion / auto-restore replacement to preserve spacing.
- AT-SPI2 connected to wrong D-Bus bus: Was connecting to session bus instead of the private accessibility bus. Now queries
org.a11y.Bus.GetAddressto find the correct bus. - Password detection now periodic: Re-checks every 30 keystrokes even without window change (catches in-terminal sudo prompts).
- Double space on Ctrl+Space toggle: Raw key forwarding now checks if engine is enabled before forwarding flush chars.
- xprop/wmctrl fallbacks: Window class, title, and ID detection now work without
xdotoolinstalled (usesxprop+wmctrl). - Single-instance lock improved: Writes PID to lock file; detects and cleans up stale locks automatically.
uinput-First Injection
- Injection priority reversed: uinput (
/dev/uinput) is now the primary injection backend on X11, with X11 XTest as fallback. uinput sends evdev keycodes that route correctly through libinput — no X11 keycode offset needed. - X11 XTest keycode fix: X11 injector was sending evdev keycodes directly to
XTestFakeKeyEvent, which expects X11 keycodes (evdev + 8). Backspace sent keycode 14 (evdev) = X11 keycode 14 = "5" key. Fixed by adding +8 offset in allsend_keycodepaths. paste_via_clipboard()backspace fixed: was hardcoded to X11 keycode 14 (actually "5"), now uses evdev 14 + 8 = 22 (correct X11 backspace).
Window-Switch Detection
- Active window ID verified on every keystroke: removed the
gap > 100msguard — the daemon now pollsxdotool/xpropdirectly for every character keypress. This catches window switches that complete in under 100ms, preventing old engine buffer from leaking into the new window.
Input Method
- Telex disabled in tray: greyed out with "(next version)" label and
Disposition::Informative. Only VNI is functional. - Default input method changed from
"telex"to"vni"in config fallback.
Packaging
- Flatpak and AppImage removed: only
.debpackaging is maintained.packaging/flatpak/andpackaging/appimage/directories deleted. - Postinst improvements: removes stale
/usr/local/bin/vietc*binaries, deletes old~/.config/vietc/config.toml+overrides.toml+.first-launch-done, shows logout popup (notify-send + zenity). - CI workflow: only
.debartifact collected (no AppImage).
v0.1.5 (2026-06-29)
Window-Switch Engine Reset
- Engine state now clears on window switch — when Alt+Tab'ing between apps, the composition buffer is properly reset before the next keystroke. Previously, keystrokes could still apply Vietnamese tone/mark rules across app boundaries, producing corrupted text.
last_key_timeonly on character key presses — modifier-only events (Alt, Ctrl, Shift) no longer update the gap timer, so the 100 ms inline xprop poll fires reliably after every window switch, regardless of held modifiers.
Active Window Detection
- xprop fallback —
get_active_window_id()triesxdotoolfirst, falls back toxprop -root _NET_ACTIVE_WINDOW(preinstalledx11-utils). Works under sudo even when xdotool is absent.
Code Cleanup
- Removed ~400 lines of dead unsafe code — entire X11 clipboard shared-state block (unsafe statics, manual Xlib dlopen, SelectionRequest handling) was unused and has been deleted. All related
#[warn(dead_code)]and#[warn(static_mut_refs)]warnings eliminated. - Engine dead code removed — unused methods
is_empty,is_tone_or_mark_key,process_string,last_base_char,apply_cluster_mark,apply_markinBambooEngine;RuleEffectenum andspecial_rulesfield inInputMethodRules. - Production logging — per-key
eprintln!removed from evdev loop and uinput paste path. Only startup/error/window-change messages remain (log_infoto both stderr and file).
Flatpak Build & System Tray
- System tray (
vietc-trayusing ksni/DBus StatusNotifier) is now built and included in the Flatpak bundle. The tray launches the daemon and shows Vietnamese/English mode. - Desktop menu entry — the app now appears when searching "Viet+" in the application menu. Search, launch, or uninstall from there.
- Flatpak command changed from
vietc-daemontovietc-tray(the tray spawns the daemon). - Tray fixes for Flatpak —
find_sibling_binary()now tries{name}-daemonfallback;is_daemon_running()checks bothvietcandvietc-daemonprocess names. - Fixed
mkdir -p—build-flatpak.shnow creates/app/share/applicationsbefore installing the desktop file.
Active Window Detection (Flatpak fix)
- Native X11
_NET_ACTIVE_WINDOWquery viadlopen("libX11.so.6")— added as third fallback inget_active_window_id(). Works inside the Flatpak sandbox wherexdotool/xpropare unavailable. No subprocess, no external dependencies.
Default Mode
start_enablednow defaults totrue— Vietnamese mode is active immediately after launch. Press Ctrl+Space to toggle to English.
(Existing users with a custom config.toml are unaffected — the explicit setting overrides the default.)
Tray & Desktop Entry
- No password prompt inside Flatpak —
needs_root()detects Flatpak sandbox (FLATPAK_IDor/app/binpresence) and skips sudo entirely; the sandbox already has device access via--device=all. - First-launch flag always written — the
.first-launch-donemarker is created even when the password prompt is dismissed, preventing repeated prompts. - Desktop categories widened to
Utility;TextTools;X-GNOME-Utilities;for better visibility in Cinnamon/Mint app menu. - Bundle:
VietPlus-0.1.5.flatpak(66 MB with tray, runtimeorg.gnome.Platform//50). Warning-free build.
v0.1.4 (2026-06-28)
Flatpak Packaging
- Flatpak bundle with all components: daemon, CLI, system tray, uinputd, XRecord, wrapper script
- System tray icon via D-Bus StatusNotifierItem (ksni)
- Build script
packaging/flatpak/build-flatpak.sh— automated build from source - Permissions: X11, Wayland, D-Bus session bus, input devices, IPC
Documentation
- README updated with Flatpak-only install/build instructions
Clipboard & Injection
- Fix clipboard-into-text race — Eliminated race condition where clipboard content leaked into typed text during Unicode injection.
- CI/CD pipeline — GitHub Actions workflow for automatic .deb and AppImage builds on push.
Tests
- 106 tests passing (72 engine + 16 CLI + 12 protocol + 5 auto-restore + 1 tone placement).
Releases
vietc_0.1.4-1_amd64.deb,Viet+-0.1.4-x86_64.AppImageon GitHub + Forgejo.
v0.1.3 (2026-06-26)
- ua-horn cluster fix, clipboard_context save/restore, control-key consumption
- 106 tests, DEB + AppImage
v0.1.2 (2026-06-26)
- Flush char forwarded as raw key, auto-restore English words
- Tone placement qu/gi/uê/uơ, skip auto-repeat, Enter key
v0.1.1 (2026-06-26)
- Fix Telex tone key consumption, persistent X11 connection
v0.1.0 (2026-06-26)
Initial release — bamboo engine port, evdev capture, uinput injection.