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

Add org.freedesktop.portal.RemoteDesktop support #263

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

andreafeletto
Copy link

@andreafeletto andreafeletto commented Mar 9, 2023

Implements #2

ToDo:

  • devices selection
  • pointer support
    • relative motion
    • absolute motion
    • buttons
    • scroll
  • keyboard support
  • touch support

@David96
Copy link
Contributor

David96 commented Mar 12, 2023

Thanks a lot for implementing this! I just added button events: https://github.com/David96/xdg-desktop-portal-wlr/tree/remotedesktop
Feel free to use however you want, I basically just copied your code, so I don't care about authorship or anything here.

@andreafeletto
Copy link
Author

Thanks a lot for implementing this! I just added button events: https://github.com/David96/xdg-desktop-portal-wlr/tree/remotedesktop Feel free to use however you want, I basically just copied your code, so I don't care about authorship or anything here.

Thanks. Give me another 4/5 days and I'll get back to this.

@DefaultUser
Copy link

DefaultUser commented Oct 21, 2023

I've successfully tested pointer movement and buttons with kdeconnect (23.04) and wayfire (on Raspberry Pi OS v5). Scrolling does seem to have some code already, but it wasn't working here. I could see dbus messages in dbus-monitor, but no scrolling happened.

I started working on keyboard support, but I'm not sure if my approach is suitable as I have no experience with xkbcommon, evdev or wayland. You can find my implementation in DefaultUser@b092b2a

(Edit: fixed the link to the commit)

@DefaultUser
Copy link

I've fixed the scrolling issues I mentioned in my previous comment. This also fixed some smaller issues I was experiencing (see commit message for details).
I am not sure if my approach is the best, but KDEConnect's remote input feature now works fine with wayfire.
The fix is here: DefaultUser@b2cacc9

@PedroHLC
Copy link

PedroHLC commented Nov 5, 2023

but KDEConnect's remote input feature now works fine with wayfire.

Worked fine with my sway too (sway master/020a572, wlroots master/26eac25, portal-wlr remotedesktop/b2cacc9 but rebased over master/84a9cf4). Tested mouse movement, mouse buttons, scrolling, dragging (cursed over WAN latency), and keyboard (on multiple apps).

@tralph3
Copy link

tralph3 commented Apr 23, 2024

I have been using @DefaultUser's fork for the past few weeks and works almost perfectly. Mouse input is perfect, but there's some keyboard functions that are wonky. The X key seems to send a Mute volume command instead of the actual letter.

It is nearly there tho. I don't expect there to be much more work required.

@DefaultUser
Copy link

@tralph3 : I assume that you're using Wayfire. Wayfire uses the underlying keycodes instead of the key symbols for binds and ignores the keymap this. I think that is was planned to add an option to change this in Wayfire, but I don't know if it is already implemented.
I have to admit that my branch only covers exactly what I need from it (ASCII input), but it offers a starting point for someone with more time to fix this.
I currently use a build where I simply remap the buttons in the keymap that have binds in Wayfire's default config and add some special cases for them in code. This is quite an ugly workaround.
The proper way to handle this is by adding more keymap definitions and switching between them dynamically. That way, non-ASCII characters could be handled.

@tralph3
Copy link

tralph3 commented Apr 24, 2024

I use Hyprland, actually.

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

Successfully merging this pull request may close these issues.

None yet

5 participants