I was hoping somebody could point me in the right direction on how to parse key mappings like <D-M-Left>. I'm guessing there are already functions that do this for you, but where do I find them?
More specifically, given <D-M-Left> I would like to figure out what the modifiers are and which (printable) key they are modifying. There should be no translation of keys, so given <C-a> I want to get "Control" and "a" (not the code for ^a). However, with <D-M-Left> I want to get "Cmd", "Meta", and the keycode for "Left" (I don't want the string "Left"). My thought on how to do this is given a string, replace all occurrences of "<", ">" and "-" with NUL, and if this gives me more than one substring, treat all but the last one as modifiers, and treat the last as the actual key. The only problem is, if the last substring is something like "Left" or "F1" then I need to translate this to a keycode, and I'm not sure how to do this. Is there a function that does this translation? Thanks, /Björn --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
