Input: touchscreen - move helper functions to core