diff --git a/pudb/__init__.py b/pudb/__init__.py index 822d1567..1a85e395 100644 --- a/pudb/__init__.py +++ b/pudb/__init__.py @@ -1,7 +1,7 @@ from __future__ import absolute_import, division, print_function -NUM_VERSION = (2016, 2) +NUM_VERSION = (2016, 2, 'amesha') VERSION = ".".join(str(nv) for nv in NUM_VERSION) __version__ = VERSION diff --git a/pudb/debugger.py b/pudb/debugger.py index 7fa29d63..9bd3f611 100644 --- a/pudb/debugger.py +++ b/pudb/debugger.py @@ -7,6 +7,10 @@ import sys import os +from urwid.command_map import command_map +command_map['j'] = 'cursor down' +command_map['k'] = 'cursor up' + from pudb.settings import load_config, save_config CONFIG = load_config() save_config(CONFIG) diff --git a/pudb/ui_tools.py b/pudb/ui_tools.py index 8050b3df..d966c2aa 100644 --- a/pudb/ui_tools.py +++ b/pudb/ui_tools.py @@ -74,6 +74,7 @@ def keypress(self, size, key): return key +import xtraceback; xtraceback.compat.install() class SignalWrap(urwid.WidgetWrap): def __init__(self, w, is_preemptive=False): urwid.WidgetWrap.__init__(self, w) @@ -84,6 +85,20 @@ def listen(self, mask, handler): self.event_listeners.append((mask, handler)) def keypress(self, size, key): + # with open('/home/adam/tmp/keypress', 'a') as fp: + # if 1 or (key == 'down' and 0 in size): + # import traceback; traceback.print_stack(file=fp) + # fp.write('self: {!r}, w: {!r}, ' + # 'size: {!r}, key: {!r}\n\n'.format( + # self, self._w, size, key)) + # fp.write(repr(dir(self._w)) + '\n') + # fp.write(repr(self._w.contents)+'\n\n--------------------------------------------------------------------------------\n') + # # if 0 in size: + # # fp.write('\nsomething\n\n\n') + # # else: + # # fp.write('\nnothing here\n\n\n') + + result = key if self.is_preemptive: