RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    Virtual Keyboard is working in commandline but not in emulationstation

    Scheduled Pinned Locked Moved Help and Support
    keyboardvirtual gamepadhelp help
    1 Posts 1 Posters 271 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R
      rtzttt
      last edited by

      Hey I tried to get virtual inputs working. It is writing the virtual inputs in command line but while emulationstation is started it stop working.

      Reciver.py

      UDP_IP = "0.0.0.0"
      UDP_PORT = 25570
      import os
      import socket
      import uinput
      import sys, inspect
      from evdev import UInput, InputDevice, ecodes as e
      
      sock = socket.socket(socket.AF_INET,socket.SOCK_DGRAM) # UDP
      sock.bind((UDP_IP, UDP_PORT))
      while True:
          data, addr = sock.recvfrom(1024) # buffer size is 1024 bytes
          print("received message: %s" % data)
          from evdev import uinput, ecodes as e
      
          with uinput.UInput() as ui:
              ui.write(e.EV_KEY, e.KEY_ENTER, 1)
              ui.syn()
      
      

      Sender.py

      import socket 
      UDP_IP = "192.168.178.90"
      UDP_PORT = 25570
      MESSAGE = b"Hello, World!"
      sock = socket.socket(socket.AF_INET,socket.SOCK_DGRAM) # UDP
      sock.sendto(MESSAGE, (UDP_IP, UDP_PORT))
      
      

      Any Ideas how to fix that?

      1 Reply Last reply Reply Quote 0
      • First post
        Last post

      Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

      Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.