def calculate_extra_keys(self, buffer):
extraBs = len(self.inputStack) - len(buffer)<EOL>if extraBs > <NUM_LIT:0>:<EOL><INDENT>extraKeys = '<STR_LIT>'.join(self.inputStack[len(buffer)])<EOL><DEDENT>else:<EOL><INDENT>extraBs = <NUM_LIT:0><EOL>extraKeys = '<STR_LIT>'<EOL><DEDENT>return extraBs, extraKeys<EOL>
Determine extra keys pressed since the given buffer was built