better support for keypad keys

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4592 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2002-07-10 15:03:25 +00:00
parent c3f594ced8
commit 72a19def29
5 changed files with 35 additions and 0 deletions

View File

@ -8,6 +8,7 @@ src/converter.C
src/CutAndPaste.C
src/debug.C
src/exporter.C
src/ext_l10n.h
src/FloatList.C
src/frontends/controllers/biblio.C
src/frontends/controllers/ButtonController.h
@ -160,6 +161,7 @@ src/mathed/formula.C
src/mathed/formulamacro.C
src/mathed/math_cursor.C
src/mathed/math_hullinset.C
src/mathed/math_parboxinset.C
src/mathed/ref_inset.C
src/MenuBackend.C
src/paragraph.C

View File

@ -1,3 +1,9 @@
2002-07-10 Andrew Zabolotny <zap@cobra.ru>
* XMiniBuffer.C (peek_event):
* combox.C (peek_event):
* DropDown.C (peek): support keypad keys
2002-07-09 John Levon <moz@compsoc.man.ac.uk>
* xscreen.C: add const

View File

@ -136,12 +136,21 @@ int DropDown::peek(XEvent * xev)
XLookupString(&xev->xkey, s_r, 10, &keysym_return, 0);
switch (keysym_return) {
case XK_Down:
#ifdef XK_KP_Down
case XK_KP_Down:
#endif
line_down();
return 1;
case XK_Up:
#ifdef XK_KP_Up
case XK_KP_Up:
#endif
line_up();
return 1;
case XK_Return:
#ifdef XK_KP_Enter
case XK_KP_Enter:
#endif
completed();
return 1;
case XK_Escape:

View File

@ -103,6 +103,9 @@ int XMiniBuffer::peek_event(FL_OBJECT * ob, int event,
switch (key) {
case XK_Down:
#ifdef XK_KP_Down
case XK_KP_Down:
#endif
if (hist_iter != history_->end()) {
++hist_iter;
}
@ -114,6 +117,9 @@ int XMiniBuffer::peek_event(FL_OBJECT * ob, int event,
}
return 1;
case XK_Up:
#ifdef XK_KP_Up
case XK_KP_Up:
#endif
if (hist_iter == history_->begin()) {
// no further history
show_information(_("[Beginning of history]"),
@ -188,6 +194,9 @@ int XMiniBuffer::peek_event(FL_OBJECT * ob, int event,
return 1;
case 13:
case XK_Return:
#ifdef XK_KP_Enter
case XK_KP_Enter:
#endif
{
#if 0
// This will go in again in a little while

View File

@ -460,6 +460,9 @@ int Combox::peek_event(FL_FORM * form, void * xev)
XFlush(fl_get_display());
switch (keysym_return) {
case XK_Down:
#ifdef XK_KP_Down
case XK_KP_Down:
#endif
if (fl_get_browser(combo->browser) <
fl_get_browser_maxline(combo->browser))
fl_select_browser_line(combo->browser,
@ -476,6 +479,9 @@ int Combox::peek_event(FL_FORM * form, void * xev)
fl_get_browser(combo->browser));
return 1;
case XK_Up:
#ifdef XK_KP_Up
case XK_KP_Up:
#endif
if (fl_get_browser(combo->browser) > 1)
fl_select_browser_line(combo->browser,
fl_get_browser(combo->browser)-1);
@ -491,6 +497,9 @@ int Combox::peek_event(FL_FORM * form, void * xev)
fl_get_browser(combo->browser));
return 1;
case XK_Return:
#ifdef XK_KP_Enter
case XK_KP_Enter:
#endif
combo->hide();
return 1;
case XK_Escape: