Home
last modified time | relevance | path

Searched refs:scanCode (Results 1 – 25 of 46) sorted by relevance

12

/frameworks/native/services/inputflinger/reader/mapper/
DKeyboardInputMapper.cpp212 int32_t scanCode = rawEvent->code; in process() local
216 if (isKeyboardOrGamepadKey(scanCode)) { in process()
217 processKey(rawEvent->when, rawEvent->readTime, rawEvent->value != 0, scanCode, in process()
236 bool KeyboardInputMapper::isKeyboardOrGamepadKey(int32_t scanCode) { in isKeyboardOrGamepadKey() argument
237 return scanCode < BTN_MOUSE || scanCode >= BTN_WHEEL || in isKeyboardOrGamepadKey()
238 (scanCode >= BTN_MISC && scanCode < BTN_MOUSE) || in isKeyboardOrGamepadKey()
239 (scanCode >= BTN_JOYSTICK && scanCode < BTN_DIGI); in isKeyboardOrGamepadKey()
271 void KeyboardInputMapper::processKey(nsecs_t when, nsecs_t readTime, bool down, int32_t scanCode, in processKey() argument
277 if (getDeviceContext().mapKey(scanCode, usageCode, mMetaState, &keyCode, &keyMetaState, in processKey()
291 ssize_t keyDownIndex = findKeyDown(scanCode); in processKey()
[all …]
DKeyboardInputMapper.h38 virtual int32_t getScanCodeState(uint32_t sourceMask, int32_t scanCode) override;
53 int32_t scanCode; member
86 bool isKeyboardOrGamepadKey(int32_t scanCode);
89 void processKey(nsecs_t when, nsecs_t readTime, bool down, int32_t scanCode, int32_t usageCode);
93 ssize_t findKeyDown(int32_t scanCode);
DCursorInputMapper.cpp494 int32_t CursorInputMapper::getScanCodeState(uint32_t sourceMask, int32_t scanCode) { in getScanCodeState() argument
495 if (scanCode >= BTN_MOUSE && scanCode < BTN_JOYSTICK) { in getScanCodeState()
496 return getDeviceContext().getScanCodeState(scanCode); in getScanCodeState()
DCursorInputMapper.h67 virtual int32_t getScanCodeState(uint32_t sourceMask, int32_t scanCode) override;
/frameworks/native/libs/input/
DKeyLayoutMap.cpp129 status_t KeyLayoutMap::mapKey(int32_t scanCode, int32_t usageCode, in mapKey() argument
131 const Key* key = getKey(scanCode, usageCode); in mapKey()
134 ALOGD("mapKey: scanCode=%d, usageCode=0x%08x ~ Failed.", scanCode, usageCode); in mapKey()
146 scanCode, usageCode, *outKeyCode, *outFlags); in mapKey()
169 const KeyLayoutMap::Key* KeyLayoutMap::getKey(int32_t scanCode, int32_t usageCode) const { in getKey() argument
176 if (scanCode) { in getKey()
177 ssize_t index = mKeysByScanCode.indexOfKey(scanCode); in getKey()
196 status_t KeyLayoutMap::mapAxis(int32_t scanCode, AxisInfo* outAxisInfo) const { in mapAxis() argument
197 ssize_t index = mAxes.indexOfKey(scanCode); in mapAxis()
200 ALOGD("mapAxis: scanCode=%d ~ Failed.", scanCode); in mapAxis()
[all …]
DVirtualKeyMap.cpp99 bool success = parseNextIntField(&defn.scanCode) in parse()
113 defn.scanCode, defn.centerX, defn.centerY, defn.width, defn.height); in parse()
/frameworks/native/include/input/
DKeyLayoutMap.h73 status_t mapKey(int32_t scanCode, int32_t usageCode,
79 status_t mapAxis(int32_t scanCode, AxisInfo* outAxisInfo) const;
111 const Key* getKey(int32_t scanCode, int32_t usageCode) const;
DVirtualKeyMap.h33 int32_t scanCode; member
DKeyCharacterMap.h130 status_t mapKey(int32_t scanCode, int32_t usageCode, int32_t* outKeyCode) const;
134 void tryRemapKey(int32_t scanCode, int32_t metaState,
/frameworks/native/services/inputflinger/reader/include/
DInputDevice.h85 int32_t getScanCodeState(uint32_t sourceMask, int32_t scanCode);
272 inline status_t mapKey(int32_t scanCode, int32_t usageCode, int32_t metaState, in mapKey() argument
274 return mEventHub->mapKey(mId, scanCode, usageCode, metaState, outKeycode, outMetaState, in mapKey()
277 inline status_t mapAxis(int32_t scanCode, AxisInfo* outAxisInfo) const { in mapAxis() argument
278 return mEventHub->mapAxis(mId, scanCode, outAxisInfo); in mapAxis()
309 inline int32_t getScanCodeState(int32_t scanCode) const { in getScanCodeState() argument
310 return mEventHub->getScanCodeState(mId, scanCode); in getScanCodeState()
323 inline bool hasScanCode(int32_t scanCode) const { in hasScanCode() argument
324 return mEventHub->hasScanCode(mId, scanCode); in hasScanCode()
DEventHub.h257 virtual status_t mapKey(int32_t deviceId, int32_t scanCode, int32_t usageCode,
261 virtual status_t mapAxis(int32_t deviceId, int32_t scanCode, AxisInfo* outAxisInfo) const = 0;
302 virtual int32_t getScanCodeState(int32_t deviceId, int32_t scanCode) const = 0;
314 virtual bool hasScanCode(int32_t deviceId, int32_t scanCode) const = 0;
452 status_t mapKey(int32_t deviceId, int32_t scanCode, int32_t usageCode, int32_t metaState,
456 status_t mapAxis(int32_t deviceId, int32_t scanCode,
479 int32_t getScanCodeState(int32_t deviceId, int32_t scanCode) const override final;
491 bool hasScanCode(int32_t deviceId, int32_t scanCode) const override final;
DInputReader.h69 int32_t getScanCodeState(int32_t deviceId, uint32_t sourceMask, int32_t scanCode) override;
134 bool shouldDropVirtualKey(nsecs_t now, int32_t keyCode, int32_t scanCode)
225 bool shouldDropVirtualKeyLocked(nsecs_t now, int32_t keyCode, int32_t scanCode) REQUIRES(mLock);
DInputReaderContext.h46 virtual bool shouldDropVirtualKey(nsecs_t now, int32_t keyCode, int32_t scanCode) = 0;
/frameworks/base/core/java/android/view/
DVerifiedKeyEvent.java194 int scanCode, argument
204 this.mScanCode = scanCode;
360 int scanCode = in.readInt(); in VerifiedKeyEvent() local
370 this.mScanCode = scanCode; in VerifiedKeyEvent()
/frameworks/base/core/tests/coretests/src/android/view/
DVerifiedKeyEventTest.kt48 assertEquals(SCAN_CODE, event.scanCode) in testConstructor()
160 assertEquals(event1.scanCode, event2.scanCode) in compareVerifiedKeyEvents()
/frameworks/native/services/inputflinger/dispatcher/
DEntry.cpp38 entry.scanCode, in verifiedKeyEventFromKeyEntry()
154 int32_t keyCode, int32_t scanCode, int32_t metaState, int32_t repeatCount, in KeyEntry() argument
163 scanCode(scanCode), in KeyEntry()
182 flags, keyCode, scanCode, metaState, repeatCount, policyFlags); in getDescription()
DInputState.cpp202 memento.scanCode == entry.scanCode) { in findKeyMemento()
226 memento.scanCode = entry.scanCode; in addKeyMemento()
280 memento.keyCode, memento.scanCode, memento.metaState, in synthesizeCancelationEvents()
DEntry.h134 int32_t scanCode; member
151 uint32_t policyFlags, int32_t action, int32_t flags, int32_t keyCode, int32_t scanCode,
/frameworks/native/services/inputflinger/
DInputListener.cpp55 int32_t action, int32_t flags, int32_t keyCode, int32_t scanCode, in NotifyKeyArgs() argument
65 scanCode(scanCode), in NotifyKeyArgs()
79 scanCode(other.scanCode), in NotifyKeyArgs()
88 keyCode == rhs.keyCode && scanCode == rhs.scanCode && metaState == rhs.metaState && in operator ==()
/frameworks/base/core/jni/
Dandroid_view_VerifiedKeyEvent.cpp37 event.scanCode, event.metaState, event.repeatCount); in android_view_VerifiedKeyEvent()
Dandroid_view_KeyEvent.cpp132 jint scanCode = env->GetIntField(eventObj, gKeyEventClassInfo.mScanCode); in android_view_KeyEvent_toNative() local
138 event->initialize(id, deviceId, source, displayId, *hmac, action, flags, keyCode, scanCode, in android_view_KeyEvent_toNative()
/frameworks/native/services/inputflinger/reader/
DEventHub.cpp548 int32_t scanCode; in mapLed() local
549 if (keyMap.keyLayoutMap->findScanCodeForLed(led, &scanCode) != NAME_NOT_FOUND) { in mapLed()
550 if (scanCode >= 0 && scanCode <= LED_MAX && ledBitmask.test(scanCode)) { in mapLed()
551 *outScanCode = scanCode; in mapLed()
821 int32_t EventHub::getScanCodeState(int32_t deviceId, int32_t scanCode) const { in getScanCodeState()
822 if (scanCode >= 0 && scanCode <= KEY_MAX) { in getScanCodeState()
826 if (device != nullptr && device->hasValidFd() && device->keyBitmask.test(scanCode)) { in getScanCodeState()
828 return device->keyState.test(scanCode) ? AKEY_STATE_DOWN : AKEY_STATE_UP; in getScanCodeState()
921 status_t EventHub::mapKey(int32_t deviceId, int32_t scanCode, int32_t usageCode, int32_t metaState, in mapKey() argument
931 if (!kcm->mapKey(scanCode, usageCode, outKeycode)) { in mapKey()
[all …]
DInputReader.cpp425 bool InputReader::shouldDropVirtualKeyLocked(nsecs_t now, int32_t keyCode, int32_t scanCode) { in shouldDropVirtualKeyLocked() argument
429 (mDisableVirtualKeysTimeout - now) * 0.000001, keyCode, scanCode); in shouldDropVirtualKeyLocked()
511 int32_t InputReader::getScanCodeState(int32_t deviceId, uint32_t sourceMask, int32_t scanCode) { in getScanCodeState() argument
514 return getStateLocked(deviceId, sourceMask, scanCode, &InputDevice::getScanCodeState); in getScanCodeState()
909 int32_t scanCode) { in shouldDropVirtualKey() argument
911 return mReader->shouldDropVirtualKeyLocked(now, keyCode, scanCode); in shouldDropVirtualKey()
/frameworks/base/tests/Input/src/com/android/test/input/
DInputEventSenderAndReceiverTest.kt41 assertEquals(expected.scanCode, received.scanCode) in assertKeyEvent()
/frameworks/native/libs/input/tests/
DStructLayout_test.cpp46 CHECK_OFFSET(InputMessage::Body::Key, scanCode, 72); in TestInputMessageAlignment()
148 sizeof(VerifiedKeyEvent::scanCode) + sizeof(VerifiedKeyEvent::metaState) + in TestVerifiedEventSize()

12