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 { "\\input", RC_INPUT },
155 { "\\kbmap", RC_KBMAP },
156 { "\\kbmap_primary", RC_KBMAP_PRIMARY },
157 { "\\kbmap_secondary", RC_KBMAP_SECONDARY },
158 { "\\lastfiles", RC_LASTFILES },
159 { "\\latex_command", RC_LATEX_COMMAND },
160 { "\\literate_command", RC_LITERATE_COMMAND },
161 { "\\literate_error_filter", RC_LITERATE_ERROR_FILTER },
162 { "\\literate_extension", RC_LITERATE_EXTENSION },
163 { "\\num_lastfiles", RC_NUMLASTFILES },
164 { "\\personal_dictionary", RC_PERS_DICT },
165 { "\\phone_book", RC_PHONEBOOK },
166 { "\\print_adapt_output", RC_PRINT_ADAPTOUTPUT },
167 { "\\print_collcopies_flag", RC_PRINTCOLLCOPIESFLAG },
168 { "\\print_command", RC_PRINT_COMMAND },
169 { "\\print_copies_flag", RC_PRINTCOPIESFLAG },
170 { "\\print_evenpage_flag", RC_PRINTEVENPAGEFLAG },
171 { "\\print_extra_options", RC_PRINTEXSTRAOPTIONS },
172 { "\\print_file_extension", RC_PRINTFILEEXTENSION },
173 { "\\print_landscape_flag", RC_PRINTLANDSCAPEFLAG },
174 { "\\print_oddpage_flag", RC_PRINTODDPAGEFLAG },
175 { "\\print_pagerange_flag", RC_PRINTPAGERANGEFLAG },
176 { "\\print_paper_dimension_flag", RC_PRINTPAPERDIMENSIONFLAG },
177 { "\\print_paper_flag", RC_PRINTPAPERFLAG },
178 { "\\print_reverse_flag", RC_PRINTREVERSEFLAG },
179 { "\\print_spool_command", RC_PRINTSPOOL_COMMAND },
180 { "\\print_spool_printerprefix", RC_PRINTSPOOL_PRINTERPREFIX },
181 { "\\print_to_file", RC_PRINTTOFILE },
182 { "\\print_to_printer", RC_PRINTTOPRINTER },
183 { "\\printer", RC_PRINTER },
184 { "\\ps_command", RC_PS_COMMAND },
185 { "\\relyx_command", RC_RELYX_COMMAND },
186 { "\\screen_dpi", RC_SCREEN_DPI },
187 { "\\screen_font_encoding", RC_SCREEN_FONT_ENCODING },
188 { "\\screen_font_menu", RC_SCREEN_FONT_MENU },
189 { "\\screen_font_popup", RC_SCREEN_FONT_POPUP },
190 { "\\screen_font_roman", RC_SCREEN_FONT_ROMAN },
191 { "\\screen_font_sans", RC_SCREEN_FONT_SANS },
192 { "\\screen_font_scalable", RC_SCREEN_FONT_SCALABLE },
193 { "\\screen_font_sizes", RC_SCREEN_FONT_SIZES },
194 { "\\screen_font_typewriter", RC_SCREEN_FONT_TYPEWRITER },
195 { "\\screen_zoom", RC_SCREEN_ZOOM },
196 { "\\selection_color", RC_SELECTION_COLOR },
197 { "\\serverpipe", RC_SERVERPIPE },
198 { "\\sgml_extra_options", RC_SGML_EXTRA_OPTIONS },
199 { "\\spell_command", RC_SPELL_COMMAND },
200 { "\\tempdir_path", RC_TEMPDIRPATH },
201 { "\\template_path", RC_TEMPLATEPATH },
202 { "\\tth_command", RC_TTH_COMMAND },
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 tth_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();
306 int LyXRC::ReadBindFile(string name)
309 string tmp = i18nLibFileSearch("bind",name,"bind");
310 lyxerr[Debug::LYXRC] << "Reading bindfile:" << tmp << endl;
311 int result = Read(tmp);
313 lyxerr << "Error reading bind file: " << tmp << endl;
318 int LyXRC::Read(string const &filename)
321 string bindFile = "cua";
323 LyXLex lexrc(lyxrcTags, lyxrcCount);
324 if (lyxerr.debugging(Debug::PARSER))
327 lexrc.setFile(filename);
328 if (!lexrc.IsOK()) return -2;
330 lyxerr[Debug::INIT] << "Reading '" << filename << "'..." << endl;
332 while (lexrc.IsOK()) {
334 switch(lexrc.lex()) {
335 case LyXLex::LEX_FEOF:
337 case RC_INPUT: // Include file
339 string tmp = LibFileSearch(string(),
342 lexrc.printError("Error reading "
343 "included file: "+tmp);
347 case RC_BINDFILE: // RVDK_PATCH_5
349 ReadBindFile(lexrc.GetString());
352 case RC_BEGINTOOLBAR:
353 // this toolbar should be changed to be a completely
354 // non gui toolbar. (Lgb)
360 use_kbmap = lexrc.GetBool();
363 case RC_EXIT_CONFIRMATION:
365 exit_confirmation = lexrc.GetBool();
368 case RC_DISPLAY_SHORTCUTS:
370 display_shortcuts = lexrc.GetBool();
373 case RC_KBMAP_PRIMARY:
375 primary_kbmap = lexrc.GetString();
378 case RC_KBMAP_SECONDARY:
380 secondary_kbmap = lexrc.GetString();
383 case RC_FONT_ENCODING:
385 fontenc = lexrc.GetString();
390 printer = lexrc.GetString();
393 case RC_PRINT_COMMAND:
395 print_command = lexrc.GetString();
398 case RC_PRINTEVENPAGEFLAG:
400 print_evenpage_flag = lexrc.GetString();
403 case RC_PRINTODDPAGEFLAG:
405 print_oddpage_flag = lexrc.GetString();
408 case RC_PRINTPAGERANGEFLAG:
410 print_pagerange_flag = lexrc.GetString();
413 case RC_PRINTCOPIESFLAG:
415 print_copies_flag = lexrc.GetString();
418 case RC_PRINTCOLLCOPIESFLAG:
420 print_collcopies_flag = lexrc.GetString();
423 case RC_PRINTREVERSEFLAG:
425 print_reverse_flag = lexrc.GetString();
428 case RC_PRINTLANDSCAPEFLAG:
430 print_landscape_flag = lexrc.GetString();
433 case RC_PRINTTOPRINTER:
435 print_to_printer = lexrc.GetString();
438 case RC_PRINT_ADAPTOUTPUT:
440 print_adapt_output = lexrc.GetBool();
445 print_to_file = lexrc.GetString();
448 case RC_PRINTFILEEXTENSION:
450 print_file_extension = lexrc.GetString();
453 case RC_PRINTEXSTRAOPTIONS:
455 print_extra_options = lexrc.GetString();
458 case RC_PRINTSPOOL_COMMAND:
460 print_spool_command = lexrc.GetString();
463 case RC_PRINTSPOOL_PRINTERPREFIX:
465 print_spool_printerprefix = lexrc.GetString();
468 case RC_PRINTPAPERDIMENSIONFLAG:
470 print_paper_dimension_flag = lexrc.GetString();
473 case RC_PRINTPAPERFLAG:
475 print_paper_flag = lexrc.GetString();
478 case RC_CUSTOM_EXPORT_COMMAND:
480 custom_export_command = lexrc.GetString();
483 case RC_CUSTOM_EXPORT_FORMAT:
485 custom_export_format = lexrc.GetString();
488 case RC_LATEX_COMMAND:
490 latex_command = lexrc.GetString();
493 case RC_LITERATE_COMMAND:
495 literate_command = lexrc.GetString();
498 case RC_LITERATE_EXTENSION:
500 literate_extension = lexrc.GetString();
503 case RC_LITERATE_ERROR_FILTER:
505 literate_error_filter = lexrc.GetString();
508 case RC_BUILD_COMMAND:
510 build_command = lexrc.GetString();
513 case RC_BUILD_ERROR_FILTER:
515 build_error_filter = lexrc.GetString();
518 case RC_RELYX_COMMAND:
520 relyx_command = lexrc.GetString();
523 case RC_DEFAULT_PAPERSIZE:
525 string size = lowercase(lexrc.GetString());
526 if (size == "usletter")
527 default_papersize = PAPER_USLETTER;
528 else if (size == "legal")
529 default_papersize = PAPER_LEGALPAPER;
530 else if (size == "executive")
531 default_papersize = PAPER_EXECUTIVEPAPER;
532 else if (size == "a3")
533 default_papersize = PAPER_A3PAPER;
534 else if (size == "a4")
535 default_papersize = PAPER_A4PAPER;
536 else if (size == "a5")
537 default_papersize = PAPER_A5PAPER;
538 else if (size == "b5")
539 default_papersize = PAPER_B5PAPER;
542 case RC_VIEWDVI_COMMAND:
544 view_dvi_command = lexrc.GetString();
549 ps_command = lexrc.GetString();
552 case RC_VIEWPS_COMMAND:
554 view_ps_command = lexrc.GetString();
557 case RC_VIEWPSPIC_COMMAND:
559 view_pspic_command = lexrc.GetString();
562 case RC_CHKTEX_COMMAND:
564 chktex_command = lexrc.GetString();
569 tth_command = lexrc.GetString();
574 dpi = lexrc.GetInteger();
579 zoom = lexrc.GetInteger();
582 case RC_SCREEN_FONT_SIZES:
584 font_sizes[LyXFont::SIZE_TINY] =
587 font_sizes[LyXFont::SIZE_SCRIPT] =
590 font_sizes[LyXFont::SIZE_FOOTNOTE] =
593 font_sizes[LyXFont::SIZE_SMALL] =
596 font_sizes[LyXFont::SIZE_NORMAL] =
599 font_sizes[LyXFont::SIZE_LARGE] =
602 font_sizes[LyXFont::SIZE_LARGER] =
605 font_sizes[LyXFont::SIZE_LARGEST] =
608 font_sizes[LyXFont::SIZE_HUGE] =
611 font_sizes[LyXFont::SIZE_HUGER] =
615 case RC_SCREEN_FONT_SCALABLE:
617 use_scalable_fonts = lexrc.GetBool();
622 autosave = lexrc.GetInteger();
625 case RC_SGML_EXTRA_OPTIONS:
627 sgml_extra_options = lexrc.GetString();
630 case RC_DOCUMENTPATH:
632 document_path = ExpandPath(lexrc.GetString());
636 case RC_TEMPLATEPATH:
638 template_path = ExpandPath(lexrc.GetString());
643 tempdir_path = ExpandPath(lexrc.GetString());
648 use_tempdir = lexrc.GetBool();
653 lastfiles = ExpandPath(lexrc.GetString());
656 case RC_NUMLASTFILES:
658 num_lastfiles = lexrc.GetInteger();
661 case RC_CHECKLASTFILES:
663 check_lastfiles = lexrc.GetBool();
666 case RC_SCREEN_FONT_ROMAN:
668 roman_font_name = lexrc.GetString();
671 case RC_SCREEN_FONT_SANS:
673 sans_font_name = lexrc.GetString();
676 case RC_SCREEN_FONT_TYPEWRITER:
678 typewriter_font_name = lexrc.GetString();
681 case RC_SCREEN_FONT_MENU:
683 menu_font_name = lexrc.GetString();
686 case RC_SCREEN_FONT_POPUP:
688 popup_font_name = lexrc.GetString();
691 case RC_SCREEN_FONT_ENCODING:
693 font_norm = lexrc.GetString();
696 case RC_AUTOREGIONDELETE:
697 // Auto region delete defaults to true
699 auto_region_delete = lexrc.GetBool();
704 // we should not do an explicit binding before
705 // loading a bind file. So, in this case, load
706 // the default bind file.
710 // !!!chb, dynamic key binding...
714 if (lexrc.lex()==LyXLex::LEX_DATA) {
715 seq = lexrc.GetString();
717 lexrc.printError("Bad key sequence: `$$Token'");
721 if (lexrc.lex()==LyXLex::LEX_DATA) {
722 cmd = lexrc.GetString();
724 lexrc.printError("Bad command: `$$Token'");
728 if ((action = lyxaction.LookupFunc(cmd.c_str()))>=0) {
729 if (lyxerr.debugging(Debug::KEY)) {
730 lyxerr << "RC_BIND: Sequence `"
731 << seq << "' Command `"
732 << cmd << "' Action `"
733 << action << '\'' << endl;
735 res = bindKey(seq.c_str(), action);
738 "Invalid key sequence `"
741 } else {// cmd is the last token read.
743 "Unknown LyX function `$$Token'");
749 lyxpipes = ExpandPath(lexrc.GetString());
752 case RC_CURSOR_FOLLOWS_SCROLLBAR:
754 cursor_follows_scrollbar = lexrc.GetBool();
756 case RC_FAST_SELECTION:
758 fast_selection = lexrc.GetBool();
760 case RC_BACKGROUND_COLOR:
762 background_color = lexrc.GetString();
764 case RC_SELECTION_COLOR:
766 strncpy(selection_color,
767 lexrc.GetString().c_str(),31);
771 fax_command = lexrc.GetString();
775 fax_program = lexrc.GetString();
779 string s = lexrc.GetString();
783 phone_book = user_lyxdir + s;
786 case RC_ASCIIROFF_COMMAND:
788 ascii_roff_command = lexrc.GetString();
790 case RC_ASCII_LINELEN:
792 ascii_linelen = lexrc.GetInteger();
794 // Spellchecker settings:
795 case RC_SPELL_COMMAND:
797 isp_command = lexrc.GetString();
799 case RC_ACCEPT_COMPOUND:
801 isp_accept_compound = lexrc.GetBool();
805 isp_use_input_encoding = lexrc.GetBool();
807 case RC_USE_ALT_LANG:
809 isp_use_alt_lang = lexrc.GetBool();
811 case RC_USE_PERS_DICT:
813 isp_use_pers_dict = lexrc.GetBool();
815 case RC_USE_ESC_CHARS:
817 isp_use_esc_chars = lexrc.GetBool();
821 isp_alt_lang = lexrc.GetString();
825 isp_pers_dict = lexrc.GetString();
829 isp_esc_chars = lexrc.GetString();
833 lexrc.printError("Unknown tag `$$Token'");
844 lyxerr << "The current internal LyXRC:" << endl;
848 /// define the default key bindings for LyX.
849 void LyXRC::defaultKeyBindings()
851 bindKey("Right", LFUN_RIGHT);
852 bindKey("Left", LFUN_LEFT);
853 bindKey("Up", LFUN_UP);
854 bindKey("Down", LFUN_DOWN);
856 bindKey("Tab", LFUN_TAB);
858 bindKey("Home", LFUN_HOME);
859 bindKey("End", LFUN_END);
860 bindKey("Prior", LFUN_PRIOR);
861 bindKey("Next", LFUN_NEXT);
863 bindKey("Return", LFUN_BREAKPARAGRAPH);
864 bindKey("~C-~S-~M-nobreakspace", LFUN_PROTECTEDSPACE);
866 bindKey("Delete", LFUN_DELETE);
867 bindKey("BackSpace", LFUN_BACKSPACE);
868 // bindKeyings for transparent handling of deadkeys
869 // The keysyms are gotten from XFree86 X11R6
870 bindKey("~C-~S-~M-dead_acute", LFUN_ACUTE);
871 bindKey("~C-~S-~M-dead_breve", LFUN_BREVE);
872 bindKey("~C-~S-~M-dead_caron", LFUN_CARON);
873 bindKey("~C-~S-~M-dead_cedilla", LFUN_CEDILLA);
874 bindKey("~C-~S-~M-dead_abovering", LFUN_CIRCLE);
875 bindKey("~C-~S-~M-dead_circumflex", LFUN_CIRCUMFLEX);
876 bindKey("~C-~S-~M-dead_abovedot", LFUN_DOT);
877 bindKey("~C-~S-~M-dead_grave", LFUN_GRAVE);
878 bindKey("~C-~S-~M-dead_doubleacute", LFUN_HUNG_UMLAUT);
879 bindKey("~C-~S-~M-dead_macron", LFUN_MACRON);
880 // nothing with this name
881 // bindKey("~C-~S-~M-dead_special_caron", LFUN_SPECIAL_CARON);
882 bindKey("~C-~S-~M-dead_tilde", LFUN_TILDE);
883 bindKey("~C-~S-~M-dead_diaeresis", LFUN_UMLAUT);
884 // nothing with this name either...
885 //bindKey("~C-~S-~M-dead_underbar", LFUN_UNDERBAR);
886 bindKey("~C-~S-~M-dead_belowdot", LFUN_UNDERDOT);
887 bindKey("~C-~S-~M-dead_tie", LFUN_TIE);
888 bindKey("~C-~S-~M-dead_ogonek", LFUN_OGONEK);
890 // bindings to utilize the use of the numeric keypad
892 bindKey("KP_0", LFUN_SELFINSERT);
893 bindKey("KP_Decimal", LFUN_SELFINSERT);
894 bindKey("KP_Enter", LFUN_SELFINSERT);
895 bindKey("KP_1", LFUN_SELFINSERT);
896 bindKey("KP_2", LFUN_SELFINSERT);
897 bindKey("KP_3", LFUN_SELFINSERT);
898 bindKey("KP_4", LFUN_SELFINSERT);
899 bindKey("KP_5", LFUN_SELFINSERT);
900 bindKey("KP_6", LFUN_SELFINSERT);
901 bindKey("KP_Add", LFUN_SELFINSERT);
902 bindKey("KP_7", LFUN_SELFINSERT);
903 bindKey("KP_8", LFUN_SELFINSERT);
904 bindKey("KP_9", LFUN_SELFINSERT);
905 bindKey("KP_Divide", LFUN_SELFINSERT);
906 bindKey("KP_Multiply", LFUN_SELFINSERT);
907 bindKey("KP_Subtract", LFUN_SELFINSERT);
909 /* Most self-insert keys are handled in the 'default:' section of
910 * WorkAreaKeyPress - so we don't have to define them all.
911 * However keys explicit decleared as self-insert are
912 * handled seperatly (LFUN_SELFINSERT.) Lgb. */
914 bindKey("C-Tab", LFUN_TABINSERT); // ale970515