From 6ddc13ce6691291f298c6ebbcc08effa7ceb8a91 Mon Sep 17 00:00:00 2001 From: Elias Naur Date: Tue, 19 Apr 2022 08:58:47 +0200 Subject: [PATCH] widget: fix Editor key set Arrow and delete/backspace shortcuts use ShortcutAlt, not Shortcut. References: https://todo.sr.ht/~eliasnaur/gio/399 Signed-off-by: Elias Naur --- widget/editor.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/widget/editor.go b/widget/editor.go index 8fda117b..cf530f36 100644 --- a/widget/editor.go +++ b/widget/editor.go @@ -607,7 +607,7 @@ func (e *Editor) layout(gtx layout.Context, content layout.Widget) layout.Dimens defer clip.Rect(image.Rectangle{Max: e.viewSize}).Push(gtx.Ops).Pop() pointer.CursorText.Add(gtx.Ops) - const keyFilter = "(Short)-(Shift)-[←,→,↑,↓]|(Shift)-[⏎,⌤]|(Short)-(Shift)-[⌫,⌦]|(Shift)-[⇞,⇟,⇱,⇲]|Short-[C,V,X,A]" + const keyFilter = "(ShortAlt)-(Shift)-[←,→,↑,↓]|(Shift)-[⏎,⌤]|(ShortAlt)-(Shift)-[⌫,⌦]|(Shift)-[⇞,⇟,⇱,⇲]|Short-[C,V,X,A]" key.InputOp{Tag: &e.eventKey, Hint: e.InputHint, Keys: keyFilter}.Add(gtx.Ops) if e.requestFocus { key.FocusOp{Tag: &e.eventKey}.Add(gtx.Ops)