3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
7 * \author Lars Gullik Bjønnes
8 * \author Angus Leeming
11 * Full author contact details are available in file CREDITS.
19 #include "support/debug.h"
25 : keymap(Intl::PRIMARY), keymapon(lyxrc.use_kbmap),
26 prim_lang(lyxrc.primary_kbmap), sec_lang(lyxrc.secondary_kbmap)
31 void Intl::keyMapOn(bool on)
36 if (keymap == PRIMARY)
41 trans.disableKeymap();
46 void Intl::toggleKeyMap()
48 if (keymapon && (keymap == PRIMARY))
57 void Intl::keyMapPrim()
59 if (!trans.setPrimary(prim_lang))
60 trans.enablePrimary();
67 void Intl::keyMapSec()
69 if (!trans.setSecondary(sec_lang))
70 trans.enableSecondary();
77 void Intl::initKeyMapper(bool on)
79 LYXERR(Debug::INIT, "Initializing key mappings...");
81 if (trans.setPrimary(prim_lang) == -1)
83 if (trans.setSecondary(sec_lang) == -1)
86 if (prim_lang.empty() && sec_lang.empty())