io/input,io/key: [API] replace SoftKeyboardOp with a command

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2023-10-09 16:37:21 -05:00
parent be36fc88aa
commit 5dd41f74d3
6 changed files with 18 additions and 34 deletions
+2 -5
View File
@@ -216,6 +216,8 @@ func (q *Router) executeCommands() {
switch req := req.(type) {
case key.FocusCmd:
q.key.queue.Focus(req.Tag, &q.handlers)
case key.SoftKeyboardCmd:
q.key.queue.softKeyboard(req.Show)
}
}
q.commands = nil
@@ -504,11 +506,6 @@ func (q *Router) collect() {
act := system.Action(encOp.Data[1])
pc.actionInputOp(act)
case ops.TypeKeySoftKeyboard:
op := key.SoftKeyboardOp{
Show: encOp.Data[1] != 0,
}
kq.softKeyboard(op.Show)
case ops.TypeKeyInput:
filter := key.Set(*encOp.Refs[1].(*string))
op := key.InputOp{