def keyPress(self, arg, gevent): if CalBase.keyPress(self, arg, gevent): return True kname = gdk.keyval_name(gevent.keyval).lower() if kname == "up": self.jdPlus(-1) elif kname == "down": self.jdPlus(1) elif kname == "left": self.jdPlus(rtlSgn() * 7) elif kname == "right": self.jdPlus(rtlSgn() * -7) elif kname == "end": self.gotoJd(self.status[-1].jd) elif kname in ("page_up", "k", "p"): self.jdPlus(-7) elif kname in ("page_down", "j", "n"): self.jdPlus(7) elif kname in ("f10", "m"): if gevent.state & gdk.ModifierType.SHIFT_MASK: # Simulate right click (key beside Right-Ctrl) self.emit("popup-cell-menu", gevent.time, *self.getCellPos()) else: self.emit("popup-main-menu", gevent.time, *self.getMainMenuPos()) else: return False return True
def keyPress(self, arg, gevent): if CalBase.keyPress(self, arg, gevent): return True kname = gdk.keyval_name(gevent.keyval).lower() #if kname.startswith("alt"): # return True ## How to disable Alt+Space of metacity ????????????????????? if kname == "up": self.jdPlus(-1) elif kname == "down": self.jdPlus(1) elif kname == "right": if rtl: self.jdPlus(-1) else: self.jdPlus(1) elif kname == "left": if rtl: self.jdPlus(1) else: self.jdPlus(-1) elif kname in ("page_up", "k", "p"): self.jdPlus(-1) # FIXME elif kname in ("page_down", "j", "n"): self.jdPlus(1) # FIXME #elif kname in ("f10", "m"): # FIXME # if gevent.get_state() & gdk.ModifierType.SHIFT_MASK: # # Simulate right click (key beside Right-Ctrl) # self.emit("popup-cell-menu", gevent.time, *self.getCellPos()) # else: # self.emit("popup-main-menu", gevent.time, *self.getMainMenuPos()) else: return False return True
def keyPress(self, arg, gevent): if CalBase.keyPress(self, arg, gevent): return True kname = gdk.keyval_name(gevent.keyval).lower() #if kname.startswith('alt'): # return True ## How to disable Alt+Space of metacity ????????????????????? if kname == 'up': self.jdPlus(-1) elif kname == 'down': self.jdPlus(1) elif kname == 'right': if rtl: self.jdPlus(-1) else: self.jdPlus(1) elif kname == 'left': if rtl: self.jdPlus(1) else: self.jdPlus(-1) elif kname in ('page_up', 'k', 'p'): self.jdPlus(-1) ## FIXME elif kname in ('page_down', 'j', 'n'): self.jdPlus(1) ## FIXME #elif kname in ('f10', 'm'):## FIXME # if gevent.get_state() & gdk.ModifierType.SHIFT_MASK: # # Simulate right click (key beside Right-Ctrl) # self.emit('popup-cell-menu', gevent.time, *self.getCellPos()) # else: # self.emit('popup-main-menu', gevent.time, *self.getMainMenuPos()) else: return False return True
def keyPress(self, arg, gevent): if CalBase.keyPress(self, arg, gevent): return True kname = gdk.keyval_name(gevent.keyval).lower() #if kname.startswith('alt'): # return True ## How to disable Alt+Space of metacity ????????????????????? if kname=='up': self.jdPlus(-1) elif kname=='down': self.jdPlus(1) elif kname=='right': if rtl: self.jdPlus(-1) else: self.jdPlus(1) elif kname=='left': if rtl: self.jdPlus(1) else: self.jdPlus(-1) elif kname in ('page_up', 'k', 'p'): self.jdPlus(-1)## FIXME elif kname in ('page_down', 'j', 'n'): self.jdPlus(1)## FIXME #elif kname in ('f10', 'm'):## FIXME # if gevent.get_state() & gdk.ModifierType.SHIFT_MASK: # # Simulate right click (key beside Right-Ctrl) # self.emit('popup-cell-menu', gevent.time, *self.getCellPos()) # else: # self.emit('popup-main-menu', gevent.time, *self.getMainMenuPos()) else: return False return True
def keyPress(self, arg, gevent): print('keyPress') if CalBase.keyPress(self, arg, gevent): return True kname = gdk.keyval_name(gevent.keyval).lower() print('keyPress', kname) if kname=='up': self.jdPlus(-1) elif kname=='down': self.jdPlus(1) elif kname=='end': self.gotoJd(self.status[-1].jd) elif kname in ('page_up', 'k', 'p'): self.jdPlus(-7) elif kname in ('page_down', 'j', 'n'): self.jdPlus(7) elif kname in ('f10', 'm'): if gevent.state & gdk.ModifierType.SHIFT_MASK: # Simulate right click (key beside Right-Ctrl) self.emit('popup-cell-menu', gevent.time, *self.getCellPos()) else: self.emit('popup-main-menu', gevent.time, *self.getMainMenuPos()) else: return False return True
def keyPress(self, arg, gevent): print('keyPress') if CalBase.keyPress(self, arg, gevent): return True kname = gdk.keyval_name(gevent.keyval).lower() print('keyPress', kname) if kname == 'up': self.jdPlus(-1) elif kname == 'down': self.jdPlus(1) elif kname == 'end': self.gotoJd(self.status[-1].jd) elif kname in ('page_up', 'k', 'p'): self.jdPlus(-7) elif kname in ('page_down', 'j', 'n'): self.jdPlus(7) elif kname in ('f10', 'm'): if gevent.state & gdk.ModifierType.SHIFT_MASK: # Simulate right click (key beside Right-Ctrl) self.emit('popup-cell-menu', gevent.time, *self.getCellPos()) else: self.emit('popup-main-menu', gevent.time, *self.getMainMenuPos()) else: return False return True
def keyPress(self, arg, gevent): print('keyPress') if CalBase.keyPress(self, arg, gevent): return True kname = gdk.keyval_name(gevent.keyval).lower() print('keyPress', kname) #if kname.startswith('alt'): # return True ## How to disable Alt+Space of metacity ????????????????????? if kname == 'up': self.jdPlus(-7) elif kname == 'down': self.jdPlus(7) elif kname == 'right': if rtl: self.jdPlus(-1) else: self.jdPlus(1) elif kname == 'left': if rtl: self.jdPlus(1) else: self.jdPlus(-1) elif kname == 'end': self.changeDate( ui.cell.year, ui.cell.month, core.getMonthLen(ui.cell.year, ui.cell.month, calTypes.primary), ) elif kname in ('page_up', 'k', 'p'): self.monthPlus(-1) elif kname in ('page_down', 'j', 'n'): self.monthPlus(1) elif kname in ('f10', 'm'): if gevent.get_state() & gdk.ModifierType.SHIFT_MASK: # Simulate right click (key beside Right-Ctrl) self.emit('popup-cell-menu', gevent.time, *self.getCellPos()) else: self.emit('popup-main-menu', gevent.time, *self.getMainMenuPos()) else: return False return True
def keyPress(self, arg, gevent): if CalBase.keyPress(self, arg, gevent): return True kname = gdk.keyval_name(gevent.keyval).lower() #if kname.startswith("alt"): # return True ## How to disable Alt+Space of metacity ????????????????????? if kname == "up": self.jdPlus(-7) elif kname == "down": self.jdPlus(7) elif kname == "right": if rtl: self.jdPlus(-1) else: self.jdPlus(1) elif kname == "left": if rtl: self.jdPlus(1) else: self.jdPlus(-1) elif kname == "end": self.changeDate( ui.cell.year, ui.cell.month, core.getMonthLen(ui.cell.year, ui.cell.month, calTypes.primary), ) elif kname in ("page_up", "k", "p"): self.monthPlus(-1) elif kname in ("page_down", "j", "n"): self.monthPlus(1) elif kname in ("f10", "m"): if gevent.get_state() & gdk.ModifierType.SHIFT_MASK: # Simulate right click (key beside Right-Ctrl) self.emit("popup-cell-menu", gevent.time, *self.getCellPos()) else: self.emit("popup-main-menu", gevent.time, *self.getMainMenuPos()) else: return False return True
def keyPress(self, arg, gevent): print('keyPress') if CalBase.keyPress(self, arg, gevent): return True kname = gdk.keyval_name(gevent.keyval).lower() print('keyPress', kname) #if kname.startswith('alt'): # return True ## How to disable Alt+Space of metacity ????????????????????? if kname=='up': self.jdPlus(-7) elif kname=='down': self.jdPlus(7) elif kname=='right': if rtl: self.jdPlus(-1) else: self.jdPlus(1) elif kname=='left': if rtl: self.jdPlus(1) else: self.jdPlus(-1) elif kname=='end': self.changeDate( ui.cell.year, ui.cell.month, core.getMonthLen(ui.cell.year, ui.cell.month, calTypes.primary), ) elif kname in ('page_up', 'k', 'p'): self.monthPlus(-1) elif kname in ('page_down', 'j', 'n'): self.monthPlus(1) elif kname in ('f10', 'm'): if gevent.get_state() & gdk.ModifierType.SHIFT_MASK: # Simulate right click (key beside Right-Ctrl) self.emit('popup-cell-menu', gevent.time, *self.getCellPos()) else: self.emit('popup-main-menu', gevent.time, *self.getMainMenuPos()) else: return False return True