* This file is part of LyX, the document processor.
* Licence details can be found in the file COPYING.
*
* This file is part of LyX, the document processor.
* Licence details can be found in the file COPYING.
*
| cedilla | cedilla |LFUN_ACCENT_CEDILLA | cedilla
| underdot | |LFUN_ACCENT_UNDERDOT | underdot
| underbar | |LFUN_ACCENT_UNDERBAR | underbar
| cedilla | cedilla |LFUN_ACCENT_CEDILLA | cedilla
| underdot | |LFUN_ACCENT_UNDERDOT | underdot
| underbar | |LFUN_ACCENT_UNDERBAR | underbar
| breve | breve |LFUN_ACCENT_BREVE | breve
| tie | |LFUN_ACCENT_TIE | tie
| Hungarian umlaut | doubleacute |LFUN_ACCENT_HUNGARIAN_UMLAUT | hungarian umlaut
| breve | breve |LFUN_ACCENT_BREVE | breve
| tie | |LFUN_ACCENT_TIE | tie
| Hungarian umlaut | doubleacute |LFUN_ACCENT_HUNGARIAN_UMLAUT | hungarian umlaut
{TEX_NOACCENT, 0, "", LFUN_NOACTION},
{TEX_ACUTE, 0x0301, "acute", LFUN_ACCENT_ACUTE},
{TEX_GRAVE, 0x0300, "grave", LFUN_ACCENT_GRAVE},
{TEX_NOACCENT, 0, "", LFUN_NOACTION},
{TEX_ACUTE, 0x0301, "acute", LFUN_ACCENT_ACUTE},
{TEX_GRAVE, 0x0300, "grave", LFUN_ACCENT_GRAVE},
{TEX_TIE, 0x0361, "tie", LFUN_ACCENT_TIE},
{TEX_BREVE, 0x0306, "breve", LFUN_ACCENT_BREVE},
{TEX_CARON, 0x030c, "caron", LFUN_ACCENT_CARON},
{TEX_TIE, 0x0361, "tie", LFUN_ACCENT_TIE},
{TEX_BREVE, 0x0306, "breve", LFUN_ACCENT_BREVE},
{TEX_CARON, 0x030c, "caron", LFUN_ACCENT_CARON},
// Don't fix this typo for compatibility reasons!
{TEX_HUNGUML, 0x030b, "hugarian_umlaut", LFUN_ACCENT_HUNGARIAN_UMLAUT},
{TEX_UMLAUT, 0x0308, "umlaut", LFUN_ACCENT_UMLAUT},
// Don't fix this typo for compatibility reasons!
{TEX_HUNGUML, 0x030b, "hugarian_umlaut", LFUN_ACCENT_HUNGARIAN_UMLAUT},
{TEX_UMLAUT, 0x0308, "umlaut", LFUN_ACCENT_UMLAUT},
- struct tex_accent_struct temp = { static_cast<tex_accent>(0), 0,
- 0, static_cast<kb_action>(0)};
+ struct TeXAccent temp = { static_cast<tex_accent>(0), 0,
+ 0, static_cast<FuncCode>(0)};
// FIXME: This code should be removed...
// But we need to fix up all the kmap files first
// so that this field is not present anymore.
// FIXME: This code should be removed...
// But we need to fix up all the kmap files first
// so that this field is not present anymore.
/* string const allowed = lex.getString(); */
addDeadkey(accent, keys /*, allowed*/);
#else
/* string const allowed = lex.getString(); */
addDeadkey(accent, keys /*, allowed*/);
#else
kmod_list_.find(accent_1);
map<tex_accent, KmodInfo>::iterator it2 =
kmod_list_.find(accent_2);
kmod_list_.find(accent_1);
map<tex_accent, KmodInfo>::iterator it2 =
kmod_list_.find(accent_2);
- if (lex.next(true)) {
- docstring const string_to = lex.getDocString();
- keymap_[key_from] = string_to;
- LYXERR(Debug::KBMAP) << "\t`" << to_utf8(string_to) << '\''
- << endl;
- } else
+ key_from = lex.getString()[0];
+ LYXERR(Debug::KBMAP, "\t`" << lex.getString() << '\'');
+
+ if (!lex.next(true))
- if (lex.next(true)) {
- LYXERR(Debug::KBMAP) << "\t`" << lex.getString() << '\''
- << endl;
- key = lex.getDocString()[0];
- } else
+ LYXERR(Debug::KBMAP, "\t`" << lex.getString() << '\'');
+ accent = getkeymod(lex.getString());
+
+ if (!lex.next(true))
- if (lex.next(true)) {
- LYXERR(Debug::KBMAP) << "\t`" << lex.getString() << '\''
- << endl;
- str = lex.getDocString();
- } else
+ LYXERR(Debug::KBMAP, "\t`" << lex.getString() << '\'');
+ key = lex.getDocString()[0];
+
+ if (!lex.next(true))
bool Trans::isAccentDefined(tex_accent accent, KmodInfo & i) const
{
map<tex_accent, KmodInfo>::const_iterator cit = kmod_list_.find(accent);
bool Trans::isAccentDefined(tex_accent accent, KmodInfo & i) const
{
map<tex_accent, KmodInfo>::const_iterator cit = kmod_list_.find(accent);
- } else if (!t.empty() && t[0] != 0) {
- //return k.normalkey(c);
- return t;
- } else {
- return k.deadkey(c,
- kmod_list_[static_cast<tex_accent>(t[1])]);
- }
+
+ if (!t.empty() && t[0] != 0)
+ return t; //return k.normalkey(c);
+
+ return k.deadkey(c, kmod_list_[static_cast<tex_accent>(t[1])]);
- support::FileName const filename = libFileSearch("kbd", language, "kmap");
+ LexerKeyword kmapTags[] = {
+ {"\\kcomb", KCOMB },
+ { "\\kmap", KMAP },
+ { "\\kmod", KMOD },
+ { "\\kxmod", KXMOD }
+ };
+
+ FileName const filename = libFileSearch("kbd", language, "kmap");
if (lyx_accent_table[i].name
&& contains(p, lyx_accent_table[i].name)) {
if (lyx_accent_table[i].name
&& contains(p, lyx_accent_table[i].name)) {