# The first item of each tuple is the virtual event; # each of the remaining items is an actual key binding for the event. # (This conveniently forms an argument list for event_add().) win_bindings = [ ("<>", "", ""), ("<>", "", ""), ("<>", "", ""), ("<>", ""), ("<>", ""), ("<>", ""), ("<>", ""), ("<>", ""), ("<>", "", ""), ("<>", "", ""), ("<>", "", ""), ("<>", "", ""), ("<>", ""), ("<>", ""), ("<>", ""), ("<>", ""), ("<>", ""), ("<>", ""), ("<>", ""), ("<>", ""), ("<>", ""), ("<>", ""), ("<>", "", ""), ("<>", ""), ("<>", ""), ("<>", ""), ] emacs_bindings = [ ("<>", "", ""), ("<>", ""), ("<>", "", ""), ("<>", "", ""), ("<>", ""), ("<>", ""), ("<>", ""), ("<>", "", "", ""), ("<>", "", "", ""), ("<>", "", ""), ("<>", "", ""), ("<>", "", ""), ("<>", "", ""), ("<>", ""), ("<>", ""), ("<>", ""), ("<>", ""), ("<>", ""), ("<>", ""), ("<>", ""), ("<>", ""), ("<>", ""), ("<>", ""), ("<>", ""), ("<>", "", ""), ("<>", ""), ("<>", "", ""), ("<>", ""), ] default_bindings = emacs_bindings def apply_bindings(text, bindings=default_bindings): event_add = text.event_add for args in bindings: apply(event_add, args)