Re: Determining XKeysyms



On Mon, Mar 24, 2003 at 01:26:48PM +0000, Bill Haneman wrote:

> 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.

Yes, this is where I cribbed the code from :)

> 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 :-)

As far as I can tell, though, it only works for letters because the
keysym for A happens to be XK_a. XStringToKeysym(" ") doesn't return the
keysym for space, and XStringToKeysym(",") doesn't return the keysym for
a comma - I assume that it actually wants to be XStringToKeysym("comma")
or XStringToKeysym("space"), which just brings me back to requiring a 
hardcoded table. 

> Let me know where you put this, I'd be happy to take a quick look.

I've a meeting tomorrow and have to try to add this functionality to the 
Windows interface - I'll try to put up the code either this evening or 
Wednesday.

Thanks,
-- 
Matthew Garrett | mjg59 srcf ucam org



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