1 /* This file is part of
2 * ======================================================
4 * LyX, The Document Processor
6 * Copyright 1995 Matthias Ettrich
7 * Copyright 1995-1999 The LyX Team.
9 * ====================================================== */
14 #pragma implementation "lyxrc.h"
20 #include "LyXAction.h"
21 #include "lyxserver.h"
24 #include "tex-strings.h"
25 #include "support/path.h"
26 #include "support/filetools.h"
29 // this is crappy... why are those colors command line arguments and
30 // not in lyxrc?? (Matthias)
31 // Because nobody put them there. (Asger)
32 extern int fast_selection;
33 extern string background_color;
34 extern char selection_color[];
35 extern bool cursor_follows_scrollbar;
36 extern kb_keymap *toplevel_keymap;
37 extern LyXAction lyxaction;
46 RC_PRINTPAGERANGEFLAG,
48 RC_PRINTCOLLCOPIESFLAG,
50 RC_PRINTLANDSCAPEFLAG,
54 RC_PRINTFILEEXTENSION,
55 RC_PRINTEXSTRAOPTIONS,
56 RC_PRINTSPOOL_COMMAND,
57 RC_PRINTSPOOL_PRINTERPREFIX,
59 RC_PRINTPAPERDIMENSIONFLAG,
60 RC_CUSTOM_EXPORT_COMMAND,
61 RC_CUSTOM_EXPORT_FORMAT,
64 RC_LITERATE_EXTENSION,
65 RC_LITERATE_ERROR_FILTER,
67 RC_BUILD_ERROR_FILTER,
73 RC_SCREEN_FONT_TYPEWRITER,
76 RC_SCREEN_FONT_ENCODING,
78 RC_SGML_EXTRA_OPTIONS,
87 RC_NOMENUACCELERATORS,
104 RC_DEFAULT_PAPERSIZE,
107 RC_VIEWPSPIC_COMMAND,
114 RC_SCREEN_FONT_SCALABLE,
119 RC_CURSOR_FOLLOWS_SCROLLBAR,
120 RC_EXIT_CONFIRMATION,
121 RC_DISPLAY_SHORTCUTS,
126 static keyword_item lyxrcTags[] = {
127 { "\\accept_compound", RC_ACCEPT_COMPOUND },
128 { "\\alternate_language", RC_ALT_LANG },
129 { "\\ascii_linelen", RC_ASCII_LINELEN },
130 { "\\ascii_roff_command", RC_ASCIIROFF_COMMAND },
131 { "\\auto_region_delete", RC_AUTOREGIONDELETE },
132 { "\\autosave", RC_AUTOSAVE },
133 { "\\background_color", RC_BACKGROUND_COLOR },
134 { "\\begin_toolbar", RC_BEGINTOOLBAR },
135 { "\\bind", RC_BIND },
136 { "\\bind_file", RC_BINDFILE },
137 { "\\build_command", RC_BUILD_COMMAND },
138 { "\\build_error_filter", RC_BUILD_ERROR_FILTER },
139 { "\\check_lastfiles", RC_CHECKLASTFILES },
140 { "\\chktex_command", RC_CHKTEX_COMMAND },
141 { "\\cursor_follows_scrollbar", RC_CURSOR_FOLLOWS_SCROLLBAR },
142 { "\\custom_export_command", RC_CUSTOM_EXPORT_COMMAND },
143 { "\\custom_export_format", RC_CUSTOM_EXPORT_FORMAT },
144 { "\\default_papersize", RC_DEFAULT_PAPERSIZE },
145 { "\\display_shortcuts", RC_DISPLAY_SHORTCUTS },
146 { "\\document_path", RC_DOCUMENTPATH },
147 { "\\escape_chars", RC_ESC_CHARS },
148 { "\\exit_confirmation", RC_EXIT_CONFIRMATION },
149 { "\\fast_selection", RC_FAST_SELECTION },
150 { "\\fax_command", RC_FAX_COMMAND },
151 { "\\fax_program", RC_FAXPROGRAM },
152 { "\\font_encoding", RC_FONT_ENCODING },
153 { "\\input", RC_INPUT },
154 { "\\kbmap", RC_KBMAP },
155 { "\\kbmap_primary", RC_KBMAP_PRIMARY },
156 { "\\kbmap_secondary", RC_KBMAP_SECONDARY },
157 { "\\lastfiles", RC_LASTFILES },
158 { "\\latex_command", RC_LATEX_COMMAND },
159 { "\\literate_command", RC_LITERATE_COMMAND },
160 { "\\literate_error_filter", RC_LITERATE_ERROR_FILTER },
161 { "\\literate_extension", RC_LITERATE_EXTENSION },
162 { "\\num_lastfiles", RC_NUMLASTFILES },
163 { "\\personal_dictionary", RC_PERS_DICT },
164 { "\\phone_book", RC_PHONEBOOK },
165 { "\\print_adapt_output", RC_PRINT_ADAPTOUTPUT },
166 { "\\print_collcopies_flag", RC_PRINTCOLLCOPIESFLAG },
167 { "\\print_command", RC_PRINT_COMMAND },
168 { "\\print_copies_flag", RC_PRINTCOPIESFLAG },
169 { "\\print_evenpage_flag", RC_PRINTEVENPAGEFLAG },
170 { "\\print_extra_options", RC_PRINTEXSTRAOPTIONS },
171 { "\\print_file_extension", RC_PRINTFILEEXTENSION },
172 { "\\print_landscape_flag", RC_PRINTLANDSCAPEFLAG },
173 { "\\print_oddpage_flag", RC_PRINTODDPAGEFLAG },
174 { "\\print_pagerange_flag", RC_PRINTPAGERANGEFLAG },
175 { "\\print_paper_dimension_flag", RC_PRINTPAPERDIMENSIONFLAG },
176 { "\\print_paper_flag", RC_PRINTPAPERFLAG },
177 { "\\print_reverse_flag", RC_PRINTREVERSEFLAG },
178 { "\\print_spool_command", RC_PRINTSPOOL_COMMAND },
179 { "\\print_spool_printerprefix", RC_PRINTSPOOL_PRINTERPREFIX },
180 { "\\print_to_file", RC_PRINTTOFILE },
181 { "\\print_to_printer", RC_PRINTTOPRINTER },
182 { "\\printer", RC_PRINTER },
183 { "\\ps_command", RC_PS_COMMAND },
184 { "\\relyx_command", RC_RELYX_COMMAND },
185 { "\\screen_dpi", RC_SCREEN_DPI },
186 { "\\screen_font_encoding", RC_SCREEN_FONT_ENCODING },
187 { "\\screen_font_menu", RC_SCREEN_FONT_MENU },
188 { "\\screen_font_popup", RC_SCREEN_FONT_POPUP },
189 { "\\screen_font_roman", RC_SCREEN_FONT_ROMAN },
190 { "\\screen_font_sans", RC_SCREEN_FONT_SANS },
191 { "\\screen_font_scalable", RC_SCREEN_FONT_SCALABLE },
192 { "\\screen_font_sizes", RC_SCREEN_FONT_SIZES },
193 { "\\screen_font_typewriter", RC_SCREEN_FONT_TYPEWRITER },
194 { "\\screen_zoom", RC_SCREEN_ZOOM },
195 { "\\selection_color", RC_SELECTION_COLOR },
196 { "\\serverpipe", RC_SERVERPIPE },
197 { "\\sgml_extra_options", RC_SGML_EXTRA_OPTIONS },
198 { "\\spell_command", RC_SPELL_COMMAND },
199 { "\\tempdir_path", RC_TEMPDIRPATH },
200 { "\\template_path", RC_TEMPLATEPATH },
201 { "\\use_alt_language", RC_USE_ALT_LANG },
202 { "\\use_escape_chars", RC_USE_ESC_CHARS },
203 { "\\use_input_encoding", RC_USE_INP_ENC },
204 { "\\use_personal_dictionary", RC_USE_PERS_DICT },
205 { "\\use_tempdir", RC_USETEMPDIR },
206 { "\\view_dvi_command", RC_VIEWDVI_COMMAND },
207 { "\\view_ps_command", RC_VIEWPS_COMMAND },
208 { "\\view_pspic_command", RC_VIEWPSPIC_COMMAND }
211 /* Let the range depend of the size of lyxrcTags. Alejandro 240596 */
212 static const int lyxrcCount = sizeof(lyxrcTags) / sizeof(keyword_item);
214 // Should this be moved inside LyXAction?
216 int bindKey(char const* seq, int action)
218 return toplevel_keymap->bind(seq, action);
224 // Get printer from the environment. If fail, use default "",
225 // assuming that everything is set up correctly.
226 printer = GetEnv("PRINTER");
227 print_command = "dvips";
228 print_evenpage_flag = "-B";
229 print_oddpage_flag = "-A";
230 print_pagerange_flag = "-pp";
231 print_copies_flag = "-c";
232 print_collcopies_flag = "-C";
233 print_reverse_flag = "-r";
234 print_landscape_flag = "-t landscape";
235 print_to_printer = "-P";
236 print_to_file = "-o ";
237 print_file_extension = ".ps";
238 print_paper_flag = "-t";
239 print_paper_dimension_flag = "-T";
240 document_path = GetEnvPath("HOME");
241 tempdir_path = "/tmp";
243 latex_command = "latex";
244 literate_command = "none";
245 literate_extension = "none";
246 literate_error_filter = "cat";
247 build_command = "make";
248 build_error_filter = "cat";
249 relyx_command = "reLyX";
251 view_ps_command = "ghostview -swap";
252 view_pspic_command = "ghostview";
253 view_dvi_command = "xdvi";
254 default_papersize = PAPER_USLETTER;
255 custom_export_format = "ps";
256 chktex_command = "chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38";
259 // Because a screen typically is wider than a piece of paper:
261 // Default LaTeX font size:
262 font_sizes[LyXFont::SIZE_TINY] = 5.0;
263 font_sizes[LyXFont::SIZE_SCRIPT] = 7.0;
264 font_sizes[LyXFont::SIZE_FOOTNOTE] = 8.0;
265 font_sizes[LyXFont::SIZE_SMALL] = 9.0;
266 font_sizes[LyXFont::SIZE_NORMAL] = 10.0;
267 font_sizes[LyXFont::SIZE_LARGE] = 12.0;
268 font_sizes[LyXFont::SIZE_LARGER] = 14.4;
269 font_sizes[LyXFont::SIZE_LARGEST] = 17.26;
270 font_sizes[LyXFont::SIZE_HUGE] = 20.74;
271 font_sizes[LyXFont::SIZE_HUGER] = 24.88;
272 use_scalable_fonts = true;
273 roman_font_name = "-*-times";
274 sans_font_name = "-*-helvetica";
275 typewriter_font_name = "-*-courier";
276 menu_font_name = "-*-helvetica-bold-r";
277 popup_font_name = "-*-helvetica-medium-r";
278 font_norm = "iso8859-1";
280 auto_region_delete = true;
283 check_lastfiles = true;
284 exit_confirmation = true;
285 display_shortcuts = true;
286 // Spellchecker settings:
287 isp_command = "ispell";
288 isp_accept_compound = false;
289 isp_use_input_encoding = false;
290 isp_use_alt_lang = false;
291 isp_use_pers_dict = false;
292 isp_use_esc_chars = false;
295 defaultKeyBindings();
303 int LyXRC::ReadBindFile(string name)
306 string tmp = i18nLibFileSearch("bind",name,"bind");
307 lyxerr[Debug::LYXRC] << "Reading bindfile:" << tmp << endl;
308 int result = Read(tmp);
310 lyxerr << "Error reading bind file: " << tmp << endl;
315 int LyXRC::Read(string const &filename)
318 string bindFile = "cua";
320 LyXLex lexrc(lyxrcTags, lyxrcCount);
321 if (lyxerr.debugging(Debug::PARSER))
324 lexrc.setFile(filename);
325 if (!lexrc.IsOK()) return -2;
327 lyxerr[Debug::INIT] << "Reading '" << filename << "'..." << endl;
329 while (lexrc.IsOK()) {
331 switch(lexrc.lex()) {
332 case LyXLex::LEX_FEOF:
334 case RC_INPUT: // Include file
336 string tmp = LibFileSearch(string(),
339 lexrc.printError("Error reading "
340 "included file: "+tmp);
344 case RC_BINDFILE: // RVDK_PATCH_5
346 ReadBindFile(lexrc.GetString());
349 case RC_BEGINTOOLBAR:
350 // this toolbar should be changed to be a completely
351 // non gui toolbar. (Lgb)
357 use_kbmap = lexrc.GetBool();
360 case RC_EXIT_CONFIRMATION:
362 exit_confirmation = lexrc.GetBool();
365 case RC_DISPLAY_SHORTCUTS:
367 display_shortcuts = lexrc.GetBool();
370 case RC_KBMAP_PRIMARY:
372 primary_kbmap = lexrc.GetString();
375 case RC_KBMAP_SECONDARY:
377 secondary_kbmap = lexrc.GetString();
380 case RC_FONT_ENCODING:
382 fontenc = lexrc.GetString();
387 printer = lexrc.GetString();
390 case RC_PRINT_COMMAND:
392 print_command = lexrc.GetString();
395 case RC_PRINTEVENPAGEFLAG:
397 print_evenpage_flag = lexrc.GetString();
400 case RC_PRINTODDPAGEFLAG:
402 print_oddpage_flag = lexrc.GetString();
405 case RC_PRINTPAGERANGEFLAG:
407 print_pagerange_flag = lexrc.GetString();
410 case RC_PRINTCOPIESFLAG:
412 print_copies_flag = lexrc.GetString();
415 case RC_PRINTCOLLCOPIESFLAG:
417 print_collcopies_flag = lexrc.GetString();
420 case RC_PRINTREVERSEFLAG:
422 print_reverse_flag = lexrc.GetString();
425 case RC_PRINTLANDSCAPEFLAG:
427 print_landscape_flag = lexrc.GetString();
430 case RC_PRINTTOPRINTER:
432 print_to_printer = lexrc.GetString();
435 case RC_PRINT_ADAPTOUTPUT:
437 print_adapt_output = lexrc.GetBool();
442 print_to_file = lexrc.GetString();
445 case RC_PRINTFILEEXTENSION:
447 print_file_extension = lexrc.GetString();
450 case RC_PRINTEXSTRAOPTIONS:
452 print_extra_options = lexrc.GetString();
455 case RC_PRINTSPOOL_COMMAND:
457 print_spool_command = lexrc.GetString();
460 case RC_PRINTSPOOL_PRINTERPREFIX:
462 print_spool_printerprefix = lexrc.GetString();
465 case RC_PRINTPAPERDIMENSIONFLAG:
467 print_paper_dimension_flag = lexrc.GetString();
470 case RC_PRINTPAPERFLAG:
472 print_paper_flag = lexrc.GetString();
475 case RC_CUSTOM_EXPORT_COMMAND:
477 custom_export_command = lexrc.GetString();
480 case RC_CUSTOM_EXPORT_FORMAT:
482 custom_export_format = lexrc.GetString();
485 case RC_LATEX_COMMAND:
487 latex_command = lexrc.GetString();
490 case RC_LITERATE_COMMAND:
492 literate_command = lexrc.GetString();
495 case RC_LITERATE_EXTENSION:
497 literate_extension = lexrc.GetString();
500 case RC_LITERATE_ERROR_FILTER:
502 literate_error_filter = lexrc.GetString();
505 case RC_BUILD_COMMAND:
507 build_command = lexrc.GetString();
510 case RC_BUILD_ERROR_FILTER:
512 build_error_filter = lexrc.GetString();
515 case RC_RELYX_COMMAND:
517 relyx_command = lexrc.GetString();
520 case RC_DEFAULT_PAPERSIZE:
522 string size = lowercase(lexrc.GetString());
523 if (size == "usletter")
524 default_papersize = PAPER_USLETTER;
525 else if (size == "legal")
526 default_papersize = PAPER_LEGALPAPER;
527 else if (size == "executive")
528 default_papersize = PAPER_EXECUTIVEPAPER;
529 else if (size == "a3")
530 default_papersize = PAPER_A3PAPER;
531 else if (size == "a4")
532 default_papersize = PAPER_A4PAPER;
533 else if (size == "a5")
534 default_papersize = PAPER_A5PAPER;
535 else if (size == "b5")
536 default_papersize = PAPER_B5PAPER;
539 case RC_VIEWDVI_COMMAND:
541 view_dvi_command = lexrc.GetString();
546 ps_command = lexrc.GetString();
549 case RC_VIEWPS_COMMAND:
551 view_ps_command = lexrc.GetString();
554 case RC_VIEWPSPIC_COMMAND:
556 view_pspic_command = lexrc.GetString();
559 case RC_CHKTEX_COMMAND:
561 chktex_command = lexrc.GetString();
566 dpi = lexrc.GetInteger();
571 zoom = lexrc.GetInteger();
574 case RC_SCREEN_FONT_SIZES:
576 font_sizes[LyXFont::SIZE_TINY] =
579 font_sizes[LyXFont::SIZE_SCRIPT] =
582 font_sizes[LyXFont::SIZE_FOOTNOTE] =
585 font_sizes[LyXFont::SIZE_SMALL] =
588 font_sizes[LyXFont::SIZE_NORMAL] =
591 font_sizes[LyXFont::SIZE_LARGE] =
594 font_sizes[LyXFont::SIZE_LARGER] =
597 font_sizes[LyXFont::SIZE_LARGEST] =
600 font_sizes[LyXFont::SIZE_HUGE] =
603 font_sizes[LyXFont::SIZE_HUGER] =
607 case RC_SCREEN_FONT_SCALABLE:
609 use_scalable_fonts = lexrc.GetBool();
614 autosave = lexrc.GetInteger();
617 case RC_SGML_EXTRA_OPTIONS:
619 sgml_extra_options = lexrc.GetString();
622 case RC_DOCUMENTPATH:
624 document_path = ExpandPath(lexrc.GetString());
628 case RC_TEMPLATEPATH:
630 template_path = ExpandPath(lexrc.GetString());
635 tempdir_path = ExpandPath(lexrc.GetString());
640 use_tempdir = lexrc.GetBool();
645 lastfiles = ExpandPath(lexrc.GetString());
648 case RC_NUMLASTFILES:
650 num_lastfiles = lexrc.GetInteger();
653 case RC_CHECKLASTFILES:
655 check_lastfiles = lexrc.GetBool();
658 case RC_SCREEN_FONT_ROMAN:
660 roman_font_name = lexrc.GetString();
663 case RC_SCREEN_FONT_SANS:
665 sans_font_name = lexrc.GetString();
668 case RC_SCREEN_FONT_TYPEWRITER:
670 typewriter_font_name = lexrc.GetString();
673 case RC_SCREEN_FONT_MENU:
675 menu_font_name = lexrc.GetString();
678 case RC_SCREEN_FONT_POPUP:
680 popup_font_name = lexrc.GetString();
683 case RC_SCREEN_FONT_ENCODING:
685 font_norm = lexrc.GetString();
688 case RC_AUTOREGIONDELETE:
689 // Auto region delete defaults to true
691 auto_region_delete = lexrc.GetBool();
696 // we should not do an explicit binding before
697 // loading a bind file. So, in this case, load
698 // the default bind file.
702 // !!!chb, dynamic key binding...
706 if (lexrc.lex()==LyXLex::LEX_DATA) {
707 seq = lexrc.GetString();
709 lexrc.printError("Bad key sequence: `$$Token'");
713 if (lexrc.lex()==LyXLex::LEX_DATA) {
714 cmd = lexrc.GetString();
716 lexrc.printError("Bad command: `$$Token'");
720 if ((action = lyxaction.LookupFunc(cmd.c_str()))>=0) {
721 if (lyxerr.debugging(Debug::KEY)) {
722 lyxerr << "RC_BIND: Sequence `"
723 << seq << "' Command `"
724 << cmd << "' Action `"
725 << action << '\'' << endl;
727 res = bindKey(seq.c_str(), action);
730 "Invalid key sequence `"
733 } else {// cmd is the last token read.
735 "Unknown LyX function `$$Token'");
741 lyxpipes = ExpandPath(lexrc.GetString());
744 case RC_CURSOR_FOLLOWS_SCROLLBAR:
746 cursor_follows_scrollbar = lexrc.GetBool();
748 case RC_FAST_SELECTION:
750 fast_selection = lexrc.GetBool();
752 case RC_BACKGROUND_COLOR:
754 background_color = lexrc.GetString();
756 case RC_SELECTION_COLOR:
758 strncpy(selection_color,
759 lexrc.GetString().c_str(),31);
763 fax_command = lexrc.GetString();
767 fax_program = lexrc.GetString();
771 string s = lexrc.GetString();
775 phone_book = user_lyxdir + s;
778 case RC_ASCIIROFF_COMMAND:
780 ascii_roff_command = lexrc.GetString();
782 case RC_ASCII_LINELEN:
784 ascii_linelen = lexrc.GetInteger();
786 // Spellchecker settings:
787 case RC_SPELL_COMMAND:
789 isp_command = lexrc.GetString();
791 case RC_ACCEPT_COMPOUND:
793 isp_accept_compound = lexrc.GetBool();
797 isp_use_input_encoding = lexrc.GetBool();
799 case RC_USE_ALT_LANG:
801 isp_use_alt_lang = lexrc.GetBool();
803 case RC_USE_PERS_DICT:
805 isp_use_pers_dict = lexrc.GetBool();
807 case RC_USE_ESC_CHARS:
809 isp_use_esc_chars = lexrc.GetBool();
813 isp_alt_lang = lexrc.GetString();
817 isp_pers_dict = lexrc.GetString();
821 isp_esc_chars = lexrc.GetString();
825 lexrc.printError("Unknown tag `$$Token'");
836 lyxerr << "The current internal LyXRC:" << endl;
840 /// define the default key bindings for LyX.
841 void LyXRC::defaultKeyBindings()
843 bindKey("Right", LFUN_RIGHT);
844 bindKey("Left", LFUN_LEFT);
845 bindKey("Up", LFUN_UP);
846 bindKey("Down", LFUN_DOWN);
848 bindKey("Tab", LFUN_TAB);
850 bindKey("Home", LFUN_HOME);
851 bindKey("End", LFUN_END);
852 bindKey("Prior", LFUN_PRIOR);
853 bindKey("Next", LFUN_NEXT);
855 bindKey("Return", LFUN_BREAKPARAGRAPH);
856 bindKey("~C-~S-~M-nobreakspace", LFUN_PROTECTEDSPACE);
858 bindKey("Delete", LFUN_DELETE);
859 bindKey("BackSpace", LFUN_BACKSPACE);
860 // bindKeyings for transparent handling of deadkeys
861 // The keysyms are gotten from XFree86 X11R6
862 bindKey("~C-~S-~M-dead_acute", LFUN_ACUTE);
863 bindKey("~C-~S-~M-dead_breve", LFUN_BREVE);
864 bindKey("~C-~S-~M-dead_caron", LFUN_CARON);
865 bindKey("~C-~S-~M-dead_cedilla", LFUN_CEDILLA);
866 bindKey("~C-~S-~M-dead_abovering", LFUN_CIRCLE);
867 bindKey("~C-~S-~M-dead_circumflex", LFUN_CIRCUMFLEX);
868 bindKey("~C-~S-~M-dead_abovedot", LFUN_DOT);
869 bindKey("~C-~S-~M-dead_grave", LFUN_GRAVE);
870 bindKey("~C-~S-~M-dead_doubleacute", LFUN_HUNG_UMLAUT);
871 bindKey("~C-~S-~M-dead_macron", LFUN_MACRON);
872 // nothing with this name
873 // bindKey("~C-~S-~M-dead_special_caron", LFUN_SPECIAL_CARON);
874 bindKey("~C-~S-~M-dead_tilde", LFUN_TILDE);
875 bindKey("~C-~S-~M-dead_diaeresis", LFUN_UMLAUT);
876 // nothing with this name either...
877 //bindKey("~C-~S-~M-dead_underbar", LFUN_UNDERBAR);
878 bindKey("~C-~S-~M-dead_belowdot", LFUN_UNDERDOT);
879 bindKey("~C-~S-~M-dead_tie", LFUN_TIE);
880 bindKey("~C-~S-~M-dead_ogonek", LFUN_OGONEK);
882 // bindings to utilize the use of the numeric keypad
884 bindKey("KP_0", LFUN_SELFINSERT);
885 bindKey("KP_Decimal", LFUN_SELFINSERT);
886 bindKey("KP_Enter", LFUN_SELFINSERT);
887 bindKey("KP_1", LFUN_SELFINSERT);
888 bindKey("KP_2", LFUN_SELFINSERT);
889 bindKey("KP_3", LFUN_SELFINSERT);
890 bindKey("KP_4", LFUN_SELFINSERT);
891 bindKey("KP_5", LFUN_SELFINSERT);
892 bindKey("KP_6", LFUN_SELFINSERT);
893 bindKey("KP_Add", LFUN_SELFINSERT);
894 bindKey("KP_7", LFUN_SELFINSERT);
895 bindKey("KP_8", LFUN_SELFINSERT);
896 bindKey("KP_9", LFUN_SELFINSERT);
897 bindKey("KP_Divide", LFUN_SELFINSERT);
898 bindKey("KP_Multiply", LFUN_SELFINSERT);
899 bindKey("KP_Subtract", LFUN_SELFINSERT);
901 /* Most self-insert keys are handled in the 'default:' section of
902 * WorkAreaKeyPress - so we don't have to define them all.
903 * However keys explicit decleared as self-insert are
904 * handled seperatly (LFUN_SELFINSERT.) Lgb. */
906 bindKey("C-Tab", LFUN_TABINSERT); // ale970515