Accelerate shortcuts for input injection

There are certain shortcuts for key events that are treated specially in
InputDispatcher. Currently, the processing occurs exclusively in
notifyKey, which means injected events do not go through that path. As a
result, the shortcut behaviour cannot be tested with CTS tests easily.

Refactor the shortcut-handling code into a separate function here, then
call this function from injectInputEvent as well as in notifyKey in
InputDispatcher.cpp.

Test: atest KeyEventInterceptTest
Bug: 77548740
Change-Id: Ic31ecc56affd612f144143c83978364b3be9e252
diff --git a/services/inputflinger/InputDispatcher.h b/services/inputflinger/InputDispatcher.h
index 5f76abe..82960b7 100644
--- a/services/inputflinger/InputDispatcher.h
+++ b/services/inputflinger/InputDispatcher.h
@@ -931,6 +931,9 @@
     };
     // Maps the key code replaced, device id tuple to the key code it was replaced with
     KeyedVector<KeyReplacement, int32_t> mReplacedKeys;
+    // Process certain Meta + Key combinations
+    void accelerateMetaShortcuts(const int32_t deviceId, const int32_t action,
+            int32_t& keyCode, int32_t& metaState);
 
     // Deferred command processing.
     bool haveCommandsLocked() const;