feat(vmk): improve app mode menu UI, key bindings, mouse interaction #52
feat(vmk): improve app mode menu UI, key bindings, mouse interaction #52nhktmdzhg merged 11 commits intonhktmdzhg:devfrom
Conversation
- Mouse Support: Enable mouse click for mode selection in app mode menu. - Key Bindings: Change aux mode keys from numbers (5-8) to letters (q, w, e, r). - Menu UI: - Update shortcut labels (e.g., [q], [w]). - Shorten 'App name detected...' to 'App:'. - Use '>>' arrow to indicate active mode. - Show Emoji page number. - Cleanup: Optimize cleanup logic and remove unused variables.
|
@nhktmdzhg ông xem qua xem ổn chưa? |
|
Để rảnh tôi xem, ý tưởng cho vẻ ok, tại lúc tôi làm cái này tìm hiểu bừa chứ chưa đi sâu, cái emoji sau này ngon hơn |
- Fixed HIGH: Commit preedit text before clearing buffers in reset() * Call EngineCommitPreedit() for Preedit mode finalization * Pull and commit remaining text to prevent data loss * Ensures text is saved when switching modes without space - Fixed HIGH: Corrected index mapping after w↔e key binding swap * Emoji mode: index 6 (was 7) * Off mode: index 7 (was 6) - Fixed MEDIUM: Removed redundant emoji buffer clears * Already cleared by clearAllBuffers() - Added VMK1/VMKSmooth cases to commitBuffer() * Commit pending preedit on focus change - Enhanced comments and documentation (~30 lines) * Strategy explanations for complex logic * Edge case documentation (wrap-around, index 0) * User scenario examples (tab while typing) * Architecture notes (transient modes, IPC)
6d2bdc0 to
618d1f9
Compare
|
Đã test thử dùng ổn. Nhưng do refactor số lượng hơi lớn code nên giờ có lẽ phải tổ chức lại. [Bug]: Dấu huyền (`) không thể gõ được trên Vscode? |
|
vãi, nhiều thế :))) |
|
Mình nghĩ nên fix bug hay sửa, thêm tính năng trước đi, refactor các kiểu từ từ, dù gì nó cũng không ảnh hưởng nhiều đến sử dụng, mà review cũng khoẻ hơn, bạn sửa hàng loạt như này mình cũng khó mà review được, mình cũng không thể review qua loa. Bonus là lần sau bạn muốn gửi pr thì 1 pr tập trung 1 cái cụ thể thôi, ném nhiều thứ trong 1 pr hơi khoai. Bạn có thể tách ra nhiều branch để gửi nhiều pr, dễ review, còn refactor ra nhiều file các thứ thì mình nghĩ để mình tự làm cũng được, tại cái này thay đổi lớn, mình tự làm dễ kiểm soát hơn là tạo pr thay đổi lớn. |
|
Ngang này mình nghĩ chắc dễ review rồi, cũng khá đủ những điểm đã đề cập phía trên. |
* feat(vmk): improve app mode menu UI, key bindings, mouse interaction (#52) --------- Co-authored-by: Nguyen Hoang Ky <57983253+nhktmdzhg@users.noreply.github.com> * fix: commit raw string instead of forward grave key * feat: Change icon to "E" when switch to "Off" mode * feat: Change icon to 😄 when switch to "Emoji" mode * fix: add ack for some applications * fix reset chromium * fix: duplicate word when use grave key to exit app mode menu * fix: waitAck don't change when focus to other app * fix: update translation, menu label, logo, README (#59) * change translation string * fix: update app mode menu labels for clarity * feat: add project logo and update README * fix: update TOC * Update translation --------- Co-authored-by: Loc Huynh <148019203+hthienloc@users.noreply.github.com>
Summary
This PR overhauls the
App Modeselection menu (~) to improve usability and reliability. It introduces mouse interaction, full keyboard navigation, optimized shortcuts, and fixes a critical issue where text was lost when switching modes.Changes
UI/UX Improvements
AppModeCandidateWord.Arrow KeysandTab. UseEnter/Spaceto select.q→ Preeditw→ Emojie→ Offr→ Reset Config>>) for the currently active mode.Bug Fixes
commitPendingTextto ensure preedit buffer is committed before mode switching or engine reset, preventing data loss.Motivation
The previous menu was static and required memorizing specific number keys, which was not user-friendly. Additionally, users reported losing their uncommitted text when switching input modes appropriately, interrupting their workflow.
Testing Checklist
Preeditmode and switching toVMK Smoothpreserves the text.Reset App Config(r) correctly clears the saved preference for the current app.