# The GUK .gim file format is as follows:

# lines starting with # (or, inofficially, // is allowed, too) are comments

inputmethod "language" "variant"
# the above header is not used by GATE yet

option something...
# not used by GATE either, but preserved while editing in the IM Editor

bind "key" send 0x12340x5678
# when the user presses key, the Unicode characters 0x1234 and 0x5678
# will be sent. Key can contain C- and A- to denote Control and Alt.

bind "key" send ... keycap 0x1234
# as usual, but in addition defines a separate value to be displayed as
# label for the corresponding key on the virtual keyboard, if applicable.

bind "0" digit 0x0030 0x1234
# pressing 0 will either send 0 (Unicode number 0x0030) or 0x1234,
# depending on the "digit toggle hotkey" status. GATE does not use
# this yet, but the IM Editor translates digit lines as follows:
bind "0" digit 0x0030
bind "C-d0" send 0x1234
# so the digit is made toggle-free (on export, it will be written as send,
# not as digit!) and an additional C-d prefixed sequence is created for
# the other digit (C-d is a common value for the toggle hotkey, I think).

bind "\ " resetorsend 0x0020
# the IM Editor treats this as bind "\ " send 0x0020. Actually, the special
# syntax is interpreted as simple send by current GATE IM versions anyway.
# The idea is that pressing space would commit an ongoing composition or
# send a space when no composition is active.
# Note that you escape anything x as \x if it would trouble the parser,
# which on the other hand can trouble other parsers when you write \" ...

