diff options
author | Bert <ber.t@gmx.com> | 2011-08-17 22:21:56 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2011-08-30 00:05:38 +0200 |
commit | 01624f558066bb31d433cb4ad6ede4dd538adef3 (patch) | |
tree | 5647fc9ced1e8c73ada43d53c7ef4182e07d2c8f /apps | |
parent | a7a8ca26350e0a3b0e5dc756b4c40e3f5b0f872c (diff) | |
download | mupdf-01624f558066bb31d433cb4ad6ede4dd538adef3.tar.xz |
Ignore X11 key mappings when searching.
Diffstat (limited to 'apps')
-rw-r--r-- | apps/x11_main.c | 55 |
1 files changed, 28 insertions, 27 deletions
diff --git a/apps/x11_main.c b/apps/x11_main.c index d693591c..c3a9b15d 100644 --- a/apps/x11_main.c +++ b/apps/x11_main.c @@ -662,33 +662,34 @@ int main(int argc, char **argv) len = XLookupString(&xevt.xkey, buf, sizeof buf, &keysym, NULL); - switch (keysym) - { - case XK_Escape: - len = 1; buf[0] = '\033'; - break; - - case XK_Up: - len = 1; buf[0] = 'k'; - break; - case XK_Down: - len = 1; buf[0] = 'j'; - break; - - case XK_Left: - len = 1; buf[0] = 'b'; - break; - case XK_Right: - len = 1; buf[0] = ' '; - break; - - case XK_Page_Up: - len = 1; buf[0] = ','; - break; - case XK_Page_Down: - len = 1; buf[0] = '.'; - break; - } + if (!gapp.isediting) + switch (keysym) + { + case XK_Escape: + len = 1; buf[0] = '\033'; + break; + + case XK_Up: + len = 1; buf[0] = 'k'; + break; + case XK_Down: + len = 1; buf[0] = 'j'; + break; + + case XK_Left: + len = 1; buf[0] = 'b'; + break; + case XK_Right: + len = 1; buf[0] = ' '; + break; + + case XK_Page_Up: + len = 1; buf[0] = ','; + break; + case XK_Page_Down: + len = 1; buf[0] = '.'; + break; + } if (len) onkey(buf[0]); |