---
name: "XkbUpdateMapFromCore"
section: "3"
platform: "linux"
package: "libx11"
version: "1.8.14-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/XkbUpdateMapFromCore"
---

# XkbUpdateMapFromCore(3)

Update a local Xkb keyboard map to reflect the mapping expressed by a core format mapping

## NAME

XkbUpdateMapFromCore -  Update a local Xkb keyboard map to reflect the mapping expressed by a core format mapping

## SYNOPSIS

**Bool XkbUpdateMapFromCore** **(XkbDescPtr** *xkb***,** **KeyCode** *first\_key***,** **int** *num\_keys***,** **int** *map\_width***,** **KeySym \****core\_keysyms***,** **XkbChangesPtr** *changes***);**

## ARGUMENTS

- *xkb*

  keyboard description to update

- *first\_key*

  keycode of first key description to update

- *num\_keys*

  number of key descriptions to update

- *map\_width*

  width of core protocol keymap

- *core\_keysyms*

  symbols in core protocol keymap

- *changes*

  backfilled with changes made to Xkb

## DESCRIPTION

Xkb provides several functions that make it easier to apply the compatibility map to configure a client-side Xkb keyboard mapping, given a core protocol representation of part or all of a keyboard mapping. Obtain a core protocol representation of a keyboard mapping from an actual server (by using *XGetKeyboardMapping,* for example), a data file, or some other source.

*XkbUpdateMapFromCore* interprets input argument information representing a keyboard map in core format to update the Xkb keyboard description passed in *xkb.* Only a portion of the Xkb map is updated - the portion corresponding to keys with keycodes in the range *first\_key* through *first\_key + num\_keys - 1.* If *XkbUpdateMapFromCore* is being called in response to a MappingNotify event, *first\_key* and *num\_keys* are reported in the MappingNotify event. *core\_keysyms* contains the keysyms corresponding to the keycode range being updated, in core keyboard description order. *map\_width* is the number of keysyms per key in *core\_keysyms.* Thus, the first *map\_width* entries in *core\_keysyms* are for the key with keycode *first\_key,* the next *map\_width* entries are for key *first\_key + 1,* and so on.

In addition to modifying the Xkb keyboard mapping in *xkb, XkbUpdateMapFromCore* backfills the changes structure whose address is passed in *changes* to indicate the modifications that were made. You may then use *changes* in subsequent calls such as *XkbSetMap,* to propagate the local modifications to a server.

## SEE ALSO

[**XkbSetMap**(3)](/XkbSetMap/3.md)
