Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#244 Use the Xkb API to simply Tk's keyboard event handling

open
Joe English
5
2012-07-31
2012-07-30
Stuart Cassoff
No

Building Tk 8.5.12 results in a handful of compiler warnings stating that XKeycodeToKeysym is deprecated, all in unix/tkUnixKey.c.
Here's a naive patch that passes the tests.
I have no idea what is the correct thing to do here.

Discussion

  • The availability of the API looks good, and the header is the correct one.

    What's not clear is whether setting the group parameter to 0 is always correct; I suspect it isn't, but the documentation is *terrible* and the patches to other code out there are no better. (So, situation normal for X11 API functions.)

     
    • milestone: --> 3071255
    • assigned_to: cc_benny --> dkf
     
    • status: open --> closed-fixed
     
  • Because the Xkb API appears to be implemented in libX11, I've not added any extra ifdeffery. Code might still not be correct, but we've little hope of correcting it.

     
  • Joe English
    Joe English
    2012-07-31

    ... also, from a quick scan of the xkblib manual, if we're going to take a dependency on Xkb (limiting Tk to X11R6.1 and higher, BTW), it looks like a lot of the current adhoccery can be greatly simplified; Xkb has built-in support for much of what Tk does "by hand" now.

     
  • Be my guest, but this probably ought to be tracked as a FRQ. Converting

     
    • milestone: 3071255 -->
    • labels: 318705 --> 32. Key Symbols
     
    • assigned_to: dkf --> jenglish
    • summary: XKeycodeToKeysym is deprecated --> Use the Xkb API to simply Tk's keyboard event handling
    • priority: 3 --> 5
    • status: closed-fixed --> open