Home
last modified time | relevance | path

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

12

/frameworks/native/services/inputflinger/reader/mapper/
DKeyboardInputMapper.cpp194 int32_t scanCode = rawEvent->code; in process() local
198 if (isKeyboardOrGamepadKey(scanCode)) { in process()
199 processKey(rawEvent->when, rawEvent->value != 0, scanCode, usageCode); in process()
217 bool KeyboardInputMapper::isKeyboardOrGamepadKey(int32_t scanCode) { in isKeyboardOrGamepadKey() argument
218 return scanCode < BTN_MOUSE || scanCode >= KEY_OK || in isKeyboardOrGamepadKey()
219 (scanCode >= BTN_MISC && scanCode < BTN_MOUSE) || in isKeyboardOrGamepadKey()
220 (scanCode >= BTN_JOYSTICK && scanCode < BTN_DIGI); in isKeyboardOrGamepadKey()
252 void KeyboardInputMapper::processKey(nsecs_t when, bool down, int32_t scanCode, int32_t usageCode) { in processKey() argument
257 if (getEventHub()->mapKey(getDeviceId(), scanCode, usageCode, mMetaState, &keyCode, in processKey()
271 ssize_t keyDownIndex = findKeyDown(scanCode); in processKey()
[all …]
DKeyboardInputMapper.h37 virtual int32_t getScanCodeState(uint32_t sourceMask, int32_t scanCode);
50 int32_t scanCode; member
82 bool isKeyboardOrGamepadKey(int32_t scanCode);
85 void processKey(nsecs_t when, bool down, int32_t scanCode, int32_t usageCode);
89 ssize_t findKeyDown(int32_t scanCode);
DCursorInputMapper.cpp474 int32_t CursorInputMapper::getScanCodeState(uint32_t sourceMask, int32_t scanCode) { in getScanCodeState() argument
475 if (scanCode >= BTN_MOUSE && scanCode < BTN_JOYSTICK) { in getScanCodeState()
476 return getEventHub()->getScanCodeState(getDeviceId(), scanCode); in getScanCodeState()
DCursorInputMapper.h66 virtual int32_t getScanCodeState(uint32_t sourceMask, int32_t scanCode);
DInputMapper.h62 virtual int32_t getScanCodeState(uint32_t sourceMask, int32_t scanCode);
DInputMapper.cpp46 int32_t InputMapper::getScanCodeState(uint32_t sourceMask, int32_t scanCode) { in getScanCodeState() argument
/frameworks/native/libs/input/
DKeyLayoutMap.cpp85 status_t KeyLayoutMap::mapKey(int32_t scanCode, int32_t usageCode, in mapKey() argument
87 const Key* key = getKey(scanCode, usageCode); in mapKey()
90 ALOGD("mapKey: scanCode=%d, usageCode=0x%08x ~ Failed.", scanCode, usageCode); in mapKey()
102 scanCode, usageCode, *outKeyCode, *outFlags); in mapKey()
107 const KeyLayoutMap::Key* KeyLayoutMap::getKey(int32_t scanCode, int32_t usageCode) const { in getKey() argument
114 if (scanCode) { in getKey()
115 ssize_t index = mKeysByScanCode.indexOfKey(scanCode); in getKey()
134 status_t KeyLayoutMap::mapAxis(int32_t scanCode, AxisInfo* outAxisInfo) const { in mapAxis() argument
135 ssize_t index = mAxes.indexOfKey(scanCode); in mapAxis()
138 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()
DInputTransport.cpp150 msg->body.key.scanCode = body.key.scanCode; in getSanitizedCopy()
426 int32_t scanCode, in publishKeyEvent() argument
441 deviceId, source, action, flags, keyCode, scanCode, metaState, repeatCount, in publishKeyEvent()
459 msg.body.key.scanCode = scanCode; in publishKeyEvent()
1122 msg->body.key.scanCode, in initializeKeyEvent()
/frameworks/native/include/input/
DKeyLayoutMap.h67 status_t mapKey(int32_t scanCode, int32_t usageCode,
73 status_t mapAxis(int32_t scanCode, AxisInfo* outAxisInfo) const;
97 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/
DInputListener.cpp52 int32_t action, int32_t flags, int32_t keyCode, int32_t scanCode, in NotifyKeyArgs() argument
56 action(action), flags(flags), keyCode(keyCode), scanCode(scanCode), in NotifyKeyArgs()
64 keyCode(other.keyCode), scanCode(other.scanCode), in NotifyKeyArgs()
78 && scanCode == rhs.scanCode in operator ==()
/frameworks/native/services/inputflinger/reader/include/
DEventHub.h182 virtual status_t mapKey(int32_t deviceId, int32_t scanCode, int32_t usageCode,
186 virtual status_t mapAxis(int32_t deviceId, int32_t scanCode, AxisInfo* outAxisInfo) const = 0;
210 virtual int32_t getScanCodeState(int32_t deviceId, int32_t scanCode) const = 0;
222 virtual bool hasScanCode(int32_t deviceId, int32_t scanCode) const = 0;
279 virtual status_t mapKey(int32_t deviceId, int32_t scanCode, int32_t usageCode,
283 virtual status_t mapAxis(int32_t deviceId, int32_t scanCode, AxisInfo* outAxisInfo) const;
287 virtual int32_t getScanCodeState(int32_t deviceId, int32_t scanCode) const;
298 virtual bool hasScanCode(int32_t deviceId, int32_t scanCode) const;
DInputReader.h65 virtual int32_t getScanCodeState(int32_t deviceId, uint32_t sourceMask, int32_t scanCode);
97 int32_t scanCode);
159 int32_t scanCode);
DInputReaderContext.h46 int32_t scanCode) = 0;
/frameworks/native/services/inputflinger/dispatcher/
DEntry.cpp118 int32_t keyCode, int32_t scanCode, int32_t metaState, int32_t repeatCount, in KeyEntry() argument
127 scanCode(scanCode), in KeyEntry()
146 keyCode, scanCode, metaState, repeatCount, policyFlags); in appendDescription()
DInputState.cpp195 memento.scanCode == entry->scanCode) { in findKeyMemento()
219 memento.scanCode = entry->scanCode; in addKeyMemento()
259 memento.keyCode, memento.scanCode, memento.metaState, in synthesizeCancelationEvents()
DEntry.h90 int32_t scanCode; member
108 int32_t keyCode, int32_t scanCode, int32_t metaState, int32_t repeatCount,
DInputState.h83 int32_t scanCode; member
/frameworks/native/services/inputflinger/reader/
DEventHub.cpp418 int32_t EventHub::getScanCodeState(int32_t deviceId, int32_t scanCode) const { in getScanCodeState()
419 if (scanCode >= 0 && scanCode <= KEY_MAX) { in getScanCodeState()
423 if (device && device->hasValidFd() && test_bit(scanCode, device->keyBitmask)) { in getScanCodeState()
427 return test_bit(scanCode, keyState) ? AKEY_STATE_DOWN : AKEY_STATE_UP; in getScanCodeState()
524 status_t EventHub::mapKey(int32_t deviceId, int32_t scanCode, int32_t usageCode, int32_t metaState, in mapKey() argument
534 if (!kcm->mapKey(scanCode, usageCode, outKeycode)) { in mapKey()
542 if (!device->keyMap.keyLayoutMap->mapKey(scanCode, usageCode, outKeycode, outFlags)) { in mapKey()
565 status_t EventHub::mapAxis(int32_t deviceId, int32_t scanCode, AxisInfo* outAxisInfo) const { in mapAxis() argument
570 status_t err = device->keyMap.keyLayoutMap->mapAxis(scanCode, outAxisInfo); in mapAxis()
585 bool EventHub::hasScanCode(int32_t deviceId, int32_t scanCode) const { in hasScanCode()
[all …]
DInputReader.cpp410 int32_t scanCode) { in shouldDropVirtualKeyLocked() argument
415 scanCode); in shouldDropVirtualKeyLocked()
465 int32_t InputReader::getScanCodeState(int32_t deviceId, uint32_t sourceMask, int32_t scanCode) { in getScanCodeState() argument
468 return getStateLocked(deviceId, sourceMask, scanCode, &InputDevice::getScanCodeState); in getScanCodeState()
722 int32_t keyCode, int32_t scanCode) { in shouldDropVirtualKey() argument
724 return mReader->shouldDropVirtualKeyLocked(now, device, keyCode, scanCode); in shouldDropVirtualKey()
/frameworks/base/core/jni/
Dandroid_view_KeyEvent.cpp88 jint scanCode = env->GetIntField(eventObj, gKeyEventClassInfo.mScanCode); in android_view_KeyEvent_toNative() local
94 event->initialize(deviceId, source, displayId, action, flags, keyCode, scanCode, metaState, in android_view_KeyEvent_toNative()
/frameworks/native/services/inputflinger/include/
DInputListener.h74 int32_t scanCode; member
82 int32_t scanCode, int32_t metaState, nsecs_t downTime);
/frameworks/native/libs/input/tests/
DInputPublisherAndConsumer_test.cpp80 constexpr int32_t scanCode = 13; in PublishAndConsumeKeyEvent() local
87 keyCode, scanCode, metaState, repeatCount, downTime, eventTime); in PublishAndConsumeKeyEvent()
110 EXPECT_EQ(scanCode, keyEvent->getScanCode()); in PublishAndConsumeKeyEvent()

12