Keyboard mapping optimizations