fix API to use from keyboard code