Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Super/meta/windows key not sent to the remote #537

Open
rstanuwijaya opened this issue Mar 11, 2024 · 14 comments
Open

Super/meta/windows key not sent to the remote #537

rstanuwijaya opened this issue Mar 11, 2024 · 14 comments

Comments

@rstanuwijaya
Copy link

I am using samsung tab s7 tablet + keyboard to connect to a gnome remote desktop client (GNOME 45). When I pressed a super/meta key, no key is being sent to the remote desktop. But when I tried other remote desktop client, the super key works fine.

@iiordanov
Copy link
Owner

iiordanov commented Mar 12, 2024 via email

@rstanuwijaya
Copy link
Author

Hi and thanks for the response. I tried both in normal and DEX mode, but the super key does not work in both mode.

The other app I tried is Remote Desktop Manager by Devolutions, but it's a proprietary software.

@iiordanov
Copy link
Owner

iiordanov commented Mar 12, 2024 via email

@rstanuwijaya
Copy link
Author

I'm sending the full logcat via the support email. Meanwhile, here's the part of the log you might find useful.

03-12 13:13:17.230 8920 8920 D RemoteCanvas: onKeyUpEvent, e: KeyEvent { action=ACTION_UP, keyCode=KEYCODE_META_LEFT, scanCode=125, metaState=0, flags=0x8, repeatCount=0, eventTime=85159892000, downTime=85074477000, deviceId=10, source=0x101, displayId=-1 }
03-12 13:13:17.230 8920 8920 D RemoteRdpKeyboard: processLocalKeyEvent: KeyEvent { action=ACTION_UP, keyCode=KEYCODE_META_LEFT, scanCode=125, metaState=0, flags=0x8, repeatCount=0, eventTime=85159892000, downTime=85074477000, deviceId=10, source=0x101, displayId=-1 } 117
03-12 13:13:17.230 8920 8920 D RemoteKeyboardState: detected hardware LSUPER scanCode, down: false
03-12 13:13:17.230 8920 8920 D RemoteKeyboardState: detected hardware LSUPER keyCode, down: false
03-12 13:13:17.231 8920 8920 D RemoteKeyboard: convertEventMetaState: Will not ignore KeyEvent.META_ALT_LEFT_ON if present
03-12 13:13:17.231 8920 8920 D RdpCommunicator: writeKeyEvent: setting metaState to: 131072
03-12 13:13:17.231 8920 8920 D RdpKeyboardMapper: processAndroidKeyEvent: vkcode: 0, unicode: 0, preferSendingUnicode: false, isSpecialKey: false
03-12 13:13:17.348 8920 8920 I ViewRootImpl@8837cfb[RemoteCanvasActivity]: ViewPostIme key 0
03-12 13:13:17.348 8920 8920 D RemoteCanvas: onKeyDownEvent, e: KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_META_LEFT, scanCode=125, metaState=META_META_ON|META_META_LEFT_ON, flags=0x8, repeatCount=0, eventTime=85276679000, downTime=85276679000, deviceId=10, source=0x101, displayId=-1 }
03-12 13:13:17.348 8920 8920 D RemoteRdpKeyboard: processLocalKeyEvent: KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_META_LEFT, scanCode=125, metaState=META_META_ON|META_META_LEFT_ON, flags=0x8, repeatCount=0, eventTime=85276679000, downTime=85276679000, deviceId=10, source=0x101, displayId=-1 } 117
03-12 13:13:17.348 8920 8920 D RemoteKeyboardState: detected hardware LSUPER scanCode, down: true
03-12 13:13:17.348 8920 8920 D RemoteKeyboardState: detected hardware LSUPER keyCode, down: true
03-12 13:13:17.348 8920 8920 D RemoteKeyboard: convertEventMetaState: Will not ignore KeyEvent.META_ALT_LEFT_ON if present
03-12 13:13:17.348 8920 8920 D RemoteKeyboard: convertEventMetaState: KeyEvent.META_META_ON
03-12 13:13:17.348 8920 8920 D RemoteKeyboard: convertEventMetaState: KeyEvent.META_META_LEFT_ON
03-12 13:13:17.348 8920 8920 D RdpCommunicator: writeKeyEvent: setting metaState to: 131072
03-12 13:13:17.348 8920 8920 D RdpKeyboardMapper: processAndroidKeyEvent: vkcode: 0, unicode: 0, preferSendingUnicode: false, isSpecialKey: false
03-12 13:13:17.426 8920 8920 I ViewRootImpl@8837cfb[RemoteCanvasActivity]: ViewPostIme key 1

@wasdwasd0105
Copy link

Hi iiordanov:

Can we directly map the meta key as a Win key:

Code example:

        // mapping meta key to windows key
        keymapAndroid[KeyEvent.KEYCODE_META_LEFT] = VK_LWIN | VK_EXT_KEY;
        keymapAndroid[KeyEvent.KEYCODE_META_RIGHT] = VK_RWIN | VK_EXT_KEY;

Best,
Sean

@iiordanov
Copy link
Owner

iiordanov commented Mar 14, 2024 via email

@rstanuwijaya
Copy link
Author

rstanuwijaya commented Mar 14, 2024 via email

@iiordanov
Copy link
Owner

iiordanov commented Mar 14, 2024 via email

@iiordanov
Copy link
Owner

Join the Beta through Google Play and you'll get access to the version with the fix.

@rstanuwijaya
Copy link
Author

rstanuwijaya commented Mar 14, 2024 via email

@iiordanov
Copy link
Owner

iiordanov commented Mar 14, 2024 via email

@lyc8503
Copy link

lyc8503 commented Apr 13, 2024

Hello @iiordanov, I also encountered the issue where the Windows (Meta) key is not working. However, my device is Xiaomi, not Samsung. Xiaomi seems to not have DeX mode. Can aRDP now capture the Windows key on Xiaomi devices?

On a general Android system, we can use the accessibility service to capture the meta key and some other shortcuts. (Although this may not comply with the requirements of Google Play.) Have you considered using this method to capture key inputs on non-Samsung devices?

code example: lyc8503/moonlight-android-no-keyboard-shortcut@619b80c

@iiordanov iiordanov reopened this Apr 13, 2024
@iiordanov
Copy link
Owner

@lyc8503 I'll look into it. Reopened the ticket while I investigate if it'll pass muster with Google.

@lyc8503
Copy link

lyc8503 commented Apr 16, 2024

Hello @iiordanov, I have tried to add the accessibility feature I mentioned to aRDP for capturing complete keyboard input.

https://github.com/lyc8503/remote-desktop-clients

It works perfectly on my phone, I've tested common shortcuts like Ctrl+Shift+Esc, Win, Win+Tab, Alt+Tab, etc., and they all work fine.

My implementation is quite rough and only supports aRDP, so I didn't initiate a PR. But I hope this information can help you, and thank you for creating such a useful software like aRDP!

By the way, as far as I know, Google Play also accepts applications that use accessibility features for other reasonable purposes, such as Bitwarden, which uses accessibility features to fill in passwords. Although this may lead to a more complex review process, I still hope to see future versions of aRDP incorporate this feature, which can greatly enhance the experience of users with external physical keyboards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants