Khoa Vo
41ecc48b0a
daemon: use poll() with 100ms timeout for evdev reads instead of blocking fetch_events
...
The original fetch_events() call blocked indefinitely on the evdev device.
In VM environments, the grabbed keyboard device may not deliver events
after the initial batch, causing the 30-second safety timeout to trigger
silently — the daemon exits, the grab is released, and subsequent
keystrokes bypass the IME entirely.
Replace with libc::poll() with a 100ms timeout so the event loop stays
responsive. When poll returns 0 (timeout), the loop checks signals, the
30-second grab-safety timeout, and also polls for background window
changes. This ensures the safety timeout actually fires as expected,
and the daemon correctly detects and handles the no-event condition.
Also check for background window class changes during idle periods
(no keypress events) so app detection works consistently.
2026-07-02 13:32:54 +07:00
Khoa Vo
8f8b4abf6d
daemon: add diagnostics logging + guard VNI control key consumption behind engine.is_enabled()
...
- Add 'Event loop started' log at beginning of run_with_evdev
- Add reason for non-interrupted fetch_events errors
- Log each injected key with engine state, character, buffer length, and commands
- Fix VNI control digits being silently consumed when engine is disabled
2026-07-02 13:19:18 +07:00
Khoa Vo
fcd465c2b0
fix: exclude daemon's own sudo ancestor from password detection
...
When the daemon is started via `sudo vietc-daemon` from a terminal,
is_sudo_process would see sudo( in the terminal's process tree and
disable the engine, making all keystrokes pass through untransformed.
Now is_sudo_process builds the daemon's ancestor PID chain and skips
any sudo process that is an ancestor of the daemon itself.
2026-07-02 12:12:32 +07:00
Khoa Vo
4baa460562
fix: use xdotool for Unicode injection instead of clipboard paste
...
On X11 (Linux Mint, Ubuntu), clipboard-based Unicode injection was
failing — backspace was sent but the Vietnamese character never
appeared because xclip paste via Ctrl+V wasn't reliable from a
root uinput process.
Now send_string tries xdotool type first (XTest-based, doesn't touch
the user's clipboard), falling back to clipboard paste only on Wayland
or when xdotool is unavailable.
2026-07-02 12:03:21 +07:00
Khoa Vo
d48bccd531
feat: add test VM setup script for Linux Mint/Ubuntu
2026-07-02 11:56:01 +07:00
Khoa Vo
3ccf243f52
feat: terminal VNI input — force VNI in terminals, remove from bypass_apps
...
Build & Release / Build & test (push) Waiting to run
Build & Release / Build .deb (push) Blocked by required conditions
- Add terminal_apps / terminal_input_method to config
- AppStateManager tracks global vs effective method
- Engine uses effective method (VNI in terminals, global elsewhere)
- Terminals removed from bypass_apps, moved to terminal_apps
- Tray still shows global method (user's setting)
- NOTE: NOTES/terminal-vni.md documents the design
2026-07-02 08:57:17 +07:00
Khoa Vo
7e5281244b
docs: update changelog for distro support, roadmap, deps fixes
Build & Release / Build & test (push) Has been cancelled
Build & Release / Build .deb (push) Has been cancelled
2026-07-01 17:07:40 +07:00
Khoa Vo
473773abf2
docs: add distro support table, fix deps and config typo
Build & Release / Build & test (push) Waiting to run
Build & Release / Build .deb (push) Blocked by required conditions
2026-07-01 17:05:41 +07:00
Khoa Vo
a09ba8ed63
chore: remove RELEASE_CHECKLIST.md, add roadmap to README
Build & Release / Build & test (push) Waiting to run
Build & Release / Build .deb (push) Blocked by required conditions
2026-07-01 16:43:46 +07:00
Khoa Vo
d6e1f4d89c
uninstall script supports curl pipe, update README with GitHub/Forgejo commands
Build & Release / Build & test (push) Waiting to run
Build & Release / Build .deb (push) Blocked by required conditions
2026-07-01 16:38:46 +07:00
Khoa Vo
83c3e3d1fa
simplify install/uninstall scripts, update README
Build & Release / Build & test (push) Waiting to run
Build & Release / Build .deb (push) Blocked by required conditions
2026-07-01 16:35:56 +07:00
Khoa Vo
7a8f409d20
docs: rewrite README and CHANGELOG for v0.1.7 release
Build & Release / Build & test (push) Has been cancelled
Build & Release / Build .deb (push) Has been cancelled
2026-07-01 16:25:36 +07:00
Khoa Vo
a9844221a7
Revert "debug: trace space handling in grab mode"
...
Build & Release / Build & test (push) Waiting to run
Build & Release / Build .deb (push) Blocked by required conditions
This reverts commit efed6f7e30 .
2026-07-01 16:17:47 +07:00
Khoa Vo
efed6f7e30
debug: trace space handling in grab mode
Build & Release / Build & test (push) Waiting to run
Build & Release / Build .deb (push) Blocked by required conditions
2026-07-01 16:11:45 +07:00
Khoa Vo
3c12aa3233
fix: auto-load uinput kernel module in injector
Build & Release / Build & test (push) Waiting to run
Build & Release / Build .deb (push) Blocked by required conditions
2026-07-01 16:06:00 +07:00
Khoa Vo
58ff9e145e
fix: handle EINTR in evdev loop, silence SelectionRequest log spam
Build & Release / Build & test (push) Waiting to run
Build & Release / Build .deb (push) Blocked by required conditions
2026-07-01 16:01:15 +07:00
Khoa Vo
db140c3ca6
fix: use sigaction without SA_RESTART so Ctrl+C interrupts blocking fetch_events
Build & Release / Build & test (push) Waiting to run
Build & Release / Build .deb (push) Blocked by required conditions
2026-07-01 15:56:34 +07:00
Khoa Vo
9e073714f1
fix: non-blocking evdev poll (200ms timeout) so Ctrl+C ungrabs reliably
Build & Release / Build & test (push) Waiting to run
Build & Release / Build .deb (push) Blocked by required conditions
2026-07-01 15:53:25 +07:00
Khoa Vo
ffd0bc26c8
debug: add keystroke tracing for space forwarding in grab mode
Build & Release / Build & test (push) Waiting to run
Build & Release / Build .deb (push) Blocked by required conditions
2026-07-01 15:31:56 +07:00
Khoa Vo
e7b7864937
fix: revert non-grab mode to process_key with +1 backspace for control keys
Build & Release / Build & test (push) Waiting to run
Build & Release / Build .deb (push) Blocked by required conditions
2026-07-01 15:02:17 +07:00
Khoa Vo
3612939643
fix: non-grab mode uses event sourcing (replay_and_inject) to avoid double-letter race conditions
Build & Release / Build & test (push) Waiting to run
Build & Release / Build .deb (push) Blocked by required conditions
2026-07-01 13:42:02 +07:00
Khoa Vo
82d0796059
fix: non-grabbing mode double-injection — extra backspace for control keys on screen
Build & Release / Build & test (push) Waiting to run
Build & Release / Build .deb (push) Blocked by required conditions
2026-07-01 13:34:11 +07:00
Khoa Vo
7fe03b7f44
fix: detect Wayland window switches via class change (not just X11 window ID)
Build & Release / Build & test (push) Waiting to run
Build & Release / Build .deb (push) Blocked by required conditions
2026-07-01 13:28:18 +07:00
Khoa Vo
19ee25784d
fix: add SIGINT/SIGTERM handler to release keyboard grab before exit
Build & Release / Build & test (push) Waiting to run
Build & Release / Build .deb (push) Blocked by required conditions
2026-07-01 13:21:50 +07:00
Khoa Vo
36a6426894
fix: disable auto-restore by default (fixes space consumption on valid Vietnamese)
Build & Release / Build & test (push) Waiting to run
Build & Release / Build .deb (push) Blocked by required conditions
2026-07-01 13:11:51 +07:00
Khoa Vo
63c495894e
fix: GNOME Shell D-Bus queries via gdbus subprocess as original user
Build & Release / Build & test (push) Waiting to run
Build & Release / Build .deb (push) Blocked by required conditions
2026-07-01 13:05:28 +07:00
Khoa Vo
e025ead244
fix: add GNOME Shell D-Bus PID query for Wayland password detection
Build & Release / Build & test (push) Waiting to run
Build & Release / Build .deb (push) Blocked by required conditions
2026-07-01 12:59:00 +07:00
Khoa Vo
ddf9f34ad0
fix: add process-based sudo/passwd detection for terminal password prompts
Build & Release / Build & test (push) Waiting to run
Build & Release / Build .deb (push) Blocked by required conditions
2026-07-01 12:52:07 +07:00
Khoa Vo
f77b7ea682
fix: recover DBUS_SESSION_BUS_ADDRESS when running as root for AT-SPI2 password detection
Build & Release / Build & test (push) Waiting to run
Build & Release / Build .deb (push) Blocked by required conditions
2026-07-01 12:46:38 +07:00
Khoa Vo
cc05e02559
fix: wl-copy --paste-once for fast clipboard on Wayland/GNOME
Build & Release / Build & test (push) Waiting to run
Build & Release / Build .deb (push) Blocked by required conditions
2026-07-01 12:41:56 +07:00
Khoa Vo
800d33e6a7
docs: update CHANGELOG with recent fixes, update test count
Build & Release / Build & test (push) Waiting to run
Build & Release / Build .deb (push) Blocked by required conditions
2026-07-01 12:11:14 +07:00
Khoa Vo
7ac73485e4
fix: add xprop/wmctrl fallbacks for window detection when xdotool is not installed
Build & Release / Build & test (push) Waiting to run
Build & Release / Build .deb (push) Blocked by required conditions
2026-07-01 12:05:20 +07:00
Khoa Vo
81b483e7ac
fix: AT-SPI2 connects to a11y bus, not session bus (password detection was silently failing)
Build & Release / Build & test (push) Waiting to run
Build & Release / Build .deb (push) Blocked by required conditions
2026-07-01 11:59:40 +07:00
Khoa Vo
94c08bb0da
fix: periodic password field re-check every 30 keystrokes for in-terminal prompts
Build & Release / Build & test (push) Waiting to run
Build & Release / Build .deb (push) Blocked by required conditions
2026-07-01 11:51:57 +07:00
Khoa Vo
ff607f0559
fix: double space on Ctrl+Space toggle (flush char forwarded twice when engine disabled)
Build & Release / Build & test (push) Waiting to run
Build & Release / Build .deb (push) Blocked by required conditions
2026-07-01 11:34:25 +07:00
Khoa Vo
81a2baa5eb
fix: improve single-instance lock with PID + stale detection
Build & Release / Build & test (push) Waiting to run
Build & Release / Build .deb (push) Blocked by required conditions
2026-07-01 11:25:53 +07:00
Khoa Vo
6beeee2e69
release: v0.1.7 — password detection, Telex enabled, GNOME Wayland support
2026-07-01 11:00:11 +07:00
Khoa Vo
d34180537a
fix: improve Ubuntu and derivatives support in install scripts
Build & Release / Build & test (push) Waiting to run
Build & Release / Build .deb (push) Blocked by required conditions
2026-07-01 08:12:47 +07:00
Khoa Vo
d7260917b4
docs: separate installation instructions for github and forgejo
Build & Release / Build & test (push) Has been cancelled
Build & Release / Build .deb (push) Has been cancelled
2026-06-29 21:19:35 +07:00
Khoa Vo
5242473b93
fix: use file locking instead of abstract socket for single instance to avoid rust null byte error
Build & Release / Build & test (push) Waiting to run
Build & Release / Build .deb (push) Blocked by required conditions
2026-06-29 21:09:48 +07:00
Khoa Vo
66351de4fd
fix: remove invalid local keyword usage outside function
Build & Release / Build & test (push) Waiting to run
Build & Release / Build .deb (push) Blocked by required conditions
2026-06-29 20:55:27 +07:00
Khoa Vo
d9091ff66f
fix: linuxmint distro detection and rustup default toolchain issue for sudo users
Build & Release / Build & test (push) Waiting to run
Build & Release / Build .deb (push) Blocked by required conditions
2026-06-29 20:50:15 +07:00
Khoa Vo
efa831bd0b
add installation and packaging scripts
Build & Release / Build & test (push) Waiting to run
Build & Release / Build .deb (push) Blocked by required conditions
2026-06-29 20:45:48 +07:00
Khoa Vo
ccc2b46580
docs: add single command installation and uninstallation
Build & Release / Build & test (push) Has been cancelled
Build & Release / Build .deb (push) Has been cancelled
2026-06-29 20:35:11 +07:00
Khoa Vo
947c7f949d
add uninstall script
Build & Release / Build & test (push) Waiting to run
Build & Release / Build .deb (push) Blocked by required conditions
2026-06-29 20:34:55 +07:00
Khoa Vo
389c58e1fa
feat: ensure single instance to prevent duplicate daemon and tray icons
Build & Release / Build & test (push) Waiting to run
Build & Release / Build .deb (push) Blocked by required conditions
2026-06-29 20:33:10 +07:00
Khoa Vo
88d39b4475
release: v0.1.6 — uinput-first injection, window-switch fix, Telex disabled
...
Build & Release / Build & test (push) Waiting to run
Build & Release / Build .deb (push) Blocked by required conditions
- uinput injection is now primary on X11 (XTest fallback)
- X11 XTest keycode offset +8 fixed for all send_keycode paths
- Window switch detection on every keystroke (no more gap > 100ms guard)
- Telex greyed out in tray with '(next version)' label
- Flatpak and AppImage removed; only .deb packaging
- All Cargo.toml versions bumped to 0.1.6
2026-06-29 16:07:15 +07:00
Khoa Vo
7d0b2e520c
fix: Vietnamese mode default, Flatpak tray UX, Cinnamon menu entry
...
Build & Release / Build & test (push) Has been cancelled
Build & Release / Build packages (push) Has been cancelled
- Change start_enabled default to true (Vietnamese active on launch)
- Tray: detect Flatpak sandbox, skip pointless password prompt
- Tray: write first-launch flag file always (not just after sudo)
- Desktop file: StartupNotify=true, wider categories for Cinnamon menu
- Update tests for new default, README config example
2026-06-29 14:43:49 +07:00
Khoa Vo
98ce9def79
feat: Flatpak tray, X11 dlopen window query, desktop menu entry
...
Build & Release / Build & test (push) Waiting to run
Build & Release / Build packages (push) Blocked by required conditions
- Add system tray (vietc-tray) to Flatpak build; command changed to
vietc-tray which spawns the daemon
- Desktop menu entry: Viet+ appears in app launcher for search/install/uninstall
- Tray fixes: find_sibling_binary tries {name}-daemon fallback for Flatpak;
is_daemon_running checks both vietc and vietc-daemon process names
- Native X11 _NET_ACTIVE_WINDOW via dlopen(libX11.so.6) — third fallback in
get_active_window_id() that works inside Flatpak sandbox (no xdotool/xprop)
- Update README with install/uninstall commands
- Update CHANGELOG
2026-06-29 14:32:30 +07:00
Khoa Vo
1198d65543
docs: update README and CHANGELOG for v0.1.5 release
...
Build & Release / Build & test (push) Waiting to run
Build & Release / Build packages (push) Blocked by required conditions
- README: fix injection diagram (no X11 dependency for Ctrl+V),
rename Focus Reset -> Window-Switch Reset with accurate blurb,
mention warning-free Flatpak build
- CHANGELOG: replace old Event Sourcing entries with actual v0.1.5
changes: window-switch fix, xprop fallback, dead code cleanup,
flatpak mkdir fix
2026-06-29 14:14:56 +07:00