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,
127 static keyword_item lyxrcTags[] = {
128 { "\\accept_compound", RC_ACCEPT_COMPOUND },
129 { "\\alternate_language", RC_ALT_LANG },
130 { "\\ascii_linelen", RC_ASCII_LINELEN },
131 { "\\ascii_roff_command", RC_ASCIIROFF_COMMAND },
132 { "\\auto_region_delete", RC_AUTOREGIONDELETE },
133 { "\\autosave", RC_AUTOSAVE },
134 { "\\background_color", RC_BACKGROUND_COLOR },
135 { "\\begin_toolbar", RC_BEGINTOOLBAR },
136 { "\\bind", RC_BIND },
137 { "\\bind_file", RC_BINDFILE },
138 { "\\build_command", RC_BUILD_COMMAND },
139 { "\\build_error_filter", RC_BUILD_ERROR_FILTER },
140 { "\\check_lastfiles", RC_CHECKLASTFILES },
141 { "\\chktex_command", RC_CHKTEX_COMMAND },
142 { "\\cursor_follows_scrollbar", RC_CURSOR_FOLLOWS_SCROLLBAR },
143 { "\\custom_export_command", RC_CUSTOM_EXPORT_COMMAND },
144 { "\\custom_export_format", RC_CUSTOM_EXPORT_FORMAT },
145 { "\\default_papersize", RC_DEFAULT_PAPERSIZE },
146 { "\\display_shortcuts", RC_DISPLAY_SHORTCUTS },
147 { "\\document_path", RC_DOCUMENTPATH },
148 { "\\escape_chars", RC_ESC_CHARS },
149 { "\\exit_confirmation", RC_EXIT_CONFIRMATION },
150 { "\\fast_selection", RC_FAST_SELECTION },
151 { "\\fax_command", RC_FAX_COMMAND },
152 { "\\fax_program", RC_FAXPROGRAM },
153 { "\\font_encoding", RC_FONT_ENCODING },
154 { "\\html_command", RC_HTML_COMMAND },
155 { "\\input", RC_INPUT },
156 { "\\kbmap", RC_KBMAP },
157 { "\\kbmap_primary", RC_KBMAP_PRIMARY },
158 { "\\kbmap_secondary", RC_KBMAP_SECONDARY },
159 { "\\lastfiles", RC_LASTFILES },
160 { "\\latex_command", RC_LATEX_COMMAND },
161 { "\\literate_command", RC_LITERATE_COMMAND },
162 { "\\literate_error_filter", RC_LITERATE_ERROR_FILTER },
163 { "\\literate_extension", RC_LITERATE_EXTENSION },
164 { "\\num_lastfiles", RC_NUMLASTFILES },
165 { "\\personal_dictionary", RC_PERS_DICT },
166 { "\\phone_book", RC_PHONEBOOK },
167 { "\\print_adapt_output", RC_PRINT_ADAPTOUTPUT },
168 { "\\print_collcopies_flag", RC_PRINTCOLLCOPIESFLAG },
169 { "\\print_command", RC_PRINT_COMMAND },
170 { "\\print_copies_flag", RC_PRINTCOPIESFLAG },
171 { "\\print_evenpage_flag", RC_PRINTEVENPAGEFLAG },
172 { "\\print_extra_options", RC_PRINTEXSTRAOPTIONS },
173 { "\\print_file_extension", RC_PRINTFILEEXTENSION },
174 { "\\print_landscape_flag", RC_PRINTLANDSCAPEFLAG },
175 { "\\print_oddpage_flag", RC_PRINTODDPAGEFLAG },
176 { "\\print_pagerange_flag", RC_PRINTPAGERANGEFLAG },
177 { "\\print_paper_dimension_flag", RC_PRINTPAPERDIMENSIONFLAG },
178 { "\\print_paper_flag", RC_PRINTPAPERFLAG },
179 { "\\print_reverse_flag", RC_PRINTREVERSEFLAG },
180 { "\\print_spool_command", RC_PRINTSPOOL_COMMAND },
181 { "\\print_spool_printerprefix", RC_PRINTSPOOL_PRINTERPREFIX },
182 { "\\print_to_file", RC_PRINTTOFILE },
183 { "\\print_to_printer", RC_PRINTTOPRINTER },
184 { "\\printer", RC_PRINTER },
185 { "\\ps_command", RC_PS_COMMAND },
186 { "\\relyx_command", RC_RELYX_COMMAND },
187 { "\\screen_dpi", RC_SCREEN_DPI },
188 { "\\screen_font_encoding", RC_SCREEN_FONT_ENCODING },
189 { "\\screen_font_menu", RC_SCREEN_FONT_MENU },
190 { "\\screen_font_popup", RC_SCREEN_FONT_POPUP },
191 { "\\screen_font_roman", RC_SCREEN_FONT_ROMAN },
192 { "\\screen_font_sans", RC_SCREEN_FONT_SANS },
193 { "\\screen_font_scalable", RC_SCREEN_FONT_SCALABLE },
194 { "\\screen_font_sizes", RC_SCREEN_FONT_SIZES },
195 { "\\screen_font_typewriter", RC_SCREEN_FONT_TYPEWRITER },
196 { "\\screen_zoom", RC_SCREEN_ZOOM },
197 { "\\selection_color", RC_SELECTION_COLOR },
198 { "\\serverpipe", RC_SERVERPIPE },
199 { "\\sgml_extra_options", RC_SGML_EXTRA_OPTIONS },
200 { "\\spell_command", RC_SPELL_COMMAND },
201 { "\\tempdir_path", RC_TEMPDIRPATH },
202 { "\\template_path", RC_TEMPLATEPATH },
203 { "\\use_alt_language", RC_USE_ALT_LANG },
204 { "\\use_escape_chars", RC_USE_ESC_CHARS },
205 { "\\use_input_encoding", RC_USE_INP_ENC },
206 { "\\use_personal_dictionary", RC_USE_PERS_DICT },
207 { "\\use_tempdir", RC_USETEMPDIR },
208 { "\\view_dvi_command", RC_VIEWDVI_COMMAND },
209 { "\\view_ps_command", RC_VIEWPS_COMMAND },
210 { "\\view_pspic_command", RC_VIEWPSPIC_COMMAND }
213 /* Let the range depend of the size of lyxrcTags. Alejandro 240596 */
214 static const int lyxrcCount = sizeof(lyxrcTags) / sizeof(keyword_item);
216 // Should this be moved inside LyXAction?
218 int bindKey(char const* seq, int action)
220 return toplevel_keymap->bind(seq, action);
226 // Get printer from the environment. If fail, use default "",
227 // assuming that everything is set up correctly.
228 printer = GetEnv("PRINTER");
229 print_command = "dvips";
230 print_evenpage_flag = "-B";
231 print_oddpage_flag = "-A";
232 print_pagerange_flag = "-pp";
233 print_copies_flag = "-c";
234 print_collcopies_flag = "-C";
235 print_reverse_flag = "-r";
236 print_landscape_flag = "-t landscape";
237 print_to_printer = "-P";
238 print_to_file = "-o ";
239 print_file_extension = ".ps";
240 print_paper_flag = "-t";
241 print_paper_dimension_flag = "-T";
242 document_path = GetEnvPath("HOME");
243 tempdir_path = "/tmp";
245 latex_command = "latex";
246 literate_command = "none";
247 literate_extension = "none";
248 literate_error_filter = "cat";
249 build_command = "make";
250 build_error_filter = "cat";
251 relyx_command = "reLyX";
253 view_ps_command = "ghostview -swap";
254 view_pspic_command = "ghostview";
255 view_dvi_command = "xdvi";
256 default_papersize = PAPER_USLETTER;
257 custom_export_format = "ps";
258 chktex_command = "chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38";
259 html_command = "tth -t";
262 // Because a screen typically is wider than a piece of paper:
264 // Default LaTeX font size:
265 font_sizes[LyXFont::SIZE_TINY] = 5.0;
266 font_sizes[LyXFont::SIZE_SCRIPT] = 7.0;
267 font_sizes[LyXFont::SIZE_FOOTNOTE] = 8.0;
268 font_sizes[LyXFont::SIZE_SMALL] = 9.0;
269 font_sizes[LyXFont::SIZE_NORMAL] = 10.0;
270 font_sizes[LyXFont::SIZE_LARGE] = 12.0;
271 font_sizes[LyXFont::SIZE_LARGER] = 14.4;
272 font_sizes[LyXFont::SIZE_LARGEST] = 17.26;
273 font_sizes[LyXFont::SIZE_HUGE] = 20.74;
274 font_sizes[LyXFont::SIZE_HUGER] = 24.88;
275 use_scalable_fonts = true;
276 roman_font_name = "-*-times";
277 sans_font_name = "-*-helvetica";
278 typewriter_font_name = "-*-courier";
279 menu_font_name = "-*-helvetica-bold-r";
280 popup_font_name = "-*-helvetica-medium-r";
281 font_norm = "iso8859-1";
283 auto_region_delete = true;
286 check_lastfiles = true;
287 exit_confirmation = true;
288 display_shortcuts = true;
289 // Spellchecker settings:
290 isp_command = "ispell";
291 isp_accept_compound = false;
292 isp_use_input_encoding = false;
293 isp_use_alt_lang = false;
294 isp_use_pers_dict = false;
295 isp_use_esc_chars = false;
298 defaultKeyBindings();
302 int LyXRC::ReadBindFile(string const & name)
305 string tmp = i18nLibFileSearch("bind",name,"bind");
306 lyxerr[Debug::LYXRC] << "Reading bindfile:" << tmp << endl;
307 int result = Read(tmp);
309 lyxerr << "Error reading bind file: " << tmp << endl;
314 int LyXRC::Read(string const &filename)
317 string bindFile = "cua";
319 LyXLex lexrc(lyxrcTags, lyxrcCount);
320 if (lyxerr.debugging(Debug::PARSER))
323 lexrc.setFile(filename);
324 if (!lexrc.IsOK()) return -2;
326 lyxerr[Debug::INIT] << "Reading '" << filename << "'..." << endl;
328 while (lexrc.IsOK()) {
330 switch(lexrc.lex()) {
331 case LyXLex::LEX_FEOF:
333 case RC_INPUT: // Include file
335 string tmp = LibFileSearch(string(),
338 lexrc.printError("Error reading "
339 "included file: "+tmp);
343 case RC_BINDFILE: // RVDK_PATCH_5
345 ReadBindFile(lexrc.GetString());
348 case RC_BEGINTOOLBAR:
349 // this toolbar should be changed to be a completely
350 // non gui toolbar. (Lgb)
356 use_kbmap = lexrc.GetBool();
359 case RC_EXIT_CONFIRMATION:
361 exit_confirmation = lexrc.GetBool();
364 case RC_DISPLAY_SHORTCUTS:
366 display_shortcuts = lexrc.GetBool();
369 case RC_KBMAP_PRIMARY:
371 primary_kbmap = lexrc.GetString();
374 case RC_KBMAP_SECONDARY:
376 secondary_kbmap = lexrc.GetString();
379 case RC_FONT_ENCODING:
381 fontenc = lexrc.GetString();
386 printer = lexrc.GetString();
389 case RC_PRINT_COMMAND:
391 print_command = lexrc.GetString();
394 case RC_PRINTEVENPAGEFLAG:
396 print_evenpage_flag = lexrc.GetString();
399 case RC_PRINTODDPAGEFLAG:
401 print_oddpage_flag = lexrc.GetString();
404 case RC_PRINTPAGERANGEFLAG:
406 print_pagerange_flag = lexrc.GetString();
409 case RC_PRINTCOPIESFLAG:
411 print_copies_flag = lexrc.GetString();
414 case RC_PRINTCOLLCOPIESFLAG:
416 print_collcopies_flag = lexrc.GetString();
419 case RC_PRINTREVERSEFLAG:
421 print_reverse_flag = lexrc.GetString();
424 case RC_PRINTLANDSCAPEFLAG:
426 print_landscape_flag = lexrc.GetString();
429 case RC_PRINTTOPRINTER:
431 print_to_printer = lexrc.GetString();
434 case RC_PRINT_ADAPTOUTPUT:
436 print_adapt_output = lexrc.GetBool();
441 print_to_file = lexrc.GetString();
444 case RC_PRINTFILEEXTENSION:
446 print_file_extension = lexrc.GetString();
449 case RC_PRINTEXSTRAOPTIONS:
451 print_extra_options = lexrc.GetString();
454 case RC_PRINTSPOOL_COMMAND:
456 print_spool_command = lexrc.GetString();
459 case RC_PRINTSPOOL_PRINTERPREFIX:
461 print_spool_printerprefix = lexrc.GetString();
464 case RC_PRINTPAPERDIMENSIONFLAG:
466 print_paper_dimension_flag = lexrc.GetString();
469 case RC_PRINTPAPERFLAG:
471 print_paper_flag = lexrc.GetString();
474 case RC_CUSTOM_EXPORT_COMMAND:
476 custom_export_command = lexrc.GetString();
479 case RC_CUSTOM_EXPORT_FORMAT:
481 custom_export_format = lexrc.GetString();
484 case RC_LATEX_COMMAND:
486 latex_command = lexrc.GetString();
489 case RC_LITERATE_COMMAND:
491 literate_command = lexrc.GetString();
494 case RC_LITERATE_EXTENSION:
496 literate_extension = lexrc.GetString();
499 case RC_LITERATE_ERROR_FILTER:
501 literate_error_filter = lexrc.GetString();
504 case RC_BUILD_COMMAND:
506 build_command = lexrc.GetString();
509 case RC_BUILD_ERROR_FILTER:
511 build_error_filter = lexrc.GetString();
514 case RC_RELYX_COMMAND:
516 relyx_command = lexrc.GetString();
519 case RC_DEFAULT_PAPERSIZE:
521 string size = lowercase(lexrc.GetString());
522 if (size == "usletter")
523 default_papersize = PAPER_USLETTER;
524 else if (size == "legal")
525 default_papersize = PAPER_LEGALPAPER;
526 else if (size == "executive")
527 default_papersize = PAPER_EXECUTIVEPAPER;
528 else if (size == "a3")
529 default_papersize = PAPER_A3PAPER;
530 else if (size == "a4")
531 default_papersize = PAPER_A4PAPER;
532 else if (size == "a5")
533 default_papersize = PAPER_A5PAPER;
534 else if (size == "b5")
535 default_papersize = PAPER_B5PAPER;
538 case RC_VIEWDVI_COMMAND:
540 view_dvi_command = lexrc.GetString();
545 ps_command = lexrc.GetString();
548 case RC_VIEWPS_COMMAND:
550 view_ps_command = lexrc.GetString();
553 case RC_VIEWPSPIC_COMMAND:
555 view_pspic_command = lexrc.GetString();
558 case RC_CHKTEX_COMMAND:
560 chktex_command = lexrc.GetString();
563 case RC_HTML_COMMAND:
565 html_command = lexrc.GetString();
570 dpi = lexrc.GetInteger();
575 zoom = lexrc.GetInteger();
578 case RC_SCREEN_FONT_SIZES:
580 font_sizes[LyXFont::SIZE_TINY] =
583 font_sizes[LyXFont::SIZE_SCRIPT] =
586 font_sizes[LyXFont::SIZE_FOOTNOTE] =
589 font_sizes[LyXFont::SIZE_SMALL] =
592 font_sizes[LyXFont::SIZE_NORMAL] =
595 font_sizes[LyXFont::SIZE_LARGE] =
598 font_sizes[LyXFont::SIZE_LARGER] =
601 font_sizes[LyXFont::SIZE_LARGEST] =
604 font_sizes[LyXFont::SIZE_HUGE] =
607 font_sizes[LyXFont::SIZE_HUGER] =
611 case RC_SCREEN_FONT_SCALABLE:
613 use_scalable_fonts = lexrc.GetBool();
618 autosave = lexrc.GetInteger();
621 case RC_SGML_EXTRA_OPTIONS:
623 sgml_extra_options = lexrc.GetString();
626 case RC_DOCUMENTPATH:
628 document_path = ExpandPath(lexrc.GetString());
632 case RC_TEMPLATEPATH:
634 template_path = ExpandPath(lexrc.GetString());
639 tempdir_path = ExpandPath(lexrc.GetString());
644 use_tempdir = lexrc.GetBool();
649 lastfiles = ExpandPath(lexrc.GetString());
652 case RC_NUMLASTFILES:
654 num_lastfiles = lexrc.GetInteger();
657 case RC_CHECKLASTFILES:
659 check_lastfiles = lexrc.GetBool();
662 case RC_SCREEN_FONT_ROMAN:
664 roman_font_name = lexrc.GetString();
667 case RC_SCREEN_FONT_SANS:
669 sans_font_name = lexrc.GetString();
672 case RC_SCREEN_FONT_TYPEWRITER:
674 typewriter_font_name = lexrc.GetString();
677 case RC_SCREEN_FONT_MENU:
679 menu_font_name = lexrc.GetString();
682 case RC_SCREEN_FONT_POPUP:
684 popup_font_name = lexrc.GetString();
687 case RC_SCREEN_FONT_ENCODING:
689 font_norm = lexrc.GetString();
692 case RC_AUTOREGIONDELETE:
693 // Auto region delete defaults to true
695 auto_region_delete = lexrc.GetBool();
700 // we should not do an explicit binding before
701 // loading a bind file. So, in this case, load
702 // the default bind file.
706 // !!!chb, dynamic key binding...
710 if (lexrc.lex()==LyXLex::LEX_DATA) {
711 seq = lexrc.GetString();
713 lexrc.printError("Bad key sequence: `$$Token'");
717 if (lexrc.lex()==LyXLex::LEX_DATA) {
718 cmd = lexrc.GetString();
720 lexrc.printError("Bad command: `$$Token'");
724 if ((action = lyxaction.LookupFunc(cmd.c_str()))>=0) {
725 if (lyxerr.debugging(Debug::KEY)) {
726 lyxerr << "RC_BIND: Sequence `"
727 << seq << "' Command `"
728 << cmd << "' Action `"
729 << action << '\'' << endl;
731 res = bindKey(seq.c_str(), action);
734 "Invalid key sequence `"
737 } else {// cmd is the last token read.
739 "Unknown LyX function `$$Token'");
745 lyxpipes = ExpandPath(lexrc.GetString());
748 case RC_CURSOR_FOLLOWS_SCROLLBAR:
750 cursor_follows_scrollbar = lexrc.GetBool();
752 case RC_FAST_SELECTION:
754 fast_selection = lexrc.GetBool();
756 case RC_BACKGROUND_COLOR:
758 background_color = lexrc.GetString();
760 case RC_SELECTION_COLOR:
762 strncpy(selection_color,
763 lexrc.GetString().c_str(),31);
767 fax_command = lexrc.GetString();
771 fax_program = lexrc.GetString();
775 string s = lexrc.GetString();
779 phone_book = user_lyxdir + s;
782 case RC_ASCIIROFF_COMMAND:
784 ascii_roff_command = lexrc.GetString();
786 case RC_ASCII_LINELEN:
788 ascii_linelen = lexrc.GetInteger();
790 // Spellchecker settings:
791 case RC_SPELL_COMMAND:
793 isp_command = lexrc.GetString();
795 case RC_ACCEPT_COMPOUND:
797 isp_accept_compound = lexrc.GetBool();
801 isp_use_input_encoding = lexrc.GetBool();
803 case RC_USE_ALT_LANG:
805 isp_use_alt_lang = lexrc.GetBool();
807 case RC_USE_PERS_DICT:
809 isp_use_pers_dict = lexrc.GetBool();
811 case RC_USE_ESC_CHARS:
813 isp_use_esc_chars = lexrc.GetBool();
817 isp_alt_lang = lexrc.GetString();
821 isp_pers_dict = lexrc.GetString();
825 isp_esc_chars = lexrc.GetString();
829 lexrc.printError("Unknown tag `$$Token'");
840 lyxerr << "The current internal LyXRC:" << endl;
844 /// define the default key bindings for LyX.
845 void LyXRC::defaultKeyBindings()
847 bindKey("Right", LFUN_RIGHT);
848 bindKey("Left", LFUN_LEFT);
849 bindKey("Up", LFUN_UP);
850 bindKey("Down", LFUN_DOWN);
852 bindKey("Tab", LFUN_TAB);
854 bindKey("Home", LFUN_HOME);
855 bindKey("End", LFUN_END);
856 bindKey("Prior", LFUN_PRIOR);
857 bindKey("Next", LFUN_NEXT);
859 bindKey("Return", LFUN_BREAKPARAGRAPH);
860 bindKey("~C-~S-~M-nobreakspace", LFUN_PROTECTEDSPACE);
862 bindKey("Delete", LFUN_DELETE);
863 bindKey("BackSpace", LFUN_BACKSPACE);
864 // bindKeyings for transparent handling of deadkeys
865 // The keysyms are gotten from XFree86 X11R6
866 bindKey("~C-~S-~M-dead_acute", LFUN_ACUTE);
867 bindKey("~C-~S-~M-dead_breve", LFUN_BREVE);
868 bindKey("~C-~S-~M-dead_caron", LFUN_CARON);
869 bindKey("~C-~S-~M-dead_cedilla", LFUN_CEDILLA);
870 bindKey("~C-~S-~M-dead_abovering", LFUN_CIRCLE);
871 bindKey("~C-~S-~M-dead_circumflex", LFUN_CIRCUMFLEX);
872 bindKey("~C-~S-~M-dead_abovedot", LFUN_DOT);
873 bindKey("~C-~S-~M-dead_grave", LFUN_GRAVE);
874 bindKey("~C-~S-~M-dead_doubleacute", LFUN_HUNG_UMLAUT);
875 bindKey("~C-~S-~M-dead_macron", LFUN_MACRON);
876 // nothing with this name
877 // bindKey("~C-~S-~M-dead_special_caron", LFUN_SPECIAL_CARON);
878 bindKey("~C-~S-~M-dead_tilde", LFUN_TILDE);
879 bindKey("~C-~S-~M-dead_diaeresis", LFUN_UMLAUT);
880 // nothing with this name either...
881 //bindKey("~C-~S-~M-dead_underbar", LFUN_UNDERBAR);
882 bindKey("~C-~S-~M-dead_belowdot", LFUN_UNDERDOT);
883 bindKey("~C-~S-~M-dead_tie", LFUN_TIE);
884 bindKey("~C-~S-~M-dead_ogonek", LFUN_OGONEK);
886 // bindings to utilize the use of the numeric keypad
888 bindKey("KP_0", LFUN_SELFINSERT);
889 bindKey("KP_Decimal", LFUN_SELFINSERT);
890 bindKey("KP_Enter", LFUN_SELFINSERT);
891 bindKey("KP_1", LFUN_SELFINSERT);
892 bindKey("KP_2", LFUN_SELFINSERT);
893 bindKey("KP_3", LFUN_SELFINSERT);
894 bindKey("KP_4", LFUN_SELFINSERT);
895 bindKey("KP_5", LFUN_SELFINSERT);
896 bindKey("KP_6", LFUN_SELFINSERT);
897 bindKey("KP_Add", LFUN_SELFINSERT);
898 bindKey("KP_7", LFUN_SELFINSERT);
899 bindKey("KP_8", LFUN_SELFINSERT);
900 bindKey("KP_9", LFUN_SELFINSERT);
901 bindKey("KP_Divide", LFUN_SELFINSERT);
902 bindKey("KP_Multiply", LFUN_SELFINSERT);
903 bindKey("KP_Subtract", LFUN_SELFINSERT);
905 /* Most self-insert keys are handled in the 'default:' section of
906 * WorkAreaKeyPress - so we don't have to define them all.
907 * However keys explicit decleared as self-insert are
908 * handled seperatly (LFUN_SELFINSERT.) Lgb. */
910 bindKey("C-Tab", LFUN_TABINSERT); // ale970515