Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

change ESC to Ctrl+ESC for exit rendering mode

  • Loading branch information...
commit 5bea66258b4508933fbe739fdd3534228af4bc33 1 parent bbe0e76
Xiangfu Liu authored March 27, 2012

Showing 1 changed file with 9 additions and 1 deletion. Show diff stats Hide diff stats

  1. 10  src/gui/guirender.c
10  src/gui/guirender.c
@@ -36,6 +36,8 @@
36 36
 
37 37
 #include "guirender.h"
38 38
 
  39
+static int ctrl;
  40
+
39 41
 static void set_led(char c)
40 42
 {
41 43
 	int fd;
@@ -124,12 +126,15 @@ static void input_cb(mtk_event *e, int count)
124 126
 
125 127
 	for(i=0;i<count;i++) {
126 128
 		if((e[i].type == EVENT_TYPE_PRESS) && 
127  
-		   (e[i].press.code == MTK_KEY_ESC)) {
  129
+		   (e[i].press.code == MTK_KEY_ESC) && ctrl) {
128 130
 			guirender_stop();
129 131
 			mtk_input(&e[i+1], count-i-1);
130 132
 		}
131 133
 		if(e[i].type == EVENT_TYPE_PRESS) {
132 134
 			switch(e[i].press.code) {
  135
+				case MTK_KEY_LEFTCTRL:
  136
+					ctrl = 1;
  137
+					break;
133 138
 				case MTK_KEY_F1:
134 139
 					set_video_format(VIDEO_FORMAT_CVBS6);
135 140
 					break;
@@ -152,6 +157,9 @@ static void input_cb(mtk_event *e, int count)
152 157
 					adjust_contrast(-5);
153 158
 					break;
154 159
 			}
  160
+		} else if (e[i].type == EVENT_TYPE_RELEASE) {
  161
+				if(e[i].release.code == MTK_KEY_LEFTCTRL)
  162
+					ctrl = 0;
155 163
 		}
156 164
 	}
157 165
 }

0 notes on commit 5bea662

Please sign in to comment.
Something went wrong with that request. Please try again.