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.
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.)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
... 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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.)
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.
> 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
... 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