# The list of input methods that we support. The input methods metadata is
# also defined here. We use this data for the following purposes.
#
# 1. Exclude unnecessary input methods. For example, we don't need
#    "ja:anthy", and "zh:pinyin" engines in ibus-m17n since we have better
#    alternatives outside of ibus-m17n. Excluding these input methods from
#    the IBus engine XML files, such as /usr/share/ibus/component/m17n.xml,
#    makes the startup time of the IBus daemon faster. This filtering is
#    done using a python script at build time of ibus-xkb-layouts and
#    ibus-m17n. See crosbug.com/4161 for details.
#
# 2. Provide the input methods metadata to Chrome at build time. Chrome
#    needs to know about the supported input methods for the input method
#    features, such as the input method switching and the options page,
#    to work. Note that we can retrieve the same metadata from the IBus
#    daemon, but Chrome needs be able to get the metadata without talking
#    to the IBus daemon. This requirement comes from the fact that the
#    IBus daemon should not run if the user is just using a single
#    keyboard layout such as US keyboard. The metadata generation is done
#    using a python script at build time of Chrome. See crosbug.com/16961
#    for details.
#
# The order of the list is important. In Chrome's "Languages and Input" options
# page, we list input methods in this order, when more than one input methods
# are available for a language (ex. French).
#
# Each non-comment line contains the following tab-separated columns.
#
# 1) The input method ID used by IBus. (ex. "xkb:ca::fra")
# 2) The keyboard layout ID used by XKB. (ex. "ca", "handwriting-vk,jp")
# 3) The language code (ex. "fra")
# 4) [optional] The #if condition for the input method.
#    (ex. "defined(A)", "!defined(A)||defined(B)")
#
# Notes:
#   When adding a line to this list, please also add a mapping from the input
#   method ID to the keyboard overlay ID to INPUT_METHOD_ID_TO_OVERLAY_ID in
#
#    * tools/gen_keyboard_overlay_data/gen_keyboard_overlay_data.py
#
#   and update the following files by running this script.
#
#    * chrome/app/generated_resources.grd
#    * chrome/browser/chromeos/input_method/xkeyboard.cc
#    * chrome/browser/resources/keyboard_overlay_data.js
#    * chrome/browser/ui/webui/chromeos/keyboard_overlay_ui.cc

# U.S. English
xkb:us::eng	us	eng
xkb:us:intl:eng	us(intl)	eng
xkb:us:altgr-intl:eng	us(altgr-intl)	eng
xkb:us:dvorak:eng	us(dvorak)	eng
xkb:us:colemak:eng	us(colemak)	eng
# U.S. English entiries have to be above the Dutch entry so that xkb:us:intl:eng
# will be selected as the default keyboard when the UI language is set to Dutch.

# Dutch
xkb:be::nld	be	nld
# We don't support xkb:nl::nld. See b/4430951.

# French
xkb:fr::fra	fr	fra
xkb:be::fra	be	fra
xkb:ca::fra	ca	fra
xkb:ch:fr:fra	ch(fr)	fra

# German
xkb:de::ger	de	ger
xkb:de:neo:ger	de(neo)	ger
xkb:be::ger	be	ger
xkb:ch::ger	ch	ger

# Japanese
mozc	us	ja
mozc-jp	jp	ja
mozc-dv	us(dvorak)	ja
xkb:jp::jpn	jp	jpn
zinnia-japanese	handwriting-vk,jp	ja	defined(TOUCH_UI)

# Russian
xkb:ru::rus	ru	rus
xkb:ru:phonetic:rus	ru(phonetic)	rus

# Thai
m17n:th:kesmanee	us	th
m17n:th:pattachote	us	th
m17n:th:tis820	us	th

# Simplified Chinese
pinyin	us	zh-CN
pinyin-dv	us(dvorak)	zh-CN
# TODO(yusukes): Define zh_CN_dvorak if it's *really* necessary.

# Traditional Chinese
mozc-chewing	us	zh_TW
m17n:zh:cangjie	us	zh
m17n:zh:quick	us	zh
# TODO(suzhe): Add CantonHK and Stroke5 if (it's really) necessary.

# Vietnamese
m17n:vi:tcvn	us	vi
m17n:vi:telex	us	vi
m17n:vi:viqr	us	vi
m17n:vi:vni	us	vi
# Note: Since ibus-m17n does not support "get-surrounding-text" feature yet,
# Vietnames input methods, except 4 input methods above, in m17n-db should
# not work fine. The 4 input methods in m17n-db (>= 1.6.0) don't require the
# feature.

# Other languages
mozc-hangul	kr(kr104)	ko

# ibus-m17n input methods.
m17n:ar:kbd	us	ar
m17n:hi:itrans	us	hi
# Note: the m17n-contrib package has some more Hindi definitions.
m17n:fa:isiri	us	fa
# TODO(yusukes,jshin): Check if we can use ibux-xkb-layouts for these languages.

# ibux-xkb-layouts input methods (keyboard layouts).
xkb:br::por	br	por
xkb:bg::bul	bg	bul
xkb:bg:phonetic:bul	bg(phonetic)	bul
xkb:ca:eng:eng	ca(eng)	eng
xkb:cz::cze	cz	cze
xkb:ee::est	ee	est
xkb:es::spa	es	spa
xkb:es:cat:cat	es(cat)	cat
xkb:dk::dan	dk	dan
xkb:gr::gre	gr	gre
xkb:il::heb	il	heb
xkb:kr:kr104:kor	kr(kr104)	kor
xkb:latam::spa	latam	spa
xkb:lt::lit	lt	lit
xkb:lv:apostrophe:lav	lv(apostrophe)	lav
xkb:hr::scr	hr	scr
xkb:gb:extd:eng	gb(extd)	eng
xkb:gb:dvorak:eng	gb(dvorak)	eng
xkb:fi::fin	fi	fin
xkb:hu::hun	hu	hun
xkb:it::ita	it	ita
xkb:no::nob	no	nob
xkb:pl::pol	pl	pol
xkb:pt::por	pt	por
xkb:ro::rum	ro	rum
xkb:se::swe	se	swe
xkb:sk::slo	sk	slo
xkb:si::slv	si	slv
xkb:rs::srp	rs	srp
xkb:tr::tur	tr	tur
xkb:ua::ukr	ua	ukr

# TODO(yusukes): Support xkb:latam:deadtilde:spa and/or xkb:latam:nodeadkeys:spa
# if necessary.
