-
-
Notifications
You must be signed in to change notification settings - Fork 206
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
InputService: add basic ASCII keyboard handling
This implements additional keyboard input from VNC viewers in the form of: - ASCII characters, i.e. basic typing - Left and Right arrow handling to select text cursor position - Delete and Backspace handling for editing text - Enter/Return handling on API level >= 30 All display-specific, i.e. provides one keyboard focus per display. Closes #4, finally.
- Loading branch information
Showing
3 changed files
with
143 additions
and
11 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,12 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- On API 30 and later flagRetrieveInteractiveWindows canRetrieveWindowContent | ||
are needed for onAccessibilityEvent() to trigger --> | ||
<accessibility-service xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:accessibilityEventTypes="typeWindowsChanged" | ||
android:accessibilityFlags="flagDefault" | ||
android:notificationTimeout="50" | ||
android:accessibilityEventTypes="typeViewFocused|typeViewClicked|typeViewSelected|typeViewTextChanged|typeViewTextSelectionChanged" | ||
android:accessibilityFlags="flagDefault|flagRetrieveInteractiveWindows" | ||
android:notificationTimeout="30" | ||
android:description="@string/input_a11y_service_description" | ||
android:canPerformGestures="true" | ||
android:canTakeScreenshot="true" | ||
android:canRetrieveWindowContent="true" | ||
/> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,12 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- accessibilityFeedbackType seems needed pre API 30 so onAccessibilityEvent() triggers, | ||
but it seems we don't need flagRetrieveInteractiveWindows --> | ||
<accessibility-service xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:accessibilityEventTypes="typeWindowsChanged" | ||
android:accessibilityFlags="flagDefault" | ||
android:notificationTimeout="50" | ||
android:accessibilityEventTypes="typeViewFocused|typeViewClicked|typeViewSelected|typeViewTextChanged|typeViewTextSelectionChanged" | ||
android:accessibilityFlags="flagDefault" | ||
android:notificationTimeout="30" | ||
android:description="@string/input_a11y_service_description" | ||
android:canPerformGestures="true" | ||
/> | ||
android:canRetrieveWindowContent="true" | ||
android:accessibilityFeedbackType="feedbackVisual" | ||
/> |