commodity_catalog.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:stellarmagnate 作者: abadger 项目源码 文件源码
def keypress(self, size, key):
        """Handle all keyboard shortcuts for the market menu"""
        if key in self.keypress_map:
            # Open up the order dialog to buy sell this item
            commodity = self.keypress_map[key]
            self.pubpen.publish(self.order_info_event, commodity,
                                self.auxiliary_cols[self.price_col_idx].data_map[commodity],
                                self.location)
            urwid.emit_signal(self, self.signals[1])
        elif key in ('left', 'right'):
            # Ignore keys that might move focus to a widget to the side
            return
        elif key in ('up', 'down', 'page up', 'page down'):
            # First let the children handle the change in focus...
            super().keypress(size, key)  #pylint: disable=not-callable
            # Then highlight the same entry in other columns
            self._highlight_focused_line()
        else:
            super().keypress(size, key)  #pylint: disable=not-callable
        return key
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号