slate copy from robacarp. reworked for sane keyboards