XkbGetKeyboardByName - Online Linux Manual PageSection : 3
Updated : libX11 1.8.4
Source : X Version 11
Note : XKB FUNCTIONS

NAMEXkbGetKeyboardByName − Build a new keyboard description from a set of named components, and to optionally have the server use the resulting description to replace an active one

SYNOPSISXkbDescPtr XkbGetKeyboardByName ( Display *dpy , unsigned int device_spec , XkbComponentNamesPtr names , unsigned int want , unsigned int need , Bool load);

ARGUMENTSdpy  connection to X server device_spec  device ID, or XkbUseCoreKbd names  names of components to fetch want  desired structures in returned record need  mandatory structures in returned record load  True => load into device_spec

DESCRIPTIONA client may request that the server fetch one or more components from its database and use those components to build a new server keyboard description. The new keyboard description may be built from scratch, or it may be built starting with the current keyboard description for a particular device. Once the keyboard description is built, all or part of it may be returned to the client. The parts returned to the client need not include all of the parts used to build the description. At the time it requests the server to build a new keyboard description, a client may also request that the server use the new description internally to replace the current keyboard description for a specific device, in which case the behavior of the device changes accordingly. To build a new keyboard description from a set of named components, and to optionally have the server use the resulting description to replace an active one, use XkbGetKeyboardByName. names contains a set of expressions describing the keyboard components the server should use to build the new keyboard description. want and need are bit fields describing the parts of the resulting keyboard description that should be present in the returned XkbDescRec. The individual fields in names are component expressions composed of keyboard component names (no wildcarding as may be used in XkbListComponents), the special component name symbol `%', and the special operator characters `+' and `|'. A component expression is parsed left to right, as follows: • The special component name "computed" may be used in keycodes component expressions and refers to a component consisting of a set of keycodes computed automatically by the server as needed. • The special component name "canonical" may be used in types component expressions and refers to a partial component defining the four standard key types: ALPHABETIC, ONE_LEVEL, TWO_LEVEL, and KEYPAD. • The special component name `%' refers to the keyboard description for the device specified in device_spec or the keymap names component. If a keymap names component is specified that does not begin with `+' or `|' and does not contain `%', then `%' refers to the description generated by the keymap names component. Otherwise, it refers to the keyboard description for device_spec. • The `+' operator specifies that the following component should override the currently assembled description; any definitions that are present in both components are taken from the second. • The `|' operator specifies that the next specified component should augment the currently assembled description; any definitions that are present in both components are taken from the first. • If the component expression begins with an operator, a leading `%' is implied. • If any unknown or illegal characters appear anywhere in the expression, the entire expression is invalid and is ignored. For example, if names->symbols contained the expression "+de", it specifies that the default member of the "de" class of symbols should be applied to the current keyboard mapping, overriding any existing definitions (it could also be written "+de(default)"). Here is a slightly more involved example: the expression "acme(ascii)+de(basic)|iso9995-3" constructs a German (de) mapping for the ASCII keyboard supplied by the "acme" vendor. The new definition begins with the symbols for the ASCII keyboard for Acme (acme(ascii)), overrides them with definitions for the basic German keyboard (de(basic)), and then applies the definitions from the default iso9995-3 keyboard (iso9995-3) to any undefined keys or groups of keys (part three of the iso9995 standard defines a common set of bindings for the secondary group, but allows national layouts to override those definitions where necessary). NOTE The interpretation of the above expression components (acme, ascii, de, basic, iso9995-3) is not defined by Xkb; only the operations and their ordering are. Note that the presence of a keymap names component that does not contain `%' (either explicit or implied by virtue of an expression starting with an operator) indicates a description that is independent of the keyboard description for the device specified in device_spec. The same is true of requests in which the keymap names component is empty and all five other names components contain expressions void of references to `%'. Requests of this form allow you to deal with keyboard definitions independent of any actual device. The server parses all non-NULL fields in names and uses them to build a keyboard description. However, before parsing the expressions in names, the server ORs the bits in want and need together and examines the result in relationship to the expressions in names. Table 1 identifies the components that are required for each of the possible bits in want or need. If a required component has not been specified in the names structure (the corresponding field is NULL), the server substitutes the expression "%", resulting in the component values being taken from device_spec. In addition, if load is True, the server modifies names if necessary (again using a "%" entry) to ensure all of the following fields are non-NULL: types, keycodes, symbols, and compat. .bp Table 1 Want and Need Mask Bits and Required Names Components want or need mask bitRequired names Componentsvalue XkbGBN_TypesMaskTypes(1L<<0) XkbGBN_CompatMapMaskCompat(1L<<1) XkbGBN_ClientSymbolsMaskTypes + Symbols + Keycodes(1L<<2) XkbGBN_ServerSymbolsMaskTypes + Symbols + Keycodes(1L<<3) XkbGBN_SymbolsMaskSymbols(1L<<1) XkbGBN_IndicatorMapMaskCompat(1L<<4) XkbGBN_KeyNamesMaskKeycodes(1L<<5) XkbGBN_GeometryMaskGeometry(1L<<6) XkbGBN_OtherNamesMaskTypes + Symbols + Keycodes + Compat + Geometry(1L<<7) XkbGBN_AllComponentsMask(0xff) need specifies a set of keyboard components that the server must be able to resolve in order for XkbGetKeyboardByName to succeed; if any of the components specified in need cannot be successfully resolved, XkbGetKeyboardByName fails. want specifies a set of keyboard components that the server should attempt to resolve, but that are not mandatory. If the server is unable to resolve any of these components, XkbGetKeyboardByName still succeeds. Bits specified in want that are also specified in need have no effect in the context of want. If load is True, the server updates its keyboard description for device_spec to match the result of the keyboard description just built. If load is False, the server's description for device device_spec is not updated. In all cases, the parts specified by want and need from the just-built keyboard description are returned. The names structure in an XkbDescRec keyboard description record contains one field for each of the five component types used to build a keyboard description. When a keyboard description is built from a set of database components, the corresponding fields in this names structure are set to match the expressions used to build the component. Building a New Keyboard Description from the Server Database The information returned to the client in the XkbDescRec is essentially the result of a series of calls to extract information from a fictitious device whose description matches the one just built. The calls corresponding to each of the mask bits are summarized in Table 2, together with the XkbDescRec components that are filled in. Table 2 XkbDescRec Components Returned for Values of Want & Needs Request (want+need)Fills in Xkb componentsEquivalent Function Call XkbGBN_TypesMaskmap.typesXkbGetUpdatedMap(dpy, XkbTypesMask, Xkb) XkbGBN_ServerSymbolsMaskserverXkbGetUpdatedMap(dpy, XkbAllClientInfoMask, Xkb) XkbGBN_ClientSymbolsMaskmap, including map.types XkbGetUpdatedMap(dpy, XkbAllServerInfoMask, Xkb) XkbGBN_IndicatorMapsindicatorsXkbGetIndicatorMap(dpy, XkbAllIndicators, Xkb) XkbGBN_CompatMapMaskcompatXkbGetCompatMap(dpy, XkbAllCompatMask, Xkb) XkbGBN_GeometryMaskgeomXkbGetGeometry(dpy, Xkb) XkbGBN_KeyNamesMasknames.keysXkbGetNames(dpy, XkbKeyNamesMask | names.key_aliasesXkbKeyAliasesMask, Xkb) XkbGBN_OtherNamesMasknames.keycodesXkbGetNames(dpy, XkbAllNamesMask & names.geometry~(XkbKeyNamesMask | XkbKeyAliasesMask), names.symbolsXkb) names.types map.types[*].lvl_names[*] names.compat names.vmods names.indicators names.groups names.radio_groups names.phys_symbols There is no way to determine which components specified in want (but not in need) were actually fetched, other than breaking the call into successive calls to XkbGetKeyboardByName and specifying individual components. XkbGetKeyboardByName always sets min_key_code and max_key_code in the returned XkbDescRec structure. XkbGetKeyboardByName is synchronous; it sends the request to the server to build a new keyboard description and waits for the reply. If successful, the return value is non-NULL. XkbGetKeyboardByName generates a BadMatch protocol error if errors are encountered when building the keyboard description.

STRUCTURESThe complete description of an Xkb keyboard is given by an XkbDescRec. The component structures in the XkbDescRec represent the major Xkb components outlined in Figure 1.1. typedef struct { struct _XDisplay * display; /​* connection to X server */ unsigned short flags; /​* private to Xkb, do not modify */ unsigned short device_spec; /​* device of interest */ KeyCode min_key_code; /​* minimum keycode for device */ KeyCode max_key_code; /​* maximum keycode for device */ XkbControlsPtr ctrls; /​* controls */ XkbServerMapPtr server; /​* server keymap */ XkbClientMapPtr map; /​* client keymap */ XkbIndicatorPtr indicators; /​* indicator map */ XkbNamesPtr names; /​* names for all components */ XkbCompatMapPtr compat; /​* compatibility map */ XkbGeometryPtr geom; /​* physical geometry of keyboard */ } XkbDescRec, *XkbDescPtr; The display field points to an X display structure. The flags field is private to the library: modifying flags may yield unpredictable results. The device_spec field specifies the device identifier of the keyboard input device, or XkbUseCoreKeyboard, which specifies the core keyboard device. The min_key_code and max_key_code fields specify the least and greatest keycode that can be returned by the keyboard. Each structure component has a corresponding mask bit that is used in function calls to indicate that the structure should be manipulated in some manner, such as allocating it or freeing it. These masks and their relationships to the fields in the XkbDescRec are shown in Table 3. Table 3 Mask Bits for XkbDescRec Mask BitXkbDescRec FieldValue XkbControlsMaskctrls(1L<<0) XkbServerMapMaskserver(1L<<1) XkbIClientMapMaskmap(1L<<2) XkbIndicatorMapMaskindicators(1L<<3) XkbNamesMasknames(1L<<4) XkbCompatMapMaskcompat(1L<<5) XkbGeometryMaskgeom(1L<<6) XkbAllComponentsMaskAll Fields(0x7f)

DIAGNOSTICSBadMatch  A compatible version of Xkb was not available in the server or an argument has correct type and range, but is otherwise invalid

SEE ALSOXkbListComponents(3)
0
Johanes Gumabo
Data Size   :   34,838 byte
man-XkbGetKeyboardByName.3Build   :   2024-12-05, 20:55   :  
Visitor Screen   :   x
Visitor Counter ( page / site )   :   2 / 189,609
Visitor ID   :     :  
Visitor IP   :   3.142.36.215   :  
Visitor Provider   :   AMAZON-02   :  
Provider Position ( lat x lon )   :   39.962500 x -83.006100   :   x
Provider Accuracy Radius ( km )   :   1000   :  
Provider City   :   Columbus   :  
Provider Province   :   Ohio ,   :   ,
Provider Country   :   United States   :  
Provider Continent   :   North America   :  
Visitor Recorder   :   Version   :  
Visitor Recorder   :   Library   :  
Online Linux Manual Page   :   Version   :   Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page   :   Library   :   lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page   :   Library   :   lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base   :   Version   :   Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base   :   Library   :   lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36

Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.

ERROR : Need New Coding :         (parse_manual_page_|249|XkbGetKeyboardByName.3|187|bp|.bp )