Skip to content

Commit 6a3a020

Browse files
committed
Removed ro in Recovery, mapping for low brightness working in recovery ---> added missing files
1 parent 95dc557 commit 6a3a020

File tree

3 files changed

+110
-0
lines changed

3 files changed

+110
-0
lines changed
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
##################################
2+
# Funkey GPIO keymap config file #
3+
##################################
4+
# Format:
5+
#
6+
# - First all GPIO Pin numbers must be declared (integers separated by commas)
7+
# By default, pins are declared active high, to declare them active low, add char '*'
8+
# Example: 0,1,2,3,4,6,7,10*,11,12,13,14,15
9+
#
10+
# - Then the mapping can be done as follows (one line per mapping):
11+
# Pin_number[+Pin_number...], type_mapping, value, str_help_name_pin, str_help_fct_pin
12+
#
13+
# args: * Pin_number is the pin number concerned by the maping,
14+
# add +Pin_number for multiple touch mapping (not limited in nb of pins)
15+
# * type_mapping can be KEYBOARD or SHELL_COMMAND
16+
# * value is :
17+
# if type_mapping==KEYBOARD: the keycode from /usr/include/linux/input.h]
18+
# if type_mapping==SHELL_COMMAND: the shell command to exec
19+
# * str_help_name_pin is a sweet name for the pin (ex: PB5)
20+
# * str_help_fct_pin is an help str to indicate the function of this mapping
21+
22+
23+
24+
###################################
25+
# Pins declaration:
26+
0,1,2,3,4,6,7,10*,11,12,13,14,15
27+
28+
29+
###################################
30+
# Mapping:
31+
#7, KEYBOARD, KEY_F, KEY_F, Fn
32+
#7+6, KEYBOARD, KEY_K, KEY_K, Select
33+
7, KEYBOARD, KEY_K, KEY_K, Select
34+
6, KEYBOARD, KEY_S, KEY_S, Start
35+
3, KEYBOARD, KEY_U, KEY_U, Up
36+
7+3, KEYBOARD, KEY_P, KEY_P, Quick Save
37+
4, KEYBOARD, KEY_L, KEY_L, Left
38+
7+4, KEYBOARD, KEY_J, KEY_J, Aspect ratio factor --
39+
1, KEYBOARD, KEY_D, KEY_D, Down
40+
7+1, KEYBOARD, KEY_H, KEY_H, Aspect ratio mode change
41+
0, KEYBOARD, KEY_R, KEY_R, Right
42+
7+0, KEYBOARD, KEY_I, KEY_I, Aspect ratio factor ++
43+
15, KEYBOARD, KEY_N, KEY_N, R1
44+
7+15, KEYBOARD, KEY_O, KEY_O, R2
45+
2, KEYBOARD, KEY_M, KEY_M, L1
46+
7+2, KEYBOARD, KEY_V, KEY_V, L2
47+
12, KEYBOARD, KEY_A, KEY_A, A
48+
14, KEYBOARD, KEY_B, KEY_B, B
49+
13, KEYBOARD, KEY_Y, KEY_Y, Y
50+
11, KEYBOARD, KEY_X, KEY_X, X
51+
52+
7+12, SHELL_COMMAND, quick_action_volume_up, Fn+Y, Volume++
53+
7+13, SHELL_COMMAND, quick_action_volume_down, Fn+A, Volume--
54+
7+11, SHELL_COMMAND, quick_action_bright_up, Fn+B, Brightness++
55+
7+14, SHELL_COMMAND, quick_action_bright_down, Fn+X, Brightness--
56+
10, SHELL_COMMAND, sched_shutdown 1 & signal_usr1_to_emulators, N_OE, Quick save and Poweroff because of N_OE
57+
7+15+2, SHELL_COMMAND, display_notif_system_stats, Fn+L1+L2, display system cpu and ram usage
58+
59+
#7+12, KEYBOARD, KEY_G, KEY_G, Brightness++
60+
#7+14, KEYBOARD, KEY_E, KEY_E, Volume--
61+
#7+13, KEYBOARD, KEY_W, KEY_W, Brightness--
62+
#7+11, KEYBOARD, KEY_C, KEY_C, Volume++
63+
#10, KEYBOARD, KEY_T, KEY_T, Should Poweroff because N_OE_received
64+
#7+15, KEYBOARD, KEY_Q, 7+11, Launch menu
65+
66+
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/sh
2+
3+
STEP_BRIGHTNESS=10
4+
NOTIF_DURATION=2
5+
6+
# Get current value
7+
current_brightness=$(brightness_get)
8+
9+
# Compute new brightness value
10+
new_brightness=0
11+
if [ ${current_brightness} -gt ${STEP_BRIGHTNESS} ]; then
12+
let new_brightness=${current_brightness}-${STEP_BRIGHTNESS}
13+
fi
14+
15+
# Change brightness
16+
if [ ${new_brightness} -ne ${current_brightness} ]; then
17+
brightness_set ${new_brightness}
18+
fi
19+
20+
# Notif
21+
#notif_set ${NOTIF_DURATION} " BRIGHTNESS: ${new_brightness}%%"
22+
exit 0
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/sh
2+
3+
STEP_BRIGHTNESS=10
4+
NOTIF_DURATION=2
5+
6+
# Get current value
7+
current_brightness=$(brightness_get)
8+
9+
# Compute new brightness value
10+
let new_brightness=${current_brightness}+${STEP_BRIGHTNESS}
11+
if [ ${new_brightness} -gt 100 ]; then
12+
new_brightness=100
13+
fi
14+
15+
# Change brightness
16+
if [ ${new_brightness} -ne ${current_brightness} ]; then
17+
brightness_set ${new_brightness}
18+
fi
19+
20+
# Notif
21+
#notif_set ${NOTIF_DURATION} " BRIGHTNESS: ${new_brightness}%%"
22+
exit 0

0 commit comments

Comments
 (0)