summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-04-18 15:16:05 +0200
committerhut <hut@lavabit.com>2010-04-18 15:16:05 +0200
commit715aa8bb95168a53cf0e9902bed820ea6e131a75 (patch)
treeaaad3197c1cb3e6749cd1112fc087e879149f6f8 /ranger
parent740e672ffbeaa5e43e3310efbd22da8f38605940 (diff)
downloadranger-715aa8bb95168a53cf0e9902bed820ea6e131a75.tar.gz
defaults.keys: Allow typing in numbers
Diffstat (limited to 'ranger')
-rw-r--r--ranger/defaults/keys.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/ranger/defaults/keys.py b/ranger/defaults/keys.py
index b31b178b..d22d8c50 100644
--- a/ranger/defaults/keys.py
+++ b/ranger/defaults/keys.py
@@ -341,6 +341,12 @@ map('<C-Y>', wdg.paste())
 def type_key(arg):
 	arg.wdg.type_key(arg.match)
 
+# Allow typing in numbers:
+def type_chr(n):
+	return lambda arg: arg.wdg.type_key(str(n))
+for number in range(10):
+	map(str(number), type_chr(number))
+
 # Unmap some global keys so we can type them:
 map.unmap('Q')
 map.directions.unmap('%')
amp;id=8fa8705476d5023083bc27a3fddaee8402ac94e5'>8fa87054 ^
06848dc3 ^
240394a4 ^
f027adc0 ^
08f08fb9 ^
654af129 ^
08f08fb9 ^
d8084b41 ^

99400080 ^
08f08fb9 ^

654af129 ^

d1a1173d ^
d8084b41 ^
cba63cf3 ^
b4250dbc ^

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