Commit Graph
123 Commits
Author SHA1 Message Date
fanlusky bade05e5aa Provide an entry for setting the Tencent Cloud Translation API key. 2026-08-22 13:38:08 +08:00
fanlusky 1cf7846382 There should also be a corresponding status indicator when the keyboard Caps Lock is turned on. 2026-08-21 23:09:03 +08:00
fanlusky 6960a74fce Add dynamic switching of Japanese icons. 2026-08-21 17:33:37 +08:00
fanlusky 27b0974be1 Add preliminary support for Japanese input. 2026-08-21 16:55:41 +08:00
fanlusky e885856124 Add Chinese-English translation functionality during typing. 2026-08-21 16:04:50 +08:00
fanlusky 1ca62aa947 Add the Y mode feature, which provides temporary English input functionality. 2026-08-19 19:40:18 +08:00
fanlusky 20194244bb Add fine-grained control over the character count threshold for triggering Chinese-English mixed input. 2026-08-19 13:40:54 +08:00
fanlusky 943b6fbd4b Add J mode, the shorthand pinyin mode. 2026-08-19 08:05:44 +08:00
fanlusky fe649e706f Implement the clipboard functionality in the emoji panel. 2026-08-19 00:00:05 +08:00
fanlusky 8565b0531b Add kaomoji to mixed candidates (after emoji) behind general.kaomoji_mixed_input
kaomoji_ime: async worker mirroring emoji_ime; KaomojiQuery::QueryPrefix
gains a db_path override. NormalizeMixedCandidateOrder places kaomoji right
after emoji, shifting with cloud/AI. event_listener wires
UpdateKaomojiInput/ApplyKaomojiCandidates/EnqueueKaomojiCandidates and the
PrepareCandidateList trigger; config general.kaomoji_mixed_input is plumbed
through settings_app/webview2; main.cpp starts/stops KaomojiIme; ordering test
added.
2026-08-17 00:08:24 +08:00
fanlusky 7a35c8c20e Add M-mode (Shift+M) for quick kaomoji input
Shift+M enters a kaomoji quick-input mode backed by the kaomoji table in
others.db, supporting full pinyin, abbreviated pinyin, English words, and
shuangpin expansion. Candidates commit directly via the new
CandidateSource::Kaomoji; a [utility] kaomoji_mode toggle is wired through
settings. Hardens candidate payload rendering (HTML / backtick / comma
escaping) so kaomoji, which often contain < > &  and commas, display correctly.
2026-08-16 23:16:11 +08:00
fanlusky d15319bd66 Add emoji to mixed candidates (slot 3, shifts with cloud/AI) behind general.emoji_mixed_input. 2026-08-16 19:29:52 +08:00
fanlusky 08ee504609 Add E-mode (Shift+E) for quick emoji input
Shift+E enters an emoji quick-input mode backed by the emoji_pinyin index in
others.db, supporting full pinyin (xiaolian), abbreviated pinyin (xl), English
words (laugh), and shuangpin codes (Xiaohe xnlm expands to xiaolian).

- src/emoji/emoji_query.{h,cpp}: prefix lookup over emoji_pinyin with
  shuangpin->quanpin expansion driven by the active scheme
- event_listener: Shift+E trigger, composition helpers, candidate branch, and
  direct commit through the new CandidateSource::Emoji
