Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • xserver xserver
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 887
    • Issues 887
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 105
    • Merge requests 105
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • xorg
  • xserverxserver
  • Issues
  • #191
Closed
Open
Created Oct 13, 2005 by Bugzilla Migration User@bugzilla-migration

XTestFakeKeyEvent broken in Xvfb

Submitted by Clemens Eisserer

Assigned to Xorg Project Team

Link to original bug (#4761)

Description

It is not possible to reliable simulate key-events when running in Xvfb, whereas a "native" X-Server does not cause any problems. Some key-events are received by the client-application twice, others get completly lost.

I first thought this is a specific problem of the library I used for this task (java.awt.Robot class in java) and wrote my own library in plain C using XTest which is heavily based on the code of Xvkbd-2.7 and it shows exactly the same sympthoms. If I insert a wait of 200ms after each key everything works like expected with both libraries (100ms do not work).

For my testing I used Xvfb delivered with Xorg-6.8.2, running with the following flags: Xvfb :1 -screen :1 500x1000x24 -fbdir /tmp/

I attached a a test-case which is derivated from xkdbd-2.7 which shows the problem (have a look at main() of CRobot.c) and a simple bash-script to compile the test-case. Note: Although the Xtest-code is really ugly hacked withought any deep knowledge whats going on behind the scenes (thats why I unmap Xkdbd's main-window immediatly after creating it instead of not mapping it at all) I think its a bug in Xvfb since I had absolutly the same problems when using java.awt.Robot from Java which does only provide low-level keyPressed/keyReleased methods. Note that this problem sometimes shows up and sometimes not.

I already tried to find it myself, however I think I lack too much x knowledge :-(

Good luck with fixing it, lg Clemens

Version: 6.8.2

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking