summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/defaults/keys.py12
-rw-r--r--ranger/help/movement.py12
2 files changed, 23 insertions, 1 deletions
diff --git a/ranger/defaults/keys.py b/ranger/defaults/keys.py
index 8c4c3535..fcdf7b11 100644
--- a/ranger/defaults/keys.py
+++ b/ranger/defaults/keys.py
@@ -124,6 +124,15 @@ map.dir('<C-E>', alias='<end>')
 map.dir('<C-D>', alias='<delete>')
 map.dir('<C-H>', alias='<backspace>')
 
+map = midnight_commander_fkeys = KeyMapWithDirections()
+map('<F1>', fm.display_help())
+map('<F3>', fm.display_file())
+map('<F4>', fm.edit_file())
+map('<F5>', fm.copy())
+map('<F6>', fm.cut())
+map('<F7>', fm.open_console(cmode.COMMAND, 'mkdir '))
+map('<F8>', fm.open_console(cmode.COMMAND, DELETE_WARNING))
+map('<F10>', fm.exit())
 
 # ===================================================================
 # == Define keys in "browser" context:
@@ -131,6 +140,7 @@ map.dir('<C-H>', alias='<backspace>')
 map = keymanager.get_context('browser')
 map.merge(global_keys)
 map.merge(vim_aliases)
+map.merge(midnight_commander_fkeys)
 
 # -------------------------------------------------------- movement
 map('gg', fm.move(to=0))
@@ -260,7 +270,7 @@ map("`<bg>", "'<bg>", "m<bg>", fm.draw_bookmarks())
 # ---------------------------------------------------- change views
 map('i', fm.display_file())
 map('<C-P>', fm.display_log())
-map('?', '<F1>', fm.display_help())
+map('?', fm.display_help())
 map('w', lambda arg: arg.fm.ui.open_taskview())
 
 # ------------------------------------------------ system functions
diff --git a/ranger/help/movement.py b/ranger/help/movement.py
index f6a70eb1..e85bf336 100644
--- a/ranger/help/movement.py
+++ b/ranger/help/movement.py
@@ -93,6 +93,18 @@ special in whatever context you want.
 	t	tag/untag the selection
 	T	untag the selection
 
+Midnight Commander lovers will find that the function keys work similarly.
+There is no menu or drop down though.
+
+	<F1>	view the help screen
+	<F3>	view the file
+	<F4>	edit the file
+	<F5>	copy the selection
+	<F6>	cut the selection
+	<F7>	create a directory
+	<F8>	delete the selection
+	<F10>	exit ranger
+
 
 ==============================================================================
 1.3. Searching
blame/lib/socket.go?h=0.5.0&id=7a489cb0011a34a68d3e77d0174076857cc37902'>^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104