1 /* This file is part of
2 * ======================================================
4 * LyX, The Document Processor
6 * Copyright 1995 Matthias Ettrich
7 * Copyright 1995-2001 The LyX Team.
9 * ====================================================== */
12 * International support for LyX
18 #pragma implementation
25 #include "support/lstrings.h"
32 : keymap(Intl::PRIMARY), keymapon(lyxrc.use_kbmap),
33 prim_lang(lyxrc.primary_kbmap), sec_lang(lyxrc.secondary_kbmap)
38 void Intl::KeyMapOn(bool on)
43 if (keymap == PRIMARY)
48 trans.DisableKeymap();
52 void Intl::ToggleKeyMap()
54 if (keymapon && (keymap == PRIMARY)) {
56 } else if (keymapon) {
63 void Intl::KeyMapPrim()
65 if (!trans.SetPrimary(prim_lang))
66 trans.EnablePrimary();
73 void Intl::KeyMapSec()
75 if (!trans.SetSecondary(sec_lang))
76 trans.EnableSecondary();
83 void Intl::InitKeyMapper(bool on)
85 lyxerr[Debug::INIT] << "Initializing key mappings..." << endl;
87 if (prim_lang.empty() && sec_lang.empty())
97 trans.SetPrimary(prim_lang);
98 trans.SetSecondary(sec_lang);
99 trans.setCharset(lyxrc.font_norm);