On 12/05/13 07:48, Zulox4 wrote:
Hello,
I added a Ctrl key to iOS version, and tried to modify the code for iOS to add 
the touch for shift-tab, (I use shift-Ctrl-I touches combination). For sending 
the touches to vim it is used the add_to_input_buf function, in insertText 
function, the code source example is in file link:
https://github.com/applidium/Vim/blob/master/src/gui_ios.m
.....
- (void)insertText:(NSString *)text {

     add_to_input_buf((char_u *)[text UTF8String], [text 
lengthOfBytesUsingEncoding:NSUTF8StringEncoding]);

     [_textView setNeedsDisplay];

}

- (void)deleteBackward {

     char escapeString[] = {BS, 0};

     [self insertText:[NSString stringWithUTF8String:escapeString]];

}
.....
But I did not find the correct codes (bytes) or the good array of chars, i think (3 
bytes)  to send to the buffer with add_to_input_buf  for shift-tab to send to the 
buffer with  add_to_input_buf in ex (:) mode, for completion, for example for the 
keystrokes :no<sh-tab> to have :normal.
In can say that the <Tab> key (on IOS with Ctrl-I) work well for completion.
Could someone give a little help?
Thanks a lot !


AFAIK, the "cooked" keyboard input mode used by Vim makes all three of Tab, Ctrl-i and Ctrl-Shift-i appear the same to it (0x09). Blame the inventors of the ASCII papertape code, who intentionally made the Shift key status irrelevant when used in combination with Ctrl+letter. So I don't think you'll be able to map Ctrl-i and Ctrl-Shift-i to do different things in Vim. Note, BTW, that while I is Shift-i (A is Shift-a, B is Shift-b, etc.), the notation Ctrl-I is how one usually shows the Ctrl-i combination (similarly Ctrl-A actually means Ctrl-a, Ctrl-B means Ctrl-b, etc.).

See also :help map.txt


Best regards,
Tony.
--
There's no easy quick way out, we're gonna have to live through our
whole lives, win, lose, or draw.
                -- Walt Kelly

--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Raspunde prin e-mail lui