Cannot inject Ginn's gestures in a SDL window

Asked by Bernard Victor Delvaux

Hello

Although I'm able to configure a basic 'wishes.xml' file and have it working on other applications, I still cannot inject gestures through Ginn in a SDL window of a program I've made. My SDL window can receive some keyboard events, and I get them in the SDL window with either " SDL_GetKeyState(NULL)" or
  SDL_PollEvent(&event);
  switch (event.type)
   {
       switch(event.key.keysym.sym) {
    case SDLK_ESCAPE:
     SDL_QUIT()
     break;
                                case ........
    }
   }

I don't know if this has to presented here. I suppose it is related to the way keyboard events are detected in SDL. However would you know if I can do something to have it working?

Thank you

Victor

Question information

Language:
English Edit question
Status:
Solved
For:
ginn Edit question
Assignee:
No assignee Edit question
Solved by:
Mohamed IKBEL Boulabiar
Solved:
Last query:
Last reply:
Revision history for this message
Mohamed IKBEL Boulabiar (boulabiar) said :
#1

Ginn uses XTest extension to inject events,
But I think SDL take the input from a lower layer -> evdev directly.

Ginn can be extended to do low level injection using uinput kernel module, but then it needs to be run as root.

Revision history for this message
Mohamed IKBEL Boulabiar (boulabiar) said :
#2

Victor,

you can add this as a bug to Ginn.
(wishlist)

Revision history for this message
Duncan McGreggor (oubiwann) said :
#3

In fact, we should just convert this question to a bug...

Revision history for this message
Bernard Victor Delvaux (nadaeck) said :
#4

Thank you for the answer.

I just tried running ginn as root but it doesn't change anything.

I have double checked that the name of the application in my wishes.xml matches the name of the app at the "ActiveApp" line in the terminal...

Is the solution you propose already applicable? Or is it a project for later?

Practical question: should I answer here or at the bug page?

Victor

Revision history for this message
Best Mohamed IKBEL Boulabiar (boulabiar) said :
#5

Sorry as it seems I haven't explained quite good:

I should add and use the uinput module to ginn,
(speaking about running it as root is like thinking out loud as uinput needs
that)

So it's a project for later :)
But I'll do my best to make it in time.

Revision history for this message
Bernard Victor Delvaux (nadaeck) said :
#6

Understood...

Thanks !!

Revision history for this message
Bernard Victor Delvaux (nadaeck) said :
#7

Thanks Mohamed IKBEL Boulabiar, that solved my question.