afaict there’s a for loop that iterates over all the layouts, and within that it iterates over all the shift levels, and within that it iterates over all the modifier masks? Is that what’s going on? So basically it’s iterating over them until it finds a match?
In that printf on line 220, would the value of “keycode” at that point be the best approximation of XKeysymToKeycode ()? What’s the difference between shift level and modifier state? They seem to overlap somewhat. Is it that the Shift key can be both a modifier and a shift level, but the Num Lock key is a shift level but not a modifier? Regards adlo > On 5 Dec 2021, at 23:14, adlo <adloco...@gmail.com> wrote: > > >> >> On 5 Dec 2021, at 05:15, Peter Hutterer <peter.hutte...@who-t.net> wrote: >> >> please look at the source, it's not a huge program. > > I have looked at the source, it’s just that I can’t see anything that’s > directly related to what I’m trying to do. It calls > xkb_keymap_key_get_mods_for_level(), which seems to be related to getting the > mods, and it seems to have things that get the name of a key, or get a key > from the name, but I can’t see anything that looks like it’s related to > getting or approximating a keycode from a keysym. >