Added key input support