The keyboard interfaces and protocols in X

2022-02-13 Thread John Found
Hi. I am trying to create a X client that to communicate to X server by the raw protocol, not using any libraries, such as XLib or XCB. While with the graphics part it was simple and straightforward task, solved by simply following the protocol (The documentation on X11 is pretty complete and we

Re: The keyboard interfaces and protocols in X

2022-02-14 Thread Andrew Bainbridge
I tried to do something similar and had the same experience. I still don't know how to convert keyboard events to something useful like UTF-8. (I was actually aiming for Latin-1 to start with). My terrible code is here: https://github.com/abainbridge/deadfrog-lib/blob/master/src/df_window_x11.cp

Re: The keyboard interfaces and protocols in X

2022-02-14 Thread Sam Varshavchik
I should preface by saying that I reverse-engineered this, based on time-consuming searches, and by picking up some clues in xorg's source. This was a long time ago, I don't remember where I found everything, I forgot, and only have the end results. This is what I have: https://github.com/svarshav

Re: The keyboard interfaces and protocols in X

2022-02-14 Thread Peter Hutterer
On Sun, Feb 13, 2022 at 07:01:04PM +0200, John Found wrote: > Hi. > > I am trying to create a X client that to communicate to X server by the > raw protocol, not using any libraries, such as XLib or XCB. > > While with the graphics part it was simple and straightforward task, > solved by simply

Re: The keyboard interfaces and protocols in X

2022-02-15 Thread John Found
> If you want to avoid libx11/xcb, you should use libxkbcommon. Well, what is the difference? I want to avoid as many external libraries as possible. And (what is maybe more important) to understand how the whole system works under the library cover. OK, let try asking specific questions: 1. Th

Re: The keyboard interfaces and protocols in X

2022-02-15 Thread Dave Howorth
On Tue, 15 Feb 2022 15:21:07 +0200 John Found wrote: > It is not explained in the documentation. Well, or I missed to find > it. You don't say where you found the things that you want explained, and I'm no expert so I have no idea what documentation you looked at. As is often the case arch has

Re: The keyboard interfaces and protocols in X

2022-02-15 Thread Dave Howorth
On Tue, 15 Feb 2022 15:21:07 +0200 John Found wrote: > What is the meaning of the fields in the following structure, in the > XkbGetMap reply: > > KB_KEYSYMMAP 8+4n > 4 LISTofCARD8ktIndex ; What is this? > 1 CARD8 groupInfo; What is this? > 1 CARD8

Re: The keyboard interfaces and protocols in X

2022-02-15 Thread John Found
On Tue, 15 Feb 2022 14:29:05 + Dave Howorth wrote: > On Tue, 15 Feb 2022 15:21:07 +0200 > John Found wrote: > > > What is the meaning of the fields in the following structure, in the > > XkbGetMap reply: > > > > KB_KEYSYMMAP 8+4n > > 4 LISTofCARD8ktIndex ; What is this? >

Re: The keyboard interfaces and protocols in X

2022-02-15 Thread Peter Hutterer
On Tue, Feb 15, 2022 at 05:42:39PM +0200, John Found wrote: > On Tue, 15 Feb 2022 14:29:05 + > Dave Howorth wrote: > > > On Tue, 15 Feb 2022 15:21:07 +0200 > > John Found wrote: > > > > > What is the meaning of the fields in the following structure, in the > > > XkbGetMap reply: > > > > >

Re: The keyboard interfaces and protocols in X

2022-02-16 Thread John Found
> And XKB is probably one of the most extensively documented protocols, I don't know what "extensively" means in your understanding, but the documentation of XKB is sloppily written. They even didn't labeled the items in "Appendix D: Protocol encoding". Which is the main document if one have to i