I've been using the pseudo keymap solution from my previous question to great effect for 6 months now. The short version is that it allows me to keep the computer keyboard map in my usual Programmer's Dvorak at almost all times but have an alternate insert mode in vim where I can type using a Turkish-F layout.

This is great for the alphabet and I've become pretty proficient in both languages, but it's an ongoing problem for symbols. The Turkish alphabet has more characters than English and by necessity takes over more keys than the Simplified Dvorak based layout I'm overlaying it on. The question becomes, “Where can I even put the displaced symbols?”

So far my solution has been to include a few extra mappings for that prefixes keys that were previously symbols with an Alt-code variant that restores the original symbol. If you're lost, and example would be what would be Z on a QWERTY keyboard. In DVP this has ' and " (in Level 1/2 respectively). Now in my pseudo PTF mapping mode in vim ' is remapped to j and " to J as that's where the Turkish-F layout has that letter. So far so good. But not where do I get my quotes from? By mapping <A-'> to ' I can use Alt+Z to get my quotes back in the position they would be in DVP even when my vim insert keymap is translating to PTF. Whew.

But the Alt is ① in a really bad place for this and ② conflicts with keybindings I would usually use for window management. I can, of course, move the key, but I have it where it is for easy chording of keybindings. Using a different modifier would seem like a better solution. I have ISO Level3 (or Level5) Shift available in a great place for this. The only trouble is I can't figure out how to map them in Vim.

  1. What can I put in my keymap file to catch chorded key combos using Level3 Shift the way that <C-a> catches Ctrl+A or <A-a> catches Alt+A?

I suspect the answer to that is going to be, “You can't. Sucker.” In that event:

  1. What can I do? Can I setup a dead-key equivalent in a vim keymap such that a tap on the dead key (which could be anything, my keyboard is programmable) preceding any key will cause that one key to skip the custom map an emit the original non-mapped key?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.