For Programmers: Free Programming Magazines  


Home > Archive > Tcl > May 2006 > Re: uh-oh: anyway to get keysyms from C event handler?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: uh-oh: anyway to get keysyms from C event handler?
Gerald W. Lester

2006-05-31, 4:13 am

Ken Tilton wrote:
> I was getting ready to do all application event handling from aproc
> declared to Tk_CreateEventhandler, but now that I am actually trying to
> implement things in detail I see that XKeyEevent records do not expose a
> portable indication of the key involved. Nor is the keycode-to-keysym
> function exported.
>
> Well, at least that is what I think I see. Is this about right?
>
> If so, I guess I can do a Tcl binding to a Tcl proc that will stuff key
> event keysym data into a custom virtual event. Good plan?


Why don't you do a Tcl binding to a C procedure that implements a Tcl
command passing in the keysym and anything else you need as its arguments.

Although in general I'd advise you to avoid C and just code it in Tcl.

--
+--------------------------------+---------------------------------------+
| Gerald W. Lester |
|"The man who fights for his ideals is the man who is alive." - Cervantes|
+------------------------------------------------------------------------+
Ken Tilton

2006-05-31, 8:13 am



Gerald W. Lester wrote:
> Ken Tilton wrote:
>
>
>
> Why don't you do a Tcl binding to a C procedure that implements a Tcl
> command passing in the keysym and anything else you need as its arguments.


Aw, jeez, and I already did that once (handling widget commands)! <sigh>
Thx.

>
> Although in general I'd advise you to avoid C and just code it in Tcl.
>


Well, actually I am programming in Lisp using its C foreign function
interface.

thx, again.

kt

--
Cells: http://common-lisp.net/project/cells/

"Have you ever been in a relationship?"
Attorney for Mary Winkler, confessed killer of her
minister husband, when asked if the couple had
marital problems.
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com