summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-04-19 18:33:43 +0200
committerhut <hut@lavabit.com>2010-04-19 18:33:43 +0200
commitd3926b4c0687c36b3c809b8035a7579a69ff8132 (patch)
tree3c4162e5b23e5adad453d80132dec938bdc7eff8 /ranger
parent09449df07fb9b81ccab2171d9f65091dbbd472ff (diff)
downloadranger-d3926b4c0687c36b3c809b8035a7579a69ff8132.tar.gz
ext.keybinding_parser: fixed function keys
Diffstat (limited to 'ranger')
-rw-r--r--ranger/defaults/keys.py2
-rw-r--r--ranger/ext/keybinding_parser.py3
2 files changed, 4 insertions, 1 deletions
diff --git a/ranger/defaults/keys.py b/ranger/defaults/keys.py
index fc0beab6..0a9cb6a3 100644
--- a/ranger/defaults/keys.py
+++ b/ranger/defaults/keys.py
@@ -261,7 +261,7 @@ map("`<bg>", "'<bg>", "m<bg>", fm.draw_bookmarks())
 # ---------------------------------------------------- change views
 map('i', fm.display_file())
 map('<C-P>', fm.display_log())
-map('?', KEY_F1, fm.display_help())
+map('?', '<F1>', fm.display_help())
 map('w', lambda arg: arg.fm.ui.open_taskview())
 
 # ------------------------------------------------ system functions
diff --git a/ranger/ext/keybinding_parser.py b/ranger/ext/keybinding_parser.py
index c33ac12f..6ef08d94 100644
--- a/ranger/ext/keybinding_parser.py
+++ b/ranger/ext/keybinding_parser.py
@@ -94,3 +94,6 @@ for char in ascii_lowercase:
 
 for char in (ascii_lowercase + '0123456789'):
 	special_keys['a-' + char] = (27, ord(char))
+
+for n in range(64):
+	special_keys['f' + str(n)] = curses.KEY_F0 + n
href='#n14'>14 15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34


                                                                              




                                              






                  



                              
                                                           








                              
                                         
                              
                                         

                              
# Example program showing that a function call can be 'paused' multiple times,
# creating different continuation values.
#
# To run:
#   $ git clone https://github.com/akkartik/mu
#   $ cd mu
#   $ ./mu continuation3.mu
#
# Expected output:
#   caller 0
#   callee 0
#   caller 1
#   callee 1
#   caller 2
#   callee 2

def main [
  local-scope
  $print [caller 0] 10/newline
  k:continuation <- call-with-continuation-mark 100/mark, f
  $print [caller 1] 10/newline
  k <- call k
  $print [caller 2] 10/newline
  call k
]

def f [
  local-scope
  $print [callee 0] 10/newline
  return-continuation-until-mark 100/mark
  $print [callee 1] 10/newline
  return-continuation-until-mark 100/mark
  $print [callee 2] 10/newline
]