Re: Determining XKeysyms

On Thu, Mar 20, 2003 at 06:02:49AM +0000, Matthew Garrett wrote:

> XSetInputFocus(XOpenDisplay(NULL),focuswindow,RevertToNone,CurrentTime); 
> XGetInputFocus(XOpenDisplay(NULL),&testwindow,&i);
> SPI_generateKeyboardEvent (XStringToKeysym(label.c_str()),"",SPI_KEY_SYM);

In the end, I've just avoided the issue by making Dasher refuse to take 
focus when in key entering mode, and then grabbing the pointer once the 
user starts Dasher so they can't accidently change to focussing a 
different window. This works fairly nicely. I get a Bonobo complaint 
about an object being NULL, but I'll look into that later on (I assume 
I'm supposed to be initialising something somewhere along the way).

On the other hand, XStringToKeysym seems to work very badly - it only 
matches letters. I assume that the string it wants is actually the name 
of a keysym, rather than an arbitrary string (the man page isn't a lot 
of use here)? I could hardcode punctuation, but then I assume I'd end up 
with having to do the same for accented characters and suchlike. Having 
the functionality to just ask at-spi to deal with this stuff for me 
would make my life far, far easier :)

I'll stick my dev tree up somewhere if people would like to take a look 
at it. I'm working with GTK2 now, and the only extra dependency should 
be the spi stuff.
Matthew Garrett | mjg59 srcf ucam org

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]