summaryrefslogtreecommitdiffstats
path: root/services/input/InputReader.h
diff options
context:
space:
mode:
Diffstat (limited to 'services/input/InputReader.h')
-rw-r--r--services/input/InputReader.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/services/input/InputReader.h b/services/input/InputReader.h
index ab452c8..dc786a6 100644
--- a/services/input/InputReader.h
+++ b/services/input/InputReader.h
@@ -140,6 +140,9 @@ struct InputReaderConfiguration {
// Stylus icon option changed.
CHANGE_STYLUS_ICON_ENABLED = 1 << 6,
+ // Volume keys rotation option changed.
+ CHANGE_VOLUME_KEYS_ROTATION = 1 << 7,
+
// All devices must be reopened.
CHANGE_MUST_REOPEN = 1 << 31,
};
@@ -230,6 +233,10 @@ struct InputReaderConfiguration {
// True to show the pointer icon when a stylus is used.
bool stylusIconEnabled;
+ // Remap volume keys according to display rotation
+ // 0 - disabled, 1 - phone or hybrid rotation mode, 2 - tablet rotation mode
+ int volumeKeysRotationMode;
+
// Ignore finger touches this long after the stylus has been used (including hover)
nsecs_t stylusPalmRejectionTime;
@@ -249,9 +256,10 @@ struct InputReaderConfiguration {
pointerGestureSwipeMaxWidthRatio(0.25f),
pointerGestureMovementSpeedRatio(0.8f),
pointerGestureZoomSpeedRatio(0.3f),
- showTouches(false),
+ showTouches(false),
stylusIconEnabled(false),
- stylusPalmRejectionTime(50 * 10000000LL) // 50 ms
+ stylusPalmRejectionTime(50 * 10000000LL), // 50 ms
+ volumeKeysRotationMode(0)
{ }
bool getDisplayInfo(bool external, DisplayViewport* outViewport) const;
@@ -1039,7 +1047,8 @@ private:
uint32_t mSource;
int32_t mKeyboardType;
- int32_t mOrientation; // orientation for dpad keys
+ int32_t mRotationMapOffset; // determines if and how volume keys rotate
+ int32_t mOrientation; // orientation for dpad and volume keys
Vector<KeyDown> mKeyDowns; // keys that are down
int32_t mMetaState;