feat: add InputFilter fix, swipe/tap actions, and throttle setting#1
Open
susll wants to merge 4 commits into
Open
feat: add InputFilter fix, swipe/tap actions, and throttle setting#1susll wants to merge 4 commits into
susll wants to merge 4 commits into
Conversation
…ception Without an InputFilter registered, InputDispatcher (native) never calls back into InputManagerService.filterInputEvent for real hardware events. By registering a pass-through filter via dynamic proxy, all hardware events flow through filterInputEvent where the hook can intercept them. - Add registerPassThroughFilter() with retry logic (30 retries, 2s delay) - Use java.lang.reflect.Proxy to create IInputFilter implementation - Pass all non-zoom-ring events through to foreground windows normally
- SwipeAction: 4-direction swipe with configurable distance - TapCoordinateAction: tap at specific screen coordinates - Register both in ActionRegistry
- Add throttleMs property to ConfigManager (default 200ms, range 50-1000ms) - Add throttle slider in HomeScreen
- Add SwipeConfigDialog with direction dropdown and distance input - Add TapConfigDialog with X/Y coordinate inputs - Apply throttle check before action execution - Use parseConfig() for action config parsing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Changes
Bug Fix
InputInterceptorHook: 注册IInputFilter动态代理,启用 native InputDispatcher 回调,带延迟重试逻辑New Actions
SwipeAction: 支持上/下/左/右四个方向,距离可配置(默认 800px)TapCoordinateAction: 点击指定屏幕坐标,X/Y 可配置Settings
ConfigManager: 新增throttleMs属性(默认 200ms)HomeScreen: 新增触发频率滑块(50-1000ms)UI
GestureConfigScreen: 新增滑动配置弹窗(方向下拉框 + 距离输入)和坐标配置弹窗(X/Y 输入框)Test Plan
Registered pass-through InputFilter出现ZoomRing:日志出现