1 /* This file is part of
2 * ======================================================
4 * LyX, The Document Processor
6 * Copyright (C) 1995 Matthias Ettrich
7 * Copyright (C) 1995-1998 The LyX Team.
9 * ====================================================== */
14 #pragma implementation "lyxrc.h"
20 #include "LyXAction.h"
21 #include "lyxserver.h"
24 #include "tex-strings.h"
25 #include "pathstack.h"
26 #include "filetools.h"
29 // $Id: lyxrc.C,v 1.1 1999/09/27 18:44:38 larsbj Exp $
31 #if !defined(lint) && !defined(WITH_WARNINGS)
32 static char vcid[] = "$Id: lyxrc.C,v 1.1 1999/09/27 18:44:38 larsbj Exp $";
35 // this is crappy... why are those colors command line arguments and
36 // not in lyxrc?? (Matthias)
37 // Because nobody put them there. (Asger)
38 extern int fast_selection;
39 extern LString background_color;
40 extern char selection_color[];
41 extern bool cursor_follows_scrollbar;
42 extern kb_keymap *toplevel_keymap;
43 extern LyXAction lyxaction;
52 RC_PRINTPAGERANGEFLAG,
54 RC_PRINTCOLLCOPIESFLAG,
56 RC_PRINTLANDSCAPEFLAG,
60 RC_PRINTFILEEXTENSION,
61 RC_PRINTEXSTRAOPTIONS,
62 RC_PRINTSPOOL_COMMAND,
63 RC_PRINTSPOOL_PRINTERPREFIX,
65 RC_PRINTPAPERDIMENSIONFLAG,
66 RC_CUSTOM_EXPORT_COMMAND,
67 RC_CUSTOM_EXPORT_FORMAT,
70 RC_LITERATE_EXTENSION,
71 RC_LITERATE_ERROR_FILTER,
73 RC_BUILD_ERROR_FILTER,
79 RC_SCREEN_FONT_TYPEWRITER,
82 RC_SCREEN_FONT_ENCODING,
84 RC_SGML_EXTRA_OPTIONS,
93 RC_NOMENUACCELERATORS,
105 RC_ASCIIROFF_COMMAND,
110 RC_DEFAULT_PAPERSIZE,
113 RC_VIEWPSPIC_COMMAND,
120 RC_SCREEN_FONT_SCALABLE,
125 RC_CURSOR_FOLLOWS_SCROLLBAR,
126 RC_EXIT_CONFIRMATION,
127 RC_DISPLAY_SHORTCUTS,
132 static keyword_item lyxrcTags[] = {
133 { "\\accept_compound", RC_ACCEPT_COMPOUND },
134 { "\\alternate_language", RC_ALT_LANG },
135 { "\\ascii_linelen", RC_ASCII_LINELEN },
136 { "\\ascii_roff_command", RC_ASCIIROFF_COMMAND },
137 { "\\auto_region_delete", RC_AUTOREGIONDELETE },
138 { "\\autosave", RC_AUTOSAVE },
139 { "\\background_color", RC_BACKGROUND_COLOR },
140 { "\\begin_toolbar", RC_BEGINTOOLBAR },
141 { "\\bind", RC_BIND },
142 { "\\bind_file", RC_BINDFILE },
143 { "\\build_command", RC_BUILD_COMMAND },
144 { "\\build_error_filter", RC_BUILD_ERROR_FILTER },
145 { "\\check_lastfiles", RC_CHECKLASTFILES },
146 { "\\chktex_command", RC_CHKTEX_COMMAND },
147 { "\\cursor_follows_scrollbar", RC_CURSOR_FOLLOWS_SCROLLBAR },
148 { "\\custom_export_command", RC_CUSTOM_EXPORT_COMMAND },
149 { "\\custom_export_format", RC_CUSTOM_EXPORT_FORMAT },
150 { "\\default_papersize", RC_DEFAULT_PAPERSIZE },
151 { "\\display_shortcuts", RC_DISPLAY_SHORTCUTS },
152 { "\\document_path", RC_DOCUMENTPATH },
153 { "\\escape_chars", RC_ESC_CHARS },
154 { "\\exit_confirmation", RC_EXIT_CONFIRMATION },
155 { "\\fast_selection", RC_FAST_SELECTION },
156 { "\\fax_command", RC_FAX_COMMAND },
157 { "\\fax_program", RC_FAXPROGRAM },
158 { "\\font_encoding", RC_FONT_ENCODING },
159 { "\\input", RC_INPUT },
160 { "\\kbmap", RC_KBMAP },
161 { "\\kbmap_primary", RC_KBMAP_PRIMARY },
162 { "\\kbmap_secondary", RC_KBMAP_SECONDARY },
163 { "\\lastfiles", RC_LASTFILES },
164 { "\\latex_command", RC_LATEX_COMMAND },
165 { "\\literate_command", RC_LITERATE_COMMAND },
166 { "\\literate_error_filter", RC_LITERATE_ERROR_FILTER },
167 { "\\literate_extension", RC_LITERATE_EXTENSION },
168 { "\\num_lastfiles", RC_NUMLASTFILES },
169 { "\\personal_dictionary", RC_PERS_DICT },
170 { "\\phone_book", RC_PHONEBOOK },
171 { "\\print_adapt_output", RC_PRINT_ADAPTOUTPUT },
172 { "\\print_collcopies_flag", RC_PRINTCOLLCOPIESFLAG },
173 { "\\print_command", RC_PRINT_COMMAND },
174 { "\\print_copies_flag", RC_PRINTCOPIESFLAG },
175 { "\\print_evenpage_flag", RC_PRINTEVENPAGEFLAG },
176 { "\\print_extra_options", RC_PRINTEXSTRAOPTIONS },
177 { "\\print_file_extension", RC_PRINTFILEEXTENSION },
178 { "\\print_landscape_flag", RC_PRINTLANDSCAPEFLAG },
179 { "\\print_oddpage_flag", RC_PRINTODDPAGEFLAG },
180 { "\\print_pagerange_flag", RC_PRINTPAGERANGEFLAG },
181 { "\\print_paper_dimension_flag", RC_PRINTPAPERDIMENSIONFLAG },
182 { "\\print_paper_flag", RC_PRINTPAPERFLAG },
183 { "\\print_reverse_flag", RC_PRINTREVERSEFLAG },
184 { "\\print_spool_command", RC_PRINTSPOOL_COMMAND },
185 { "\\print_spool_printerprefix", RC_PRINTSPOOL_PRINTERPREFIX },
186 { "\\print_to_file", RC_PRINTTOFILE },
187 { "\\print_to_printer", RC_PRINTTOPRINTER },
188 { "\\printer", RC_PRINTER },
189 { "\\ps_command", RC_PS_COMMAND },
190 { "\\relyx_command", RC_RELYX_COMMAND },
191 { "\\screen_dpi", RC_SCREEN_DPI },
192 { "\\screen_font_encoding", RC_SCREEN_FONT_ENCODING },
193 { "\\screen_font_menu", RC_SCREEN_FONT_MENU },
194 { "\\screen_font_popup", RC_SCREEN_FONT_POPUP },
195 { "\\screen_font_roman", RC_SCREEN_FONT_ROMAN },
196 { "\\screen_font_sans", RC_SCREEN_FONT_SANS },
197 { "\\screen_font_scalable", RC_SCREEN_FONT_SCALABLE },
198 { "\\screen_font_sizes", RC_SCREEN_FONT_SIZES },
199 { "\\screen_font_typewriter", RC_SCREEN_FONT_TYPEWRITER },
200 { "\\screen_zoom", RC_SCREEN_ZOOM },
201 { "\\selection_color", RC_SELECTION_COLOR },
202 { "\\serverpipe", RC_SERVERPIPE },
203 { "\\sgml_extra_options", RC_SGML_EXTRA_OPTIONS },
204 { "\\spell_command", RC_SPELL_COMMAND },
205 { "\\tempdir_path", RC_TEMPDIRPATH },
206 { "\\template_path", RC_TEMPLATEPATH },
207 { "\\use_alt_language", RC_USE_ALT_LANG },
208 { "\\use_escape_chars", RC_USE_ESC_CHARS },
209 { "\\use_input_encoding", RC_USE_INP_ENC },
210 { "\\use_personal_dictionary", RC_USE_PERS_DICT },
211 { "\\use_tempdir", RC_USETEMPDIR },
212 { "\\view_dvi_command", RC_VIEWDVI_COMMAND },
213 { "\\view_ps_command", RC_VIEWPS_COMMAND },
214 { "\\view_pspic_command", RC_VIEWPSPIC_COMMAND }
217 /* Let the range depend of the size of lyxrcTags. Alejandro 240596 */
218 static const int lyxrcCount = sizeof(lyxrcTags) / sizeof(keyword_item);
220 // Should this be moved inside LyXAction?
222 int bindKey(char const* seq, int action)
224 return toplevel_keymap->bind(seq, action);
230 // Get printer from the environment. If fail, use default "",
231 // assuming that everything is set up correctly.
232 printer = getenv("PRINTER");
233 print_command = "dvips";
234 print_evenpage_flag = "-B";
235 print_oddpage_flag = "-A";
236 print_pagerange_flag = "-pp";
237 print_copies_flag = "-c";
238 print_collcopies_flag = "-C";
239 print_reverse_flag = "-r";
240 print_landscape_flag = "-t landscape";
241 print_to_printer = "-P";
242 print_to_file = "-o ";
243 print_file_extension = ".ps";
244 print_paper_flag = "-t";
245 print_paper_dimension_flag = "-T";
246 document_path = getEnvPath("HOME");
247 tempdir_path = "/tmp";
249 latex_command = "latex";
250 literate_command = "none";
251 literate_extension = "none";
252 literate_error_filter = "cat";
253 build_command = "make";
254 build_error_filter = "cat";
255 relyx_command = "reLyX";
257 view_ps_command = "ghostview -swap";
258 view_pspic_command = "ghostview";
259 view_dvi_command = "xdvi";
260 default_papersize = PAPER_USLETTER;
261 custom_export_format = "ps";
262 chktex_command = "chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38";
265 // Because a screen typically is wider than a piece of paper:
267 // Default LaTeX font size:
268 font_sizes[LyXFont::SIZE_TINY] = 5.0;
269 font_sizes[LyXFont::SIZE_SCRIPT] = 7.0;
270 font_sizes[LyXFont::SIZE_FOOTNOTE] = 8.0;
271 font_sizes[LyXFont::SIZE_SMALL] = 9.0;
272 font_sizes[LyXFont::SIZE_NORMAL] = 10.0;
273 font_sizes[LyXFont::SIZE_LARGE] = 12.0;
274 font_sizes[LyXFont::SIZE_LARGER] = 14.4;
275 font_sizes[LyXFont::SIZE_LARGEST] = 17.26;
276 font_sizes[LyXFont::SIZE_HUGE] = 20.74;
277 font_sizes[LyXFont::SIZE_HUGER] = 24.88;
278 use_scalable_fonts = true;
279 roman_font_name = "-*-times";
280 sans_font_name = "-*-helvetica";
281 typewriter_font_name = "-*-courier";
282 menu_font_name = "-*-helvetica-bold-r";
283 popup_font_name = "-*-helvetica-medium-r";
284 font_norm = "iso8859-1";
286 auto_region_delete = true;
289 check_lastfiles = true;
290 exit_confirmation = true;
291 display_shortcuts = true;
292 // Spellchecker settings:
293 isp_command = "ispell";
294 isp_accept_compound = false;
295 isp_use_input_encoding = false;
296 isp_use_alt_lang = false;
297 isp_use_pers_dict = false;
298 isp_use_esc_chars = false;
301 defaultKeyBindings();
309 int LyXRC::ReadBindFile(LString name)
312 LString tmp = i18nLibFileSearch("bind",name,"bind");
313 lyxerr.debug("Reading bindfile:" + tmp, Error::LYXRC);
314 int result = Read(tmp);
316 lyxerr.print("Error reading bind file: " + tmp);
321 int LyXRC::Read(LString const &filename)
324 LString bindFile = "cua";
326 LyXLex lexrc(lyxrcTags, lyxrcCount);
327 if (lyxerr.debugging(Error::LEX_PARSER))
330 lexrc.setFile(filename);
331 if (!lexrc.IsOK()) return -2;
333 lyxerr.debug("Reading '" + filename + "'...", Error::INIT);
335 while (lexrc.IsOK()) {
337 switch(lexrc.lex()) {
338 case LyXLex::LEX_FEOF:
340 case RC_INPUT: // Include file
342 LString tmp = LibFileSearch(LString(),
345 lexrc.printError("Error reading "
346 "included file: "+tmp);
350 case RC_BINDFILE: // RVDK_PATCH_5
352 ReadBindFile(lexrc.GetString());
355 case RC_BEGINTOOLBAR:
356 // this toolbar should be changed to be a completely
357 // non gui toolbar. (Lgb)
363 use_kbmap = lexrc.GetBool();
366 case RC_EXIT_CONFIRMATION:
368 exit_confirmation = lexrc.GetBool();
371 case RC_DISPLAY_SHORTCUTS:
373 display_shortcuts = lexrc.GetBool();
376 case RC_KBMAP_PRIMARY:
378 primary_kbmap = lexrc.GetString();
381 case RC_KBMAP_SECONDARY:
383 secondary_kbmap = lexrc.GetString();
386 case RC_FONT_ENCODING:
388 fontenc = lexrc.GetString();
393 printer = lexrc.GetString();
396 case RC_PRINT_COMMAND:
398 print_command = lexrc.GetString();
401 case RC_PRINTEVENPAGEFLAG:
403 print_evenpage_flag = lexrc.GetString();
406 case RC_PRINTODDPAGEFLAG:
408 print_oddpage_flag = lexrc.GetString();
411 case RC_PRINTPAGERANGEFLAG:
413 print_pagerange_flag = lexrc.GetString();
416 case RC_PRINTCOPIESFLAG:
418 print_copies_flag = lexrc.GetString();
421 case RC_PRINTCOLLCOPIESFLAG:
423 print_collcopies_flag = lexrc.GetString();
426 case RC_PRINTREVERSEFLAG:
428 print_reverse_flag = lexrc.GetString();
431 case RC_PRINTLANDSCAPEFLAG:
433 print_landscape_flag = lexrc.GetString();
436 case RC_PRINTTOPRINTER:
438 print_to_printer = lexrc.GetString();
441 case RC_PRINT_ADAPTOUTPUT:
443 print_adapt_output = lexrc.GetBool();
448 print_to_file = lexrc.GetString();
451 case RC_PRINTFILEEXTENSION:
453 print_file_extension = lexrc.GetString();
456 case RC_PRINTEXSTRAOPTIONS:
458 print_extra_options = lexrc.GetString();
461 case RC_PRINTSPOOL_COMMAND:
463 print_spool_command = lexrc.GetString();
466 case RC_PRINTSPOOL_PRINTERPREFIX:
468 print_spool_printerprefix = lexrc.GetString();
471 case RC_PRINTPAPERDIMENSIONFLAG:
473 print_paper_dimension_flag = lexrc.GetString();
476 case RC_PRINTPAPERFLAG:
478 print_paper_flag = lexrc.GetString();
481 case RC_CUSTOM_EXPORT_COMMAND:
483 custom_export_command = lexrc.GetString();
486 case RC_CUSTOM_EXPORT_FORMAT:
488 custom_export_format = lexrc.GetString();
491 case RC_LATEX_COMMAND:
493 latex_command = lexrc.GetString();
496 case RC_LITERATE_COMMAND:
498 literate_command = lexrc.GetString();
501 case RC_LITERATE_EXTENSION:
503 literate_extension = lexrc.GetString();
506 case RC_LITERATE_ERROR_FILTER:
508 literate_error_filter = lexrc.GetString();
511 case RC_BUILD_COMMAND:
513 build_command = lexrc.GetString();
516 case RC_BUILD_ERROR_FILTER:
518 build_error_filter = lexrc.GetString();
521 case RC_RELYX_COMMAND:
523 relyx_command = lexrc.GetString();
526 case RC_DEFAULT_PAPERSIZE:
528 LString size = lexrc.GetString();
530 if (size == "usletter")
531 default_papersize = PAPER_USLETTER;
532 else if (size == "legal")
533 default_papersize = PAPER_LEGALPAPER;
534 else if (size == "executive")
535 default_papersize = PAPER_EXECUTIVEPAPER;
536 else if (size == "a3")
537 default_papersize = PAPER_A3PAPER;
538 else if (size == "a4")
539 default_papersize = PAPER_A4PAPER;
540 else if (size == "a5")
541 default_papersize = PAPER_A5PAPER;
542 else if (size == "b5")
543 default_papersize = PAPER_B5PAPER;
546 case RC_VIEWDVI_COMMAND:
548 view_dvi_command = lexrc.GetString();
553 ps_command = lexrc.GetString();
556 case RC_VIEWPS_COMMAND:
558 view_ps_command = lexrc.GetString();
561 case RC_VIEWPSPIC_COMMAND:
563 view_pspic_command = lexrc.GetString();
566 case RC_CHKTEX_COMMAND:
568 chktex_command = lexrc.GetString();
573 dpi = lexrc.GetInteger();
578 zoom = lexrc.GetInteger();
581 case RC_SCREEN_FONT_SIZES:
583 font_sizes[LyXFont::SIZE_TINY] =
586 font_sizes[LyXFont::SIZE_SCRIPT] =
589 font_sizes[LyXFont::SIZE_FOOTNOTE] =
592 font_sizes[LyXFont::SIZE_SMALL] =
595 font_sizes[LyXFont::SIZE_NORMAL] =
598 font_sizes[LyXFont::SIZE_LARGE] =
601 font_sizes[LyXFont::SIZE_LARGER] =
604 font_sizes[LyXFont::SIZE_LARGEST] =
607 font_sizes[LyXFont::SIZE_HUGE] =
610 font_sizes[LyXFont::SIZE_HUGER] =
614 case RC_SCREEN_FONT_SCALABLE:
616 use_scalable_fonts = lexrc.GetBool();
621 autosave = lexrc.GetInteger();
624 case RC_SGML_EXTRA_OPTIONS:
626 sgml_extra_options = lexrc.GetString();
629 case RC_DOCUMENTPATH:
631 document_path = ExpandPath(lexrc.GetString());
635 case RC_TEMPLATEPATH:
637 template_path = ExpandPath(lexrc.GetString());
642 tempdir_path = ExpandPath(lexrc.GetString());
647 use_tempdir = lexrc.GetBool();
652 lastfiles = ExpandPath(lexrc.GetString());
655 case RC_NUMLASTFILES:
657 num_lastfiles = lexrc.GetInteger();
660 case RC_CHECKLASTFILES:
662 check_lastfiles = lexrc.GetBool();
665 case RC_SCREEN_FONT_ROMAN:
667 roman_font_name = lexrc.GetString();
670 case RC_SCREEN_FONT_SANS:
672 sans_font_name = lexrc.GetString();
675 case RC_SCREEN_FONT_TYPEWRITER:
677 typewriter_font_name = lexrc.GetString();
680 case RC_SCREEN_FONT_MENU:
682 menu_font_name = lexrc.GetString();
685 case RC_SCREEN_FONT_POPUP:
687 popup_font_name = lexrc.GetString();
690 case RC_SCREEN_FONT_ENCODING:
692 font_norm = lexrc.GetString();
695 case RC_AUTOREGIONDELETE:
696 // Auto region delete defaults to true
698 auto_region_delete = lexrc.GetBool();
703 // we should not do an explicit binding before
704 // loading a bind file. So, in this case, load
705 // the default bind file.
709 // !!!chb, dynamic key binding...
713 if (lexrc.lex()==LyXLex::LEX_DATA) {
714 seq = lexrc.GetString();
716 lexrc.printError("Bad key sequence: `$$Token'");
720 if (lexrc.lex()==LyXLex::LEX_DATA) {
721 cmd = lexrc.GetString();
723 lexrc.printError("Bad command: `$$Token'");
727 if ((action = lyxaction.LookupFunc(cmd.c_str()))>=0) {
728 if (lyxerr.debugging(Error::KEY)) {
729 lyxerr.print("RC_BIND: Sequence `"
730 + seq + "' Command `"
732 + (int) action + '\'');
734 res = bindKey(seq.c_str(), action);
737 "Invalid key sequence `"
740 } else {// cmd is the last token read.
742 "Unknown LyX function `$$Token'");
748 lyxpipes = ExpandPath(lexrc.GetString());
751 case RC_CURSOR_FOLLOWS_SCROLLBAR:
753 cursor_follows_scrollbar = lexrc.GetBool();
755 case RC_FAST_SELECTION:
757 fast_selection = lexrc.GetBool();
759 case RC_BACKGROUND_COLOR:
761 background_color = lexrc.GetString();
763 case RC_SELECTION_COLOR:
765 strncpy(selection_color,
766 lexrc.GetString().c_str(),31);
770 fax_command = lexrc.GetString();
774 fax_program = lexrc.GetString();
778 LString s = lexrc.GetString();
782 phone_book = user_lyxdir + s;
785 case RC_ASCIIROFF_COMMAND:
787 ascii_roff_command = lexrc.GetString();
789 case RC_ASCII_LINELEN:
791 ascii_linelen = lexrc.GetInteger();
793 // Spellchecker settings:
794 case RC_SPELL_COMMAND:
796 isp_command = lexrc.GetString();
798 case RC_ACCEPT_COMPOUND:
800 isp_accept_compound = lexrc.GetBool();
804 isp_use_input_encoding = lexrc.GetBool();
806 case RC_USE_ALT_LANG:
808 isp_use_alt_lang = lexrc.GetBool();
810 case RC_USE_PERS_DICT:
812 isp_use_pers_dict = lexrc.GetBool();
814 case RC_USE_ESC_CHARS:
816 isp_use_esc_chars = lexrc.GetBool();
820 isp_alt_lang = lexrc.GetString();
824 isp_pers_dict = lexrc.GetString();
828 isp_esc_chars = lexrc.GetString();
832 lexrc.printError("Unknown tag `$$Token'");
843 lyxerr.print("The current internal LyXRC:");
847 /// define the default key bindings for LyX.
848 void LyXRC::defaultKeyBindings()
850 bindKey("Right", LFUN_RIGHT);
851 bindKey("Left", LFUN_LEFT);
852 bindKey("Up", LFUN_UP);
853 bindKey("Down", LFUN_DOWN);
855 bindKey("Tab", LFUN_TAB);
857 bindKey("Home", LFUN_HOME);
858 bindKey("End", LFUN_END);
859 bindKey("Prior", LFUN_PRIOR);
860 bindKey("Next", LFUN_NEXT);
862 bindKey("Return", LFUN_BREAKPARAGRAPH);
863 bindKey("~C-~S-~M-nobreakspace", LFUN_PROTECTEDSPACE);
865 bindKey("Delete", LFUN_DELETE);
866 bindKey("BackSpace", LFUN_BACKSPACE);
867 // bindKeyings for transparent handling of deadkeys
868 // The keysyms are gotten from XFree86 X11R6
869 bindKey("~C-~S-~M-dead_acute", LFUN_ACUTE);
870 bindKey("~C-~S-~M-dead_breve", LFUN_BREVE);
871 bindKey("~C-~S-~M-dead_caron", LFUN_CARON);
872 bindKey("~C-~S-~M-dead_cedilla", LFUN_CEDILLA);
873 bindKey("~C-~S-~M-dead_abovering", LFUN_CIRCLE);
874 bindKey("~C-~S-~M-dead_circumflex", LFUN_CIRCUMFLEX);
875 bindKey("~C-~S-~M-dead_abovedot", LFUN_DOT);
876 bindKey("~C-~S-~M-dead_grave", LFUN_GRAVE);
877 bindKey("~C-~S-~M-dead_doubleacute", LFUN_HUNG_UMLAUT);
878 bindKey("~C-~S-~M-dead_macron", LFUN_MACRON);
879 // nothing with this name
880 // bindKey("~C-~S-~M-dead_special_caron", LFUN_SPECIAL_CARON);
881 bindKey("~C-~S-~M-dead_tilde", LFUN_TILDE);
882 bindKey("~C-~S-~M-dead_diaeresis", LFUN_UMLAUT);
883 // nothing with this name either...
884 //bindKey("~C-~S-~M-dead_underbar", LFUN_UNDERBAR);
885 bindKey("~C-~S-~M-dead_belowdot", LFUN_UNDERDOT);
886 bindKey("~C-~S-~M-dead_tie", LFUN_TIE);
887 bindKey("~C-~S-~M-dead_ogonek", LFUN_OGONEK);
889 // bindings to utilize the use of the numeric keypad
891 bindKey("KP_0", LFUN_SELFINSERT);
892 bindKey("KP_Decimal", LFUN_SELFINSERT);
893 bindKey("KP_Enter", LFUN_SELFINSERT);
894 bindKey("KP_1", LFUN_SELFINSERT);
895 bindKey("KP_2", LFUN_SELFINSERT);
896 bindKey("KP_3", LFUN_SELFINSERT);
897 bindKey("KP_4", LFUN_SELFINSERT);
898 bindKey("KP_5", LFUN_SELFINSERT);
899 bindKey("KP_6", LFUN_SELFINSERT);
900 bindKey("KP_Add", LFUN_SELFINSERT);
901 bindKey("KP_7", LFUN_SELFINSERT);
902 bindKey("KP_8", LFUN_SELFINSERT);
903 bindKey("KP_9", LFUN_SELFINSERT);
904 bindKey("KP_Divide", LFUN_SELFINSERT);
905 bindKey("KP_Multiply", LFUN_SELFINSERT);
906 bindKey("KP_Subtract", LFUN_SELFINSERT);
908 /* Most self-insert keys are handled in the 'default:' section of
909 * WorkAreaKeyPress - so we don't have to define them all.
910 * However keys explicit decleared as self-insert are
911 * handled seperatly (LFUN_SELFINSERT.) Lgb. */
913 bindKey("C-Tab", LFUN_TABINSERT); // ale970515