| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1480,15 +1480,15 @@ def p_key(self): | |||
| 1480 | 1480 | self.print_line(self.s) | |
| 1481 | 1481 | return '' | |
| 1482 | 1482 | ||
| 1483 | - elif self.c in key_dispatch['C-r']: # C-r | ||
| 1483 | + elif self.c in key_dispatch[OPTS.undo_key]: # C-r | ||
| 1484 | 1484 | self.undo() | |
| 1485 | 1485 | return '' | |
| 1486 | 1486 | ||
| 1487 | - elif self.c in ('KEY_UP', ) + key_dispatch['C-p']: # Cursor Up/C-p | ||
| 1487 | + elif self.c in ('KEY_UP', ) + key_dispatch[OPTS.up_one_line_key]: # Cursor Up/C-p | ||
| 1488 | 1488 | self.back() | |
| 1489 | 1489 | return '' | |
| 1490 | 1490 | ||
| 1491 | - elif self.c in ('KEY_DOWN', ) + key_dispatch['C-n']: # Cursor Down/C-n | ||
| 1491 | + elif self.c in ('KEY_DOWN', ) + key_dispatch[OPTS.down_one_line_key]: # Cursor Down/C-n | ||
| 1492 | 1492 | self.fwd() | |
| 1493 | 1493 | return '' | |
| 1494 | 1494 | ||
@@ -1512,30 +1512,30 @@ def p_key(self): | |||
| 1512 | 1512 | # Redraw (as there might have been highlighted parens) | |
| 1513 | 1513 | self.print_line(self.s) | |
| 1514 | 1514 | ||
| 1515 | - elif self.c in key_dispatch['C-k']: # cut to buffer | ||
| 1515 | + elif self.c in key_dispatch[OPTS.cut_to_buffer_key]: # cut to buffer | ||
| 1516 | 1516 | self.cut_to_buffer() | |
| 1517 | 1517 | return '' | |
| 1518 | 1518 | ||
| 1519 | - elif self.c in key_dispatch['C-y']: # yank from buffer | ||
| 1519 | + elif self.c in key_dispatch[OPTS.yank_from_buffer_key]: # yank from buffer | ||
| 1520 | 1520 | self.yank_from_buffer() | |
| 1521 | 1521 | return '' | |
| 1522 | 1522 | ||
| 1523 | - elif self.c in key_dispatch['C-w']: | ||
| 1523 | + elif self.c in key_dispatch[OPTS.clear_word_key]: | ||
| 1524 | 1524 | self.bs_word() | |
| 1525 | 1525 | self.complete() | |
| 1526 | 1526 | return '' | |
| 1527 | 1527 | ||
| 1528 | - elif self.c in key_dispatch['C-u']: | ||
| 1528 | + elif self.c in key_dispatch[OPTS.clear_line_key]: | ||
| 1529 | 1529 | self.clrtobol() | |
| 1530 | 1530 | return '' | |
| 1531 | 1531 | ||
| 1532 | - elif self.c in key_dispatch['C-l']: | ||
| 1532 | + elif self.c in key_dispatch[OPTS.clear_screen_key]: | ||
| 1533 | 1533 | self.s_hist = [self.s_hist[-1]] | |
| 1534 | 1534 | self.highlighted_paren = None | |
| 1535 | 1535 | self.redraw() | |
| 1536 | 1536 | return '' | |
| 1537 | 1537 | ||
| 1538 | - elif self.c in key_dispatch['C-d']: | ||
| 1538 | + elif self.c in key_dispatch[OPTS.exit_key]: | ||
| 1539 | 1539 | if not self.s: | |
| 1540 | 1540 | self.do_exit = True | |
| 1541 | 1541 | return None | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -61,6 +61,16 @@ def loadini(struct, configfile): | |||
| 61 | 61 | struct.flush_output = config.safeget('general', 'flush_output', True) | |
| 62 | 62 | struct.pastebin_key = config.safeget('keyboard', 'pastebin', 'F8') | |
| 63 | 63 | struct.save_key = config.safeget('keyboard', 'save', 'C-s') | |
| 64 | + struct.undo_key = config.safeget('keyboard', 'undo', 'C-r') | ||
| 65 | + struct.up_one_line_key = config.safeget('keyboard', 'up_one_line', 'C-p') | ||
| 66 | + struct.down_one_line_key = config.safeget('keyboard', 'down_one_line', 'C-n') | ||
| 67 | + struct.cut_to_buffer_key = config.safeget('keyboard', 'cut_to_buffer', 'C-k') | ||
| 68 | + struct.yank_from_buffer_key = config.safeget('keybard', 'yank_from_buffer', 'C-y') | ||
| 69 | + struct.clear_word_key = config.safeget('keyboard', 'clear_word', 'C-w') | ||
| 70 | + struct.clear_line_key = config.safeget('keyboard', 'clear_line', 'C-u') | ||
| 71 | + struct.clear_screen_key = config.safeget('keyboard', 'clear_screen', 'C-l') | ||
| 72 | + struct.exit_key = config.safeget('keyboard', 'exit', 'C-d') | ||
| 73 | + | ||
| 64 | 74 | color_scheme_name = config.safeget('general', 'color_scheme', 'default') | |
| 65 | 75 | ||
| 66 | 76 | if color_scheme_name == 'default': | |
| Back | FazBrowse Home | New Git URL |
0 commit comments