GithubHelp home page GithubHelp logo

Comments (11)

ehfd avatar ehfd commented on August 28, 2024 1

This error itself should be fixed in the next release. Using a fork of Python-Xlib which fixes this.

AZERTY Keyboard is handled in #9.

from selkies-gstreamer.

ehfd avatar ehfd commented on August 28, 2024

This is going to take some time. Do restart Selkies to reconnect. In the container, you can terminate selkies-gstreamer using htop and it will automatically reload.

from selkies-gstreamer.

ehfd avatar ehfd commented on August 28, 2024

I believe this is a pynput problem.

from selkies-gstreamer.

ehfd avatar ehfd commented on August 28, 2024

Should be solved with #9.

from selkies-gstreamer.

ehfd avatar ehfd commented on August 28, 2024

Revamping of the Javascript libraries are necessary, especially vuetify and guacamole-keyboard.

from selkies-gstreamer.

ehfd avatar ehfd commented on August 28, 2024

Priority Number 3 IMO (with #9 and #22) @danisla

from selkies-gstreamer.

maxpain avatar maxpain commented on August 28, 2024

Any updates?

from selkies-gstreamer.

ehfd avatar ehfd commented on August 28, 2024

Currently discussed in #85

from selkies-gstreamer.

ehfd avatar ehfd commented on August 28, 2024

In short, need to implement xorg.c into ctypes (courtesy of @cruizba).

I think I found a possible way to fix all inconsistencies and errors related to the keyboard, potentially paving the way for the removal of pyinput and, possibly in the future, python-xlib. You can find my work in this branch of my fork: GitHub - cruizba/selkies-gstreamer.

Let me share the backstory of how I arrived to this.

Upon further investigation, I realized that certain keysyms which reach this section of webrtc_input.py, particularly those representing Spanish characters on my keyboard (like ñ), lacked corresponding keycodes. I've noticed that X server loads some generic keycodes, but it doesn’t cover all of them. This might relate to the default keyboard setting, which is typically a Generic 105-key PC, but I am not sure.

In a remote desktop environment, the server is unaware of the client's keyboard. Therefore, modifying the server's keyboard configuration seemed impractical as a solution to me...

To explore how other projects handle keyboard input remotely, I looked into Neko. Neko, along with Guacamole keyboard lib in the browser, manages keyboard events from the browser. When the keysym reaches the neko server, they process input data through a set of C functions in xorg.c, which they integrate with Go.

The key function of xorg.c is XKey(). It appears that XKey dynamically assigns KeySyms to Keycodes when there is no existing association. If a keysym is sent without a corresponding keycode, it registers this new mapping in the XOrg keyboard configuration (As far as I can understand from the code). This approach is also utilized in TigerVNC's source code for keyboard keys mapping!

Consequently, I've created xorg.py to integrate the build of xorg.c and changed the keyboard part of webrtc_input.py to utilize the new xorg class. This solution works exceptionally well! It detects all keyboard keys correctly without altering any remote keyboard settings and while using my own keyboard configuration.

The challenge was creating a new addon and compiling the xorg.so file to implement this functionality. The project now requires additional headers and libraries. However, the good news is that this addon could potentially replace python-xlib for mouse interactions and other X interactions.

If you're interested in testing it, my branch is fully functional. Simply run vscode with the devcontainer as usual and execute the task [run] re-build, re-install and run selkies-gstreamer. It's configured to compile and install the library.

No, files present at https://github.com/cruizba/selkies-gstreamer/tree/fix-inputs/addons/xorg-iface are just a simple module using x11 libs, it is not part of the X library.

from selkies-gstreamer.

cruizba avatar cruizba commented on August 28, 2024

I am so happy to see this :).

from selkies-gstreamer.

ehfd avatar ehfd commented on August 28, 2024

@cruizba You deserve an acknowledgment. We're also trying to solve the keycode (Spanish) issue with a ctypes version of your .so file.

I hope everything comes together to the next release.

from selkies-gstreamer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.