Yakov Lerner wrote: > > > Here is another try, less instrusive. > > > We make 'received_from_client' serve both cases, the clientserver and > > > the pushkeys() case, only with appropriate change in ifdefs. > > > Logic of input_available() is not intruded upon now, except for ifdefs. > > > > OK, it seems this version is harmless so long as you don't use the > > function, and probably works OK otherwise. > > > > Is pushkeys() really a good name? Something with "typeahead" would be > > better, but probably too long. > > Typeahead() is only 1 letter long, length is not a problem. > Personally, I like "pushkeys" because "push" has double meaning here; > (1) "push" as add data to the buffer, and (2) "push" as we push keyboard ke= > ys. > So it's a little pun. So we have 4 candidates so far: > - typeahead > - pushkeys > - pushinput > - sendkeys > I also considered simkeys(), siminput(). Bram, the decision is yours.
It's minor, but I think "push" suggests that the keys go in front of the typeahead, while they actually are added to the end. "addkeys()" isn't better though. > I have this question: pushkeys(":\<Tab>") does not trigger competion. > I'd like pushkeys("...<Tab>") to trigger completion where real keyboard > input would. But I don't know how. Is it easy or difficult ? > Can you give me a hint, Bram, how to implement this ? I'd > make it optional dependent on the flags argument. The keys are inserted as if from a mapping. The completion for Tab only happens for typed keys. This would require another flag in the argument to handle the keys as if they were typed. Then don't set the last but one argument for ins_typebuf(). However, this doesn't always work correctly, since this is only remembered with a count of mapped keys. Look in ins_typebuf() to see how this works. > > The help needs a few links to this function, otherwise people won't find > > it. > From which places ? Give me a hint which places > do you mean. From remote_send() maybe ? Or from map.txt ? That's for you to figure out. -- Eight Megabytes And Continually Swapping. /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ download, build and distribute -- http://www.A-A-P.org /// \\\ help me help AIDS victims -- http://www.ICCF.nl ///