Input handler implementation