replacing key handler with UI controls