Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 34d5ed25 authored by Vaibhav Devmurari's avatar Vaibhav Devmurari Committed by Android (Google) Code Review
Browse files

Merge "[1/n native] Disable key remapping for virtual keyboards" into main

parents e4a387d7 6a506057
Loading
Loading
Loading
Loading
+5 −4
Original line number Original line Diff line number Diff line
@@ -399,10 +399,11 @@ std::list<NotifyArgs> InputDevice::configureInternal(nsecs_t when,
        }
        }


        if (!changes.any() || changes.test(InputReaderConfiguration::Change::KEY_REMAPPING)) {
        if (!changes.any() || changes.test(InputReaderConfiguration::Change::KEY_REMAPPING)) {
            const bool isFullKeyboard =
            const bool isKeyboard =
                    (mSources & AINPUT_SOURCE_KEYBOARD) == AINPUT_SOURCE_KEYBOARD &&
                    (mSources & AINPUT_SOURCE_KEYBOARD) == AINPUT_SOURCE_KEYBOARD;
                    mKeyboardType == KeyboardType::ALPHABETIC;
            const bool isFullKeyboard = isKeyboard && (mKeyboardType == KeyboardType::ALPHABETIC);
            if (isFullKeyboard) {
            const bool isPhysicalKeyboard = isKeyboard && !mIsVirtualDevice;
            if (isPhysicalKeyboard && isFullKeyboard) {
                for_each_subdevice([&readerConfig](auto& context) {
                for_each_subdevice([&readerConfig](auto& context) {
                    context.setKeyRemapping(readerConfig.keyRemapping);
                    context.setKeyRemapping(readerConfig.keyRemapping);
                });
                });