[1/3] POWERDEBUG: add "case '\n'" for ENTER key input.

Message ID 1374049425-3950-1-git-send-email-shaojie.sun@linaro.com
State New
Headers show

Commit Message

sunshaojie July 17, 2013, 8:23 a.m.
Because in some keyboard ENTER key value is '\n', so we must add this value for ENTER key triggled.

Signed-off-by: sunshaojie <shaojie.sun@linaro.com>
---
 display.c |    2 ++
 1 file changed, 2 insertions(+)

Comments

Sanjay Singh Rawat July 19, 2013, 12:38 p.m. | #1
On Wednesday 17 July 2013 01:53 PM, sunshaojie wrote:
> Because in some keyboard ENTER key value is '\n', so we must add this value for ENTER key triggled.
>
> Signed-off-by: sunshaojie <shaojie.sun@linaro.com>
> ---
>   display.c |    2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/display.c b/display.c
> index e9f4bf6..41a511d 100644
> --- a/display.c
> +++ b/display.c
> @@ -401,6 +401,7 @@ static int display_keystroke(int fd, void *data)
>   		display_prev_line();
>   		break;
>
> +	case '\n':
>   	case '\r':
>   		display_select();
>   		break;
> @@ -474,6 +475,7 @@ static int display_find_keystroke(int fd, void *data)
>
>   		break;
>
> +	case '\n':
>   	case '\r':
>   		if (!windata[current_win].ops || !windata[current_win].ops->selectf)
>   			return 0;
>
Ack, will merge it.

Patch

diff --git a/display.c b/display.c
index e9f4bf6..41a511d 100644
--- a/display.c
+++ b/display.c
@@ -401,6 +401,7 @@  static int display_keystroke(int fd, void *data)
 		display_prev_line();
 		break;
 
+	case '\n':
 	case '\r':
 		display_select();
 		break;
@@ -474,6 +475,7 @@  static int display_find_keystroke(int fd, void *data)
 
 		break;
 
+	case '\n':
 	case '\r':
 		if (!windata[current_win].ops || !windata[current_win].ops->selectf)
 			return 0;