- config: [utility] emoji_mode toggle wired through settings_app / webview2
- tests: emoji_query coverage for full/abbrev pinyin, English, Xiaohe shuangpin
- engine submodule: CandidateSource::Emoji (core/word_item.h)
2026-08-16 18:54:54 +08:00
fanlusky 4a3e67f048 Fix skin sync. 2026-08-16 16:23:21 +08:00
fanlusky eb1211e595 Add preedit font size settings. 2026-08-15 03:58:43 +08:00
fanlusky 0ce0ef5fc1 feat(ui): add a WeChat-inspired skin with light/dark variants and synchronized candidate and toolbar previews 2026-08-13 04:06:48 +08:00
fanlusky 8ec9ec9f17 Add the feature that repeated smart punctuation input switches to Chinese punctuation. 2026-08-10 03:23:50 +08:00
fanlusky a2aedbf39f Support paired punctuation. 2026-08-10 00:38:09 +08:00
fanlusky 67d9da572a Add the English input method status to the toolbar. 2026-08-09 19:05:39 +08:00
fanlusky ac8d47ef09 Change the candidate window to a stable transparent host window occupying about 1/4 of the screen (updating with the cursor monitor/DPI), with content wrapping according to the host width and scrolling according to the host height, and fix the issues of high-DPI edge cropping and inconsistency between measurement and CSS limits. 2026-08-08 21:37:09 +08:00
fanlusky 73fd24b53d Strengthen the adaptive sizing of the FTB when the resolution changes. 2026-08-08 19:49:19 +08:00
fanlusky 33a86c11b6 Add date-time quick input (T-mode) feature, strengthen installation to not overwrite user's config.toml, and add a cold-start protection for FTB that "displays within the page ready / up to 6s grace period, then shows/hides according to actual status" (still rebuilds webview2 on upgrade). 2026-08-08 12:37:24 +08:00
fanlusky 6a7b6c58d0 Fix the issue where the configuration for 9 candidates does not take effect. 2026-08-03 22:29:24 +08:00
fanlusky 223f8d70eb Implement smart punctuation, automatically using English punctuation , . : after English letters and numbers. 2026-08-01 19:54:57 +08:00
fanlusky 70d40bfa10 Fix: 仓耳今楷 now is supported in cand wnd and settings wnd preview. 2026-08-01 15:33:00 +08:00
fanlusky ef8cad988c Try to locate tray-menu not render issue once installed. 2026-08-01 14:52:08 +08:00
fanlusky f0b9932c3e Continue trying to stabilize the WebView2 loading process during server initialization. 2026-07-31 19:51:56 +08:00
fanlusky 8caf0eb399 fix(ftb): stop the floating toolbar from rendering blank
The toolbar occasionally stayed invisible while its host window looked
perfectly healthy: the HWND was shown at the right position and size, so
screenshot tools could still frame it, but WebView2 never painted into
it. Two independent causes, both specific to the toolbar.

The toolbar was the only small window left out of the cloaked warmup, so
whenever no client was active at startup its controller was created
against a hidden host and WebView2 never finished raster setup. The later
ShowWindow could not repair that.

The toolbar was also the only small window not renotified after
HWND_TOPMOST was applied. Pinning moves the host between z-bands, and in
a uiAccess process a WebView2 that is not told about it keeps compositing
against the old parent state. The toolbar reports navigation-ready last,
so the topmost gate normally opened inside its own navigation-completed
handler, before it had painted a single frame.

Changes:
- Warm up the toolbar host DWM-cloaked like the candidate and menu hosts,
  and express hide as a cloak until the first navigation completes so the
  warmup cannot be cut short. HideFloatingToolbarHost replaces the raw
  ShowWindow(SW_HIDE), including in the fullscreen hook.
- Give the toolbar the same post-topmost put_Bounds +
  NotifyParentWindowPositionChanged the menu host already had.
- Defer the first topmost application to a later message-loop turn via
  WM_APPLY_SMALL_WINDOW_TOPMOST, and route EnsureSmallWindowsTopmost
  through the same path so it can no longer pin inline.
- Add an opt-out diagnostic trace (ftb-diagnostic.log, disabled with
  MSIME_FTB_DIAG=0) recording every visibility decision together with the
  host and controller state, plus the foreground window behind a
  fullscreen hide.

