ui: made zinput.cpos a cardinal, rather than an integer
zinput: factored out cursor movement and modernized the keymappings
moved most of the keyboard stuff from kvm to kbd