+2001-05-29 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
+
+ * kbsequence.C (parse): de-uglify a bit the parsing code, which
+ relied on 0 terminated strings and other horrors. Bug found due to
+ the new assert in lyxstring!
+
+ * lyx_main.C (defaultKeyBindings): add bindings the cursor-related
+ KP_ keys.
+
2001-05-29 Lars Gullik Bjønnes <larsbj@birdstep.com>
* lyx_main.C (defaultKeyBindings): move self-insert KP_ bindings
if (s[i] && (s[i]) <= ' ') ++i;
if (i >= s.length()) break;
- if (s[i + 1] == '-') { // is implicit that s[i] == true
+ if (i + 1 < s.length() && s[i + 1] == '-') {
switch (s[i]) {
case 's': case 'S':
mod |= ShiftMask;
default:
return i + 1;
}
- } else if (s[i] == '~' && s[i + 1] && s[i + 2] == '-') {
+ } else if (i + 2 < s.length() && s[i] == '~'
+ && s[i + 2] == '-') {
switch (s[i + 1]) {
case 's': case 'S':
nmod |= ShiftMask;
//kbmap->bind("KP_Divide", LFUN_SELFINSERT);
//kbmap->bind("KP_Multiply", LFUN_SELFINSERT);
//kbmap->bind("KP_Subtract", LFUN_SELFINSERT);
+ kbmap->bind("KP_Right", LFUN_RIGHT);
+ kbmap->bind("KP_Left", LFUN_LEFT);
+ kbmap->bind("KP_Up", LFUN_UP);
+ kbmap->bind("KP_Down", LFUN_DOWN);
+ kbmap->bind("KP_Home", LFUN_HOME);
+ kbmap->bind("KP_End", LFUN_END);
+ kbmap->bind("KP_Prior", LFUN_PRIOR);
+ kbmap->bind("KP_Next", LFUN_NEXT);
kbmap->bind("C-Tab", LFUN_TABINSERT); // ale970515
kbmap->bind("S-Tab", LFUN_SHIFT_TAB); // jug20000522