made it so a function called scan is getting called on every keypress of the curly brace key