From 0029c66203ab9ded4342976bf7a17bb63af8c44a Mon Sep 17 00:00:00 2001 From: Jeff Brown Date: Wed, 30 Mar 2011 02:25:18 -0700 Subject: Add input filter mechanism for accessibility. This patch adds a mechanism for capturing, filtering, transforming and injecting input events at a very low level before the input dispatcher attempts to deliver them to applications. At this time, the mechanism is only intended to be used by the accessibility system to implement built-in system-level accessibility affordances. The accessibility input filter is currently just a stub. It logs the input events receives and reinjects them unchanged, except that it transforms KEYCODE_Q into KEYCODE_Z. Currently, the accessibility input filter is installed whenever accessibility is enabled. We'll probably want to change that so it only enables the input filter when a screen reader is installed and we want touch exploration. Change-Id: I35764fdf75522b69d09ebd78c9766eb7593c1afe --- include/ui/Input.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/ui') diff --git a/include/ui/Input.h b/include/ui/Input.h index 8e8b61b..b22986d 100644 --- a/include/ui/Input.h +++ b/include/ui/Input.h @@ -128,6 +128,12 @@ enum { // input device or an application with system-wide event injection permission. POLICY_FLAG_TRUSTED = 0x02000000, + // Indicates that the input event has passed through an input filter. + POLICY_FLAG_FILTERED = 0x04000000, + + // Disables automatic key repeating behavior. + POLICY_FLAG_DISABLE_KEY_REPEAT = 0x08000000, + /* These flags are set by the input reader policy as it intercepts each event. */ // Indicates that the screen was off when the event was received and the event -- cgit v1.1