XkbRefreshKeyboardMapping(3)

πŸ’… XkbRefreshKeyboardMapping(3) β€” from the XKB FUNCTIONS manual, bestie

okay so picture this: your keyboard description inside the X library is looking a lil stale, and you need it to refresh, and this function right here is the one that does it. welcome to the glow-up page, let's go ✨


🌸 NAME 🌸

XkbRefreshKeyboardMapping β€” update the keyboard description that is internal to the X library

like literally, it's the internal-to-X-library keyboard desc getting its refresh on 🫢


✨ SYNOPSIS ✨

Status XkbRefreshKeyboardMapping (XkbMapNotifyEvent *event);

πŸŽ€ ARGUMENTS πŸŽ€

  • event β€” the event that's initiating the remapping. it's giving "the thing that started all this" πŸ’…

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so XkbRefreshKeyboardMapping is the Xkb equivalent of the core XRefreshKeyboardMapping function. no cap. it requests that the X server send the current key mapping information to this client. 🫢

a client usually invokes XkbRefreshKeyboardMapping after receiving an XkbMapNotify event. that's the standard move, bestie. πŸ‘‘

XkbRefreshKeyboardMapping returns Success if it succeeds and BadMatch if the event is not an Xkb event. so if you hand it something that isn't an Xkb event? it's gonna hit you with that BadMatch, sorry not sorry 😭

and here's the tea on where that XkbMapNotify event even comes from: it can be generated when some client calls XkbSetMap, XkbChangeMap, XkbGetKeyboardByName, or any of the standard X library functions that change the keyboard mapping or modifier mapping. so basically a whole lil squad of functions can set it off β€” know the whole roster, iykyk πŸ”₯


⭐ RETURN VALUES ⭐

  • Success β€” XkbRefreshKeyboardMapping returns Success when the request that the X server send the current key mapping information to this client is successful. ate, no notes πŸ’–

πŸ’€ DIAGNOSTICS πŸ’€

  • BadMatch β€” a compatible version of Xkb was not available in the server, or an argument has correct type and range but is otherwise invalid. two very different heartbreaks, same error name πŸ™ˆ

🌈 SEE ALSO 🌈


πŸ‘‘ sign-off πŸ‘‘

okay that's the whole page, bestie, go refresh those mappings responsibly 🧚 and just so you have the receipts: this was X Version 11, libX11 1.8.14, and yes β€” XkbRefreshKeyboardMapping(3) β€” periodt πŸ’œπŸŽ€

πŸ“¦ where this page comes from