XmbLookupString, XwcLookupString, Xutf8LookupString − obtain composed input from an input method


int XmbLookupString(XIC ic, XKeyPressedEvent *event, char *buffer_return, int bytes_buffer, KeySym *keysym_return, Status *status_return);

int XwcLookupString(XIC ic, XKeyPressedEvent *event, wchar_t *buffer_return, int wchars_buffer, KeySym *keysym_return, Status *status_return);

int Xutf8LookupString(XIC ic, XKeyPressedEvent *event, char *buffer_return, int bytes_buffer, KeySym *keysym_return, Status *status_return);



Returns a multibyte string or wide character string (if any) from the input method.


Specifies space available in the return buffer.


Specifies the key event to be used.


Specifies the input context.


Returns the KeySym computed from the event if this argument is not NULL.


Returns a value indicating what kind of data is returned.


The XmbLookupString, XwcLookupString and Xutf8LookupString functions return the string from the input method specified in the buffer_return argument. If no string is returned, the buffer_return argument is unchanged.

The KeySym into which the KeyCode from the event was mapped is returned in the keysym_return argument if it is non-NULL and the status_return argument indicates that a KeySym was returned. If both a string and a KeySym are returned, the KeySym value does not necessarily correspond to the string returned.

XmbLookupString and Xutf8LookupString return the length of the string in bytes, and XwcLookupString returns the length of the string in characters. Both XmbLookupString and XwcLookupString return text in the encoding of the locale bound to the input method of the specified input context, and Xutf8LookupString returns text in UTF-8 encoding.

Each string returned by XmbLookupString and XwcLookupString begins in the initial state of the encoding of the locale (if the encoding of the locale is state-dependent).


®To ensure proper input processing, it is essential that the client pass only KeyPress events to XmbLookupString, XwcLookupString and Xutf8LookupString. Their behavior when a client passes a KeyRelease event is undefined.

Clients should check the status_return argument before using the other returned values. These three functions each return a value to status_return that indicates what has been returned in the other arguments. The possible values returned are:

It does not make any difference if the input context passed as an argument to XmbLookupString, XwcLookupString and Xutf8LookupString is the one currently in possession of the focus or not. Input may have been composed within an input context before it lost the focus, and that input may be returned on subsequent calls to XmbLookupString, XwcLookupString or Xutf8LookupString even though it does not have any more keyboard focus.

The function Xutf8LookupString is an extension introduced by The XFree86 Project, Inc. in their 4.0.2 release. Its presence is indicated by the macro X_HAVE_UTF8_STRING.


XLookupKeysym(3), Compose(5)
Xlib − C Language X Interface

More Linux Commands

getrpcbynumber(3) - get RPC entry - Linux manual page.......
The getrpcent(), getrpcbyname(), and getrpcbynumber() functions each return a pointer to an object with the following structure containing the broken-out fields

find-jar(1) - Small helper script to find a jar or a directo
The find-jar command tests the resolution of a given element. If successful it will return a JAR file or a directory. This command is solely intended for testin

idcok(3ncurses) - curses output options - Linux manual page
These routines set options that change the style of output within curses. All options are initially FALSE, unless otherwise stated. It is not necessary to turn

hciattach(1) attach serial devices via UART HCI to BlueZ sta
hciattach.1 - Hciattach is used to attach a serial UART to the Bluetooth stack as HCI transport interface. OPTIONS -b Send break. -n Dont detach from controllin

XChangeDeviceDontPropagateList(3) - query or change the dont
The XChangeDeviceDontPropagateList request modifies the list of events that should not be propagated to ancestors of the event window. This request allows exten

ggzmod_h(3) - Common functions for interfacing a game server
Common functions for interfacing a game server and GGZ. This file contains all libggzmod functions used by game servers to interface with GGZ (and vice versa).

Tk_FreeTextLayout(3) - routines to measure and display singl
These routines are for measuring and displaying single-font, multi-line, justified text. To measure and display simple single-font, single-line strings, refer t

form_field_info(3form) - retrieve field characteristics.....
The function field_info returns the sizes and other attributes passed in to the field at its creation time. The attributes are: height, width, row of upper-left

jpegicc(1) - little cms ICC profile applier for JPEG........
jpegicc.1 - lcms is a standalone CMM engine, which deals with the color management. It implements a fast transformation between ICC profiles. jpegicc is little

attr_removef(3) - remove a user attribute of a filesystem ob
The attr_remove and attr_removef functions provide a way to remove previously created attributes from filesystem objects. Path points to a path name for a files

fread_unlocked(3) - nonlocking stdio functions (Man Page)...
Each of these functions has the same behavior as its counterpart without the _unlocked suffix, except that they do not use locking (they do not set locks themse

ldap_error(3) - LDAP protocol error handling routines.......
The ldap_err2string() routine provides short description of the various codes returned by routines in this library. The returned string is a pointer to a static

We can't live, work or learn in freedom unless the software we use is free.