Remap keys on switching buffers