Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Finish inkey()/inkey_ex() migration #1265

Closed
flambard-took opened this issue Apr 24, 2019 · 0 comments
Closed

Finish inkey()/inkey_ex() migration #1265

flambard-took opened this issue Apr 24, 2019 · 0 comments

Comments

@flambard-took
Copy link
Member

flambard-took commented Apr 24, 2019

The work done by Billsey to support newer V Z-Term (#944) left one feature in a TODO state: the newer inkey_ex() functions are mostly discarded in favor of our old, trusty inkey().

This was nice, because it kept everything working, and if we're to migrate completely we'll likely break some things. But we do need to migrate, because we do want to actually use the new functions.

Here's what's going on (I'm comparing to V309):

function In V: In MAng:
char inkey() thin wrapper around inkey_ex main function to grab input
event_type inkey_aux() main function to grab input same, but mostly unused
event_type inkey_ex() return next input event, as a struct same, but only returns char

In other words, in V, inkey() calls inkey_ex(), which calls inkey_aux(). All the way, event_type is returned, only to be discarded at inkey(). If you want single char, call inkey(), if you want extended event, call inkey_ex(). In MAng, inkey_ex() can't return extended information, so there is no way to get it; inkey() doesn't call inkey_ex(), but does it's own processing.

Also, the macro complete char used in V is 30, yet it is 29 in MAng.

Also, the parse_slash mode is completely removed from V, so there's no special handling of char 28.

For this ticket, I'm keeping the char 28 hack, yet am planning to upgrade macro complete char from 29 to 30, to match V.

@flambard-took flambard-took added this to the Version 1.5.2 milestone Apr 24, 2019
@flambard-took flambard-took mentioned this issue Apr 24, 2019
10 tasks
flambard-took added a commit that referenced this issue Apr 24, 2019
The "new" inkey_ex() function should closely resemble the one from V309,
yet it contains additional hacks: ascii 28 hack and inkey_nonblock handling.

The flush_later has been defined to inkey_xtra, as those mean the same
thing.

We can now safely remove the "old" inkey() function and use the modern
facilities (hopefully).
flambard-took added a commit that referenced this issue May 6, 2019
"Synthetic macros" are macros that were injected into the key queue,
without accompying macro trigger (i.e. "f1" keypress). Those could be
generated by mouseclicks or virtual buttons, and we need to tell when
a macro starts/ends.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant