Re: [Xpert]faking keyboard input

2002-09-11 Thread Viveka Nathan K


you can use XTestFakeKeyEvent() function as
  XTestFakeKeyEvent(dpy,x,y,z);
where dpy for display, x is Keycode, y is keyPress or release and 
z is timeduration, after which this event generated.

On Today [EMAIL PROTECTED] wrote to Vivek :

MC:}Hello.
MC:}
MC:}I'd like to write a program which sends fake keyboard
MC:}events to application windows. Not only to the
MC:}currently focused window, but to any window.
MC:}Preferably the window would be identified by its title
MC:}(on the title bar).
MC:}
MC:}Is this possible? Could anyone point me in the right
MC:}direction? I don't mind reading man pages or whatever,
MC:}but I need to know which ones to read. :-) Any help
MC:}would be much appreciated.
MC:}
MC:}Thank you
MC:}
MC:}/M
MC:}
MC:}
MC:}__
MC:}Yahoo! - We Remember
MC:}9-11: A tribute to the more than 3,000 lives lost
MC:}http://dir.remember.yahoo.com/tribute
MC:}___
MC:}Xpert mailing list
MC:}[EMAIL PROTECTED]
MC:}http://XFree86.Org/mailman/listinfo/xpert
MC:}

-- 

 Vivek
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 
 DON Lab, IITM, Chennai-36, India. Ph:044-2578904, 044-2578353
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Only weapon we are having from the beginning is BRAIN

___
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert



[Xpert]Event generations..

2002-06-07 Thread Viveka Nathan K


Hi,,

I have a doubt..

As per the Indian languages,
There are some consonants and vowels.
On combination of Consonant and Vowel, the glyph to be display is different.
It is not similar either to Consonant or Vowel, Its completely different.

Normally , in English, if the consonant 't' is followed by vowel 'a', we will
write it as 'ta', but in Indian languages, these two chars 'ta' will be written
in some different way.

For Indian language, I mapped (for eg.) 'D' to a vowel and 'K' to  a
consonant. If I type 'K' the corresponding consonant to that 'K' would be
displayed. If I type the consonant again, it just display the corresponding
consonants and going on and on.

but, If I type the vowel character 'D' next to the consonant 'K', the already
printed consonant, should be removed and the character corresponding to the
combination of the Consonant+Vowel should be displayed.

This is the thing needed for all the Koffice application( of course, KDE).  so,
I am modifying the Xlibrary.

Do you have any Idea? How to do that?

Things I have tried are :

  To delete the already displayed consonant, we have to generate backspace
event, so, in the XTranslateKeySym(), while the match for Consonant and vowel
comes, 
I just assign *sym_rtrn = 65288;  (for backspace) 
and assigned the resulting glyph in buffer such as
   buffer = resultingValue;

but it sends only backspace, not printing the content of the buffer..

If I assigned the values in buffer as
  buffer[0]='\b';
  strcat(buffer,resultingValue);

It displays a box for '\b' (in KDE Applns) and appended the resultingValue with
that. 

Now, I think, what happen If I generate a seperate event for backspace ?
for that, I have to give a KeyPress and KeyRelease Events, 

By using, XPeekEvent, I can get the KeyRelease event, but I couldnt get the
Keypress event.

I dont know, whether I am moving in a correct way... !!  
Give me your comments and Solutions..



  with Regards, Vivek
 
(o---)
 \ Distributed Systems and Optical Networks Lab, \
  \  IITM, Chennai-36, India  (__)\
   \   Ph:044-2578904 oo ) \
\ 044-2578353-=G=N=U=-|_/\  \
o)___)

Expressions other than SMILES are Dangerous


___
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert



[Xpert]KeyPress event

2002-06-06 Thread Viveka Nathan K


How can I get a KeyPress event through, the 
XPeekEvent?

By using this, XPeekEvent, I can get the KeyRelease event, but I couldnt get the
keypress event.  I just want to send one KeyPress and KeyRelease event to the 
Event queue.


 
   With Regards, Vivek
 
(o---)
 \ Distributed Systems and Optical Networks Lab, \
  \  IITM, Chennai-36, India  (__)\
   \   Ph:044-2578904 oo ) \
\ 044-2578353-=G=N=U=-|_/\  \
o)___)

Expressions other than SMILES are Dangerous


___
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert



Re: [Xpert]KeyPress event

2002-06-06 Thread Viveka Nathan K


Hi Mark,

   Thanks for  your response...
   While I peek the event using XPeekEvent, the only event available is 
KeyRelease, because, we can enter into the Xlookupstring function, only after
the KeyPress happens, so in the queue, the available event is KeyRelease only.

I want a KeyPress event to add in the EventQueue, So, I asked, how to generate
the KeyPress event, (through anyother way, like XSendEvent etc..  I dont know
how to generate that KeyPress event).

  

On Yesterday [EMAIL PROTECTED] wrote to Vivek :

MV:}On Thu, 6 Jun 2002, Viveka Nathan K wrote:
MV:}
MV:} 
MV:} How can I get a KeyPress event through, the 
MV:} XPeekEvent?
MV:} 
MV:} By using this, XPeekEvent, I can get the KeyRelease event, but I couldnt get the
MV:} keypress event.  I just want to send one KeyPress and KeyRelease event to the 
MV:} Event queue.
MV:} 
MV:}
MV:}   There's nothing different about presses.  If you're not getting
MV:}KeyPress events it's likely that you haven't asked for them.
MV:}
MV:}
MV:}Mark.
MV:}
MV:}___
MV:}Xpert mailing list
MV:}[EMAIL PROTECTED]
MV:}http://XFree86.Org/mailman/listinfo/xpert
MV:}

-- 
  Priyamudan, Vivek
 
(o---)
 \ Distributed Systems and Optical Networks Lab, \
  \  IITM, Chennai-36, India  (__)\
   \   Ph:044-2578904 oo ) \
\ 044-2578353-=G=N=U=-|_/\  \
o)___)

Expressions other than SMILES are Dangerous


___
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert



[Xpert]doubt in Sending Events

2002-05-31 Thread Viveka Nathan K


Hi

I have already sent this message, I am sending it again..
I am doing a localization in X.  Here, I need to send 
the backspace event and also some display item to the display.
That is,  
  If We press a key, the previously displayed character should be deleted and 
some glyph(character) should be displayed in that location.  What can I do?

Already, I doing modifications in XKBBind.c - XTranslateKeySym()
for backspace, I am sending 

sym_rtrn[0]=65288;
and assign the character, which is to be displayed, is in buffer
as strcpy(buffer,tmpchar);

but it only deletes, the previous character and not displaying the content of
the buffer...

what can I do?

   

 
  withRegards, Vivek
 
(o---)
 \ Distributed Systems and Optical Networks Lab, \
  \  IITM, Chennai-36, India  (__)\
   \   Ph:044-2578904 oo ) \
\ 044-2578353-=G=N=U=-|_/\  \
o)___)

Expressions other than SMILES are Dangerous



___
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert



[Xpert]doubt in Sending Events

2002-05-30 Thread Viveka Nathan K

Hi
I am a newbie.. to this group.
I am doing a localization in X.  Here, I need to send 
the backspace event and also some display item to the display.
That is,  
  If We press a key, the previously displayed character should be deleted and 
some glyph(character) should be displayed in that location.  What can I do?

Already, I doing modifications in XKBBind.c - XTranslateKeySym()
for backspace, I am sending 

sym_rtrn[0]=65288;
and assign the character, which is to be displayed, is in buffer
as strcpy(buffer,tmpchar);

but it only deletes, the previous character and not displaying the content of
the buffer...

what can I do?

   

 
  withRegards, Vivek
 
(o---)
 \ Distributed Systems and Optical Networks Lab, \
  \  IITM, Chennai-36, India  (__)\
   \   Ph:044-2578904 oo ) \
\ 044-2578353-=G=N=U=-|_/\  \
o)___)

Expressions other than SMILES are Dangerous


___
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert