mod(example/input): reorder input handling cases; add alt-b/f binding implementations

This commit is contained in:
2025-06-28 22:08:19 +02:00
parent 92ae8c9681
commit ded1f2c17e
2 changed files with 57 additions and 23 deletions

View File

@@ -87,10 +87,6 @@ const InputField = struct {
.key => |key| {
if (key.isAscii()) try this.input.append(key.cp);
// TODO support arrow keys for navigation?
// TODO support readline keybindings (i.e. ctrl-k, ctrl-u, ctrl-b, ctrl-f, etc. and the equivalent alt bindings)
// create an own `Element` implementation from this
if (key.eql(.{ .cp = zterm.input.Enter }) or key.eql(.{ .cp = zterm.input.KpEnter }))
this.queue.push(.{ .accept = try this.input.toOwnedSlice() });