extract player movement binding to function