It might make sense to not re-create the filter chain everytime, but only once up in the constructur, like done for "keyboardMovementsFilter".
Precisely, given that direction can be -1 or 1, please instead create both filterchains there. Or rather, please add an init() method definition + call at the end where all things then are initialised, cmp. how it is done in other classes.