Also drops the earlier attempt at deriving g_is_ime_active from the IPC
active client, which targeted a different failure mode than the one
actually reproduced.
2026-07-31 14:39:13 +08:00
fanlusky fb4a2d02c9 fix(candwnd): keep measure-time WebView bounds after host resize
Avoid shrinking the candidate WebView to the host client on first show
near a screen edge, which made the card wrap and get clipped.
2026-07-31 02:58:40 +08:00
fanlusky de5b764a72 fix(ftb): reconcile toolbar visibility from IPC active-client state
WM_IMEACTIVATE could be dropped or skipped when activation was unchanged,
leaving the floating toolbar hidden until the user switched IME away and
back. Derive g_is_ime_active from the live active client on every visibility
apply, and re-apply once the FTB WebView finishes its first navigation.
Also restore Watchdog startup with a short profile-ready retry window.
2026-07-31 00:43:55 +08:00
fanlusky 68f7557048 chore(traymenu): remove temporary traymenu-diag logging
Drop TrayMenuDiag / DescribeHostWindow and all call sites added while
debugging the uiAccess TOPMOST WebView2 init failure, now that the fix
is verified.
2026-07-30 03:16:28 +08:00
fanlusky c029fb7222 fix(webview2): prevent TOPMOST from blocking controller creation in uiAccess process
In a uiAccess=true process, a WS_EX_TOPMOST parent window causes
WebView2's internal cross-process SetParent to be rejected by UIPI,
returning E_INVALIDARG (0x80070057) from CreateCoreWebView2Controller.

This was triggered when the watchdog restarted the server while the IME
was already active: the floating toolbar showed early, which mistakenly
raised the DWM-cloaked (warmup) menu host to TOPMOST before its
controller existed. Manual launches never hit this because the IME was
inactive at startup time.

Changes:
- Gate RaiseTrayMenuAboveSmallWindows on menu controller existence so
  a cloaked warmup host is never prematurely pinned TOPMOST.
- Strip WS_EX_TOPMOST from any host window before requesting its
  controller; the lazy-topmost gate re-pins all three once ready.
- Serialize controller creation (one in-flight at a time) to avoid
  E_INVALIDARG from concurrent CreateCoreWebView2Controller calls on
  the same environment.
- Rotate past a persistently failing host so it cannot starve siblings.
- Harden LOCALAPPDATA resolution with SHGetKnownFolderPath fallback.
- Increase watchdog restart delay to 2s for user-data-folder lock drain.
- Add diagnostic logging (traymenu-diag.log) for WebView2 init states.
2026-07-30 03:08:42 +08:00
fanlusky 2edf16d01e feat: add word-to-character candidate selection
- add a disabled-by-default word-to-character setting
- commit the first or last Han character with [ and ]
- use the highlighted candidate for punctuation commits
- preserve punctuation behavior when no Han character is available
- add exact-text commit IPC support and related tests
2026-07-29 13:43:36 +08:00
fanlusky 549aac8d00 Add toggles for Shift/Ctrl/Ctrl+Alt+Space CN-EN switch hotkeys.
Expose keybindings.switch_language_* in config and settings hosts; leave system Ctrl+Space alone.
2026-07-28 21:43:52 +08:00
fanlusky 6632e9ebcf Add default IME language and per-app/global CN-EN scope settings.
Wire config + settings UI for default_ime_mode / ime_mode_scope, and sync unified mode across apps when scope is global.
2026-07-28 20:26:25 +08:00
fanlusky 6987f336c3 fix(candidate-window): pass mouse input through transparent host area
Clip the stable oversized candidate host to the actual rendered content,
preserving the editor cursor and mouse behavior outside the candidate card.
Temporarily restore the full region when displaying the context menu.
2026-07-28 17:14:37 +08:00
fanlusky 8e6b68b672 feat: persist and apply floating toolbar component settings
- store optional toolbar component preferences in config.toml
- synchronize component settings with the settings application
- apply component visibility changes at runtime
- launch the screen keyboard from the floating toolbar
- resize the toolbar window based on visible components
2026-07-28 16:53:48 +08:00
fanlusky 380e465bb5 feat(theme): add per-surface themes for Direct2D input interfaces
- add independent theme settings for the emoji panel, on-screen keyboard,
  handwriting panel, and voice input overlay
