Enhance gamepad feedback and fix interaction issues#14
Conversation
- 新增多段式與方向性感知的控制器觸覺回饋 - 強化主輸入區、片語編輯與數值輸入對話框的選取與歷程操作手感 - 同步更新 README 與測試說明
- 新增震動強度即時與重設預覽回饋 - 在快速鍵喚醒與重設校準時同步單次視覺脈衝 - 鎖定片語對話框動態計數標籤寬度並補上回歸測試
- 修正回饋重設後的輔助播報內容 - 確保播報與目前回饋設定狀態一致
- 新增肩鍵單按、連發與雙肩組合的仲裁流程 - 補上組合提示回饋與對應回歸測試 - 同步整理相關 C# 註解與測試文件
調整右鍵選單與片語子選單的確認與分頁行為,避免 Space 覆寫原生行為並維持控制器導覽連續性。 同時讓測試一律使用獨立設定目錄,避免自動化驗證覆寫使用者的實際片語資料。
移除主輸入區、片語子選單與片語管理中不需要的 LT/RT 連發行為,保留真正適合長按的翻頁情境。 同步更新主 README、應用程式內說明與多語系資源,並補上對應回歸測試。
There was a problem hiding this comment.
Pull request overview
This PR expands the gamepad UX and feedback system across the main input flow and dialogs by introducing direction-aware / multi-step vibration patterns, richer controller shortcuts (including LB/RB parity), improved context-menu keyboard routing, and test/config isolation improvements.
Changes:
- Introduces directional + multi-step vibration profiles/sequences and routes navigation/selection feedback through a semantic/context-based resolver.
- Improves gamepad and keyboard interaction flow (history paging, phrase menu paging persistence, context-menu keyboard routing, phrase manager shortcuts, and text-limit feedback).
- Adds/extends regression tests and isolates test config I/O via
INPUTBOX_CONFIG_DIRECTORY.
Reviewed changes
Copilot reviewed 40 out of 41 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/InputBox.Tests/VibrationPatternsTests.cs | Adds coverage for new vibration semantics, sequences, directional scaling, and FeedbackService integration. |
| tests/InputBox.Tests/TestEnvironmentSetup.cs | Adds ModuleInitializer to isolate config directory for tests via env var. |
| tests/InputBox.Tests/RestartPromptStateTests.cs | Cleans up imports after config isolation changes. |
| tests/InputBox.Tests/README.md | Updates test inventory/counts to reflect new/expanded tests. |
| tests/InputBox.Tests/PhraseServiceTests.cs | Serializes phrase data tests via a shared collection to avoid file contention. |
| tests/InputBox.Tests/PhraseManagerDialogGamepadTests.cs | Adds regression tests for phrase manager LB/RB/LT/RT navigation shortcuts. |
| tests/InputBox.Tests/PhraseDataTestCollection.cs | Defines a non-parallel test collection for phrase data file access. |
| tests/InputBox.Tests/InputHistoryServiceTests.cs | Adds tests for new page-based history navigation API. |
| tests/InputBox.Tests/GamepadShoulderShortcutArbiterTests.cs | Adds tests for the new shoulder shortcut arbitration helper. |
| tests/InputBox.Tests/GamepadMessageBoxTests.cs | Updates stubs to match expanded IGamepadController vibration + button surface. |
| tests/InputBox.Tests/GamepadEventBinderTests.cs | Extends binder test to include shoulder released/repeat events. |
| tests/InputBox.Tests/DialogLabelStabilityTests.cs | Adds layout regression tests for fixed-width dynamic count labels. |
| tests/InputBox.Tests/CmdKeyDispatcherTests.cs | Adds tests for context-menu keyboard→action translation. |
| src/InputBox/Resources/Strings.zh-Hant.resx | Updates/extends localized a11y and help strings for new shortcuts and controller identify. |
| src/InputBox/Resources/Strings.zh-Hans.resx | Same as above (Simplified Chinese). |
| src/InputBox/Resources/Strings.resx | Same as above (default/English). |
| src/InputBox/Resources/Strings.ko.resx | Same as above (Korean). |
| src/InputBox/Resources/Strings.ja.resx | Same as above (Japanese). |
| src/InputBox/Resources/Strings.fr.resx | Same as above (French). |
| src/InputBox/Resources/Strings.de.resx | Same as above (German). |
| src/InputBox/Resources/Strings.Designer.cs | Regenerated designer accessors for added resource keys. |
| src/InputBox/MainForm.cs | Adds text-limit feedback hooks and cmd-key routing for context menu visibility. |
| src/InputBox/MainForm.Events.cs | Adds history page navigation path and integrates new navigation vibration semantics. |
| src/InputBox/MainForm.ContextMenu.cs | Adds “Identify Controller”, improves phrase paging persistence, and adds vibration intensity preview/apply flow. |
| src/InputBox/Core/Services/PhraseService.cs | Fixes temp-file unregister logic by retaining the registered temp path. |
| src/InputBox/Core/Services/InputHistoryService.cs | Adds NavigatePage() API for fixed-step history paging. |
| src/InputBox/Core/Services/FeedbackService.cs | Adds multi-motor vibration dispatch, vibration sequences, navigation vibration routing, and selection cue sound helper. |
| src/InputBox/Core/Services/CmdKeyDispatcher.cs | Adds context-menu key translation into unified action strings. |
| src/InputBox/Core/Input/XInputGamepadController.cs | Adds shoulder release/repeat tracking, X-hold state, motor capability surface, and multi-motor vibration overload. |
| src/InputBox/Core/Input/IGamepadController.cs | Extends controller contract with shoulder release/repeat, X-hold, motor support, and profile-based vibration overload. |
| src/InputBox/Core/Input/GamepadShoulderShortcutArbiter.cs | Adds arbitration logic for shoulder tap/repeat/modifier/dual-chord interactions. |
| src/InputBox/Core/Input/GamepadEventBinder.cs | Extends binding map to include shoulder released/repeat handlers. |
| src/InputBox/Core/Input/GameInputGamepadController.cs | Adds shoulder release/repeat tracking, X-hold state, motor capability surface, and multi-motor vibration overload. |
| src/InputBox/Core/Feedback/VibrationProfile.cs | Expands vibration profile to include per-motor scales + sequence/support types. |
| src/InputBox/Core/Feedback/VibrationPatterns.cs | Adds semantic/context-based vibration pattern resolution and many new directional/sequence patterns. |
| src/InputBox/Core/Controls/PhraseManagerDialog.cs | Stabilizes phrase-count label sizing and adds gamepad shortcut handlers for list navigation. |
| src/InputBox/Core/Controls/PhraseEditDialog.cs | Adds text-limit feedback (warning/wall) and burst-based selection feedback with word granularity via either shoulder. |
| src/InputBox/Core/Controls/NumericInputDialog.cs | Adds burst-based selection feedback and expands LB/RB usage for word granularity. |
| src/InputBox/Core/Configuration/AppSettings.cs | Adds INPUTBOX_CONFIG_DIRECTORY override support for config directory resolution. |
| README.md | Updates end-user documentation for new shortcuts, feedback behaviors, and controller identify option. |
Files not reviewed (1)
- src/InputBox/Resources/Strings.Designer.cs: Language not supported
|
@copilot apply changes based on the comments in this thread |
- XInputGamepadController: use profile.Strength (not GetPeakMotorStrength) as requestedStrength so each motor scale is applied exactly once via ScaleMotorStrength(safeStrength, motorScale). - GameInputGamepadController: same fix; intensity = safeStrength/65535f is now multiplied by each motorScale once when building GameInputRumbleParams. - AppSettings.ResolveConfigDirectory: wrap Path.GetFullPath() in try/catch (ArgumentException | NotSupportedException | PathTooLongException) and fall back to new GetDefaultConfigDirectory() helper, preventing a type- initialization crash when INPUTBOX_CONFIG_DIRECTORY holds an invalid path. Agent-Logs-Url: https://github.com/rubujo/InputBox/sessions/a1ddedd3-c347-46ba-8064-7ec1dcdfc27e Co-authored-by: perditavojo <117562794+perditavojo@users.noreply.github.com>
Applied all four changes from the review thread in commit d5c1ec1:
|
This pull request introduces several usability improvements and feedback enhancements for game controller and text input interactions, particularly in the phrase editing and numeric input dialogs. The changes focus on more granular and responsive text selection, improved feedback as text approaches length limits, and better configuration flexibility for application data directories.
Game controller enhancements:
Text input feedback improvements:
Configuration and infrastructure:
INPUTBOX_CONFIG_DIRECTORYenvironment variable, improving flexibility for deployment and testing scenarios.Other improvements:
Summary of most important changes:
Controller and Interaction Enhancements
Text Input Feedback
Configuration
INPUTBOX_CONFIG_DIRECTORYenvironment variable for more flexible setups.