mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
widget: Update Selectable key filter
Selectable was using a key event filter copied directly from editor.go, but it didn't actually process all those keys. Update the filter to only ask for the keys that Selectable actually uses. Signed-off-by: Larry Clapp <larry@theclapp.org>
This commit is contained in:
@@ -199,8 +199,8 @@ func (l *Selectable) Layout(gtx layout.Context, lt *text.Shaper, font font.Font,
|
||||
pointer.CursorText.Add(gtx.Ops)
|
||||
var keys key.Set
|
||||
if l.focused {
|
||||
const keyFilterAllArrows = "(ShortAlt)-(Shift)-[←,→,↑,↓]|(Shift)-[⏎,⌤]|(ShortAlt)-(Shift)-[⌫,⌦]|(Shift)-[⇞,⇟,⇱,⇲]|Short-[C,V,X,A]|Short-(Shift)-Z"
|
||||
keys = keyFilterAllArrows
|
||||
const keyFilter = "(ShortAlt)-(Shift)-[←,→,↑,↓]|(Shift)-[⇞,⇟,⇱,⇲]|Short-[C,X,A]"
|
||||
keys = keyFilter
|
||||
}
|
||||
key.InputOp{Tag: l, Keys: keys}.Add(gtx.Ops)
|
||||
if l.requestFocus {
|
||||
|
||||
Reference in New Issue
Block a user