- support follow-global, dark, and light modes
- add light color palettes for each Direct2D interface
- load the shared theme configuration when standalone panels start
- reload the voice overlay theme before it is displayed
- expose the new theme options through the settings backend
2026-07-28 16:14:14 +08:00
fanlusky 2dc4f63cd6 feat(settings): add configurable candidate appearance and page-size digit gating
Expose candidate font, size, text color, and page size settings through the config and WebView bridge. Limit selection digits to the configured page size and apply appearance updates to the live candidate window.
2026-07-28 15:19:46 +08:00
fanlusky 27885a6fa4 fix(candwnd): use stable 720 DIP host with internal card offset
Keep the transparent candidate HWND at wrap-cap width so right-edge
growth adjusts MarginLeft/Top instead of SetWindowPos-moving the host,
which was flashing through layered transparency. Measure/layout keep
horizontal candidates on one row and wrap only inside long items.
2026-07-28 04:06:16 +08:00
fanlusky 26ae578ae9 fix: keep candidate menus within screen bounds 2026-07-27 22:07:08 +08:00
fanlusky 1c023d21fa fix: expand candidate window for context menu overflow 2026-07-27 21:56:07 +08:00
fanlusky e8736d66b9 feat: integrate candidate ranking, pinning, and cache refresh 2026-07-27 20:25:27 +08:00
fanlusky 02d5a3ff37 fix(candwnd): measure and size candidate wrap at 600 DIP
Force wrap-aware measure, serialize FineTune after measure content
updates, and preserve flip-up host height via MarginTop.

feat: lazily load single-letter Pinyin candidates

- query the top 24 single-letter candidates from the database
- load the complete candidate list on the first page-down action
- apply the same behavior to Shuangpin and Quanpin
- resolve Shuangpin initials according to the active profile
- preserve candidate frequency adjustment and pinning
- disable deletion for single-letter candidates
- add regression tests for Shuangpin v-to-zh mapping and lazy expansion
2026-07-27 16:12:46 +08:00
fanlusky e2af2c49d2 chore(logging): remove server debug logging
- remove OutputDebugString calls across the server
- remove spdlog calls and file logger initialization
- disable IPC and WebView debug output
- remove temporary database performance instrumentation
- update the MetasequoiaImeEngine submodule revision
2026-07-27 15:13:51 +08:00
fanlusky 5a3b5d71c3 fix: keep tray menu above floating toolbar without flicker
Pin the menu last when it is visible, stop FTB layout from raising Z-order, and raise the menu while still cloaked so it does not flash under the toolbar.
2026-07-24 18:55:42 +08:00
fanlusky b01a73e336 fix: stop horizontal candidate wrap flash on long lists
Keep horizontal candidates on one line with max-content/nowrap, and resize the host/WebView before painting so content is never laid out in a still-narrow viewport.
2026-07-24 02:07:27 +08:00
fanlusky f72242f1ca feat: persist and apply appearance theme mode for settings and small windows
Wire theme_mode and per-surface overrides through config, resolve system
theme, and hot-reload cand/ftb/menu HTML plus settings chrome colors.
2026-07-23 23:49:02 +08:00
fanlusky 7f06a1a046 fix: sync tray floating-toolbar toggle from config
Refresh the menu toggle from general.floating_toolbar on show,
navigation, and config reload so it stays aligned with Settings.
Refs metasequoiaime/MetasequoiaImeTsf#17
2026-07-23 21:43:15 +08:00
fanlusky f70804d89f Defer small-window TopMost until WebViews are ready on first show.
Avoid uiAccess + HWND WebView2 init races that blanked the candidate UI,
and stop parking the floating toolbar off-screen until WebView starts.
2026-07-23 11:28:39 +08:00