about 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