Input handling for characters