Menu

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

open
5
2012-07-31
2012-07-30
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

  • Stuart Cassoff

    Stuart Cassoff - 2012-07-30
     
  • Donal K. Fellows

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

     
  • Donal K. Fellows

    • milestone: --> 3071255
    • assigned_to: cc_benny --> dkf
     
  • Donal K. Fellows

    • status: open --> closed-fixed
     
  • Donal K. Fellows

    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

    > but the documentation is *terrible*
    > and the patches to other code out there are no better.
    > (So, situation normal for X11 API functions.)

    This looks fairly comprehensive: http://www.x.org/wiki/XKB
    (first hit when googling "Xkb").

    See in particular:
    http://www.x.org/releases/current/doc/libX11/XKB/xkblib.html

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

     
  • Donal K. Fellows

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

     
  • Donal K. Fellows

    • milestone: 3071255 -->
    • labels: 318705 --> 32. Key Symbols
     
  • Donal K. Fellows

    • 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
     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.