Skip to content

Commit f184b85

Browse files
committedMar 14, 2012
Ctrl+H : display keyboard shortcut information
1 parent 002aa33 commit f184b85

File tree

1 file changed

+33
-1
lines changed

1 file changed

+33
-1
lines changed
 

‎src/shortcuts.c

+33-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* Flickernoise
33
* Copyright (C) 2010, 2011 Sebastien Bourdeauducq
4-
* Copyright (C) 2011 Xiangfu Liu <xiangfu@sharism.cc>
4+
* Copyright (C) 2011 Xiangfu Liu <xiangfu@openmobilefree.net>
55
*
66
* This program is free software: you can redistribute it and/or modify
77
* it under the terms of the GNU General Public License as published by
@@ -30,13 +30,43 @@
3030
#include "gui/guirender.h"
3131
#include "gui/flash.h"
3232
#include "shortcuts.h"
33+
#include "renderer/osd.h"
3334

3435
static int ctrl, alt;
3536
static int f9_pressed;
3637
static rtems_interval f9_press_time;
3738
static int f10_pressed;
3839
static rtems_interval f10_press_time;
3940

41+
static void help(void)
42+
{
43+
static int i = 0;
44+
45+
char *help[] = {
46+
"Ctrl+H: Help message",
47+
"Hold F9 / Hold left button: Web update",
48+
"F1: Set video in CVBS green",
49+
"F2: Set video in CVBS blue",
50+
"F3: Set video in CVBS red",
51+
"F5: Increase brightness",
52+
"F6: Decrease brightness",
53+
"F7: Increase contrast",
54+
"F8: Decrease contrast",
55+
"Esc: Exit fun",
56+
"F1: Show patch name(simple mode)",
57+
"F9: Next patch(simple mode)",
58+
"F11: Previous patch(simple mode)",
59+
"Ctrl+Alt+Del / Hold F10 / Hold middle button: Reboot",
60+
"Ctrl+Pause: Screenshot",
61+
"Ctrl+F1: Switch resolution",
62+
0,
63+
};
64+
65+
if(!fb_get_mode()) return;
66+
osd_event(help[i++]);
67+
if(!help[i]) i = 0;
68+
}
69+
4070
static void switch_resolution(void)
4171
{
4272
int res;
@@ -82,6 +112,8 @@ static void shortcuts_callback(mtk_event *e, int count)
82112
switch_resolution();
83113
else if(ctrl && (e[i].press.code == MTK_KEY_PAUSE))
84114
fbgrab(NULL);
115+
else if(ctrl && (e[i].press.code == MTK_KEY_H))
116+
help();
85117
else if(e[i].press.code == MTK_KEY_F9) {
86118
f9_pressed = 1;
87119
f9_press_time = rtems_clock_get_ticks_since_boot();

0 commit comments

Comments
 (0)
Please sign in to comment.