Commits

Iñigo Serna committed 5472cec

SelectItem: new key shortcuts: Ctrl-L, 0..9.

* lfm/messages.py (SelectItem.manage_keys): new key shortcuts: Ctrl-L, 0..9
* README (Key bindings): update documentation

  • Participants
  • Parent commits 56d098f

Comments (0)

Files changed (4)

+Fri May 20 23:29:56 2011  Iñigo Serna  <inigoserna@gmail.com>
+
+	* lfm/messages.py (SelectItem.manage_keys): new key shortcuts: Ctrl-L, 0..9
+	* README (Key bindings): update documentation
+
 Fri May 20 23:08:20 2011  Iñigo Serna  <inigoserna@gmail.com>
 
 	* lfm/messages.py (EntryLine.manage_keys): Ctrl-G not PowerCLI: select historic
     - next page, space, Ctrl-F
     - home, Ctrl-A
     - end, Ctrl-E
-    - Ctrl-S: go to file/dir
-    - enter: return path
+    - Ctrl-L: go to entry in the middle
+    - 0..9: go to entry number # (0->10)
+    - Ctrl-S: go to entry starting by...
+    - enter: return entry
     - Ctrl-C, q, Q, ESC: quit
 
 + ***Permissions* window**
 ============================================================================
-Last update:	Time-stamp: <2011-05-20 22:35:43 inigo>
+Last update:	Time-stamp: <2011-05-20 23:35:48 inigo>
 ============================================================================
 
 
 - PowerCLI: insert stored (from config) or history command => Ctrl-G
 - preferences: improve load/save handling of new options not present in ~/.lfmrc
 - global menu: new option: delete history
+- SelectItem: new key shortcuts
 
 - FIXED BUGS:
   . pyview:
         h, w = win.getmaxyx()
         h0, w0 = h - 2, w - 3
         if self.title != '':
-            win.addstr(0, int((w-len(self.title)-2)/2), ' %s ' % utils.encode(self.title))
+            win.addstr(0, int((w-len(self.title)-2)/2), ' %s ' % utils.encode(self.title),
+                       curses.color_pair(3))
         nels = len(self.entries)
         entry_a = int(self.entry_i/h0) * h0
         for i in xrange(h0):
                 self.entry_i = 0
             elif ch in (curses.KEY_END, 0x05):
                 self.entry_i = nels - 1
+            elif ch == 0x0C:     # Ctrl-L
+                self.entry_i = int(len(self.entries)/2)
+            elif ch == 0x30:         # 0
+                self.entry_i = ch - 0x30 + 9
+            elif 0x31 <= ch <= 0x39: # 1..9
+                self.entry_i = ch - 0x30 - 1
             elif ch == 0x13:     # Ctrl-S
                 theentries = self.entries[self.entry_i:]
                 ch2 = self.pwin.window().getkey()