man minput_event_to_key () - Convert an event to an input key.

NAME

Inpu - Convert an event to an input key.

SYNOPSIS

MSymbol minput_event_to_key (MFrame * frame, void * event)

DESCRIPTION

The minput_event_to_key() function returns the input key corresponding to event event on frame by a window system dependent manner.

In the m17n-X library, event must be a pointer to the structure XKeyEvent, and it is handled as below.

At first, the keysym name of event is acquired by the function XKeysymToString. Then, the name is modified as below.

If the name is one of 'a' .. 'z' and event has a Shift modifier, the name is converted to 'A' .. 'Z' respectively, and the Shift modifier is cleared.

If the name is one byte length and event has a Control modifier, the byte is bitwise anded by 0x1F and the Control modifier is cleared.

If event still has Shift, Control, Meta, Alt, Super, and/or Hyper modifiers, the name is preceded by 'S-', 'C-', 'M-', 'A-', 's-', and/or 'H-' respectively in this order.

For instance, if the keysym name is 'a' and the event has Shift, Meta, and Hyper modifiers, the resulting name is 'H-M-A'.

At last, a symbol who has the name is returned.