Fix input mask bitwise operations. Thanks to Kees Cook

This commit is contained in:
Chris Jones 2007-11-07 14:18:19 -05:00
parent 87c9bdef6d
commit eeb91b4c6f

View File

@ -239,8 +239,9 @@ class TerminatorTerm:
def on_vte_key_press (self, term, event):
keyname = gtk.gdk.keyval_name (event.keyval)
mask = gtk.gdk.CONTROL_MASK | gtk.gdk.SHIFT_MASK
if event.state & (gtk.gdk.CONTROL_MASK | gtk.gdk.SHIFT_MASK):
if (event.state & mask) == mask:
if keyname == 'N':
self.term.go_next (self)
return (True)