From: "shaojie.sun" shaojie.sun@linaro.org
Because in some keyboard ENTER key value is 10, so we must add this value for ENTER key triggled.
Signed-off-by: shaojie.sun shaojie.sun@linaro.org --- display.c | 2 ++ display.h | 1 + 2 files changed, 3 insertions(+)
diff --git a/display.c b/display.c index e9f4bf6..db31494 100644 --- a/display.c +++ b/display.c @@ -401,6 +401,7 @@ static int display_keystroke(int fd, void *data) display_prev_line(); break;
+ case KEY_ENTER: case '\r': display_select(); break; @@ -474,6 +475,7 @@ static int display_find_keystroke(int fd, void *data)
break;
+ case KEY_ENTER: case '\r': if (!windata[current_win].ops || !windata[current_win].ops->selectf) return 0; diff --git a/display.h b/display.h index 6362a48..fb4c33e 100644 --- a/display.h +++ b/display.h @@ -33,4 +33,5 @@ extern int display_init(int wdefault); extern int display_register(int win, struct display_ops *ops); extern int display_column_name(const char *line);
+#define KEY_ENTER 10 #define NAME_MAX 255
Please don't send patches to linaro-dev, but to the appropriate mailing list.
patches@linaro.org can be cc'ed to track patches.
Thanks, -Christoffer