def bindVbar(self, w=None): if w is None: w = self.canvas bind(w, "<KeyPress-Prior>", self.page_up) bind(w, "<KeyPress-Next>", self.page_down) bind(w, "<KeyPress-Up>", self.unit_up) bind(w, "<KeyPress-Down>", self.unit_down) bind(w, "<KeyPress-Begin>", self.scroll_top) bind(w, "<KeyPress-Home>", self.scroll_top) bind(w, "<KeyPress-End>", self.scroll_bottom) # mousewheel support if WIN_SYSTEM == 'x11': bind(w, '<4>', self.mouse_wheel_up) bind(w, '<5>', self.mouse_wheel_down)
def bindHbar(self, w=None): if w is None: w = self.canvas bind(w, "<KeyPress-Left>", self.unit_left) bind(w, "<KeyPress-Right>", self.unit_right)