Handle case changing better. <Ctrl>F now works like <Ctrl>f rather than <Ctrl><Shift>F

This commit is contained in:
Thomas Hurst 2008-08-15 16:20:08 +01:00
parent fbd862c1aa
commit 894ba31880
1 changed files with 11 additions and 3 deletions

View File

@ -41,9 +41,17 @@ class TerminatorKeybindings:
e.action = action
raise e
else:
if keyval == gtk.keysyms.Tab and mask & gtk.gdk.SHIFT_MASK:
keyval = gtk.keysyms.ISO_Left_Tab
mask &= ~gtk.gdk.SHIFT_MASK
if mask & gtk.gdk.SHIFT_MASK:
if keyval == gtk.keysyms.Tab:
keyval = gtk.keysyms.ISO_Left_Tab
mask &= ~gtk.gdk.SHIFT_MASK
else:
keyvals = gtk.gdk.keyval_convert_case(keyval)
if keyvals[0] != keyvals[1]:
keyval = keyvals[1]
mask &= ~gtk.gdk.SHIFT_MASK
else:
keyval = gtk.gdk.keyval_to_lower(keyval)
self._lookup.setdefault(mask, {})
self._lookup[mask][keyval] = action
self._masks |= mask