GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Mon Nov 24, 2014 9:41 pm

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: how to programmatically inject (keyboard) events
PostPosted: Mon Sep 16, 2013 8:46 pm 
Offline

Joined: Tue Aug 27, 2013 11:01 pm
Posts: 2
I've failed to find, here or in docs, how to inject (synthetic) keyboard events into the queue, via my code.

I want my code to create keydown and keyup events that will subsequently be handled exactly the way actual keypresses from the user via the keyboard are handled. The code would create these events on the basis of other occurrences in the course of execution of the application.

If this is already documented somewhere, a reference to that would be welcome. Otherwise any other thoughts would be helpful. I'm not sure I'm up to researching this in finite time, just reading the source directly.

TIA


Top
 Profile  
 
 Post subject: Re: how to programmatically inject (keyboard) events
PostPosted: Thu Sep 19, 2013 6:44 pm 
Offline
Never Seen the Sunlight

Joined: Mon Apr 28, 2008 5:52 am
Posts: 778
Location: UK
Hello,

Yes it is possible to add keyboard event to the event queue. You will need to look at the GDK documentation as this is one level lower than the GTK API calls.

The question to ask yourself is do you really need to add artificial keyboard events. It may be better to process the events directly.

_________________
E.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group