Re: Determining XKeysyms
- From: Bill Haneman <Bill Haneman sun com>
- To: bill haneman sun com, mjg59 srcf ucam org
- Cc: gnome-accessibility-list gnome org
- Subject: Re: Determining XKeysyms
- Date: Mon, 24 Mar 2003 13:26:48 +0000 (GMT)
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,
Yes, you have to make sure the app generating the keystrokes rejects
focus. GOK does the same thing by registering for WM_TAKE_FOCUS and
then always discarding the focus event it gets; see main.c I think
(perhaps it's callbacks.c) in gok/gok.
>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.
XStringToKeysym matches letters, yep. That's what it's intended to do,
convert from a "string" format character to an X Keysym. That's what
you originally wanted to do, I think :-)
>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.
I don't understand what you mean by "accented characters" - of course
they are different characters, thus different strings and different
KeySyms.
>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.
Let me know where you put this, I'd be happy to take a quick look.
-Bill
>--
>Matthew Garrett | mjg59 srcf ucam org
------
Bill Haneman x19279
Gnome Accessibility / Batik SVG Toolkit
Sun Microsystems Ireland
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]