key up/down function worked out